/* ============ 康齿口腔 99 创始会员卡 · 移动端样式 ============ */
:root {
  --red: #b8151c;
  --red-2: #8e0d13;
  --red-3: #d62329;
  --gold: #f6cf8a;
  --gold-2: #e5b264;
  --cream: #fff3e2;
  --ink: #2b1a15;
  --ink-2: #6b5449;
  --line: #efdcc9;
  --bg: #f6efe7;
  --white: #fff;
  --green: #12a05a;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(120, 30, 20, 0.12);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: #e9e2da;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
input, textarea, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }

.app { max-width: 480px; margin: 0 auto; background: var(--bg); min-height: 100vh; position: relative; overflow-x: hidden; }
.pb-nav { padding-bottom: 92px; }

/* ---------- 通用 ---------- */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.sec-title { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px 0 12px; }
.sec-title b { font-size: 16px; letter-spacing: .5px; color: var(--red-2); }
.sec-title i { flex: 0 0 34px; height: 1px; background: linear-gradient(90deg, transparent, #e7c9a6); }
.sec-title i.r { background: linear-gradient(90deg, #e7c9a6, transparent); }
.muted { color: var(--ink-2); }
.tiny { font-size: 12px; }
.center { text-align: center; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap8 { gap: 8px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.hidden { display: none !important; }

/* ---------- 顶部英雄区 ---------- */
.hero {
  position: relative;
  background: radial-gradient(120% 90% at 50% 0%, #d21f26 0%, #b8151c 45%, #96090f 100%);
  color: #fff;
  padding: 14px 16px 34px;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 14px 14px; pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.brand-row { display: flex; align-items: center; gap: 8px; }
.brand-name {
  font-size: 30px; font-weight: 900; letter-spacing: 1px; line-height: 1;
  text-shadow: 0 2px 0 rgba(0,0,0,.18);
}
.brand-doctor { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.brand-doctor .doc-avatar {
  width: 26px; height: 32px; border-radius: 4px; background: #fff2e2;
  display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.7);
}
.brand-doctor span { font-size: 10px; line-height: 1.3; opacity: .95; max-width: 112px; }

.anniv { display: flex; align-items: stretch; gap: 10px; margin-top: 12px; }
.anniv .num {
  font-size: 78px; font-weight: 900; line-height: .82; letter-spacing: -2px;
  font-family: "DIN Alternate", var(--font);
  text-shadow: 0 3px 0 rgba(0,0,0,.16);
}
.anniv .words { display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.anniv .w {
  background: #fff; color: #b8151c; font-weight: 900; font-size: 25px; line-height: 1;
  padding: 7px 12px; border-radius: 4px; letter-spacing: 2px;
  box-shadow: 0 3px 0 #d8b98f;
}
.anniv .w.hollow { background: transparent; color: #fff; box-shadow: none; border: 2.5px solid #fff; padding: 5px 10px; }

.recruit { margin-top: 14px; font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.recruit em { font-style: normal; font-weight: 900; color: var(--gold); }
.recruit .lim { font-size: 12px; opacity: .9; margin-left: 4px; }
.recruit-bar {
  margin-top: 8px; display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; opacity: .92;
}
.progress { flex: 1; height: 6px; border-radius: 99px; background: rgba(0,0,0,.22); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ffdfa6, #f6b33f); transition: width .6s ease; }

.price-pill {
  margin: 16px auto 0; width: 92%; background: #fff; color: var(--red);
  border-radius: 99px; padding: 9px 10px; text-align: center; font-weight: 900; font-size: 15.5px;
  box-shadow: 0 6px 16px rgba(0,0,0,.22), inset 0 0 0 2px #f4dcbb;
  display: flex; align-items: center; justify-content: center; gap: 2px; flex-wrap: wrap;
}
.price-pill .num { font-size: 25px; font-family: "DIN Alternate", var(--font); margin: 0 1px; letter-spacing: -0.5px; }
.price-pill .tail { color: var(--red); }

/* ---------- 礼包区 ---------- */
.pkg { margin: -18px 0 0; padding: 0 12px 12px; }
.pkg-head {
  position: relative; z-index: 2; margin: 0 auto 6px; width: 68%;
  background: linear-gradient(180deg, #d8b071, #c08e46); color: #fff;
  text-align: center; font-weight: 900; font-size: 16.5px; letter-spacing: 1px;
  padding: 8px 0 9px; border-radius: 99px;
  box-shadow: 0 4px 0 #8f6a30, 0 10px 20px rgba(0,0,0,.18);
  border: 2px solid #f0d9ae;
}
.pkg-body { background: #fff; border-radius: 16px; padding: 14px 12px 8px; box-shadow: var(--shadow); }

.benefit { margin-bottom: 14px; }
.benefit-h {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(180deg, #c9181f, #a80f15); color: #fff;
  font-weight: 900; font-size: 13.5px; letter-spacing: .5px;
  padding: 5px 12px 6px; border-radius: 6px; margin-bottom: 8px;
  position: relative;
}
.benefit-h::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: linear-gradient(90deg, #f3d19a, transparent); border-radius: 0 0 6px 6px; opacity: .6; }

/* 清单 */
.plist { display: flex; flex-direction: column; }
.plist .li {
  display: flex; align-items: center; gap: 8px; padding: 8px 2px;
  border-bottom: 1px dashed #eddfd2; font-size: 14px;
}
.plist .li:last-child { border-bottom: 0; }
.plist .idx { width: 15px; color: #a98f7d; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.plist .nm { flex: 1; font-weight: 600; color: #3a2a22; }
.plist .sp { color: #8a6f5e; font-size: 13px; min-width: 48px; text-align: right; font-variant-numeric: tabular-nums; }
.plist .vl { color: #b8151c; font-weight: 700; font-size: 12.5px; min-width: 72px; text-align: right; font-variant-numeric: tabular-nums; }
.plist .ic { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; background: var(--cream); display: grid; place-items: center; }
.plist .ic svg { width: 15px; height: 15px; stroke: #c58b3e; fill: none; stroke-width: 1.7; }

/* 券栅格 */
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 10px; }
.pgrid .gi {
  display: flex; align-items: center; gap: 6px; font-size: 13px; color: #3a2a22;
  border-bottom: 1px dashed #eddfd2; padding: 6px 0;
}
.pgrid .gi .sp { color: #b8151c; font-weight: 700; margin-left: auto; font-size: 12px; }

/* 文字型福利 */
.extra {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px;
  background: linear-gradient(90deg, #fff4e3, #ffe9cf); border: 1px solid #f4dcbb;
  margin-bottom: 8px;
}
.extra .ic { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(180,120,60,.18); }
.extra .ic svg { width: 17px; height: 17px; stroke: #c58b3e; fill: none; stroke-width: 1.7; }
.extra .t { font-size: 13px; font-weight: 700; color: #8a3a1a; }
.extra .d { font-size: 12.5px; color: #6b5449; }

.total-value {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 4px 0 2px; font-size: 12.5px; color: #8a6f5e;
}
.total-value b { color: #b8151c; font-size: 15px; font-family: "DIN Alternate", var(--font); }

/* ---------- 购买区 ---------- */
.buy-block { margin: 14px 12px 0; background: #fff; border-radius: 16px; padding: 14px; box-shadow: var(--shadow); text-align: center; }
.buy-price { display: flex; align-items: baseline; justify-content: center; gap: 6px; color: var(--red); }
.buy-price .lbl { font-size: 15px; font-weight: 700; }
.buy-price .y { font-size: 20px; font-weight: 700; }
.buy-price .amount { font-size: 46px; font-weight: 900; font-family: "DIN Alternate", var(--font); line-height: 1; letter-spacing: -1px; }
.buy-price .unit { font-size: 17px; font-weight: 700; }
.buy-price s { color: #b0a094; font-size: 13px; margin-left: 4px; }

.btn-primary {
  display: block; width: 100%; margin-top: 12px;
  background: linear-gradient(180deg, #d62329, #a80f15); color: #fff;
  font-size: 17.5px; font-weight: 900; letter-spacing: 2px;
  padding: 14px 0; border-radius: 99px;
  box-shadow: 0 6px 0 #7d0a0f, 0 10px 22px rgba(160,20,20,.3);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-primary:active { transform: translateY(3px); box-shadow: 0 3px 0 #7d0a0f, 0 6px 14px rgba(160,20,20,.3); }
.btn-primary[disabled] { filter: grayscale(.5); opacity: .7; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px solid var(--red); color: var(--red); background: #fff;
  font-weight: 700; font-size: 14px; padding: 9px 18px; border-radius: 99px;
}
.btn-light {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: #fff; color: var(--red-2); font-weight: 700; font-size: 13.5px;
  padding: 9px 16px; border-radius: 99px; border: 1px solid #f0d9be;
}

.qr-hint { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 10px; color: #8a6f5e; font-size: 12px; }
.qr-hint img { width: 54px; height: 54px; border-radius: 6px; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); }

/* ---------- 门店信息 ---------- */
.shop { margin: 14px 12px 0; background: #fff; border-radius: 16px; padding: 14px; box-shadow: var(--shadow); font-size: 13.5px; color: #4a362d; }
.shop .line { display: flex; gap: 8px; padding: 4px 0; }
.shop .line b { color: #8a6f5e; font-weight: 500; flex: 0 0 40px; }
.shop a { color: var(--red); font-weight: 700; }

.rules { margin: 14px 12px 0; padding: 14px; background: #fffaf2; border: 1px dashed #e8cfa9; border-radius: 14px; font-size: 12.5px; color: #7a6255; }
.rules h4 { margin: 0 0 8px; font-size: 13px; color: #8a3a1a; letter-spacing: 1px; }
.rules ol { margin: 0; padding-left: 16px; }
.rules li { margin-bottom: 5px; }

.foot { text-align: center; padding: 22px 0 8px; color: #a89a8e; font-size: 11.5px; line-height: 1.8; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 100%; max-width: 480px; z-index: 60;
  background: rgba(255,255,255,.97); border-top: 1px solid #eee2d5;
  display: flex; padding: 7px 0 calc(9px + env(safe-area-inset-bottom));
  backdrop-filter: blur(8px);
}
.tabbar a { flex: 1; text-align: center; color: #9b8878; font-size: 10.5px; display: block; padding: 2px 0; }
.tabbar a.on { color: var(--red); font-weight: 700; }
.tabbar svg { width: 21px; height: 21px; margin: 0 auto 2px; display: block; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* 悬浮购买条 */
.buybar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 100%; max-width: 480px; z-index: 70;
  background: #fff; border-top: 1px solid #f0e2d3;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 -6px 20px rgba(120,60,40,.08);
}
.buybar .bb-ic { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 9.5px; color: #9b8878; padding: 0 5px; }
.buybar .bb-ic svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.buybar .p { flex: 0 0 auto; color: var(--red); margin-left: 2px; min-width: 62px; }
.buybar .p b { font-size: 24px; font-weight: 900; font-family: "DIN Alternate", var(--font); white-space: nowrap; display: block; line-height: 1.15; }
.buybar .p > span { font-size: 10.5px; color: #9b8878; display: block; line-height: 1.1; white-space: nowrap; }
.buybar .btn-primary { margin: 0; flex: 1; font-size: 16px; padding: 12px 0; letter-spacing: 1px; }

/* ---------- 表单 ---------- */
.form-page { padding: 14px 12px 30px; }
.form-card { background: #fff; border-radius: 16px; padding: 18px 16px; box-shadow: var(--shadow); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: #5a4338; margin-bottom: 6px; }
.field label em { color: var(--red); font-style: normal; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid #e8d9c9; background: #fdfaf6; border-radius: 10px;
  padding: 12px 13px; font-size: 15px; color: var(--ink); outline: none; transition: border .15s, background .15s;
}
.field input:focus, .field textarea:focus { border-color: #d8a96a; background: #fff; }
.field .hint { font-size: 11.5px; color: #a08d80; margin-top: 5px; }
.field.inline { display: flex; gap: 8px; align-items: center; }
.notice-box { background: #fff7e9; border: 1px solid #f5e0bd; color: #8a5a1a; font-size: 12.5px; border-radius: 10px; padding: 10px 12px; line-height: 1.6; }

/* ---------- 会员卡 / 卡券 ---------- */
.member-card {
  margin: 12px; border-radius: 18px; padding: 18px 16px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(120% 120% at 0% 0%, #d61f26 0%, #b01118 55%, #7d0a0f 100%);
  box-shadow: 0 12px 28px rgba(140,15,20,.28);
}
.member-card::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,220,160,.28), transparent 65%);
}
.member-card .mc-top { display: flex; align-items: center; gap: 10px; }
.member-card .av { width: 42px; height: 42px; border-radius: 50%; background: #fff3e2; overflow: hidden; border: 2px solid rgba(255,255,255,.6); display: grid; place-items: center; color: #b8151c; font-weight: 900; }
.member-card .nm { font-size: 16px; font-weight: 800; }
.member-card .sub { font-size: 11.5px; opacity: .85; }
.member-card .no { margin-left: auto; text-align: right; font-size: 10.5px; opacity: .9; }
.member-card .no b { display: block; font-size: 13px; letter-spacing: 1px; font-family: "DIN Alternate", var(--font); }
.member-card .mc-foot { display: flex; gap: 18px; margin-top: 14px; font-size: 11px; opacity: .9; }
.member-card .mc-foot b { display: block; font-size: 17px; font-family: "DIN Alternate", var(--font); }
.member-card .badge { position: absolute; right: 12px; bottom: 12px; font-size: 10px; background: rgba(0,0,0,.2); padding: 3px 8px; border-radius: 99px; letter-spacing: 1px; }

.coupon {
  display: flex; background: #fff; border-radius: 12px; margin-bottom: 10px; overflow: hidden;
  box-shadow: 0 3px 10px rgba(140,80,60,.08); position: relative;
}
.coupon .left { flex: 1; padding: 13px 12px 22px 14px; }
.coupon .nm { font-weight: 800; font-size: 14.5px; color: #33241d; }
.coupon .meta { font-size: 11.5px; color: #9b8878; margin-top: 3px; }
.coupon .right {
  flex: 0 0 88px; background: linear-gradient(180deg, #fff4e4, #ffe7c9);
  border-left: 1px dashed #eccfa9; display: grid; place-items: center; color: #b8151c; font-weight: 800;
}
.coupon .right b { font-size: 20px; font-family: "DIN Alternate", var(--font); line-height: 1; }
.coupon .right span { font-size: 10px; display: block; text-align: center; margin-top: 2px; color: #a4743a; }
.coupon.done { opacity: .55; }
.coupon.done .right { background: #f2efe9; color: #9a9a9a; }
.coupon .bar { position: absolute; left: 14px; right: 100px; bottom: 9px; height: 3px; background: #f3e7d8; border-radius: 9px; overflow: hidden; }
.coupon .bar i { display: block; height: 100%; background: linear-gradient(90deg, #f0b95f, #d6632c); }

/* 二维码弹层 */
.sheet-mask { position: fixed; inset: 0; background: rgba(30,12,8,.55); z-index: 100; display: grid; place-items: center; padding: 20px; }
.sheet {
  background: #fff; border-radius: 18px; width: 100%; max-width: 330px; padding: 22px 20px 18px; text-align: center;
  animation: pop .22s ease;
}
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.sheet h3 { margin: 0 0 2px; font-size: 17px; color: #33241d; }
.sheet .sub { font-size: 12px; color: #9b8878; margin-bottom: 14px; }
.sheet img.qr { width: 200px; height: 200px; margin: 0 auto; border-radius: 10px; }
.sheet .code { font-family: "DIN Alternate", monospace; letter-spacing: 4px; font-size: 19px; font-weight: 800; color: #b8151c; margin-top: 10px; }
.sheet .close { margin-top: 14px; width: 100%; padding: 11px 0; border-radius: 99px; background: #f6efe7; color: #6b5449; font-weight: 700; font-size: 14px; }
.sheet .tip { font-size: 11.5px; color: #a08d80; margin-top: 10px; line-height: 1.6; }

/* ---------- 我的 ---------- */
.wallet { margin: 12px; border-radius: 16px; padding: 16px; color: #fff; background: linear-gradient(135deg, #3a2a22, #57402f); box-shadow: 0 10px 24px rgba(60,40,30,.22); }
.wallet .big { font-size: 34px; font-weight: 900; font-family: "DIN Alternate", var(--font); line-height: 1.1; }
.wallet .lbl { font-size: 11.5px; opacity: .75; }
.wallet .row2 { display: flex; gap: 20px; margin-top: 12px; font-size: 11.5px; opacity: .9; }

.list-card { margin: 12px; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 3px 10px rgba(140,80,60,.07); }
.list-row { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-bottom: 1px solid #f6eee5; font-size: 14px; }
.list-row:last-child { border-bottom: 0; }
.list-row .ic { width: 30px; height: 30px; border-radius: 9px; background: #fff4e4; display: grid; place-items: center; }
.list-row .ic svg { width: 16px; height: 16px; stroke: #c58b3e; fill: none; stroke-width: 1.8; }
.list-row .t { flex: 1; }
.list-row .t small { display: block; color: #a08d80; font-size: 11.5px; }
.list-row .r { color: #9b8878; font-size: 12.5px; }
.list-row .r.red { color: var(--red); font-weight: 800; }
.list-row .arrow { width: 14px; height: 14px; stroke: #c8b8a8; fill: none; stroke-width: 2; }

.empty { text-align: center; padding: 46px 20px; color: #a89a8e; font-size: 13px; }
.empty svg { width: 54px; height: 54px; margin: 0 auto 12px; stroke: #d8c6b4; fill: none; stroke-width: 1.4; }

.tabs { display: flex; gap: 6px; margin: 12px; background: #efe5d9; padding: 4px; border-radius: 99px; }
.tabs button { flex: 1; padding: 8px 0; font-size: 13px; font-weight: 700; color: #8a7263; border-radius: 99px; }
.tabs button.on { background: #fff; color: var(--red); box-shadow: 0 2px 6px rgba(0,0,0,.06); }

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 30px 22px; background: linear-gradient(180deg, #b8151c 0%, #8e0d13 46%, #f6efe7 46.1%, #f6efe7 100%); }
.login-logo { color: #fff; text-align: center; margin-bottom: 26px; }
.login-logo .n { font-size: 34px; font-weight: 900; letter-spacing: 2px; }
.login-logo .s { font-size: 12px; opacity: .85; margin-top: 4px; }

/* ---------- 海报页 ---------- */
.poster-wrap { padding: 12px; }
.poster-holder { background: #fff; border-radius: 14px; padding: 10px; box-shadow: var(--shadow); }
.poster-holder canvas { width: 100%; height: auto; border-radius: 8px; display: block; }
.poster-tips { font-size: 12.5px; color: #8a7263; padding: 12px 4px; line-height: 1.7; }
.copy-box { background: #fffaf2; border: 1px dashed #e8cfa9; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: #6b5449; line-height: 1.6; }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.9);
  background: rgba(30,15,10,.88); color: #fff; padding: 11px 18px; border-radius: 10px;
  font-size: 13.5px; z-index: 999; max-width: 80vw; text-align: center; opacity: 0;
  transition: opacity .2s, transform .2s; pointer-events: none; line-height: 1.5;
}
#toast.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
