:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --ink: #1b2130;
  --ink-soft: #3a4256;
  --muted: #767e8e;
  --line: #e7e3da;
  --accent: #c0442b;
  --accent-soft: #f3e3de;
  --gold: #b08a3e;
  --gold-soft: #f5ecd8;
  --ok: #2f7d52;
  --ok-soft: #e3f1e9;
  --warn: #9a6b1f;
  --warn-soft: #f6ecd6;
  --reject: #9a3b32;
  --reject-soft: #f3e1de;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 6px 22px rgba(27, 33, 48, 0.08);
  --shadow-soft: 0 2px 10px rgba(27, 33, 48, 0.06);
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- 顶部栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand .logo-mark { width: 34px; height: 34px; flex: none; }
.brand .brand-name { font-weight: 700; font-size: 16px; letter-spacing: .5px; color: var(--ink); }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a {
  padding: 8px 14px; border-radius: 999px; font-size: 14.5px; color: var(--ink-soft);
  transition: background .15s, color .15s;
}
.nav a:hover, .nav a.active { background: var(--accent-soft); color: var(--accent); }
.header-right { display: flex; align-items: center; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 18px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; transition: transform .12s, box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(192, 68, 43, .28); }
.btn-primary:hover { background: #a93822; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-gold { background: var(--gold); color: #fff; box-shadow: 0 6px 16px rgba(176, 138, 62, .28); }
.btn-gold:hover { background: #9a7632; }
.btn-sm { padding: 6px 13px; font-size: 13px; }
.user-chip { display: flex; align-items: center; gap: 9px; }
.user-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--gold-soft);
  color: var(--gold); font-weight: 700; display: grid; place-items: center; font-size: 13px;
}
.user-chip .uname { font-size: 14px; color: var(--ink-soft); font-weight: 600; }

/* ---------- 区块 ---------- */
.section { padding: 52px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; gap: 16px; }
.section-title { font-size: 24px; font-weight: 800; letter-spacing: .5px; margin: 0; }
.section-sub { color: var(--muted); font-size: 14px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px; color: var(--accent);
  font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 10px;
}
.eyebrow svg { width: 16px; height: 16px; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 400px at 85% -10%, rgba(192,68,43,.10), transparent 60%),
    radial-gradient(900px 360px at 5% 110%, rgba(176,138,62,.12), transparent 55%),
    var(--surface);
  border-bottom: 1px solid var(--line);
}
.hero-inner { padding: 70px 0 60px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 40px; line-height: 1.2; margin: 14px 0 18px; font-weight: 900; letter-spacing: .5px; }
.hero h1 .hl { color: var(--accent); }
.hero p.lead { font-size: 16.5px; color: var(--ink-soft); max-width: 520px; }
.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 26px; margin-top: 34px; }
.hero-stats .num { font-size: 26px; font-weight: 800; color: var(--ink); }
.hero-stats .lbl { font-size: 13px; color: var(--muted); }
.hero-art { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.hero-art .tile {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--surface-2);
  border: 1px solid var(--line); aspect-ratio: 3/4;
}
.hero-art .tile img { width: 100%; height: 100%; object-fit: cover; }
.hero-art .tile.wide { grid-column: span 2; aspect-ratio: 16/9; }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-soft); transition: transform .16s, box-shadow .16s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .cover { aspect-ratio: 3/4; overflow: hidden; background: var(--surface-2); position: relative; }
.card .cover img { width: 100%; height: 100%; object-fit: cover; }
.card .cover .cat {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,.92); color: var(--accent); font-size: 12px; font-weight: 700;
  padding: 4px 11px; border-radius: 999px;
}
.card .body { padding: 16px 17px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .title { font-size: 17px; font-weight: 700; margin: 0; }
.card .desc { font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.card .author { font-size: 12.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.card .author svg { width: 14px; height: 14px; color: var(--gold); }
.card .views { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.card .views svg { width: 14px; height: 14px; }

/* capsule tags */
.tags { display: flex; gap: 7px; flex-wrap: wrap; }
.tag {
  font-size: 12px; padding: 3px 11px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent); font-weight: 600;
}
.tag.gold { background: var(--gold-soft); color: var(--gold); }

/* ---------- 详情 ---------- */
.detail-wrap { display: grid; grid-template-columns: 320px 1fr; gap: 38px; padding: 38px 0 60px; }
.detail-cover { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); aspect-ratio: 3/4; background: var(--surface-2); }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-info h1 { font-size: 30px; margin: 6px 0 12px; font-weight: 900; }
.detail-meta { display: flex; gap: 18px; color: var(--muted); font-size: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.detail-meta .item { display: flex; align-items: center; gap: 6px; }
.detail-meta svg { width: 16px; height: 16px; color: var(--accent); }
.detail-desc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; color: var(--ink-soft); margin-bottom: 26px; }
.detail-desc h3 { margin: 0 0 10px; font-size: 15px; color: var(--ink); }
.pages { display: grid; gap: 16px; }
.pages img { width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; }

/* ---------- 表单 ---------- */
.form-wrap { max-width: 460px; margin: 48px auto; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 30px 26px; box-shadow: var(--shadow-soft); }
.form-card h1 { font-size: 23px; margin: 0 0 4px; font-weight: 800; }
.form-card .hint { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 7px; }
.field input[type=text], .field input[type=password], .field input[type=email], .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 14.5px; color: var(--ink); background: var(--surface-2); transition: border .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { min-height: 96px; resize: vertical; }
.check-row { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--ink-soft); margin: 4px 0 12px; }
.check-row input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.check-row a { color: var(--accent); text-decoration: underline; }
.form-card .btn { width: 100%; margin-top: 6px; }
.form-foot { text-align: center; margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.form-foot a { color: var(--accent); font-weight: 600; }

/* upload */
.dropzone {
  border: 1.5px dashed var(--line); border-radius: var(--radius-sm); padding: 16px; text-align: center;
  color: var(--muted); font-size: 13px; background: var(--surface-2); cursor: pointer; transition: border .15s;
}
.dropzone:hover { border-color: var(--accent); }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.thumbs .t { position: relative; aspect-ratio: 3/4; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.thumbs .t img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .t .x { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.6); color: #fff; border: none; border-radius: 50%; width: 18px; height: 18px; font-size: 11px; line-height: 1; }

/* ---------- 后台 ---------- */
.admin-wrap { padding: 34px 0 60px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.admin-tabs { display: flex; gap: 8px; }
.admin-tabs button { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 13.5px; color: var(--ink-soft); font-weight: 600; }
.admin-tabs button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); }
.table table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 13px 15px; font-size: 13.5px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: 12.5px; letter-spacing: .3px; }
.table tr:last-child td { border-bottom: none; }
.table .lt { display: flex; align-items: center; gap: 11px; }
.table .lt img { width: 46px; height: 60px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); flex: none; }
.badge { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.badge.pending { background: var(--warn-soft); color: var(--warn); }
.badge.approved { background: var(--ok-soft); color: var(--ok); }
.badge.rejected { background: var(--reject-soft); color: var(--reject); }
.row-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.empty { text-align: center; color: var(--muted); padding: 50px 0; }

/* ---------- 支付占位 ---------- */
.pay-box { text-align: center; }
.pay-box .price { font-size: 34px; font-weight: 900; color: var(--accent); margin: 6px 0; }
.pay-box .note { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.pay-feats { text-align: left; display: grid; gap: 9px; margin: 18px 0 22px; }
.pay-feats .pf { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-soft); }
.pay-feats svg { width: 18px; height: 18px; color: var(--ok); flex: none; }
.placeholder-banner { background: var(--gold-soft); border: 1px solid #ecd9a8; color: #7a5a17; border-radius: var(--radius-sm); padding: 11px 14px; font-size: 13px; margin-bottom: 18px; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--ink); color: #cfd4df; margin-top: 40px; }
.footer-inner { padding: 40px 0 30px; }
.footer-line1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: #e7eaf0; margin-bottom: 16px; }
.footer-line1 .sep { color: #6b7280; }
.footer-links a { color: #9fb4d6; text-decoration: underline; }
.footer-line2 { font-size: 13.5px; color: #aeb6c6; margin-bottom: 10px; }
.footer-line3 { font-size: 13px; color: #8b93a6; display: flex; gap: 18px; flex-wrap: wrap; }
.footer-line3 .it { display: flex; gap: 6px; }
.footer-line3 b { color: #cfd4df; font-weight: 600; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.footer-brand .logo-mark { width: 30px; height: 30px; }
.footer-brand .fb-name { font-weight: 700; color: #fff; font-size: 15px; }

/* toast */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--reject); }

/* misc */
.center-note { text-align: center; color: var(--muted); padding: 60px 0; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.text-muted { color: var(--muted); }
.btn-block { width: 100%; }

/* 响应式 */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .detail-wrap { grid-template-columns: 1fr; }
  .nav { display: none; }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .section { padding: 38px 0; }
}
