/* ===== 缘分红线 · 人格与命盘配对 ===== */
#page-mystic {
  background:
    radial-gradient(ellipse 70% 45% at 84% 4%, rgba(180, 156, 255, 0.1) 0%, transparent 62%),
    radial-gradient(ellipse 62% 40% at 8% 20%, rgba(180, 156, 255, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(180, 156, 255, 0.08) 0%, transparent 70%),
    #0c0916;
  color: #f5f1ff;
  --m-gold: #b49cff;
  --m-violet: #a78bfa;
  --m-rose: #c9b6ff;
  --m-teal: #c9b6ff;
  --m-line: rgba(180, 156, 255, 0.24);
  --m-card: rgba(22, 16, 40, 0.9);
  --m-dim: #9a92b8;
}
#page-mystic .mystic-wrap { padding: 18px 16px 152px; max-width: 520px; margin: 0 auto; }
#page-mystic .mystic-stars {
  position: fixed; inset: 0; pointer-events: none; opacity: 0.5; z-index: 0;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, #efe8ff, transparent),
    radial-gradient(1px 1px at 32% 8%, #efe8ff, transparent),
    radial-gradient(1.6px 1.6px at 68% 14%, #efe8ff, transparent),
    radial-gradient(1px 1px at 88% 26%, #efe8ff, transparent),
    radial-gradient(1.2px 1.2px at 22% 62%, #efe8ff, transparent),
    radial-gradient(1px 1px at 78% 72%, #efe8ff, transparent),
    radial-gradient(1.4px 1.4px at 48% 40%, #efe8ff, transparent),
    radial-gradient(1px 1px at 8% 88%, #efe8ff, transparent);
  animation: m-twinkle 5s ease-in-out infinite alternate;
}
@keyframes m-twinkle { from { opacity: 0.26; } to { opacity: 0.6; } }
#page-mystic .mystic-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; position: relative; z-index: 2; }
#page-mystic .mystic-head h2 { font-size: 17px; font-weight: 600; letter-spacing: 2px; color: #f5f1ff; }
#page-mystic .mystic-back { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.05); border: 1px solid rgba(180,156,255,0.18); color: #efe8ff; }
#page-mystic .mystic-hero { position: relative; z-index: 2; text-align: center; padding: 6px 0 4px; }
#page-mystic .mystic-orb {
  width: 108px; height: 108px; margin: 0 auto 20px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #efe8ff 0%, #b49cff 26%, #4a3a7a 64%, #1a1230 100%);
  box-shadow: 0 0 38px rgba(180, 156, 255, 0.32), inset 0 0 26px rgba(255,255,255,0.22);
  animation: m-float 4.6s ease-in-out infinite;
  position: relative;
}
#page-mystic .mystic-orb::after {
  content: ''; position: absolute; inset: -10px; border-radius: 50%;
  border: 1px solid rgba(180,156,255,0.32); border-top-color: transparent; border-right-color: transparent;
  animation: m-spin 9s linear infinite;
}
@keyframes m-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes m-spin { to { transform: rotate(360deg); } }
#page-mystic .mystic-title { font-size: 25px; font-weight: 700; letter-spacing: 2px; line-height: 1.4; margin-bottom: 10px; color: #f7f3ff; }
#page-mystic .mystic-title em {
  font-style: normal;
  background: linear-gradient(96deg, #e3d7ff, #b49cff 60%, #8f74ff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
#page-mystic .mystic-sub { font-size: 13px; color: var(--m-dim); line-height: 1.75; max-width: 300px; margin: 0 auto; }
#page-mystic .mystic-stat { display: flex; justify-content: center; gap: 30px; margin: 20px 0 4px; }
#page-mystic .mystic-stat b { display: block; font-size: 19px; color: var(--m-gold); font-weight: 700; }
#page-mystic .mystic-stat span { font-size: 11px; color: var(--m-dim); }
#page-mystic .mystic-btn {
  width: 100%; padding: 15px; border-radius: 14px; font-size: 15px; font-weight: 600;
  background: linear-gradient(120deg, #b49cff, #9a7cff 60%, #7c5cff); color: #04160f;
  border: none; letter-spacing: 1px; box-shadow: 0 8px 22px rgba(180, 156, 255, 0.18);
}
#page-mystic .mystic-btn:active { transform: scale(0.985); }
#page-mystic .mystic-btn.ghost {
  background: rgba(255,255,255,0.03); color: #ddd4f5; border: 1px solid rgba(180,156,255,0.24);
  box-shadow: none;
}
#page-mystic .mystic-note { font-size: 11px; color: var(--m-dim); text-align: center; margin-top: 12px; line-height: 1.7; }
#page-mystic .mystic-card {
  background: var(--m-card); border: 1px solid rgba(180,156,255,0.12); border-radius: 18px; padding: 16px;
  position: relative; z-index: 2;
}
#page-mystic .mystic-progress { height: 4px; border-radius: 99px; background: rgba(255,255,255,0.07); overflow: hidden; margin: 6px 0 20px; }
#page-mystic .mystic-progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #b49cff, #8f74ff); transition: width .35s ease; }
#page-mystic .mystic-qnum { font-size: 11px; color: var(--m-gold); letter-spacing: 2px; margin-bottom: 10px; }
#page-mystic .mystic-q { font-size: 20px; font-weight: 600; line-height: 1.5; margin-bottom: 22px; min-height: 60px; color: #f7f3ff; }
#page-mystic .mystic-opt {
  width: 100%; text-align: left; padding: 15px 16px; border-radius: 14px; margin-bottom: 11px;
  background: rgba(255,255,255,0.035); border: 1px solid rgba(180,156,255,0.13); color: #e4dcfa;
  font-size: 14px; line-height: 1.6; transition: all .18s;
}
#page-mystic .mystic-opt:active { background: rgba(180,156,255,0.16); border-color: rgba(180,156,255,0.42); }
#page-mystic .mystic-field { margin-bottom: 15px; }
#page-mystic .mystic-field label { display: block; font-size: 12px; color: var(--m-dim); margin-bottom: 7px; letter-spacing: .5px; }
#page-mystic .mystic-input {
  width: 100%; background: rgba(255,255,255,0.04); border: 1px solid rgba(180,156,255,0.15);
  border-radius: 11px; padding: 12px 13px; color: #f5f1ff; font-size: 14px; outline: none;
}
#page-mystic .mystic-input:focus { border-color: rgba(180,156,255,0.5); }
#page-mystic .mystic-input::placeholder { color: #7b7099; }
#page-mystic .mystic-row { display: flex; gap: 9px; }
#page-mystic .mystic-chips { display: flex; flex-wrap: wrap; gap: 8px; }
#page-mystic .mystic-chip {
  padding: 8px 14px; border-radius: 99px; font-size: 13px;
  background: rgba(255,255,255,0.035); border: 1px solid rgba(180,156,255,0.13); color: #cfc6e8;
}
#page-mystic .mystic-chip.on { background: rgba(180,156,255,0.14); border-color: rgba(180,156,255,0.55); color: var(--m-gold); }
#page-mystic .mystic-switch { display: flex; background: rgba(255,255,255,0.04); border-radius: 11px; padding: 3px; margin-bottom: 16px; }
#page-mystic .mystic-switch button { flex: 1; padding: 9px; border-radius: 9px; font-size: 13px; color: var(--m-dim); background: transparent; border: none; }
#page-mystic .mystic-switch button.on { background: rgba(180,156,255,0.14); color: var(--m-gold); font-weight: 600; }
#page-mystic .mystic-result-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
#page-mystic .mystic-avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; border: 2px solid rgba(180,156,255,0.42); background: #171128; flex-shrink: 0; }
#page-mystic .mystic-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
#page-mystic .mystic-type { font-size: 25px; font-weight: 700; letter-spacing: 2px; color: var(--m-gold); line-height: 1.1; }
#page-mystic .mystic-type-sub { font-size: 12px; color: var(--m-dim); margin-top: 4px; }
#page-mystic .mystic-tagline { font-size: 13px; color: #cfc6e8; line-height: 1.7; margin: 10px 0 4px; }
#page-mystic .mystic-pillars { text-align: center; letter-spacing: 7px; font-size: 17px; color: var(--m-gold); margin: 14px 0 6px; }
#page-mystic .mystic-elements { display: flex; gap: 6px; margin-top: 12px; }
#page-mystic .mystic-element { flex: 1; text-align: center; padding: 8px 0; border-radius: 10px; background: rgba(255,255,255,0.035); }
#page-mystic .mystic-element b { display: block; font-size: 13px; color: #e9e2fb; }
#page-mystic .mystic-element span { font-size: 10px; color: var(--m-dim); }
#page-mystic .mystic-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(180,156,255,0.28), transparent); margin: 18px 0; }

/* 双入口 */
#page-mystic .mystic-entries { margin-top: 20px; position: relative; z-index: 2; }
#page-mystic .mystic-entry {
  width: 100%; display: flex; align-items: center; gap: 13px; padding: 16px 15px; margin-bottom: 10px;
  border-radius: 16px; text-align: left;
  background: linear-gradient(120deg, rgba(180,156,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid rgba(180,156,255,0.2);
}
#page-mystic .mystic-entry:active { border-color: rgba(180,156,255,0.5); }
#page-mystic .mystic-entry-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(180,156,255,0.12); color: var(--m-gold); font-size: 18px;
}
#page-mystic .mystic-entry-text { flex: 1; min-width: 0; display: block; }
#page-mystic .mystic-entry-text b { display: block; font-size: 15px; color: #f7f3ff; font-weight: 600; }
#page-mystic .mystic-entry-text i { display: block; font-style: normal; font-size: 11px; color: var(--m-dim); margin-top: 4px; }
#page-mystic .mystic-entry-state {
  flex-shrink: 0; font-size: 11px; padding: 5px 10px; border-radius: 99px;
  color: var(--m-gold); border: 1px solid rgba(180,156,255,0.3);
}
#page-mystic .mystic-entry-state.done { background: rgba(180,156,255,0.14); border-color: transparent; color: #04160f; font-weight: 700; }
#page-mystic .mystic-tip {
  margin-top: 14px; text-align: center; font-size: 12px; color: var(--m-dim);
  background: rgba(180,156,255,0.05); border: 1px dashed rgba(180,156,255,0.22);
  border-radius: 12px; padding: 11px;
}

/* 榜单 */
#page-mystic .mystic-rank-top {
  background: linear-gradient(150deg, rgba(180,156,255,0.1), rgba(180,156,255,0.03));
  border: 1px solid rgba(180,156,255,0.3); border-radius: 20px; padding: 18px; margin-bottom: 14px;
  position: relative; z-index: 2; overflow: hidden;
}
#page-mystic .mystic-crown { position: absolute; top: 12px; right: 14px; font-size: 11px; color: var(--m-gold); letter-spacing: 1px; }
#page-mystic .mystic-person { display: flex; align-items: center; gap: 12px; }
#page-mystic .mystic-score { margin-left: auto; text-align: right; }
#page-mystic .mystic-score b { font-size: 27px; color: var(--m-gold); font-weight: 700; line-height: 1; }
#page-mystic .mystic-score span { font-size: 10px; color: var(--m-dim); display: block; }
#page-mystic .mystic-split { display: flex; gap: 8px; margin-top: 14px; }
#page-mystic .mystic-split div { flex: 1; background: rgba(0,0,0,0.28); border-radius: 11px; padding: 9px 10px; }
#page-mystic .mystic-split span { font-size: 10px; color: var(--m-dim); display: block; margin-bottom: 3px; }
#page-mystic .mystic-split b { font-size: 15px; }
#page-mystic .mystic-verdict { font-size: 14px; font-weight: 600; color: #e3d7ff; margin-top: 12px; }
#page-mystic .mystic-verdict-line { font-size: 12px; color: var(--m-dim); margin-top: 4px; line-height: 1.6; }
#page-mystic .mystic-actions { display: flex; gap: 9px; margin-top: 14px; }
#page-mystic .mystic-actions button {
  flex: 1; padding: 11px; border-radius: 11px; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,0.05); color: #e4dcfa; border: 1px solid rgba(180,156,255,0.18);
}
#page-mystic .mystic-actions button.primary { background: linear-gradient(120deg, #b49cff, #9a7cff); color: #04160f; border: none; }
#page-mystic .mystic-list-item {
  display: flex; align-items: center; gap: 11px; padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,0.05);
  position: relative; z-index: 2;
}
#page-mystic .mystic-list-item:last-child { border-bottom: none; }
#page-mystic .mystic-no { width: 22px; font-size: 12px; color: var(--m-dim); text-align: center; flex-shrink: 0; }
#page-mystic .mystic-no.top { color: var(--m-gold); font-weight: 700; }
#page-mystic .mystic-mini-avatar { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; background: #171128; flex-shrink: 0; }
#page-mystic .mystic-mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
#page-mystic .mystic-info { flex: 1; min-width: 0; }
#page-mystic .mystic-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #f5f1ff; }
#page-mystic .mystic-meta { font-size: 11px; color: var(--m-dim); margin-top: 3px; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
#page-mystic .mystic-badge { font-size: 10px; padding: 1px 6px; border-radius: 5px; background: rgba(180,156,255,0.14); color: #c9b6ff; }
#page-mystic .mystic-badge.seed { background: rgba(255,255,255,0.06); color: #9a92b8; }
#page-mystic .mystic-total { text-align: right; flex-shrink: 0; }
#page-mystic .mystic-total b { font-size: 18px; color: var(--m-gold); }
#page-mystic .mystic-total span { font-size: 10px; color: var(--m-dim); display: block; }
#page-mystic .mystic-group-title {
  font-size: 11px; color: var(--m-gold); letter-spacing: 1px;
  padding: 12px 0 6px; border-bottom: 1px solid rgba(180,156,255,0.14); margin-bottom: 2px;
}
#page-mystic .mystic-matching { text-align: center; padding: 46px 0 30px; position: relative; z-index: 2; }
#page-mystic .mystic-ring {
  width: 100px; height: 100px; margin: 0 auto 24px; border-radius: 50%;
  border: 2px solid rgba(180,156,255,0.2); border-top-color: var(--m-gold);
  animation: m-spin 1.4s linear infinite; position: relative;
}
#page-mystic .mystic-ring::after {
  content: '✦'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--m-gold); animation: m-spin 1.4s linear infinite reverse;
}
#page-mystic .mystic-matching p { font-size: 14px; color: #cfc6e8; }
#page-mystic .mystic-matching small { font-size: 11px; color: var(--m-dim); display: block; margin-top: 10px; }
#page-mystic .mystic-unlock {
  margin-top: 16px; padding: 13px; border-radius: 13px; text-align: center;
  background: rgba(180,156,255,0.06); border: 1px dashed rgba(180,156,255,0.3);
}
#page-mystic .mystic-unlock b { color: #e3d7ff; font-size: 13px; }
#page-mystic .mystic-unlock span { display: block; font-size: 11px; color: var(--m-dim); margin-top: 5px; }
#page-mystic .mystic-share { text-align: center; margin-top: 22px; position: relative; z-index: 2; }
#page-mystic .mystic-share .mystic-btn { margin-bottom: 10px; }
#page-mystic .mystic-cost { margin-top: 18px; font-size: 11px; color: #7b7099; text-align: center; line-height: 1.7; position: relative; z-index: 2; }
#page-mystic .mystic-empty { text-align: center; padding: 30px 0; color: var(--m-dim); font-size: 13px; }
#page-mystic .mystic-err { color: #ff8f8f; font-size: 12px; margin-top: 10px; text-align: center; min-height: 18px; }
#page-mystic .mystic-sheet { position: fixed; inset: 0; background: rgba(0,0,0,0.66); z-index: 200; display: none; align-items: flex-end; }
#page-mystic .mystic-sheet.on { display: flex; }
#page-mystic .mystic-sheet-body {
  width: 100%; max-width: 520px; margin: 0 auto; background: #0b1512; border-radius: 22px 22px 0 0;
  padding: 22px 18px calc(30px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(180,156,255,0.26);
  animation: m-up .26s ease; max-height: 92vh; overflow-y: auto;
}
@keyframes m-up { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
#page-mystic .mystic-sheet h4 { font-size: 16px; margin-bottom: 6px; color: #f7f3ff; }
#page-mystic .mystic-sheet p.hint { font-size: 12px; color: var(--m-dim); margin-bottom: 16px; line-height: 1.7; }
#page-mystic .mystic-poster { width: 100%; max-width: 300px; margin: 0 auto 14px; border-radius: 14px; display: block; }

/* 首页入口卡 */
.mystic-entry-card {
  position: relative; overflow: hidden; border-radius: 18px; padding: 16px;
  background: linear-gradient(125deg, #140f22 0%, #1c1330 48%, #120c1e 100%);
  border: 1px solid rgba(180,156,255,0.28);
  box-shadow: 0 10px 24px rgba(0, 60, 44, 0.3);
  display: flex; align-items: center; gap: 13px; cursor: pointer;
}
.mystic-entry-card::before {
  content: ''; position: absolute; right: -30px; top: -40px; width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, rgba(180,156,255,0.26), transparent 68%);
}
.mystic-entry-orb {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; position: relative;
  background: radial-gradient(circle at 33% 30%, #efe8ff, #b49cff 28%, #4a3a7a 66%, #1a1230 100%);
  box-shadow: 0 0 16px rgba(180,156,255,0.4);
  animation: m-float 4.6s ease-in-out infinite;
}
.mystic-entry-title { font-size: 15px; font-weight: 600; color: #f7f3ff; letter-spacing: .5px; }
.mystic-entry-sub { font-size: 11px; color: #9a92b8; margin-top: 4px; line-height: 1.5; }
.mystic-entry-go { margin-left: auto; font-size: 11px; color: #b49cff; border: 1px solid rgba(180,156,255,0.4); border-radius: 99px; padding: 5px 10px; white-space: nowrap; }

/* 导航与全局修正 */
.nav-item[data-page="page-mystic"] { color: rgba(180, 156, 255, 0.6); }
.nav-item[data-page="page-mystic"].active { color: #b49cff; }
body.mystic-open #icp-footer,
body.mystic-sheet-open .bottom-nav,
body.mystic-sheet-open #icp-footer { display: none !important; }
body.mystic-open .bottom-nav { background: linear-gradient(180deg, transparent, #0c0916 34%); }
#page-mystic .mystic-sheet-body { padding-bottom: calc(30px + env(safe-area-inset-bottom)); }
#page-mystic .mystic-row > .mystic-input { min-width: 0; }
#page-mystic .mystic-row > .mystic-input:first-child { flex: 1.6; }
#page-splash > div { padding-bottom: 92px; }

/* 我的页 · 命盘卡片 */
.profile-mystic-card {
  position: relative; overflow: hidden; border-radius: 16px; padding: 15px;
  background: linear-gradient(125deg, #140f22, #1c1330 60%, #120c1e);
  border: 1px solid rgba(180,156,255,0.22);
}
.profile-mystic-card .pm-top { display: flex; align-items: center; gap: 12px; }
.profile-mystic-card .pm-badge {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  background: rgba(180,156,255,0.1); border: 1px solid rgba(180,156,255,0.34);
}
.profile-mystic-card .pm-badge img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-mystic-card .pm-type { font-size: 17px; font-weight: 700; color: #b49cff; letter-spacing: 1px; }
.profile-mystic-card .pm-sub { font-size: 11px; color: #9a92b8; margin-top: 3px; }
.profile-mystic-card .pm-pillars { font-size: 13px; color: #e3d7ff; letter-spacing: 4px; margin-top: 10px; }
.profile-mystic-card .pm-btn {
  margin-top: 12px; width: 100%; padding: 10px; border-radius: 10px; font-size: 13px; font-weight: 600;
  background: rgba(180,156,255,0.12); color: #b49cff; border: 1px solid rgba(180,156,255,0.3);
}

/* --- 首页图形与次要入口 --- */
#page-mystic .mystic-emblem {
  width: 132px; height: 132px; margin: 6px auto 16px;
  display: flex; align-items: center; justify-content: center; position: relative;
}
#page-mystic .mystic-emblem::after {
  content: ''; position: absolute; inset: -10px; border-radius: 50%;
  background: radial-gradient(circle, rgba(180,156,255,0.16), transparent 68%);
  z-index: 0; pointer-events: none;
}
#page-mystic .mystic-emblem svg {
  position: relative; z-index: 1;
  filter: drop-shadow(0 0 14px rgba(180,156,255,0.35));
  animation: m-float 5s ease-in-out infinite;
}
#page-mystic .mystic-sub-entry {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 13px 16px; margin-top: 16px; border-radius: 13px;
  background: rgba(255,255,255,0.025); border: 1px solid rgba(180,156,255,0.12);
  color: #8fb3a7; font-size: 13px;
}
#page-mystic .mystic-sub-entry .arr { font-size: 12px; color: rgba(180,156,255,0.7); }
svg.mystic-entry-orb { background: none !important; box-shadow: none !important; border-radius: 0; }
.mystic-entry-card svg.mystic-entry-orb { animation: m-float 4.6s ease-in-out infinite; }
