:root {
  --bg: #fdf8f2;
  --bg-soft: #f7ece0;
  --card: #ffffff;
  --text: #2f2622;
  --muted: #8b7a6e;
  --brand: #c07a3a;
  --brand-deep: #9c5c25;
  --brand-light: #f3e2cd;
  --accent: #c2453a;
  --border: #ecdfd0;
  --shadow: 0 6px 24px rgba(150, 110, 70, 0.09);
  --shadow-lg: 0 14px 40px rgba(150, 110, 70, 0.16);
  --radius: 16px;
  --serif: "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* 防止个别元素在窄屏撑出整页横向滚动 */
  max-width: 100vw;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; margin: 0 0 12px; letter-spacing: 1px; }
.container { width: min(1200px, 92vw); margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
/* 付款页重点提示（加粗 + 醒目暖红） */
.pay-tip-strong { font-size: 13.5px; font-weight: 700; color: #d4380d; line-height: 1.7; }

/* ---------- 顶部导航 ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253, 248, 242, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header .inner { display: flex; align-items: center; gap: 24px; min-height: 68px; padding: 16px 0; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--brand-deep); white-space: nowrap; }
.logo .mark {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid; place-items: center; color: #fff; font-size: 18px;
  box-shadow: 0 4px 12px rgba(192, 122, 58, .35);
  overflow: hidden; flex-shrink: 0;
}
.logo small { display: block; font-size: 11px; color: var(--muted); letter-spacing: 2px; font-family: sans-serif; font-weight: 400; }
.nav { display: flex; align-items: center; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a {
  padding: 8px 14px; border-radius: 999px; font-size: 15px; color: #5b4a40;
  transition: .2s;
}
.nav a:hover { background: var(--brand-light); color: var(--brand-deep); }
.nav a.active { background: var(--brand); color: #fff; }
.nav .divider { width: 1px; height: 20px; background: var(--border); margin: 0 8px; }
/* 导航 · 四大产品大类（每类专属主题色） */
.nav-type { font-weight: 600; letter-spacing: .5px; border: 1px solid transparent; --nt: var(--brand); --nt-soft: var(--brand-light); }
.nav-type.nt-mv     { --nt: #c07a3a; --nt-soft: #f7e3cd; }
.nav-type.nt-album  { --nt: #c25e7a; --nt-soft: #f8dee6; }
.nav-type.nt-poster { --nt: #4a7fb5; --nt-soft: #ddebf7; }
.nav-type.nt-music  { --nt: #7a5fb8; --nt-soft: #e8dff6; }
.nav-type:hover { background: var(--nt-soft); color: var(--nt); border-color: var(--nt-soft); }
.nav-type.active {
  background: var(--nt);
  color: #fff; box-shadow: 0 3px 10px color-mix(in srgb, var(--nt) 40%, transparent);
}
.nav-type.active:hover { color: #fff; border-color: transparent; }
.header-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14px; cursor: pointer; transition: .2s; background: #fff; color: var(--text);
  font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff; box-shadow: 0 4px 14px rgba(156, 92, 37, .28); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
/* Hero 唯一主按钮：咨询客服（加大、发光呼吸、更醒目） */
.hero-cta {
  padding: 16px 40px !important; font-size: 18px !important; font-weight: 700; letter-spacing: 2px;
  border-radius: 999px !important;
  box-shadow: 0 8px 26px rgba(156, 92, 37, .38), 0 0 0 0 rgba(192, 122, 58, .45) !important;
  animation: ctaPulse 2.4s ease-out infinite;
}
.hero-cta:hover { transform: translateY(-3px) scale(1.02); }
@keyframes ctaPulse {
  0%   { box-shadow: 0 8px 26px rgba(156,92,37,.38), 0 0 0 0 rgba(192,122,58,.42); }
  70%  { box-shadow: 0 8px 26px rgba(156,92,37,.30), 0 0 0 16px rgba(192,122,58,0); }
  100% { box-shadow: 0 8px 26px rgba(156,92,37,.38), 0 0 0 0 rgba(192,122,58,0); }
}
.btn-outline { border-color: var(--brand); color: var(--brand-deep); }
.btn-outline:hover { background: var(--brand-light); }
.btn-ghost { border-color: var(--border); color: var(--muted); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-danger { background: #fff1ef; border-color: #f0c4bd; color: var(--accent); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #fff8ef 0%, #f6e6d3 55%, #f1d9c2 100%);
  padding: 72px 0 64px;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -80px; width: 460px; height: 460px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.75), rgba(255,255,255,0) 70%);
}
.hero .inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 42px; line-height: 1.35; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p.lead { font-size: 17px; color: #6b5849; max-width: 520px; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 26px; }
.badge { background: rgba(255,255,255,.85); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--brand-deep); }
.hero-card {
  background: #fff; border-radius: 22px; padding: 22px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.hero-card h3 { font-size: 22px; font-weight: 800; margin-bottom: 14px; text-align: center; letter-spacing: 1.5px; }
.hero-card h3::after {
  content: ''; display: block; width: 46px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  margin: 8px auto 0;
}
/* Hero 概览卡片：高亮数字瓷砖 + 客服时间条 */
.hc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hc-tile {
  background: linear-gradient(135deg, #fff8ef, #fdeeda);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 10px; text-align: center;
}
.hc-num { font-family: var(--serif); font-size: 25px; font-weight: 800; color: var(--brand-deep); letter-spacing: .5px; }
.hc-label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.hc-hours {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px; font-size: 13.5px;
}
.hc-hours b { color: var(--brand-deep); font-size: 15px; }
.stat-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.stat-row:last-child { border-bottom: none; }
.stat-row b { color: var(--brand-deep); font-size: 16px; }

/* ---------- 区块 ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; gap: 16px; }
.section-head h2 { font-size: 28px; font-weight: 800; }
/* 首页各区块主标题加粗（选择定制大类/热门样片/定制流程/关于我们） */
#aboutTitle { font-weight: 800; }
.section-head p { margin: 0; color: var(--muted); font-size: 14px; }

/* 分类入口 */
/* 首页 · 产品大类选择（视频MV / 电子相册 / 投屏海报 / AI音乐） */
.type-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.type-tab {
  position: relative; overflow: hidden;
  --tint: var(--brand); --tint-soft: var(--brand-light); --tint-glow: rgba(192,122,58,.22);
  border: 1.5px solid var(--border); border-radius: 18px;
  background: linear-gradient(160deg, #fffdf9 0%, #fff6ec 100%);
  padding: 22px 16px 18px; text-align: center; cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(120, 72, 20, .05);
}
/* 每类专属主题色 */
.type-tab.t-mv     { --tint: #c07a3a; --tint-soft: #f7e3cd; --tint-glow: rgba(192,122,58,.22); }
.type-tab.t-album  { --tint: #c25e7a; --tint-soft: #f8dee6; --tint-glow: rgba(194,94,122,.20); }
.type-tab.t-poster { --tint: #4a7fb5; --tint-soft: #ddebf7; --tint-glow: rgba(74,127,181,.20); }
.type-tab.t-music  { --tint: #7a5fb8; --tint-soft: #e8dff6; --tint-glow: rgba(122,95,184,.20); }
/* 顶部渐变装饰条 */
.type-tab::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--tint), transparent 130%);
  opacity: 0; transition: opacity .22s ease;
}
.type-tab:hover {
  border-color: var(--tint); transform: translateY(-4px);
  box-shadow: 0 12px 26px var(--tint-glow);
}
.type-tab:hover::before { opacity: 1; }
.type-tab.active {
  border-color: var(--tint);
  background: linear-gradient(160deg, #ffffff 0%, var(--tint-soft) 160%);
  box-shadow: 0 12px 28px var(--tint-glow);
}
.type-tab.active::before { opacity: 1; }
/* 角标：热门 / 即将上线 */
.type-tab .t-badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 10.5px; line-height: 1; padding: 4px 8px; border-radius: 999px;
  letter-spacing: .5px; font-weight: 600;
}
.type-tab .t-badge.hot  { background: linear-gradient(135deg, #e2574c, #f08a3c); color: #fff; box-shadow: 0 2px 6px rgba(226,87,76,.35); }
.type-tab .t-badge.soon { background: #f2ece2; color: #a08b6f; border: 1px solid #e5d9c6; }
/* 选中勾 */
.type-tab .t-check {
  position: absolute; top: 10px; left: 10px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--tint); color: #fff; font-size: 12px; line-height: 20px;
  opacity: 0; transform: scale(.5); transition: .2s;
}
.type-tab.active .t-check { opacity: 1; transform: scale(1); }
/* 图标圆形徽章 */
.type-tab .t-icon {
  width: 62px; height: 62px; margin: 6px auto 12px;
  border-radius: 50%; background: var(--tint-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; line-height: 1;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.7), 0 4px 10px var(--tint-glow);
  transition: transform .22s ease;
}
.type-tab:hover .t-icon, .type-tab.active .t-icon { transform: scale(1.08); }
.type-tab .t-name { font-size: 17.5px; font-weight: 700; color: var(--text); font-family: var(--serif); letter-spacing: 2px; }
.type-tab.active .t-name { color: var(--tint); }
.type-tab .t-desc { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.6; min-height: 2.6em; }

.type-coming {
  text-align: center; padding: 44px 20px;
  border: 1px dashed var(--brand); border-radius: 16px; background: #fffaf5;
}
.type-coming .coming-icon { font-size: 38px; margin-bottom: 8px; }
.type-coming .coming-title { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--brand-deep); }

.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 12px; text-align: center; transition: .25s; box-shadow: var(--shadow);
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.cat-card .icon { font-size: 30px; margin-bottom: 6px; }
.cat-card .name { font-family: var(--serif); font-size: 18px; color: var(--brand-deep); }
.cat-card .count { font-size: 12px; color: var(--muted); }

/* 样片卡片 */
.sample-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

/* 首页样片搜索框（停靠在导航栏下方） */
.search-dock {
  background: linear-gradient(180deg, #fdf3e7, #fffaf4);
  border-bottom: 1px solid #f0e2cd;
  padding: 14px 0;
}
.sample-search {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid var(--border); border-radius: 999px;
  padding: 6px 8px 6px 18px; margin: 0;
  box-shadow: 0 2px 10px rgba(156, 92, 37, .06);
  transition: border-color .2s, box-shadow .2s;
}
.sample-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 4px 16px rgba(192, 122, 58, .18);
}
.sample-search .ss-icon { font-size: 17px; flex: none; opacity: .75; }
.sample-search .ss-input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-size: 15px; font-family: inherit; color: var(--text); padding: 8px 0;
}
.sample-search .ss-input::placeholder { color: var(--muted); }
.sample-search .ss-input::-webkit-search-cancel-button { cursor: pointer; }
.sample-search .btn { border-radius: 999px; flex: none; padding: 9px 22px; }
.search-result-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: linear-gradient(135deg, var(--brand-light), #fff6ea);
  border: 1px solid #ecd9bd; border-radius: 12px;
  padding: 9px 14px; margin: 0 0 18px; font-size: 13.5px; color: var(--text);
  flex-wrap: wrap;
}
.search-result-bar b { color: var(--brand-deep); }
@media (max-width: 640px) {
  .search-dock { padding: 10px 0; }
  .sample-search { padding: 5px 6px 5px 14px; }
  .sample-search .ss-input { font-size: 16px; }
  .sample-search .btn { padding: 8px 16px; }
}
.sample-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: .25s;
}
.sample-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.player { position: relative; background: #1d1714; aspect-ratio: 16/9; }
.player video { width: 100%; height: 100%; object-fit: cover; display: block; }
.player .no-video { position: absolute; inset: 0; display: grid; place-items: center; color: #cbb8a6; font-size: 14px; }
/* 样片实时销量角标（覆盖在视频左上角） */
.sales-badge {
  position: absolute; left: 10px; top: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(29, 23, 20, .62); color: #ffe9d6;
  font-size: 12.5px; font-weight: 700; letter-spacing: .2px;
  backdrop-filter: blur(4px); border: 1px solid rgba(255, 233, 214, .28);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .22); pointer-events: none;
}
.sales-badge.bump,
.sales-inline.bump { animation: sales-bump .5s ease; }
@keyframes sales-bump {
  0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); }
}
/* 付款页行内销量 */
.sales-inline { display: inline-block; color: var(--accent); font-weight: 700; }
.sample-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.sample-title { font-family: var(--serif); font-size: 23px; font-weight: 800; letter-spacing: 0.5px; }
.tag { display: inline-block; background: var(--brand-light); color: var(--brand-deep); border-radius: 6px; padding: 2px 10px; font-size: 12px; margin-right: 8px; }
.material-box { background: var(--bg-soft); border-radius: 12px; padding: 12px 14px; }
.material-box h4 { font-size: 14px; margin: 0 0 6px; color: var(--brand-deep); font-family: inherit; }
.material-box ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: #5f5148; }
.material-box li { margin: 3px 0; }
.price-row { display: flex; align-items: baseline; justify-content: space-between; margin-top: auto; }
.price { font-family: var(--serif); color: var(--accent); font-size: 26px; font-weight: 700; }
.price small { font-size: 13px; color: var(--muted); font-family: inherit; font-weight: 400; }

/* ---------- 表单 / 卡片 ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 14px; margin-bottom: 6px; color: #5f5148; }
.input, textarea.input, select.input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: inherit; background: #fffaf5; color: var(--text); outline: none; transition: .2s;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(192,122,58,.12); }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.6; }
.auth-wrap { min-height: 76vh; display: grid; place-items: center; padding: 40px 0; }
.auth-card { width: min(420px, 92vw); }
.auth-card h2 { text-align: center; font-size: 26px; }
.auth-tip { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.switch-line { text-align: center; font-size: 13px; color: var(--muted); margin-top: 16px; }
.switch-line a { color: var(--brand-deep); }

/* ---------- 个人中心 ---------- */
.profile-layout { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }
/* 锚点跳转时预留顶部导航高度，避免板块被遮挡 */
#rechargeLog, #recharge { scroll-margin-top: 96px; }
.user-card { text-align: center; }
.form-tip { margin-left: 10px; }
.avatar {
  width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff;
  display: grid; place-items: center; font-family: var(--serif); font-size: 30px;
}
.wallet { background: linear-gradient(135deg, #fff6ea, #f7e3cd); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin: 14px 0; }
.wallet .label { font-size: 12px; color: var(--muted); }
.wallet .value { font-family: var(--serif); font-size: 28px; color: var(--accent); font-weight: 700; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-stat { background: var(--bg-soft); border-radius: 12px; padding: 10px; }
.mini-stat .label { font-size: 12px; color: var(--muted); }
.mini-stat .value { font-size: 17px; font-weight: 600; color: var(--brand-deep); font-family: var(--serif); }
.level-badge { display: inline-block; padding: 4px 14px; border-radius: 999px; font-size: 13px; background: linear-gradient(135deg, #f6d7a3, #e8b76a); color: #6b4413; border: 1px solid #e5c184; }

/* CDK 充值提示框 */
.cdk-box { background: linear-gradient(135deg, #fff6ea, #f7e3cd); border: 1px dashed var(--brand); border-radius: 12px; padding: 12px 14px; }
.cdk-box .wx { font-family: var(--serif); font-size: 18px; color: var(--accent); letter-spacing: 1px; }

.recharge-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0; }
.option-item {
  border: 1px solid var(--border); border-radius: 12px; padding: 12px; text-align: center; cursor: pointer;
  background: #fffaf5; transition: .2s;
}
.option-item:hover { border-color: var(--brand); }
.option-item.active { border-color: var(--brand); background: var(--brand-light); box-shadow: 0 0 0 3px rgba(192,122,58,.12); }
.option-item .amount { font-family: var(--serif); font-size: 20px; color: var(--brand-deep); font-weight: 700; }
.option-item .gift { font-size: 12px; color: var(--accent); }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.table th, table.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
table.table th { background: var(--bg-soft); color: #6b5849; font-weight: 600; font-size: 13px; }
table.table tbody tr:hover { background: #fffaf3; }
.empty { text-align: center; color: var(--muted); padding: 34px 0; font-size: 14px; }

/* ---------- 页脚 ---------- */
.footer { background: #33261f; color: #d8c8ba; padding: 44px 0 24px; margin-top: 40px; }
.footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.footer h4 { color: #fff; font-size: 16px; font-family: inherit; }
.footer a { color: #d8c8ba; font-size: 14px; }
.footer a:hover { color: #fff; }
.footer .bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 26px; padding-top: 16px; font-size: 12.5px; text-align: center; color: #a4938a; }

/* ---------- Toast ---------- */
#toastBox { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--brand);
  padding: 10px 20px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 14px;
  animation: toastIn .25s ease;
}
.toast.error { border-left-color: var(--accent); }
.toast.success { border-left-color: #4a9a6a; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ---------- 醒目成功弹窗（支付 / 充值成功） ---------- */
.success-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(40, 26, 18, .5);
  display: grid; place-items: center; padding: 20px;
  animation: successFade .22s ease;
}
.success-card {
  position: relative;
  background: #fff; border-radius: 22px; padding: 34px 28px 26px;
  width: min(400px, 92vw); text-align: center;
  box-shadow: 0 24px 70px rgba(60, 30, 10, .35);
  animation: successPop .32s cubic-bezier(.2, .9, .3, 1.3);
}
.success-close {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: #f4ece2; color: #8a7561;
  font-size: 15px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  transition: background .2s, color .2s, transform .2s;
}
.success-close:hover { background: var(--brand); color: #fff; transform: rotate(90deg); }
.success-check {
  width: 78px; height: 78px; border-radius: 50%; margin: 0 auto 16px;
  background: linear-gradient(135deg, #35bd6d, #1c8a48);
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(28, 138, 72, .38);
  animation: checkPop .5s cubic-bezier(.2, .9, .3, 1.4);
}
.success-check svg { width: 44px; height: 44px; }
.success-check svg path {
  stroke: #fff; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 44; stroke-dashoffset: 44;
  animation: drawCheck .4s .22s ease-out forwards;
}
.success-title { font-family: var(--serif); font-size: 23px; font-weight: 700; color: #23301f; letter-spacing: 1px; }
.success-amount { font-family: var(--serif); font-size: 42px; font-weight: 700; color: #1c8a48; line-height: 1.3; margin: 6px 0 2px; }
.success-rows { margin: 16px 0 4px; border-top: 1px dashed var(--border); }
.success-row { display: flex; justify-content: space-between; padding: 9px 2px; font-size: 14px; border-bottom: 1px dashed var(--border); }
.success-row span { color: var(--muted); }
.success-row b { color: var(--brand-deep); }
.success-detail { margin-top: 12px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.success-btns { display: flex; gap: 10px; margin-top: 20px; }
.success-btns .sbtn {
  flex: 1; padding: 12px 14px; border-radius: 999px; font-size: 15px;
  cursor: pointer; font-family: inherit; border: 1px solid transparent; transition: .2s;
}
.success-btns .sbtn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff; box-shadow: 0 4px 14px rgba(156, 92, 37, .28); }
.success-btns .sbtn.ghost { border-color: var(--border); color: var(--muted); background: #fff; }
.success-btns .sbtn:hover { filter: brightness(1.06); }
@keyframes successFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes successPop { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: scale(1); } }
@keyframes checkPop { 0% { transform: scale(0); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

/* 流程步骤 */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); position: relative; }
.step .no { font-family: var(--serif); font-size: 30px; color: var(--brand-light); font-weight: 700; line-height: 1; }
.step h4 { font-size: 16px; margin: 6px 0 4px; font-family: var(--serif); }
.step p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* ---------- 管理后台 ---------- */
.admin-body { background: #f6f1ea; }
.admin-shell { display: grid; grid-template-columns: 216px 1fr; min-height: 100vh; }
.admin-side { background: #33261f; color: #d8c8ba; padding: 22px 14px; }
.admin-side .logo { color: #fff; margin-bottom: 26px; }
.admin-side .logo small { color: #a4938a; }
.side-menu { display: flex; flex-direction: column; gap: 4px; }
.side-menu button {
  background: none; border: none; color: #d8c8ba; text-align: left; padding: 11px 14px;
  border-radius: 10px; cursor: pointer; font-size: 14.5px; font-family: inherit; transition: .2s;
}
.side-menu button:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-menu button.active { background: var(--brand); color: #fff; }
.admin-main { padding: 22px 26px; overflow-x: hidden; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 12px; }
.admin-top h2 { margin: 0; font-size: 22px; }
.admin-top .who { font-size: 13px; color: var(--muted); }
.admin-login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #fff8ef, #f1d9c2); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-box { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.stat-box .label { font-size: 13px; color: var(--muted); }
.stat-box .value { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--brand-deep); }
.admin-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; }
.admin-card h3 { font-size: 17px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { width: auto; min-width: 180px; }
.modal-mask { position: fixed; inset: 0; background: rgba(45,32,25,.45); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal { background: #fff; border-radius: 16px; padding: 24px; width: min(560px, 94vw); max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal h3 { font-size: 19px; margin-bottom: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; }
.pill.on { background: #e7f5ec; color: #2f7d4f; border: 1px solid #bfe3cd; }
.pill.off { background: #f3f0ee; color: #8b7a6e; border: 1px solid #e2dbd5; }

/* ---------- 支付页布局 ---------- */
.pay-layout { display: grid; grid-template-columns: 1.25fr .75fr; gap: 20px; align-items: start; }

/* ---------- 通用两列布局（列宽由内联 --tc 控制，手机自动单列） ---------- */
.two-col { display: grid; grid-template-columns: var(--tc, 1fr 1fr); gap: var(--tg, 26px); }
.two-col.center { align-items: center; }
.page-title { font-size: 34px; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .hero .inner { grid-template-columns: 1fr; gap: 28px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .sample-grid { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer .cols { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .pay-layout { grid-template-columns: 1fr; }

  /* 后台：侧边栏改为顶部横向菜单（手机可用） */
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side {
    display: block; padding: 10px 12px;
    position: sticky; top: 0; z-index: 40;
  }
  .admin-side .logo { display: none; }
  .side-menu {
    flex-direction: row; gap: 6px; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .side-menu::-webkit-scrollbar { display: none; }
  .side-menu button { white-space: nowrap; padding: 9px 14px; font-size: 14px; }
  .admin-main { padding: 16px 14px; }
}

/* ---------- 手机端适配 ---------- */
@media (max-width: 640px) {
  .container { width: 94vw; }
  .two-col { grid-template-columns: 1fr; gap: 16px; }
  .page-title { font-size: 23px; }

  /* 导航：第一行 logo + 操作按钮，第二行横向滚动菜单 */
  .header .inner { flex-wrap: wrap; height: auto; gap: 8px; padding: 9px 0 7px; }
  .logo { order: 1; flex: 1; font-size: 17px; gap: 8px; }
  .logo .mark { width: 32px; height: 32px; font-size: 15px; }
  .logo small { display: none; }
  .header-actions { order: 2; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  .header-actions .btn { padding: 6px 10px; font-size: 12.5px; white-space: nowrap; }
  .header-actions .nav-username { display: none; }
  .nav {
    order: 3; flex: 1 0 100%; gap: 2px; flex-wrap: nowrap;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 2px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 6px 12px; font-size: 14px; white-space: nowrap; }
  .nav .divider { display: none; }

  /* Hero */
  .hero { padding: 40px 0 34px; }
  .hero h1 { font-size: 26px; line-height: 1.4; }
  .hero p.lead { font-size: 14.5px; }
  .hero-badges { margin: 14px 0 20px; }
  .badge { font-size: 12px; padding: 5px 11px; }
  .hero-card { padding: 16px; border-radius: 16px; }
  .hc-num { font-size: 21px; }

  /* 区块与栅格 */
  .section { padding: 34px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 16px; }
  .section-head h2 { font-size: 22px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  /* 产品大类：手机端 2×2 排列 */
  .type-tabs { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
  .type-tab { padding: 16px 10px 13px; border-radius: 15px; }
  .type-tab .t-badge { font-size: 9.5px; padding: 3px 6px; top: 8px; right: 8px; }
  .type-tab .t-check { width: 17px; height: 17px; font-size: 10px; line-height: 17px; top: 8px; left: 8px; }
  .type-tab .t-icon { width: 48px; height: 48px; font-size: 23px; margin: 4px auto 9px; }
  .type-tab .t-name { font-size: 15px; letter-spacing: 1px; }
  .type-tab .t-desc { font-size: 11.5px; min-height: 2.6em; }
  .type-coming { padding: 30px 14px; }
  .cat-card { padding: 14px 8px; }
  .cat-card .icon { font-size: 24px; }
  .cat-card .name { font-size: 15px; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .step { padding: 14px; }
  .step .no { font-size: 24px; }

  /* 卡片 */
  .card { padding: 16px; border-radius: 14px; }
  .sample-body { padding: 14px 15px 16px; }
  .sample-title { font-size: 20px; font-weight: 800; }
  .price { font-size: 22px; }

  /* 表单：触摸友好 */
  .input, textarea.input, select.input { padding: 12px 14px; font-size: 16px; }
  .btn { padding: 11px 18px; font-size: 15px; }
  .btn-sm { padding: 8px 14px; font-size: 13.5px; }
  .auth-card { width: 94vw; }
  .auth-card h2 { font-size: 23px; }

  /* 个人中心 */
  .profile-layout { gap: 14px; }
  /* 账户卡片：手机端头像与信息横向排列，压缩高度 */
  .user-card { padding: 14px; text-align: left; }
  .uc-head { display: flex; align-items: center; gap: 12px; }
  .user-card .avatar { width: 54px; height: 54px; font-size: 22px; margin: 0; }
  .wallet { margin: 12px 0; padding: 13px; }
  .wallet .value { font-size: 24px; }
  .mini-stats { gap: 8px; }
  .mini-stat { padding: 9px; }
  .mini-stat .value { font-size: 16px; }
  /* 表单提示语独占一行，避免与按钮挤在一起 */
  .form-tip { display: block; margin: 10px 0 0; }
  /* 个人资料表单：手机端两列紧凑排列，输入框不再整行铺满 */
  .profile-form { grid-template-columns: 1fr 1fr; gap: 10px; }
  .profile-form .form-row { margin-bottom: 0; }
  .profile-form .form-row label { font-size: 12.5px; margin-bottom: 4px; }
  .profile-form .input { padding: 10px 12px; }
  .recharge-options { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .option-item { padding: 10px; }
  .option-item .amount { font-size: 18px; }
  .cdk-box { padding: 10px 12px; }
  #btnRecharge { min-width: 0 !important; width: 100%; }

  /* 表格：默认缩小并允许横向滚动 */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.table { font-size: 13px; min-width: 480px; }
  table.table th, table.table td { padding: 9px 10px; }
  table.table th { font-size: 12.5px; }

  /* 表格：带 .stack-m 的记录类表格改为堆叠卡片，手机上无需左右滑动 */
  table.stack-m { min-width: 0; font-size: 14px; }
  table.stack-m thead { display: none; }
  table.stack-m tbody tr {
    display: block; background: #fffaf5;
    border: 1px solid var(--border); border-radius: 12px;
    padding: 10px 14px; margin-bottom: 10px;
  }
  table.stack-m tbody tr:last-child { margin-bottom: 0; }
  table.stack-m td {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 5px 0; border-bottom: none; white-space: normal; text-align: right; font-size: 13.5px;
  }
  table.stack-m td::before {
    content: attr(data-label); color: var(--muted); font-size: 12.5px;
    flex: 0 0 auto; text-align: left;
  }

  /* 支付页 */
  .pay-layout { gap: 14px; }
  #sampleBox { flex-direction: column; }
  #sampleBox .player { width: 100%; flex: none; }
  .pay-item { padding: 12px; }

  /* 后台 */
  .admin-main { padding: 14px 12px; }
  .admin-top { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 14px; }
  .admin-top h2 { font-size: 19px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-box { padding: 14px; }
  .stat-box .value { font-size: 21px; }
  .admin-card { padding: 15px; margin-bottom: 14px; }
  .admin-card h3 { font-size: 16px; flex-wrap: wrap; }
  .toolbar { gap: 8px; }
  .toolbar .input { width: 100%; min-width: 0; }
  .modal { width: 96vw; padding: 18px; max-height: 90vh; border-radius: 14px; }
  .modal h3 { font-size: 17px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }

  /* 页脚 */
  .footer { padding: 32px 0 20px; margin-top: 26px; }
  .footer .cols { gap: 18px; }
  .footer h4 { font-size: 15px; }

  /* Toast 顶部留白跟随 */
  #toastBox { top: 12px; width: max-content; max-width: 92vw; }
  .toast { font-size: 13.5px; padding: 9px 16px; }

  /* 成功弹窗 */
  .success-card { padding: 26px 20px 20px; border-radius: 18px; }
  .success-check { width: 64px; height: 64px; margin-bottom: 12px; }
  .success-check svg { width: 36px; height: 36px; }
  .success-title { font-size: 20px; }
  .success-amount { font-size: 34px; }
  .success-row { padding: 8px 2px; font-size: 13.5px; }
  .success-btns { gap: 8px; margin-top: 16px; }
  .success-btns .sbtn { padding: 11px 10px; font-size: 14px; }
}

/* 小屏手机 */
@media (max-width: 380px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .recharge-options { grid-template-columns: 1fr 1fr; }
  .mini-stats { grid-template-columns: 1fr 1fr; }
}
