/* 家修智诊 H5 — 扳手快查小程序风 */
:root {
  --brand: #2F6BFF;
  --brand2: #1677FF;
  --brand-dark: #1A4FD6;
  --brand-soft: #EEF3FF;
  --bg: #F5F7FA;
  --bg-blue: #E8F0FF;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #8a94a6;
  --line: #eef0f4;
  --danger: #FF4D4F;
  --caution: #b45309;
  --safe: #047857;
  --orange: #FF8A3D;
  --gold: #E8C07A;
  --radius: 14px;
  --radius-lg: 16px;
  --shadow: 0 4px 16px rgba(47, 107, 255, 0.08);
  --shadow-card: 0 2px 12px rgba(15, 23, 42, 0.06);
  --nav-h: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --app-max: 430px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  background: #dbe4f5;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  min-height: 100%;
}
button, input, select { font: inherit; }
a { color: var(--brand); text-decoration: none; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* 全屏视口底色 + 居中手机壳 */
.phone-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, #cfdcff 0%, #e8eef8 40%, #f0f3f8 100%);
  display: flex;
  justify-content: center;
}
.app {
  width: 100%;
  max-width: var(--app-max);
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 8px);
  box-shadow: 0 0 40px rgba(47, 107, 255, 0.12);
}

.page { display: none; }
.page.on { display: block; }

/* ========== 底栏 ========== */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: var(--app-max);
  z-index: 40;
  background: #fff;
  border-top: 1px solid #eef1f6;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.04);
}
.nav-item {
  border: 0; background: transparent; color: #9aa3b2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 11px; padding: 0; position: relative;
}
.nav-txt { line-height: 1.2; }
.nav-item.on { color: var(--brand); font-weight: 600; }
.nav-ico {
  width: 24px; height: 24px;
  background-color: currentColor;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}
.nav-ico-home {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='9' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 12h8M12 8v8' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M7.5 15.5l9-7' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='9' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 12h8M12 8v8' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M7.5 15.5l9-7' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
}
.nav-ico-docs {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='4' y='3' width='11' height='14' rx='1.5' stroke='black' stroke-width='2'/%3E%3Crect x='9' y='7' width='11' height='14' rx='1.5' stroke='black' stroke-width='2' fill='white'/%3E%3Cpath d='M12 11h5M12 14h4' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='4' y='3' width='11' height='14' rx='1.5' stroke='black' stroke-width='2'/%3E%3Crect x='9' y='7' width='11' height='14' rx='1.5' stroke='black' stroke-width='2' fill='white'/%3E%3Cpath d='M12 11h5M12 14h4' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}
.nav-ico-course {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='3' y='5' width='18' height='14' rx='2.5' stroke='black' stroke-width='2'/%3E%3Cpath d='M10 9.5v5l5-2.5-5-2.5z' fill='black'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='3' y='5' width='18' height='14' rx='2.5' stroke='black' stroke-width='2'/%3E%3Cpath d='M10 9.5v5l5-2.5-5-2.5z' fill='black'/%3E%3C/svg%3E");
}
.nav-ico-mine {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 3l2.2 4.2 4.6.7-3.3 3.3.8 4.6L12 13.8 7.7 15.8l.8-4.6L5.2 7.9l4.6-.7L12 3z' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='2.2' fill='black'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 3l2.2 4.2 4.6.7-3.3 3.3.8 4.6L12 13.8 7.7 15.8l.8-4.6L5.2 7.9l4.6-.7L12 3z' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='2.2' fill='black'/%3E%3C/svg%3E");
}
.nav-badge {
  position: absolute; top: 4px; right: calc(50% - 22px);
  background: #ff3b30; color: #fff; font-size: 8px; font-weight: 700;
  padding: 1px 4px; border-radius: 6px; line-height: 1.2;
  transform: scale(0.92);
}

/* ========== 通用 ========== */
.card {
  background: var(--card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); padding: 14px; margin-bottom: 12px;
}
.h2 { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.h3 { font-size: 14px; font-weight: 700; margin: 0; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.55; }
.tiny { color: var(--muted); font-size: 12px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.row { display: flex; align-items: center; } .gap8 { gap: 8px; } .gap12 { gap: 12px; }
.flex1 { flex: 1; min-width: 0; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }
.safety {
  background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa;
  border-radius: 12px; padding: 10px 12px; font-size: 12px; line-height: 1.5;
  margin: 0 14px 12px;
}
.accent { color: var(--brand); }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 28px); transform: translateX(-50%);
  background: rgba(15,23,42,.92); color: #fff; padding: 10px 16px; border-radius: 999px;
  font-size: 13px; z-index: 80; opacity: 0; pointer-events: none; transition: opacity .2s;
  max-width: min(80%, 360px); text-align: center;
}
.toast.on { opacity: 1; }

/* ========== 首页蓝顶 ========== */
.home-hero {
  background: linear-gradient(165deg, #3B7BFF 0%, #2F6BFF 45%, #1E5AEF 100%);
  color: #fff;
  padding: 18px 16px 72px;
  position: relative;
  overflow: hidden;
}
.home-hero::before,
.home-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  pointer-events: none;
}
.home-hero::before { width: 180px; height: 180px; top: -40px; right: -30px; }
.home-hero::after { width: 120px; height: 120px; bottom: 20px; left: -40px; }
.hero-brand {
  display: flex; align-items: center; gap: 12px; position: relative; z-index: 1;
}
.hero-logo {
  width: 48px; height: 48px; border-radius: 50%;
  background: #fff; color: var(--brand);
  display: grid; place-items: center; font-size: 22px; font-weight: 800;
  box-shadow: 0 4px 12px rgba(0,0,0,.12); flex-shrink: 0;
}
.hero-title { font-size: 22px; font-weight: 800; margin: 0; letter-spacing: .5px; }
.hero-slogan { font-size: 13px; opacity: .92; margin-top: 4px; }
.hero-cta {
  margin-top: 14px; display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 16px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.75); background: rgba(255,255,255,.12);
  color: #fff; font-size: 13px; position: relative; z-index: 1;
}
.hero-notice {
  margin-top: 14px; position: relative; z-index: 1;
  background: rgba(255,255,255,.16); border-radius: 10px;
  padding: 9px 12px; display: flex; align-items: center; gap: 8px;
  font-size: 12px; backdrop-filter: blur(4px);
}
.hero-notice .arrow { margin-left: auto; opacity: .7; }

.home-body { margin-top: -56px; padding: 0 14px 8px; position: relative; z-index: 2; }

/* 查询大卡 */
.query-card {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: 0 8px 28px rgba(47, 107, 255, 0.14);
  padding: 4px 14px 16px; margin-bottom: 12px;
}
.home-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid #f0f2f5; margin: 0 -6px 12px;
}
.home-tab {
  border: 0; background: 0; padding: 14px 2px 12px;
  font-size: 13px; color: #8a94a6; position: relative;
}
.home-tab.on {
  color: var(--brand); font-weight: 700;
}
.home-tab.on::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  transform: translateX(-50%); width: 22px; height: 3px;
  background: var(--brand); border-radius: 3px 3px 0 0;
}

.sel-row {
  display: flex; align-items: center; justify-content: space-between;
  background: #F5F7FA; border-radius: 12px; padding: 14px 14px;
  margin-bottom: 10px; border: 0; width: 100%; text-align: left; color: inherit;
}
.sel-lab { font-size: 14px; color: #334155; font-weight: 500; }
.sel-val { font-size: 14px; color: #94a3b8; display: flex; align-items: center; gap: 4px; }
.sel-val.has { color: #1f2937; font-weight: 600; }

.query-btn {
  display: block; width: 100%; margin-top: 6px;
  background: linear-gradient(180deg, #4B84FF, #2F6BFF);
  color: #fff; border: 0; border-radius: 999px;
  padding: 14px; font-size: 16px; font-weight: 700;
  box-shadow: 0 8px 18px rgba(47, 107, 255, 0.35);
}
.query-btn:active { background: var(--brand-dark); }

.placeholder-box { text-align: center; padding: 18px 8px 8px; }
.ph-ico { font-size: 28px; margin-bottom: 8px; }

.dual-entry { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 12px; }
.entry-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-card);
  padding: 14px 12px; display: flex; gap: 10px; align-items: center;
  border: 0; width: 100%; text-align: left;
}
.entry-ico-wrap {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-size: 18px; flex-shrink: 0;
}
.entry-t { font-weight: 700; font-size: 14px; color: var(--text); }
.entry-s { font-size: 11px; color: var(--muted); margin-top: 2px; }

.promo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.promo {
  border: 0; border-radius: 12px; padding: 14px 12px; text-align: left;
  position: relative; overflow: hidden; min-height: 72px; color: #fff;
  box-shadow: var(--shadow-card);
}
.promo.green { background: linear-gradient(135deg, #34d399, #10b981); }
.promo.orange { background: linear-gradient(135deg, #fb923c, #f97316); }
.promo-t { font-size: 13px; font-weight: 700; line-height: 1.35; position: relative; z-index: 1; max-width: 90%; }
.promo-tag {
  position: absolute; top: 0; right: 0;
  background: rgba(255,255,255,.28); font-size: 10px; padding: 2px 8px;
  border-radius: 0 12px 0 10px; font-weight: 600;
}

/* Sheet */
.sheet-mask, .modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 60;
}
.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: var(--app-max);
  background: #fff; border-radius: 18px 18px 0 0; z-index: 61;
  max-height: 70vh; display: flex; flex-direction: column;
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -8px 30px rgba(0,0,0,.12);
}
.sheet-handle {
  width: 36px; height: 4px; border-radius: 2px; background: #dde1e8;
  margin: 10px auto 6px;
}
.sheet-title { text-align: center; font-weight: 700; font-size: 15px; padding: 4px 16px 10px; }
.sheet-search { padding: 0 14px 10px; }
.sheet-search input {
  width: 100%; border: 0; outline: none; background: #F5F7FA;
  border-radius: 10px; padding: 10px 12px; font-size: 14px;
}
.sheet-list { overflow-y: auto; padding: 0 8px 12px; -webkit-overflow-scrolling: touch; }
.sheet-item {
  display: block; width: 100%; text-align: left; border: 0; background: 0;
  padding: 13px 12px; font-size: 14px; color: #1f2937;
  border-bottom: 1px solid #f3f4f6; border-radius: 0;
}
.sheet-item.on { color: var(--brand); font-weight: 700; background: var(--brand-soft); border-radius: 10px; border-bottom-color: transparent; }
.sheet-item:last-child { border-bottom: 0; }

/* ========== 厂家资料 ========== */
.docs-page { background: #fff; min-height: calc(100vh - var(--nav-h)); padding: 12px 14px 20px; }
.docs-hd {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.docs-hd h1 { margin: 0; font-size: 20px; font-weight: 800; flex-shrink: 0; }
.docs-search {
  flex: 1; display: flex; align-items: center; gap: 6px;
  background: #F3F4F6; border-radius: 999px; padding: 8px 12px;
}
.docs-search input {
  flex: 1; border: 0; outline: none; background: transparent; font-size: 13px; min-width: 0;
  color: var(--text);
}
.docs-search input::placeholder { color: #9ca3af; }
.docs-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.docs-action {
  border: 0; border-radius: 12px; padding: 12px;
  background: linear-gradient(135deg, #EAF1FF, #F5F8FF);
  display: flex; align-items: center; gap: 10px; text-align: left;
}
.docs-action .da-ico {
  width: 36px; height: 36px; border-radius: 10px; background: #fff;
  color: var(--brand); display: grid; place-items: center; font-size: 16px;
  box-shadow: 0 2px 8px rgba(47,107,255,.12);
}
.docs-action .da-t { font-weight: 700; font-size: 14px; }
.docs-action .da-s { font-size: 11px; color: var(--muted); margin-top: 2px; }

.cat-tabs {
  display: flex; gap: 16px; overflow-x: auto; padding: 4px 0 10px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  border-bottom: 1px solid #f0f2f5; margin-bottom: 12px;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex: 0 0 auto; border: 0; background: 0; padding: 6px 2px 10px;
  font-size: 14px; color: #8a94a6; position: relative;
}
.cat-tab.on { color: #111; font-weight: 700; }
.cat-tab.on::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  transform: translateX(-50%); width: 20px; height: 3px;
  background: var(--brand); border-radius: 2px;
}

.book-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.book-cell { cursor: pointer; border: 0; background: transparent; padding: 0; text-align: left; width: 100%; }
.book-cover {
  aspect-ratio: 3/4; border-radius: 10px; color: #fff; padding: 8px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 2px 8px rgba(15,23,42,.08); position: relative; overflow: hidden;
}
.book-cover::after {
  content: ""; position: absolute; inset: auto -20% -30% auto; width: 70%; height: 55%;
  background: rgba(255,255,255,.12); border-radius: 50%;
}
.book-brand-badge {
  align-self: flex-start; font-size: 10px; font-weight: 700;
  background: rgba(255,255,255,.92); color: #1e3a8a;
  padding: 2px 6px; border-radius: 4px; position: relative; z-index: 1;
}
.book-emoji { font-size: 22px; position: relative; z-index: 1; align-self: flex-end; }
.book-series {
  font-size: 10px; line-height: 1.3; opacity: .95; position: relative; z-index: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.book-title {
  font-size: 12px; font-weight: 600; margin-top: 6px; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.35;
}

.key-list { margin: 8px 0 0; padding-left: 18px; }
.key-list li { margin-bottom: 4px; line-height: 1.45; font-size: 13px; color: var(--muted); }

/* ========== 课程 ========== */
.courses-page { padding: 12px 14px 20px; background: var(--bg); min-height: calc(100vh - var(--nav-h)); }
.courses-hd { text-align: center; margin-bottom: 12px; }
.courses-hd h1 { margin: 0; font-size: 18px; font-weight: 800; }
.course-search {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 999px; padding: 10px 14px;
  box-shadow: var(--shadow-card); margin-bottom: 12px;
}
.course-search input {
  flex: 1; border: 0; outline: none; background: transparent; font-size: 14px;
}
.course-banner {
  background: linear-gradient(120deg, #3B7BFF, #2F6BFF 60%, #1A5CFF);
  border-radius: var(--radius-lg); color: #fff; padding: 18px 16px;
  margin-bottom: 14px; position: relative; overflow: hidden;
  min-height: 100px;
}
.course-banner::after {
  content: "👨‍🏫"; position: absolute; right: 12px; bottom: 4px;
  font-size: 52px; opacity: .9; filter: drop-shadow(0 4px 8px rgba(0,0,0,.15));
}
.course-banner .cb-t { font-size: 20px; font-weight: 800; position: relative; z-index: 1; }
.course-banner .cb-s { font-size: 12px; opacity: .9; margin-top: 4px; position: relative; z-index: 1; }
.course-banner .cb-btn {
  margin-top: 12px; display: inline-block; background: #fff; color: var(--brand);
  border: 0; border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 700;
  position: relative; z-index: 1;
}
.course-tabs {
  display: flex; gap: 24px; margin-bottom: 12px; padding: 0 2px;
  border-bottom: 1px solid #eef0f4;
}
.course-tab {
  border: 0; background: 0; padding: 8px 0 10px; font-size: 15px; color: #8a94a6; position: relative;
}
.course-tab.on { color: #111; font-weight: 800; }
.course-tab.on::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 24px; height: 3px; background: var(--brand); border-radius: 2px;
}
.course-row {
  display: flex; gap: 12px; background: #fff; border-radius: 12px;
  padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow-card);
  border: 0; width: 100%; text-align: left; align-items: stretch;
}
.course-thumb {
  width: 96px; height: 72px; flex-shrink: 0; border-radius: 10px; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between; padding: 8px;
  position: relative; overflow: hidden;
}
.course-thumb .ctag {
  font-size: 10px; background: #FF8A3D; padding: 2px 6px; border-radius: 4px;
  align-self: flex-start; font-weight: 700;
}
.course-thumb .clabel { font-size: 13px; font-weight: 700; position: relative; z-index: 1; }
.course-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.course-info .h3 { font-size: 14px; line-height: 1.35; }
.price-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.price-main { color: var(--danger); font-size: 17px; font-weight: 800; }
.vip-badge {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid #ffb4a8; border-radius: 4px; overflow: hidden; font-size: 11px;
}
.vip-badge .vip-l {
  background: linear-gradient(90deg, #ff6b4a, #ff4d4f); color: #fff;
  padding: 2px 5px; font-weight: 800; font-style: italic;
}
.vip-badge .vip-p { color: #ff4d4f; padding: 2px 6px; font-weight: 700; }
.learners { font-size: 11px; color: var(--muted); margin-top: auto; padding-top: 6px; }

/* ========== 会员中心 ========== */
.mine-page {
  background: linear-gradient(180deg, #dce8ff 0%, #F5F7FA 180px);
  min-height: calc(100vh - var(--nav-h)); padding: 16px 14px 20px;
}
.profile-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: #cbd5e1; color: #64748b; display: grid; place-items: center;
  font-weight: 700; font-size: 20px; flex-shrink: 0;
  border: 3px solid rgba(255,255,255,.8);
}
.uid { font-size: 22px; font-weight: 800; margin: 0; }
.mem-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.mem-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: #e2e8f0; color: #64748b;
}
.mem-pill.on { background: #d1fae5; color: #047857; font-weight: 600; }
.open-cap {
  border: 0; background: linear-gradient(90deg, #ff9a4d, #ff7a1a);
  color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
}
.bind-bar {
  background: #fff; border-radius: 12px; padding: 10px 12px;
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  box-shadow: var(--shadow-card); font-size: 12px; color: #64748b;
}
.bind-bar .bind-link { margin-left: auto; color: var(--brand); font-weight: 600; white-space: nowrap; border: 0; background: 0; font-size: 12px; }

.mem-promo {
  background: linear-gradient(105deg, #1a2744, #243556);
  border-radius: 14px; padding: 16px; color: #fff;
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  position: relative; overflow: visible;
}
.mem-promo .mp-ico {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #f6d365, #fda085);
  display: grid; place-items: center; font-size: 16px; flex-shrink: 0;
}
.mem-promo .mp-t { font-size: 14px; font-weight: 700; line-height: 1.35; flex: 1; }
.mem-promo .mp-btn-wrap { position: relative; flex-shrink: 0; }
.mem-promo .mp-btn {
  border: 0; background: linear-gradient(90deg, #e8c07a, #d4a24e);
  color: #3b2a0a; font-weight: 800; font-size: 13px;
  padding: 8px 14px; border-radius: 999px;
}
.mp-bubble {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  background: #ff3b30; color: #fff; font-size: 10px; white-space: nowrap;
  padding: 3px 8px; border-radius: 8px; font-weight: 600;
}
.mp-bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: #ff3b30; border-bottom: 0;
}

.invite-card, .func-card {
  background: #fff; border-radius: var(--radius-lg); padding: 14px;
  box-shadow: var(--shadow-card); margin-bottom: 12px;
}
.sec-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sec-hd .h3 { font-size: 15px; }
.sec-link { border: 0; background: 0; color: var(--brand); font-size: 12px; }
.invite-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; text-align: center;
}
.invite-stats .num { font-size: 18px; font-weight: 800; color: #111; }
.invite-stats .lab { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.3; }

.func-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 8px;
}
.func-item {
  border: 0; background: 0; padding: 4px; text-align: center; color: #334155;
}
.func-item .fi {
  width: 40px; height: 40px; margin: 0 auto 6px; border-radius: 12px;
  background: #F5F7FA; display: grid; place-items: center; font-size: 18px;
}
.func-item .ft { font-size: 11px; line-height: 1.3; }

.plan-modal {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: var(--app-max);
  background: #fff; border-radius: 18px 18px 0 0; z-index: 71;
  padding: 18px 16px calc(16px + var(--safe-bottom));
  box-shadow: 0 -8px 30px rgba(0,0,0,.15);
}
.plan-modal-hd { font-size: 17px; font-weight: 800; text-align: center; }
.plan-modal-sub { font-size: 12px; color: var(--muted); text-align: center; margin: 6px 0 14px; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-card {
  position: relative; border: 1.5px solid #e5e7eb; background: #fff;
  border-radius: 14px; padding: 14px 10px; text-align: center;
}
.plan-card.hot { border-color: var(--brand); background: var(--brand-soft); }
.plan-hot {
  position: absolute; top: -1px; right: 8px;
  background: var(--brand); color: #fff; font-size: 10px;
  padding: 2px 6px; border-radius: 0 0 8px 8px;
}
.plan-price { font-size: 22px; font-weight: 800; color: var(--brand); }
.plan-label { font-size: 14px; font-weight: 700; margin-top: 4px; }
.plan-tip { font-size: 11px; color: var(--muted); margin-top: 2px; }
.plan-cancel {
  display: block; width: 100%; margin-top: 12px; border: 0;
  background: #F5F7FA; border-radius: 12px; padding: 12px;
  font-size: 14px; color: #64748b; font-weight: 600;
}

/* ========== 结果页 ========== */
.result-page { padding: 12px 14px 20px; }
.back-link {
  border: 0; background: transparent; color: var(--brand);
  font-size: 13px; padding: 0 0 10px; font-weight: 600;
}
.code-pill {
  background: #0f172a; color: #fff; font-weight: 700; font-size: 13px;
  padding: 3px 8px; border-radius: 6px; font-family: ui-monospace, Menlo, Consolas, monospace;
}
.tag {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: #f1f5f9; color: #475569;
}
.tag-brand { background: var(--brand-soft); color: var(--brand); }
.tag-danger { background: #fee2e2; color: var(--danger); }
.tag-caution { background: #ffedd5; color: var(--caution); }
.tag-safe { background: #d1fae5; color: var(--safe); }
.li { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; font-size: 13px; line-height: 1.5; }
.dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
  margin-top: 7px; flex-shrink: 0;
}
.step-n {
  width: 18px; height: 18px; border-radius: 50%; background: var(--brand); color: #fff;
  font-size: 11px; display: grid; place-items: center; flex-shrink: 0; margin-top: 2px;
}
.lock-box { position: relative; margin-top: 10px; min-height: 160px; }
.lock-ghost { filter: blur(3px); opacity: .45; user-select: none; pointer-events: none; }
.lock-mask {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.92));
  border-radius: 12px;
}
.lock-ico { font-size: 28px; margin-bottom: 6px; }
.btn {
  display: block; width: 100%; margin-top: 12px;
  background: var(--brand); color: #fff; border: 0; border-radius: 12px;
  padding: 12px; font-size: 15px; font-weight: 700;
}
.btn-sm { width: auto; display: inline-block; padding: 8px 14px; font-size: 13px; margin-top: 0; }
.btn-ghost { background: var(--brand-soft); color: var(--brand); }
.btn-danger-ghost {
  background: #fff; color: #b91c1c; border: 1px solid #fecaca;
  display: block; width: 100%; border-radius: 12px; padding: 12px;
  font-size: 14px; font-weight: 600; margin-top: 12px;
}
.field-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.field-lab { width: 56px; color: var(--muted); font-size: 13px; flex-shrink: 0; }
.field-input {
  flex: 1; border: 0; outline: none; background: transparent;
  font-size: 14px; color: var(--text); min-width: 0;
}
.check-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.check-row label {
  display: flex; align-items: center; gap: 6px; font-size: 13px;
  background: #f8fafc; border-radius: 8px; padding: 6px 10px; border: 1px solid var(--line);
}
.result-box {
  margin-top: 12px; background: var(--brand-soft); border-radius: 12px;
  padding: 12px; color: var(--brand-dark);
}
.result-box strong { font-size: 16px; }
.page-pad { padding: 0 14px 8px; }
