:root {
  /* 墨缎金线：深墨色绸缎底 + 金线，绣线红点缀 */
  --bg: #0e0c0a;
  --surface: #191612;
  --surface-2: #221e19;
  --line: #352e25;
  --text: #f2e9d8;
  --muted: #a39682;
  --accent: #d6a54e;            /* 金线 */
  --accent-2: #f0cf8a;
  --accent-ink: #1d1407;
  --red: #c4314a;               /* 绣线红 */
  --gold: #d6a54e;
  --gold-grad: linear-gradient(135deg, #f6dd9d 0%, #d6a54e 38%, #a8772b 62%, #f0cf8a 100%);
  --danger: #e0606e;
  --free: #5cb889;
  --normal: #6f9ce0;
  --vip: #d6a54e;
  --stitch: rgba(214, 165, 78, .45);
  --radius: 14px;
  --serif: "Songti SC", "STSongti-SC-Bold", "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --latin: "Didot", "Bodoni 72", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  color: var(--text);
  /* 麻布纹理：横竖两组细线交织 */
  background-color: var(--bg);
  /* 绸缎：极淡的斜向光泽 + 细织纹 */
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(214, 165, 78, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(196, 49, 74, .07), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255, 240, 210, .012) 0 2px, transparent 2px 6px);
  background-attachment: fixed;
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
a { color: inherit; text-decoration: none; }
p a, td a { color: var(--accent); }
h1 { font-size: 28px; margin: 8px 0 18px; letter-spacing: .5px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* 顶部导航 */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(14, 12, 10, .78); backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid rgba(214, 165, 78, .18); }
.nav-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.logo .dot { width: 14px; height: 14px; border-radius: 50%; background: conic-gradient(var(--accent), #ff6f61, #7b6cff, var(--accent)); }
.search { flex: 1; max-width: 420px; }
.search input { width: 100%; }
.links { display: flex; align-items: center; gap: 18px; margin-left: auto; white-space: nowrap; }
.links a:hover, .link-btn:hover { color: var(--accent); }
.me { display: flex; align-items: center; gap: 6px; }
.badge { background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; }
.inline { display: inline; margin: 0; }
.link-btn { background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; padding: 0; }
.link-btn.danger { color: var(--danger); }

/* 表单与按钮 */
input, select {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  padding: 10px 14px; border-radius: 10px; font: inherit; outline: none;
}
input:focus, select:focus { border-color: var(--accent); }
label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 14px; }
label input, label select { color: var(--text); font-size: 15px; }
.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; cursor: pointer;
  padding: 12px 22px; border-radius: 10px; font: inherit; font-weight: 600; text-align: center; transition: transform .15s, filter .15s;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-sm { padding: 7px 14px; font-size: 14px; }
.btn-block { display: block; width: 100%; }

.flash { background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 12px 16px; border-radius: 10px; margin: 18px 0 0; }

/* 首页 */
.hero {
  margin: 28px 0 8px; padding: 32px 36px; border-radius: 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: radial-gradient(circle at 15% 20%, rgba(245,181,68,.25), transparent 50%),
              radial-gradient(circle at 85% 80%, rgba(123,108,255,.25), transparent 55%), var(--surface);
  border: 1px solid var(--line);
}
.hero h1 { font-size: 32px; margin: 0 0 6px; }
.hero p { margin: 0; color: var(--muted); }
.filters { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 24px 0 18px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chips.small .chip { font-size: 12px; padding: 3px 10px; }
.sort { display: flex; gap: 14px; color: var(--muted); }
.sort a.on { color: var(--text); font-weight: 600; }

.masonry { columns: 4 260px; column-gap: 14px; }
.tile { display: block; position: relative; break-inside: avoid; margin-bottom: 14px; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.tile img { display: block; width: 100%; height: auto; transition: transform .4s; }
.tile:hover img { transform: scale(1.04); }
.tile-info {
  position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; align-items: end;
  padding: 28px 14px 12px; background: linear-gradient(transparent, rgba(0,0,0,.7)); font-size: 14px; opacity: 0; transition: opacity .25s;
}
.tile:hover .tile-info { opacity: 1; }
.res { font-size: 12px; color: #d0d3d6; }
.empty { text-align: center; padding: 80px 0; color: var(--muted); }

/* 详情页 */
.detail { display: grid; grid-template-columns: 1fr 320px; gap: 28px; margin-top: 28px; align-items: start; }
.viewer { background: var(--surface); border-radius: var(--radius); display: flex; justify-content: center; overflow: hidden; }
.viewer img { max-width: 100%; max-height: 78vh; display: block; user-select: none; -webkit-user-drag: none; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: sticky; top: 88px; }
.panel h1 { font-size: 24px; margin: 8px 0 16px; }
.panel .chips { margin-bottom: 20px; }
.tag { font-size: 12px; color: var(--accent); background: rgba(245,181,68,.12); padding: 3px 10px; border-radius: 6px; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 18px; font-size: 14px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; text-align: right; }
.section-title { font-size: 18px; margin: 40px 0 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid4 .tile { margin: 0; aspect-ratio: 4/3; }
.grid4 .tile img { height: 100%; object-fit: cover; }

/* 卡片 / 登录 */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; }
.card h3 { margin: 0 0 8px; font-size: 14px; color: var(--muted); font-weight: 500; }
.card .big { font-size: 20px; font-weight: 600; margin: 0 0 4px; }
.narrow { max-width: 400px; margin: 60px auto; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }

/* 会员价格 */
.center-head { text-align: center; margin: 48px 0 32px; }
.center-head h1 { margin-bottom: 6px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 340px)); gap: 22px; justify-content: center; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 30px; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 20px 60px -20px rgba(245,181,68,.35); }
.plan h2 { margin: 0; font-size: 18px; }
.price { margin: 14px 0 18px; color: var(--muted); }
.price b { font-size: 44px; color: var(--text); margin: 0 2px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; }
.plan li { padding: 6px 0 6px 24px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); }
.ribbon { position: absolute; top: 18px; right: 18px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.demo-note { margin-top: 28px; font-size: 13px; }

/* 后台 / 表格 */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stats b { display: block; font-size: 26px; }
.stats span { color: var(--muted); font-size: 13px; }
.upload { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; align-items: end; }
.upload .btn { grid-column: 1 / -1; justify-self: start; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
.table th { color: var(--muted); font-weight: 500; background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.mini { width: 56px; height: 40px; object-fit: cover; border-radius: 6px; display: block; }

.footer { color: var(--muted); font-size: 13px; padding: 48px 20px 36px; text-align: center; }

/* 手机 */
@media (max-width: 820px) {
  .nav-inner { gap: 12px; }
  .search { display: none; }
  .hero { flex-direction: column; align-items: flex-start; padding: 24px; }
  .hero h1 { font-size: 24px; }
  .masonry { columns: 2 150px; column-gap: 10px; }
  .tile { margin-bottom: 10px; }
  .tile-info { opacity: 1; font-size: 12px; padding: 20px 10px 8px; }
  .detail { grid-template-columns: 1fr; }
  .panel { position: static; }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .upload { grid-template-columns: 1fr; }
  .table { display: block; overflow-x: auto; }
}

/* 分区 */
.zones { display: flex; gap: 10px; margin: 26px 0 0; flex-wrap: wrap; }
.zone-tab { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; }
.zone-tab small { color: var(--muted); font-weight: 400; }
.zone-tab:hover { border-color: var(--muted); }
.zone-tab.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.zone-tab.on small { color: inherit; opacity: .6; }
.zone-tab.z-free.on { background: var(--free); border-color: var(--free); color: #04140c; }
.zone-tab.z-normal.on { background: var(--normal); border-color: var(--normal); color: #041021; }
.zone-tab.z-vip.on { background: var(--vip); border-color: var(--vip); color: var(--accent-ink); }
.zone-note { margin: -6px 0 16px; }
.zone-badge { position: absolute; top: 10px; left: 10px; z-index: 1; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 6px; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); }
.zone-badge.static { position: static; display: inline-block; margin-right: 6px; }
.zone-badge.z-free { color: var(--free); }
.zone-badge.z-normal { color: var(--normal); }
.zone-badge.z-vip { color: #1a1305; background: var(--vip); }
.zone-badge.static.z-free { background: rgba(76,195,138,.14); }
.zone-badge.static.z-normal { background: rgba(90,162,245,.14); }
.badge-normal { background: var(--normal); color: #041021; }
.count { display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }

/* 会员页 */
.compare { max-width: 700px; margin: 0 auto 28px; }
.compare td, .compare th { text-align: center; }
.compare td:first-child, .compare th:first-child { text-align: left; }
.yes { color: var(--free); font-weight: 700; }
.no { color: var(--muted); }
.plan-desc { margin: 4px 0 14px; font-size: 13px; }
.plan-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--line); }
.plan-row .price { margin: 0; }
.plan-row .price b { font-size: 34px; }
.plan-row form { margin: 0; }
.save { color: var(--accent); font-size: 12px; }

/* 订单 */
.order { max-width: 560px; margin: 28px auto 0; }
.order-head { display: flex; justify-content: space-between; align-items: start; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1px; }
.amount { color: var(--accent); font-size: 1.15em; }
.status { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.status.s-submitted { background: rgba(90,162,245,.15); color: var(--normal); }
.status.s-paid { background: rgba(76,195,138,.15); color: var(--free); }
.status.s-rejected { background: rgba(239,107,107,.15); color: var(--danger); }
.qrs { display: flex; gap: 20px; justify-content: center; margin: 18px 0 8px; flex-wrap: wrap; }
.qrs figure { margin: 0; text-align: center; }
.qrs img { width: 200px; height: 200px; object-fit: contain; background: #fff; border-radius: 12px; padding: 8px; display: block; }
.qrs figcaption { margin-top: 6px; color: var(--muted); font-size: 13px; }
.pay-tip { background: var(--surface-2); padding: 10px 14px; border-radius: 10px; font-size: 14px; margin: 12px 0 0; }
.order-list { display: grid; gap: 14px; margin-top: 16px; }
.order-item { display: flex; gap: 20px; justify-content: space-between; margin: 0; }
.order-item p { margin: 4px 0; }
.order-line { display: flex; gap: 10px; align-items: center; }
.order-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.order-actions input { flex: 1; min-width: 180px; padding: 7px 12px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.proof { flex-shrink: 0; text-align: center; color: var(--muted); font-size: 12px; }
.proof img { display: block; width: 130px; height: 180px; object-fit: cover; border-radius: 10px; margin-bottom: 4px; background: var(--surface-2); }

/* 后台 */
.admin-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.admin-tabs a { padding: 10px 16px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-tabs a.on { color: var(--text); border-color: var(--accent); }
.upload .full { grid-column: 1 / -1; }
.select-sm, .input-sm { padding: 5px 8px; font-size: 13px; border-radius: 8px; }
.input-sm { width: 70px; }
.select-sm.z-free { color: var(--free); }
.select-sm.z-normal { color: var(--normal); }
.select-sm.z-vip { color: var(--vip); }
.grant { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: 13px; }
.link-btn.accent { color: var(--accent); }
.search-row { display: flex; gap: 8px; max-width: 420px; margin-bottom: 8px; }
.search-row input { flex: 1; }
.qr-settings { display: flex; gap: 20px; margin: 16px 0 20px; flex-wrap: wrap; }
.qr-box { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--surface-2); border-radius: 12px; width: 240px; }
.qr-box img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 8px; }
.qr-empty { aspect-ratio: 1; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); }
.qr-box input[type=file] { font-size: 12px; padding: 6px; }
label.check { flex-direction: row; align-items: center; margin: 0; }

@media (max-width: 820px) {
  .order-item { flex-direction: column; }
  .proof img { width: 100%; height: auto; max-height: 300px; }
  .grant { flex-wrap: wrap; }
}

/* 毛玻璃锁定 */
.tile.locked img { filter: saturate(1.1); }
.tile.locked:hover img { transform: none; }
.lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.35); font-size: 13px; font-weight: 600; background: rgba(15,16,18,.12); }
.lock svg { filter: drop-shadow(0 1px 4px rgba(0,0,0,.35)); }
.viewer { position: relative; }
.viewer .blur-img { width: 100%; max-height: 78vh; object-fit: cover; }
.lock.big { gap: 12px; font-size: 16px; background: rgba(15,16,18,.25); text-align: center; padding: 20px; }
.lock.big svg { width: 40px; height: 40px; }
.lock.big p { margin: 0; }
.lock.big .btn { text-shadow: none; }
.compare tr.group td { background: var(--surface-2); color: var(--muted); font-size: 12px; text-align: left; padding: 6px 16px; }
.frost { color: var(--normal); font-size: 13px; }

.badge-super { background: linear-gradient(90deg, var(--gold), var(--accent)); color: #fff; }
.ribbon-super { background: linear-gradient(90deg, var(--gold), var(--accent)); color: #fff; }
.plans { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); max-width: 1080px; margin: 0 auto; }

.upgrade-note { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.small-note { font-size: 13px; }
.status.s-upgrade { background: rgba(180,140,255,.15); color: #b48cff; }

.plan-row .btn { white-space: nowrap; }
.plan-row .price { white-space: nowrap; }

/* ---------- 手机 App ---------- */
.mobile-only { display: none; }
.tabbar { display: none; }
.offline { padding-top: 22vh; }
.offline img { border-radius: 22px; margin-bottom: 8px; }
.account-head { display: flex; justify-content: space-between; align-items: center; }
.account-head form { margin: 0; }
.app-page { max-width: 760px; margin: 28px auto 0; }
.app-hero { display: flex; gap: 20px; align-items: center; margin-bottom: 22px; }
.app-hero img { border-radius: 22px; box-shadow: 0 12px 40px -12px rgba(245,181,68,.4); flex-shrink: 0; }
.app-hero h1 { margin: 0 0 4px; }
.app-hero p { margin: 0; }
.app-steps ol { margin: 8px 0 10px; padding-left: 20px; }
.app-steps li { padding: 4px 0; }
.small { font-size: 13px; }
.kbd { display: inline-block; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.qr-site { display: inline-block; padding: 10px; background: #fff; border-radius: 12px; margin-top: 6px; }
.qr-site img, .qr-site canvas { display: block; }
.mobile-search { margin: 16px 0 0; }
.mobile-search input { width: 100%; }

@media (max-width: 820px) {
  .mobile-only { display: block; }
  .nav .badge.mobile-only { display: inline-block; margin-left: auto; }
  .links { display: none; }
  .nav { padding-top: env(safe-area-inset-top); }
  .nav-inner { height: 52px; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .footer { padding-bottom: 20px; }
  .zones { margin-top: 14px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .zones::-webkit-scrollbar { display: none; }
  .zone-tab { padding: 8px 14px; white-space: nowrap; }
  .filters .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .filters .chips::-webkit-scrollbar { display: none; }
  .chip { white-space: nowrap; }
  h1 { font-size: 22px; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: rgba(18, 15, 12, .94); backdrop-filter: blur(14px); border-top: 1px solid rgba(214, 165, 78, .2);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; color: var(--muted); font-size: 11px; position: relative; }
  .tabbar a.on { color: var(--accent); }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
  .tabbar .dotcount { position: absolute; top: 4px; left: 55%; font-style: normal; background: var(--danger); color: #fff; font-size: 10px; min-width: 16px; line-height: 16px; border-radius: 8px; text-align: center; padding: 0 4px; }
  .plans { grid-template-columns: 1fr; }
  .compare { overflow-x: auto; }
  .order { margin-top: 16px; }
  .app-hero img { width: 72px; height: 72px; }
}

/* 分类管理 */
.cat-add { display: flex; gap: 10px; flex-wrap: wrap; }
.cat-add input { flex: 1; min-width: 200px; }
.cat-rename, .cat-delete { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cat-rename .input-sm { width: 160px; }
.cat-move .link-btn { font-size: 18px; padding: 0 6px; }
.cat-move .link-btn:disabled { opacity: .25; cursor: default; }
.cat-group .cat-group-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cat-group .group-name { font-size: 16px; font-weight: 600; width: 140px; }
.cat-group .cat-table { margin-bottom: 14px; border: 1px solid var(--line); }
.cat-group .cat-add { margin-top: 4px; }
.img-cats form + form { margin-top: 4px; }
.img-cats label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.filters .chips + .chips { margin-top: 8px; }
.chip-label { font-size: 13px; color: var(--muted); margin-right: 4px; align-self: center; white-space: nowrap; }
.tag + .tag { margin-left: 4px; }
.cat-table .sub-row td { background: var(--surface-2); }
.cat-table .sub-row .input-sm { width: 140px; }
.cat-table .add-sub-row .input-sm { width: 160px; }
.sub-mark { color: var(--muted); padding-left: 8px; }
.cat-filters { display: flex; flex-direction: column; gap: 8px; }
.sub-chips { padding-left: 12px; }
.sub-chips .chip { font-size: 13px; padding: 4px 12px; }
a.tag { text-decoration: none; }
.upload-progress { grid-column: 1 / -1; }
.upload-progress .bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.upload-progress .bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.upload-progress p { margin: 8px 0 0; font-size: 13px; color: var(--muted); word-break: break-all; }
.pw-change { margin-top: 12px; }
.pw-change summary { cursor: pointer; color: var(--accent); font-size: 14px; }
.pw-change form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; max-width: 320px; }

/* 绣花核价 App 页 */
.hejia-hero { display: flex; gap: 24px; align-items: center; margin: 24px 0; flex-wrap: wrap; }
.hejia-icon { border-radius: 26px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.hejia-hero h1 { margin: 0 0 6px; font-size: 30px; }
.hejia-hero h1 small { font-size: 14px; color: var(--muted); font-weight: 400; }
.hejia-sub { margin: 0 0 10px; color: var(--muted); }
.hejia-price { margin: 0 0 8px; font-size: 26px; font-weight: 700; color: var(--accent); }
.hejia-price span { font-size: 14px; font-weight: 400; color: var(--text); margin-left: 6px; }
.hejia-promo { display: inline-block; background: rgba(245,181,68,.15); color: var(--accent); padding: 3px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.hejia-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.hejia-grid .card { margin: 0; }
.hejia-list, .hejia-steps { margin: 8px 0 0; padding-left: 20px; line-height: 1.8; }
.hejia-list li, .hejia-steps li { margin-bottom: 6px; }
.small-note { font-size: 13px; margin: 8px 0 0; }
.hejia-iphone { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.hejia-iphone p { margin: 4px 0 0; font-size: 14px; }
.hejia-qr-box { margin-top: 18px; text-align: center; }
.hejia-qr-box #hejia-qr { display: inline-block; padding: 8px; background: #fff; border-radius: 10px; }
.hejia-qr-box #hejia-qr img, .hejia-qr-box #hejia-qr canvas { display: block; }
.hejia-qr-box p { font-size: 13px; margin: 6px 0 0; }
@media (max-width: 820px) { .desktop-only { display: none; } }


/* ================= 墨缎金线 主题 ================= */
h1, h2, .section-title, .logo, .plan h2, .center-head h1, .card h3 { font-family: var(--serif); font-weight: 700; letter-spacing: 1px; }
::selection { background: rgba(214, 165, 78, .3); }
p a, td a { color: var(--accent-2); }

/* 金色渐变文字 */
.gold-text { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Logo */
.logo { font-size: 20px; letter-spacing: 3px; }
.logo-hoop { width: 32px; height: 32px; flex-shrink: 0; filter: drop-shadow(0 2px 6px rgba(214, 165, 78, .35)); }
.logo .dot { display: none; }
.links a { color: var(--muted); transition: color .2s; }
.links a:hover { color: var(--accent-2); }

/* 按钮：金线 */
.btn { position: relative; background: var(--gold-grad); background-size: 200% 200%; color: var(--accent-ink); font-weight: 700; letter-spacing: 1px;
  box-shadow: 0 10px 28px -12px rgba(214, 165, 78, .7), inset 0 1px 0 rgba(255, 255, 255, .45); transition: transform .2s, box-shadow .2s, background-position .6s; }
.btn::after { content: ""; position: absolute; inset: 3px; border: 1px dashed rgba(60, 38, 8, .35); border-radius: 7px; pointer-events: none; }
.btn:hover { transform: translateY(-2px); background-position: 100% 100%; filter: none; box-shadow: 0 16px 34px -14px rgba(214, 165, 78, .85), inset 0 1px 0 rgba(255,255,255,.5); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid rgba(214, 165, 78, .45); box-shadow: none; }
.btn-ghost::after { display: none; }
.btn-ghost:hover { background: rgba(214, 165, 78, .08); box-shadow: none; }
.btn-outline-gold { background: transparent; color: var(--accent-2); border: 1px solid rgba(214, 165, 78, .55); box-shadow: none; }
.btn-outline-gold::after { border-color: rgba(214, 165, 78, .25); }
.btn-outline-gold:hover { background: rgba(214, 165, 78, .1); box-shadow: none; }

/* 卡片：绸面 + 金色针脚 */
.card, .panel, .plan, .stats div, .qr-box { position: relative;
  background: linear-gradient(160deg, rgba(255, 240, 210, .045), rgba(255, 240, 210, .01) 40%), var(--surface);
  border: 1px solid var(--line); box-shadow: 0 20px 40px -28px rgba(0, 0, 0, .9); }
.card::after, .panel::after, .plan::after {
  content: ""; position: absolute; inset: 7px; border: 1px dashed rgba(214, 165, 78, .28);
  border-radius: calc(var(--radius) - 5px); pointer-events: none; }
.card h3 { color: var(--accent-2); font-size: 16px; margin-bottom: 12px; }
.plan { transition: transform .25s, box-shadow .25s; }
.plan:hover { transform: translateY(-4px); }
.plan.featured { border-color: rgba(214, 165, 78, .7); box-shadow: 0 0 0 1px rgba(214, 165, 78, .5), 0 30px 70px -30px rgba(214, 165, 78, .45); }
.plan.featured::after { border-color: rgba(214, 165, 78, .6); }
.price b { font-family: var(--latin); background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plan li::before { content: "✦"; color: var(--accent); font-size: 11px; top: 9px; }
.ribbon { background: var(--gold-grad); color: var(--accent-ink); }
.badge { background: var(--gold-grad); color: var(--accent-ink); }
.badge-super, .ribbon-super { background: linear-gradient(90deg, #f6dd9d, #c4314a); color: #fff; }
.badge-normal { background: var(--normal); color: #fff; }

/* 小标题：两侧金线装饰 */
.section-title { display: flex; align-items: center; gap: 14px; font-size: 20px; }
.section-title::before, .section-title::after { content: ""; height: 1px; flex: 0 0 40px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 10px); }

/* 输入框 */
input, select { background: rgba(255, 240, 210, .04); border-color: var(--line); color: var(--text); }
input::placeholder { color: #7d715f; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(214, 165, 78, .14); }
select option { background: var(--surface); }

/* ---------- 首页大展示区 ---------- */
.showcase { position: relative; margin: 26px 0 10px; padding: 56px 52px; border-radius: 26px; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; min-height: 440px;
  background:
    radial-gradient(600px 380px at 78% 50%, rgba(214, 165, 78, .16), transparent 70%),
    radial-gradient(500px 300px at 10% 100%, rgba(196, 49, 74, .14), transparent 70%),
    linear-gradient(150deg, #1c1813, #120f0c 60%);
  border: 1px solid rgba(214, 165, 78, .25); }
.showcase::after { content: ""; position: absolute; inset: 10px; border: 1px dashed rgba(214, 165, 78, .3); border-radius: 18px; pointer-events: none; }
.showcase-eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); font-size: 13px; letter-spacing: 6px; margin-bottom: 18px; }
.showcase-eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--accent); }
.showcase h1 { font-size: clamp(36px, 5vw, 62px); line-height: 1.15; margin: 0 0 20px; letter-spacing: 4px; }
.showcase h1 .gold-text { display: block; }
.showcase p.lead { color: var(--muted); font-size: 16px; line-height: 1.9; max-width: 460px; margin: 0 0 28px; }
.showcase-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.showcase-ctas .btn { padding: 14px 28px; font-size: 16px; }
.showcase-stats { display: flex; gap: 34px; margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(214, 165, 78, .18); }
.showcase-stats b { display: block; font-family: var(--latin); font-size: 30px; line-height: 1.1; }
.showcase-stats span { color: var(--muted); font-size: 13px; letter-spacing: 2px; }

/* 右侧：作品装在绣绷里 */
.hoops { position: relative; height: 380px; }
.hoop-frame { position: absolute; border-radius: 50%; padding: 12px; background: conic-gradient(from 210deg, #8a5d22, #e9c27a, #a8772b, #f3d79a, #8a5d22);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 220, 150, .25) inset; animation: floaty 7s ease-in-out infinite; }
.hoop-frame::before { content: ""; position: absolute; top: -14px; left: 50%; width: 22px; height: 18px; transform: translateX(-50%);
  border-radius: 4px; background: linear-gradient(#e9c27a, #8a5d22); box-shadow: 0 4px 10px rgba(0,0,0,.5); }
.hoop-frame .cloth { width: 100%; height: 100%; border-radius: 50%; background: #fbf6ec; overflow: hidden; position: relative;
  box-shadow: inset 0 0 0 3px #6d4818, inset 0 0 30px rgba(0, 0, 0, .25); }
.hoop-frame .cloth::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; border: 1.5px dashed rgba(196, 49, 74, .45); }
.hoop-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hoop-frame:nth-child(1) { width: 260px; height: 260px; top: 30px; left: 18%; z-index: 2; }
.hoop-frame:nth-child(2) { width: 170px; height: 170px; top: 0; right: 2%; animation-delay: -2.5s; }
.hoop-frame:nth-child(3) { width: 150px; height: 150px; bottom: 0; right: 10%; animation-delay: -4.5s; z-index: 3; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-12px) rotate(1.5deg); } }

/* 金线穿针动画 */
.thread { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.thread path { fill: none; stroke: url(#goldThread); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 9 7;
  stroke-dashoffset: 1400; animation: sew 6s ease-out forwards, drift 18s linear 6s infinite; opacity: .85; }
@keyframes sew { from { stroke-dashoffset: 1400; } to { stroke-dashoffset: 0; } }
@keyframes drift { to { stroke-dashoffset: -320; } }

/* 进场动画 */
.reveal { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.reveal.d1 { animation-delay: .12s; } .reveal.d2 { animation-delay: .24s; } .reveal.d3 { animation-delay: .36s; } .reveal.d4 { animation-delay: .5s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* 分区按钮 */
.zone-tab { background: rgba(255, 240, 210, .03); border-color: var(--line); transition: border-color .2s, background .2s; }
.zone-tab:hover { border-color: rgba(214, 165, 78, .5); }
.zone-tab.on { background: var(--gold-grad); color: var(--accent-ink); border-color: transparent; }
.zone-tab.on small { color: inherit; opacity: .65; }
.zone-tab.z-free.on { background: var(--free); color: #06170e; }
.zone-tab.z-normal.on { background: var(--normal); color: #071326; }
.zone-tab.z-vip.on { background: var(--gold-grad); color: var(--accent-ink); }
.zone-tab::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.zone-tab.z-free::before { background: var(--free); }
.zone-tab.z-normal::before { background: var(--normal); }
.zone-tab.z-vip::before { background: var(--vip); }
.zone-tab.on::before { background: currentColor; }

/* 分类标签 */
.chip { background: rgba(255, 240, 210, .03); border-color: var(--line); transition: all .2s; }
.chip:hover { border-color: rgba(214, 165, 78, .5); color: var(--text); }
.chip.on { background: transparent; color: var(--accent-2); border-color: var(--accent); box-shadow: inset 0 0 0 1px rgba(214, 165, 78, .35); }
.chip-label { font-family: var(--serif); color: var(--accent); font-weight: 700; letter-spacing: 2px; }
.sort a.on { color: var(--accent-2); }

/* 作品卡片：象牙白卡纸 + 深色画框 + 金色针脚 */
.tile { background: #fbf6ec; padding: 8px; border-radius: 12px; border: 1px solid #3a3026;
  box-shadow: 0 24px 40px -26px rgba(0, 0, 0, .95); transition: transform .3s, box-shadow .3s; }
.tile:hover { transform: translateY(-4px); box-shadow: 0 30px 50px -24px rgba(0, 0, 0, .95), 0 0 0 1px rgba(214, 165, 78, .6); }
.tile img { border-radius: 6px; }
.tile::after { content: ""; position: absolute; inset: 3px; border: 1.5px dashed transparent; border-radius: 10px; pointer-events: none; transition: border-color .3s; }
.tile:hover::after { border-color: rgba(214, 165, 78, .75); }
.tile:hover img { transform: scale(1.03); }
.tile-info { inset: auto 8px 8px 8px; border-radius: 0 0 6px 6px; color: #fff; background: linear-gradient(transparent, rgba(10, 8, 6, .82)); }
.tile .lock { inset: 8px; border-radius: 6px; }
.zone-badge { top: 16px; left: 16px; background: rgba(14, 12, 10, .78); color: var(--text); border: 1px solid rgba(214, 165, 78, .3); }
.zone-badge.z-free { color: var(--free); }
.zone-badge.z-normal { color: var(--normal); }
.zone-badge.z-vip { background: var(--gold-grad); color: var(--accent-ink); border: 0; }
.zone-badge.static.z-free { background: rgba(92, 184, 137, .12); }
.zone-badge.static.z-normal { background: rgba(111, 156, 224, .12); }

/* 详情页 */
.viewer { background: #fbf6ec; border: 1px solid #3a3026; padding: 10px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9); }
.tag { color: var(--accent-2); background: rgba(214, 165, 78, .08); border: 1px dashed rgba(214, 165, 78, .45); }

/* 表格 */
.table { border: 1px solid var(--line); background: var(--surface); }
.table th { background: var(--surface-2); color: var(--accent); font-weight: 600; }

/* 提示条 */
.flash { background: var(--surface); border-color: var(--line); border-left: 3px solid var(--accent); }

/* 后台标签 */
.admin-tabs { border-color: var(--line); }
.admin-tabs a.on { color: var(--accent-2); border-color: var(--accent); font-weight: 600; }
.status { background: var(--surface-2); }

/* 页脚 */
.footer { position: relative; margin-top: 56px; letter-spacing: 1px; }
.footer::before { content: "✦"; position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); color: var(--accent); font-size: 12px;
  padding: 0 14px; background: var(--bg); }
.footer::after { content: ""; position: absolute; top: 0; left: 50%; width: min(560px, 80%); transform: translateX(-50%); z-index: -1;
  border-top: 1px dashed rgba(214, 165, 78, .35); }

/* 二维码保持白底 */
.qrs img, .qr-box img { border: 1px solid var(--line); }

/* 绣花核价页 */
.hejia-icon { box-shadow: 0 20px 40px -16px rgba(196, 49, 74, .6), 0 0 0 1px rgba(214, 165, 78, .35); }
.hejia-price { font-family: var(--latin); background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hejia-price span { -webkit-text-fill-color: var(--text); font-family: inherit; }
.hejia-promo { background: rgba(214, 165, 78, .12); color: var(--accent-2); border: 1px dashed rgba(214, 165, 78, .45); }
.hejia-hero h1 { font-size: 38px; }

/* 手机 */
@media (max-width: 820px) {
  .showcase { grid-template-columns: 1fr; padding: 34px 22px 26px; min-height: 0; gap: 10px; }
  .showcase h1 { font-size: 34px; letter-spacing: 2px; }
  .showcase p.lead { font-size: 14px; margin-bottom: 20px; }
  .showcase-stats { gap: 22px; margin-top: 24px; }
  .showcase-stats b { font-size: 24px; }
  .hoops { height: 220px; order: -1; }
  .hoop-frame:nth-child(1) { width: 170px; height: 170px; top: 18px; left: 50%; margin-left: -85px; }
  .hoop-frame:nth-child(2) { width: 100px; height: 100px; top: 0; right: 0; }
  .hoop-frame:nth-child(3) { width: 92px; height: 92px; bottom: 0; left: 0; right: auto; }
  .tile { padding: 5px; }
  .tile-info { inset: auto 5px 5px 5px; }
  .tile .lock { inset: 5px; }
  .tabbar a.on { color: var(--accent-2); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .hoop-frame, .thread path { animation: none !important; }
  .thread path { stroke-dashoffset: 0; }
}
.showcase-text, .hoops { position: relative; z-index: 2; }
@media (max-width: 820px) { .thread { display: none; } }

/* ================= 特效 ================= */
/* 金线针脚轨迹画布：盖在页面最上层，不挡点击 */
.fx-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 60; }

/* 滚动浮现（只有特效脚本运行时才先隐藏） */
.fx .fx-reveal { opacity: 0; transform: translateY(26px) scale(.98); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1), box-shadow .3s; }
.fx .fx-reveal.in { opacity: 1; transform: none; }
.fx .tile.fx-reveal.in { transition: opacity .7s ease, transform .25s ease-out, box-shadow .3s; }

/* 聚光：鼠标位置一团柔和金光 */
.card, .panel, .plan, .tile, .showcase { --mx: 50%; --my: 50%; }
.card::before, .panel::before, .plan::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(214, 165, 78, .14), transparent 70%); }
.card:hover::before, .panel:hover::before, .plan:hover::before { opacity: 1; }
.showcase::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(246, 221, 157, .10), transparent 70%); }
.tile { transform-style: preserve-3d; will-change: transform; }
.hoop-frame { transition: translate .4s ease-out; }

/* 扫光：金色按钮、金字隔几秒闪一道光 */
.btn:not(.btn-ghost):not(.btn-outline-gold) { overflow: hidden; }
.btn:not(.btn-ghost):not(.btn-outline-gold)::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg);
  animation: sheen 4.5s ease-in-out infinite; }
@keyframes sheen { 0%, 70% { left: -60%; } 100% { left: 130%; } }
.gold-text { background-size: 220% 100%; animation: goldflow 6s ease-in-out infinite; }
@keyframes goldflow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* Logo 绣绷：鼠标移上去转一下 */
.logo-hoop { transition: transform .6s cubic-bezier(.3, 1.6, .5, 1); }
.logo:hover .logo-hoop { transform: rotate(-18deg) scale(1.08); }

/* 小标题两边的针脚线：进场时缝出来 */
.fx .section-title::before, .fx .section-title::after { animation: stitchIn 1.2s ease-out both; transform-origin: left; }
.fx .section-title::after { transform-origin: right; }
@keyframes stitchIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  .btn::before, .gold-text, .logo-hoop { animation: none !important; transition: none !important; }
}
.logo img.logo-hoop { width: 44px; height: 44px; margin: -4px 0; filter: drop-shadow(0 2px 8px rgba(214, 165, 78, .45)); }
