/* 三人拼团 · 学生端。微信内打开为主，手机优先。 */
:root {
  --navy-900: #06114f;
  --navy-800: #0a1a6e;
  --navy-700: #10268f;
  --navy-600: #1a37b0;
  --gold-300: #f8dfa4;
  --gold-400: #f1c977;
  --gold-500: #e2ac4c;
  --gold-600: #b9842c;
  --ink: #141a33;
  --ink-2: #4a5170;
  --ink-3: #8a90a8;
  --line: #e9ebf3;
  --bg: #f3f4f9;
  --card: #fff;
  --ok: #1f9d6b;
  --warn: #d8572a;
  --r-lg: 20px;
  --r-md: 14px;
  --shadow: 0 1px 2px rgba(10, 26, 110, .05), 0 8px 28px rgba(10, 26, 110, .08);
  --num: "DIN Alternate", "Bahnschrift", "DIN", "Helvetica Neue", Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
.app { max-width: 520px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(96px + var(--safe-b)); }
.boot { height: 100vh; display: grid; place-items: center; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--navy-600); animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- 头图 ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  padding: 22px 22px 64px;
  background:
    radial-gradient(120% 70% at 100% 0%, rgba(241, 201, 119, .22), transparent 55%),
    radial-gradient(90% 60% at 0% 100%, rgba(26, 55, 176, .9), transparent 70%),
    linear-gradient(160deg, var(--navy-700) 0%, var(--navy-800) 45%, var(--navy-900) 100%);
}
.hero::after { /* 细金线 */
  content: ""; position: absolute; left: -10%; right: -10%; bottom: 34px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(241, 201, 119, .55), transparent); transform: rotate(-4deg);
}
.brand { font-size: 12px; letter-spacing: .12em; opacity: .72; }
.hero-body { position: relative; z-index: 1; margin-top: 26px; max-width: 62%; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gold-300);
  border: 1px solid rgba(241, 201, 119, .4); border-radius: 99px; padding: 2px 10px;
}
.title { margin: 12px 0 0; font-size: 30px; line-height: 1.18; font-weight: 800; letter-spacing: .02em; }
.title em { font-style: normal; color: var(--gold-400); display: block; }
.sub { margin-top: 10px; font-size: 13px; opacity: .82; }
.teacher {
  position: absolute; right: -4px; bottom: 6px; width: 52%; max-width: 260px; aspect-ratio: 640/592;
  background: url(/static/pt/teacher.jpg) center bottom / cover no-repeat;
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
}
.teacher-name { position: absolute; right: 16px; bottom: 44px; z-index: 2; text-align: right; font-size: 12px; opacity: .9; }
.teacher-name b { display: block; font-size: 16px; letter-spacing: .1em; }

/* 价格 */
.price-card {
  position: relative; z-index: 3; margin: -40px 16px 0; padding: 18px 20px;
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 16px;
}
.price-main { flex: 1; min-width: 0; }
.price-tag { font-size: 12px; color: var(--gold-600); font-weight: 600; letter-spacing: .06em; }
.price { display: flex; align-items: baseline; gap: 4px; color: var(--navy-800); }
.price .cur { font-size: 18px; font-weight: 700; }
.price .num { font: 700 40px/1.05 var(--num); letter-spacing: -.01em; }
.price .unit { font-size: 13px; color: var(--ink-2); }
.price-was { font-size: 12px; color: var(--ink-3); }
.price-was s { margin-left: 4px; }
.price-side { text-align: right; font-size: 12px; color: var(--ink-2); line-height: 1.5; padding-left: 16px; border-left: 1px solid var(--line); }
.price-side b { display: block; font: 700 20px/1.2 var(--num); color: var(--ink); }
.gift { margin: 10px 16px 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gold-600);
  background: linear-gradient(90deg, #fff7e6, #fffdf8); border: 1px solid #f6e3b8; border-radius: 12px; padding: 9px 14px; }
.gift-t b { font-weight: 600; }
.gift-t span { margin-left: 8px; font-size: 12px; color: #a07a3c; }
.gift-imgs { margin: 8px 16px 0; display: grid; grid-auto-flow: column; grid-auto-columns: calc(50% - 4px); gap: 8px; overflow-x: auto; scrollbar-width: none; }
.gift-imgs::-webkit-scrollbar { display: none; }
.gift-imgs img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; display: block; background: #eee; }
.gift i { flex: none; font-style: normal; font-size: 11px; color: #fff; background: var(--gold-500); border-radius: 6px; padding: 1px 6px; }

/* ---------- 通用卡片 ---------- */
.card { margin: 14px 16px 0; padding: 20px; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-h h2 { margin: 0; font-size: 17px; font-weight: 700; }
.muted { color: var(--ink-3); font-size: 13px; }
.small { font-size: 12px; }
.center { text-align: center; }

/* 团 */
.group-no { font: 600 12px var(--num); color: var(--ink-3); letter-spacing: .06em; }
.slots { display: flex; justify-content: center; gap: 22px; margin: 8px 0 18px; position: relative; }
.slot { width: 68px; text-align: center; font-size: 12px; color: var(--ink-2); }
.avatar {
  position: relative; width: 60px; height: 60px; margin: 0 auto 6px; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px; font-weight: 700; color: var(--navy-800);
  background: linear-gradient(145deg, #fff6dd, var(--gold-300)); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gold-400);
}
.avatar.me { color: #fff; background: linear-gradient(145deg, var(--navy-600), var(--navy-800)); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--navy-600); }
.avatar.empty { background: #f6f7fb; color: var(--ink-3); box-shadow: none; border: 1.5px dashed #c9cde0; font-weight: 400; font-size: 26px; }
.avatar .lead { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font-size: 10px; font-weight: 600; line-height: 16px; padding: 0 6px; border-radius: 8px; color: var(--navy-900); background: var(--gold-400); }
.slot .nm { display: block; margin-top: 12px; }

.state { text-align: center; }
.state-title { font-size: 20px; font-weight: 800; letter-spacing: .02em; }
.state-title.ok { color: var(--ok); }
.state-title.wait { color: var(--navy-700); }
.state-title.bad { color: var(--warn); }
.state-sub { margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.countdown { display: inline-flex; gap: 4px; align-items: center; margin-top: 10px; font-size: 12px; color: var(--ink-2); }
.countdown b { font: 700 15px var(--num); color: #fff; background: var(--navy-800); border-radius: 6px; padding: 1px 6px; min-width: 28px; text-align: center; }
.progress { height: 6px; border-radius: 3px; background: #eef0f7; overflow: hidden; margin: 16px 0 4px; }
.progress i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--gold-400), var(--gold-500)); transition: width .6s ease; }

.success-burst { position: relative; width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, #e7f8f0 0 60%, transparent 61%); }
.success-burst svg { width: 34px; height: 34px; }
.success-burst::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(31, 157, 107, .25); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }

/* 推广码 */
.promo {
  margin: 4px 0 16px; padding: 16px; border-radius: var(--r-md); text-align: center;
  background: linear-gradient(150deg, var(--navy-800), var(--navy-900)); color: #fff; position: relative; overflow: hidden;
}
.promo::before { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(241, 201, 119, .3), transparent 70%); }
.promo .lbl { font-size: 12px; opacity: .7; letter-spacing: .1em; }
.promo .code { margin: 4px 0 2px; font: 700 34px/1.2 var(--num); letter-spacing: .14em; color: var(--gold-400); }
.promo .copy { font-size: 12px; color: var(--gold-300); border: 1px solid rgba(241, 201, 119, .45); border-radius: 99px; padding: 3px 12px; }
.stats-row { display: flex; justify-content: center; gap: 28px; margin-top: 12px; font-size: 12px; color: rgba(255, 255, 255, .7); }
.stats-row b { display: block; font: 700 18px var(--num); color: #fff; }

/* 按钮 */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 48px; border-radius: 24px;
  font-size: 16px; font-weight: 600; transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(.98); opacity: .9; }
.btn[disabled] { opacity: .5; }
.btn.gold { color: var(--navy-900); background: linear-gradient(180deg, var(--gold-300), var(--gold-500)); box-shadow: 0 6px 16px rgba(226, 172, 76, .35); }
.btn.navy { color: #fff; background: linear-gradient(180deg, var(--navy-600), var(--navy-800)); box-shadow: 0 6px 16px rgba(16, 38, 143, .25); }
.btn.ghost { color: var(--navy-700); background: #fff; border: 1px solid #d5d9ea; }
.btn.text { height: auto; width: auto; font-size: 13px; color: var(--navy-600); font-weight: 500; }
.btns { display: grid; gap: 10px; }
.btns.two { grid-template-columns: 1fr 1fr; }

/* 选择 */
.choice { display: grid; gap: 12px; }
.choice button {
  display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.choice button:active { border-color: var(--gold-400); box-shadow: 0 0 0 3px rgba(241, 201, 119, .25); }
.choice .ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.choice .ico.g { background: #fff4dc; color: var(--gold-600); }
.choice .ico.n { background: #e9edff; color: var(--navy-600); }
.choice .ico svg { width: 24px; height: 24px; }
.choice b { display: block; font-size: 16px; }
.choice span { font-size: 12px; color: var(--ink-3); }
.choice .arr { margin-left: auto; color: var(--ink-3); }

/* 输入 */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.input {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 12px; border: 1px solid #dfe2ee; background: #fafbfe; outline: none;
  font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--navy-600); background: #fff; box-shadow: 0 0 0 3px rgba(26, 55, 176, .12); }
.input.code { text-align: center; font: 700 26px var(--num); letter-spacing: .4em; text-transform: uppercase; padding-left: calc(16px + .4em); }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 8px; line-height: 1.6; }
.back { text-decoration: none; display: inline-flex; align-items: center; gap: 2px; font-size: 14px; color: var(--ink-2); margin: 14px 16px 0; }

/* 邀请页 */
.invite { text-align: center; padding-top: 24px; }
.invite .who { font-size: 13px; color: var(--ink-2); }
.invite .who b { color: var(--ink); }
.invite h2 { margin: 6px 0 2px; font-size: 20px; }

/* 介绍 */
.intro { display: flex; gap: 14px; align-items: flex-start; }
.intro .pic { flex: none; width: 64px; height: 64px; border-radius: 50%; background: url(/static/pt/teacher.jpg) 50% 12% / 170% auto no-repeat var(--navy-800); }
.intro b { font-size: 16px; }
.intro ul { margin: 4px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--ink-2); }
.feats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.feat { padding: 12px; border-radius: 12px; background: #f7f8fc; }
.feat b { display: block; font-size: 14px; color: var(--navy-800); }
.feat span { font-size: 12px; color: var(--ink-3); }
.rules { margin: 0; padding: 0; list-style: none; counter-reset: r; }
.rules li { position: relative; padding-left: 28px; margin: 0 0 10px; font-size: 13px; color: var(--ink-2); }
.rules li::before { counter-increment: r; content: counter(r); position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%;
  font: 600 11px/18px var(--num); text-align: center; color: var(--navy-800); background: #fff4dc; }

/* 底部操作栏 */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 16px calc(10px + var(--safe-b));
  background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid rgba(233, 235, 243, .8);
}
.dock-in { max-width: 488px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.dock-in.one { grid-template-columns: 1fr; }

/* 顾问 */
.sales { display: flex; align-items: center; gap: 14px; }
.sales img { width: 112px; height: 112px; border-radius: 10px; border: 1px solid var(--line); object-fit: contain; background: #fff; }

/* 提示、弹层 */
.toast { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 99; max-width: 80%;
  padding: 10px 18px; border-radius: 12px; font-size: 14px; color: #fff; background: rgba(20, 26, 51, .88); text-align: center; }
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(6, 17, 79, .55); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet-box { width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; background: #fff; border-radius: 22px 22px 0 0;
  padding: 20px 18px calc(18px + var(--safe-b)); animation: up .25s cubic-bezier(.2, .8, .2, 1); }
.sheet-box h3 { margin: 0 0 12px; font-size: 17px; text-align: center; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
.poster-img { display: block; width: 100%; border-radius: 12px; box-shadow: 0 6px 24px rgba(6, 17, 79, .2); }
.seg { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: #f1f2f8; margin-bottom: 12px; }
.seg button { flex: 1; height: 34px; border-radius: 9px; font-size: 13px; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--navy-800); font-weight: 600; box-shadow: 0 1px 4px rgba(10, 26, 110, .1); }
.share-tip { position: fixed; inset: 0; z-index: 60; background: rgba(6, 17, 79, .8); color: #fff; text-align: right; padding: 18px 26px; font-size: 15px; }
.share-tip svg { width: 70px; height: 70px; }

.foot-note { margin: 22px 16px 0; text-align: center; font-size: 11px; color: var(--ink-3); }
.fade-in { animation: fade .35s ease; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (min-width: 521px) { body { background: #e7e9f2; } .app { background: var(--bg); box-shadow: 0 0 40px rgba(6, 17, 79, .08); } }
