/* 音序 v3 · 发现页（/explore）。骨架同主流音乐平台：搜索 → 本周精选 → 卡片分区 → 风格 / 情绪入口 → 榜单 → 创作者。
   只用 base.css 的变量（版心 --edge、字号 --t-*、圆角 --r-cv / --r-card、卡片底 --card）。风格色块的十一种底色写在 views/explore.js。 */
.xp { padding-top: 28px; }
.xp-h { display: flex; align-items: center; justify-content: space-between; gap: 16px 40px; margin-bottom: 24px; }
.xp-ht { display: flex; align-items: baseline; gap: 16px; min-width: 0; }
.xp-ht h1 { font-size: var(--t-h1); font-weight: 700; line-height: 1.25; white-space: nowrap; }
.xp-ht p { font-size: var(--t-md); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-h.is-sub .xp-ht { display: none; }

/* 搜索框 */
.xs { position: relative; flex: 0 1 560px; display: flex; align-items: center; height: 46px; padding: 0 8px 0 44px; background: var(--card); border: 1px solid var(--line-2); border-radius: 23px; }
.xs:focus-within { border-color: var(--fg); background: var(--raise); }
.xs > .ic { position: absolute; left: 17px; width: 16px; height: 16px; color: var(--mute); pointer-events: none; }
.xs-in { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: var(--t-base); }
.xs-in::placeholder { color: var(--mute); }
.xs-in::-webkit-search-cancel-button { -webkit-appearance: none; }
.xs-x { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--mute); flex: none; }
.xs-x:hover { color: var(--fg); background: var(--hover); }
.xs-x .ic { width: 11px; height: 11px; }

/* 分区抬头 */
.xsec { margin-top: var(--sec); }
.xh { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.xh-t { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.xh h2, .xh h3 { font-size: var(--t-h2); font-weight: 700; line-height: 1.3; white-space: nowrap; }
.xh-n { font-size: var(--t-sm); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xh-more { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: var(--t-sm); color: var(--mute); white-space: nowrap; }
.xh-more .ic { width: 10px; height: 10px; }
.xh-more:hover { color: var(--fg); }
.by { color: inherit; }
a.by:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 本周精选 ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: 20px; }
.hero-main { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: center; gap: 32px; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); }
/* 底色取自封面本身：放大、虚化、压暗。只是一层底色，上面不叠半透明卡片。 */
.hero-main::before { content: ""; position: absolute; inset: -80px; z-index: -1; background: var(--cv) center / cover no-repeat; filter: blur(64px) saturate(1.1); opacity: .34; }
.hero-main::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(13, 16, 19, .2), rgba(13, 16, 19, .72)); }
.hero-cv { position: relative; display: block; border-radius: var(--r-cv); overflow: hidden; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.hero-t { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.hero-k { display: flex; align-items: center; gap: 12px; font-size: var(--t-xs); font-weight: 600; letter-spacing: .12em; color: var(--acc); }
.hero-k .num { color: var(--mute); letter-spacing: 0; font-weight: 400; }
.hero-t h2 { font-size: var(--t-xl); font-weight: 700; line-height: 1.2; letter-spacing: .01em; overflow-wrap: anywhere; }
.hero-t h2 a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.hero-by { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-size: var(--t-md); color: var(--mute); }
.hero-by > * + *::before { content: "·"; margin: 0 9px; color: var(--dim); }
.hero-by .by { color: var(--fg); font-weight: 600; }
.hero-by .num { font-size: var(--t-sm); }
.hero-note { font-size: var(--t-md); line-height: 1.7; color: var(--fg); opacity: .78; max-width: 46ch; text-wrap: pretty; }
.hero-a { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
/* 播放键是象牙白实心，不用强调绿（见 DESIGN「怎么不像别家」）。 */
.btn.hero-play { background: var(--fg); color: var(--bg); padding: 0 22px 0 18px; }
.btn.hero-play:hover { background: #fff; filter: none; }
.btn.hero-play .ic { width: 12px; height: 12px; }
.hero-side { display: flex; flex-direction: column; padding: 20px 20px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); min-width: 0; }
.hero-sh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: var(--t-md); font-weight: 600; }
.hero-side ol { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.hs { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 7px 8px; margin: 0 -8px; border-radius: var(--r); }
.hs:hover { background: var(--hover); }
.hs .sr-cv { width: 52px; }
.hs-s::before { content: "·"; margin: 0 7px; color: var(--dim); }

/* ---------- 小卡 ---------- */
.scs { --n: 7; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 20px; }
.scs:not(.is-grid) > .sc:nth-child(n+8) { display: none; }
.scs.is-grid { grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 28px 20px; margin-top: 24px; }
.sc { min-width: 0; }
.sc-cv { position: relative; border-radius: var(--r-cv); overflow: hidden; background: var(--raise); margin-bottom: 10px; }
.sc-cv .cover img { transition: transform .3s ease; }
.sc:hover .sc-cv .cover img { transform: scale(1.04); }
.sc-cv > a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(10, 12, 15, .5)); opacity: 0; transition: opacity .15s; }
.sc:hover .sc-cv > a::after, .sc.is-current .sc-cv > a::after { opacity: 1; }
.sc-play { position: absolute; right: 10px; bottom: 10px; width: 42px; height: 42px; background: var(--fg); color: var(--bg); box-shadow: 0 6px 16px rgba(0, 0, 0, .4); opacity: 0; transform: translateY(6px); transition: opacity .15s, transform .15s; }
.sc-play .ic { width: 14px; height: 14px; }
.sc-play:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, .4); background: #fff; }
.sc:hover .sc-play, .sc-play:focus-visible, .sc.is-current .sc-play { opacity: 1; transform: none; }
.sc h3 { font-size: var(--t-base); font-weight: 600; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.sc.is-current h3 { color: var(--acc); }
.sc-by { font-size: var(--t-sm); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-m { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; font-size: var(--t-xs); color: #71777d; }
.sc-m > :first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-m .num { flex: none; font-size: 11px; }
.sc-m .num::before { content: ""; display: inline-block; margin-right: 5px; border: solid transparent; border-width: 3.5px 0 3.5px 6px; border-left-color: currentColor; }

/* ---------- 风格色块 / 情绪入口 ---------- */
.gts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.gt { position: relative; display: flex; flex-direction: column; gap: 2px; height: 108px; padding: 14px 16px; border-radius: var(--r-card); background: var(--c); overflow: hidden; transition: filter .15s; }
.gt:hover { filter: brightness(1.12); }
.gt b { position: relative; z-index: 1; font-size: var(--t-lg); font-weight: 700; line-height: 1.3; max-width: 70%; }
.gt.is-all { background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2); }
.gt.is-all:hover { background: var(--card-hover); filter: none; }
.gt .num { position: relative; z-index: 1; color: rgba(232, 230, 225, .72); }
.gt img { position: absolute; right: -14px; bottom: -14px; width: 78px; height: 78px; object-fit: cover; border-radius: 4px; transform: rotate(20deg); box-shadow: -4px 4px 14px rgba(0, 0, 0, .35); }
.mts { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.mt { display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; column-gap: 12px; height: 64px; padding-right: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.mt:hover { background: var(--card-hover); border-color: var(--line-2); }
.mt img { grid-row: 1 / 3; width: 48px; height: 64px; object-fit: cover; }
.mt b { align-self: end; font-size: var(--t-md); font-weight: 600; line-height: 1.3; white-space: nowrap; }
.mt .num { align-self: start; color: var(--mute); font-size: 11px; white-space: nowrap; }

/* ---------- 榜单与歌曲行 ---------- */
.charts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 48px; }
.chart .xh { margin-bottom: 8px; }
.sr { display: grid; grid-template-columns: 28px 44px minmax(0, 1fr) minmax(0, 132px) 56px 44px 32px; align-items: center; gap: 14px; height: 60px; padding: 0 10px; margin: 0 -10px; border-radius: var(--r); }
.sr:hover { background: var(--hover); }
.sr-hd { height: 34px; font-size: var(--t-xs); color: var(--dim); border-bottom: 1px solid var(--line); border-radius: 0; margin-bottom: 4px; letter-spacing: .04em; }
.sr-hd:hover { background: none; }
.sr-i { color: var(--mute); text-align: center; font-size: 13px; }
ol > .sr:nth-child(-n+3) .sr-i { color: var(--fg); font-weight: 500; }
.sr.is-current .sr-i { color: var(--acc); }
.sr-cv { position: relative; width: 44px; border-radius: 4px; overflow: hidden; }
.sr-play { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; box-shadow: none; background: rgba(10, 12, 15, .6); color: var(--fg); opacity: 0; transition: opacity .12s; }
.sr-play:hover { box-shadow: none; }
.sr:hover .sr-play, .hs:hover .sr-play, .sr-play:focus-visible, .is-playing > .sr-cv .sr-play { opacity: 1; }
.is-playing > .sr-cv > .sr-play { background: rgba(10, 12, 15, .6); color: var(--fg); }
.sr-t { min-width: 0; }
.sr-t h3 { font-size: var(--t-base); font-weight: 500; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-t h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.is-current > .sr-t h3 { color: var(--acc); }
.sr-t p { font-size: var(--t-sm); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-s { font-size: var(--t-sm); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.sr-s:hover { color: var(--fg); }
.sr-p, .sr-d { color: var(--mute); text-align: right; white-space: nowrap; }
.sr-hd .sr-p, .sr-hd .sr-d { color: var(--dim); }
.sr-more { opacity: .55; }
.sr:hover .sr-more, .sr-more:focus-visible { opacity: 1; }
.srs { margin-top: 4px; }

/* ---------- 创作者 ---------- */
.crs { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 20px; }
.crs > li:nth-child(n+9) { display: none; }
.cr { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 16px 8px 14px; border-radius: var(--r-card); text-align: center; }
.cr:hover { background: var(--hover); }
.cr-av { display: grid; place-items: center; width: min(100%, 112px); aspect-ratio: 1; margin-bottom: 10px; border-radius: 50%; overflow: hidden; background: var(--raise); box-shadow: 0 0 0 1px var(--line); }
.cr-av img { width: 100%; height: 100%; object-fit: cover; }
.cr-av i { font-style: normal; font-size: 28px; font-weight: 700; color: var(--mute); }
.cr b { max-width: 100%; font-size: var(--t-base); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr .num { color: var(--mute); }

/* 页尾引导：这一屏唯一的绿色实心块 */
.xp-cta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 32px; margin-top: var(--sec); padding: 24px 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); }
.xp-cta b { font-size: var(--t-lg); font-weight: 700; }
.xp-cta p { margin-top: 2px; font-size: var(--t-md); color: var(--mute); max-width: 68ch; }

/* ---------- 子页抬头（风格 / 情绪 / 查看全部 / 榜单 / 创作者 / 搜索） ---------- */
.lh { display: flex; align-items: flex-end; gap: 24px; padding: 8px 0 22px; border-bottom: 1px solid var(--line); }
.lh-av { width: 120px; flex: none; margin: 0; }
.lh-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lh-k { display: flex; align-items: center; font-size: var(--t-sm); color: var(--mute); }
.lh-k a:hover { color: var(--fg); }
.lh-k span::before { content: "/"; margin: 0 9px; color: var(--dim); }
.lh h1 { font-size: var(--t-xl); font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.lh-n { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-size: var(--t-md); color: var(--mute); }
.lh-n > * + *::before { content: "·"; margin: 0 9px; color: var(--dim); }
.lh-a { display: flex; align-items: center; gap: 16px; flex: none; }
.lh-f { padding: 14px 0 0; }
.xp .empty { border-top: 0; align-items: center; text-align: center; padding: 96px 0 72px; }
.xp .empty .emp-t { font-size: var(--t-h2); }
.xp .empty .empty-d { font-size: var(--t-md); }
.xp .empty .empty-a { justify-content: center; }
.xp .chips .chip[aria-checked=true] { color: var(--fg); background: var(--on); box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 600; }

/* ---------- 加载骨架 ---------- */
.xsk i { display: block; border-radius: 4px; background: var(--on); animation: sk 1.4s ease-in-out infinite; }
.xsk-hero { height: 298px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line); }
.xsk-sec { margin-top: var(--sec); }
.xsk-h { width: 120px; height: 20px; margin-bottom: 20px; }
.xsk .sc { display: block; }
.xsk-cv { aspect-ratio: 1; border-radius: var(--r-cv) !important; margin-bottom: 12px; }
.xsk-l { height: 12px; width: 78%; margin-bottom: 8px; }
.xsk-l.is-s { width: 46%; }
.xp-h.is-sub + .xp-b .xsk-sec:first-child { margin-top: 12px; }

/* ---------- 断点 ---------- */
@media (min-width: 2200px) {
  .scs { --n: 8; }
  .scs:not(.is-grid) > .sc:nth-child(n+8) { display: block; }
  .scs:not(.is-grid) > .sc:nth-child(n+9) { display: none; }
  .scs.is-grid { grid-template-columns: repeat(auto-fill, minmax(188px, 1fr)); }
  .hero-main { grid-template-columns: 280px minmax(0, 1fr); gap: 40px; padding: 32px; }
  .gt { height: 124px; padding: 18px 20px; }
  .gt img { width: 92px; height: 92px; }
  .mt { height: 72px; grid-template-columns: 54px minmax(0, 1fr); }
  .mt img { width: 54px; height: 72px; }
  .sr { height: 66px; grid-template-columns: 32px 48px minmax(0, 1fr) minmax(0, 150px) 64px 52px 32px; }
  .sr-cv { width: 48px; }
  .hs { grid-template-columns: 60px minmax(0, 1fr) auto; }
  .hs .sr-cv { width: 60px; }
  .cr-av { width: min(100%, 128px); }
  .xs { flex-basis: 620px; height: 50px; border-radius: 25px; }
}
@media (max-width: 1360px) {
  .scs { --n: 6; }
  .scs:not(.is-grid) > .sc:nth-child(n+7) { display: none; }
  .hero-main { grid-template-columns: 208px minmax(0, 1fr); gap: 26px; padding: 24px; }
  .mts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .crs { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .crs > li:nth-child(n+8) { display: none; }
  .charts { gap: 20px 36px; }
  .sr { grid-template-columns: 28px 44px minmax(0, 1fr) minmax(0, 104px) 52px 44px 32px; gap: 12px; }
}
@media (max-width: 1100px) {
  .scs { --n: 5; }
  .scs:not(.is-grid) > .sc:nth-child(n+6) { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-side ol { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .gts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .charts { grid-template-columns: minmax(0, 1fr); gap: var(--sec); }
  .crs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .crs > li:nth-child(n+7) { display: none; }
}
/* 手机 / 窄屏：卡片行横滑，分类两列，榜单行只留序号、封面、歌名、更多 */
@media (max-width: 760px) {
  .xp { padding-top: 16px; }
  .xp-h { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 18px; }
  .xp-ht { justify-content: space-between; }
  .xp-ht h1 { font-size: 26px; }
  .xp-ht p { font-size: 13px; }
  .xs { flex: none; height: 46px; }
  .xs-in { font-size: 16px; }
  .xs-x { width: 40px; height: 40px; }
  .xsec, .xsk-sec, .xp-cta { margin-top: 32px; }
  .xh { margin-bottom: 12px; }
  .xh h2, .xh h3 { font-size: 19px; }
  .xh-more { min-height: 44px; margin: -12px 0; }
  .hero-main { grid-template-columns: 112px minmax(0, 1fr); align-items: start; gap: 14px 16px; padding: 16px; }
  .hero-t { gap: 6px; }
  .hero-t h2 { font-size: 22px; }
  .hero-k .num { display: none; }
  .hero-by { font-size: 13px; }
  .hero-by .num { display: none; }
  .hero-note { display: none; }
  .hero-a { margin-top: 6px; }
  .hero-a .btn { height: 40px; }
  .hero-a .btn.ghost { display: none; }
  .hero-side { padding: 14px 16px 8px; }
  .hero-side ol { display: flex; }
  .hs { padding: 6px 8px; min-height: 60px; }
  .scs:not(.is-grid) { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut); scroll-padding-left: var(--gut); }
  .scs:not(.is-grid)::-webkit-scrollbar { display: none; }
  .scs:not(.is-grid) > .sc { flex: none; width: 140px; scroll-snap-align: start; }
  .scs:not(.is-grid) > .sc:nth-child(n+6) { display: block; }
  .scs:not(.is-grid) > .sc:nth-child(n+11) { display: none; }
  .scs.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; margin-top: 18px; }
  .sc-play { opacity: 1; transform: none; width: 44px; height: 44px; right: 6px; bottom: 6px; background: rgba(13, 16, 19, .72); color: var(--fg); box-shadow: none; }
  .sc-m .num { display: none; }
  .is-grid .sc-m .num { display: inline; }
  .gts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gt { height: 88px; padding: 12px 14px; }
  .gt b { font-size: 16px; }
  .gt img { width: 64px; height: 64px; right: -12px; bottom: -12px; }
  .mts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mt { height: 56px; grid-template-columns: 44px minmax(0, 1fr); }
  .mt img { width: 44px; height: 56px; }
  .sr, .sr-hd { grid-template-columns: 24px 44px minmax(0, 1fr) 44px; gap: 12px; height: 62px; padding: 0 0 0 4px; margin: 0; }
  .sr-s, .sr-p, .sr-d, .sr-hd { display: none; }
  .sr .sr-d { display: none; }
  .hs .sr-d { display: block; }
  .sr-more { width: 44px; height: 44px; opacity: .8; }
  .sr:hover { background: none; }
  .crs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gut)); padding: 0 calc(var(--gut) - 8px); }
  .crs::-webkit-scrollbar { display: none; }
  .crs > li { flex: none; width: 104px; }
  .crs > li:nth-child(n+7) { display: block; }
  .cr { padding: 8px; }
  .cr-av { width: 80px; }
  .xp-cta { flex-direction: column; align-items: flex-start; padding: 18px 16px; }
  .lh { flex-wrap: wrap; align-items: center; gap: 14px 16px; padding-bottom: 16px; }
  .lh-av { width: 72px; }
  .lh h1 { font-size: 26px; }
  .lh-a { width: 100%; justify-content: space-between; }
  .lh-f { margin: 0 calc(-1 * var(--gut)); padding: 12px var(--gut) 0; }
  .xp .chips .chip { height: 36px; }
  .xsk-hero { height: 150px; }
  .xsk .scs > .sc { flex: none; width: 140px; }
}
