/* ============================================================
   云静谷 · 设计系统（零构建单文件样式）
   墨绿 #14332B / 深绿 #1F4A3C / 米金 #C8A35F / 宣纸米白 #F7F4EC
   标题衬线（山水人文感），正文系统无衬线，细线描边 + 微动效
   ============================================================ */

:root {
  --ink: #14332B;
  --pine: #1F4A3C;
  --pine-2: #2C5C49;
  --gold: #C8A35F;
  --gold-deep: #A8853F;
  --gold-soft: rgba(200, 163, 95, 0.2);
  --gold-faint: rgba(200, 163, 95, 0.12);
  --paper: #F7F4EC;
  --card: #FFFDF8;
  --text: #2B2B2B;
  --muted: #77806F;
  --line: #E7E1D0;
  --danger: #B0532F;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(20, 51, 43, 0.08);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--ink); line-height: 1.35; }
h1 { font-size: 34px; letter-spacing: 0.04em; }
h2 { font-size: 26px; letter-spacing: 0.03em; }
h3 { font-size: 19px; }
p { margin: 0; }
a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-deep); }
img, svg { display: block; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 14px; color: var(--text); }

::selection { background: var(--gold-soft); }

/* ---------- 布局 ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.page { animation: fadeUp 0.35s ease both; min-height: 62vh; padding-bottom: 72px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.section { padding: 56px 0 8px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.sec-head .sec-sub { color: var(--muted); font-size: 13px; margin-top: 6px; letter-spacing: 0.08em; }
.sec-line { height: 1px; background: linear-gradient(90deg, var(--gold-soft), transparent 70%); margin: 14px 0 0; }
.sec-more { font-size: 13px; color: var(--gold-deep); white-space: nowrap; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.center { text-align: center; }

/* ---------- 顶栏 ---------- */
#site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 244, 236, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gold-soft);
}
.header-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: 8px; }
.brand-mark { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; flex: none; }
.brand-name { font-family: var(--serif); font-size: 21px; letter-spacing: 0.14em; color: var(--ink); }
.brand-sub { font-size: 10px; letter-spacing: 0.28em; color: var(--gold-deep); display: block; margin-top: -3px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  position: relative; padding: 7px 13px; font-size: 14px; color: #4b5548;
  border-radius: 8px; transition: all 0.2s;
}
.nav a:hover { color: var(--ink); background: var(--gold-faint); }
.nav a.active { color: var(--ink); font-weight: 600; }
.nav a.active::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 1px;
  height: 2px; background: var(--gold); border-radius: 2px;
}
.header-side { display: flex; align-items: center; gap: 12px; }
.bell { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--pine); transition: background 0.2s; }
.bell:hover { background: var(--gold-faint); }
.bell .dot {
  position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; line-height: 16px; text-align: center;
}
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--pine); padding: 5px 10px; border: 1px solid var(--gold-soft); border-radius: 999px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--pine), var(--pine-2));
  color: var(--paper); display: grid; place-items: center;
  font-family: var(--serif); font-size: 14px;
}
.avatar-lg { width: 56px; height: 56px; font-size: 24px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 20px; border-radius: 10px; font-size: 14px; letter-spacing: 0.05em;
  border: 1px solid transparent; transition: all 0.2s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { background: var(--pine); color: var(--paper); }
.btn-gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-deep); border-color: var(--gold-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--pine); border-color: var(--gold-soft); }
.btn-ghost:hover { border-color: var(--gold); background: var(--gold-faint); color: var(--pine); }
.btn-ghost-light { background: rgba(247, 244, 236, 0.08); color: var(--paper); border-color: rgba(247, 244, 236, 0.35); }
.btn-ghost-light:hover { border-color: var(--gold); color: var(--gold); }
.btn-lg { padding: 12px 28px; font-size: 15px; border-radius: 12px; }
.btn-sm { padding: 5px 13px; font-size: 12.5px; border-radius: 8px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--gold-soft);
  border-radius: var(--radius); padding: 22px; transition: all 0.2s;
}
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--gold); }
.card-title { font-size: 17px; margin-bottom: 6px; }
.card-flat { padding: 0; overflow: hidden; }

/* ---------- 徽章 / 标签 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px;
  border-radius: 999px; font-size: 12px; letter-spacing: 0.04em; line-height: 1.7;
}
.tag-green { background: rgba(31, 74, 60, 0.09); color: var(--pine); }
.tag-gold { background: var(--gold-faint); color: var(--gold-deep); border: 1px solid var(--gold-soft); }
.tag-grey { background: #eeeadf; color: #8a8677; }
.tag-red { background: rgba(176, 83, 47, 0.1); color: var(--danger); }
.tag-dark { background: var(--ink); color: var(--paper); }

/* ---------- 封面画（CSS 渐变 + 内联 SVG） ---------- */
.cover { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--pine); }
.cover .cover-art { position: absolute; inset: auto 0 0 0; width: 100%; height: 68%; }
.cover .cover-label {
  position: absolute; left: 16px; bottom: 12px; color: rgba(247, 244, 236, 0.92);
  font-family: var(--serif); letter-spacing: 0.2em; font-size: 15px; text-shadow: 0 1px 8px rgba(0,0,0,0.25);
}
.cover-dendrobium { background: linear-gradient(140deg, #173B2F 10%, #2E5C44 55%, #6E8F6A 115%); }
.cover-pet { background: linear-gradient(140deg, #4A3A28 0%, #7C6742 55%, #C4A874 120%); }
.cover-bigu { background: linear-gradient(150deg, #10241D 0%, #1F4A3C 60%, #3E6B52 120%); }
.cover-meditation { background: linear-gradient(150deg, #1D3532 0%, #35605A 60%, #6E918A 120%); }
.cover-zhanchan { background: linear-gradient(150deg, #26332B 0%, #47594B 60%, #7C8B74 120%); }
.cover-main { background: linear-gradient(150deg, #0F2A22 0%, #1F4A3C 55%, #46735C 120%); }
.cover-partner { background: linear-gradient(150deg, #2E3B34 0%, #4E6355 60%, #84937F 120%); }
.cover-membership { background: linear-gradient(150deg, #21342E 0%, #405D50 60%, #9C8A5E 130%); }
.cover-sm { height: 120px; border-radius: var(--radius) var(--radius) 0 0; }
.cover-md { height: 190px; }

/* ---------- Hero（首页首屏） ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--paper);
  background: linear-gradient(168deg, #0E241D 0%, #1F4A3C 58%, #35624D 110%);
  padding: 96px 0 150px;
}
.hero .hero-art { position: absolute; inset: auto 0 -6px 0; width: 100%; height: 62%; pointer-events: none; }
.hero .hero-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.hero-kicker { color: var(--gold); letter-spacing: 0.42em; font-size: 13px; margin-bottom: 22px; }
.hero-title { color: var(--paper); font-size: 58px; letter-spacing: 0.12em; text-shadow: 0 2px 30px rgba(0,0,0,0.25); }
.hero-sub { margin-top: 22px; max-width: 560px; color: rgba(247, 244, 236, 0.82); font-size: 16px; letter-spacing: 0.06em; }
.hero-cta { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-strip {
  position: relative; z-index: 2; display: flex; gap: 40px; margin-top: 48px; flex-wrap: wrap;
}
.hero-strip .hs-item { border-left: 1px solid rgba(200, 163, 95, 0.4); padding-left: 14px; }
.hero-strip .hs-num { font-family: var(--serif); font-size: 24px; color: var(--gold); }
.hero-strip .hs-cap { font-size: 12px; color: rgba(247, 244, 236, 0.65); letter-spacing: 0.12em; }

/* ---------- 业务入口大卡 ---------- */
.entry-card { display: block; }
.entry-card .cover { border-radius: var(--radius) var(--radius) 0 0; }
.entry-body { padding: 20px 22px 22px; }
.entry-desc { color: var(--muted); font-size: 13.5px; margin: 8px 0 14px; min-height: 42px; }

/* ---------- 商品 / 价格 ---------- */
.price { font-family: var(--serif); color: var(--ink); font-size: 24px; }
.price .yen { font-size: 14px; margin-right: 2px; color: var(--gold-deep); }
.price-origin { color: #b3ad9c; text-decoration: line-through; font-size: 13px; margin-left: 8px; }
.price-free { color: var(--pine); font-family: var(--serif); font-size: 22px; }
.progress { height: 6px; border-radius: 3px; background: #ede8d9; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-deep)); transition: width 0.4s; }
.progress-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; letter-spacing: 0.06em; }
.input, textarea.input, select.input {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: #fffefb; outline: none; transition: border 0.2s, box-shadow 0.2s;
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-faint); }
textarea.input { min-height: 88px; resize: vertical; }
.req::after { content: " *"; color: var(--danger); }
.form-tip { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ---------- Tabs / 筛选 ---------- */
.tabs { display: inline-flex; gap: 6px; padding: 4px; background: #efe9da; border-radius: 999px; }
.tabs a { padding: 7px 20px; border-radius: 999px; font-size: 14px; color: #5c6152; transition: all 0.2s; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { background: var(--ink); color: var(--paper); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 5px 15px; border-radius: 999px; border: 1px solid var(--gold-soft);
  font-size: 13px; color: #5c6152; background: var(--card); transition: all 0.2s;
}
.chip:hover { border-color: var(--gold); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- 会员卡 ---------- */
.member-card { position: relative; display: flex; flex-direction: column; }
.member-card .mc-head { border-radius: var(--radius) var(--radius) 0 0; padding: 22px 22px 18px; color: var(--paper); position: relative; overflow: hidden; }
.member-card .mc-head h3 { color: var(--paper); }
.member-card .mc-head .mc-tag { color: var(--gold); font-size: 12px; letter-spacing: 0.24em; }
.member-card .mc-head .mc-price { font-family: var(--serif); font-size: 30px; margin-top: 10px; }
.member-card .mc-head .mc-price .yen { font-size: 15px; }
.member-card .mc-head .mc-meq { font-size: 12px; color: rgba(247, 244, 236, 0.7); }
.member-card .mc-body { padding: 18px 22px 22px; flex: 1; display: flex; flex-direction: column; }
.member-card .mc-body ul { flex: 1; }
.member-card .mc-body li { position: relative; padding-left: 18px; font-size: 13.5px; margin-bottom: 8px; color: #4b5548; }
.member-card .mc-body li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.member-card.mc-hot { border-color: var(--gold); box-shadow: var(--shadow); }
.mc-badge { position: absolute; top: 16px; right: 16px; background: var(--gold); color: #fff; font-size: 11px; padding: 3px 10px; border-radius: 999px; letter-spacing: 0.1em; }

/* ---------- 时间线（认养周期） ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--gold-soft); }
.tl-item { position: relative; padding: 0 0 22px 12px; }
.tl-item::before {
  content: ""; position: absolute; left: -24px; top: 7px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--card); border: 2px solid var(--gold); transition: all 0.2s;
}
.tl-item.now::before { background: var(--gold); box-shadow: 0 0 0 4px var(--gold-faint); }
.tl-item.done::before { background: var(--pine); border-color: var(--pine); }
.tl-date { font-size: 12.5px; color: var(--muted); }

/* ---------- 打卡日历 ---------- */
.cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.cal-day {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--line); font-size: 13px; color: var(--muted); background: #fffefb;
}
.cal-day.on { background: var(--ink); border-color: var(--ink); color: var(--gold); font-family: var(--serif); }
.cal-day.cur { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-faint); color: var(--gold-deep); font-weight: 600; }
.mood-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.mood-opts .chip { cursor: pointer; user-select: none; }
.mood-opts .chip.active { background: var(--gold); border-color: var(--gold); color: #fff; }

/* ---------- 社群 ---------- */
.post-card .post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-card .post-topic { color: var(--gold-deep); font-size: 12px; }
.post-card .post-title { font-size: 15.5px; margin-bottom: 4px; }
.post-card .post-content { color: #4b5548; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.post-foot { display: flex; align-items: center; gap: 20px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #f0ebdd; }
.post-act { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); background: none; border: none; padding: 2px 4px; transition: color 0.2s; }
.post-act:hover { color: var(--pine); }
.post-act.liked { color: var(--danger); }
.comment-item { padding: 12px 0; border-bottom: 1px dashed #eee8d8; }
.comment-item:last-child { border-bottom: none; }

/* ---------- 消息 ---------- */
.msg-item { display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid #f0ebdd; transition: background 0.2s; cursor: pointer; }
.msg-item:hover { background: #fbf8ef; }
.msg-item.unread { background: #fdfaf1; }
.msg-item.unread .msg-title::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); margin-right: 8px; vertical-align: 2px;
}
.msg-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--gold-faint); color: var(--gold-deep); display: grid; place-items: center; flex: none; font-family: var(--serif); }

/* ---------- 收银台 ---------- */
.cashier { max-width: 480px; margin: 48px auto 0; }
.cashier .cash-amount { font-family: var(--serif); font-size: 44px; color: var(--ink); letter-spacing: 0.02em; }
.cashier .payurl-box {
  background: #f2eee2; border: 1px dashed var(--gold-soft); border-radius: 10px;
  padding: 12px 14px; font-size: 12px; color: #6d6a58; word-break: break-all; font-family: ui-monospace, Consolas, monospace;
}
.notice {
  background: var(--gold-faint); border: 1px solid var(--gold-soft); border-radius: 10px;
  padding: 12px 16px; font-size: 12.5px; color: #7a6635; line-height: 1.8;
}
.notice-dark { background: rgba(20,51,43,0.05); border-color: rgba(31,74,60,0.14); color: var(--pine); }
.notice-danger { background: rgba(176,83,47,0.06); border-color: rgba(176,83,47,0.18); color: var(--danger); }

/* ---------- 空态 / 加载 / 错误 ---------- */
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .empty-mark { font-family: var(--serif); font-size: 40px; color: var(--gold-soft); letter-spacing: 0.3em; margin-bottom: 12px; }
.empty .empty-title { font-size: 16px; color: #5c6152; margin-bottom: 6px; font-family: var(--serif); }
.empty .empty-desc { font-size: 13px; }
.loading { display: grid; place-items: center; padding: 72px 0; color: var(--muted); font-size: 14px; letter-spacing: 0.3em; }
.loading::before {
  content: ""; width: 26px; height: 26px; margin-bottom: 14px; border-radius: 50%;
  border: 2px solid var(--gold-soft); border-top-color: var(--gold); animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-box {
  background: rgba(176, 83, 47, 0.06); border: 1px solid rgba(176, 83, 47, 0.2);
  color: var(--danger); border-radius: var(--radius); padding: 20px 24px; font-size: 14px;
}

/* ---------- Toast / 弹层 ---------- */
#toast-root { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  background: rgba(20, 51, 43, 0.94); color: var(--paper); font-size: 14px; letter-spacing: 0.05em;
  padding: 11px 26px; border-radius: 999px; box-shadow: 0 8px 30px rgba(20,51,43,0.25);
  animation: toastIn 0.25s ease both; max-width: 80vw;
}
.toast.err { background: rgba(140, 56, 30, 0.96); }
.toast.gold { background: rgba(168, 133, 63, 0.97); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
#modal-root .modal-mask {
  position: fixed; inset: 0; z-index: 150; background: rgba(15, 33, 27, 0.45);
  display: grid; place-items: center; padding: 20px; animation: fadeIn 0.2s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: 100%; max-width: 560px; max-height: 82vh; overflow: auto;
  background: var(--card); border-radius: 14px; border: 1px solid var(--gold-soft);
  padding: 26px 28px; animation: fadeUp 0.25s ease both;
}
.modal-title { font-size: 19px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ---------- 表格（规格/对照） ---------- */
.spec-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.spec-table td { padding: 9px 4px; border-bottom: 1px dashed var(--line); }
.spec-table td:first-child { color: var(--muted); width: 92px; letter-spacing: 0.08em; }
.spec-table tr:last-child td { border-bottom: none; }

/* ---------- 页脚 ---------- */
#site-footer { background: #0F211B; color: rgba(247, 244, 236, 0.62); margin-top: 40px; }
.footer-in { padding: 44px 28px 34px; max-width: 1200px; margin: 0 auto; }
.footer-brand { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.footer-brand .fname { font-family: var(--serif); font-size: 20px; color: var(--paper); letter-spacing: 0.2em; }
.footer-brand .fsub { font-size: 11px; letter-spacing: 0.3em; color: var(--gold); }
.footer-disclaimer {
  border: 1px solid rgba(200, 163, 95, 0.25); border-radius: 10px; padding: 14px 18px;
  font-size: 12.5px; line-height: 1.9; margin: 18px 0; color: rgba(247, 244, 236, 0.75);
}
.footer-disclaimer b { color: var(--gold); font-weight: 600; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; }
.footer-links a { color: rgba(247, 244, 236, 0.62); }
.footer-links a:hover { color: var(--gold); }
.footer-copy { margin-top: 20px; font-size: 11.5px; color: rgba(247, 244, 236, 0.35); letter-spacing: 0.1em; }

/* ---------- 详情页布局 ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 400px; gap: 28px; align-items: start; }
.sticky-card { position: sticky; top: 88px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--gold-deep); }
.breadcrumb a:hover { color: var(--ink); }

/* ---------- 数据小卡（用户首页） ---------- */
.stat-card { text-align: center; padding: 18px 10px; }
.stat-num { font-family: var(--serif); font-size: 30px; color: var(--ink); }
.stat-cap { font-size: 12px; color: var(--muted); letter-spacing: 0.14em; margin-top: 2px; }

/* ---------- 排行榜 ---------- */
.rank-item { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px dashed var(--line); }
.rank-item:last-child { border-bottom: none; }
.rank-no { width: 26px; height: 26px; border-radius: 50%; background: var(--gold-faint); color: var(--gold-deep); font-family: var(--serif); font-size: 13px; display: grid; place-items: center; flex: none; }
.rank-item:nth-child(1) .rank-no { background: var(--gold); color: #fff; }
.rank-item:nth-child(2) .rank-no { background: rgba(200,163,95,0.55); color: #fff; }
.rank-item:nth-child(3) .rank-no { background: rgba(200,163,95,0.32); color: #fff; }

/* ---------- 运营后台 ---------- */
.subnav {
  display: flex; gap: 6px; margin-bottom: 26px; padding: 4px;
  background: #efe9da; border-radius: 999px; width: fit-content; flex-wrap: wrap;
}
.subnav a { padding: 7px 20px; border-radius: 999px; font-size: 14px; color: #5c6152; transition: all 0.2s; }
.subnav a:hover { color: var(--ink); }
.subnav a.active { background: var(--ink); color: var(--paper); }

.filter-bar { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; padding: 16px 18px; }
.filter-bar .field { flex: 1; min-width: 150px; margin: 0; }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 860px; }
.table th {
  text-align: left; font-weight: 500; font-size: 12px; letter-spacing: 0.1em;
  color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid #f0ebdd; vertical-align: top; }
.table tbody tr { transition: background 0.2s; }
.table tbody tr:hover { background: #fbf8ef; }
.mono { font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.06em; }

.metric-card { position: relative; display: flex; flex-direction: column; min-height: 168px; }
.metric-action {
  position: absolute; top: 14px; right: 14px; font-size: 11px; letter-spacing: 0.1em;
  color: var(--gold-deep); background: var(--gold-faint); border: 1px solid var(--gold-soft);
  padding: 1px 9px; border-radius: 999px;
}
.metric-label { font-size: 13px; color: var(--muted); letter-spacing: 0.08em; }
.metric-value { font-family: var(--serif); font-size: 34px; color: var(--ink); margin: 10px 0 4px; }
.metric-unit { font-size: 14px; color: var(--muted); margin-left: 4px; }
.metric-todo { color: #b3ad9c; font-size: 22px; padding: 12px 0 6px; letter-spacing: 0.2em; }
.metric-hint { margin-top: auto; font-size: 11.5px; color: var(--muted); line-height: 1.6; }

/* ---------- 内容库 ---------- */
.content-card { cursor: pointer; }
.content-card .post-content { font-size: 14px; }

/* ---------- 核销码卡片 ---------- */
.code-card {
  position: relative; text-align: center; padding: 30px 24px 26px;
  background: linear-gradient(160deg, #fffdf8, #faf6ea);
  border: 1px solid var(--gold); border-radius: 14px;
  box-shadow: inset 0 0 0 4px var(--card), inset 0 0 0 5px var(--gold-soft);
}
.code-card::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: repeating-linear-gradient(90deg, var(--gold-soft) 0 8px, transparent 8px 16px);
}
.code-cap { font-size: 12px; letter-spacing: 0.3em; color: var(--gold-deep); }
.code-value {
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 40px; letter-spacing: 0.14em; color: var(--ink); margin: 14px 0 10px; font-weight: 600;
}
.code-sub { font-size: 13px; color: var(--muted); }

/* ---------- 运营告警条（看板顶部） ---------- */
.alert-bar {
  display: flex; align-items: flex-start; gap: 14px;
  border: 1px solid; border-radius: var(--radius);
  padding: 14px 18px; font-size: 13.5px; line-height: 1.7;
}
.alert-bar + .alert-bar { margin-top: 10px; }
.alert-level {
  flex: none; margin-top: 2px; padding: 2px 12px; border-radius: 999px;
  font-size: 12px; letter-spacing: 0.14em; color: #fff;
}
.alert-body { flex: 1; min-width: 0; }
.alert-body b { color: inherit; }
.alert-action { display: block; font-size: 12.5px; opacity: 0.82; margin-top: 2px; }
.alert-high { background: rgba(176, 83, 47, 0.07); border-color: rgba(176, 83, 47, 0.3); color: var(--danger); }
.alert-high .alert-level { background: var(--danger); }
.alert-medium { background: var(--gold-faint); border-color: var(--gold-soft); color: #7a6635; }
.alert-medium .alert-level { background: var(--gold); }
.alert-ok { background: rgba(31, 74, 60, 0.06); border-color: rgba(31, 74, 60, 0.18); color: var(--pine); }
.alert-ok .alert-level { background: var(--pine); color: var(--paper); }

/* ---------- 资金台账 ---------- */
.tag-brown { background: rgba(122, 90, 52, 0.12); color: #7a5a34; }
.fund-balance {
  background: linear-gradient(150deg, #10241d, #1f4a3c 70%);
  border-color: rgba(200, 163, 95, 0.45); color: var(--paper);
}
.fund-balance .stat-num, .fund-balance .stat-cap { color: var(--paper); }
.fund-balance .stat-cap { color: var(--gold); }

/* ---------- 响应式（768px 可读，桌面优先） ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .sticky-card { position: static; }
  .hero-title { font-size: 42px; }
}
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .header-in { gap: 10px; overflow-x: auto; }
  .brand-sub { display: none; }
  .nav { gap: 0; }
  .nav a { padding: 7px 9px; font-size: 13px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 110px; }
  .hero-title { font-size: 32px; }
  .hero-sub { font-size: 14px; }
  .sec-head { flex-direction: column; align-items: flex-start; }
  .footer-in { padding: 32px 16px 26px; }
  .code-value { font-size: 28px; }
}

/* ============================================================
   UI 升级 V2：统一状态组件（骨架屏/图表/进度环）+ 移动端响应式
   ============================================================ */

/* ---------- 骨架屏 ---------- */
.skl-wrap { display: grid; gap: 14px; }
.skl-card {
  background: #fff; border: 1px solid rgba(200, 163, 95, .25); border-radius: 14px;
  padding: 16px; display: grid; gap: 10px;
}
.skl, .skl-cover, .skl-line { position: relative; overflow: hidden; background: rgba(20, 51, 43, .07); border-radius: 8px; }
.skl-cover { height: 110px; border-radius: 12px; }
.skl-line { height: 13px; }
.skl-line.w90 { width: 90%; } .skl-line.w75 { width: 75%; } .skl-line.w60 { width: 60%; } .skl-line.w40 { width: 40%; }
.skl::after, .skl-cover::after, .skl-line::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(200, 163, 95, .18), transparent);
  animation: skl-shimmer 1.4s infinite;
}
@keyframes skl-shimmer { 100% { transform: translateX(100%); } }

/* ---------- 数据条形图 ---------- */
.chart { display: flex; align-items: flex-end; gap: 10px; min-height: var(--chart-h, 120px); padding: 6px 2px 0; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.chart-bar {
  width: 100%; max-width: 46px; border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #C8A35F, #1F4A3C); transition: height .4s ease;
  min-height: 4px;
}
.chart-label { color: var(--muted, #7A7A72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.chart-sub { color: rgba(20, 51, 43, .45); font-size: 11px; }
.chart-val { font-weight: 700; color: #14332B; }

/* ---------- 进度环 ---------- */
.ring-wrap { position: relative; display: inline-flex; flex-direction: column; align-items: center; }
.ring-num {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -58%);
  font-size: 17px; font-weight: 800; color: #14332B;
}
.ring-label { margin-top: 6px; color: var(--muted, #7A7A72); text-align: center; }

/* ---------- 勋章 / 徽章墙 ---------- */
.medal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px; }
.medal {
  text-align: center; background: #fff; border: 1px solid rgba(200, 163, 95, .3);
  border-radius: 14px; padding: 14px 8px 12px;
}
.medal .medal-icon { font-size: 26px; filter: grayscale(1); opacity: .35; }
.medal.unlocked .medal-icon { filter: none; opacity: 1; }
.medal.unlocked { border-color: #C8A35F; background: linear-gradient(180deg, #fff, #F7F0DF); }
.medal-name { font-size: 12px; font-weight: 700; color: #14332B; margin-top: 6px; }
.medal-desc { font-size: 11px; color: #8A8A8A; margin-top: 3px; line-height: 1.4; }

/* ---------- 问卷 / 知情同意 ---------- */
.q-field { margin-bottom: 18px; }
.q-label { font-size: 13.5px; font-weight: 700; color: #14332B; margin-bottom: 8px; }
.q-label .req { color: #A0522D; }
.q-options { display: flex; gap: 10px; flex-wrap: wrap; }
.q-opt {
  border: 1px solid rgba(200, 163, 95, .4); border-radius: 999px; padding: 8px 18px;
  font-size: 13px; color: #14332B; background: #fff; cursor: pointer; user-select: none;
}
.q-opt.on { background: #14332B; color: #C8A35F; border-color: #14332B; }
.agreement-box {
  background: #F7F0DF; border: 1px solid rgba(200, 163, 95, .4); border-radius: 14px;
  padding: 16px 18px; font-size: 12.5px; line-height: 1.8; color: #5b5142; max-height: 230px; overflow: auto;
}
.agreement-box b { color: #14332B; }
.sign-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.sign-name { border-bottom: 1px solid #C8A35F; padding: 4px 10px; min-width: 180px; font-size: 14px; color: #14332B; }

/* ---------- 兑换商城 ---------- */
.mall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.mall-card { background: #fff; border: 1px solid rgba(200, 163, 95, .28); border-radius: 14px; overflow: hidden; }
.mall-card .mall-body { padding: 12px 14px 14px; }
.mall-price { font-size: 15px; font-weight: 800; color: #8A6A1F; }
.mall-exchange { width: 100%; margin-top: 10px; }

/* ---------- 邀请卡 ---------- */
.invite-card {
  background: linear-gradient(135deg, #14332B, #1F4A3C); border-radius: 18px;
  padding: 26px; color: #E8E0CE; position: relative; overflow: hidden;
}
.invite-code {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 26px; letter-spacing: 5px;
  color: #C8A35F; border: 1px dashed rgba(200, 163, 95, .55); border-radius: 12px;
  display: inline-block; padding: 10px 22px; margin: 10px 0; background: rgba(0, 0, 0, .18);
}
.invite-stat { display: flex; gap: 26px; margin-top: 8px; }
.invite-stat b { font-size: 22px; color: #fff; }

/* ---------- 合同中心 ---------- */
.contract-item { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px dashed rgba(200, 163, 95, .3); }

/* ---------- 移动端响应式（≤768px） ---------- */
@media (max-width: 768px) {
  .container { padding: 0 14px; }
  section.section { padding: 26px 0 48px; }
  h1 { font-size: 24px !important; }
  .hero-main { padding: 40px 0 28px; }
  .grid-2, .grid-3, .cards, .mall-grid, .medal-grid { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .topbar nav { display: none; }
  .topbar-nav-dots { display: flex; gap: 10px; }
  .dual, .split { grid-template-columns: 1fr !important; }
  .metric-card { padding: 14px; }
  .chart { gap: 6px; }
  .invite-stat { gap: 14px; }
  table.data-table { font-size: 12px; display: block; overflow-x: auto; }
  .filter-bar { flex-wrap: wrap; gap: 8px; }
  .modal-card { max-width: 94vw !important; }
}

/* 平板断点（769–1024px）：三列收两列 */
@media (min-width: 769px) and (max-width: 1024px) {
  .mall-grid, .medal-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ============================================================
   V3 移动端重构（手机优先）
   目标：单手可达、卡片不挤压、导航常驻、输入不缩放、首屏像 App
   ============================================================ */

.mobile-only { display: none !important; }
.bottom-nav { display: none; }
.mobile-menu { display: none; }

@media (max-width: 768px) {
  html, body { overflow-x: hidden; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }

  /* ---------- 顶栏 ---------- */
  #site-header { z-index: 80; background: rgba(247, 244, 236, .96); }
  .header-in {
    height: 56px; padding: 0 12px; gap: 8px; overflow: visible;
  }
  .header-in .brand { margin-right: 0; gap: 8px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 10px; }
  .brand-name { font-size: 17px; letter-spacing: .08em; }
  .header-in .nav, .header-in .desktop-only { display: none !important; }
  .header-in .mobile-only { display: flex !important; }
  .header-side { margin-left: auto; gap: 4px; }
  .header-side .user-chip { padding: 3px 6px 3px 3px; font-size: 12px; border-radius: 999px; }
  .header-side .user-chip .avatar { width: 28px; height: 28px; font-size: 12px; }
  .header-side .bell { width: 36px; height: 36px; }
  .header-side .bell svg { width: 20px; height: 20px; }
  .mobile-menu-btn {
    flex: none; width: 38px; height: 38px; display: grid; place-items: center;
    border: 1px solid var(--line); border-radius: 12px;
    background: var(--card); color: var(--pine);
  }
  .mobile-menu-btn svg { width: 21px; height: 21px; }
  .mobile-menu {
    position: absolute; top: 56px; left: 0; right: 0;
    display: none; padding: 10px 12px 16px;
    max-height: calc(100vh - 56px); overflow-y: auto;
    background: rgba(247, 244, 236, .98);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(20, 51, 43, .12);
  }
  .mobile-menu.open { display: block; animation: menuIn .18s ease both; }
  @keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
  .mobile-menu-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 4px 12px 10px; color: var(--muted); font-size: 12px; letter-spacing: .08em;
  }
  .mobile-menu-head span:first-child { color: var(--ink); font-family: var(--serif); font-size: 15px; font-weight: 700; }
  .mobile-menu a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; margin-bottom: 4px; border-radius: 12px;
    font-size: 15px; color: var(--ink); background: var(--card);
    border: 1px solid var(--line);
  }
  .mobile-menu a::after { content: '›'; color: var(--gold-deep); font-size: 18px; }
  .mobile-menu a.active { background: var(--ink); color: var(--gold); border-color: var(--ink); }
  .mobile-menu a.active::after { color: var(--gold); }

  /* ---------- 底部标签栏 ---------- */
  .bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    display: flex; align-items: stretch;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(247, 244, 236, .97);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 24px rgba(20, 51, 43, .06);
  }
  .bottom-tab {
    flex: 1; min-width: 0; min-height: 48px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 0; background: transparent; color: var(--muted);
    font-size: 10.5px; line-height: 1.2; letter-spacing: .02em;
  }
  .bottom-tab svg { width: 22px; height: 22px; }
  .bottom-tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bottom-tab.active { color: var(--pine); font-weight: 700; }
  .bottom-tab.active svg { stroke-width: 2.1; }
  .bottom-tab:active { transform: scale(.94); }

  /* ---------- 内容宽度与卡片 ---------- */
  .page { padding-bottom: 96px; }
  #site-footer { padding-bottom: 24px; }
  .container { padding: 0 14px; }
  section.section { padding: 22px 0 40px; }
  section.section.container { padding-left: 14px; padding-right: 14px; }
  .sec-head { margin-bottom: 18px; }
  .grid-2, .grid-3, .cards, .mall-grid, .medal-grid { grid-template-columns: 1fr !important; gap: 12px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .card { border-radius: 16px; }
  .cover-md { height: 170px; }
  .cover-sm { height: 132px; }

  /* 用户端首页：欢迎卡在窄屏改为纵向，按钮变九宫格 */
  #apphome > .card:first-child {
    flex-direction: column !important; align-items: stretch !important; gap: 14px !important;
    padding: 18px !important;
  }
  #apphome > .card:first-child > div:nth-child(2) {
    flex: none !important; width: 100% !important; min-width: 0 !important;
  }
  #apphome > .card:first-child > div:nth-child(2) h2 { font-size: 22px; }
  #apphome > .card:first-child > div:nth-child(2) p { font-size: 13px; }
  #apphome > .card:first-child > div:nth-child(3) {
    display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px; width: 100%;
  }
  #apphome > .card:first-child > div:nth-child(3) .btn {
    width: 100%; padding: 10px 2px; font-size: 12.5px; letter-spacing: 0;
  }
  .stat-card { min-height: 96px; align-items: center; justify-content: center; text-align: center; }
  .stat-num { font-size: 26px !important; }

  /* 卡片内价格 / 周期不再折行 */
  .row.spread > .price { white-space: nowrap; }
  .price { font-size: 22px; }
  .price-origin { font-size: 12px; margin-left: 5px; }
  .progress-row { font-size: 12px; }

  /* ---------- 首页首屏 ---------- */
  .hero { min-height: auto; padding: 46px 0 32px; }
  .hero-inner { padding: 0 14px; }
  .hero-title { font-size: 30px !important; line-height: 1.28; }
  .hero-sub { font-size: 14px; line-height: 1.75; max-width: 100%; }
  .hero-cta { flex-direction: column; gap: 10px; margin-top: 24px; }
  .hero-cta .btn { width: 100%; min-height: 48px; }
  .hero-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 28px; }
  .hs-item { padding: 10px 6px; }
  .hs-num { font-size: 13px; line-height: 1.35; }
  .hs-cap { font-size: 11px; }
  .hero .cover-art, .hero svg { opacity: .45; }

  /* ---------- 表单 / 按钮 / 输入 ---------- */
  .btn { min-height: 44px; }
  .btn-sm { min-height: 38px; padding: 8px 14px; }
  .input, textarea.input, select.input { width: 100%; font-size: 16px; min-height: 46px; }
  .field label { font-size: 13px; }
  .filter-bar { display: flex; flex-wrap: wrap; gap: 8px; }
  .filter-bar .btn, .tabs .btn { flex: 1 1 auto; }
  table.data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table::-webkit-scrollbar { height: 5px; }
  .data-table::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

  /* ---------- 提示条与弹层 ---------- */
  #toast-root { top: auto; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .toast { max-width: 88vw; font-size: 13px; padding: 10px 16px; }
  .modal-card { max-width: 94vw !important; max-height: 82vh; overflow-y: auto; }
}

@media (max-width: 390px) {
  .header-in { padding: 0 10px; }
  .brand-name { font-size: 16px; }
  .bottom-tab { font-size: 10px; }
  .hero-title { font-size: 27px !important; }
  .price { font-size: 20px; }
}
