:root {
  --primary: #1677ff;
  --primary-dark: #0d5fd6;
  --primary-light: #eaf3ff;
  --secondary: #4f6ef7;
  --bg: #eef2f8;
  --card-bg: #fff;
  --border: #eaedf5;
  --text: #1a1f2e;
  --text-muted: #8a94a8;
  --text-light: #b0b8cc;
  --radius: 16px;
  --shadow: 0 2px 12px rgba(45,80,155,.06);
  --shadow-hover: 0 12px 32px rgba(45,80,155,.14);
  --container: 1200px;
  --success: #00c48c;
  --danger: #f44056;
}

* { box-sizing: border-box; margin: 0; padding: 0; scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; }
html {
  scroll-behavior: smooth;
  height: 100%;
  /* 移动端横屏或窄屏时浏览器会自动放大正文，导致加载瞬间文字跳一下 */
  /* !important 用于压过微信内置浏览器注入到 body 上的行内缩放样式 */
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* 容器 */
.home-container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ===== 顶部导航 ===== */
.home-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,.04);
}
.home-header-inner {
  display: flex;
  align-items: center;
  height: 60px;
  gap: 24px;
}
.home-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}
.home-logo img { width: 36px; height: 36px; border-radius: 8px; object-fit: contain; }
.home-logo .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), #5fa5ff);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 18px;
}

.home-nav { display: flex; align-items: center; gap: 6px; }
.home-nav a {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-muted);
  transition: all .2s;
}
.home-nav a:hover { color: var(--primary); background: var(--primary-light); }
.home-nav .btn-login {
  background: var(--primary);
  color: #fff;
  padding: 7px 18px;
  border-radius: 8px;
  font-weight: 500;
}
.home-nav .btn-login:hover { background: var(--primary-dark); color: #fff; }

/* ===== Banner ===== */
.home-banner {
  background: linear-gradient(135deg, #1668e3 0%, #3b8bff 55%, #6db1ff 100%);
  padding: 56px 0 48px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.home-banner::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%);
}
.home-banner::after {
  content: '';
  position: absolute;
  bottom: -80px; left: 10%;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(255,255,255,.10), transparent 70%);
}
/* Banner 圆圈光晕：两个游走的柔光圆 + 三个漂浮的空心圆圈 */
.hb-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(14px);
  pointer-events: none;
}
.hb-orb-1 {
  left: -60px;
  top: -40px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,.34) 0%, rgba(255,255,255,.14) 50%, transparent 72%);
  animation: hbDrift1 22s ease-in-out infinite;
}
.hb-orb-2 {
  right: -50px;
  bottom: -80px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255,255,255,.26) 0%, rgba(255,255,255,.10) 50%, transparent 72%);
  animation: hbDrift2 27s ease-in-out infinite;
  animation-delay: -9s;
}
@keyframes hbDrift1 {
  0%   { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(28vw, 30px) scale(1.12); }
  50%  { transform: translate(52vw, -20px) scale(.92); }
  75%  { transform: translate(20vw, 50px) scale(1.06); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes hbDrift2 {
  0%   { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(-30vw, -40px) scale(1.1); }
  50%  { transform: translate(-56vw, 10px) scale(.94); }
  75%  { transform: translate(-18vw, -50px) scale(1.05); }
  100% { transform: translate(0, 0) scale(1); }
}
.hb-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.28);
  pointer-events: none;
  animation: hbFloat 6s ease-in-out infinite;
}
.hb-ring-1 { left: 12%; top: 18%; width: 26px; height: 26px; }
.hb-ring-2 { left: 46%; bottom: 16%; width: 40px; height: 40px; border-color: rgba(255,255,255,.18); animation-delay: -2.2s; }
.hb-ring-3 { right: 6%; top: 22%; width: 18px; height: 18px; border-color: rgba(255,224,130,.5); animation-delay: -4.1s; }
@keyframes hbFloat {
  0%, 100% { transform: translateY(0); opacity: .6; }
  50% { transform: translateY(-14px); opacity: 1; }
}

.banner-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 40px;
}
.banner-left { flex: 1; min-width: 0; }
.banner-content h1 { font-size: 36px; font-weight: 800; line-height: 1.2; margin-bottom: 12px; }
.banner-content h1 span { color: #ffd166; }
.banner-content p { font-size: 16px; color: rgba(255,255,255,.75); margin-bottom: 26px; }
.banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 30px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  font-size: 12.5px;
  color: rgba(255,255,255,.92);
  margin-bottom: 16px;
}
.banner-badge i { color: #ffd166; }

/* hero 主搜索框 */
.banner-search {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 560px;
  background: #fff;
  border-radius: 14px;
  padding: 6px 6px 6px 0;
  box-shadow: 0 14px 36px rgba(8, 50, 130, .28);
}
.banner-search .bs-icon {
  position: absolute;
  left: 18px;
  color: var(--text-light);
  font-size: 15px;
}
.banner-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: none;
  padding: 11px 12px 11px 46px;
  font-size: 15px;
  color: var(--text);
}
.banner-search button {
  flex-shrink: 0;
  border: none;
  border-radius: 10px;
  padding: 11px 26px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #5fa5ff);
  cursor: pointer;
  transition: filter .18s;
}
.banner-search button:hover { filter: brightness(1.08); }
.banner-hotwords {
  margin-top: 12px;
  font-size: 13px;
  color: rgba(255,255,255,.7);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.banner-hotwords a {
  padding: 3px 12px;
  border-radius: 20px;
  background: rgba(255,255,255,.13);
  color: rgba(255,255,255,.92);
  transition: background .18s;
}
.banner-hotwords a:hover { background: rgba(255,255,255,.26); color: #fff; }

/* hero 会员开通条 */
.banner-vip {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 9px 12px 9px 9px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 228, 158, .97), rgba(255, 190, 80, .95));
  box-shadow: 0 10px 26px rgba(140, 85, 10, .3);
  color: #5a3c0e;
  transition: transform .18s, box-shadow .18s;
}
.banner-vip:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(140, 85, 10, .38); color: #5a3c0e; }
.bvip-crown {
  width: 34px; height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(255,255,255,.6);
  color: #b45309;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.bvip-text { font-size: 13px; }
.bvip-text b { font-weight: 800; margin-right: 6px; }
.bvip-go {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  color: #d97706;
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 700;
}
.bvip-go i { font-size: 10px; }

/* hero 玻璃拟态视觉组 */
.banner-visual { position: relative; width: 430px; height: 370px; flex-shrink: 0; }
.bv-glow {
  position: absolute;
  inset: 8% 4%;
  background: radial-gradient(circle, rgba(255,255,255,.32), transparent 70%);
  filter: blur(34px);
  pointer-events: none;
}
.bv-doc {
  position: absolute;
  left: 36px; top: 26px;
  width: 272px;
  padding: 18px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(8, 50, 120, .35);
  animation: bvFloatDoc 8s ease-in-out infinite;
}
@keyframes bvFloatDoc {
  0%, 100% { transform: rotate(-5deg) translateY(0); }
  50%      { transform: rotate(-5deg) translateY(-10px); }
}
.bv-doc-bar { display: flex; gap: 6px; align-items: center; margin-bottom: 14px; }
.bv-doc-bar span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.55); }
.bv-doc-bar em {
  margin-left: auto;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  background: #ffd166;
  color: #7c4a03;
  padding: 2px 9px;
  border-radius: 6px;
}
.bv-doc-cover {
  height: 108px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.36), rgba(255,255,255,.12));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 34px;
  margin-bottom: 14px;
}
.bv-line { height: 9px; border-radius: 5px; background: rgba(255,255,255,.4); margin-bottom: 8px; }
.bv-w80 { width: 80%; } .bv-w60 { width: 60%; } .bv-w70 { width: 70%; margin-bottom: 0; }

.bv-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 14px 34px rgba(8, 50, 120, .3);
  animation: bvFloat 6.5s ease-in-out infinite;
}
@keyframes bvFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}
.bv-chip-1 { right: 4px; top: 36px; animation-delay: -1.6s; }
.bv-chip-2 { right: -8px; top: 178px; animation-delay: -3.5s; }
.bv-chip-3 { left: 8px; bottom: 8px; animation-delay: -5s; flex-direction: column; align-items: flex-start; gap: 3px; }
.bv-chip-ic {
  width: 36px; height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #eaf3ff;
  color: var(--primary);
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.bv-ic-green { background: #e6faf5; color: #00b386; }
.bv-chip-tx { display: flex; flex-direction: column; }
.bv-chip-tx b { font-size: 15px; font-weight: 800; color: var(--text); line-height: 1.3; }
.bv-chip-tx small { font-size: 11.5px; color: var(--text-muted); }
.bv-progress {
  display: block;
  width: 110px; height: 7px;
  border-radius: 4px;
  background: #e8eefb;
  overflow: hidden;
  margin-top: 6px;
}
.bv-progress i {
  display: block;
  height: 100%;
  width: 72%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), #5fa5ff);
}
.bv-stars { color: #f5a623; font-size: 13px; letter-spacing: 2px; }
.bv-chip-3 small { font-size: 11.5px; color: var(--text-muted); }

@media (max-width: 960px) {
  .banner-visual { display: none; }
  .banner-search { max-width: none; }
}

/* ===== 分类导航 ===== */
.home-cats {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 60px;
  z-index: 90;
}
.home-cats-inner {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 0 0 0;
  scrollbar-width: none;
}
.home-cats-inner::-webkit-scrollbar { display: none; }
.home-cat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all .2s;
}
.home-cat-item:hover { color: var(--primary); }
.home-cat-item.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.home-cat-item i { font-size: 15px; }

/* ===== 主内容区 ===== */
.home-main { padding: 28px 0 60px; }
.home-section { margin-bottom: 40px; }
.home-section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.home-section-title {
  font-size: 18px;
  font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.home-section-title::before {
  content: '';
  width: 4px; height: 18px;
  background: var(--primary);
  border-radius: 2px;
  display: block;
}
.home-section-more {
  font-size: 13px;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.home-section-more:hover { color: var(--primary); }

/* ===== 资料卡片 ===== */
.material-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.material-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
  cursor: pointer;
  display: block;
}
.material-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.material-card-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: var(--bg);
}
.material-card-cover-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #f0f2f8, #e8ecf4);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light);
  font-size: 36px;
}
.material-card-body { padding: 12px; }
.material-card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  min-height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  color: var(--text);
}
.material-card-author { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.material-card-footer { display: flex; align-items: center; justify-content: space-between; }
.material-card-price { font-size: 16px; font-weight: 700; color: var(--primary); }
.material-card-price .origin { font-size: 12px; color: var(--text-light); text-decoration: line-through; margin-left: 4px; font-weight: 400; }
.material-card-sales { font-size: 12px; color: var(--text-muted); }
.material-card-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 500;
}
.material-card-wrap { position: relative; }

/* ===== 资料详情页 ===== */
.detail-breadcrumb {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  white-space: nowrap;
}
.detail-breadcrumb a { color: var(--text-muted); flex-shrink: 0; }
.detail-breadcrumb a:hover { color: var(--primary); }
.detail-breadcrumb .sep { margin: 0 6px; flex-shrink: 0; }
.detail-breadcrumb .cur { color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.detail-layout { display: flex; gap: 28px; align-items: flex-start; }
.detail-main { flex: 1; min-width: 0; }
.detail-sidebar { width: 320px; flex-shrink: 0; }

.detail-cover-box {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.detail-cover-box img { width: 100%; display: block; }

.detail-info-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.detail-title { font-size: 22px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.detail-meta { display: flex; gap: 16px; font-size: 13px; color: var(--text-muted); margin-bottom: 14px; flex-wrap: wrap; }
.detail-meta span { display: flex; align-items: center; gap: 4px; }
.detail-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 18px; }
.detail-price .price { font-size: 32px; font-weight: 800; color: var(--primary); }
.detail-price .origin { font-size: 15px; color: var(--text-muted); text-decoration: line-through; }
.detail-price .label { font-size: 13px; color: var(--text-muted); }

/* 购买/下载按钮 */
.btn-buy {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), #5fa5ff);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity .2s, transform .1s;
  margin-bottom: 10px;
}
.btn-buy:hover { opacity: .92; }
.btn-buy:active { transform: scale(.98); }
.btn-download {
  width: 100%;
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity .2s;
  margin-bottom: 10px;
}
.btn-download:hover { opacity: .9; }
.btn-wechat {
  width: 100%;
  background: #fff;
  color: #07c160;
  border: 1.5px solid #07c160;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .2s;
}
.btn-wechat:hover { background: #07c160; color: #fff; }
.btn-cart {
  width: 100%;
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .2s;
  margin-bottom: 10px;
}
.btn-cart:hover { background: var(--primary-light); }
.detail-tips { font-size: 12px; color: var(--text-muted); margin-top: 12px; display: flex; gap: 16px; justify-content: center; }
.detail-tips span { display: flex; align-items: center; gap: 4px; }

/* 移动端吸底购买栏（≤860px 显示） */
.detail-buybar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 99;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0,0,0,.08);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  align-items: center;
  gap: 10px;
}
.buybar-price { flex: 1; font-size: 22px; font-weight: 800; color: var(--primary); }
.buybar-price .origin { font-size: 13px; color: var(--text-light); text-decoration: line-through; margin-left: 6px; font-weight: 400; }
.buybar-cart {
  width: 44px; height: 44px;
  background: #fff; color: var(--primary);
  border: 1.5px solid var(--primary); border-radius: 10px;
  font-size: 16px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.buybar-buy {
  background: linear-gradient(135deg, var(--primary), #5fa5ff);
  color: #fff; border: none; border-radius: 10px;
  padding: 12px 28px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  white-space: nowrap;
}
.buybar-buy.full { flex: 1; }
.buybar-buy.green { background: var(--success); }

/* 相关推荐 */
.related-list { display: flex; flex-direction: column; gap: 10px; }
.related-item {
  display: flex; gap: 10px; align-items: center;
  padding: 10px; border-radius: 12px;
  background: #f5f8fc;
  transition: all .2s;
}
.related-item:hover { background: var(--primary-light); }
.related-cover { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.related-cover-ph {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--primary-light), #ffe8e0);
  border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 16px;
}
.related-title {
  font-size: 13px; font-weight: 500; line-height: 1.5; margin-bottom: 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.related-price { font-size: 14px; font-weight: 700; color: var(--primary); }

/* 购物车徽章 */
.nav-cart { position: relative; padding: 7px 12px; border-radius: 8px; font-size: 16px; color: var(--text-muted); transition: all .2s; display: flex; align-items: center; }
.nav-cart:hover { color: var(--primary); background: var(--primary-light); }
.cart-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  background: var(--danger); color: #fff;
  border-radius: 8px; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px; line-height: 1; border: 1.5px solid #fff;
}

/* ===== 购物车页 ===== */
.cart-layout { width: 100%; }
.cart-page-title { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.cart-page-title i { color: var(--primary); }
.cart-count-text { font-size: 15px; font-weight: 400; color: var(--text-muted); }

/* 自定义复选框 */
.cart-check-wrap { display: flex; align-items: center; gap: 8px; cursor: pointer; flex-shrink: 0; user-select: none; }
.cart-check-wrap input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.cart-checkbox-icon {
  width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid var(--border); background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: all .18s; flex-shrink: 0;
}
.cart-check-wrap input:checked ~ .cart-checkbox-icon {
  background: var(--primary); border-color: var(--primary);
}
.cart-check-wrap input:checked ~ .cart-checkbox-icon::after {
  content: ''; width: 5px; height: 9px;
  border: 2px solid #fff; border-top: none; border-left: none;
  transform: rotate(45deg) translateY(-1px); display: block;
}

/* 表头 */
.cart-header {
  background: var(--card-bg); border-radius: var(--radius) var(--radius) 0 0;
  padding: 12px 20px; display: flex; align-items: center; gap: 16px;
  border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-muted);
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
}
.cart-header-name { flex: 1; }
.cart-header-price { width: 100px; text-align: right; }
.cart-header-op { width: 48px; text-align: center; }

/* 商品行 */
.cart-list { background: var(--card-bg); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cart-item { padding: 16px 20px; display: flex; gap: 14px; align-items: center; border-bottom: 1px solid var(--border); transition: background .15s; }
.cart-item:last-child { border-bottom: none; border-radius: 0 0 var(--radius) var(--radius); }
.cart-item:hover { background: var(--bg); }
.cart-item-cover { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.cart-item-cover-ph { width: 64px; height: 64px; background: var(--primary-light); border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 20px; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-title { font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .15s; }
.cart-item-title:hover { color: var(--primary); }
.cart-item-price { width: 100px; text-align: right; font-size: 18px; font-weight: 700; color: var(--primary); flex-shrink: 0; }
.cart-remove-btn { width: 48px; text-align: center; background: none; border: none; color: var(--text-light); cursor: pointer; font-size: 15px; padding: 6px; border-radius: 6px; transition: all .18s; flex-shrink: 0; }
.cart-remove-btn:hover { color: var(--danger); background: #fff0f1; }

/* 结算栏 */
.cart-bar {
  background: var(--card-bg); border-radius: var(--radius); padding: 14px 20px;
  box-shadow: 0 -2px 20px rgba(45,80,155,.1); margin-top: 12px;
  display: flex; align-items: center; gap: 16px;
  position: sticky; bottom: 16px;
}
.cart-bar-del { background: #f0f4fa; border: none; border-radius: 10px; padding: 8px 14px; font-size: 13px; color: var(--text-muted); cursor: pointer; transition: all .18s; }
.cart-bar-del:hover { background: #feeef0; color: var(--danger); }
.cart-bar-info { flex: 1; font-size: 14px; color: var(--text-muted); }
.cart-bar-info b { color: var(--text); }
.cart-total-num { font-size: 22px; font-weight: 800; color: var(--primary); }
.btn-checkout { background: var(--primary); color: #fff; border: none; border-radius: 10px; padding: 12px 32px; font-size: 15px; font-weight: 700; cursor: pointer; transition: all .2s; flex-shrink: 0; white-space: nowrap; }
.btn-checkout:hover { background: var(--primary-dark); }

/* 空购物车 */
.cart-empty { text-align: center; padding: 80px 0; color: var(--text-muted); background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); }
.cart-empty i { font-size: 56px; margin-bottom: 16px; color: var(--border); display: block; }
.cart-empty p { font-size: 15px; margin-bottom: 20px; }

@media (max-width: 600px) {
  .cart-header-price, .cart-header-op { display: none; }
  .cart-item-price { width: auto; font-size: 15px; }
  .cart-bar { flex-wrap: wrap; bottom: 0; border-radius: var(--radius) var(--radius) 0 0; }
  .cart-bar-del { display: none; }
}

/* 移动端下拉搜索条 */
.mobile-search-bar {
  display: none;
  background: #fff;
  padding: 10px 16px 14px;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,.07);
  position: sticky; top: 60px; z-index: 95;
}
.mobile-search-bar form { display: flex; gap: 0; }
.mobile-search-bar input {
  flex: 1; border: 1.5px solid var(--border); border-right: none;
  border-radius: 24px 0 0 24px; padding: 9px 16px; font-size: 14px;
  outline: none; background: var(--bg);
}
.mobile-search-bar input:focus { border-color: var(--primary); }
.mobile-search-bar button {
  background: var(--primary); color: #fff; border: none;
  border-radius: 0 24px 24px 0; padding: 9px 18px;
  font-size: 14px; cursor: pointer;
}
.mobile-search-bar.open { display: block; }

/* 详情内容区 */
.detail-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.detail-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.detail-section h3 i { color: var(--primary); }
.detail-desc { font-size: 14px; line-height: 1.8; color: #444; white-space: pre-line; }

/* 目录 */
.catalog-list { list-style: none; }
.catalog-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}
.catalog-list li:last-child { border-bottom: none; }
.catalog-list li .c-title { display: flex; align-items: center; gap: 8px; }
.catalog-list li .c-num { color: var(--text-muted); font-size: 12px; }
.catalog-list li .c-page { color: var(--text-muted); font-size: 12px; }

/* 试看预览 */
.preview-swiper { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.preview-swiper::-webkit-scrollbar { height: 4px; }
.preview-swiper::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.preview-img {
  flex-shrink: 0;
  width: 160px;
  height: 220px;
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: var(--shadow);
}
.preview-img img { width: 100%; height: 100%; display: block; object-fit: cover; }
.preview-watermark-tip {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  display: flex; align-items: center; gap: 4px;
}

/* 客服微信卡片 */
.wechat-card {
  background: linear-gradient(135deg, #07c160, #0ab557);
  border-radius: 10px;
  padding: 14px 16px;
  color: #fff;
  display: flex; align-items: center; gap: 12px;
  margin-top: 12px;
}
.wechat-card i { font-size: 28px; }
.wechat-card .label { font-size: 12px; opacity: .85; }
.wechat-card .id { font-size: 16px; font-weight: 700; letter-spacing: .02em; }

/* ===== 列表页 ===== */
.list-toolbar {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.list-sort-btn {
  padding: 7px 15px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  border: none;
  background: #f0f4fa;
  color: var(--text-muted);
  transition: all .2s;
}
.list-sort-btn.active, .list-sort-btn:hover { background: var(--primary); color: #fff; }

/* 分页 */
.home-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 28px; }
.home-pager a, .home-pager span {
  min-width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  font-size: 14px;
  border: none;
  background: var(--card-bg);
  box-shadow: 0 1px 4px rgba(45,80,155,.08);
  color: var(--text-muted);
  transition: all .2s;
  padding: 0 8px;
}
.home-pager a:hover { background: var(--primary-light); color: var(--primary); }
.home-pager .active { background: var(--primary); color: #fff; box-shadow: 0 4px 10px rgba(22,119,255,.25); }
.home-pager .disabled { opacity: .4; cursor: not-allowed; }

/* ===== 用户中心 ===== */
.user-layout { display: flex; gap: 24px; align-items: flex-start; padding-bottom: 40px; }
.user-sidebar { width: 220px; flex-shrink: 0; }
.user-main {
  flex: 1; min-width: 0;
  /* 静态光晕：右上淡蓝 + 左下微暖，打破纯白的单调 */
  background:
    radial-gradient(circle at 97% 0%, rgba(22, 119, 255, .14), transparent 36%),
    radial-gradient(circle at 0% 100%, rgba(240, 169, 60, .10), transparent 32%),
    var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.user-profile-card {
  background:
    radial-gradient(circle at 88% -10%, rgba(22, 119, 255, .16), transparent 58%),
    radial-gradient(circle at 0% 110%, rgba(95, 165, 255, .12), transparent 52%),
    var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  text-align: center;
}
.user-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  margin: 0 auto 10px;
  background: linear-gradient(135deg, var(--primary), #5fa5ff);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  color: #fff;
  font-weight: 700;
}
.user-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.user-phone { font-size: 13px; color: var(--text-muted); }
.user-nav-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(22, 119, 255, .11), transparent 60%),
    var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.user-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px;
  font-size: 14px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  transition: all .2s;
  cursor: pointer;
}

/* ===== 个人中心会员金卡 ===== */
.user-vip-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffe7b0 0%, #ffd27a 48%, #f5b64e 100%);
  box-shadow: 0 8px 22px rgba(240, 169, 60, .28);
}
.user-vip-card::after {
  content: '\f521'; /* fa-crown 水印 */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: -16px;
  bottom: -20px;
  font-size: 84px;
  color: rgba(255, 255, 255, .22);
  transform: rotate(-14deg);
  pointer-events: none;
}
/* 流光扫过 */
.uvc-shine {
  position: absolute;
  top: 0; left: -80%;
  width: 55%;
  height: 100%;
  background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,.45) 50%, transparent 100%);
  transform: skewX(-18deg);
  animation: uvcShine 5.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes uvcShine {
  0%, 55%, 100% { left: -80%; }
  75% { left: 130%; }
}
.uvc-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.uvc-chip {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 11px;
  background: rgba(255, 255, 255, .55);
  color: #b45309;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.uvc-name { flex: 1; min-width: 0; }
.uvc-name .t { font-size: 14.5px; font-weight: 800; color: #5a3c0e; line-height: 1.3; }
.uvc-name .s { font-size: 10px; font-weight: 600; letter-spacing: .14em; color: rgba(90, 60, 14, .5); white-space: nowrap; }
.uvc-badge {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .6);
  font-size: 11px;
  font-weight: 700;
  color: #7c4a03;
}
.uvc-line {
  position: relative;
  font-size: 12.5px;
  color: #7c4a03;
  margin-bottom: 12px;
}
.uvc-line b { font-weight: 800; color: #5a3c0e; }
.uvc-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 10px;
  padding: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: #d97706;
  background: #fff;
  box-shadow: 0 4px 12px rgba(150, 90, 20, .18);
  transition: transform .18s, box-shadow .18s;
}
.uvc-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(150, 90, 20, .26); color: #d97706; }
.uvc-btn i { font-size: 11px; }
.user-nav-item:last-child { border-bottom: none; }
.user-nav-item:hover, .user-nav-item.active { color: var(--primary); background: var(--primary-light); }
.user-nav-item i { width: 18px; text-align: center; }

/* 已购列表 */
.purchase-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  display: flex; gap: 14px; align-items: center;
}
.purchase-cover { width: 60px; height: 80px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.purchase-cover-ph {
  width: 60px; height: 80px;
  background: linear-gradient(135deg, #f0f2f8, #e8ecf4);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light);
  font-size: 22px;
  flex-shrink: 0;
}
.purchase-info { flex: 1; min-width: 0; }
.purchase-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.purchase-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.purchase-actions { display: flex; gap: 8px; }
.btn-sm { padding: 6px 14px; border-radius: 7px; font-size: 13px; cursor: pointer; border: none; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; transition: all .2s; }
.btn-sm-primary { background: var(--primary); color: #fff; }
.btn-sm-primary:hover { background: var(--primary-dark); }
.btn-sm-outline { background: none; border: 1px solid var(--border); color: var(--text-muted); }
.btn-sm-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm-green { background: var(--success); color: #fff; }
.btn-sm-green:hover { opacity: .9; }

/* ===== 登录弹窗 ===== */
.login-modal-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.login-modal-box {
  background: #fff;
  border-radius: 16px;
  width: 380px;
  max-width: calc(100vw - 32px);
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  animation: slideUp .25s;
  position: relative;
}
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.login-modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 16px;
}
.login-modal-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.login-modal-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.login-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.login-tab { flex: 1; text-align: center; padding: 10px; font-size: 14px; cursor: pointer; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all .2s; }
.login-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.login-form .field { margin-bottom: 14px; }
.login-form .field label { font-size: 13px; font-weight: 500; display: block; margin-bottom: 5px; }
.login-form .field input {
  width: 100%;
  border: 1.5px solid transparent;
  background: #f0f4fa;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px; outline: none;
  transition: border-color .2s;
}
.login-form .field input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(22,119,255,.1); }
.login-form .btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), #5fa5ff);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  transition: opacity .2s;
}
.login-form .btn-submit:hover { opacity: .9; }

/* ===== 支付页 ===== */
.pay-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  max-width: 520px;
  margin: 40px auto;
}
.pay-material-info { display: flex; gap: 14px; align-items: center; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.pay-material-info img { width: 56px; height: 75px; border-radius: 6px; object-fit: cover; }
.pay-material-info .name { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.pay-material-info .price { font-size: 20px; font-weight: 800; color: var(--primary); }
.pay-methods { display: flex; gap: 12px; margin-bottom: 24px; }
.pay-method {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
}
.pay-method.active { border-color: var(--primary); background: var(--primary-light); }
.pay-method i { font-size: 24px; display: block; margin-bottom: 4px; }
.pay-method.alipay i { color: #1677ff; }
.pay-method.wechat i { color: #07c160; }
.pay-method span { font-size: 13px; }
.btn-pay {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), #5fa5ff);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 16px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s;
}
.btn-pay:hover { opacity: .9; }

/* ===== Footer ===== */
/* Footer 小鱼跃水特效条 */
.footer-fish {
  position: relative;
  height: 110px;
  overflow: hidden;
  margin-bottom: -1px; /* 防止与 footer 之间出现细缝 */
}
.footer-fish canvas { display: block; }
@media (max-width: 640px) {
  .footer-fish { height: 80px; }
}

.home-footer {
  background: #1a1f2e;
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 24px 0;
  font-size: 13px;
}
.home-footer a { color: rgba(255,255,255,.5); }
.home-footer a:hover { color: #fff; }
.home-footer .icp { margin-top: 6px; font-size: 12px; }

/* ===== 返回顶部 ===== */
.back-to-top {
  position: fixed;
  right: 20px; bottom: 40px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: #fff;
  color: var(--text-muted);
  box-shadow: 0 4px 16px rgba(0,0,0,.14);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  z-index: 98;
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: all .25s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { color: var(--primary); }

/* ===== 空状态 ===== */
.home-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.home-empty i { font-size: 48px; display: block; margin-bottom: 12px; opacity: .35; }
.home-empty p { font-size: 15px; }

/* ===== 响应式 ===== */
@media (max-width: 1100px) {
  .material-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 860px) {
  .material-grid { grid-template-columns: repeat(3, 1fr); }
  .detail-layout { flex-direction: column; padding-bottom: 76px; }
  .detail-sidebar { width: 100%; }
  /* 详情页：隐藏封面卡和卡内购买区，改用吸底购买栏 */
  .detail-cover-box { display: none; }
  #buy-zone { display: none; }
  .detail-buybar { display: flex; }
  .back-to-top { bottom: 90px; }
  .user-layout { flex-direction: column; }
  .user-sidebar { width: 100%; }
  .user-main { width: 100%; padding: 16px; }
}
@media (max-width: 640px) {
  /* 导航：移动端使用图标展开搜索 */
  .nav-search-btn { display: flex !important; }
  .home-header-inner { gap: 4px; padding: 0 12px; }
  .home-nav { gap: 2px; }
  .home-nav a { padding: 7px 9px; }
  .nav-text { display: none !important; }
  .btn-login { font-size: 13px; padding: 7px 12px; white-space: nowrap; }
  /* 分类栏跟随 */
  .home-cats { top: 60px; }
}
@media (max-width: 600px) {
  .material-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  /* 卡片窄，价格和销量挤一行会折行导致卡片高度参差，改成上下两行 */
  .material-card-footer { flex-direction: column; align-items: flex-start; gap: 2px; }
  .material-card-price { font-size: 15px; }
  .material-card-sales { font-size: 11px; white-space: nowrap; }
  .home-banner { padding: 36px 0 32px; }
  .banner-content h1 { font-size: 24px; }
  .banner-stats { gap: 20px; }
  .banner-stat-num { font-size: 22px; }
  .cart-bar { flex-direction: column; align-items: stretch; text-align: center; }
}
/* 桌面端搜索图标按钮隐藏 */
.nav-search-btn { display: none; }

/* ===== 前台新版导航 ===== */
.home-primary-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.home-primary-nav a {
  position: relative;
  height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 0;
  color: #3d4557;
  font-size: 14px;
  font-weight: 600;
  transition: color .18s;
}
.home-primary-nav a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 3px;
  border-radius: 999px;
  background: #0b8f45;
  transform: translateX(-50%);
}
.home-primary-nav a:hover {
  color: #0b8f45;
  background: transparent;
}
.home-primary-nav a.active {
  color: #0b8f45;
  background: transparent;
  font-weight: 700;
}
.home-primary-nav a.active::after {
  width: 24px;
}
.home-nav { flex-shrink: 0; }

/* ===== 首页：场景路线版 ===== */
.scenario-home {
  --scene-green: #0b8f45;
  --scene-green-dark: #056333;
  --scene-green-soft: #eefaf3;
  --scene-blue: #2f74e6;
  --scene-blue-soft: #eef5ff;
  --scene-yellow: #f8b923;
  --scene-yellow-soft: #fff8e3;
  --scene-coral: #f16454;
  --scene-ink: #152033;
  --scene-muted: #687386;
  --scene-line: #e8edf2;
  background: #f7f9fb;
  color: var(--scene-ink);
}
.scenario-hero {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  background: #f4f7f3;
}
.scenario-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.scenario-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.88) 39%, rgba(255,255,255,.48) 63%, rgba(255,255,255,.06) 100%),
    linear-gradient(180deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.34) 100%);
}
.scenario-hero-inner {
  position: relative;
  z-index: 1;
  min-height: 390px;
  display: flex;
  align-items: center;
  padding-top: 44px;
  padding-bottom: 44px;
}
.scenario-hero-copy {
  width: min(690px, 100%);
}
.scenario-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(11, 143, 69, .18);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: var(--scene-green-dark);
  font-size: 13px;
  font-weight: 700;
}
.scenario-eyebrow i { color: var(--scene-green); }
.scenario-mobile-greeting { display: none; }
.scenario-hero h1 {
  font-size: 52px;
  line-height: 1.08;
  font-weight: 900;
  margin-bottom: 14px;
  color: var(--scene-ink);
}
.scenario-hero h1 span {
  color: var(--scene-green);
}
.scenario-hero p {
  width: min(560px, 100%);
  font-size: 16px;
  line-height: 1.8;
  color: #425066;
  margin-bottom: 24px;
}
.scenario-search {
  width: min(680px, 100%);
  display: flex;
  align-items: center;
  gap: 0;
  padding: 6px;
  border: 1px solid rgba(16, 44, 30, .08);
  border-radius: 8px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 18px 46px rgba(34, 74, 56, .16);
}
.scenario-search-type {
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border-right: 1px solid var(--scene-line);
  color: #38445a;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.scenario-search-type i { color: var(--scene-green); }
.scenario-search input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 15px;
  color: var(--scene-ink);
  font-size: 15px;
}
.scenario-search input::placeholder { color: #96a1b2; }
.scenario-search button {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: none;
  border-radius: 8px;
  padding: 0 22px;
  color: #fff;
  background: var(--scene-green);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background .18s, transform .12s;
}
.scenario-search button:hover { background: var(--scene-green-dark); }
.scenario-search button:active { transform: translateY(1px); }
.scenario-search input:focus-visible,
.scenario-search button:focus-visible,
.scenario-btn:focus-visible,
.scenario-card:focus-visible,
.scenario-category-strip a:focus-visible {
  outline: 3px solid rgba(47, 116, 230, .22);
  outline-offset: 2px;
}
.scenario-hotwords {
  width: min(680px, 100%);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
  color: #687386;
  font-size: 13px;
}
.scenario-hotwords span {
  color: #4d586c;
  font-weight: 700;
}
.scenario-hotwords a {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(20, 55, 35, .08);
  color: #4c576a;
  transition: color .18s, border-color .18s, background .18s;
}
.scenario-hotwords a:hover {
  color: var(--scene-green);
  border-color: rgba(11, 143, 69, .24);
  background: #fff;
}
.scenario-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.scenario-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 10px 17px;
  font-size: 14px;
  font-weight: 800;
  transition: transform .18s, box-shadow .18s, background .18s;
}
.scenario-btn:hover { transform: translateY(-1px); }
.scenario-btn.primary {
  background: var(--scene-ink);
  color: #fff;
  box-shadow: 0 12px 26px rgba(21, 32, 51, .16);
}
.scenario-btn.primary:hover { color: #fff; background: #0d1728; }
.scenario-btn.vip {
  background: var(--scene-yellow-soft);
  color: #7c5500;
  border: 1px solid rgba(248, 185, 35, .34);
}
.scenario-btn.vip i { color: #d99500; }

.scenario-routes {
  padding: 28px 0 18px;
  background: #fff;
  border-bottom: 1px solid var(--scene-line);
}
.scenario-section-head,
.scenario-product-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}
.scenario-kicker {
  color: var(--scene-green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 2px;
}
.scenario-section-head h2,
.scenario-product-head h2 {
  font-size: 25px;
  line-height: 1.25;
  font-weight: 900;
  color: var(--scene-ink);
}
.scenario-section-head p,
.scenario-product-head p {
  flex: 1;
  color: var(--scene-muted);
  font-size: 14px;
}
.scenario-scroll-controls {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.scenario-scroll-controls button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--scene-line);
  border-radius: 50%;
  color: #687386;
  background: #fff;
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
}
.scenario-scroll-controls button:hover {
  color: var(--scene-green);
  border-color: rgba(11, 143, 69, .28);
  background: var(--scene-green-soft);
}
.scenario-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 2px 1px 14px;
  scroll-snap-type: x proximity;
}
.scenario-card {
  min-width: 190px;
  flex: 0 0 190px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 142px;
  padding: 18px 18px 14px;
  border: 1px solid var(--scene-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(32, 49, 73, .07);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.scenario-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(32, 49, 73, .12);
  border-color: rgba(11, 143, 69, .22);
}
.scenario-card-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border-radius: 8px;
  font-size: 22px;
  background: var(--scene-green-soft);
  color: var(--scene-green);
}
.scenario-card.yellow .scenario-card-icon { background: var(--scene-yellow-soft); color: #d99500; }
.scenario-card.blue .scenario-card-icon { background: var(--scene-blue-soft); color: var(--scene-blue); }
.scenario-card.lime .scenario-card-icon { background: #eefbe5; color: #6abf26; }
.scenario-card.violet .scenario-card-icon { background: #f4efff; color: #7c57e6; }
.scenario-card.orange .scenario-card-icon { background: #fff3eb; color: #ee8427; }
.scenario-card b {
  color: var(--scene-ink);
  font-size: 18px;
  line-height: 1.35;
  margin-bottom: 5px;
}
.scenario-card small {
  min-height: 32px;
  color: var(--scene-muted);
  font-size: 13px;
  line-height: 1.45;
}
.scenario-card em {
  margin-top: auto;
  font-style: normal;
  color: #2d3b4f;
  font-size: 13px;
  font-weight: 800;
}
.scenario-card em i { margin-left: 3px; font-size: 11px; }
.scenario-card:hover em { color: var(--scene-green); }

.scenario-category-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--scene-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(32, 49, 73, .06);
  overflow: hidden;
}
.scenario-category-strip a {
  min-height: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #2f3a4d;
  font-size: 13px;
  font-weight: 700;
  border-right: 1px solid var(--scene-line);
  transition: color .18s, background .18s;
}
.scenario-category-strip a:last-child { border-right: none; }
.scenario-category-strip a i {
  color: var(--scene-green);
  font-size: 18px;
}
.scenario-category-strip a:hover {
  color: var(--scene-green);
  background: #f8fcfa;
}

.scenario-main {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 32px 0 54px;
  background: #f6f8fb;
}
.scenario-main::before,
.scenario-main::after {
  position: absolute;
  z-index: 0;
  content: '';
  pointer-events: none;
}
.scenario-main::before {
  width: 230px;
  height: 230px;
  top: 94px;
  left: max(-118px, calc((100vw - var(--container)) / 2 - 208px));
  border: 1px solid rgba(47, 116, 230, .16);
  border-radius: 8px;
  background: rgba(238, 245, 255, .5);
  transform: rotate(18deg);
  animation: scenario-geometry-drift-left 4.8s ease-in-out infinite alternate;
}
.scenario-main::after {
  width: 280px;
  height: 196px;
  right: max(-126px, calc((100vw - var(--container)) / 2 - 224px));
  bottom: 78px;
  border: 1px solid rgba(11, 143, 69, .15);
  border-radius: 8px;
  background: rgba(238, 250, 243, .58);
  transform: rotate(-14deg);
  animation: scenario-geometry-drift-right 5.8s ease-in-out infinite alternate;
}
.scenario-main > .home-container { position: relative; z-index: 1; }
.scenario-geometry {
  position: absolute;
  z-index: 0;
  display: block;
  pointer-events: none;
}
.scenario-geometry-three {
  width: 128px;
  height: 104px;
  top: 42%;
  right: max(-42px, calc((100vw - var(--container)) / 2 - 108px));
  border: 1px solid rgba(241, 100, 84, .2);
  border-radius: 7px;
  background: rgba(255, 244, 239, .66);
  clip-path: polygon(18% 0, 100% 0, 100% 74%, 80% 100%, 0 100%, 0 20%);
  animation: scenario-geometry-float-up 4.2s ease-in-out infinite alternate;
}
.scenario-geometry-four {
  width: 128px;
  height: 128px;
  bottom: 12%;
  left: max(-46px, calc((100vw - var(--container)) / 2 - 120px));
  border: 1px solid rgba(248, 185, 35, .25);
  border-radius: 8px;
  background: rgba(255, 248, 227, .72);
  transform: rotate(45deg);
  animation: scenario-geometry-float-down 5.1s ease-in-out infinite alternate;
}
@keyframes scenario-geometry-drift-left {
  from { transform: translate3d(0, 0, 0) rotate(18deg); }
  to { transform: translate3d(32px, -22px, 0) rotate(26deg); }
}
@keyframes scenario-geometry-drift-right {
  from { transform: translate3d(0, 0, 0) rotate(-14deg); }
  to { transform: translate3d(-28px, 24px, 0) rotate(-21deg); }
}
@keyframes scenario-geometry-float-up {
  from { transform: translate3d(0, 0, 0) rotate(0); }
  to { transform: translate3d(-20px, -30px, 0) rotate(12deg); }
}
@keyframes scenario-geometry-float-down {
  from { transform: translate3d(0, 0, 0) rotate(45deg); }
  to { transform: translate3d(24px, 28px, 0) rotate(56deg); }
}
@media (prefers-reduced-motion: reduce) {
  html:not(.motion-force) .scenario-main::before,
  html:not(.motion-force) .scenario-main::after,
  html:not(.motion-force) .scenario-geometry { animation: none; }
}
.scenario-product-section {
  margin-bottom: 34px;
}
.scenario-product-head {
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.scenario-product-head h2 { flex: 0 0 auto; margin: 0; }
.scenario-product-line {
  height: 1px;
  flex: 1;
  margin-top: 5px;
  background: var(--scene-line);
}
.scenario-product-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #687386;
  font-size: 13px;
  font-weight: 700;
}
.scenario-product-more:hover { color: var(--scene-green); }
.scenario-material-grid .material-card {
  border-radius: 8px;
  border: 1px solid rgba(232, 237, 242, .78);
  box-shadow: 0 10px 28px rgba(32, 49, 73, .06);
}
.scenario-material-grid .material-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(32, 49, 73, .12);
}
.scenario-material-grid .material-card-body { padding: 11px; }
.scenario-material-grid .material-card-title { color: var(--scene-ink); }
.scenario-material-grid .material-card-price { color: #ef4f3d; }
.scenario-material-grid .material-card-badge,
.scenario-home .material-card-badge {
  background: var(--scene-green);
}

.scenario-vip-band {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 28px 0 24px;
  padding: 26px 34px;
  border-radius: 8px;
  background:
    linear-gradient(100deg, #0b5236 0%, #06633a 50%, #033421 100%);
  color: #fff;
  box-shadow: 0 20px 42px rgba(5, 77, 47, .18);
}
.scenario-vip-crown {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #7b4c00;
  background: linear-gradient(145deg, #ffe17a, #f3ad21);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), 0 12px 28px rgba(248, 185, 35, .28);
  font-size: 32px;
}
.scenario-vip-copy { flex: 1; min-width: 0; }
.scenario-vip-title-mobile { display: none; }
.scenario-vip-copy h2 {
  font-size: 24px;
  line-height: 1.35;
  font-weight: 900;
  margin-bottom: 6px;
}
.scenario-vip-copy p {
  color: rgba(255,255,255,.74);
  font-size: 14px;
}
.scenario-vip-btn {
  min-height: 48px;
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 999px;
  padding: 10px 34px;
  color: #533600;
  background: linear-gradient(145deg, #ffe58c, #ffc94d);
  font-size: 16px;
  font-weight: 900;
}
.scenario-vip-btn:hover { color: #533600; filter: brightness(1.03); }
.scenario-vip-btn span {
  font-size: 12px;
  font-weight: 700;
  color: rgba(83, 54, 0, .72);
}

.scenario-trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--scene-line);
  border-bottom: 1px solid var(--scene-line);
  background: rgba(255,255,255,.7);
}
.scenario-trust-strip div {
  min-height: 96px;
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 12px;
  padding: 18px 24px;
  border-right: 1px solid var(--scene-line);
}
.scenario-trust-strip div:last-child { border-right: none; }
.scenario-trust-strip i {
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--scene-green);
  font-size: 24px;
}
.scenario-trust-strip b {
  color: var(--scene-ink);
  font-size: 15px;
  line-height: 1.35;
}
.scenario-trust-strip span {
  color: var(--scene-muted);
  font-size: 12px;
}
.scenario-empty {
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--scene-line);
}

@media (max-width: 1180px) {
  .home-header-inner { gap: 12px; }
  .home-primary-nav a { padding: 0 9px; }
}
@media (max-width: 1060px) {
  .home-primary-nav { display: none; }
  .home-nav { margin-left: auto; }
  .scenario-category-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .scenario-category-strip a:nth-child(4n) { border-right: none; }
  .scenario-category-strip a:nth-child(n+5) { border-top: 1px solid var(--scene-line); }
  .scenario-hero-overlay {
    background:
      linear-gradient(90deg, rgba(255,255,255,.99) 0%, rgba(255,255,255,.94) 55%, rgba(255,255,255,.4) 100%),
      linear-gradient(180deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,.86) 100%);
  }
}
@media (max-width: 760px) {
  .scenario-main::before,
  .scenario-main::after,
  .scenario-geometry { display: none; }
  .scenario-hero {
    min-height: 0;
    background: #fff;
    border-bottom: 1px solid var(--scene-line);
  }
  .scenario-hero-img,
  .scenario-hero-overlay { display: none; }
  .scenario-hero-inner {
    min-height: 0;
    align-items: flex-start;
    padding: 22px 16px 20px;
  }
  .scenario-eyebrow,
  .scenario-hero p,
  .scenario-hotwords,
  .scenario-btn.vip { display: none; }
  .scenario-mobile-greeting {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 14px;
    padding: 7px 10px;
    border: 1px solid rgba(11, 143, 69, .14);
    border-radius: 8px;
    background: var(--scene-green-soft);
    color: var(--scene-ink);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.4;
    white-space: nowrap;
  }
  .scenario-mobile-greeting i { color: var(--scene-green); }
  .scenario-hero h1 {
    display: none;
  }
  .scenario-search {
    display: flex;
    align-items: center;
    height: 56px;
    gap: 0;
    padding: 6px 7px 6px 14px;
  }
  .scenario-search-type { display: none; }
  .scenario-search input {
    height: 42px;
    padding: 0;
    font-size: 14px;
  }
  .scenario-search button {
    width: 44px;
    flex: 0 0 44px;
    padding: 0;
    font-size: 0;
  }
  .scenario-search button i { font-size: 16px; }
  .scenario-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 10px;
  }
  .scenario-btn.primary { min-height: 48px; }
  .scenario-routes {
    padding: 26px 0 22px;
  }
  .scenario-section-head,
  .scenario-product-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .scenario-routes .scenario-section-head {
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    text-align: center;
  }
  .scenario-routes .scenario-kicker,
  .scenario-routes .scenario-section-head p { display: none; }
  .scenario-routes .scenario-section-head h2 {
    font-size: 23px;
    line-height: 1.3;
  }
  .scenario-scroll-controls {
    display: none;
  }
  .scenario-track {
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .scenario-card {
    min-width: 184px;
    min-height: 154px;
  }
  .scenario-category-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .scenario-category-strip a {
    min-height: 82px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    font-size: 14px;
    text-align: center;
  }
  .scenario-category-strip a i { font-size: 20px; }
  .scenario-category-strip a:nth-child(2n) { border-right: none; }
  .scenario-category-strip a:nth-child(n+3) { border-top: 1px solid var(--scene-line); }
  .scenario-main { padding-top: 30px; }
  .scenario-product-section { margin-bottom: 42px; }
  .scenario-product-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 0;
    text-align: left;
  }
  .scenario-product-head h2 { font-size: 21px; }
  .scenario-product-head .scenario-product-more {
    color: var(--scene-green-dark);
    font-size: 12px;
  }
  .scenario-product-head h2,
  .scenario-section-head h2 {
    font-size: 22px;
  }
  .scenario-vip-band {
    align-items: center;
    flex-direction: row;
    gap: 12px;
    margin: 28px 0 16px;
    padding: 16px;
  }
  .scenario-vip-crown {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    box-shadow: none;
    font-size: 20px;
  }
  .scenario-vip-title-desktop { display: none; }
  .scenario-vip-title-mobile { display: inline; }
  .scenario-vip-copy h2 {
    margin-bottom: 0;
    font-size: 16px;
    line-height: 1.35;
  }
  .scenario-vip-copy p { display: none; }
  .scenario-vip-btn {
    width: auto;
    min-height: 38px;
    flex-direction: row;
    padding: 0 12px;
    font-size: 14px;
  }
  .scenario-vip-btn span { display: none; }
  .scenario-trust-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 4px;
    border: 1px solid var(--scene-line);
    border-radius: 8px;
    overflow: hidden;
  }
  .scenario-trust-strip div {
    min-height: 76px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px;
    border-right: 1px solid var(--scene-line);
    border-bottom: 1px solid var(--scene-line);
    text-align: center;
  }
  .scenario-trust-strip div:nth-child(2n) { border-right: none; }
  .scenario-trust-strip div:nth-child(n+3) { border-bottom: none; }
  .scenario-trust-strip i {
    color: var(--scene-green);
    font-size: 19px;
  }
  .scenario-trust-strip b { font-size: 13px; }
  .scenario-trust-strip span { display: none; }
}
@media (max-width: 420px) {
  .scenario-mobile-greeting { font-size: 16px; }
  .scenario-hero h1 { font-size: 32px; }
  .scenario-card { min-width: 174px; }
  .scenario-hotwords a { padding: 4px 8px; }
}

/* ===== 资料库列表页 ===== */
.library-page {
  --library-green: #0b8f45;
  --library-green-dark: #056333;
  --library-green-soft: #eefaf3;
  --library-blue: #2f74e6;
  --library-blue-soft: #eef5ff;
  --library-yellow: #f8b923;
  --library-ink: #152033;
  --library-muted: #687386;
  --library-line: #e8edf2;
  background: #f7f9fb;
  min-height: 100%;
}
.library-hero {
  background:
    linear-gradient(90deg, rgba(255,255,255,.98), rgba(255,255,255,.82)),
    url('/static/img/home-teaching-geometry-hero-v1.jpg') center right / cover no-repeat;
  border-bottom: 1px solid var(--library-line);
}
.library-hero-inner {
  min-height: 260px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 34px;
  align-items: center;
  padding-top: 34px;
  padding-bottom: 34px;
}
.library-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(11, 143, 69, .18);
  color: var(--library-green-dark);
  font-size: 13px;
  font-weight: 800;
}
.library-copy h1 {
  max-width: 720px;
  color: var(--library-ink);
  font-size: 38px;
  line-height: 1.2;
  font-weight: 900;
  margin-bottom: 12px;
}
.library-copy p {
  max-width: 620px;
  color: #4b586d;
  font-size: 15px;
  line-height: 1.8;
}
.library-search {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 92px;
  align-items: center;
  height: 58px;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid rgba(16, 44, 30, .08);
  background: rgba(255,255,255,.96);
  box-shadow: 0 18px 44px rgba(32, 49, 73, .12);
}
.library-search i {
  color: var(--library-green);
  text-align: center;
}
.library-search input {
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--library-ink);
  font-size: 15px;
}
.library-search input::placeholder { color: #96a1b2; }
.library-search button {
  height: 46px;
  border: none;
  border-radius: 8px;
  background: var(--library-green);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.library-search button:hover { background: var(--library-green-dark); }
.library-filter-band {
  background: #fff;
  border-bottom: 1px solid var(--library-line);
}
.library-cats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 10px;
  padding: 18px 0;
}
.library-cat {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid var(--library-line);
  border-radius: 8px;
  background: #fff;
  color: #2f3a4d;
  font-size: 14px;
  font-weight: 700;
  transition: color .18s, background .18s, border-color .18s, box-shadow .18s, transform .18s;
}
.library-cat i {
  color: var(--library-green);
  font-size: 16px;
}
.library-cat:hover,
.library-cat.active {
  color: var(--library-green);
  border-color: rgba(11, 143, 69, .24);
  background: var(--library-green-soft);
  box-shadow: 0 10px 22px rgba(11, 143, 69, .07);
}
.library-cat:hover { transform: translateY(-1px); }
.library-main {
  padding: 24px 0 58px;
}
.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--library-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(32, 49, 73, .06);
}
.library-result {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--library-muted);
  font-size: 14px;
}
.library-result b {
  color: var(--library-ink);
  font-size: 24px;
  font-weight: 900;
}
.library-sort {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.library-sort a {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border-radius: 999px;
  background: #f2f5f8;
  color: #5d687a;
  font-size: 13px;
  font-weight: 800;
  transition: color .18s, background .18s;
}
.library-sort a:hover,
.library-sort a.active {
  background: var(--library-green);
  color: #fff;
}
.library-grid .material-card {
  border-radius: 8px;
  border: 1px solid rgba(232, 237, 242, .82);
  box-shadow: 0 10px 28px rgba(32, 49, 73, .06);
}
.library-grid .material-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(32, 49, 73, .12);
}
.library-grid .material-card-price { color: #ef4f3d; }
.library-empty {
  background: #fff;
  border: 1px solid var(--library-line);
  border-radius: 8px;
}
.library-empty a { color: var(--library-green); font-weight: 800; }

@media (max-width: 860px) {
  .library-hero-inner {
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: 0;
  }
  .library-copy h1 { font-size: 30px; }
  .library-search { max-width: none; }
  .library-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 560px) {
  .library-hero {
    background:
      linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.88)),
      url('/static/img/home-teaching-geometry-hero-v1.jpg') 68% bottom / auto 58% no-repeat;
  }
  .library-hero-inner {
    padding: 26px 16px 160px;
  }
  .library-copy h1 { font-size: 27px; }
  .library-copy p { font-size: 14px; line-height: 1.7; }
  .library-search {
    grid-template-columns: 34px minmax(0, 1fr);
    height: auto;
    padding: 10px;
    row-gap: 9px;
  }
  .library-search button {
    grid-column: 1 / -1;
    width: 100%;
  }
  .library-cats {
    display: flex;
    overflow-x: auto;
    padding: 14px 0;
  }
  .library-cat {
    flex: 0 0 auto;
    min-width: 122px;
  }
  .library-sort {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .library-sort a {
    justify-content: center;
    padding: 0 8px;
  }
}

/* ===== 资料详情页新版视觉 ===== */
.detail-page {
  --detail-green: #0b8f45;
  --detail-green-dark: #056333;
  --detail-green-soft: #eefaf3;
  --detail-blue: #2f74e6;
  --detail-yellow-soft: #fff8e3;
  --detail-ink: #152033;
  --detail-muted: #687386;
  --detail-line: #e8edf2;
  padding: 24px 0 58px;
  background:
    linear-gradient(180deg, #f7f9fb 0%, #fff 46%, #f7f9fb 100%);
}
.detail-page .detail-breadcrumb {
  margin-bottom: 18px;
  padding: 10px 0;
}
.detail-page .detail-breadcrumb a:hover {
  color: var(--detail-green);
}
.detail-page .detail-layout {
  gap: 24px;
}
.detail-page .detail-info-card,
.detail-page .detail-section,
.detail-page .detail-cover-box {
  border: 1px solid var(--detail-line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(32, 49, 73, .06);
}
.detail-page .detail-info-card {
  padding: 28px;
  background:
    linear-gradient(110deg, rgba(255,255,255,.98), rgba(255,255,255,.92)),
    url('/static/img/home-teaching-geometry-hero-v1.jpg') center right / cover no-repeat;
}
.detail-page .detail-title {
  max-width: 760px;
  color: var(--detail-ink);
  font-size: 30px;
  line-height: 1.35;
  font-weight: 900;
  margin-bottom: 12px;
}
.detail-page .detail-meta {
  gap: 10px;
  margin-bottom: 16px;
}
.detail-page .detail-meta span {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(232, 237, 242, .9);
  color: #586477;
}
.detail-page .detail-meta i {
  color: var(--detail-green);
}
.detail-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.detail-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--detail-green-soft);
  color: var(--detail-green);
  font-size: 12px;
  font-weight: 800;
}
.detail-page .detail-price {
  align-items: center;
  gap: 10px;
  margin: 18px 0 20px;
  padding: 16px 18px;
  border-radius: 8px;
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(232, 237, 242, .9);
}
.detail-page .detail-price .label {
  color: var(--detail-muted);
  font-size: 13px;
  font-weight: 800;
}
.detail-page .detail-price .price {
  color: #ef4f3d;
  font-size: 34px;
  font-weight: 900;
}
.detail-page .btn-buy {
  border-radius: 8px;
  background: var(--detail-green);
  box-shadow: 0 12px 26px rgba(11, 143, 69, .18);
}
.detail-page .btn-buy:hover {
  background: var(--detail-green-dark);
  opacity: 1;
}
.detail-page .btn-cart {
  border-radius: 8px;
  color: var(--detail-green);
  border-color: rgba(11, 143, 69, .38);
}
.detail-page .btn-cart:hover {
  background: var(--detail-green-soft);
}
.detail-page .detail-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 172px;
  gap: 12px;
  margin-bottom: 12px;
}
.detail-page .detail-actions .btn-buy,
.detail-page .detail-actions .btn-cart {
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 12px 16px;
}
.detail-page .detail-actions .btn-buy { font-size: 16px; }
.detail-page .detail-actions .btn-cart {
  border-color: rgba(11, 143, 69, .24);
  background: #fff;
  font-size: 14px;
}
.detail-page .detail-actions .btn-cart:hover {
  border-color: rgba(11, 143, 69, .42);
  background: var(--detail-green-soft);
}
.detail-page .btn-download {
  border-radius: 8px;
  background: var(--detail-green);
}
.detail-page .detail-tips {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.detail-page .detail-tips i {
  color: var(--detail-green);
}
.detail-page .detail-section {
  padding: 22px;
  background: #fff;
}
.detail-page .detail-section h3 {
  border-bottom-color: var(--detail-line);
}
.detail-page .detail-section h3 i {
  color: var(--detail-green);
}
.detail-summary-box {
  padding: 13px 15px;
  margin-bottom: 14px;
  border-radius: 8px;
  border: 1px solid rgba(11, 143, 69, .16);
  background: var(--detail-green-soft);
  color: #294635;
  font-size: 14px;
  line-height: 1.8;
}
.detail-page .detail-desc {
  color: #3f4a5d;
}
.detail-page .catalog-list .c-num {
  min-width: 24px;
  color: var(--detail-green);
  font-weight: 800;
}
.detail-page .detail-cover-box {
  overflow: hidden;
  background: #fff;
}
.detail-page .detail-cover-box img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.detail-side-card {
  margin-bottom: 0;
}
.detail-facts {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-size: 13px;
}
.detail-facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--detail-line);
}
.detail-facts div:last-child {
  border-bottom: none;
}
.detail-facts span {
  color: var(--detail-muted);
}
.detail-facts b {
  color: var(--detail-ink);
  font-weight: 800;
  text-align: right;
}
.detail-page .wechat-card {
  border-radius: 8px;
  background: linear-gradient(135deg, var(--detail-green), #0aa45a);
}
.detail-page .related-item {
  border-radius: 8px;
  background: #f8fbfa;
}
.detail-page .related-item:hover {
  background: var(--detail-green-soft);
}
.detail-page .related-price {
  color: #ef4f3d;
}
.detail-page .related-cover {
  border-radius: 8px;
  object-fit: cover;
}
.detail-buybar {
  border-top-color: var(--detail-line, #e8edf2);
}
.detail-buybar .buybar-price {
  color: #ef4f3d;
}
.detail-buybar .buybar-cart {
  color: #0b8f45;
  border-color: rgba(11, 143, 69, .42);
  border-radius: 8px;
}
.detail-buybar .buybar-buy {
  background: #0b8f45;
  border-radius: 8px;
}
.detail-buybar .buybar-buy.green {
  background: #0b8f45;
}

@media (max-width: 860px) {
  .detail-page {
    padding: 16px 0 34px;
  }
  .detail-page .detail-info-card,
  .detail-page .detail-section {
    padding: 18px;
  }
  .detail-page .detail-title {
    font-size: 24px;
  }
  .detail-page .detail-price {
    padding: 13px 14px;
  }
}
@media (max-width: 560px) {
  .detail-page .detail-breadcrumb {
    font-size: 12px;
  }
  .detail-page .detail-info-card {
    background:
      linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.92)),
      url('/static/img/home-teaching-geometry-hero-v1.jpg') 70% bottom / auto 54% no-repeat;
  }
  /* 作者/分类/浏览/已购这几个胶囊按内容宽度排，挤得下就同行，不要each占一整行 */
  .detail-page .detail-meta {
    gap: 8px;
  }
  .detail-page .detail-meta span {
    font-size: 12px;
    min-height: 26px;
    padding: 4px 9px;
  }
  .detail-page .detail-price .price {
    font-size: 30px;
  }
  .detail-page .detail-tips {
    justify-content: center;
  }
}

[v-cloak] { display: none; }

/* 移动端表单：字号必须 ≥16px，否则 iOS 聚焦输入框时会强制放大整个页面 */
@media (max-width: 768px) {
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="search"],
  textarea,
  select,
  .banner-search input,
  .mobile-search-bar input,
  .login-form .field input,
  .scenario-search input,
  .library-search input {
    font-size: 16px;
  }
}

/* ===== 支付弹窗 ===== */
.paym-mask {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 20px;
}
.paym-box {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .18);
  overflow: hidden;
}
.paym-head {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 15px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.paym-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px 8px;
}
.paym-close:hover { color: var(--text); }

.paym-body { padding: 18px 20px 4px; }
.paym-loading { padding: 40px 0; text-align: center; color: var(--text-muted); font-size: 14px; }

.paym-waiting { padding: 32px 0 24px; text-align: center; }
.paym-waiting-icon {
  font-size: 34px;
  color: var(--primary);
  background: var(--primary-light);
  width: 68px;
  height: 68px;
  line-height: 68px;
  border-radius: 50%;
  margin-bottom: 16px;
}
.paym-waiting-title { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.paym-waiting-sub { font-size: 13.5px; color: var(--text-muted); margin: 0 0 14px; }
.paym-waiting-tip { font-size: 12.5px; color: var(--text-muted); margin: 0; opacity: .8; }

.paym-goods {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.paym-goods-name {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}
.paym-goods-qty { color: var(--text-muted); font-size: 13px; flex-shrink: 0; }

.paym-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.paym-price { font-size: 26px; font-weight: 700; color: #ef4f3d; }
.paym-order-no { font-size: 12px; color: var(--text-light); word-break: break-all; }

.paym-section-title { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.paym-channels { display: flex; flex-direction: column; gap: 10px; }
.paym-channel {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 15px;
  color: var(--text);
  transition: border-color .18s, background .18s;
}
.paym-channel:hover { border-color: var(--primary); }
.paym-channel i:first-child { font-size: 22px; }
.paym-channel span { flex: 1; text-align: left; }
.paym-tick { opacity: 0; color: var(--primary); font-size: 14px; }
.paym-channel.active { border-color: var(--primary); background: var(--primary-light, #f0f6ff); }
.paym-channel.active .paym-tick { opacity: 1; }

.paym-empty { text-align: center; padding: 24px 10px; color: var(--text-muted); }
.paym-empty i { font-size: 34px; color: #07c160; margin-bottom: 10px; display: block; }
.paym-empty p { font-size: 14px; line-height: 1.7; margin: 0; }

.paym-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px 18px;
}
.paym-cancel, .paym-submit {
  border-radius: 8px;
  font-size: 14px;
  padding: 9px 22px;
  cursor: pointer;
  border: 1px solid transparent;
}
.paym-cancel { background: #fff; border-color: var(--border); color: var(--text-muted); }
.paym-cancel:hover { color: var(--text); }
.paym-submit { background: var(--primary); color: #fff; font-weight: 500; }
.paym-submit:hover { filter: brightness(1.05); }
.paym-submit:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 600px) {
  .paym-box { max-width: none; }
  .paym-price { font-size: 24px; }
}

/* ===== 顶部购物车下拉 ===== */
.nav-cart-wrap { position: relative; display: inline-flex; }
.cart-dd-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 336px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(24, 40, 72, .16);
  z-index: 900;
  overflow: hidden;
}
/* 图标与面板之间的隐形桥，鼠标移过去时不会先收起 */
.cart-dd-panel::before {
  content: '';
  position: absolute;
  top: -12px; left: 0; right: 0; height: 12px;
}
/* 小三角，指向购物车图标 */
.cart-dd-panel::after {
  content: '';
  position: absolute;
  top: -5px; right: 18px;
  width: 10px; height: 10px;
  background: #fff;
  transform: rotate(45deg);
}

.cart-dd-head {
  position: relative;
  padding: 13px 16px 11px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.cart-dd-head span { color: var(--text-light); font-weight: 400; }

.cart-dd-loading { padding: 36px 0; text-align: center; color: var(--text-light); }
.cart-dd-empty { padding: 34px 0 32px; text-align: center; color: var(--text-light); }
.cart-dd-empty i { font-size: 32px; opacity: .28; display: block; margin-bottom: 12px; }
.cart-dd-empty p { margin: 0; font-size: 13px; }

.cart-dd-list { max-height: 296px; overflow-y: auto; padding: 6px; }
.cart-dd-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .15s;
}
.cart-dd-item:hover { background: var(--bg); }

.cart-dd-thumb {
  width: 46px;
  height: 46px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
}
.cart-dd-info { flex: 1; min-width: 0; }
.cart-dd-name {
  font-size: 13px;
  color: var(--text);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 3px;
}
.cart-dd-item:hover .cart-dd-name { color: var(--primary); }
.cart-dd-price { font-size: 14px; font-weight: 700; color: #ef4f3d; }

/* 删除按钮平时藏起来，hover 到条目才出现，避免整排图标很吵 */
.cart-dd-del {
  position: absolute;
  top: 6px; right: 6px;
  width: 20px; height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 24, 39, .06);
  color: var(--text-light);
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  opacity: 0;
  transition: opacity .15s, background .15s, color .15s;
}
.cart-dd-item:hover .cart-dd-del { opacity: 1; }
.cart-dd-del:hover { background: #ef4f3d; color: #fff; }

.cart-dd-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.cart-dd-total { font-size: 12px; color: var(--text-muted); }
.cart-dd-total b {
  display: block;
  font-size: 18px;
  color: #ef4f3d;
  line-height: 1.25;
  margin-top: 1px;
}
.cart-dd-checkout {
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 9px 22px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: filter .15s;
}
.cart-dd-checkout:hover { filter: brightness(1.07); }
.cart-dd-checkout:disabled { opacity: .6; cursor: not-allowed; }

@media (max-width: 600px) {
  .cart-dd-panel { width: calc(100vw - 20px); right: -6px; }
  .cart-dd-panel::after { right: 14px; }
}
