/* ==========================================================================
   循美有道 · 邀请 H5 —— 生产样式
   单文件、零外部依赖（除同目录 Vue 运行时）。移动端优先，最大宽 430px 居中。
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
  /* 色彩 */
  --ink: #0b0b0c;
  --ink-2: #0f0e0d;
  --surface: #151413;
  --surface-2: #1c1a18;
  --inset: #100f0e;
  --line: #2c2823;
  --line-2: #463f36;
  --div: #221f1b;

  --paper: #f4efe5;
  --t2: #c6bfb2;
  --t3: #928a7c;
  --t4: #6a6357;

  --red: #b4232f;
  --red-2: #9c1d28;
  --gold: #c8a24a;
  --danger: #e0685c;

  /* 尺寸 */
  --pad: 20px;
  --max: 430px;
  --r: 4px;
  --r-lg: 6px;

  /* 字体 */
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif CJK SC", "Times New Roman", serif;

  /* 动效 */
  --dur: 180ms;
  --dur-lg: 320ms;
  --ease: cubic-bezier(.22, .8, .28, 1);
}

/* ---------- 2. 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
h1, h2, h3, p, dl, dd, dt { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[v-cloak] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- 3. 应用外壳 ---------- */
.app {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  position: relative;
}
.view { display: flex; flex-direction: column; flex: 1; min-height: 100vh; min-height: 100dvh; }
.safe-top { height: 44px; flex: none; }

/* ---------- 4. 品牌字标 ---------- */
.brand { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px var(--pad) 0; }
.brand-mono {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border: 1px solid var(--line-2);
  font-family: var(--serif); font-size: 17px; line-height: 1;
}
.brand-en { font-size: 9px; letter-spacing: .34em; text-indent: .34em; color: var(--t3); }
.brand-cn { font-family: var(--serif); font-size: 12px; letter-spacing: .28em; text-indent: .28em; }
.coprod {
  display: flex; align-items: center; gap: 10px;
  margin: 16px var(--pad) 0;
  font-size: 10px; letter-spacing: .1em; color: var(--t4);
}
.coprod::before, .coprod::after { content: ""; height: 1px; flex: 1; background: var(--div); }

/* ---------- 5. 主视觉 ---------- */
.hero { position: relative; overflow: hidden; padding: 28px var(--pad) 24px; }
.hero::before {
  content: ""; position: absolute; top: -40px; right: -54px;
  width: 104px; height: calc(100% + 80px);
  background: var(--red); opacity: .92;
  transform: skewX(-13deg);
}
.hero::after {
  content: ""; position: absolute; top: -40px; right: 58px;
  width: 1px; height: calc(100% + 80px);
  background: color-mix(in srgb, var(--gold) 52%, transparent);
  transform: skewX(-13deg);
}
.hero > * { position: relative; z-index: 1; }
.hero-eyebrow { font-size: 10px; letter-spacing: .3em; color: var(--gold); }
.hero-title {
  margin: 12px 0 0;
  font-family: var(--serif); font-weight: 400;
  font-size: 42px; line-height: 1.12; letter-spacing: .1em;
}
.hero-sub { margin-top: 8px; font-size: 13px; letter-spacing: .2em; color: var(--t2); }
.hero-lead { margin: 20px 0 0; font-size: 12.5px; line-height: 1.9; letter-spacing: .05em; color: var(--t3); }
.hero-lead b { color: var(--t2); font-weight: 400; }

/* ---------- 6. 元信息双栏 ---------- */
.meta { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--div); border-bottom: 1px solid var(--div); }
.meta-cell { padding: 16px 18px; min-width: 0; }
.meta-cell + .meta-cell { border-left: 1px solid var(--div); }
.meta-k { font-size: 10px; letter-spacing: .24em; color: var(--t4); }
.meta-v { margin-top: 6px; font-size: 13px; }
.meta-s { margin-top: 3px; font-size: 11.5px; color: var(--t3); }

/* ---------- 7. 区块 ---------- */
.sec { padding: 24px var(--pad) 0; }
.sec-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sec-t { font-family: var(--serif); font-size: 17px; letter-spacing: .12em; }
.sec-en { font-size: 9px; letter-spacing: .22em; color: var(--t4); white-space: nowrap; }

.list { margin-top: 12px; }
.list-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 0; border-top: 1px solid var(--div);
}
.list-item:last-child { border-bottom: 1px solid var(--div); }
.list-no { flex: none; width: 20px; font-family: var(--serif); font-size: 12px; color: var(--gold); padding-top: 1px; }
.list-tx { font-size: 13px; line-height: 1.65; color: var(--t2); }

.kv { display: flex; flex-direction: column; gap: 11px; margin-top: 16px; }
.kv-row { display: flex; gap: 12px; }
.kv-k { flex: none; width: 44px; font-size: 11px; letter-spacing: .14em; color: var(--t4); padding-top: 2px; }
.kv-v { font-size: 13px; line-height: 1.6; color: var(--t2); }
.kv-v span { display: block; font-size: 11.5px; color: var(--t3); margin-top: 2px; }

/* ---------- 8. 权益卡 ---------- */
.offer { margin: 24px var(--pad) 32px; padding: 16px; background: var(--surface); border: 1px solid var(--line); }
.offer-row { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; line-height: 1.7; color: var(--t3); }
.offer-row .offer-em { color: var(--gold); }
.offer-ico { flex: none; width: 14px; height: 14px; margin-top: 3px; color: var(--gold); }

/* ---------- 9. 底部常驻行动栏 ---------- */
.action-bar {
  position: sticky; bottom: 0; z-index: 20; margin-top: auto;
  display: flex; align-items: center; gap: 12px;
  padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.bar-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bar-price { font-family: "DIN Alternate", -apple-system, sans-serif; font-size: 20px; line-height: 1.1; }
.bar-price small { font-family: var(--sans); font-size: 11px; color: var(--t3); }
.bar-note { font-size: 10px; letter-spacing: .1em; color: var(--t4); white-space: nowrap; }

/* ---------- 10. 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--r);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur), opacity var(--dur);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--red); color: #fbf6ec; }
.btn-primary:active { background: var(--red-2); }
.btn-secondary { background: var(--surface-2); border-color: var(--line-2); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--t2); }
.btn-sm { height: 34px; font-size: 12.5px; padding: 0 14px; }
.btn-xl { height: 48px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }
.btn-cta { flex: 1; letter-spacing: .16em; }
.btn-spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, #fbf6ec 35%, transparent);
  border-top-color: #fbf6ec;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 11. 内页页头与步骤 ---------- */
.page-head {
  display: flex; align-items: center; gap: 8px;
  height: 52px; padding: 0 12px;
  border-bottom: 1px solid var(--line);
}
.head-title { font-size: 15px; letter-spacing: .16em; }
.back-btn { display: grid; place-items: center; width: 34px; height: 34px; color: var(--t2); border-radius: var(--r); }
.back-btn:active { background: var(--surface-2); }

.steps { display: flex; align-items: center; gap: 8px; padding: 14px var(--pad) 0; }
.step { display: flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: .06em; color: var(--t4); }
.step.is-on { color: var(--paper); }
.step i {
  display: grid; place-items: center; width: 16px; height: 16px;
  border: 1px solid var(--line-2); border-radius: 50%;
  font-size: 9px; font-style: normal;
}
.step.is-on i { background: var(--red); border-color: var(--red); color: #fbf6ec; }
.step-line { flex: 1; height: 1px; background: var(--div); }

/* ---------- 12. 表单 ---------- */
.form { padding: 20px var(--pad) 32px; display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 12px; letter-spacing: .1em; color: var(--t3); }
.field-label .req { color: var(--danger); margin-left: 2px; }
.field-hint { font-size: 11.5px; color: var(--t4); }
.field-msg { display: none; font-size: 11.5px; color: var(--danger); }
.field.has-error .field-msg { display: block; }
.field.has-error .input { border-color: var(--danger); }

.input-wrap { position: relative; }
.input-ico {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--t4); pointer-events: none;
}
.input {
  display: block; width: 100%; height: 46px;
  padding: 0 12px 0 34px;
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--paper); font-size: 14px;
  transition: border-color var(--dur), background var(--dur), box-shadow var(--dur);
  -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: var(--t4); font-size: 12.5px; }
.input:focus { background: var(--surface); border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 16%, transparent); outline: none; }

.captcha-row { display: flex; gap: 8px; }
.captcha-row .input { flex: 1; min-width: 0; letter-spacing: .2em; }
.captcha-btn {
  flex: none; width: 96px; height: 46px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface-2); display: grid; place-items: center;
}
.captcha-btn svg { display: block; }

.form-note { text-align: center; font-size: 11px; line-height: 1.7; color: var(--t4); margin: 0; }

/* ---------- 13. 提交成功页 ---------- */
.fill { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.done { padding: 28px var(--pad) 0; text-align: center; }
.done-ic {
  display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto;
  border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent);
  border-radius: 50%; color: var(--gold);
}
.done-t { margin-top: 16px; font-family: var(--serif); font-size: 24px; letter-spacing: .16em; }
.done-d { margin-top: 8px; font-size: 12.5px; line-height: 1.7; color: var(--t3); }

.reward {
  margin: 20px var(--pad) 0; padding: 16px;
  border: 1px solid color-mix(in srgb, var(--gold) 34%, transparent);
  background: color-mix(in srgb, var(--gold) 7%, transparent);
}
.reward-k { font-size: 10px; letter-spacing: .24em; color: var(--gold); }
.reward-t { margin-top: 8px; font-size: 15px; letter-spacing: .06em; }
.reward-t b { font-family: "DIN Alternate", -apple-system, sans-serif; font-weight: 400; color: var(--gold); }
.reward-d { margin-top: 6px; font-size: 11.5px; line-height: 1.7; color: var(--t3); }

.qr-card {
  margin: 24px var(--pad) 0; padding: 20px 16px;
  background: var(--surface); border: 1px solid var(--line); text-align: center;
}
.qr-img { width: 150px; height: 150px; margin: 0 auto; object-fit: contain; background: var(--paper); }
.qr-ph { position: relative; width: 118px; height: 118px; margin: 0 auto; background: var(--paper); }
.qr-ph::before {
  content: ""; position: absolute; inset: 9px; opacity: .55;
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 3px, transparent 3px 6px),
    repeating-linear-gradient(0deg, var(--ink) 0 3px, transparent 3px 6px);
}
.qr-ph i { position: absolute; width: 26px; height: 26px; border: 5px solid var(--ink); }
.qr-ph i:nth-child(1) { top: 9px; left: 9px; }
.qr-ph i:nth-child(2) { top: 9px; right: 9px; }
.qr-ph i:nth-child(3) { bottom: 9px; left: 9px; }
.qr-t { margin-top: 12px; font-size: 12.5px; color: var(--t2); }
.qr-s { margin-top: 4px; font-size: 11px; color: var(--t4); }

/* ---------- 14. 轻提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(8px);
  z-index: 90; max-width: 80vw;
  padding: 9px 16px; border-radius: var(--r);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  color: var(--ink); font-size: 12.5px; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-lg) var(--ease), transform var(--dur-lg) var(--ease);
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 15. 动效与适配 ---------- */
.fade-up { animation: fadeUp var(--dur-lg) var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (min-width: 431px) {
  .app { box-shadow: 0 0 0 1px var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
