/* 问星塔罗 · H5 样式 —— 深紫星空 · 金色点缀 · 移动优先 */
:root {
  --bg: #150e2c;
  --bg2: #241a45;
  --panel: #1e1540;
  --panel2: #271c52;
  --line: rgba(212, 185, 106, 0.25);
  --gold: #d4b96a;
  --gold2: #f0dca4;
  --purple: #8b7cf6;
  --text: #ece9f7;
  --muted: #a49dc2;
  --face: #f7f2e7;
  --face-ink: #2b2440;
  --face-ink2: #6f6690;
  --danger: #e07a7a;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background:
    radial-gradient(1px 1px at 20% 15%, rgba(240, 220, 164, .8) 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 10%, rgba(255,255,255,.55) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 45% 30%, rgba(255,255,255,.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 85% 45%, rgba(240, 220, 164,.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 12% 60%, rgba(255,255,255,.45) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 60% 75%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 85%, rgba(240,220,164,.5) 50%, transparent 51%),
    radial-gradient(900px 500px at 80% -10%, #2b1d5e 0%, transparent 60%),
    radial-gradient(700px 400px at 0% 100%, #1f1447 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}
#app { max-width: 480px; margin: 0 auto; padding: 18px 16px 40px; min-height: 100vh; display: flex; flex-direction: column; }

/* ===== 首页 ===== */
.brand { text-align: center; padding: 20px 0 18px; }
.brand .moon {
  width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 50%;
  background: linear-gradient(135deg, #f4e2ac, #d4b96a);
  box-shadow: 0 0 22px rgba(212,185,106,.45);
  position: relative;
}
.brand .moon::after {
  content: ""; position: absolute; left: 9px; top: 4.5px; width: 35px; height: 35px;
  border-radius: 50%; background: var(--bg);
}
.brand h1 { font-size: 23px; letter-spacing: 6px; font-weight: 600; color: var(--gold2); }
.brand p { font-size: 11.5px; color: var(--muted); margin-top: 6px; letter-spacing: 2.5px; }

.section-title { font-size: 12px; color: var(--muted); letter-spacing: 2px; margin: 4px 0 10px; }

/* 首页功能网格 */
.home-grid { display: grid; gap: 10px; }
.home-grid-2 { grid-template-columns: 1fr 1fr; }
.home-grid-3 { grid-template-columns: repeat(3, 1fr); gap: 9px; }

.home-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; width: 100%; cursor: pointer; text-align: center;
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 8px; transition: transform .15s ease, border-color .15s ease;
  color: var(--text);
}
.home-tile:active { transform: scale(.97); border-color: rgba(212,185,106,.55); }
.home-tile .ic { width: 30px; height: 30px; color: var(--gold); display: block; }
.home-tile .ic svg { width: 100%; height: 100%; display: block; }
.home-tile b { font-size: 14px; font-weight: 500; letter-spacing: .5px; }
.home-tile .sub { font-size: 10.5px; color: var(--muted); letter-spacing: .5px; }

/* 常用工具（2×2）放大 */
.tile-lg { padding: 16px 8px; gap: 8px; }
.tile-lg .ic { width: 38px; height: 38px; }
.tile-lg b { font-size: 15px; letter-spacing: 1px; }
.tile-lg .sub { font-size: 11px; }

/* 更多功能（3×3）紧凑 */
.home-grid-3 .home-tile { padding: 12px 4px; gap: 5px; border-radius: 12px; }
.home-grid-3 .ic { width: 26px; height: 26px; }
.home-grid-3 b { font-size: 12px; letter-spacing: 0; }

.home-tile.locked { opacity: .5; }
.home-tile.locked:active { transform: none; border-color: var(--line); }

.home-links { display: flex; gap: 10px; margin-top: 18px; }
.home-links button {
  flex: 1; background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 12px; padding: 11px; font-size: 13px; cursor: pointer;
}
.home-links button:active { color: var(--gold2); border-color: var(--gold); }
.spread-card {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; margin-bottom: 12px; cursor: pointer;
  transition: transform .15s ease, border-color .15s ease; text-align: left;
}
.spread-card:active { transform: scale(.98); border-color: rgba(212,185,106,.55); }
.spread-card .icon { font-size: 24px; width: 52px; height: 52px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px; background: rgba(139,124,246,.14); border: 1px solid rgba(139,124,246,.35); }
.spread-card .info { flex: 1; min-width: 0; }
.spread-card b { display: block; font-size: 16px; color: var(--text); margin-bottom: 4px; font-weight: 500; }
.spread-card span { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.spread-card .cnt {
  flex: none; margin-left: auto; font-size: 11px; color: var(--gold2);
  border: 1px solid rgba(212,185,106,.35); border-radius: 999px; padding: 3px 9px;
}
.spread-card .arrow { margin-left: 8px; color: var(--gold); font-size: 18px; }

.home-links { display: flex; gap: 10px; margin-top: 18px; }
.home-links button {
  flex: 1; background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 12px; padding: 11px; font-size: 13px; cursor: pointer;
}
.home-links button:active { color: var(--gold2); border-color: var(--gold); }

/* ===== 通用 ===== */
.view { flex: 1; display: flex; flex-direction: column; }
.nav-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.nav-top .back {
  background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; padding: 6px 10px 6px 0;
}
.nav-top .title { font-size: 16px; color: var(--text); letter-spacing: 1px; }
.btn {
  display: block; width: 100%; padding: 14px; border: none; border-radius: 12px; cursor: pointer;
  font-size: 15px; letter-spacing: 2px; font-weight: 500;
  background: linear-gradient(135deg, #9a8bfa, #7a68f0); color: #fff;
  box-shadow: 0 6px 18px rgba(122,104,240,.35);
}
.btn:active { transform: scale(.985); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--gold2); box-shadow: none; }
.btn.gold { background: linear-gradient(135deg, #e6cd8c, #c9a75e); color: #241a45; box-shadow: 0 6px 18px rgba(212,185,106,.3); }
.btn:disabled { opacity: .45; }

/* ===== 提问页 ===== */
.hint { font-size: 13px; color: var(--muted); line-height: 1.8; margin: 8px 0 18px; }
.input-wrap { position: relative; margin-bottom: 20px; }
textarea {
  width: 100%; min-height: 96px; resize: none; border-radius: 12px; padding: 14px;
  background: rgba(30,21,64,.8); border: 1px solid var(--line); color: var(--text);
  font-size: 15px; line-height: 1.6; font-family: inherit; outline: none;
}
textarea:focus { border-color: rgba(212,185,106,.6); }
.counter { position: absolute; right: 12px; bottom: 10px; font-size: 11px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.chip {
  background: rgba(139,124,246,.12); border: 1px solid rgba(139,124,246,.3); color: #b7adff;
  border-radius: 999px; padding: 7px 13px; font-size: 12.5px; cursor: pointer;
}
.chip:active { background: rgba(139,124,246,.3); }

/* ===== 抽牌页 ===== */
.status { text-align: center; font-size: 13px; color: var(--muted); margin: 10px 0 4px; letter-spacing: 1px; }
.status b { color: var(--gold2); font-weight: 500; }
.deck {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  min-height: 210px; margin: 14px 0; perspective: 900px;
}
.deck.shuffle .tcard { animation: shuf 1.1s ease; }
@keyframes shuf {
  0% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-18px) rotate(-4deg); }
  50% { transform: translateY(6px) rotate(3deg); }
  75% { transform: translateY(-8px) rotate(-2deg); }
  100% { transform: translateY(0) rotate(0); }
}
.tcard { transition: transform .25s ease, opacity .25s ease; }
.fan-left { transform: translateX(-40px) rotate(-16deg) translateY(10px); }
.fan-mid { transform: translateY(-4px); z-index: 2; }
.fan-right { transform: translateX(40px) rotate(16deg) translateY(10px); }

/* 牌背 */
.cardback {
  width: 92px; height: 148px; border-radius: 10px; cursor: pointer; position: relative;
  background: linear-gradient(160deg, #3a2a7a, #241a55 55%, #1b1246);
  border: 1px solid rgba(212,185,106,.5);
  box-shadow: 0 8px 22px rgba(0,0,0,.45), inset 0 0 0 5px rgba(212,185,106,.12);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.cardback::before {
  content: "☽"; font-size: 30px; color: var(--gold); opacity: .9;
}
.cardback::after {
  content: ""; position: absolute; inset: 7px; border: 1px solid rgba(212,185,106,.35); border-radius: 6px;
}
.cardback:active { transform: scale(.96); }
.cardback.chosen { transform: scale(.92); opacity: 0; }
.cardback .pick-no {
  position: absolute; top: -9px; right: -9px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--gold); color: #241a45; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* 选中的牌飞到下方占位 */
.slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 6px 0 18px; min-height: 158px; }
.slot {
  width: 84px; height: 136px; border-radius: 10px; border: 1.5px dashed rgba(212,185,106,.35);
  display: flex; align-items: center; justify-content: center; color: rgba(212,185,106,.4); font-size: 12px;
  padding: 4px; text-align: center; line-height: 1.4;
}
.slots.small { gap: 8px; }
.slots.small .slot { width: 58px; height: 94px; font-size: 10px; }
.slot .pick-no {
  width: 22px; height: 22px; border-radius: 50%; background: #d4b96a; color: #241a45;
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.slots.small .slot .pick-no { width: 18px; height: 18px; font-size: 11px; }
.slot .lab { position: absolute; margin-top: 158px; font-size: 11px; color: var(--muted); }
.slot-box { position: relative; }
.slot.filled { border: none; }

/* ===== 结果页 ===== */
.result-head { text-align: center; padding: 6px 0 2px; }
.result-head .q { font-size: 14px; color: var(--gold2); line-height: 1.6; margin-bottom: 2px; }
.result-head .s { font-size: 11.5px; color: var(--muted); letter-spacing: 1px; }
.cards-flow { margin-top: 14px; }
.rcard { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px; margin-bottom: 14px; animation: rise .5s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rcard .pos { font-size: 12px; color: var(--purple); letter-spacing: 2px; margin-bottom: 12px; }
.rcard .pos b { color: #c4bbff; font-weight: 500; }

.flip { perspective: 800px; margin-bottom: 14px; }
.flip-inner { position: relative; width: 120px; height: 192px; margin: 0 auto; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.4,.1,.2,1); }
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.flip .face3d { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 12px; }
.flip .back3d { background: linear-gradient(160deg, #3a2a7a, #1b1246); border: 1px solid rgba(212,185,106,.5); box-shadow: inset 0 0 0 5px rgba(212,185,106,.12); display: flex; align-items: center; justify-content: center; }
.flip .back3d::before { content: "☽"; font-size: 34px; color: var(--gold); }
.flip .front3d {
  transform: rotateY(180deg); background: linear-gradient(170deg, #fbf7ec, #efe7d2);
  border: 1px solid #cbb77e; color: var(--face-ink); position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 12px 8px;
}
.front3d .no { font-size: 11px; color: var(--face-ink2); letter-spacing: 2px; font-family: Georgia, serif; }
.front3d .glyph {
  width: 64px; height: 64px; border-radius: 50%;
  border: 1.5px solid #c2a55a; display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #7a5f1e; font-weight: 600;
}
.front3d .nm { text-align: center; }
.front3d .nm b { display: block; font-size: 17px; letter-spacing: 3px; font-weight: 600; }
.front3d .nm i { display: block; font-style: normal; font-size: 10px; color: var(--face-ink2); margin-top: 3px; letter-spacing: .5px; }
.glyph.rev-mark { transform: rotate(180deg); }

/* 真实牌面图（Rider-Waite 公版）*/
.front3d.has-img { padding: 0; overflow: hidden; justify-content: flex-start; }
.card-img {
  width: 100%; height: 100%; display: block; object-fit: cover;
  background: #f7f2e7; border-radius: 11px;
}
.card-img.rev-img { transform: rotate(180deg); }
/* 图片牌面下方的编号 + 牌名（浮在底部，不遮图案主体）*/
.front3d .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 6px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(0deg, rgba(251,247,236,.96), rgba(251,247,236,.72) 70%, transparent);
}
.front3d .cap .no { font-size: 8.5px; color: #9a8a5c; letter-spacing: 1px; font-family: Georgia, serif; }
.front3d .cap .nm { font-size: 11px; color: #3a3152; font-weight: 500; letter-spacing: .5px; }
/* 逆位时文字保持正向可读，仅图案倒转 */
.front3d .cap { transform: rotate(0deg); }

.orient { text-align: center; margin: 12px 0 4px; font-size: 13px; letter-spacing: 2px; }
.orient.up { color: #8fd4a8; }
.orient.rev { color: var(--danger); }
.kw { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0 12px; }
.kw span { font-size: 11.5px; color: var(--gold2); background: rgba(212,185,106,.1); border: 1px solid rgba(212,185,106,.28); padding: 4px 10px; border-radius: 999px; }
.meaning { font-size: 14px; line-height: 1.9; color: #d9d4ef; text-align: justify; }

.summary { background: rgba(139,124,246,.1); border: 1px solid rgba(139,124,246,.3); border-radius: 16px; padding: 18px 16px; margin: 16px 0; }
.summary h3 { font-size: 13px; color: #c4bbff; letter-spacing: 3px; font-weight: 500; margin-bottom: 10px; }
.summary p { font-size: 13.5px; line-height: 1.9; color: #d9d4ef; }
.result-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.gen-note { text-align: center; font-size: 11px; color: var(--muted); margin-top: 14px; }

/* ===== AI 解读（塔罗单/三牌 PoC） ===== */
.btn.ai-btn { background: linear-gradient(135deg, #b39bff, #8b6cf0); color: #fff; box-shadow: 0 6px 18px rgba(139,108,240,.4); letter-spacing: 2px; }
.ai-box { background: linear-gradient(180deg, rgba(139,124,246,.14), rgba(139,124,246,.06)); border: 1px solid rgba(139,124,246,.38); border-radius: 16px; padding: 16px 15px; margin: 16px 0 0; }
.ai-mark { font-size: 11px; letter-spacing: 2px; color: #c4bbff; margin-bottom: 9px; opacity: .9; }
.ai-text { font-size: 13.5px; line-height: 1.95; color: #e3deff; white-space: normal; }
.ai-loading { font-size: 13px; color: var(--muted); text-align: center; padding: 8px 0; }
.hist-ai { margin-top: 9px; padding: 10px 12px; background: rgba(139,124,246,.1); border: 1px solid rgba(139,124,246,.25); border-radius: 10px; font-size: 12.5px; line-height: 1.8; color: #d9d4ef; }
.hist-ai-tag { display: inline-block; font-size: 10px; letter-spacing: 1px; color: #c4bbff; border: 1px solid rgba(196,187,255,.45); border-radius: 8px; padding: 1px 7px; margin-right: 6px; }

/* ===== 历史页 ===== */
.hist-item { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.hist-item .row1 { display: flex; align-items: baseline; gap: 8px; }
.hist-item .q { flex: 1; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-item .t { font-size: 11px; color: var(--muted); flex: none; }
.hist-item .cards { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.7; }
.hist-item .cards b { color: var(--gold2); font-weight: 500; }
.hist-item .ops { margin-top: 10px; text-align: right; }
.hist-item .ops button { background: none; border: none; color: var(--danger); font-size: 12px; cursor: pointer; padding: 4px 6px; }
.empty { text-align: center; color: var(--muted); font-size: 13px; padding: 60px 0; line-height: 2; }
.empty .big { font-size: 30px; display: block; margin-bottom: 8px; }
.danger-zone { margin-top: 18px; }
.danger-zone .btn { color: var(--danger); border: 1px solid rgba(224,122,122,.4); background: transparent; box-shadow: none; }

/* ===== 底部合规 ===== */
.legal { margin-top: 30px; padding-top: 16px; border-top: 1px solid rgba(212,185,106,.12); }
.legal p { font-size: 11px; color: var(--muted); line-height: 1.9; text-align: center; }
.legal .cp { margin-top: 6px; color: rgba(164,157,194,.55); letter-spacing: 1px; }
/* 源码入口（AGPL-3.0 合规） */
.src-link { color: #d4b96a; text-decoration: none; border-bottom: 1px solid rgba(212,185,106,.45); white-space: nowrap; }
.src-link:hover { border-bottom-color: #d4b96a; }
.src-link[hidden] { display: none; }

/* 弹层 */
.sheet-mask { position: fixed; inset: 0; background: rgba(10,6,24,.72); display: none; align-items: flex-end; justify-content: center; z-index: 50; }
.sheet-mask.show { display: flex; }
.sheet { width: 100%; max-width: 480px; background: #221850; border-radius: 20px 20px 0 0; padding: 22px 18px 30px; animation: up .3s ease; }
@keyframes up { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet h3 { color: var(--gold2); font-size: 15px; letter-spacing: 2px; margin-bottom: 12px; font-weight: 500; }
.sheet p { font-size: 12.5px; color: var(--muted); line-height: 2; margin-bottom: 8px; }
.sheet .btn { margin-top: 14px; }
@media (min-width: 600px) { .sheet { border-radius: 20px; margin-bottom: 30px; max-width: 520px; } }

/* ===== 开发中占位与轻提示 ===== */
.spread-card.locked { opacity: .5; }
.spread-card.locked .cnt { color: var(--muted); border-color: rgba(212,185,106,.15); }
.toast {
  position: fixed; left: 50%; bottom: 46px; transform: translateX(-50%) translateY(12px);
  background: rgba(20,14,44,.96); border: 1px solid var(--line); color: var(--gold2);
  font-size: 13px; padding: 10px 18px; border-radius: 999px; opacity: 0; z-index: 90;
  transition: opacity .25s ease, transform .25s ease; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== 表单 ===== */
.form-block { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px; margin-bottom: 16px; }
.form-label { font-size: 12px; color: var(--muted); letter-spacing: 1px; margin: 14px 0 8px; }
.form-label:first-child { margin-top: 0; }
.form-input { width: 100%; padding: 12px; border-radius: 10px; background: rgba(21,14,44,.75); border: 1px solid var(--line); color: var(--text); font-size: 15px; font-family: inherit; outline: none; }
.form-input:focus { border-color: rgba(212,185,106,.6); }
.seg { display: flex; gap: 10px; }
.seg-btn { flex: 1; padding: 11px; border-radius: 10px; background: rgba(21,14,44,.75); border: 1px solid var(--line); color: var(--muted); font-size: 14px; cursor: pointer; }
.seg-btn.on { background: rgba(139,124,246,.18); border-color: rgba(139,124,246,.5); color: var(--text); }

/* ===== 黄历 ===== */
.date-bar { display: flex; gap: 8px; align-items: center; margin: 10px 0 12px; }
.date-bar input[type=date] { flex: 1; padding: 11px; border-radius: 10px; background: rgba(21,14,44,.75); border: 1px solid var(--line); color: var(--text); font-size: 14px; font-family: inherit; outline: none; }
.mini-btn { padding: 10px 12px; border-radius: 10px; background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.mini-btn:active { color: var(--gold2); }
.hl-card { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px; margin-top: 14px; animation: rise .45s ease both; }
.hl-head { text-align: center; padding: 4px 0 14px; border-bottom: 1px dashed rgba(212,185,106,.2); }
.hl-head .d1 { font-size: 30px; color: var(--gold2); letter-spacing: 3px; }
.hl-head .d2 { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.7; }
.hl-sec { margin-top: 14px; }
.hl-sec h4 { font-size: 12.5px; color: #c4bbff; letter-spacing: 2px; font-weight: 500; margin-bottom: 8px; }
.tag-wall { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 5px 10px; border-radius: 8px; }
.tag.yi { background: rgba(93,202,165,.12); border: 1px solid rgba(93,202,165,.35); color: #7fd8b6; }
.tag.ji { background: rgba(224,122,122,.12); border: 1px solid rgba(224,122,122,.35); color: #e79a9a; }
.tag.god { background: rgba(212,185,106,.1); border: 1px solid rgba(212,185,106,.3); color: var(--gold2); }
.tag.bad { background: rgba(139,124,246,.1); border: 1px solid rgba(139,124,246,.3); color: #b7adff; }
.hl-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 9px 0; border-bottom: 1px dashed rgba(212,185,106,.12); }
.hl-row .k { color: var(--muted); flex: none; }
.hl-row .v { color: var(--text); text-align: right; }
.hl-tip { margin-top: 14px; background: rgba(139,124,246,.1); border: 1px solid rgba(139,124,246,.3); border-radius: 12px; padding: 14px; font-size: 13px; line-height: 1.9; color: #d9d4ef; }

/* ===== 八字 ===== */
.bz-card { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 16px; padding: 18px 14px; margin-top: 14px; animation: rise .45s ease both; }
.bz-title { text-align: center; font-size: 17px; color: var(--gold2); letter-spacing: 2px; }
.bz-sub { text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.7; }
.pillar-row { display: flex; gap: 6px; margin: 16px 0 6px; }
.pillar { flex: 1; background: linear-gradient(180deg, #2a1e58, #1e1540); border: 1px solid var(--line); border-radius: 12px; padding: 10px 3px; text-align: center; }
.pillar .lab { font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.pillar .gz { font-size: 21px; color: var(--gold2); margin: 7px 0; letter-spacing: 2px; line-height: 1.4; }
.pillar .gz span { display: block; }
.pillar .ss { font-size: 10.5px; color: #b7adff; line-height: 1.5; }
.pillar .ny { font-size: 10px; color: var(--muted); margin-top: 6px; }
.bz-sec { margin-top: 16px; }
.bz-sec h4 { font-size: 12.5px; color: #c4bbff; letter-spacing: 2px; font-weight: 500; margin-bottom: 8px; }
.wx-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.wx-row .n { font-size: 12.5px; color: var(--muted); width: 16px; flex: none; }
.wx-row .track { flex: 1; height: 8px; border-radius: 4px; background: rgba(212,185,106,.12); overflow: hidden; }
.wx-row .fill { height: 100%; border-radius: 4px; }
.wx-row .c { font-size: 12px; color: var(--muted); width: 20px; text-align: right; flex: none; }
.bz-text { font-size: 13.5px; line-height: 1.9; color: #d9d4ef; }
.dy-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 8px 0; border-bottom: 1px dashed rgba(212,185,106,.12); }
.dy-row .gz { color: var(--gold2); letter-spacing: 2px; }
.dy-row .age { color: var(--muted); font-size: 12px; }
.bz-item { background: rgba(139,124,246,.08); border: 1px solid rgba(139,124,246,.22); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.bz-item b { color: #c4bbff; font-weight: 500; font-size: 13px; }
.bz-item p { font-size: 13px; line-height: 1.85; color: #d9d4ef; margin-top: 5px; }
.bz-hist { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; margin-bottom: 10px; }
.bz-hist .r1 { display: flex; justify-content: space-between; align-items: baseline; }
.bz-hist .nm { font-size: 14px; color: var(--text); }
.bz-hist .tm { font-size: 11px; color: var(--muted); }
.bz-hist .pz { font-size: 12.5px; color: var(--gold2); margin-top: 6px; letter-spacing: 1px; }
.bz-hist .ops { text-align: right; margin-top: 8px; }
.bz-hist .ops button { background: none; border: none; color: var(--danger); font-size: 12px; cursor: pointer; }

/* ===== 命语深度解读（八字）===== */
.my-deep { border-top: 1px dashed rgba(212,185,106,.2); padding-top: 14px; }
.my-deep h4 { display: flex; align-items: center; gap: 8px; }
.my-tag { font-size: 10px; letter-spacing: 1px; color: #0d0b16; background: linear-gradient(90deg, var(--gold2), #e8d49a); border-radius: 6px; padding: 1px 7px; font-weight: 600; }
.my-dayun { border-bottom: 1px dashed rgba(212,185,106,.12); padding: 8px 0; }
.my-dayun-h { display: flex; justify-content: space-between; align-items: center; }
.my-dayun-h .gz { color: var(--gold2); letter-spacing: 2px; font-size: 14px; }
.my-dayun-h .age { color: var(--muted); font-size: 12px; }
.my-dayun-body { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.my-yr { font-size: 11px; color: #c9c3e6; background: rgba(139,124,246,.1); border: 1px solid rgba(139,124,246,.2); border-radius: 7px; padding: 2px 6px; }
.my-yr i { color: #a99bff; font-style: normal; margin-left: 4px; }

/* ===== 古法灵签 ===== */
.tube-wrap { text-align: center; padding: 18px 0 6px; }
.qian-tube { width: 116px; height: 178px; margin: 0 auto; position: relative; cursor: pointer; }
.qian-tube .sticks { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); display: flex; gap: 4px; }
.qian-tube .sticks i { display: block; width: 4px; height: 34px; border-radius: 3px; background: linear-gradient(180deg, #f3e6c0, #c9a95e); box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.qian-tube .sticks i:nth-child(1) { transform: rotate(-7deg); }
.qian-tube .sticks i:nth-child(3) { transform: rotate(6deg); }
.qian-tube .sticks i:nth-child(4) { transform: rotate(-3deg); }
.qian-tube .body {
  width: 100%; height: 100%; border-radius: 16px 16px 22px 22px;
  background: linear-gradient(160deg, #6b3f2a, #47281a 55%, #35200f);
  border: 1px solid rgba(212,185,106,.35);
  box-shadow: inset 0 0 26px rgba(0,0,0,.45), 0 10px 24px rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center;
}
.qian-tube .body span { font-size: 30px; color: var(--gold2); letter-spacing: 2px; opacity: .9; }
.qian-tube.shaking { animation: tubeShake .16s linear infinite; }
@keyframes tubeShake {
  0% { transform: translate(0,0) rotate(0); }
  25% { transform: translate(-4px,-2px) rotate(-4deg); }
  50% { transform: translate(3px,1px) rotate(3deg); }
  75% { transform: translate(-2px,2px) rotate(-2deg); }
  100% { transform: translate(0,0) rotate(0); }
}
.qian-card { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px; margin-top: 14px; animation: rise .5s ease both; }
.qian-card .qhead { text-align: center; padding-bottom: 14px; border-bottom: 1px dashed rgba(212,185,106,.2); }
.qian-card .no { font-size: 12px; color: var(--muted); letter-spacing: 2px; }
.qian-card .lv { display: inline-block; margin-top: 10px; font-size: 20px; letter-spacing: 4px; color: var(--gold2); }
.qian-card .lv.lv-bad { color: #e79a9a; }
.qian-card .lv.lv-mid { color: #c9c2ea; }
.qian-card .topic { font-size: 12.5px; color: var(--muted); margin-top: 8px; letter-spacing: 2px; }
.qian-poem { margin: 16px 0 4px; }
.qian-poem p { text-align: center; font-size: 16.5px; line-height: 2.15; color: var(--gold2); letter-spacing: 3px; }
.qian-card .jie { margin-top: 16px; background: rgba(139,124,246,.1); border: 1px solid rgba(139,124,246,.28); border-radius: 12px; padding: 14px; font-size: 13.5px; line-height: 1.95; color: #d9d4ef; }
.qian-card .jie h4 { font-size: 12.5px; color: #c4bbff; letter-spacing: 2px; font-weight: 500; margin-bottom: 7px; }

/* ===== 六爻 ===== */
.coin-box { display: flex; justify-content: center; gap: 16px; padding: 24px 0 14px; }
.coin {
  width: 58px; height: 58px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f6e8b8, #c9a95e 60%, #9a7c3c);
  border: 2px solid rgba(255,255,255,.28);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #6a5120; font-weight: 600;
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
}
.coin.back { background: radial-gradient(circle at 35% 30%, #cfc6e8, #8b81ad 60%, #5d5578); color: #241f38; }
.coin.rolling { animation: coinSpin .42s linear infinite; }
@keyframes coinSpin {
  0% { transform: rotateY(0) translateY(0); }
  50% { transform: rotateY(180deg) translateY(-12px); }
  100% { transform: rotateY(360deg) translateY(0); }
}
.yao-stack { margin-top: 8px; }
.yao-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: rgba(21,14,44,.55); border: 1px solid rgba(212,185,106,.14); margin-bottom: 7px; font-size: 13px; }
.yao-item.now { border-color: rgba(212,185,106,.55); background: rgba(212,185,106,.1); }
.yao-item .pos { color: var(--muted); width: 46px; flex: none; font-size: 12px; }
.yao-item .sym { flex: 1; display: flex; gap: 6px; align-items: center; }
.yao-item .sym i { display: block; height: 8px; border-radius: 3px; background: linear-gradient(90deg, #f0dca4, #d4b96a); }
.yao-item .sym i.yin { flex: 1; }
.yao-item .sym i.yang { width: 100%; }
.yao-item .txt { color: var(--text); font-size: 12.5px; width: 74px; text-align: right; flex: none; }
.yao-item .txt.moving { color: var(--gold2); }
.gua-block { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.gua-block .gt { text-align: center; font-size: 16px; color: var(--gold2); letter-spacing: 2px; }
.gua-block .gs { text-align: center; font-size: 11.5px; color: var(--muted); margin-top: 4px; letter-spacing: 1px; }
.gua-fig { width: 132px; margin: 12px auto 8px; }
.gua-fig .yrow { display: flex; gap: 9px; margin-bottom: 8px; height: 9px; }
.gua-fig .yrow i { display: block; flex: 1; border-radius: 3px; background: linear-gradient(90deg, #f0dca4, #d4b96a); position: relative; }
.gua-fig .yrow i.mk::after {
  content: attr(data-mk); position: absolute; right: -20px; top: -6px;
  font-size: 13px; color: var(--gold2); font-style: normal;
}
.gua-block .ci { font-size: 13px; color: #c9c2ea; text-align: center; margin-top: 6px; line-height: 1.8; }
.gua-block .jie { font-size: 13px; line-height: 1.9; color: #d9d4ef; margin-top: 8px; }
.ly-note { background: rgba(139,124,246,.1); border: 1px solid rgba(139,124,246,.28); border-radius: 12px; padding: 13px 14px; font-size: 13px; line-height: 1.95; color: #d9d4ef; }
.ly-note h4 { font-size: 12.5px; color: #c4bbff; letter-spacing: 2px; font-weight: 500; margin-bottom: 7px; }

/* ===== 梅花起卦 ===== */
.mh-now { margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: rgba(21,14,44,.55); border: 1px solid rgba(212,185,106,.16); font-size: 12.5px; line-height: 1.9; color: #d9d4ef; text-align: center; }
.mh-now b { color: var(--gold2); font-weight: 500; }
.mh-2col { display: flex; gap: 10px; }
.mh-src { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 14px 0 12px; }
.mh-src h4 { font-size: 12.5px; color: #c4bbff; letter-spacing: 2px; font-weight: 500; margin-bottom: 8px; }
.mh-src .mline { font-size: 12.5px; line-height: 1.9; color: #d9d4ef; }
.mh-src .mline.muted { color: var(--muted); margin-top: 6px; }
.mh-rel { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-radius: 12px; margin-bottom: 10px; border: 1px solid; }
.mh-rel.good { background: rgba(93,202,165,.12); border-color: rgba(93,202,165,.4); }
.mh-rel.mid { background: rgba(212,185,106,.12); border-color: rgba(212,185,106,.4); }
.mh-rel.bad { background: rgba(224,122,122,.12); border-color: rgba(224,122,122,.4); }
.mh-rel .nm { font-size: 18px; letter-spacing: 3px; color: var(--gold2); }
.mh-rel .sub { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.7; }
.mh-rel .tag { flex: none; font-size: 12px; padding: 5px 12px; border-radius: 20px; border: 1px solid rgba(212,185,106,.35); color: var(--gold2); }
.mh-rel.bad .tag { border-color: rgba(224,122,122,.45); color: #e79a9a; }
.mh-rel.good .tag { border-color: rgba(93,202,165,.45); color: #7fd8b6; }
.mh-stage { font-size: 12.5px; line-height: 1.9; color: var(--muted); padding: 4px 2px 14px; }

/* ===== 紫微斗数 ===== */
.zw-card { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 16px; padding: 18px 14px; margin-top: 14px; animation: rise .45s ease both; }
.zw-title { text-align: center; font-size: 17px; color: var(--gold2); letter-spacing: 2px; }
.zw-sub { text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.7; }
.zw-keyrow { display: flex; gap: 8px; margin-top: 14px; }
.zw-keyrow > div { flex: 1; text-align: center; background: rgba(21,14,44,.55); border: 1px solid rgba(212,185,106,.16); border-radius: 10px; padding: 8px 4px; }
.zw-keyrow span { display: block; font-size: 11px; color: var(--muted); }
.zw-keyrow b { display: block; font-size: 14px; color: var(--text); margin-top: 4px; letter-spacing: 1px; }
.zw-tip { margin-top: 12px; font-size: 12.5px; color: #c9c2ea; text-align: center; }
.zw-block { background: rgba(139,124,246,.08); border: 1px solid rgba(139,124,246,.22); border-radius: 12px; padding: 12px 14px; margin-top: 10px; }
.zw-block h4 { font-size: 12.5px; color: #c4bbff; letter-spacing: 2px; font-weight: 500; margin-bottom: 7px; }
.zw-block p { font-size: 13px; line-height: 1.9; color: #d9d4ef; }
.zw-block .kwline { color: var(--gold2); font-size: 12.5px; margin-bottom: 6px; }
.zw-block .mu-line { color: #c9c2ea; font-size: 12.5px; margin-top: 6px; }
.zw-pal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: rgba(21,14,44,.55); border: 1px solid rgba(212,185,106,.14); margin-bottom: 7px; }
.zw-pal.body { border-color: rgba(212,185,106,.5); background: rgba(212,185,106,.07); }
.zw-pal .l { width: 76px; flex: none; }
.zw-pal .l b { font-size: 13.5px; color: var(--text); }
.zw-pal .l b i { font-style: normal; font-size: 10px; color: var(--gold2); }
.zw-pal .l span { display: block; font-size: 11.5px; color: var(--gold2); margin-top: 3px; letter-spacing: 1px; }
.zw-pal .r { flex: 1; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.zw-pal .d { width: 100%; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.zw-star { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; padding: 3px 8px; border-radius: 8px; background: rgba(212,185,106,.1); border: 1px solid rgba(212,185,106,.3); color: var(--gold2); }
.zw-star.mu { background: rgba(139,124,246,.14); border-color: rgba(139,124,246,.4); }
.zw-star i { font-style: normal; font-size: 10.5px; color: #b7adff; }
.zw-star em { font-style: normal; font-size: 10px; color: var(--muted); }
.zw-star.empty { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); color: var(--muted); }
.zw-minor { width: 100%; font-size: 11.5px; color: #a49dc2; line-height: 1.8; }
.zw-si { padding: 8px 0; border-bottom: 1px dashed rgba(212,185,106,.14); }
.zw-si:last-child { border-bottom: none; }
.zw-si b { color: var(--gold2); font-size: 13px; font-weight: 500; }
.zw-si span { color: var(--muted); font-size: 12px; }
.zw-si p { font-size: 12.5px; line-height: 1.85; color: #d9d4ef; margin-top: 4px; }

/* ===== 起名 ===== */
.chip.on { background: rgba(139,124,246,.34); border-color: rgba(212,185,106,.55); color: var(--gold2); }
.nm-card { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 16px; padding: 16px 14px; margin-top: 14px; animation: rise .45s ease both; }
.nm-title { text-align: center; font-size: 14px; color: var(--gold2); letter-spacing: 2px; }
.nm-wx { margin-top: 12px; }
.nm-wxrow { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.nm-wxrow .w { width: 18px; flex: none; font-size: 13px; color: var(--text); }
.nm-wxrow .bar { flex: 1; height: 7px; border-radius: 4px; background: rgba(255,255,255,.07); overflow: hidden; }
.nm-wxrow .bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--gold), var(--gold2)); }
.nm-wxrow .n { width: 16px; flex: none; text-align: right; font-size: 12px; color: var(--muted); }
.nm-tip { margin-top: 10px; font-size: 12.5px; line-height: 1.85; color: #c9c2ea; }
.nm-item { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 11px; }
.nm-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.nm-head b { font-size: 21px; letter-spacing: 4px; color: var(--gold2); }
.nm-head .py { font-size: 11.5px; color: var(--muted); letter-spacing: 1px; }
.nm-head .strokes { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.nm-els { display: flex; gap: 8px; margin-top: 11px; }
.nm-el { flex: 1; min-width: 0; background: rgba(21,14,44,.55); border: 1px solid rgba(212,185,106,.14); border-radius: 10px; padding: 9px 10px; }
.nm-el b { font-size: 15px; color: var(--text); }
.nm-el span { display: block; font-size: 11px; color: var(--gold2); margin-top: 3px; }
.nm-el p { font-size: 11.5px; line-height: 1.75; color: var(--muted); margin-top: 5px; }
.nm-wuge { display: flex; gap: 6px; margin-top: 11px; flex-wrap: wrap; }
.nm-wg { flex: 1; min-width: 54px; text-align: center; background: rgba(21,14,44,.5); border: 1px solid rgba(212,185,106,.12); border-radius: 9px; padding: 6px 2px; }
.nm-wg .k { display: block; font-size: 10.5px; color: var(--muted); }
.nm-wg b { display: block; font-size: 13px; color: var(--text); margin-top: 2px; }
.nm-wg em { display: block; font-style: normal; font-size: 10px; margin-top: 1px; }
.nm-wg b.good, .nm-wg em.good, .nm-meta .good { color: #7fd8b6; }
.nm-wg b.mid, .nm-wg em.mid, .nm-meta .mid { color: var(--gold2); }
.nm-wg b.bad, .nm-wg em.bad, .nm-meta .bad { color: #e79a9a; }
.nm-meta { margin-top: 9px; font-size: 12px; line-height: 1.8; color: #c9c2ea; }
.nm-ops { text-align: right; margin-top: 8px; }
.btn-mini { background: rgba(139,124,246,.16); border: 1px solid rgba(139,124,246,.42); color: #c9c2ea; font-size: 12px; padding: 5px 14px; border-radius: 18px; cursor: pointer; }
.btn-mini:active { background: rgba(139,124,246,.3); }
.nm-hist { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; margin-bottom: 10px; }
.nm-hist .r1 { display: flex; justify-content: space-between; align-items: baseline; }
.nm-hist .r1 .nm { font-size: 16px; letter-spacing: 3px; color: var(--gold2); }
.nm-hist .r1 .tm { font-size: 11px; color: var(--muted); }
.nm-hist .pz { font-size: 12px; color: #c9c2ea; margin-top: 5px; letter-spacing: .5px; }
.nm-hist .mn { font-size: 12px; line-height: 1.8; color: var(--muted); margin-top: 5px; }
.nm-hist .ops { text-align: right; margin-top: 8px; }
.nm-hist .ops button { background: none; border: none; color: var(--danger); font-size: 12px; cursor: pointer; }
