/* ============ 易绅数理 H5 · 全局样式（青绿金主题） ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: #cbd5e1;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #1e293b;
  font-size: 15px;
}

/* 手机外壳：桌面端限宽居中，手机端全屏 */
#app {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  background: #f0f9fa;
  box-shadow: 0 0 32px rgba(2, 44, 46, 0.18);
}

/* ---------- 通用布局 ---------- */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.block { display: block; }
.relative { position: relative; }

/* ---------- 文字 ---------- */
.text-xs { font-size: 13px; }
.text-sm { font-size: 15px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 25px; }
.text-3xl { font-size: 31px; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.font-medium { font-weight: 500; }
.font-mono { font-family: ui-monospace, monospace; }
.leading-relaxed { line-height: 1.7; }
.tracking-wide { letter-spacing: 1px; }
.whitespace-nowrap { white-space: nowrap; }
.pre-line { white-space: pre-line; }
.italic { font-style: italic; }

/* ---------- 颜色 ---------- */
.text-white { color: #fff; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-800 { color: #1e293b; }
.text-teal-700 { color: #0f766e; }
.text-teal-800 { color: #115e59; }
.text-teal-900 { color: #134e4a; }
.text-amber-500 { color: #f59e0b; }
.text-amber-600 { color: #d97706; }
.text-amber-700 { color: #b45309; }
.text-amber-800 { color: #92400e; }
.text-amber-900 { color: #78350f; }
.text-amber-950 { color: #451a03; }
.text-amber-100 { color: #fef3c7; }
.text-rose-500 { color: #f43f5e; }
.text-rose-600 { color: #e11d48; }
.text-rose-800 { color: #9f1239; }
.text-rose-900 { color: #881337; }
.text-emerald-600 { color: #059669; }
.text-emerald-800 { color: #065f46; }
.text-teal-50 { color: #f0fdfa; }

/* ---------- 背景 ---------- */
.bg-white { background: #fff; }
.bg-slate-50 { background: #f8fafc; }
.bg-slate-100 { background: #f1f5f9; }
.bg-teal-50 { background: #f0fdfa; }
.bg-teal-100 { background: #ccfbf1; }
.bg-amber-50 { background: #fffbeb; }
.bg-amber-100 { background: #fef3c7; }
.bg-rose-50 { background: #fff1f2; }
.bg-rose-100 { background: #ffe4e6; }
.bg-emerald-50 { background: #ecfdf5; }
.bg-emerald-100 { background: #d1fae5; }
.bg-yishen-teal { background: #0c8a8e; }

/* ---------- 边框 ---------- */
.border { border: 1px solid #e2e8f0; }
.border-teal-100 { border-color: #ccfbf1; }
.border-teal-200 { border-color: #99f6e4; }
.border-slate-100 { border-color: #f1f5f9; }
.border-slate-200 { border-color: #e2e8f0; }
.border-amber-200 { border-color: #fde68a; }
.border-amber-400 { border-color: #fbbf24; }
.border-rose-100 { border-color: #ffe4e6; }
.border-rose-200 { border-color: #fecdd3; }
.border-emerald-100 { border-color: #d1fae5; }
.border-t { border-top: 1px solid #e2e8f0; }
.border-b { border-bottom: 1px solid #e2e8f0; }

/* ---------- 圆角与阴影 ---------- */
.rounded { border-radius: 4px; }
.rounded-md { border-radius: 6px; }
.rounded-lg { border-radius: 8px; }
.rounded-xl { border-radius: 12px; }
.rounded-2xl { border-radius: 16px; }
.rounded-3xl { border-radius: 24px; }
.rounded-full { border-radius: 9999px; }
.shadow { box-shadow: 0 2px 8px rgba(2, 44, 46, 0.10); }
.shadow-lg { box-shadow: 0 6px 16px rgba(2, 44, 46, 0.18); }

/* ---------- 间距 ---------- */
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.py-1 { padding-top: 4px; padding-bottom: 4px; }
.pt-1 { padding-top: 4px; }
.pt-2 { padding-top: 8px; }
.pb-2 { padding-bottom: 8px; }
.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mx-1 { margin-left: 4px; margin-right: 4px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

/* ---------- 组件样式 ---------- */
.card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(2, 44, 46, 0.06);
  border: 1px solid #ccfbf1;
  margin-bottom: 16px;
}
.sec-title-dot { width: 4px; height: 16px; border-radius: 4px; background: #f59e0b; flex-shrink: 0; }
.sec-title-dot-teal { width: 4px; height: 16px; border-radius: 4px; background: #0c8a8e; flex-shrink: 0; }
.sec-title-dot-rose { width: 4px; height: 16px; border-radius: 4px; background: #f43f5e; flex-shrink: 0; }

.btn-primary {
  background: #0c8a8e;
  color: #fff;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 16px;
  border: none;
  cursor: pointer;
  text-align: center;
}
.btn-amber {
  background: #f59e0b;
  color: #fff;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  border: none;
  cursor: pointer;
  width: 100%;
}
.btn-ghost {
  background: #f1f5f9;
  color: #64748b;
  border-radius: 8px;
  font-size: 14px;
  padding: 10px 16px;
  text-align: center;
  cursor: pointer;
}

.tag { font-size: 12px; padding: 2px 6px; border-radius: 9999px; font-weight: 500; display: inline-block; }

.input-num {
  width: 100%;
  text-align: center;
  font-size: 17px;
  font-weight: 900;
  color: #0f172a;
  background: transparent;
  border: none;
  outline: none;
}
.input-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  outline: none;
  width: 100%;
}

/* 顶部标题栏 */
.mine-header {
  background: linear-gradient(90deg, #085f62 0%, #0c8a8e 100%);
  color: #fff;
  padding: 20px 16px 10px;
}
.mine-title-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.mine-logo { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.9); }
.mine-brand { font-weight: 900; font-size: 17px; letter-spacing: 1px; margin-left: 8px; }
.mine-capsule {
  display: flex; align-items: center;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 9999px;
  padding: 4px 10px;
  cursor: pointer;
}
.mine-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; }
.mine-page-title { font-weight: 700; font-size: 14px; color: rgba(255,255,255,0.95); }
.mine-disclaimer { font-size: 11px; color: rgba(255,255,255,0.6); margin-left: auto; padding-left: 8px; text-align: right; }

.page-body { padding: 14px 14px 84px; }

/* 弹窗通用 */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; z-index: 999;
}
.modal-card {
  background: #fff; border-radius: 16px; padding: 20px;
  width: 100%; max-width: 340px;
  max-width: min(340px, calc(100vw - 48px));
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.modal-scroll { max-height: 46vh; overflow-y: auto; margin: 12px 0; }
.video-card { max-width: min(400px, calc(100vw - 32px)); }

/* 弹窗关闭按钮：加大触达面积 */
.modal-close {
  color: #94a3b8;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: -6px -8px 0 0;
  border-radius: 50%;
  flex-shrink: 0;
}
.modal-close:active { background: #f1f5f9; }

/* 评分框（深绿渐变） */
.score-box {
  background: linear-gradient(135deg, #085f62 0%, #0c8a8e 100%);
  border-radius: 12px;
  padding: 14px;
  color: #fff;
  margin-top: 12px;
}

/* ---------- 底部 TabBar ---------- */
.tabbar {
  position: fixed; left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 100%; max-width: 420px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 100;
}
.tabbar-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 0 4px;
  cursor: pointer;
  color: #94a3b8;
  font-size: 11px;
}
.tabbar-item img { width: 24px; height: 24px; margin-bottom: 2px; }
.tabbar-item span { white-space: nowrap; }
.tabbar-item.active { color: #0c8a8e; font-weight: 700; }
.tabbar-emoji { font-size: 22px; line-height: 24px; height: 24px; margin-bottom: 2px; display: block; }
.tabbar-item:not(.active) .tabbar-emoji { opacity: 0.45; filter: grayscale(70%); }

/* ---------- 生日密码页 ---------- */
.chart-wrap {
  background: #d9f5f7;
  border-radius: 16px;
  padding: 12px;
  border: 1px solid #99f6e4;
  margin-bottom: 16px;
}
.chart-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #eefbfc;
  border-radius: 12px;
  padding: 10px 8px;
  border: 1px solid rgba(204, 251, 241, 0.8);
  width: 100%;
}
.chart-input-row { display: flex; align-items: center; margin: 3px 0; }
.chart-label { color: #f59e0b; font-weight: 900; font-size: 10px; width: 14px; text-align: center; }
.chart-input {
  width: 46px; height: 28px;
  background: #ffc300;
  border-radius: 8px;
  border: 1px solid #fbbf24;
  display: flex; align-items: center; justify-content: center;
  margin: 0 3px;
}
.chart-divider {
  height: 155px;
  display: flex; align-items: center; justify-content: center;
  border-left: 2px solid #fb7185;
  padding: 0 2px;
}
.chart-divider-text {
  writing-mode: vertical-rl;
  font-size: 7px;
  color: #64748b;
  letter-spacing: 1px;
  background: #eefbfc;
  padding: 4px 0;
}

.node-sm, .node-lg, .node-xs {
  background: #42b5ea;
  color: #fff; font-weight: 900;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(2, 44, 46, 0.15);
}
.node-sm { width: 28px; height: 28px; font-size: 13px; }
.node-lg { width: 32px; height: 42px; font-size: 15px; }
.node-xs { width: 28px; height: 22px; font-size: 10px; box-shadow: none; }
.node-core {
  width: 48px; height: 48px;
  background: #f7a2a4;
  border: 2px solid #fff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(2, 44, 46, 0.2);
  margin: 4px 0;
  cursor: pointer;
}
.node-core-circle {
  width: 35px; height: 35px;
  border-radius: 50%;
  border: 2px solid #fff;
  color: #fff; font-weight: 900; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}
.group-id-badge {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #f0fdfa;
  color: #115e59;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.group-code {
  font-family: ui-monospace, monospace;
  font-size: 14px; font-weight: 900;
  color: #d97706;
  background: #fffbeb;
  padding: 2px 10px;
  border-radius: 8px;
  border: 1px solid #fde68a;
}
.joint-code-badge {
  padding: 2px 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  color: #fff;
  font-family: ui-monospace, monospace;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 1px;
}

/* ---------- 手机/门牌密码页 ---------- */
.pair-cell {
  width: 23%;
  background: #f8fafc;
  border-radius: 12px;
  padding: 8px 4px;
  border: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pair-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin: 2px 0;
}
.tag-ji { background: #d1fae5; color: #065f46; }
.tag-xiong { background: #ffe4e6; color: #9f1239; }
.tag-fuxi { background: #e0f2fe; color: #075985; }

.dim-tab {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  background: #f1f5f9;
  color: #475569;
}
.dim-tab.active { background: #0c8a8e; color: #fff; font-weight: 700; }

.sub-tab {
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  background: #f1f5f9;
  color: #475569;
}
.sub-tab.active { background: #0c8a8e; color: #fff; font-weight: 700; }

/* ---------- 九宫风水页 ---------- */
.fs-grid-wrap {
  background: #e5e7eb;
  border-radius: 8px;
  padding: 4px;
}
.fs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.fs-cell {
  position: relative;
  border-radius: 4px;
  padding: 12px 4px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fs-cell:active { transform: scale(0.96); }
.fs-cell-active {
  outline: 3px solid #f59e0b;
  outline-offset: -3px;
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.5);
  z-index: 2;
}
.fs-element {
  position: absolute;
  top: 3px; left: 3px;
  background: #ffffff;
  border: 1px solid;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  width: 15px; height: 15px;
  line-height: 14px;
  text-align: center;
}
.fs-pos { font-size: 14px; font-weight: 900; letter-spacing: 1px; }
.fs-name { font-size: 11px; font-weight: 700; margin-top: 2px; }
.fs-type { font-size: 15px; font-weight: 900; margin-top: 1px; }
.fs-effect { font-size: 10px; font-weight: 700; margin-top: 1px; }

.fs-taisui-banner {
  background: #fde047;
  border-radius: 8px;
  padding: 12px 8px 16px;
}
.fs-taisui-title {
  display: block;
  text-align: center;
  color: #b91c1c;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.fs-taisui-row { display: flex; justify-content: space-around; }
.fs-taisui-item { display: flex; flex-direction: column; align-items: center; }
.fs-taisui-circle {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #dc2626;
  color: #fde68a;
  font-size: 24px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.fs-taisui-tags { display: flex; align-items: flex-start; }
.fs-taisui-tagcol {
  display: flex; flex-direction: column; align-items: center;
  margin: 0 2px;
}
.fs-taisui-tagchar { color: #15803d; font-size: 13px; font-weight: 900; line-height: 1.25; }
.fs-taisui-note {
  display: flex; flex-direction: column; align-items: center;
  margin-left: 3px;
}
.fs-taisui-notechar { color: #b91c1c; font-size: 13px; font-weight: 900; line-height: 1.25; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%; top: 45%;
  transform: translate(-50%, -50%);
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 8px;
  z-index: 1200;
  max-width: 80vw;
  text-align: center;
}

/* 档案页返回按钮 */
.back-bar {
  display: flex; align-items: center;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  color: #0f766e;
  font-size: 14px;
  font-weight: 700;
}

.qr-img { width: 210px; display: block; border-radius: 12px; border: 1px solid #e2e8f0; margin: 14px auto; }

/* ---------- 备案页脚 ---------- */
.archive-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}
.archive-banner-close {
  color: #059669;
  cursor: pointer;
  padding: 2px 6px;
  flex-shrink: 0;
}
.disclaimer-bar {
  margin: 0 14px 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 11px;
  text-align: center;
  font-weight: 500;
  line-height: 1.6;
}
.site-footer {
  text-align: center;
  padding: 4px 0 90px;
  font-size: 11px;
}
.site-footer a { color: #94a3b8; text-decoration: none; }

/* ---------- 双人配对页 ---------- */
.match-in {
  font-size: 13px;
  background: #fff;
  border-radius: 8px;
  padding: 5px 0;
}
.match-num-badge {
  width: 56px; height: 56px;
  border-radius: 50%;
  color: #fff;
  font-size: 26px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(2, 44, 46, 0.2);
  border: 2px solid #fff;
}
.match-bar-track {
  height: 8px;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
}
.match-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.4s ease;
}
