/* ============================================================
   乐手网前台样式 - Mobile-First 响应式
   主色：#1E9FFF（对齐后台）
   断点：mobile < 768px | tablet ≥ 768px | desktop ≥ 1024px | wide ≥ 1280px
   ============================================================ */

:root {
  --primary: #1E9FFF;
  --primary-dark: #0E7BD8;
  --primary-light: #5BB8FF;
  --primary-soft: #E6F4FF;
  --orange: #FF9800;
  --green: #4CAF50;
  --red: #F44336;
  --success: #52c41a;
  --error: #FF5722;
  --bg: #f0f2f5;
  --bg-card: #ffffff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f0f2f5;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 32px rgba(0,0,0,0.10);
  --radius: 8px;
  --radius-lg: 12px;
  /* 触屏目标最小尺寸 */
  --touch-target: 44px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; overflow-x: hidden; max-width: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  /* 给手机端底部 sticky bar 留空间 */
  padding-bottom: env(safe-area-inset-bottom, 0);
}
/* 防止 flex 子元素被内部宽内容撑开 body */
body > * { min-width: 0; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }

/* ============================================================
   顶部导航 — 参考 d 站两层布局
   上层: ys-topbar (logo + 用户区)
   下层: ys-topbar-nav (菜单独立一行, 顶端对齐, active 下划线)
   ============================================================ */
.ys-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.ys-topbar {
  height: 64px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ys-topbar-logo {
  font-size: 17px;
  font-weight: bold;
  color: var(--primary);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ys-topbar-logo img {
  height: 32px;
  width: auto;
  display: block;
}
.ys-topbar-logo::before { content: none; }

/* ============================================================
   顶部搜索框（参考 d 站：分类下拉 + 输入框 + 提交 + 热搜）
   ============================================================ */
.ys-search-box {
  display: none; /* 移动端隐藏 */
  flex: 1;
  min-width: 0;
  margin: 0 12px;
  max-width: 480px;
}
.ys-search {
  display: flex;
  align-items: stretch;
  border: 2px solid var(--primary);
  border-radius: 999px;
  background: #fff;
  overflow: visible;
  height: 40px;
  position: relative;
}
.ys-search-type {
  position: relative;
  flex-shrink: 0;
}
.ys-search-type-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
  padding: 0 12px 0 16px;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-right: 1px solid var(--border);
  border-radius: 0;
  white-space: nowrap;
  transition: color .15s;
}
.ys-search-type-btn:hover { color: var(--primary); }
.ys-search-type-btn .ys-search-type-arrow {
  color: var(--text-muted);
  transition: transform .2s;
}
.ys-search-type.open .ys-search-type-btn { color: var(--primary); }
.ys-search-type.open .ys-search-type-arrow { transform: rotate(180deg); }
.ys-search-type-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 140px;
  max-height: 320px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  padding: 6px 0;
  margin: 0;
  list-style: none;
  z-index: 1100;
  -webkit-overflow-scrolling: touch;
}
.ys-search-type-menu li { margin: 0; }
.ys-search-type-opt {
  display: block;
  padding: 8px 16px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: background .12s, color .12s;
  white-space: nowrap;
  text-decoration: none;
}
.ys-search-type-opt:hover { background: var(--primary-soft, #e8f4ff); color: var(--primary); }
.ys-search-type-opt.active { color: var(--primary); font-weight: 600; }
.ys-search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text);
}
.ys-search-input::placeholder { color: var(--text-muted); }
.ys-search-submit {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 100%;
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 0 999px 999px 0;
  cursor: pointer;
  transition: background .15s;
}
.ys-search-submit:hover { background: var(--primary-dark, #0E7BD8); }
/* 热搜词 */
.ys-hot-tags {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}
.ys-hot-tags-label { margin-right: 4px; }
.ys-hot-tags a {
  color: var(--text-muted);
  margin-right: 12px;
  transition: color .15s;
}
.ys-hot-tags a:hover { color: var(--primary); }
.ys-topbar-nav {
  display: none; /* 手机端隐藏，底部 tab bar 替代 */
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ys-topbar-nav::-webkit-scrollbar { display: none; }
.ys-topbar-nav a {
  color: var(--text);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  min-height: var(--touch-target);
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: color .15s, transform .15s, border-color .15s;
}
.ys-topbar-nav a:hover { color: var(--primary); transform: translateY(-1px); }
.ys-topbar-nav a.active { color: var(--primary); border-bottom-color: var(--primary); }
.ys-topbar-user {
  display: none; /* 手机端隐藏右上角用户区，改为底部"我的" */
  align-items: center;
  gap: 8px;
  font-size: 13px;
  flex-shrink: 0;
}
.ys-topbar-user a { color: var(--text-muted); }
.ys-topbar-user .ys-user-name { color: var(--primary); font-weight: 500; }
/* 已登录账号盒子：头像 + 昵称 + 角色标 + 退出 */
.ys-topbar-user .ys-user-box { display: inline-flex; align-items: center; gap: 10px; }
.ys-topbar-user .ys-user-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px; border-radius: 999px;
  background: var(--primary-soft, #e8f4ff);
  color: var(--primary); font-weight: 500;
  transition: background .15s, box-shadow .15s;
  text-decoration: none;
}
.ys-topbar-user .ys-user-trigger:hover {
  background: var(--primary); color: #fff;
  box-shadow: 0 4px 12px rgba(30,159,255,.25);
}
.ys-topbar-user .ys-user-trigger:hover .ys-user-role { background: rgba(255,255,255,.22); color: #fff; }
.ys-topbar-user .ys-user-avatar {
  width: 32px; height: 32px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark, #0E7BD8));
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; flex-shrink: 0;
}
.ys-topbar-user .ys-user-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ys-topbar-user .ys-user-avatar .ys-avatar-letter { line-height: 1; }
.ys-topbar-user .ys-user-name { color: inherit; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ys-topbar-user .ys-user-role {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  font-size: 10px; line-height: 1.4; font-weight: 500;
  background: rgba(30,159,255,.12); color: var(--primary);
  margin-left: 2px;
}
.ys-topbar-user .ys-user-logout {
  font-size: 13px; color: var(--text-muted);
  padding: 4px 8px; border-radius: 4px; cursor: pointer;
}
.ys-topbar-user .ys-user-logout:hover { color: var(--red, #f56c6c); background: rgba(245,108,108,.08); }
.ys-topbar-user .ys-user-login {
  display: inline-block; padding: 6px 16px;
  background: var(--primary); color: #fff !important;
  border-radius: 999px; font-weight: 500; font-size: 13px;
  text-decoration: none; transition: background .15s, box-shadow .15s;
}
.ys-topbar-user .ys-user-login:hover { background: var(--primary-dark, #0E7BD8); box-shadow: 0 4px 12px rgba(30,159,255,.3); }

/* 平板及以上 (PC 端:logo / 搜索框加大) */
@media (min-width: 768px) {
  .ys-topbar {
    height: 116px;
    padding: 0 24px;
    gap: 18px;
  }
  .ys-topbar-logo {
    font-size: 24px;
    margin-right: 0;
    gap: 10px;
    flex-shrink: 0;
  }
  .ys-topbar-logo img { height: 48px; width: auto; }
  .ys-search-box { display: block; }
  .ys-search { height: 46px; border-width: 2px; }
  .ys-search-type-btn { font-size: 15px; padding: 0 12px 0 16px; }
  .ys-search-input { font-size: 15px; padding: 0 12px; }
  .ys-search-submit { width: 54px; }
  .ys-search-submit svg { width: 19px; height: 19px; }
  .ys-topbar-nav { display: flex; gap: 4px; padding: 0; border-top: 0; }
  .ys-topbar-nav a { padding: 15px 18px; font-size: 15px; }
  .ys-topbar-nav a:hover { background: transparent; }
  .ys-topbar-user { display: flex; font-size: 14px; gap: 12px; align-items: center; flex-shrink: 0; }
}
/* 桌面及以上 */
@media (min-width: 1024px) {
  .ys-topbar { padding: 0 20px; max-width: 1400px; margin: 0 auto; }
  .ys-topbar-nav { padding: 0 16px; max-width: 1400px; margin: 0 auto; }
  .ys-search-box { max-width: 540px; margin: 0 auto; }
}

/* ============================================================
   首页 Hero 已删除
   ============================================================ */

.ys-home-body {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  /* body 是 flex column 容器,margin:0 auto 在 flex 里会吃掉剩余空间导致不 stretch,
     用 align-self:center 让 main 先 stretch 到父容器宽度再居中放置 */
  align-self: center;
  padding: 0 16px 40px;
}
.ys-list-body {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  align-self: center;
  padding: 0 16px 40px;
}
@media (min-width: 1024px) {
  .ys-home-body { padding: 0 20px 60px; }
  .ys-list-body { padding: 0 20px 60px; }
}

/* 分类 + 推荐区 */
.ys-section { margin-top: -28px; position: relative; z-index: 3; }
@media (min-width: 1024px) { .ys-section { margin-top: -40px; } }

.ys-cat-bar {
  background: #fff;
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow);
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-bottom: 18px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.ys-cat-bar::-webkit-scrollbar { display: none; }
.ys-cat-bar a {
  padding: 8px 16px;
  background: var(--bg);
  color: var(--text-muted);
  border-radius: 18px;
  font-size: 13px;
  white-space: nowrap;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.ys-cat-bar a.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 12px rgba(30,159,255,0.3);
}
@media (min-width: 768px) {
  .ys-cat-bar { padding: 18px 24px; flex-wrap: wrap; gap: 8px; justify-content: center; overflow: visible; }
  .ys-cat-bar a { padding: 8px 22px; font-size: 14px; }
}

/* ============================================================
   区块标题
   ============================================================ */
.ys-block-title {
  font-size: 17px;
  color: var(--text);
  margin: 24px 0 16px;
  padding: 0 0 12px;
  border-bottom: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.ys-block-title .ys-block-sub { font-size: 12px; color: var(--text-muted); font-weight: normal; }
.ys-block-title .ys-block-link { font-size: 12px; color: var(--primary); font-weight: normal; }
@media (min-width: 1024px) {
  .ys-block-title { font-size: 22px; margin: 0 0 20px; padding: 0 0 14px; }
  .ys-block-title .ys-block-sub { font-size: 13px; }
  .ys-block-title .ys-block-link { font-size: 13px; }
}

/* ============================================================
   曲谱卡片网格 - 移动端 2 列，桌面 4-5 列
   ============================================================ */
.ys-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.ys-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.ys-card:active { transform: scale(0.98); transition: transform 0.1s; }
@media (min-width: 768px) {
  .ys-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
  .ys-card { transition: all 0.25s; }
  .ys-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
  .ys-card:active { transform: translateY(-2px); }
}
@media (min-width: 1024px) {
  .ys-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
}

/* ============================================================
   纯文字曲谱卡片（创作者主页 Ta 的曲谱）
   - 没有缩略图，纯 title / meta / price 三段
   - 用 var(--bg-card / --radius / --shadow-sm / --primary) 保持站内设计语言一致
   ============================================================ */
.score-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.score-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.score-card h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
.score-card h4 a {
  color: var(--text-primary, #222);
  text-decoration: none;
}
.score-card h4 a:hover {
  color: var(--primary);
}
.score-card .score-meta {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary, #888);
}
.score-card .score-price {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}
/* 价格数字 / 单位走站内标准 ys-row-price-num + ys-row-price-unit (参考 list.js / index.js)
   红数字 + 灰小字"币" 跨页统一; 免费走 ys-row-price-free 绿字 */

.ys-card-cover {
  height: 130px;
  background: linear-gradient(135deg, var(--primary-soft), #fff);
  overflow: hidden;
  position: relative;
}
.ys-card-cover img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 1024px) {
  .ys-card-cover { height: 180px; }
  .ys-card-cover img { transition: transform 0.3s; }
  .ys-card:hover .ys-card-cover img { transform: scale(1.05); }
}

.ys-card-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 4px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-weight: 500;
}
.ys-card-tag.free { background: var(--green); }
.ys-card-tag.vip { background: linear-gradient(135deg, var(--orange), #F57C00); }
.ys-card-tag.hot { background: linear-gradient(135deg, var(--red), #D32F2F); }

.ys-card-body { padding: 10px 12px; }
.ys-card-title {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ys-card-meta { color: var(--text-light); font-size: 11px; margin: 0 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ys-card-bottom { display: flex; justify-content: space-between; align-items: center; }
.ys-card-price { color: var(--red); font-weight: bold; font-size: 15px; }
.ys-card-price.free { color: var(--green); font-size: 13px; }
.ys-card-action { color: var(--primary); font-size: 12px; font-weight: 500; }
@media (min-width: 1024px) {
  .ys-card-body { padding: 16px; }
  .ys-card-title { font-size: 15px; margin-bottom: 8px; }
  .ys-card-meta { font-size: 12px; margin-bottom: 12px; }
  .ys-card-price { font-size: 17px; }
}

/* ============================================================
   内容容器
   ============================================================ */
.ys-container {
  flex: 1;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 16px 16px 32px;
}
.ys-container.narrow { max-width: 720px; }
.ys-container.wide { max-width: 100%; padding: 16px; }
@media (min-width: 768px) {
  .ys-container { padding: 30px 30px 50px; }
  .ys-container.wide { padding: 24px 30px; }
}
@media (min-width: 1024px) {
  .ys-container { max-width: 1400px; padding: 40px 20px 60px; }
  .ys-container.wide { padding: 30px 40px; }
}

/* ============================================================
   通用卡片/面板
   ============================================================ */
.ys-panel {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.ys-panel h2 {
  margin: 0 0 14px;
  font-size: 18px;
  color: var(--text);
  font-weight: 600;
}
.ys-panel h3 {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--text);
  font-weight: 600;
}
.ys-panel p { color: var(--text-muted); line-height: 1.8; margin: 0 0 10px; font-size: 14px; }
@media (min-width: 1024px) {
  .ys-panel { padding: 32px; margin-bottom: 24px; }
  .ys-panel h2 { font-size: 22px; margin-bottom: 20px; }
  .ys-panel h3 { font-size: 17px; margin-bottom: 16px; }
  .ys-panel p { font-size: 14px; margin-bottom: 12px; }
}

/* ============================================================
   按钮 - 移动端更大触摸区
   ============================================================ */
.ys-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-size: 14px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  line-height: 1.4;
  min-height: 40px;
  -webkit-appearance: none;
}
.ys-btn:active { opacity: 0.8; }
.ys-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.ys-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.ys-btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.ys-btn.success { background: var(--green); border-color: var(--green); color: #fff; }
.ys-btn.success:hover { background: #388E3C; border-color: #388E3C; color: #fff; }
.ys-btn.warn { background: var(--orange); border-color: var(--orange); color: #fff; }
.ys-btn.warn:hover { background: #F57C00; border-color: #F57C00; color: #fff; }
.ys-btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.ys-btn.danger:hover { background: #D32F2F; border-color: #D32F2F; color: #fff; }
.ys-btn.ghost { background: transparent; border-color: var(--primary); color: var(--primary); }
.ys-btn.ghost:hover { background: var(--primary); color: #fff; }
.ys-btn.block { display: flex; width: 100%; }
.ys-btn.lg { padding: 12px 24px; font-size: 15px; min-height: var(--touch-target); }
.ys-btn.sm { padding: 6px 12px; font-size: 12px; min-height: 32px; }

/* ============================================================
   表单 - 移动端字号 ≥ 16px 防 iOS 缩放
   ============================================================ */
.ys-form-row { margin-bottom: 16px; }
.ys-form-row label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}
.ys-form-row input[type=text],
.ys-form-row input[type=password],
.ys-form-row input[type=email],
.ys-form-row input[type=tel],
.ys-form-row input[type=number],
.ys-form-row select,
.ys-form-row textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px; /* 防 iOS 自动缩放 */
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-family: inherit;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  min-height: var(--touch-target);
}
.ys-form-row input:focus,
.ys-form-row select:focus,
.ys-form-row textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,159,255,0.12); }
.ys-form-row textarea { resize: vertical; min-height: 100px; line-height: 1.7; }
.ys-form-row.inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ys-form-row.inline label { margin-bottom: 0; min-width: 70px; }
.ys-form-row .ys-hint { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.ys-form-row .ys-hint.ys-hint-ok { color: #16a34a; }
.ys-form-row .ys-hint.ys-hint-err { color: #dc2626; }
.ys-form-row .ys-hint.ys-hint-loading { color: #6b7280; }

/* 验证码输入组（input + 右侧按钮） */
.ys-input-group {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.ys-input-group input { flex: 1; min-width: 0; }
.ys-btn-code {
  flex-shrink: 0;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  background: #e8f4ff;
  border: 1px solid #b3dcff;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  min-width: 110px;
}
.ys-btn-code:hover:not(:disabled) {
  background: var(--primary);
  color: #fff;
}
.ys-btn-code:disabled {
  color: var(--text-light);
  background: #f3f4f6;
  border-color: var(--border);
  cursor: not-allowed;
}

/* 表单行内的链接行（忘记密码 / 返回登录） */
.ys-form-row-foot {
  text-align: right;
  margin: -8px 0 16px;
  font-size: 13px;
}
/* 表单顶部独立成行的「返回登录」等导航链接：左对齐、不被按钮压住 */
.ys-form-row-foot-top {
  text-align: left;
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}
.ys-form-row-foot a {
  color: var(--primary);
  text-decoration: none;
}
.ys-form-row-foot a:hover { text-decoration: underline; }
@media (min-width: 1024px) {
  .ys-form-row { margin-bottom: 20px; }
  .ys-form-row label { font-size: 14px; margin-bottom: 8px; }
  .ys-form-row input, .ys-form-row select, .ys-form-row textarea { font-size: 14px; padding: 12px 16px; }
  .ys-form-row.inline label { min-width: 90px; }
}

/* ============================================================
   表格 - 移动端包滚动容器
   ============================================================ */
.ys-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -20px; padding: 0 20px; }
.ys-table { width: 100%; min-width: 600px; border-collapse: collapse; background: #fff; }
.ys-table th, .ys-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}
.ys-table th { background: #fafbfc; font-weight: 600; color: var(--text-muted); font-size: 12px; }
.ys-table tr:hover { background: var(--primary-soft); }
@media (min-width: 1024px) {
  .ys-table-wrap { margin: 0; padding: 0; }
  .ys-table { min-width: 0; }
  .ys-table th, .ys-table td { padding: 14px 16px; font-size: 14px; }
  .ys-table th { font-size: 14px; }
}

/* ============================================================
   标签
   ============================================================ */
.ys-tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 500;
}
.ys-tag.primary { background: var(--primary-soft); color: var(--primary); }
.ys-tag.success { background: rgba(76,175,80,0.1); color: var(--green); }
.ys-tag.warn { background: rgba(255,152,0,0.1); color: var(--orange); }
.ys-tag.danger { background: rgba(244,67,54,0.1); color: var(--red); }
.ys-tag.info { background: rgba(30,159,255,0.1); color: var(--primary); }
.ys-tag.vip {
  background: linear-gradient(135deg, var(--orange), #F57C00);
  color: #fff;
  font-weight: bold;
}

/* ============================================================
   页脚 - 移动端单列，桌面 4 列
   ============================================================ */
.ys-footer {
  background: #2c3e50;
  color: #b0bec5;
  padding: 30px 16px 16px;
  margin-top: 40px;
}
.ys-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.ys-footer-brand { grid-column: 1 / -1; }
.ys-footer-brand h4 { color: #fff; font-size: 17px; margin: 0 0 8px; }
.ys-footer-brand p { font-size: 13px; line-height: 1.7; color: #90a4ae; margin: 0; }
.ys-footer-logo {
  display: block;
  width: auto;
  height: 36px;
  margin: 0 0 10px;
}
.ys-footer-col h5 { color: #fff; font-size: 14px; margin: 0 0 10px; }
.ys-footer-col a {
  display: block;
  color: #90a4ae;
  font-size: 13px;
  padding: 4px 0;
  min-height: 32px;
}
.ys-footer-col a:hover { color: var(--primary-light); }
.ys-footer-bottom {
  max-width: 1280px;
  margin: 20px auto 0;
  padding-top: 16px;
  border-top: 1px solid #455a64;
  text-align: center;
  font-size: 12px;
  color: #78909c;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
@media (min-width: 768px) {
  .ys-footer { padding: 50px 20px 20px; margin-top: 60px; }
  .ys-footer-inner { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
  .ys-footer-brand { grid-column: auto; }
  .ys-footer-brand h4 { font-size: 18px; margin-bottom: 12px; }
  .ys-footer-col h5 { font-size: 15px; margin-bottom: 16px; }
  .ys-footer-col a { padding: 5px 0; min-height: auto; }
  .ys-footer-bottom { margin-top: 30px; padding-top: 20px; }
}

/* ============================================================
   登录/注册页 - 移动端满屏，桌面居中卡片
   ============================================================ */
.ys-auth {
  /* flex:1 1 auto + flex-shrink:0 → 允许 box 内容撑大父容器
     短内容时仍 flex:1 撑满剩余空间 */
  flex: 1 1 auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: linear-gradient(135deg, #1E9FFF 0%, #0E7BD8 100%);
  position: relative;
  /* mobile: 不要裁切, 让 box 完整可见 (footer 自身很高, 不能再藏) */
  overflow: visible;
}
.ys-auth::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -100px;
  width: 280px;
  height: 280px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  pointer-events: none;
}
.ys-auth-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  position: relative;
  z-index: 2;
  /* 水平居中, 不要垂直 auto (auto 会在 box 比容器高时给负 margin, 把内容顶出去) */
  margin: 0 auto;
  flex-shrink: 0;
}
.ys-auth-box h2 {
  text-align: center;
  margin: 0 0 4px;
  font-size: 22px;
  color: var(--text);
  font-weight: 600;
}
.ys-auth-box .ys-auth-sub {
  text-align: center;
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 13px;
}
.ys-auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--bg);
  margin-bottom: 20px;
}
.ys-auth-tabs span {
  flex: 1;
  text-align: center;
  padding: 12px;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  position: relative;
  min-height: var(--touch-target);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ys-auth-tabs span.active { color: var(--primary); }
.ys-auth-tabs span.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}
.ys-auth-tip {
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--primary-soft);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--text-muted);
}

/* 注册方式分段选择器：手机号 / 邮箱 */
.ys-reg-switch {
  display: flex;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}
.ys-reg-opt {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 14px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  min-height: 44px;
}
.ys-reg-opt:hover { color: var(--primary); }
.ys-reg-opt.active {
  background: #fff;
  color: var(--primary);
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.ys-reg-opt-icon { font-size: 16px; }
.ys-auth-foot {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================================
   已登录态卡片（覆盖在登录表单之上）
   ============================================================ */
.ys-loggedin {
  text-align: center;
  padding: 8px 0 4px;
}
.ys-loggedin-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-soft);
  background: var(--primary-soft);
  margin: 4px auto 14px;
  display: block;
  box-shadow: 0 4px 12px rgba(30,159,255,0.15);
}
.ys-loggedin-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.ys-loggedin-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 22px;
  word-break: break-all;
}
.ys-loggedin .ys-btn {
  margin-bottom: 12px;
  text-decoration: none;
  justify-content: center;
}
.ys-loggedin .ys-btn:last-of-type {
  margin-bottom: 0;
}
.ys-loggedin-switch {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--bg);
  font-size: 12px;
  color: var(--text-muted);
}
.ys-loggedin-switch a {
  color: var(--primary);
  text-decoration: none;
}
.ys-loggedin-switch a:hover { text-decoration: underline; }

@media (min-width: 768px) {
  .ys-auth { padding: 60px 20px; }
  .ys-auth-box { padding: 50px 50px 40px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
  .ys-auth-box h2 { font-size: 26px; margin-bottom: 8px; }
  .ys-auth-box .ys-auth-sub { margin-bottom: 32px; font-size: 14px; }
  .ys-auth-tabs { margin-bottom: 28px; }
  .ys-auth-tip { margin-top: 16px; padding: 12px 16px; }
  .ys-auth-foot { margin-top: 20px; }
  .ys-loggedin-avatar { width: 96px; height: 96px; margin-bottom: 16px; }
  .ys-loggedin-name { font-size: 20px; }
  .ys-loggedin-meta { margin-bottom: 28px; }
  .ys-loggedin-switch { margin-top: 22px; padding-top: 18px; }
}

/* ============================================================
   VIP 页
   ============================================================ */
.ys-vip-hero {
  background: linear-gradient(135deg, #1E9FFF 0%, #0E7BD8 50%, #0066CC 100%);
  color: #fff;
  padding: 36px 20px;
  border-radius: var(--radius);
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.ys-vip-hero::before, .ys-vip-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.ys-vip-hero::before { top: -80px; left: -80px; width: 200px; height: 200px; }
.ys-vip-hero::after { bottom: -100px; right: -80px; width: 250px; height: 250px; }
.ys-vip-hero-inner { position: relative; z-index: 2; }
.ys-vip-hero h1 { margin: 0 0 8px; font-size: 24px; font-weight: 700; }
.ys-vip-hero p { margin: 0; opacity: 0.92; font-size: 13px; }
@media (min-width: 768px) {
  .ys-vip-hero { padding: 80px 30px; border-radius: var(--radius-lg); margin-bottom: 30px; }
  .ys-vip-hero h1 { font-size: 40px; margin-bottom: 14px; letter-spacing: 1px; }
  .ys-vip-hero p { font-size: 16px; letter-spacing: 0.5px; }
}

.ys-vip-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.ys-feature {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
}
.ys-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-soft), #fff);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 10px;
}
.ys-feature h3 { margin: 0 0 4px; font-size: 14px; color: var(--text); font-weight: 600; }
.ys-feature p { margin: 0; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
@media (min-width: 768px) {
  .ys-vip-features { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 30px; }
  .ys-feature { padding: 32px 24px; }
  .ys-feature-icon { width: 60px; height: 60px; border-radius: 16px; font-size: 28px; margin-bottom: 16px; }
  .ys-feature h3 { font-size: 16px; margin-bottom: 8px; }
  .ys-feature p { font-size: 13px; line-height: 1.6; }
}

.ys-plan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.ys-plan {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.ys-plan.popular,
.ys-plan.current { border: 2px solid var(--primary); }
.ys-plan-head {
  background: linear-gradient(135deg, #f8fafc, #fff);
  padding: 20px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.ys-plan.popular .ys-plan-head,
.ys-plan.current .ys-plan-head {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}
.ys-plan-head h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.ys-plan-head .ys-price {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary);
}
.ys-plan.popular .ys-plan-head .ys-price,
.ys-plan.current .ys-plan-head .ys-price { color: #fff; }
/* 套餐名 h3: 修复 .ys-panel h3 { color: var(--text) } 的继承覆盖 */
.ys-plan.popular .ys-plan-head h3,
.ys-plan.current .ys-plan-head h3 { color: #fff; }
.ys-plan-head .ys-price small { font-size: 13px; opacity: 0.7; margin-left: 4px; font-weight: normal; }
.ys-plan-popular-tag {
  position: absolute;
  top: 12px;
  right: -30px;
  background: var(--orange);
  color: #fff;
  font-size: 10px;
  padding: 3px 36px;
  transform: rotate(35deg);
  font-weight: bold;
}
/* 用户已开通的当前套餐角标 (蓝色, 顶部圆角标签) — 跟 HOT 标视觉区分 */
.ys-plan-current-tag {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 0 0 8px 0;
  font-weight: 500;
  line-height: 1.4;
}
/* /vip 页面顶部 "您已是 VIP 会员" banner — 列出全部有效订阅 (用户可能同时开多个分类 VIP) */
.ys-current-vip .ys-vip-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}
.ys-current-vip .ys-vip-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
  padding: 6px 0;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
  font-size: 14px;
}
.ys-current-vip .ys-vip-list li:first-child { border-top: none; }
.ys-current-vip .ys-vip-list .ys-vip-name {
  font-weight: 600;
  color: var(--primary);
}
.ys-current-vip .ys-vip-list .ys-vip-exp {
  color: #6b7280;
  font-size: 13px;
}
}
.ys-plan-body { padding: 16px 20px; }
.ys-plan-body ul { list-style: none; padding: 0; margin: 0 0 12px; }
.ys-plan-body li {
  padding: 5px 0;
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.ys-plan-body li::before { content: '✓'; color: var(--green); font-weight: bold; flex-shrink: 0; }
.ys-plan-foot { padding: 0 16px 16px; }
@media (min-width: 768px) {
  .ys-plan-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
  .ys-plan-head { padding: 30px 24px; }
  .ys-plan-head h3 { font-size: 18px; margin-bottom: 12px; }
  .ys-plan-head .ys-price { font-size: 36px; }
  .ys-plan-body { padding: 24px; }
  .ys-plan-body li { padding: 8px 0; font-size: 14px; gap: 8px; }
  .ys-plan-body ul { margin-bottom: 16px; }
  .ys-plan-foot { padding: 0 24px 28px; }
}

.ys-current-vip {
  background: linear-gradient(135deg, #E8F5E9, #fff);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-bottom: 18px;
  text-align: center;
}
.ys-current-vip h3 { margin: 0 0 6px; color: var(--green); font-size: 15px; font-weight: 600; }
.ys-current-vip p { margin: 0; color: var(--text-muted); font-size: 13px; }
@media (min-width: 768px) {
  .ys-current-vip { padding: 24px; margin-bottom: 24px; }
  .ys-current-vip h3 { font-size: 17px; margin-bottom: 10px; }
  .ys-current-vip p { font-size: 14px; }
}

/* ============================================================
   和弦编辑器 - 移动端单列堆叠
   ============================================================ */
.ys-chord-layout { display: flex; gap: 16px; flex-wrap: wrap; flex-direction: column; }
.ys-chord-layout .ys-panel { flex: 1; min-width: 100%; }
.ys-chord-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.ys-chord-toolbar select { max-width: 100%; flex: 1; min-width: 120px; padding: 8px 12px; }
#chord-input {
  width: 100%;
  height: 240px;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  resize: vertical;
  background: #fafbfc;
  color: var(--text);
  line-height: 1.7;
  outline: none;
}
#chord-input:focus { border-color: var(--primary); background: #fff; }
#chord-preview {
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  min-height: 240px;
  font-family: Consolas, monospace;
  white-space: pre-wrap;
  line-height: 1.9;
  font-size: 14px;
  color: var(--text);
  overflow-x: auto;
}
.ys-chord-pro-view .chord-line { line-height: 2.1; }
.ys-chord-pro-view .chord-inline { color: var(--primary); font-weight: bold; display: inline-block; min-width: 30px; text-align: center; }
.ys-chord-pro-view .chord-meta { color: var(--text-light); font-size: 12px; margin: 6px 0; }
@media (min-width: 768px) {
  .ys-chord-layout { flex-direction: row; gap: 24px; }
  .ys-chord-layout .ys-panel { min-width: 320px; }
  .ys-chord-toolbar { gap: 12px; margin-bottom: 16px; padding-bottom: 16px; }
  .ys-chord-toolbar select { max-width: 180px; flex: none; }
  #chord-input { height: 400px; padding: 16px; }
  #chord-preview { padding: 20px; min-height: 400px; line-height: 2; }
}

/* ============================================================
   曲谱详情 - 移动端单列 + 底部 sticky 购买栏
   ============================================================ */
.ys-score-detail { display: flex; gap: 16px; flex-wrap: wrap; flex-direction: column; }
.ys-score-main { flex: 1; min-width: 100%; }
.ys-score-side { width: 100%; flex-shrink: 0; }
.ys-score-title { margin: 0 0 10px; font-size: 20px; color: var(--text); font-weight: 600; line-height: 1.3; }
.ys-score-title-main { color: var(--text); }
.ys-score-title-sep { color: var(--text-muted); margin: 0 2px; }
.ys-score-title-artist { color: var(--text-muted); font-weight: 500; }
.ys-score-meta {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}
.ys-score-meta span { display: flex; align-items: center; gap: 4px; }
.ys-score-preview { text-align: center; margin: 16px 0; }
.ys-score-preview img { max-width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.ys-score-desc { color: var(--text-muted); line-height: 1.8; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-light); font-size: 14px; }
.ys-price-box { text-align: center; padding: 20px 16px; }
.ys-price-box .ys-price-big { font-size: 32px; font-weight: bold; color: var(--red); }
.ys-price-box .ys-price-free { font-size: 24px; color: var(--green); font-weight: bold; }
.ys-action-box { display: flex; gap: 8px; margin-top: 12px; }
.ys-action-box .ys-btn { flex: 1; }
.ys-creator-mini { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ys-avatar-sm {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  flex-shrink: 0;
}

/* 移动端底部 sticky 购买栏 */
.ys-mobile-buy-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0));
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.06);
}
.ys-mobile-buy-bar .ys-mobile-price { flex: 1; font-size: 20px; font-weight: bold; color: var(--red); }
.ys-mobile-buy-bar .ys-mobile-price.free { color: var(--green); font-size: 16px; }
.ys-mobile-buy-bar .ys-btn { padding: 12px 20px; }
.ys-mobile-buy-bar .ys-btn-fav { background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: 12px 14px; }
.ys-mobile-buy-spacer { height: 70px; flex-shrink: 0; }
@media (min-width: 768px) {
  .ys-score-detail { flex-direction: row; gap: 24px; }
  .ys-score-main { min-width: 300px; }
  .ys-score-side { width: 320px; }
  .ys-score-title { font-size: 28px; margin-bottom: 14px; }
  .ys-score-meta { font-size: 13px; margin-bottom: 24px; padding-bottom: 20px; gap: 20px; }
  .ys-score-preview { margin: 24px 0; }
  .ys-score-desc { margin-top: 24px; padding-top: 24px; font-size: 14px; }
  .ys-price-box { padding: 32px 24px; }
  .ys-price-box .ys-price-big { font-size: 40px; }
  .ys-price-box .ys-price-free { font-size: 28px; }
  .ys-action-box { gap: 10px; margin-top: 16px; }
  .ys-mobile-buy-bar { display: none; }
  .ys-mobile-buy-spacer { display: none; }
}

/* ============================================================
   创作者页
   ============================================================ */
.ys-creator-profile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.ys-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: bold;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(30,159,255,0.25);
}
.ys-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ys-creator-info h2 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  flex-wrap: wrap;
}
.ys-creator-info p { margin: 0; color: var(--text-muted); font-size: 13px; }
.ys-stats-row {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  justify-content: center;
}
.ys-stat { text-align: center; }
.ys-stat .num { font-size: 18px; font-weight: bold; color: var(--primary); }
.ys-stat .label { color: var(--text-muted); font-size: 11px; margin-top: 2px; }
@media (min-width: 768px) {
  .ys-creator-profile { flex-direction: row; align-items: center; text-align: left; gap: 24px; }
  .ys-avatar-lg { width: 88px; height: 88px; font-size: 32px; }
  .ys-creator-info h2 { font-size: 22px; justify-content: flex-start; }
  .ys-creator-info p { font-size: 14px; }
  .ys-stats-row { gap: 40px; margin-top: 20px; padding-top: 20px; justify-content: flex-start; }
  .ys-stat .num { font-size: 22px; }
  .ys-stat .label { font-size: 12px; margin-top: 4px; }
}

/* ============================================================
   个人中心
   ============================================================ */
.ys-tab-bar {
  display: flex;
  background: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  border-bottom: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ys-tab-bar::-webkit-scrollbar { display: none; }
.ys-tab-bar span {
  padding: 14px 18px;
  color: var(--text-muted);
  font-size: 14px;
  position: relative;
  font-weight: 500;
  white-space: nowrap;
  min-height: var(--touch-target);
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.ys-tab-bar span.active { color: var(--primary); }
.ys-tab-bar span.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
}
.ys-tab-content {
  background: #fff;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.ys-tab-pane { display: none; }
.ys-tab-pane.active { display: block; }
@media (min-width: 768px) {
  .ys-tab-bar span { padding: 16px 28px; font-size: 15px; }
  .ys-tab-content { padding: 28px; min-height: 240px; }
}

/* ============================================================
   阅读器
   ============================================================ */
.ys-reader-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 52px;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  gap: 10px;
  flex-wrap: wrap;
}
.ys-reader-content {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px;
  background: #fff;
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
}
@media (min-width: 768px) {
  .ys-reader-bar { padding: 14px 30px; top: 64px; flex-wrap: nowrap; }
  .ys-reader-content { padding: 40px 30px; }
}

/* ============================================================
   全局工具类
   ============================================================ */
.ys-hide-mobile { display: none; }
@media (min-width: 768px) {
  .ys-hide-mobile { display: revert; }
  .ys-hide-desktop { display: none; }
}
.ys-text-center { text-align: center; }
.ys-mt-0 { margin-top: 0 !important; }
.ys-mb-0 { margin-bottom: 0 !important; }
.ys-empty-tip { color: var(--text-light); text-align: center; padding: 14px 0; font-size: 12px; margin: 0; }

/* ============================================================
   面包屑
   ============================================================ */
.ys-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  padding: 12px 0;
  margin-bottom: 8px;
}
.ys-breadcrumb a { color: var(--text-muted); }
.ys-breadcrumb a:hover { color: var(--primary); }
.ys-breadcrumb .ys-bc-sep { margin: 0 6px; color: var(--text-light); }

/* 详情页 ([data-page="score"]): 抵消 .ys-container 顶部 40/30/16px padding,
   让面包屑距顶 ≈ 12px (mobile) / 20px (desktop), 跟列页 ys-list-bread 对齐 */
[data-page="score"] .ys-breadcrumb { margin-top: -8px; padding-top: 0; }
@media (min-width: 768px)  { [data-page="score"] .ys-breadcrumb { margin-top: -22px; } }
@media (min-width: 1024px) { [data-page="score"] .ys-breadcrumb { margin-top: -28px; } }

/* ============================================================
   曲谱详情双栏布局
   ============================================================ */
.ys-score-layout { display: flex; flex-direction: column; gap: 16px; }
.ys-score-main { width: 100%; min-width: 0; }
.ys-score-sidebar { width: 100%; flex-shrink: 0; }
@media (min-width: 1024px) {
  .ys-score-layout { flex-direction: row; gap: 20px; align-items: flex-start; }
  .ys-score-main { flex: 1; min-width: 0; }
  .ys-score-main > .ys-panel { padding: 24px 24px 22px; margin-bottom: 16px; }
  .ys-score-main > .ys-panel h2 { font-size: 20px; margin-bottom: 14px; }
  .ys-score-main > .ys-panel h3 { font-size: 16px; margin-bottom: 12px; }
  .ys-score-sidebar { width: 360px; position: sticky; top: 80px; }
}

/* 曲谱图 + 浮层购买按钮 */
.ys-score-image {
  position: relative;
  margin: 4px 0 12px;
  background: transparent;
  border: none;
  min-height: 0;
  display: block;
}
.ys-score-image > img { display: none; } /* 老 img 样式冗余, 已迁到 .ys-score-image-stage */
.ys-buy-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  border: none;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  transition: all 0.2s;
}
.ys-buy-overlay svg { width: 32px; height: 32px; }
.ys-buy-overlay:active { transform: translate(-50%, -50%) scale(0.92); }
.ys-buy-overlay:hover { background: var(--primary); color: #fff; }
.ys-page-count {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
}
@media (min-width: 1024px) {
  .ys-score-image { margin: 24px 0; }
  .ys-buy-overlay { width: 80px; height: 80px; }
  .ys-buy-overlay svg { width: 40px; height: 40px; }
  .ys-page-count { font-size: 13px; padding: 5px 12px; bottom: 16px; right: 16px; }
}

/* 元信息行 */
.ys-arc-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}
.ys-arc-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 10px;
  background: var(--bg);
  border-radius: 14px;
}
.ys-arc-tag em { font-style: normal; color: var(--primary); font-weight: 500; }
.ys-arc-tag.ys-fav { cursor: pointer; }
.ys-arc-tag.ys-fav:hover { background: var(--primary-soft); color: var(--primary); }
.ys-arc-tag .ys-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}
.ys-heart, .ys-eye { font-size: 12px; }

/* 描述 */
.ys-score-desc {
  color: var(--text-muted);
  line-height: 1.9;
  margin-top: 16px;
  font-size: 14px;
}
.ys-score-desc p { margin: 0 0 8px; }

/* 价格 + 下载行动区 */
.ys-score-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px;
  background: linear-gradient(135deg, var(--primary-soft), #fff);
  border-radius: var(--radius);
  margin: 16px 0 0;
  border: 1px solid var(--primary-soft);
}
/* 按钮组: 垂直堆叠 (主操作"立即兑换"在上, 次操作"加入购物车"在下),
   比横向并排更舒展, 价格块横向空间更多 */
.ys-score-actions-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  align-items: stretch;
  min-width: 140px;
}
.ys-score-actions-buttons .ys-btn { width: 100%; min-width: 0; }
.ys-price-block { flex: 1; font-size: 20px; font-weight: bold; color: var(--red); min-width: 0; }
.ys-price-block .ys-mobile-price-main { font-size: 22px; }
.ys-score-actions .ys-btn { flex: 0 0 auto; min-width: 120px; }
.ys-score-actions .ys-btn:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; opacity: 0.7; }
@media (max-width: 767px) {
  .ys-score-actions { display: none; } /* 手机端用底部 sticky bar */
}

/* ===== 乐手币余额条 (曲谱页专用) ===== */
.ys-coin-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #f8f9fb;
  border: 1px solid var(--border-light);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  margin: 0 0 16px;
  font-size: 13px;
}
.ys-coin-bar + .ys-coin-bar { margin-top: 0; }
/* 当 coin-bar 紧跟在 actions 后, 上方圆角由 actions 兜住, 形成"上下连通"的一体卡片 */
.ys-score-actions:has(+ .ys-coin-bar) { border-radius: var(--radius) var(--radius) 0 0; }
.ys-coin-bar-icon { font-size: 16px; }
.ys-coin-bar-label { color: var(--text-muted); }
.ys-coin-bar-num {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ys-coin-bar-unit { color: var(--text-muted); font-size: 12px; }
.ys-coin-bar-hint { margin-left: auto; font-size: 12px; color: var(--text-muted); }

/* ===== 兑换确认弹层 ===== */
.ys-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: ysModalFade 0.15s ease;
}
@keyframes ysModalFade { from { opacity: 0 } to { opacity: 1 } }
.ys-modal-inner {
  background: #fff;
  border-radius: var(--radius, 12px);
  width: 100%;
  max-width: 380px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  animation: ysModalSlide 0.2s ease;
}
@keyframes ysModalSlide { from { transform: translateY(20px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
.ys-modal-title { margin: 0 0 8px; font-size: 18px; font-weight: 600; text-align: center; }
.ys-modal-desc { margin: 0 0 20px; text-align: center; color: var(--text-muted); font-size: 14px; line-height: 1.5; }
.ys-modal-coin { background: #f7f8fa; border-radius: 8px; padding: 14px 16px; margin-bottom: 20px; }
.ys-modal-coin-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; font-size: 14px; color: var(--text-muted);
}
.ys-modal-coin-row strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ys-modal-coin-row.total { border-top: 1px dashed var(--border); margin-top: 4px; padding-top: 10px; }
.ys-modal-coin-row.total strong { color: var(--primary); font-size: 16px; }
.ys-modal-actions { display: flex; gap: 10px; }
.ys-modal-actions .ys-btn { flex: 1; padding: 10px 16px; }
.ys-modal-actions .ys-btn:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; }

/* 评论区 */
.ys-comments-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ys-comments-count { font-size: 13px; color: var(--text-muted); font-weight: normal; }
.ys-comment-list { list-style: none; padding: 0; margin: 0; }
.ys-comment-list li { padding: 0; }

/* ============================================================
   右侧栏：创作者卡 + 排行榜 + 推荐
   ============================================================ */

/* 右侧栏 panel 通用间距 */
.ys-score-sidebar .ys-panel {
  margin-bottom: 12px;
  box-shadow: none;
  border: 1px solid var(--border-light);
  padding: 14px 16px;
}
.ys-score-sidebar .ys-panel:last-child { margin-bottom: 0; }
.ys-score-sidebar .ys-panel h3 { margin: 0 0 10px; font-size: 14px; }

/* 创作者卡 */
.ys-side-creator { padding: 16px; }
.ys-side-creator-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 12px;
}
.ys-side-creator-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  object-fit: cover;
  flex-shrink: 0;
}
.ys-side-creator-info { flex: 1; min-width: 0; }
.ys-side-creator-name {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ys-side-creator-stats { display: flex; gap: 14px; }
.ys-side-creator-stats div { display: flex; flex-direction: column; }
.ys-side-creator-stats strong { font-size: 15px; color: var(--primary); font-weight: bold; }
.ys-side-creator-stats span { font-size: 11px; color: var(--text-muted); }

/* 排行榜 tabs */
.ys-rank-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.ys-rank-tabs a {
  padding: 6px 16px;
  border-radius: 16px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
}
.ys-rank-tabs a.active, .ys-rank-tabs a:hover { background: var(--primary); color: #fff; }

/* 推荐列表 (详情页右侧栏 - 无缩略图紧凑排版) */
.ys-recommend-list { list-style: none; padding: 0; margin: 0; }
.ys-recommend-item {
  position: relative;
  padding: 10px 72px 10px 0;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}
.ys-recommend-item:hover { background: rgba(30, 159, 255, 0.05); }
.ys-recommend-item:last-child { border-bottom: none; }
.ys-recommend-info { width: 100%; }
.ys-recommend-tit {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: nowrap;
}
.ys-recommend-title {
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.ys-recommend-title:hover { color: var(--primary); }
.ys-recommend-artist {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ys-recommend-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ys-recommend-meta .ys-tag { font-size: 10px; padding: 1px 6px; }
.ys-recommend-by { font-size: 11px; color: var(--text-light); }
.ys-recommend-actions {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  gap: 6px;
}
.ys-recommend-actions span {
  font-size: 13px;
  color: var(--text-light);
  cursor: pointer;
  transition: color 0.15s;
  padding: 2px;
  line-height: 1;
}
.ys-recommend-actions span:hover { color: var(--primary); }
/* 推荐列表收藏图标 - 已收藏态: 红心 + 主色高亮 */
.ys-recommend-actions span.ys-recommend-fav.faved { color: #ff4d4f; }
.ys-recommend-actions span.ys-recommend-fav.faved:hover { color: #ff7875; }

/* ============================================================
   手机端底部 APP 风格 Tab Bar
   ============================================================ */
.ys-app-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 998;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.04);
}
.ys-app-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px 6px;
  color: var(--text-muted);
  text-decoration: none;
  min-height: 56px;
  position: relative;
  transition: color 0.15s;
}
.ys-app-tab-icon { display: flex; align-items: center; justify-content: center; }
.ys-app-tab-icon svg { width: 22px; height: 22px; display: block; }
.ys-app-tab-label { font-size: 11px; line-height: 1; }
/* tab 右上角小角标 (购物车用, topnav.js YSCart.updateBadge 写 textContent + 切 display) */
.ys-app-tab-badge {
  position: absolute;
  top: 4px;
  right: 50%;
  transform: translateX(16px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ff4d4f;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  box-sizing: border-box;
  pointer-events: none;
  display: none;
}

.ys-app-tab.active { color: var(--primary); }
.ys-app-tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 3px 3px;
}
.ys-app-tabbar-spacer { height: 64px; flex-shrink: 0; }
/* 桌面端隐藏整个 tab bar 和 spacer */
@media (min-width: 768px) {
  .ys-app-tabbar, .ys-app-tabbar-spacer { display: none; }
}

/* ============================================================
   行式曲谱列表 (对齐吉他世界 / guitarworld.com.cn/pu 风格)
   ============================================================ */
.ys-list-section {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-top: 20px;
}
.ys-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(to right, #fafbfc, #fff);
}
.ys-list-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ys-list-icon {
  color: var(--primary);
  font-size: 18px;
}
.ys-list-count {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: normal;
  margin-left: 4px;
}
.ys-list-more {
  color: var(--primary);
  font-size: 13px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 2px;
}
.ys-list-arrow { font-size: 14px; line-height: 1; }

.ys-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ys-list-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}
.ys-list-item:last-child { border-bottom: none; }
.ys-list-item-alt { background: #fafbfc; }
.ys-list-item:hover { background: var(--primary-soft); }
.ys-list-info { min-width: 0; }
.ys-list-tit {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ys-list-tit a { color: var(--text); }
.ys-list-tit a:hover { color: var(--primary); }
.ys-list-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}
.ys-list-by { font-size: 12px; }
.ys-list-act {
  display: flex;
  gap: 6px;
  padding: 4px 0;
}
.ys-list-icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.ys-list-icon-btn:hover { color: var(--primary); border-color: var(--primary); }
.ys-list-stat { display: none; }
.ys-list-price, .ys-list-time { display: none; }
.ys-list-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
}

/* 进度条 */
.ys-bar {
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  flex: 1;
  min-width: 60px;
}
.ys-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.3s;
}
.ys-bar-fill.ys-bar-sim { background: linear-gradient(90deg, #10b981, #4CAF50); }
.ys-bar-fill.ys-bar-diff { background: linear-gradient(90deg, var(--orange), #F57C00); }

/* 桌面端显示完整列 */
@media (min-width: 1024px) {
  .ys-list-header { padding: 18px 24px; }
  .ys-list-title { font-size: 18px; }
  .ys-list-item {
    grid-template-columns: minmax(280px, 2fr) auto 1fr 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 16px 24px;
  }
  .ys-list-tit { font-size: 15px; }
  .ys-list-act { padding: 0; }
  .ys-list-stat { display: flex; align-items: center; gap: 8px; min-width: 140px; }
  .ys-list-stat-num { font-size: 12px; color: var(--text-muted); white-space: nowrap; min-width: 50px; }
  .ys-list-price {
    display: block;
    text-align: center;
    color: var(--red);
    font-weight: bold;
    font-size: 15px;
    min-width: 60px;
  }
  .ys-list-price.free { color: var(--green); font-weight: normal; font-size: 13px; }
  .ys-list-time {
    display: block;
    color: var(--text-light);
    font-size: 12px;
    min-width: 80px;
    text-align: right;
  }
}

/* ============================================================
   底部弹层 Sheet (Tab Bar 子菜单)
   ============================================================ */
.ys-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: flex-end;
  animation: ys-fade-in 0.2s ease-out;
}
@keyframes ys-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ys-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

.ys-sheet {
  background: #fff;
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: ys-slide-up 0.25s ease-out;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.ys-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.ys-sheet-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
.ys-sheet-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  user-select: none;
  border-radius: 50%;
  transition: background 0.15s;
}
.ys-sheet-close:hover, .ys-sheet-close:active { background: var(--bg); color: var(--text); }
.ys-sheet-body {
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 曲谱分类网格 */
.ys-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.ys-cat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 8px;
  background: var(--bg);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.15s;
}
.ys-cat-tile:active { background: var(--primary-soft); transform: scale(0.97); }
.ys-cat-tile-icon {
  font-size: 28px;
  line-height: 1;
}
.ys-cat-tile-all .ys-cat-tile-icon { font-size: 18px; }
.ys-cat-tile-name {
  font-size: 13px;
  font-weight: 500;
}
.ys-cat-tile.ys-cat-all .ys-cat-tile-name { font-size: 15px; }
.ys-cat-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
  padding: 30px 0;
  margin: 0;
}
@media (min-width: 480px) {
  .ys-cat-grid { grid-template-columns: repeat(4, 1fr); }
}

/* 工具列表 */
.ys-tools-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px 20px;
}
.ys-tool-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.15s;
}
.ys-tool-tile:active { background: var(--primary-soft); transform: scale(0.99); }
.ys-tool-tile:first-child {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  margin-bottom: 6px;
  justify-content: center;
  font-weight: 500;
}
.ys-tool-tile:first-child .ys-tool-icon { background: rgba(255,255,255,0.2); color: #fff; }
.ys-tool-tile:first-child .ys-tool-info { display: none; }
.ys-tool-tile:first-child .ys-tool-arrow { display: none; }
.ys-tool-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-soft), #fff);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.ys-tool-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ys-tool-name { font-size: 15px; font-weight: 500; }
.ys-tool-desc { font-size: 12px; color: var(--text-light); }
.ys-tool-arrow { color: var(--text-light); font-size: 22px; }

/* ============================================================
   曲谱详情页增强 (v20260620b)
   - 多图轮播 + 缩略图条
   - 难度星级 / 原版指数进度条
   - 价格区三态(免费/已购/付费)
   - 付费未购锁屏遮罩 (OSS 2/3 预览配套)
   ============================================================ */

/* --- 难度星级 --- */
.ys-difficulty { display: inline-flex; gap: 2px; align-items: center; }
.ys-difficulty .ys-star {
  width: 14px; height: 14px;
  display: inline-block;
  background: var(--border);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.27 5.82 22 7 14.14 2 9.27l6.91-1.01z'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.27 5.82 22 7 14.14 2 9.27l6.91-1.01z'/></svg>") center/contain no-repeat;
  transition: background 0.2s;
}
.ys-difficulty .ys-star.on { background: linear-gradient(135deg, #FFB300, #FF8A00); }
.ys-difficulty .ys-star.half {
  background: linear-gradient(90deg, #FFB300 50%, var(--border) 50%);
}

/* --- meta 横向条 (难度 / 原版) --- */
.ys-meta-strip {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 14px;
  margin: 0 0 14px;
  background: #f8f9fb;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.ys-meta-item { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.ys-meta-item.ys-meta-similarity { font-size: 14px; }
.ys-meta-item.ys-meta-similarity .ys-meta-value { color: var(--primary); font-size: 15px; }
.ys-meta-label { font-size: 13px; color: var(--text-muted); }
.ys-meta-value { font-size: 13px; font-weight: 600; color: var(--text); }

/* --- 多图轮播 --- */
/* 曲谱图片容器宽度自适应: stage 跟着图片实际宽度走, 不再固定 100%
   - 大图 (origW > 父容器宽): stage = 父容器宽, 图片缩放占满
   - 小图 (origW < 父容器宽): stage = 图片实际宽, 居中显示, 卡片两边不空
   - 父容器 .ys-score-image 用 text-align: center 配合 inline-flex 居中
   - 注意: 浮层按钮 (buy-overlay / score-lock) 和 page-count 现在都在 stage 内部,
     跟着图片走, 不会"漂"在父容器空白区
*/
.ys-score-image { position: relative; text-align: center; }
.ys-score-image-stage {
  position: relative;
  display: inline-flex;       /* 从 flex 改为 inline-flex, 让 width 跟内容走 */
  max-width: 100%;            /* 替代 width: 100%, 大图时不超过父容器 */
  vertical-align: top;        /* inline-flex 默认 baseline 对齐会留空白, 改 top */
  background: #f8f9fb;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 200px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
}
.ys-score-image-stage img {
  display: block;
  max-width: 100%;
  height: auto;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}
.ys-score-image-stage img.zoomed { cursor: zoom-out; }

/* 缩略图条 */
.ys-score-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding: 4px 0 6px;
  scrollbar-width: thin;
  position: relative;
  z-index: 4; /* 高于 .ys-score-lock (z-index 3) */
}
.ys-score-thumbs::-webkit-scrollbar { height: 4px; }
.ys-score-thumbs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.ys-score-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  background: #f8f9fb;
  padding: 0;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}
.ys-score-thumb:hover { transform: translateY(-1px); }
.ys-score-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ys-score-thumb.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.ys-score-thumb .ys-thumb-badge {
  position: absolute;
  top: 2px; right: 2px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 8px;
  font-weight: 600;
}

/* 单图时缩略图条隐藏 */
.ys-score-thumbs.empty { display: none; }

/* --- 付费未购锁屏遮罩 --- */
.ys-score-lock {
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  z-index: 3;
  background: linear-gradient(to top,
    rgba(0,0,0,0.72) 0%,
    rgba(0,0,0,0.45) 60%,
    rgba(0,0,0,0.0) 100%);
  color: #fff;
  padding: 28px 20px 20px;
  border-radius: 0 0 var(--radius) var(--radius);
  pointer-events: none; /* 容器不挡事件 */
}
.ys-score-lock-inner {
  pointer-events: auto;
  max-width: 360px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.ys-score-lock-icon svg {
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.18);
  padding: 5px;
  border-radius: 50%;
  color: #fff;
  display: block;
  margin: 0 auto;
}
.ys-score-lock-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}
.ys-score-lock-desc {
  margin: 0 0 4px;
  font-size: 13px;
  color: #fff;
  line-height: 1.6;
}
.ys-score-lock-desc em {
  color: #FFD54F;
  font-style: normal;
  font-weight: 600;
  margin: 0 2px;
}
.ys-score-lock .ys-btn { min-width: 140px; padding: 8px 20px; }

/* --- 价格区三态 (free / purchased / paid) --- */
.ys-price-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 16px;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  background: #f8f9fb;
  border: 1px solid var(--border-light);
  min-width: 0;
}
.ys-price-block[data-state="free"] {
  background: #f6ffed;
  color: #389e0d;
  border-color: #b7eb8f;
}
.ys-price-block[data-state="purchased"] {
  background: #f5f5f5;
  color: #595959;
  border-color: #d9d9d9;
}
.ys-price-block[data-state="paid"] {
  background: #fff7e6;
  color: #d97706;
  border-color: #ffd591;
}
.ys-price-main {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: inherit;
}
.ys-price-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.ys-price-block[data-state="paid"] .ys-price-main { font-size: 26px; }
.ys-price-block .ys-mobile-price-main { color: inherit; font-size: inherit; }

/* 兼容旧版 ys-price-block 的数字颜色 (JS 会改 innerHTML 时) */
.ys-price-block span[style*="line-through"] {
  color: var(--text-muted) !important;
  text-decoration-color: var(--text-muted) !important;
}

/* --- 标签条 --- */
.ys-score-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-light);
}
.ys-score-tag {
  font-size: 12px;
  padding: 4px 10px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 999px;
  font-weight: 500;
}
.ys-score-tag::before { content: "#"; opacity: 0.55; margin-right: 1px; }

/* --- arc-info 里的收藏 / 分享 / 打印 按钮状态 --- */
.ys-arc-tag { cursor: default; user-select: none; }
.ys-arc-tag[role="button"] { cursor: pointer; transition: color 0.2s, background 0.2s; }
.ys-arc-tag[role="button"]:hover { color: var(--primary); }
.ys-arc-tag.is-active { color: var(--red) !important; }
.ys-arc-tag.is-active .ys-heart { color: var(--red); }
.ys-arc-tag .ys-heart { color: var(--text-muted); font-size: 14px; line-height: 1; display: inline-block; }
.ys-arc-tag .ys-heart.on { color: var(--red); }

/* --- 移动端适配 --- */
@media (max-width: 767px) {
  .ys-meta-strip { gap: 12px; padding: 10px 12px; }
  .ys-meta-item.ys-meta-similarity { flex: 1 1 100%; order: 3; }
  .ys-score-image-stage { min-height: 160px; }
  .ys-score-image-stage img { max-height: none; }
  .ys-score-thumb { width: 52px; height: 52px; }
  .ys-score-lock { padding: 24px 16px 20px; }
  .ys-score-lock-title { font-size: 16px; }
  .ys-price-block[data-state="paid"] .ys-price-main { font-size: 22px; }
  .ys-price-block .ys-price-main { font-size: 18px; }
}

/* --- Lightbox 灯箱 (点击主图放大) --- */
.ys-lightbox {
  position: fixed; inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
  animation: ys-lb-fade 0.2s ease;
}
.ys-lightbox.show { display: flex; }
@keyframes ys-lb-fade { from { opacity: 0; } to { opacity: 1; } }
.ys-lightbox img {
  max-width: 96vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.ys-lightbox-close {
  position: absolute;
  top: 16px; right: 20px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.ys-lightbox-close:hover { background: rgba(255,255,255,0.3); }
.ys-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.ys-lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.ys-lightbox-prev { left: 16px; }
.ys-lightbox-next { right: 16px; }
.ys-lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  background: rgba(0,0,0,0.5);
  padding: 6px 14px;
  border-radius: 999px;
}
.ys-lightbox-nav[disabled] { opacity: 0.3; cursor: not-allowed; }

/* --- 分享弹层 --- */
.ys-share-row { display: flex; gap: 8px; margin: 12px 0; }
.ys-share-input {
  flex: 1;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 12px;
  font-size: 13px;
  background: #f8f9fb;
  color: var(--text-muted);
  min-width: 0;
}
.ys-share-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.ys-share-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  color: var(--text);
  font-size: 12px;
}
.ys-share-item:hover { background: var(--primary-soft); }
.ys-share-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}

@media (max-width: 767px) {
  .ys-share-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .ys-share-icon { width: 36px; height: 36px; font-size: 14px; }
  .ys-lightbox-nav { width: 36px; height: 36px; }
  .ys-lightbox-prev { left: 8px; }
  .ys-lightbox-next { right: 8px; }
}

/* ================================================================
   曲谱详情页 P0 改造 (2026-06-21)
   - 顶部扁平化元信息条
   - 视频/音频演示播放器
   - 缩略图条紧凑化
   - 购买按钮换购物车图标
   ================================================================ */

/* ---- 扁平化元信息条 ---- */
.ys-arc-info-flat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  margin: 6px 0 12px;
  border-bottom: 1px dashed var(--border-light);
  color: var(--text-secondary);
  font-size: 13px;
  flex-wrap: wrap;
}
.ys-arc-info-stats {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 12px;
}
.ys-arc-info-stats span { display: inline-flex; align-items: center; gap: 3px; }
.ys-arc-info-stats em { font-style: normal; color: var(--text); font-weight: 500; }
.ys-arc-info-item { display: inline-flex; align-items: center; gap: 4px; }
.ys-arc-info-spacer { flex: 1; }
.ys-arc-info-item em { font-style: normal; color: var(--text); font-weight: 500; }
.ys-arc-info-item i { font-size: 13px; opacity: .8; }
.ys-arc-info-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13px;
  transition: all .15s;
  user-select: none;
}
.ys-arc-info-action:hover { background: var(--primary-soft); color: var(--primary); }
.ys-arc-info-action i { font-style: normal; font-size: 14px; }
#btn-fav.is-faved { color: #ff6b81; background: rgba(255,107,129,.1); }
#btn-fav.is-faved i { color: #ff6b81; }

/* ---- 视频/音频演示区 ---- */
.ys-media-stage {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin: 16px 0;
  overflow: hidden;
}
.ys-media-stage-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(to right, #f0f8ff, #fafcff);
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}
.ys-media-stage-head .ys-i-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
}
.ys-video-wrap {
  position: relative;
  width: 100%;
  background: #000;
  aspect-ratio: 16 / 9;
  max-height: 480px;
}
.ys-video-wrap video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.ys-audio-wrap {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(135deg, #f8fbff 0%, #fff 100%);
}
.ys-audio-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
}
.ys-audio-info .ys-i-music {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 50%;
  font-size: 14px;
}
.ys-audio-wrap audio { width: 100%; }

/* ---- 缩略图条紧凑化 (对齐参考站 318qupu) ---- */
.ys-score-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 8px;
  margin-top: 0;
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  overflow-x: auto;
  scrollbar-width: thin;
}
.ys-score-thumbs::-webkit-scrollbar { height: 4px; }
.ys-score-thumbs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.ys-score-thumb {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: #f5f5f5;
  position: relative;
  transition: all .15s;
}
.ys-score-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ys-score-thumb:hover { border-color: var(--primary-soft); }
.ys-score-thumb.active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.ys-thumb-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 8px;
  font-weight: 500;
  pointer-events: none;
}
.ys-score-thumbs.empty { display: none; }

/* ---- 购买按钮换购物车图标 ---- */
.ys-buy-overlay {
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  color: var(--primary);
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.ys-buy-overlay svg { width: 20px; height: 20px; }
.ys-buy-overlay:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.ys-buy-overlay:hover svg { stroke: #fff; }

/* ---- 响应式 ---- */
@media (max-width: 767px) {
  .ys-arc-info-flat { gap: 8px; font-size: 12px; }
  .ys-arc-info-spacer { display: none; }   /* 移动端去掉 spacer, 让时间 + 三个按钮挤在一行, 避免「打印」被换行 */
  .ys-arc-info-action { padding: 4px 6px; font-size: 12px; }
  .ys-video-wrap { aspect-ratio: 4 / 3; }
  .ys-score-thumb { width: 48px; height: 48px; }
}
/* ============================================================
   曲谱详情页 v2 — 参考 d.ys613.cn 风格
   居中标题 + 居中元信息条 + 价格行动条横排
   ============================================================ */

/* 居中标题区 */
.ys-score-header {
  text-align: center;
  padding: 24px 0 8px;
}
.ys-score-title {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.ys-score-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* 居中元信息条 */
.ys-arc-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 14px 0 8px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text);
  flex-wrap: wrap;
}
.ys-arc-info-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.ys-arc-info-item .ys-star {
  font-size: 14px;
  color: #d9d9d9;
}
.ys-arc-info-item .ys-star.on {
  color: #faad14;
}
.ys-arc-info-text { font-weight: 600; font-style: normal; }
.ys-arc-info-count { color: var(--text-muted); font-style: normal; font-weight: normal; margin-left: 2px; }
.ys-arc-info-icon { color: #999; font-size: 14px; transition: color .15s; }
.ys-arc-info-fav { cursor: pointer; user-select: none; }
.ys-arc-info-fav.is-faved { color: #ff4d4f; }
.ys-arc-info-fav.is-faved .ys-arc-info-icon { color: #ff4d4f; }
.ys-arc-info-fav:hover .ys-arc-info-icon { color: #ff4d4f; }
.ys-arc-info-action {
  cursor: pointer;
  user-select: none;
  color: var(--text-muted);
  transition: color .15s;
}
.ys-arc-info-action:hover { color: var(--primary); }
.ys-arc-info-sep {
  width: 1px;
  height: 14px;
  background: var(--border);
  display: inline-block;
}

/* 曲谱图容器 */
.ys-score-image {
  position: relative;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  margin: 0 0 16px;
}
.ys-score-image-stage {
  position: relative;
  background: #f5f5f5;
  text-align: center;
  min-height: 200px;
}
.ys-score-image-stage img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  cursor: zoom-in;
}
.ys-page-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  pointer-events: none;
}

/* 价格行动条 (横排, 参考 d 站) */
.ys-score-pricebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: #fff7f0;
  border: 1px solid #ffd6b3;
  border-radius: 8px;
  margin: 0 0 16px;
}
.ys-score-pricebar[data-state="free"] {
  background: #f6ffed;
  border-color: #b7eb8f;
}
.ys-score-pricebar[data-state="purchased"] {
  background: #f0f8ff;
  border-color: #91caff;
}
.ys-score-pricebar-info {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.ys-score-pricebar-coin {
  color: var(--red, #ff4d4f);
  font-size: 18px;
  font-weight: 600;
}
.ys-score-pricebar-main {
  color: var(--red, #ff4d4f);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ys-score-pricebar[data-state="free"] .ys-score-pricebar-coin,
.ys-score-pricebar[data-state="free"] .ys-score-pricebar-main { color: #52c41a; }
.ys-score-pricebar[data-state="purchased"] .ys-score-pricebar-coin,
.ys-score-pricebar[data-state="purchased"] .ys-score-pricebar-main { color: var(--primary); }
.ys-score-pricebar-sub {
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ys-score-pricebar-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* 加入购物车按钮 */
.ys-btn-cart {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 0 18px;
  height: 40px;
  border-radius: 6px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.ys-btn-cart:hover {
  background: var(--primary-soft);
}
.ys-btn-cart-mobile {
  background: #fff;
  color: var(--text-muted);
  border: 1px solid var(--border);
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
}
.ys-btn-cart-mobile:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.ys-btn-primary {
  background: linear-gradient(135deg, #ff7a45 0%, #ff4d4f 100%);
  color: #fff;
  border: none;
  padding: 0 24px;
  height: 40px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.ys-btn-primary:hover { opacity: .92; box-shadow: 0 4px 12px rgba(255,77,79,.3); }
.ys-btn-primary:disabled { background: #d9d9d9; cursor: not-allowed; box-shadow: none; }

/* 乐手币余额条 (新颜色, 与价格条风格统一) */
.ys-coin-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #fff7f0;
  border: 1px solid #ffd6b3;
  border-radius: 8px;
  margin: 0 0 16px;
  font-size: 13px;
}
.ys-coin-bar-icon { font-size: 16px; }
.ys-coin-bar-label { color: var(--text-muted); }
.ys-coin-bar-num { color: #ff7a45; font-weight: 600; font-size: 15px; }
.ys-coin-bar-unit { color: var(--text-muted); font-size: 12px; }
.ys-coin-bar-hint { margin-left: auto; font-size: 12px; }

/* 视频/音频演示区 (移到曲谱图下, 参考 d 站) */
.ys-media-stage {
  margin: 0 0 16px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
}
.ys-media-stage-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--primary-soft);
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  border-bottom: 1px solid var(--border-light);
}
.ys-i-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
}
.ys-video-wrap {
  position: relative;
  width: 100%;
  background: #000;
  aspect-ratio: 16 / 9;
}
.ys-video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.ys-audio-wrap {
  padding: 12px 16px;
}
.ys-audio-wrap audio { width: 100%; }

/* 描述 / 标签 */
.ys-score-desc {
  padding: 16px 0 0;
  margin-top: 8px;
  border-top: 1px solid var(--border-light);
  color: var(--text);
  font-size: 14px;
  line-height: 1.8;
}
.ys-score-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 0;
  margin-top: 12px;
  border-top: 1px dashed var(--border-light);
}
.ys-score-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 12px;
  font-size: 12px;
}

/* 创作者卡 (水平, 参考 d 站) */
.ys-side-creator-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px !important;
}
.ys-side-creator-row .ys-side-creator-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
}
.ys-side-creator-row .ys-side-creator-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.ys-side-creator-row .ys-side-creator-info { flex: 0 0 auto; }
.ys-side-creator-row .ys-side-creator-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.ys-side-creator-row .ys-side-creator-stats {
  display: flex;
  gap: 24px;
  margin-left: auto;
  margin-right: 16px;
}
.ys-side-creator-row .ys-side-creator-stats div {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ys-side-creator-row .ys-side-creator-stats strong {
  font-size: 18px;
  color: var(--primary);
  font-weight: 700;
}
.ys-side-creator-row .ys-side-creator-stats span {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.ys-side-creator-row #btn-follow {
  flex: 0 0 auto;
  padding: 6px 18px;
  height: 32px;
  font-size: 13px;
}
.ys-side-creator-row #btn-follow.is-active {
  background: #f0f0f0;
  color: var(--text-muted);
}

/* 评论区 (气泡样式, 参考 d 站) */
.ys-comment-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ys-comment-list .ys-empty-tip {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 20px 0;
  margin: 0;
}
.ys-comment-placeholder {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px dashed var(--border-light);
}

/* ---- 响应式 ---- */
@media (max-width: 767px) {
  .ys-score-title { font-size: 20px; }
  .ys-arc-info { gap: 12px; font-size: 13px; padding: 10px 0 4px; }
  .ys-score-pricebar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 16px;
  }
  .ys-score-pricebar-info { justify-content: center; }
  .ys-score-pricebar-actions { justify-content: center; }
  .ys-score-pricebar-actions .ys-btn-cart { flex: 1; justify-content: center; }
  .ys-score-pricebar-actions .ys-btn-primary { flex: 2; }
  .ys-side-creator-row { flex-wrap: wrap; gap: 12px; }
  .ys-side-creator-row .ys-side-creator-stats { margin-left: 0; }
}

/* ============================================================
   曲谱图加载状态
   - 默认 is-loading: 显示 spinner + "曲谱加载中..."
   - JS 拿到图后移除 is-loading 类, loading 文字自动消失
   - 图加载失败: img 加 .ys-img-failed 类, 父级显示「图片加载失败」
   - is-loading 期间强制 stage 占父容器宽 + 加大占位 (2026-06-25)
     原 stage 用 inline-flex 自适应图片宽度, 没图时宽度 ~150px
     spinner / 浮层按钮挤在小窄块里很难看, 强制 100% 让 spinner 居中明显
   ============================================================ */
.ys-score-loading {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}
.ys-score-image-stage.is-loading {
  display: flex;             /* 覆盖默认 inline-flex, 让 stage 占父容器宽 */
  width: 100%;               /* 同上, 临时全宽 */
  min-height: 360px;         /* 加大占位, spinner 居中更明显 */
  padding: 80px 20px;        /* padding 加大, 配合 spinner + 文字居中 */
}
.ys-score-image-stage.is-loading .ys-score-loading {
  display: flex;
}
.ys-score-loading p { margin: 0; }
.ys-spinner {
  width: 48px;               /* 32 → 48, 视觉更明显 */
  height: 48px;
  border: 4px solid var(--border-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: ys-spin 0.9s linear infinite;
  box-shadow: 0 0 0 6px rgba(30, 159, 255, 0.06);  /* 主色光晕, 让转圈更立体 */
}
@keyframes ys-spin { to { transform: rotate(360deg); } }

/* 图片加载失败态 (onerror 触发) */
.ys-score-image-stage img.ys-img-failed {
  display: none;
}
.ys-score-image-stage.is-failed::before {
  content: "图片加载失败";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ============================================================
   顶部购物车按钮 + 角标 (header.html .ys-topbar-cart)
   ============================================================ */
.ys-topbar-cart {
  position: relative;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text);
  margin-right: 8px;
  transition: background .15s, color .15s;
}
.ys-topbar-cart svg { width: 21px; height: 21px; }
.ys-topbar-cart:hover {
  background: var(--primary-soft);
  color: var(--primary);
}
.ys-cart-badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ff4d4f;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px #fff;
  pointer-events: none;
}
.ys-cart-badge[data-cart-count] { display: none; }
.ys-cart-badge[data-cart-count]:not(:empty) { display: inline-block; }

/* ============================================================
   顶部搜索图标 (mobile-only; PC 由 .ys-search-box 覆盖)
   ============================================================ */
.ys-topbar-search {
  display: none; /* 默认 PC 隐藏 */
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: auto; /* 推到 logo 右边,独立占据右上角 */
  border: 0;
  background: transparent;
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  transition: background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.ys-topbar-search:hover,
.ys-topbar-search:active {
  background: var(--primary-soft);
  color: var(--primary);
}
@media (max-width: 767px) {
  .ys-topbar-search { display: inline-flex; }
}

/* ============================================================
   移动端搜索弹层 (顶部类型+输入+提交 / 下方热搜词)
   ============================================================ */
/* 单独的 wrapper: 走 show/hide 切换, 不影响 tabbar.js 的 .ys-sheet-backdrop
   (tabbar 是 append+remove, 不靠 class; search 是 DOM 复用靠 .show) */
.ys-m-search-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: flex-end;
  animation: ys-fade-in 0.2s ease-out;
}
.ys-m-search-backdrop.show { display: flex; }
@media (min-width: 768px) {
  .ys-m-search-backdrop { display: none !important; }
}

.ys-m-search-sheet .ys-sheet-body { padding: 16px 16px 24px; }

.ys-m-search-bar {
  display: flex;
  align-items: stretch;
  height: 44px;
  border: 2px solid var(--primary);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
  margin-bottom: 16px;
}
.ys-m-search-type {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px 0 14px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.ys-m-search-type svg { color: var(--text-muted); transition: transform .2s; }
.ys-m-search-type.open svg { transform: rotate(180deg); color: var(--primary); }
.ys-m-search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 12px;
  font-size: 15px;
  color: var(--text);
  background: transparent;
  font-family: inherit;
}
.ys-m-search-input::placeholder { color: var(--text-light); }
.ys-m-search-submit {
  flex-shrink: 0;
  padding: 0 18px;
  background: var(--primary);
  color: #fff;
  border: 0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.ys-m-search-submit:active { background: var(--primary-dark); }

.ys-m-search-type-menu {
  list-style: none;
  margin: -8px 0 14px;
  padding: 6px 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  max-height: 240px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.ys-m-search-type-menu[hidden] { display: none; }
.ys-m-search-type-menu li a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
.ys-m-search-type-menu li a:active { background: var(--primary-soft); color: var(--primary); }
.ys-m-search-type-menu li a.active { color: var(--primary); font-weight: 500; }

.ys-m-search-hot-label {
  font-size: 13px;
  color: var(--text-muted);
  margin: 6px 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ys-m-search-hot-label::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--primary);
}
.ys-m-search-hot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ys-m-search-hot-list a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.ys-m-search-hot-list a:active {
  background: var(--primary);
  color: #fff;
}

/* ============================================================
   Toast 轻提示 (无依赖)
   ============================================================ */
.ys-toast-box {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.ys-toast {
  padding: 10px 18px;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity .18s, transform .18s;
  max-width: 80vw;
  text-align: center;
  word-break: break-all;
}
.ys-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.ys-toast.ok    { background: rgba(82, 196, 26, 0.92); }
.ys-toast.err   { background: rgba(245, 34, 45, 0.92); }
.ys-toast.warn  { background: rgba(250, 173, 20, 0.92); color: #5a3700; }
.ys-toast.info  { background: rgba(30, 159, 255, 0.92); }

/* ============================================================
   购物车侧滑抽屉
   ============================================================ */
.ys-cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}
.ys-cart-drawer.show { pointer-events: auto; }
.ys-cart-drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity .2s;
}
.ys-cart-drawer.show .ys-cart-drawer-mask { opacity: 1; }
.ys-cart-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 92vw;
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
}
.ys-cart-drawer.show .ys-cart-drawer-panel { transform: translateX(0); }
.ys-cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.ys-cart-drawer-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}
.ys-cart-drawer-head h3 span {
  font-size: 13px;
  font-weight: normal;
  color: var(--text-muted);
  margin-left: 4px;
}
.ys-cart-drawer-close {
  background: transparent;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
}
.ys-cart-drawer-close:hover { color: var(--text); }
.ys-cart-drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.ys-cart-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.8;
}
.ys-cart-empty span { font-size: 12px; opacity: 0.7; }
.ys-cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}
.ys-cart-item:last-child { border-bottom: none; }
.ys-cart-item-cover {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--primary-soft);
  display: block;
}
.ys-cart-item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ys-cart-item-info {
  flex: 1;
  min-width: 0;
}
.ys-cart-item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}
.ys-cart-item-title:hover { color: var(--primary); }
.ys-cart-item-artist {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.ys-cart-item-price {
  font-size: 12px;
  color: var(--text-muted);
}
.ys-cart-item-price strong {
  color: var(--red);
  font-weight: 600;
  font-size: 14px;
}
.ys-cart-item-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.ys-cart-item-remove:hover { color: var(--red); }
.ys-cart-drawer-foot {
  flex-shrink: 0;
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fafbfc;
}
.ys-cart-drawer-total {
  flex: 1;
  font-size: 14px;
  color: var(--text-muted);
}
.ys-cart-drawer-total strong {
  color: var(--red);
  font-size: 20px;
  font-weight: 700;
  margin: 0 4px;
}
.ys-cart-drawer-foot .ys-btn.primary { min-width: 100px; }
/* ============================================================
   列表页 (首页带 category_id/q 时切换)
   - 参考 d 站 yuepu/lst.html 布局, 无缩略图
   ============================================================ */
.ys-list-bread {
  margin: 4px 0 14px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 16px 20px 0;
}
.ys-list-bread a { color: var(--text-muted); }
.ys-list-bread a:hover { color: var(--primary); }
.ys-list-bread .ys-bc-keyword { color: var(--primary); font-weight: 500; }

/* 筛选条 (chip) */
.ys-filter-bar {
  background: #fafbfc;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 14px 18px 6px;
  margin-bottom: 14px;
}
.ys-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  flex-wrap: wrap;
}
.ys-filter-label {
  flex: 0 0 70px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.ys-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.ys-filter-chips a {
  display: inline-block;
  padding: 4px 14px;
  font-size: 13px;
  color: var(--text-muted);
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  line-height: 1.6;
  cursor: pointer;
  transition: all 0.18s;
}
.ys-filter-chips a:hover {
  color: var(--primary);
  border-color: var(--primary-light);
  background: var(--primary-soft);
}
.ys-filter-chips a.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 500;
}
.ys-filter-row-action {
  justify-content: flex-end;
  border-top: 1px dashed var(--border-light);
  margin-top: 4px;
  padding-top: 10px;
}
.ys-filter-clear {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}
.ys-filter-clear:hover { color: var(--primary); }

/* 排序条 + 列表头 (列说明) */
.ys-list-head-wrap {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 10px 10px 0 0;
  padding: 10px 20px;
  margin-bottom: 0;
  border-bottom: none;
}
.ys-sort-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ys-sort-label {
  font-size: 13px;
  color: var(--text-muted);
}
.ys-sort-chips {
  display: inline-flex;
  gap: 0;
  background: #f5f7fa;
  border-radius: 6px;
  overflow: hidden;
  padding: 2px;
}
.ys-sort-chips a {
  display: inline-block;
  padding: 4px 16px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.18s;
}
.ys-sort-chips a:hover { color: var(--primary); }
.ys-sort-chips a.active {
  color: #fff;
  background: var(--primary);
  font-weight: 500;
}

/* 共 N 条 */
.ys-list-count-tag {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* 行式列表容器 (覆盖首页态的 .ys-list-item 样式) */
.ys-list-row {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border-light);
  border-top: none;
  border-radius: 0 0 10px 10px;
  background: #fff;
  overflow: hidden;
}
/* 列表行 - 扁平横排, 参考首页最新发布 */
.ys-row {
  display: grid;
  grid-template-columns: 1fr auto 140px 110px 80px 90px;
  align-items: center;
  column-gap: 18px;
  padding: 14px 20px;
  border-bottom: 1px solid #f1f3f5;
  transition: background 0.18s;
}
.ys-row:last-child { border-bottom: none; }
.ys-row:hover { background: #fafbfc; }

/* 标题列 */
.ys-row-tit {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ys-row-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.ys-row-name:hover { color: var(--primary); }
.ys-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.ys-row-artist {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}
.ys-row-cat {
  display: inline-block;
  align-self: center;
  padding: 1px 8px;
  background: #f3f4f6;
  color: var(--text-muted);
  border-radius: 4px;
  font-size: 11px;
  text-decoration: none;
  line-height: 1.6;
  flex-shrink: 0;
}
.ys-row-cat:hover { background: var(--primary-soft); color: var(--primary); }
.ys-row-by {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
}
.ys-row-by a {
  color: var(--text-muted);
  text-decoration: none;
}
.ys-row-by a:hover { color: var(--primary); }

/* 操作图标组 (播放 / 收藏 / 购物车) */
.ys-row-icons {
  display: flex;
  gap: 6px;
  align-items: center;
}
.ys-row-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: var(--text-muted);
  background: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s;
  font-size: 12px;
}
.ys-row-icon:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-light);
}
/* 列表行收藏图标 - 已收藏态: 红心 + 浅红底 + 红边框 */
.ys-row-icon.ys-row-fav.faved {
  background: #fff1f0;
  color: #ff4d4f;
  border-color: #ffccc7;
}
.ys-row-icon.ys-row-fav.faved:hover {
  background: #ffccc7;
  color: #ff4d4f;
  border-color: #ff7875;
}

/* 原版指数 (进度条 + 描述文字) */
.ys-row-sim {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  justify-content: center;
}
.ys-row-sim .ys-bar {
  width: 100%;
  flex: 0 0 6px;
  min-width: 0;
}
.ys-row-sim-desc {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* 难度值 (进度条 + 描述文字) */
.ys-row-diff {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  justify-content: center;
}
.ys-row-diff .ys-bar {
  width: 100%;
  flex: 0 0 6px;
  min-width: 0;
}
.ys-row-diff-desc {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* 空值占位符 (原版/难度都未填时) */
.ys-row-empty {
  color: var(--text-muted);
  opacity: 0.5;
  font-size: 12px;
}
.ys-row-diff-lbl {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  min-width: 30px;
  text-align: right;
}

/* 价格 */
.ys-row-price {
  text-align: right;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}
.ys-row-price-num { color: var(--red, #f44); }
.ys-row-price-unit {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  font-style: normal;
  margin-left: 2px;
}
.ys-row-price-free { color: var(--green, #4CAF50); font-size: 14px; font-weight: 600; }

/* 时间 */
.ys-row-time {
  text-align: right;
  font-size: 12px;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
}

.ys-row-empty {
  text-align: center;
  padding: 60px 20px;
  font-size: 16px;
  color: var(--text-muted);
  background: #fff;
}

/* 分页器 */
.ys-pager {
  margin: 18px 0 40px;
  padding: 14px 0 0;
  display: flex;
  justify-content: center;
}
.ys-pager-inner {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.ys-pager-btn,
.ys-pager-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s;
}
.ys-pager-btn:hover {
  color: var(--primary);
  border-color: var(--primary-light);
  background: var(--primary-soft);
}
.ys-pager-btn.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 500;
  cursor: default;
}
.ys-pager-btn.disabled {
  color: var(--text-light);
  background: #fafbfc;
  border-color: var(--border-light);
  cursor: not-allowed;
}
.ys-pager-dots {
  border: none;
  background: transparent;
  cursor: default;
  color: var(--text-muted);
}

/* 列表页加载更多 + 上限提示 (2026-06-26: 取消分页器) */
.ys-list-foot {
  margin: 24px 0 40px;
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.ys-loadmore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  height: 38px;
  padding: 0 24px;
  font-size: 14px;
  color: var(--primary);
  background: #fff;
  border: 1px solid var(--primary-light);
  border-radius: 19px;
  cursor: pointer;
  transition: all 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.ys-loadmore:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}
.ys-loadmore:active {
  transform: scale(0.97);
}
.ys-loadmore[disabled],
.ys-loadmore.is-loading {
  color: var(--text-muted);
  background: #fafbfc;
  border-color: var(--border-light);
  cursor: not-allowed;
  pointer-events: none;
}
.ys-list-loading {
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 0;
}
.ys-list-tip {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 12px 20px;
  background: #fafbfc;
  border-radius: 6px;
  border: 1px dashed var(--border-light);
}
.ys-list-tip-count {
  color: var(--primary);
  font-weight: 500;
  margin: 0 2px;
}
.ys-list-tip-link {
  color: var(--primary);
  text-decoration: none;
  margin-left: 4px;
}
.ys-list-tip-link:hover {
  text-decoration: underline;
}

/* 双栏布局: 列表页 (主 + 侧栏) */
.ys-list-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.ys-list-main {
  min-width: 0;
}
.ys-list-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  /* 与左侧主区 .ys-list-section 的 margin-top:20px 对齐,避免右侧栏贴顶 */
  margin-top: 20px;
}

/* 侧栏卡片 */
.ys-aside-panel {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 16px 18px;
}
.ys-aside-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ys-aside-title::after {
  content: '';
  flex: 1;
  height: 1px;
  margin-left: 10px;
  background: linear-gradient(90deg, var(--border-light), transparent);
}
.ys-aside-empty {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 12px 0;
  list-style: none;
}

/* 分类导航 */
.ys-aside-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 8px;
}
.ys-aside-cat a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.18s;
  line-height: 1.4;
}
.ys-aside-cat a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}
.ys-aside-cat-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-light);
  flex-shrink: 0;
  transition: all 0.18s;
}
.ys-aside-cat.is-active a {
  background: var(--primary);
  color: #fff;
  font-weight: 500;
}
.ys-aside-cat.is-active .ys-aside-cat-dot {
  background: #fff;
}

/* 排行榜 (Top 10) */
.ys-aside-rank {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: rank;
}
.ys-aside-rank-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed #f0f2f5;
  overflow: hidden;
}
.ys-aside-rank-item:last-child { border-bottom: none; }
.ys-aside-rank-num {
  flex: 0 0 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: #f3f4f6;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}
.ys-aside-rank-item.rank-1 .ys-aside-rank-num { background: #ff6b35; color: #fff; }
.ys-aside-rank-item.rank-2 .ys-aside-rank-num { background: #ff9f43; color: #fff; }
.ys-aside-rank-item.rank-3 .ys-aside-rank-num { background: #f6c453; color: #fff; }
.ys-aside-rank-name {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ys-aside-rank-name:hover { color: var(--primary); }
.ys-aside-rank-sep {
  flex: 0 0 auto;
  color: var(--text-light);
  font-size: 12px;
}
.ys-aside-rank-artist {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  color: var(--text-light);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ys-aside-rank-artist:hover { color: var(--primary); }

/* 最新发布 */
.ys-aside-news {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ys-aside-news-item {
  padding: 8px 0;
  border-bottom: 1px dashed #f0f2f5;
}
.ys-aside-news-item:last-child { border-bottom: none; }
.ys-aside-news-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  line-height: 1.4;
}
.ys-aside-news-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ys-aside-news-name:hover { color: var(--primary); }
.ys-aside-news-sep {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--text-light);
}
.ys-aside-news-artist {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 12px;
  color: var(--text-light);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ys-aside-news-artist:hover { color: var(--primary); }
.ys-aside-news-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--text-light);
}
.ys-aside-news-cat {
  padding: 0 6px;
  background: #f3f4f6;
  color: var(--text-muted);
  border-radius: 3px;
}

/* 桌面端 - 双栏 */
@media (min-width: 1024px) {
  .ys-list-layout {
    grid-template-columns: 1fr 360px;
    gap: 20px;
    align-items: flex-start;
  }
  /* 不再 sticky,让侧栏跟主区一起在文档流里自然布局,内容完整可见 */
}

/* 筛选切换按钮 - 桌面默认隐藏 */
.ys-filter-toggle { display: none; }

/* 列表页 - 移动端适配 */
@media (max-width: 768px) {
  /* 列表页: 筛选条默认隐藏,可展开 */
  body[data-page="list"] .ys-filter-bar { display: none; }
  body[data-page="list"] .ys-filter-bar.is-open { display: block; }

  /* 筛选切换按钮 - 移动端显示(靠右) */
  body[data-page="list"] .ys-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    margin-left: auto;
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid var(--primary-light);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    line-height: 1.6;
    transition: all 0.18s;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
  }
  body[data-page="list"] .ys-filter-toggle:active {
    transform: scale(0.96);
  }
  body[data-page="list"] .ys-filter-toggle.is-open {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
  }
  body[data-page="list"] .ys-filter-toggle-arrow {
    display: inline-block;
    font-size: 11px;
    transition: transform 0.2s;
  }
  body[data-page="list"] .ys-filter-toggle.is-open .ys-filter-toggle-arrow {
    transform: rotate(180deg);
  }

  /* 手机端 footer 统一简化:全站只保留 ys-footer-bottom 那一行版权 */
  .ys-footer-inner { display: none; }
  .ys-footer { padding: 16px 16px 16px; margin-top: 24px; }
  .ys-footer-bottom { margin: 0 auto; padding-top: 0; border-top: none; }

  .ys-filter-bar { padding: 10px 12px 4px; }
  .ys-filter-label { flex-basis: 56px; font-size: 12px; }
  .ys-filter-chips a { padding: 3px 10px; font-size: 12px; }
  .ys-list-head-wrap { padding: 8px 12px; }
  .ys-sort-chips a { padding: 3px 12px; font-size: 12px; }
  /* 列表行: 平板 - 紧凑 6 列 */
  .ys-row {
    grid-template-columns: 1fr auto 110px 90px 70px 70px;
    column-gap: 10px;
    padding: 12px 14px;
  }
  .ys-row-name { font-size: 14px; }
  .ys-row-cat { font-size: 10px; padding: 0 6px; }
  .ys-row-icon { width: 26px; height: 26px; }
  .ys-row-sim-num,
  .ys-row-diff-lbl { min-width: 28px; font-size: 11px; }
  .ys-row-price { font-size: 15px; }
  .ys-row-time { font-size: 11px; }
  .ys-pager-btn { min-width: 30px; height: 30px; font-size: 12px; }
}

@media (max-width: 540px) {
  /* 手机: 行改成两行 - 标题/图标/价格 + 指数/难度/时间 */
  .ys-row {
    grid-template-columns: 1fr auto auto;
    grid-template-areas:
      "title  icons  price"
      "sims   diffs  time";
    row-gap: 8px;
    padding: 12px 14px;
  }
  .ys-row-tit     { grid-area: title; }
  .ys-row-icons   { grid-area: icons; align-self: center; }
  .ys-row-price   { grid-area: price; align-self: center; }
  .ys-row-sim     { grid-area: sims; }
  .ys-row-diff    { grid-area: diffs; }
  .ys-row-time    { grid-area: time; align-self: center; }
  .ys-row-sim .ys-bar,
  .ys-row-diff .ys-bar { height: 5px; }
  .ys-row-name { font-size: 14px; }
}

@media (max-width: 360px) {
  .ys-row-icons { gap: 4px; }
  .ys-row-icon { width: 24px; height: 24px; font-size: 11px; }
}

/* ============================================================
   首页 v2 (吉他世界风格) — 2026-06-22
   模块: banner / guide / cats / recommend / rank / cta
   双进度条: 原版指数 (#1E9FFF) + 难度值 (#FF6B35)
   ============================================================ */

.ys-home-main {
  max-width: 1400px;
  width: 100%;
  margin: 16px auto 32px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --- 通用 section --- */
.ys-home-section { background: #fff; border-radius: 12px; padding: 20px 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.ys-section-title { font-size: 20px; font-weight: 600; color: #1F2937; margin: 0 0 16px; position: relative; padding-left: 12px; }
.ys-section-title::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 18px; background: #1E9FFF; border-radius: 2px; }
.ys-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ys-section-head .ys-section-title { margin: 0; }
.ys-section-more { font-size: 13px; color: #1E9FFF; text-decoration: none; }
.ys-section-more:hover { text-decoration: underline; }

/* --- Banner 容器 (学吉他世界 el-carousel type=card: 中间突出, 左右只透明度低, 文字清晰可读) --- */
.ys-home-banner {
  position: relative;
  height: 380px;            /* 海报感: 260 → 380 */
  overflow: hidden;
  border-radius: 14px;
  /* 容器自身不加 shadow, 让 active 卡的 shadow 凸出来 */
}

.ys-banner-track {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  /* padding 由 JS 动态计算, 让首张卡片中心对齐 viewport 中心 */
  padding: 0 0;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.ys-banner-card {
  /* flex-basis 由 JS 动态设 px (居中算法), 这里给兜底值 */
  flex: 0 0 52%;             /* 桌面 52%, 比 60% 窄, 让左右露出更多 */
  height: 330px;             /* 海报感: 220 → 330 */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 48px;        /* 海报感: 28 40 → 36 48, 大卡片多留呼吸 */
  color: #fff;
  text-decoration: none;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  /* 3D 立位: 默认缩小下沉 + 弱透明 (被滑出视野的卡) */
  opacity: 0;
  transform: scale(0.6) translateY(40px);
  transition: opacity 0.5s, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s;
  z-index: 1;
}
/* 左右露出的卡: 缩小 + 下沉 + 往中间靠, 让 active 浮在上面遮住一半, 3D stack 效果 */
.ys-banner-card.is-prev {
  opacity: 0.55;
  transform: scale(0.82) translate(440px, 24px);   /* 海报感: 14 → 24, 深度比例跟得上 */
  z-index: 1;
}
.ys-banner-card.is-next {
  opacity: 0.55;
  transform: scale(0.82) translate(-440px, 24px);  /* 海报感: 14 → 24 */
  z-index: 1;
}
/* 中间 active: 轻微放大 + 上浮, 飘在左右卡上面 */
.ys-banner-card.is-active {
  opacity: 1;
  transform: scale(1.04) translateY(-16px);        /* 海报感: -10 → -16 */
  box-shadow: 0 32px 80px rgba(30,159,255,0.42), 0 12px 24px rgba(0,0,0,0.14);  /* 投影加深 */
  z-index: 5;
}
.ys-banner-card-g1 { background: linear-gradient(135deg, #1E9FFF 0%, #4DB7FF 50%, #6BC5FF 100%); }
.ys-banner-card-g2 { background: linear-gradient(135deg, #6366F1 0%, #818CF8 50%, #A5B4FC 100%); }
.ys-banner-card-g3 { background: linear-gradient(135deg, #06B6D4 0%, #3B82F6 50%, #6366F1 100%); }
.ys-banner-card::before { content: '🎵'; position: absolute; right: -20px; bottom: -30px; font-size: 240px; opacity: 0.12; pointer-events: none; }  /* 海报感: 180 → 240 */
.ys-bn-body { position: relative; z-index: 1; max-width: 100%; overflow: hidden; }
.ys-bn-cat { display: inline-block; background: rgba(255,255,255,0.25); padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 500; backdrop-filter: blur(4px); }
.ys-bn-title { font-size: 28px; font-weight: 600; margin: 10px 0 6px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }  /* 海报感: 24 → 28 */
.ys-bn-sub { font-size: 13px; font-weight: 400; opacity: 0.85; margin-left: 6px; }
.ys-bn-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; opacity: 0.92; flex-wrap: wrap; }
.ys-bn-artist { font-weight: 500; }
.ys-bn-diff { background: rgba(255,255,255,0.2); padding: 2px 8px; border-radius: 4px; font-size: 11px; }
.ys-bn-price { background: #fff; color: #1E9FFF; padding: 3px 12px; border-radius: 999px; font-weight: 600; margin-left: auto; }
.ys-bn-price-num i { font-style: normal; font-size: 10px; margin-left: 2px; opacity: 0.7; }
.ys-bn-price-free { background: #fff; color: #10B981; padding: 3px 12px; border-radius: 999px; font-weight: 600; }

.ys-banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.9); color: #1E9FFF;
  border: none; font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 3;
}
.ys-banner-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.1); }
.ys-banner-prev { left: 16px; }
.ys-banner-next { right: 16px; }

.ys-banner-dots {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 3;
}
.ys-banner-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(0,0,0,0.2); border: none; cursor: pointer; transition: all 0.2s; padding: 0; }
.ys-banner-dot.active { background: #1E9FFF; width: 20px; border-radius: 3px; }
.ys-banner-empty { color: #94A3B8; display: flex; align-items: center; justify-content: center; height: 100%; font-size: 14px; }

/* --- 模块 3: 分类网格 --- */
.ys-cats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ys-cat-card {
  background: #F8FAFC; border-radius: 8px; padding: 14px 16px;
  text-decoration: none; color: #1F2937;
  display: flex; flex-direction: column; gap: 4px;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.ys-cat-card:hover { background: #F0F9FF; border-color: #1E9FFF; transform: translateY(-1px); }
.ys-cat-name { font-size: 15px; font-weight: 600; }
.ys-cat-sub { font-size: 12px; color: #94A3B8; }
.ys-cats-loading, .ys-cats-empty { grid-column: 1 / -1; text-align: center; color: #94A3B8; padding: 24px; font-size: 13px; }

/* --- 模块 4: 推荐区 (双进度条卡片) --- */
.ys-rec-tabs { display: flex; gap: 4px; background: #F1F5F9; padding: 4px; border-radius: 8px; }
.ys-rec-tab { background: transparent; border: none; padding: 6px 16px; font-size: 13px; color: #64748B; cursor: pointer; border-radius: 6px; transition: all 0.2s; }
.ys-rec-tab:hover { color: #1E9FFF; }
.ys-rec-tab.active { background: #fff; color: #1E9FFF; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

.ys-qupu-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ys-qp-card {
  background: #FAFBFC; border-radius: 8px; padding: 14px 16px;
  border: 1px solid #F1F5F9;
  transition: all 0.2s;
  display: flex; flex-direction: column; gap: 8px;
}
.ys-qp-card:hover { background: #fff; border-color: #BFE3FF; box-shadow: 0 2px 8px rgba(30,159,255,0.08); }
.ys-qp-row1 { display: flex; align-items: center; gap: 8px; }
.ys-qp-title { font-size: 15px; font-weight: 600; color: #1F2937; margin: 0; flex: 1; min-width: 0; line-height: 1.4; }
.ys-qp-title a { color: inherit; text-decoration: none; }
.ys-qp-title a:hover { color: #1E9FFF; }
.ys-qp-sub { font-size: 12px; color: #94A3B8; font-weight: 400; margin-left: 4px; }
.ys-qp-audio, .ys-qp-video { width: 24px; height: 24px; border-radius: 50%; background: #1E9FFF; color: #fff; border: none; cursor: pointer; font-size: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ys-qp-video { background: #FF6B35; }

.ys-qp-row2 { font-size: 12px; color: #64748B; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ys-qp-cat { background: #E0F2FE; color: #1E9FFF; padding: 1px 8px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.ys-qp-artist { color: #475569; font-weight: 500; }
.ys-qp-diff-label { color: #FF6B35; }
.ys-qp-time { color: #94A3B8; }

.ys-qp-row3 { font-size: 12px; color: #64748B; display: flex; align-items: center; gap: 6px; }
.ys-qp-creator { color: #1E9FFF; text-decoration: none; font-weight: 500; }
.ys-qp-creator:hover { text-decoration: underline; }
.ys-qp-creator-empty { color: #94A3B8; }
.ys-qp-dot { color: #CBD5E1; }
.ys-qp-price { margin-left: auto; font-weight: 600; }
.ys-qp-price-num { color: #1E9FFF; font-size: 14px; }
.ys-qp-price-num i { font-style: normal; font-size: 11px; margin-left: 2px; opacity: 0.7; }
.ys-qp-price-free { color: #10B981; font-size: 13px; }

/* 双进度条 — 首页核心 */
.ys-qp-row4 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.ys-qp-bar { display: flex; flex-direction: column; gap: 3px; }
.ys-qp-bar-label { display: flex; justify-content: space-between; font-size: 11px; color: #64748B; }
.ys-qp-bar-label strong { color: #1F2937; font-weight: 600; }
.ys-qp-bar-track { height: 5px; background: #F1F5F9; border-radius: 3px; overflow: hidden; }
.ys-qp-bar-fill { height: 100%; border-radius: 3px; transition: width 0.4s; }
.ys-qp-bar-orig { background: linear-gradient(90deg, #1E9FFF, #4DB7FF); }
.ys-qp-bar-diff { background: linear-gradient(90deg, #FF6B35, #FFA940); }
.ys-qp-bar-desc { font-size: 11px; color: #94A3B8; }
.ys-qp-bar-empty { font-size: 11px; color: #CBD5E1; padding: 4px 0; }

.ys-qp-loading, .ys-qp-empty { grid-column: 1 / -1; text-align: center; color: #94A3B8; padding: 24px; font-size: 13px; }

/* --- 模块 5: 4 列主题榜单 --- */
.ys-rank-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ys-rank-col { background: #FAFBFC; border-radius: 8px; padding: 14px 16px; border: 1px solid #F1F5F9; }
.ys-rank-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #E2E8F0; }
.ys-rank-title { font-size: 14px; font-weight: 600; color: #1F2937; margin: 0; }
.ys-rank-more { font-size: 11px; color: #94A3B8; text-decoration: none; }
.ys-rank-more:hover { color: #1E9FFF; }

.ys-rank-list { list-style: none; margin: 0; padding: 0; }
.ys-rank-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.ys-rank-num {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 4px;
  background: #E2E8F0; color: #64748B; font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.ys-rank-item:nth-child(1) .ys-rank-num { background: linear-gradient(135deg, #FF6B35, #FFA940); color: #fff; }
.ys-rank-item:nth-child(2) .ys-rank-num { background: linear-gradient(135deg, #FB923C, #FCD34D); color: #fff; }
.ys-rank-item:nth-child(3) .ys-rank-num { background: linear-gradient(135deg, #FBBF24, #FDE68A); color: #fff; }
.ys-rank-link { flex: 1; min-width: 0; text-decoration: none; color: #1F2937; display: flex; flex-direction: column; gap: 1px; }
.ys-rank-link:hover .ys-rank-title { color: #1E9FFF; }
.ys-rank-title { font-size: 13px; font-weight: 500; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; }
.ys-rank-artist { font-size: 11px; color: #94A3B8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ys-rank-loading, .ys-rank-empty { text-align: center; color: #94A3B8; padding: 16px; font-size: 12px; }

/* --- 模块 6: 制谱 CTA --- */
.ys-home-cta {
  background: linear-gradient(135deg, #1E9FFF 0%, #4DB7FF 50%, #6BC5FF 100%);
  border-radius: 12px; padding: 36px 24px;
  color: #fff; text-align: center;
  box-shadow: 0 4px 16px rgba(30,159,255,0.2);
}
.ys-cta-title { font-size: 24px; font-weight: 600; margin: 0 0 8px; }
.ys-cta-desc { font-size: 14px; margin: 0 0 16px; opacity: 0.95; }
.ys-cta-desc strong { color: #FFE066; font-weight: 700; }
.ys-cta-stats { display: flex; justify-content: center; gap: 24px; margin-bottom: 20px; flex-wrap: wrap; }
.ys-cta-stat { font-size: 14px; opacity: 0.92; }
.ys-cta-stat strong { font-size: 22px; font-weight: 700; margin-right: 4px; }
.ys-cta-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.ys-home-cta .ys-btn { padding: 10px 24px; }
.ys-home-cta .ys-btn-primary { background: #fff; color: #1E9FFF; }
.ys-home-cta .ys-btn-primary:hover { background: #F0F9FF; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.ys-home-cta .ys-btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.ys-home-cta .ys-btn-ghost:hover { background: rgba(255,255,255,0.15); border-color: #fff; }

/* ============================================================
   首页 v2 响应式
   ============================================================ */
@media (max-width: 900px) {
  /* ys-home-guide 桌面已 2 列, 这里不再覆盖 */
  .ys-cats-grid { grid-template-columns: repeat(3, 1fr); }
  .ys-rank-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .ys-home-main { padding: 0 12px; gap: 16px; }
  .ys-home-section { padding: 16px; }
  /* Banner: 改扁长比例 (2026-06-27) — 原来 280×240 接近正方形,改为 180×160 像标准 banner */
  .ys-home-banner { height: 180px; border-radius: 12px; }
  .ys-banner-card { height: 160px; padding: 18px 22px; border-radius: 12px; }
  /* 手机端不露前后卡片 — 重置偏移 + 透明,只显示 active 一张,视觉干净 */
  .ys-banner-card.is-prev, .ys-banner-card.is-next {
    opacity: 0;
    transform: scale(1) translate(0, 0);
    pointer-events: none;
  }
  /* active 卡片去 scale 浮起,保持扁平,更像 banner */
  .ys-banner-card.is-active {
    transform: scale(1) translateY(0);
    box-shadow: 0 8px 24px rgba(30,159,255,0.25);
  }
  /* 隐藏左右箭头按钮 (手机端用 dots 切换即可) */
  .ys-banner-arrow { display: none; }
  /* 隐藏大 emoji 装饰 — 手机端不需要这种重装饰,让文字更突出 */
  .ys-banner-card::before { display: none; }
  /* 文字更醒目 */
  .ys-bn-title { font-size: 22px; line-height: 1.3; }
  .ys-bn-cat { font-size: 12px; padding: 4px 12px; }
  .ys-bn-meta { font-size: 13px; gap: 8px; }
  .ys-bn-price, .ys-bn-price-free { padding: 4px 12px; font-size: 13px; }
  .ys-bn-sub { font-size: 12px; display: block; margin: 4px 0 0 0; }

  .ys-cats-grid { grid-template-columns: repeat(2, 1fr); }
  .ys-qupu-list { grid-template-columns: 1fr; }
  .ys-qp-row4 { grid-template-columns: 1fr; gap: 6px; }
  .ys-rank-grid { grid-template-columns: 1fr; }
  .ys-cta-title { font-size: 18px; }
  .ys-cta-desc { font-size: 13px; }
}
/* ============================================================
 * 曲谱下架/审核占位样式 (2026-06-22 新增)
 * body[data-view-state="offline"|"pending"|"rejected"] 时:
 *   - 显示 .ys-offline-banner 顶部提示
 *   - 隐藏媒体演示区, 多图 gallery, 锁屏, 价格区, 购买按钮, 收藏按钮
 * body[data-view-state="purchased"] (已购用户看已下架曲谱):
 *   - 显示 .ys-offline-banner 顶部绿色提示「您是已购用户,仍可查看完整内容」
 *   - 不隐藏媒体/价格/购买按钮等模块 (因为 isViewable=true, 全部照常显示)
 * ============================================================ */
.ys-offline-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  margin: 0 0 20px 0;
  background: linear-gradient(135deg, #fff7e6 0%, #ffe7ba 100%);
  border: 1px solid #ffd591;
  border-left: 4px solid #fa8c16;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(250,140,22,0.08);
}
.ys-offline-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}
.ys-offline-text { flex: 1; min-width: 0; }
.ys-offline-title {
  font-size: 16px;
  font-weight: 600;
  color: #d46b08;
  margin-bottom: 4px;
}
.ys-offline-sub {
  font-size: 13px;
  color: #874d00;
  line-height: 1.5;
}
.ys-offline-banner--purchased {
  background: linear-gradient(135deg, #f6ffed 0%, #d9f7be 100%);
  border-color: #b7eb8f;
  border-left-color: #52c41a;
  box-shadow: 0 2px 8px rgba(82,196,26,0.08);
}
.ys-offline-banner--purchased .ys-offline-title { color: #389e0d; }
.ys-offline-banner--purchased .ys-offline-sub { color: #237804; }
}
.ys-offline-meta-hint {
  color: #9ca3af;
  font-size: 14px;
  font-style: italic;
  padding: 12px 0;
}

/* 非可查看状态 (下架/审核) 默认隐藏以下模块, 避免空数据导致 UI 错误 */
body[data-view-state="offline"] .ys-media-stage,
body[data-view-state="pending"] .ys-media-stage,
body[data-view-state="rejected"] .ys-media-stage,
body[data-view-state="offline"] .ys-score-image,
body[data-view-state="pending"] .ys-score-image,
body[data-view-state="rejected"] .ys-score-image,
body[data-view-state="offline"] .ys-score-lock,
body[data-view-state="pending"] .ys-score-lock,
body[data-view-state="rejected"] .ys-score-lock,
body[data-view-state="offline"] .ys-score-actions,
body[data-view-state="pending"] .ys-score-actions,
body[data-view-state="rejected"] .ys-score-actions,
body[data-view-state="offline"] .ys-price-box,
body[data-view-state="pending"] .ys-price-box,
body[data-view-state="rejected"] .ys-price-box,
body[data-view-state="offline"] .ys-price-block,
body[data-view-state="pending"] .ys-price-block,
body[data-view-state="rejected"] .ys-price-block,
body[data-view-state="offline"] #btn-fav,
body[data-view-state="pending"] #btn-fav,
body[data-view-state="rejected"] #btn-fav {
  display: none !important;
}

/* 响应式 */
@media (max-width: 768px) {
  .ys-offline-banner {
    padding: 14px 16px;
    gap: 12px;
  }
  .ys-offline-icon { font-size: 24px; }
  .ys-offline-title { font-size: 15px; }
  .ys-offline-sub { font-size: 12px; }
}

/* ============================================================
   看谱模式 — 已购 / VIP / 创作者 / 管理员 专属全屏阅读模式
   替代之前的 "立即下载 + 价格块 + 我的乐手币" 一整块, 让付费用户专注看谱
   ============================================================ */

/* 主图右下角悬浮按钮 (FAB) — 已购状态显示 */
.ys-reading-fab {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 5;
  display: none; /* 默认隐藏, JS 在 canSeeFull 时打开 */
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: rgba(30, 159, 255, 0.92);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(30, 159, 255, 0.4);
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  user-select: none;
}
.ys-reading-fab:hover {
  background: #1E9FFF;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(30, 159, 255, 0.55);
}
.ys-reading-fab:active { transform: translateY(0); }
.ys-reading-fab svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* 移动端底部 sticky 看谱模式按钮 (替代 cart + 立即兑换) */
.ys-mobile-reading-btn {
  display: none; /* 默认隐藏, JS 在 canSeeFull 时打开 */
  flex: 1;
  margin: 8px 10px;
  padding: 12px 16px;
  background: #1E9FFF;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 -2px 8px rgba(30, 159, 255, 0.2);
}
.ys-mobile-reading-btn:active { background: #1789d8; }
.ys-mobile-reading-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ============================================================
   看谱模式全屏模态 — 沉浸式阅读体验
   ============================================================ */
.ys-reading-mode {
  position: fixed;
  inset: 0;
  z-index: 10000; /* 高于 lightbox (9999) */
  background: #0a0a0a;
  display: none;
  flex-direction: column;
  animation: ys-reading-fade 0.25s ease;
}
.ys-reading-mode.show { display: flex; }
@keyframes ys-reading-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 顶部工具条: 标题 + 进度 + 关闭 */
.ys-reading-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  padding: 0 20px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.ys-reading-title {
  flex: 1;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ys-reading-progress {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}
.ys-reading-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.ys-reading-close:hover { background: rgba(255, 255, 255, 0.25); }

/* 中央图片区: 大图 + 左右翻页按钮 */
.ys-reading-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.ys-reading-img {
  max-width: 96vw;
  max-height: calc(100vh - 56px - 110px); /* 减去顶部工具条和底部缩略图条 */
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  border-radius: 4px;
  transition: opacity 0.15s ease;
}
.ys-reading-img.is-loading { opacity: 0; }
.ys-reading-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  font-size: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  user-select: none;
}
.ys-reading-nav:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.05);
}
.ys-reading-nav.prev { left: 20px; }
.ys-reading-nav.next { right: 20px; }
.ys-reading-nav[disabled] {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
}

/* 底部缩略图条 (横滚) */
.ys-reading-thumbs {
  height: 90px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.ys-reading-thumbs::-webkit-scrollbar {
  height: 6px;
}
.ys-reading-thumbs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}
.ys-reading-thumb {
  flex: 0 0 auto;
  height: 66px;
  width: 50px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.55;
  transition: all 0.15s ease;
  padding: 0;
  background: #1a1a1a;
}
.ys-reading-thumb:hover { opacity: 0.85; }
.ys-reading-thumb.active {
  opacity: 1;
  border-color: #1E9FFF;
}
.ys-reading-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 单图模式: 隐藏翻页按钮 + 隐藏缩略图条 */
.ys-reading-mode.no-thumbs .ys-reading-thumbs { display: none; }
.ys-reading-mode.no-thumbs .ys-reading-img {
  max-height: calc(100vh - 56px);
}

/* ============================================================
   已购 / VIP 适用 — 隐藏价格 / 购物车 / 下载按钮 / 币条 / 移动 sticky
   由 JS 在 score.js 里给 body 加 data-view-state="purchased" 来触发
   (避免误伤「未购付费」「免费」「创作者」场景)
   ============================================================ */
body[data-view-state="purchased"] .ys-price-block,
body[data-view-state="purchased"] .ys-btn-cart,
body[data-view-state="purchased"] .ys-score-actions-buttons,
body[data-view-state="purchased"] .ys-coin-bar,
body[data-view-state="purchased"] .ys-buy-overlay {
  display: none !important;
}
body[data-view-state="purchased"] .ys-score-actions {
  /* 已购状态: 整个价格行动区变薄, 只留 FAB + 看谱入口 (FAB 已经浮在主图上) */
  padding: 12px 16px;
  background: transparent;
  border: none;
  margin: 12px 0 0;
  /* 显示 mobile 阅读按钮 (手机端) */
  display: block;
}
@media (min-width: 768px) {
  body[data-view-state="purchased"] .ys-score-actions {
    /* PC 端: 已经无内容了, 整个隐藏, 主图 FAB 已经够用 */
    display: none !important;
  }
}
body[data-view-state="purchased"] .ys-mobile-reading-btn {
  display: flex !important;
}
body[data-view-state="purchased"] .ys-reading-fab {
  display: inline-flex !important;
}

/* 看谱模式移动端适配 */
@media (max-width: 767px) {
  .ys-reading-toolbar { height: 48px; padding: 0 12px; }
  .ys-reading-title { font-size: 14px; }
  .ys-reading-progress { font-size: 12px; padding: 3px 10px; }
  .ys-reading-close { width: 32px; height: 32px; font-size: 20px; }
  .ys-reading-img {
    max-height: calc(100vh - 48px - 86px);
  }
  .ys-reading-nav { width: 40px; height: 40px; font-size: 22px; }
  .ys-reading-nav.prev { left: 8px; }
  .ys-reading-nav.next { right: 8px; }
  .ys-reading-thumbs { height: 70px; padding: 8px 10px; }
  .ys-reading-thumb { height: 54px; width: 40px; }
}

/* 全局 body 看谱模式锁定 (防止背景滚动) */
body.ys-reading-locked {
  overflow: hidden !important;
}

/* ===== ��������ҳ - ������ (2026-06-23) ===== */
.ys-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.ys-review-head h3.ys-comments-title { margin: 0; }
.ys-review-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 13px;
}
.ys-review-avg {
  font-size: 22px;
  font-weight: 700;
  color: #f59e0b;
  line-height: 1;
}
.ys-review-stars {
  color: #f59e0b;
  font-size: 14px;
  letter-spacing: 1px;
}

.ys-rv-stars-readonly {
  color: #e5e7eb;
  font-size: 13px;
  letter-spacing: 1px;
}
.ys-rv-stars-readonly .ys-rv-star.on { color: #f59e0b; }

/* 单条评价下方的「修改/删除」操作行 */
.ys-comment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 6px;
  font-size: 13px;
}
.ys-comment-actions a {
  color: #1E9FFF;
  text-decoration: none;
}
.ys-comment-actions a:hover { text-decoration: underline; }
.ys-comment-actions a.ys-comment-action-del {
  color: #ef4444;
}

/* 我的私人评价 (列表里看不到自己 private 的评价, 顶部单独追加一行) */
.ys-comment-item.ys-comment-item-private {
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
}

.ys-review-form {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 18px;
}
.ys-review-form-row {
  margin-bottom: 12px;
}
.ys-review-form-row:last-child { margin-bottom: 0; }
.ys-review-form-row-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.ys-review-form-label {
  font-size: 13px;
  color: #6b7280;
  margin-right: 10px;
}
.ys-review-form-stars {
  display: inline-flex;
  gap: 4px;
  font-size: 22px;
  color: #e5e7eb;
  vertical-align: middle;
}
.ys-review-form-stars .ys-rv-form-star {
  cursor: pointer;
  transition: color 0.15s;
}
.ys-review-form-stars .ys-rv-form-star.on { color: #f59e0b; }
.ys-review-form-stars .ys-rv-form-star:hover { color: #fbbf24; }
.ys-review-form-hint {
  font-size: 12px;
  color: #9ca3af;
  margin-left: 8px;
  vertical-align: middle;
}
.ys-review-form-text {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}
.ys-review-form-text:focus {
  outline: none;
  border-color: #1E9FFF;
  box-shadow: 0 0 0 2px rgba(30, 159, 255, 0.12);
}
.ys-review-form-count {
  font-size: 12px;
  color: #9ca3af;
}
.ys-review-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ys-review-form-hint-text {
  font-size: 12px;
}
.ys-review-form-msg-ok { color: #16a34a; }
.ys-review-form-msg-err { color: #ef4444; }

.ys-review-cta {
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 18px;
  color: #6b7280;
  font-size: 14px;
  text-align: center;
}

.ys-comment-item {
  list-style: none;
  padding: 14px 0;
  border-bottom: 1px solid #f3f4f6;
}
.ys-comment-item:last-child { border-bottom: none; }
.ys-comment-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.ys-rv-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1E9FFF;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
}
.ys-rv-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ys-rv-avatar-empty { background: #9ca3af; }
.ys-comment-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}
.ys-comment-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}
.ys-comment-time {
  font-size: 12px;
  color: #9ca3af;
}
.ys-comment-body { padding-left: 46px; }
.ys-comment-text {
  font-size: 14px;
  line-height: 1.6;
  color: #1f2937;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.ys-comment-text-empty { color: #9ca3af; font-style: italic; }

/* ============================================================
   小程序客户端守卫 (2026-07-03)
   iOS 小程序访问详情页时, 在标题下方显示一行蓝色大气风提示条,
   引导用户去 PC 网页版 (www.ys613.com) 查看完整内容与购买
   ============================================================ */
.ys-mp-ios-hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 18px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #e6f4ff 0%, #f0f9ff 100%);
  border: 1px solid #b3dfff;
  border-left: 4px solid var(--primary, #1E9FFF);
  border-radius: 8px;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.6;
}
.ys-mp-ios-hint-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.ys-mp-ios-hint-text {
  flex: 1;
  min-width: 0;
  color: #374151;
}
.ys-mp-ios-hint-link {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 10px;
  background: var(--primary, #1E9FFF);
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 4px;
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  transition: background 0.15s;
}
.ys-mp-ios-hint-link:hover {
  background: var(--primary-dark, #0E7BD8);
}
@media (max-width: 767px) {
  /* 移动端: 链接换行显示, 不强行一行 */
  .ys-mp-ios-hint {
    flex-wrap: wrap;
    padding: 12px 14px;
    font-size: 13px;
  }
  .ys-mp-ios-hint-link {
    margin-left: 0;
    margin-top: 6px;
    flex-basis: 100%;
    text-align: center;
  }
}
