/* ============================================================================
   sd.css — 「全品类印品」页面（products.html）新增样式
   ----------------------------------------------------------------------------
   · 主站 styles.css / app.css / premium.css 直接复用（topbar/announce/cat-row/
     cat-chip/grid/card 视觉细节/section-title/main-pager/modal/site-footer…）
   · 本文件只写本页新增的部分：Hero、榜单区、产品卡补充、详情弹窗补充、
     收藏/联系弹窗内容、排序/面包屑/空态
   · 颜色全部取主站 CSS 变量（--bg/--ink/--accent/--accent-deep…），与主站同源
   ========================================================================== */

/* ---------- 通用 ---------- */
.sd-hidden { display: none !important; }

/* 顶栏 logo 以 <a> 承载（语义上是返回主站链接），图片撑满 36px 行高 */
.brand-logo-mini img {
  height: 100%;
  width: auto;
  display: block;
}

/* 收藏/榜单等用到的手写体小标题统一走 --font-script，与主站一致 */

/* ============================================================================
   1) Hero
   ========================================================================== */
.sd-hero {
  position: relative;
  overflow: hidden;
  padding: 40px 16px 30px;
  background:
    radial-gradient(900px 360px at 88% -20%, rgba(31, 30, 27, .06), transparent 62%),
    radial-gradient(720px 320px at -8% 112%, rgba(31, 30, 27, .04), transparent 58%),
    linear-gradient(180deg, #FFFFFF 0%, #FAF8F4 58%, var(--bg) 100%);
  border-bottom: 1px solid var(--line-soft);
}

.sd-hero-glow {
  position: absolute;
  right: -70px;
  top: -90px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(31, 30, 27, .06), rgba(31, 30, 27, 0) 70%);
  pointer-events: none;
}

.sd-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.sd-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid #EDE8DE;
  color: var(--accent-deep);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.sd-hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  box-shadow: 0 0 0 3px rgba(31, 30, 27, .2);
}

.sd-hero-title {
  position: relative;
  z-index: 0;
  display: block;
  margin: 14px 0 10px;
  font-family: var(--font-script);
  font-size: clamp(38px, 6.2vw, 62px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: .005em;
  color: var(--ink);
}

/* 手写标题下的一道荧光笔标记（渐变圆角条，置于文字之后） */
.sd-hero-title::after {
  content: '';
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 4px;
  height: 12px;
  z-index: -1;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(31, 30, 27, .62), rgba(31, 30, 27, .18));
}

.sd-hero-sub {
  margin: 0;
  max-width: 620px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.65;
}

.sd-hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 4px 0;
  margin-top: 24px;
}

.sd-stat {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding-right: 22px;
}

.sd-stat + .sd-stat {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.sd-stat-num {
  font-family: var(--font-script);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
}

.sd-stat-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--ink-muted);
}

/* ============================================================================
   2) 榜单区
   ========================================================================== */
.sd-rank-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 12px 4px;
}

.sd-section-title {
  margin-bottom: 10px;
  padding-bottom: 4px;
  border-bottom: none;
}

.sd-section-title h2 {
  font-size: 30px;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* 本页 Toast：窄屏不超出视口 */
#sdToast.toast {
  max-width: calc(100vw - 32px);
  text-align: center;
  line-height: 1.4;
}

.sd-rank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sd-rank-arrows {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.sd-rank-arrow {
  width: 32px;
  height: 32px;
  padding: 0 0 2px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all .15s;
}

.sd-rank-arrow:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.sd-rank-arrow:active { transform: scale(.94); }

.sd-rank-tabs {
  display: inline-flex;
  gap: 4px;
  max-width: 100%;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(31, 41, 55, .05);
  overflow-x: auto;
  scrollbar-width: none;
}

.sd-rank-tabs::-webkit-scrollbar { display: none; }

.sd-rank-tab {
  flex: 0 0 auto;
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s;
}

.sd-rank-tab:hover { color: var(--accent-deep); background: var(--accent-soft); }

.sd-rank-tab.active {
  background: linear-gradient(135deg, var(--accent-deep), #1F1E1B);
  color: #fff;
  box-shadow: 0 4px 12px rgba(31, 30, 27, .32);
}

.sd-rank-scroller {
  margin: 0 -12px;
  padding: 2px 12px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.sd-rank-scroller::-webkit-scrollbar { display: none; }

.sd-rank-grid {
  display: flex;
  gap: 10px;
  width: max-content;
}

.sd-rank-card {
  position: relative;
  flex: 0 0 158px;
  width: 158px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: 0 2px 8px rgba(31, 41, 55, .05);
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform .18s var(--ease), box-shadow .18s, border-color .18s;
}

.sd-rank-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(31, 30, 27, .16);
}

.sd-rank-card:active { transform: scale(.98); }

.sd-rank-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(31, 41, 55, .22);
  font-variant-numeric: tabular-nums;
}

.sd-rank-badge.top1 { background: linear-gradient(135deg, #EEB53B, #D8891B); }
.sd-rank-badge.top2 { background: linear-gradient(135deg, #AEB9C4, #8696A5); }
.sd-rank-badge.top3 { background: linear-gradient(135deg, #C98A56, #A96B39); }

.sd-rank-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sd-rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.sd-rank-name {
  margin-top: 8px;
  min-height: 2.7em;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sd-rank-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 5px;
  min-height: 17px;
}

.sd-rank-label {
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 7px;
  background: #EAE5DB;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sd-rank-score {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
}

.sd-rank-score .star { color: #B9AA92; font-size: 11px; }
.sd-rank-score b { color: var(--ink); font-weight: 800; }

/* ============================================================================
   3) 分类导航（复用 .cat-row / .cat-chip）
   ========================================================================== */
.sd-cat-section { position: relative; z-index: 2; }

.sd-cat-chip .sd-chip-icon {
  width: 18px;
  height: 18px;
  object-fit: cover;
  /* 分类图标源图是 64×192 的竖向图标条（3 个图形叠一列），
     只取最上方一个，避免显示成一条竖图 */
  object-position: top center;
  display: inline-block;
  flex: 0 0 18px;
  border-radius: 4px;
}

.sd-chip-label { display: inline-block; }

/* 二级行：手机端左右滑动，不换行（.cat-row 已 overflow-x:auto） */
.sd-cat-section .cat-row-inner { padding-bottom: 1px; }

/* ============================================================================
   4) 产品列表头 / 排序 / 面包屑 / 空态
   ========================================================================== */
.sd-main {
  padding-top: 14px;
}

.sd-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
}

.sd-list-head .sd-section-title {
  flex: 1 1 auto;
  min-width: 0;
}

.sd-sort {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-bottom: 8px;
}

.sd-sort-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink-muted);
}

.sd-sort-chip {
  padding: 5px 12px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s;
}

.sd-sort-chip:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

.sd-sort-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-deep);
}

.sd-crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 2px 0 12px;
  font-size: 12px;
  color: var(--ink-muted);
}

.sd-crumb-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid #EDE8DE;
  color: var(--accent-deep);
  font-size: 11.5px;
  font-weight: 700;
}

.sd-crumb-chip button {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: rgba(31, 30, 27, .18);
  color: var(--accent-deep);
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.sd-crumb-chip button:hover { background: var(--accent-deep); color: #fff; }

.sd-crumb-clear {
  border: 1px dashed var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--ink-muted);
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.sd-crumb-clear:hover { border-color: var(--accent); color: var(--accent-deep); }

.sd-empty {
  padding: 54px 18px 60px;
  text-align: center;
  color: var(--ink-muted);
}

.sd-empty-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-warm));
  color: var(--accent-deep);
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sd-empty h3 {
  font-family: var(--font-script);
  font-size: 27px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.sd-empty p {
  font-size: 13px;
  margin-bottom: 18px;
}

.sd-empty-btn {
  max-width: 240px;
  margin: 0 auto;
  flex: 0 0 auto;
}

/* ============================================================================
   5) 产品卡（视觉对齐主站 .card，但不使用 .card 类，避免主站验收脚本计数干扰）
   ========================================================================== */
.sd-card {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: 0 2px 8px rgba(31, 41, 55, .05), 0 8px 22px rgba(31, 41, 55, .05);
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s cubic-bezier(.4, 0, .2, 1), box-shadow .2s ease, border-color .2s ease;
  content-visibility: auto;
  contain-intrinsic-size: 0 300px;
}

@media (hover: hover) {
  .sd-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 10px 24px rgba(31, 41, 55, .08), 0 18px 40px rgba(31, 30, 27, .16);
  }
}

.sd-card:active { transform: scale(.985); }

.sd-card .card-img-wrap {
  aspect-ratio: 1 / 1;
  background: #fff;
  border-bottom: 1px solid var(--line-soft);
}

.sd-card .card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0;
  transition: opacity .25s ease;
}

.sd-card .card-img.loaded { opacity: 1; }

.sd-card .card-actions { top: 7px; right: 7px; }

/* 主站 premium.css 只在 .card:hover 时显示心形；本页卡片用 .sd-card，
   这里补一份同样的 hover 行为，否则桌面端收藏心形会一直 opacity:0 */
@media (hover: hover) {
  .sd-card .card-action-btn.heart {
    opacity: 0;
    transform: translateY(-5px) scale(.92);
  }
  .sd-card:hover .card-action-btn.heart,
  .sd-card .card-action-btn.heart.active {
    opacity: 1;
    transform: none;
  }
}

.sd-card-info {
  padding: 9px 11px 11px;
}

.sd-card-name {
  margin: 0 0 3px;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.sd-card-path {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sd-card .card-tags {
  min-height: 18px;
  margin-bottom: 6px;
}

.sd-card .card-tag {
  background: #EAE5DB;
  border-color: transparent;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-soft);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sd-card-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 2px;
  padding-top: 7px;
  border-top: 1px dashed var(--line-soft);
}

.sd-card-quote {
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink-soft);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s;
}

.sd-card-quote:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-deep);
}

/* 图片加载失败时的兜底占位（由 sd.js 写入 data URI） */
.sd-card .card-img.is-fallback,
.sd-rank-thumb img.is-fallback,
.sd-detail-img.is-fallback {
  object-fit: contain;
  background: #EDE9E0;
}

/* ============================================================================
   6) 详情弹窗补充（复用 .modal / .modal-card / .modal-btn）
   ========================================================================== */
.sd-detail-card {
  max-width: 560px;
}

.sd-detail-imgwrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 22px;
  background: #fff;
  border-bottom: 1px solid var(--line-soft);
}

.sd-detail-img {
  display: block;
  max-width: 100%;
  max-height: 42vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
}

.sd-detail-info {
  padding: 18px 20px calc(env(safe-area-inset-bottom, 0) + 22px);
}

.sd-detail-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
}

.sd-detail-info h2 {
  margin: 3px 0 2px;
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--ink);
}

.sd-detail-info .product {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: none;
  color: var(--ink-soft);
}

.sd-detail-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.sd-detail-label {
  padding: 3px 9px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 11.5px;
  font-weight: 700;
}

.sd-detail-score {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.sd-detail-score .star { color: #B9AA92; }

.sd-detail-score .sd-score-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
}

.sd-detail-actions { margin-top: 16px; }

.sd-detail-actions .modal-btn { min-width: 0; }

.sd-wish-toggle {
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}

.sd-wish-toggle:hover { border-color: var(--accent); color: var(--accent-deep); }

.sd-wish-toggle.active {
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

/* ============================================================================
   7) 联系报价 / 收藏弹窗内容补充
   ========================================================================== */
.sd-contact-note {
  margin: 16px 2px 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-muted);
  text-align: center;
}

.sd-contact-prefill-wrap { margin-bottom: 16px; }

.sd-wish-list {
  margin: 4px 0 0;
  max-height: 52vh;
  overflow-y: auto;
  border-top: 1px solid var(--line-soft);
}

.sd-wish-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}

.sd-wish-thumb {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
  cursor: pointer;
  display: block;
}

.sd-wish-info {
  flex: 1 1 auto;
  min-width: 0;
  cursor: pointer;
}

.sd-wish-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sd-wish-meta {
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sd-wish-remove {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink-muted);
  font: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.sd-wish-remove:hover { border-color: var(--accent); color: var(--accent-deep); }

.sd-wish-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.sd-wish-actions .modal-btn { flex: 1; }

.sd-wish-empty {
  padding: 32px 12px 26px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.7;
}

.sd-wish-empty-icon {
  font-size: 30px;
  color: var(--line);
  margin-bottom: 6px;
}

/* 极简滚动条（弹窗内列表） */
.sd-wish-list::-webkit-scrollbar { width: 6px; }
.sd-wish-list::-webkit-scrollbar-thumb { background: #D5E2C2; border-radius: 99px; }

/* ============================================================================
   8) 数据缺失提示（sd-data.js 未就绪时）
   ========================================================================== */
.sd-data-missing {
  grid-column: 1 / -1;
  padding: 46px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.7;
}

.sd-data-missing b { color: var(--ink); }

/* ============================================================================
   9) 顶栏两个入口（返回图库 / 3D 预览）并排
   ========================================================================== */
.sd-entry-row {
  display: flex;
  gap: 10px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 12px 8px;
}

.sd-entry-row .preview-hub-link {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
}

.sd-entry-row .preview-hub-copy { flex: 1 1 auto; min-width: 0; }

.sd-entry-row .preview-hub-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sd-entry-row .preview-hub-sub { max-width: 100%; }

.sd-back-icon { font-size: 22px; padding-bottom: 2px; }

/* ============================================================================
   10) 响应式
   ========================================================================== */
@media (max-width: 719px) {
  .sd-entry-row { padding: 0 10px 7px; gap: 8px; }
}

@media (max-width: 640px) {
  .sd-hero { padding: 26px 14px 22px; }
  .sd-hero-title { font-size: clamp(34px, 9.5vw, 46px); margin: 12px 0 8px; }
  .sd-hero-sub { font-size: 13px; }
  .sd-hero-stats { margin-top: 18px; gap: 8px 0; }
  .sd-stat { padding-right: 14px; gap: 5px; }
  .sd-stat + .sd-stat { padding-left: 14px; }
  .sd-stat-num { font-size: 25px; }
  .sd-stat-label { font-size: 11px; }

  .sd-rank-section { padding: 14px 10px 2px; }
  .sd-rank-head { gap: 8px; }
  .sd-section-title h2 { font-size: 25px; }
  .sd-rank-arrows { display: none; } /* 手机端直接横滑 */
  .sd-rank-tabs { width: 100%; justify-content: space-between; padding: 3px; }
  .sd-rank-tab { flex: 1 1 0; padding: 7px 8px; text-align: center; }
  .sd-rank-scroller { margin: 0 -10px; padding: 2px 10px 8px; }
  .sd-rank-card { flex-basis: 146px; width: 146px; }
  .sd-rank-name { font-size: 12.5px; }

  .sd-main { padding: 8px 12px 90px; }
  .sd-list-head { gap: 6px; }
  .sd-sort { padding-bottom: 6px; }
  .sd-sort-label { font-size: 11px; }
  .sd-sort-chip { padding: 4px 10px; font-size: 11px; }

  .sd-detail-imgwrap { min-height: 180px; padding: 14px; }
  .sd-detail-img { max-height: 34vh; }
  .sd-detail-info { padding: 14px 16px calc(env(safe-area-inset-bottom, 0) + 18px); }
  .sd-detail-info h2 { font-size: 19px; }

  .sd-wish-actions { flex-wrap: wrap; }
  .sd-wish-list { max-height: 46vh; }
}

@media (max-width: 400px) {
  .sd-hero-stats { gap: 6px 0; }
  .sd-stat { padding-right: 10px; }
  .sd-stat + .sd-stat { padding-left: 10px; }
  .sd-stat-num { font-size: 22px; }
  .sd-stat-label { font-size: 10.5px; }
  .sd-card-name { font-size: 12.5px; }
  .sd-card .card-tag { font-size: 9.5px; padding: 2px 6px; }
  .sd-card-quote { padding: 4px 8px; font-size: 10.5px; }
}

/* 横向滑动时隐藏原生滚动条（榜单/分类行） */
.sd-cat-section .cat-row { scrollbar-width: none; }
.sd-cat-section .cat-row::-webkit-scrollbar { display: none; }

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .sd-rank-card,
  .sd-card,
  .sd-rank-tab,
  .sd-rank-arrow { transition: none; }
}
