/* ============ 首页（功能分区版） ============ */
.greeting {
  font-size: 28px;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 6px;
  letter-spacing: 2px;
}

.page-header-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-logo-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 3px 12px rgba(46,90,60,0.2);
  border: 2px solid rgba(255,255,255,0.8);
  flex-shrink: 0;
}

.user-info {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--brown);
}

.page-header {
  padding: 28px 0 20px;
  border-bottom: 2px solid rgba(46,90,60,0.10);
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ---- 今日运势 hero 卡 ---- */
.hero-today {
  background: linear-gradient(145deg, #ffffff, #faf6ee);
  border-radius: 16px;
  padding: 18px 16px 14px;
  margin-bottom: 20px;
  box-shadow: 0 3px 12px rgba(94,71,51,0.08), 0 1px 3px rgba(94,71,51,0.04);
  border: 1px solid rgba(209,195,168,0.4);
}
.hero-today-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}
.hero-today-solar {
  font-size: 17px;
  font-weight: 700;
  color: var(--green);
  line-height: 1.3;
}
.hero-today-lunar {
  font-size: 12px;
  color: var(--brown-light);
  margin-top: 3px;
}
.hero-today-score {
  text-align: center;
  padding: 6px 14px;
  border-radius: 12px;
  min-width: 70px;
}
.hero-score-num {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}
.hero-score-label {
  font-size: 11px;
  margin-top: 2px;
}
.hero-score-good { background: rgba(46,90,60,0.10); }
.hero-score-good .hero-score-num { color: var(--green); }
.hero-score-good .hero-score-label { color: var(--green-light); }
.hero-score-mid { background: rgba(212,160,23,0.12); }
.hero-score-mid .hero-score-num { color: var(--gold-dark); }
.hero-score-mid .hero-score-label { color: var(--gold-dark); }
.hero-score-low { background: rgba(192,57,43,0.08); }
.hero-score-low .hero-score-num { color: var(--red); }
.hero-score-low .hero-score-label { color: var(--red-light); }

.hero-yiji-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.hero-yi, .hero-ji {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
}
.hero-yi { background: rgba(46,90,60,0.07); }
.hero-ji { background: rgba(192,57,43,0.06); }
.hero-yiji-tag {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  text-align: center;
  line-height: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.hero-yi .hero-yiji-tag { background: var(--green); }
.hero-ji .hero-yiji-tag { background: var(--red); }
.hero-yiji-text { color: var(--brown); }

.hero-pos-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.hero-pos-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: var(--bg-soft, #faf7f2);
  border-radius: 8px;
  font-size: 12px;
}
.hero-pos-icon { font-size: 14px; }
.hero-pos-label { color: var(--brown-light); }
.hero-pos-val { color: var(--brown); font-weight: 600; }

.hero-today-more {
  display: block;
  text-align: right;
  font-size: 13px;
  color: var(--green-light);
  text-decoration: none;
  padding-top: 6px;
  border-top: 1px solid rgba(209,195,168,0.3);
}

/* ---- 功能分区 ---- */
.zones-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 20px;
}
.zone-section {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px 14px;
  box-shadow: 0 2px 10px rgba(94,71,51,0.06), 0 1px 3px rgba(94,71,51,0.03);
  border: 1px solid rgba(209,195,168,0.3);
}
.zone-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(209,195,168,0.25);
}
.zone-header-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(46,90,60,0.10), rgba(46,90,60,0.04));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.zone-header-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 1px;
}
.zone-header-desc {
  font-size: 11px;
  color: var(--brown-light);
  margin-top: 1px;
}
.zone-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.zone-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fdf8ee, #f8f1e3);
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(209,195,168,0.25);
  transition: all 0.25s;
  position: relative;
}
.zone-action:active {
  transform: scale(0.97);
  background: linear-gradient(135deg, #f8f1e3, #f0e6d0);
}
.zone-action-hot {
  background: linear-gradient(135deg, #fff8e8, #ffefcf);
  border-color: rgba(212,160,23,0.3);
}
.zone-action-icon {
  font-size: 26px;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.06));
}
.zone-action-info {
  flex: 1;
  min-width: 0;
}
.zone-action-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zone-action-desc {
  font-size: 11px;
  color: var(--brown-light);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zone-hot-dot {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: var(--red);
  padding: 1px 4px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 2px;
}
.zone-action-arrow {
  color: var(--brown-lighter);
  font-size: 18px;
  flex-shrink: 0;
}

.tips-content {
  font-size: 15px;
  line-height: 2;
  color: var(--brown);
  padding: 14px 16px;
  background: linear-gradient(135deg, #fdf8ee, #f4e9d8);
  border-radius: 12px;
  border-left: 4px solid var(--green);
  font-family: var(--font-kai);
}

/* ============ 登录页 ============ */
.login-page {
  padding-top: 50px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
  padding-top: 20px;
}

.login-header .logo-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin-bottom: 14px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  object-fit: cover;
  box-shadow: 0 6px 24px rgba(46,90,60,0.25), 0 2px 8px rgba(94,71,51,0.15);
  border: 3px solid rgba(255,255,255,0.8);
  transition: transform 0.3s;
}

.login-header .logo-img:active {
  transform: scale(0.95);
}

.login-header .app-name {
  font-size: 28px;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 8px;
  letter-spacing: 4px;
  font-family: var(--font-kai);
  text-shadow: 0 2px 6px rgba(46,90,60,0.15);
}

.login-header .app-desc {
  font-size: 13px;
  color: var(--brown-light);
  letter-spacing: 2px;
  font-family: var(--font-kai);
}

.code-examples {
  margin-top: 16px;
}

.examples-title {
  font-size: 13px;
  color: var(--brown-light);
  margin-bottom: 8px;
}

.examples-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.example-code {
  padding: 6px 16px;
  background: var(--cream-light);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--green);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.example-code:active {
  transform: scale(0.95);
  background: var(--green-bg);
}

.examples-note {
  font-size: 11px;
  color: var(--brown-light);
  margin-top: 8px;
  text-align: center;
}

.login-features {
  margin-top: 28px;
}

.feature-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--brown);
  margin-bottom: 14px;
  text-align: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.feature-item {
  text-align: center;
  padding: 10px 4px;
  background: var(--cream-light);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  transition: transform 0.2s;
}

.feature-item:active {
  transform: scale(0.95);
}

.feature-icon {
  font-size: 30px;
  margin-bottom: 6px;
  display: block;
}

.feature-name {
  font-size: 12px;
  color: var(--brown);
}

.login-footer {
  margin-top: 36px;
  text-align: center;
}

.footer-text {
  font-size: 13px;
  color: var(--brown-light);
  margin-bottom: 8px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.footer-link {
  font-size: 13px;
  color: var(--green);
  cursor: pointer;
}

.footer-divider {
  color: var(--border);
}

/* ============ 八字页 ============ */
.pillars-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.pillar-item {
  text-align: center;
  padding: 14px 4px;
  background: linear-gradient(180deg, var(--cream-light), var(--cream));
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  position: relative;
}

.pillar-item::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  background: var(--green);
  border-radius: 0 0 2px 2px;
}

.pillar-name {
  font-size: 12px;
  color: var(--brown-light);
  margin-bottom: 6px;
  font-weight: 500;
}

.pillar-gan {
  font-size: 22px;
  font-weight: bold;
  color: var(--green);
  font-family: var(--font-kai);
}

.pillar-zhi {
  font-size: 22px;
  font-weight: bold;
  color: var(--brown);
  margin-top: 2px;
  font-family: var(--font-kai);
}

.pillar-shishen {
  font-size: 11px;
  color: var(--brown-light);
  margin-top: 6px;
  padding: 2px 6px;
  background: rgba(255,255,255,0.6);
  border-radius: 8px;
  display: inline-block;
}

.pillar-ss {
  display: block;
  font-size: 10px;
  color: var(--brown-light);
  margin-top: 2px;
  font-weight: normal;
}

.pillar-canggan {
  font-size: 10px;
  color: var(--brown-light);
  margin-top: 4px;
  line-height: 1.5;
  padding: 3px 4px;
  background: rgba(255,255,255,0.4);
  border-radius: 4px;
}

.pillar-nayin {
  font-size: 10px;
  color: var(--green-light);
  margin-top: 3px;
  font-family: var(--font-kai);
}

/* ============ 八字专业表格排盘（科学放大版） ============ */
.bazi-chart {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
  background: #fff;
  /* 窄屏允许横向滚动，避免内容被裁切看不清 */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 2px 8px rgba(94,71,51,0.08);
}
.bazi-chart-row {
  display: grid;
  grid-template-columns: 56px repeat(4, 1fr);
  border-bottom: 1px solid var(--border-light);
  min-width: 420px;
}
.bazi-chart-row:last-child { border-bottom: none; }
.bazi-chart-head {
  background: linear-gradient(180deg, var(--green), var(--green-dark));
  color: #fff;
}
.bazi-chart-head .bazi-chart-cell {
  font-size: 15px;
  font-weight: 600;
  padding: 10px 2px;
  font-family: var(--font-kai);
  letter-spacing: 1px;
}
.bazi-chart-label {
  font-size: 12px;
  color: var(--brown);
  padding: 6px 2px;
  text-align: center;
  background: var(--cream);
  border-right: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.25;
  font-weight: 600;
  font-family: var(--font-kai);
}
.bazi-chart-cell {
  text-align: center;
  padding: 7px 2px;
  border-right: 1px solid var(--border-light);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  /* 允许藏干十神等长文本换行，而非裁切 */
  word-break: break-all;
  line-height: 1.3;
}
.bazi-chart-cell:last-child { border-right: none; }

/* 五行配色：天干/地支按五行着色，专业排盘标准 */
.wx-jin { color: #b8860b; }      /* 金 - 金黄 */
.wx-mu   { color: #2E7D32; }     /* 木 - 青绿 */
.wx-shui { color: #1565C0; }     /* 水 - 玄黑/深蓝 */
.wx-huo  { color: #C62828; }     /* 火 - 赤 */
.wx-tu   { color: #6D4C41; }     /* 土 - 棕黄 */

.bazi-gan {
  font-size: 26px;
  font-weight: bold;
  font-family: var(--font-kai);
  letter-spacing: 2px;
}
.bazi-zhi {
  font-size: 26px;
  font-weight: bold;
  font-family: var(--font-kai);
  letter-spacing: 2px;
}
.bazi-ss {
  font-size: 12px;
  color: var(--brown-light);
  font-weight: 600;
  letter-spacing: 0.5px;
}
.bazi-canggan {
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-kai);
  letter-spacing: 2px;
}
.bazi-canggan-ss {
  font-size: 11px;
  color: var(--brown-light);
  line-height: 1.4;
  /* 长文本换行显示，不裁切 */
  white-space: normal;
  word-break: break-all;
  font-weight: 500;
}
.bazi-nayin {
  font-size: 12px;
  color: var(--green-light);
  font-family: var(--font-kai);
  font-weight: 500;
}
.bazi-chart-foot {
  background: var(--cream-light);
}
.bazi-chart-foot .bazi-chart-label {
  background: var(--cream-d);
}

/* 日主高亮：日柱天干加底色，突出命主 */
.bazi-chart-row.bazi-daymaster-row .bazi-chart-cell:nth-child(4) {
  background: rgba(46,90,60,0.08);
  position: relative;
}
.bazi-chart-row.bazi-daymaster-row .bazi-chart-cell:nth-child(4)::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 2px;
  transform: translateX(-50%);
  width: 18px; height: 2px;
  background: var(--green);
  border-radius: 1px;
}

.strength-info {
  font-size: 14px;
  color: var(--brown);
  text-align: center;
  padding: 10px;
  background: var(--cream);
  border-radius: 6px;
  font-weight: 500;
}

.wuxing-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wuxing-bar-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wuxing-label {
  font-size: 14px;
  font-weight: 500;
  width: 20px;
}

.wuxing-bar-track {
  flex: 1;
  height: 12px;
  background: var(--cream);
  border-radius: 6px;
  overflow: hidden;
}

.wuxing-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s;
}

.wx-木 { background: #4caf50; }
.wx-火 { background: #f44336; }
.wx-土 { background: #ff9800; }
.wx-金 { background: #9e9e9e; }
.wx-水 { background: #2196f3; }

.wuxing-count {
  font-size: 12px;
  color: var(--brown-light);
  width: 32px;
  text-align: right;
}

.shensha-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.usegod-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.usegod-line {
  font-size: 13px;
  line-height: 1.7;
  color: var(--brown);
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.6);
}

.usegod-line.fy { border-left: 3px solid var(--green); }
.usegod-line.th { border-left: 3px solid var(--orange); }
.usegod-line.tg { border-left: 3px solid #1565c0; }
.usegod-line.by { border-left: 3px solid var(--red); }
.usegod-line.zh { border-left: 3px solid #6a1b9a; font-weight: 500; background: rgba(230,240,230,0.8); }

.dayun-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dayun-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--cream);
  border-radius: 6px;
  font-size: 13px;
}

.dayun-age {
  color: var(--brown-light);
  font-size: 12px;
}

.dayun-gz {
  font-weight: bold;
  color: var(--green);
}

.dayun-ss {
  font-size: 11px;
  color: var(--brown-light);
}

/* 胎元·命宫·身宫 三柱 */
.sanchu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.sanchu-item {
  text-align: center;
  padding: 10px 6px;
  background: var(--cream);
  border-radius: 8px;
  border: 1px solid var(--cream-dark);
}
.sanchu-label {
  font-size: 12px;
  color: var(--brown-light);
  margin-bottom: 4px;
}
.sanchu-gz {
  font-size: 18px;
  font-weight: bold;
  color: var(--green);
  letter-spacing: 2px;
}
.sanchu-ny {
  font-size: 11px;
  color: var(--brown);
  margin: 2px 0 4px;
}
.sanchu-desc {
  font-size: 10px;
  color: var(--text-light);
  line-height: 1.4;
}

/* 流年盘 */
.liunian-overall {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 10px;
}
.liunian-overall.liunian-good { background: rgba(76,175,80,0.12); border: 1px solid rgba(76,175,80,0.3); }
.liunian-overall.liunian-bad { background: rgba(244,67,54,0.10); border: 1px solid rgba(244,67,54,0.3); }
.liunian-overall.liunian-warn { background: rgba(255,152,0,0.12); border: 1px solid rgba(255,152,0,0.3); }
.liunian-overall.liunian-flat { background: var(--cream); border: 1px solid var(--cream-dark); }
.liunian-overall-icon { font-size: 20px; }
.liunian-overall-level {
  font-weight: bold;
  font-size: 15px;
  min-width: 36px;
}
.liunian-overall.liunian-good .liunian-overall-level { color: var(--green); }
.liunian-overall.liunian-bad .liunian-overall-level { color: #d32f2f; }
.liunian-overall.liunian-warn .liunian-overall-level { color: #e65100; }
.liunian-overall.liunian-flat .liunian-overall-level { color: var(--brown-light); }
.liunian-overall-desc { font-size: 13px; color: var(--text); flex: 1; }

.liunian-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.liunian-tag {
  font-size: 12px;
  padding: 3px 8px;
  background: var(--cream);
  border-radius: 4px;
  color: var(--brown);
}
.liunian-suiyun {
  padding: 8px 12px;
  background: rgba(244,67,54,0.08);
  border-left: 3px solid #d32f2f;
  border-radius: 4px;
  font-size: 13px;
  color: #b71c1c;
  margin-bottom: 8px;
}
.liunian-events {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.liunian-event {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.5;
}
.liunian-event.ev-good { background: rgba(76,175,80,0.08); }
.liunian-event.ev-bad { background: rgba(244,67,54,0.08); }
.liunian-event.ev-warn { background: rgba(255,152,0,0.08); }
.liunian-event .ev-type {
  font-weight: bold;
  min-width: 64px;
  flex-shrink: 0;
}
.liunian-event.ev-good .ev-type { color: var(--green); }
.liunian-event.ev-bad .ev-type { color: #d32f2f; }
.liunian-event.ev-warn .ev-type { color: #e65100; }
.liunian-event .ev-pillar {
  color: var(--brown-light);
  font-size: 11px;
  flex-shrink: 0;
}
.liunian-event .ev-desc { color: var(--text); flex: 1; }

.usegod-detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--cream-dark);
}

.usegod-detail-item:last-child {
  border-bottom: none;
}

.usegod-wx {
  font-weight: bold;
  color: var(--green);
}

.usegod-info {
  font-size: 13px;
  color: var(--brown);
}

/* ============ 紫微页 ============ */
.zw-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.zw-gong {
  background: linear-gradient(135deg, var(--cream-light), var(--cream));
  border-radius: var(--radius-sm);
  padding: 10px 4px;
  text-align: center;
  min-height: 64px;
  border: 1px solid var(--border-light);
  transition: transform 0.2s;
}

.zw-gong:active {
  transform: scale(0.96);
}

.zw-gong-name {
  font-size: 11px;
  color: var(--brown-light);
  margin-bottom: 4px;
  font-weight: 500;
}

.zw-gong-stars {
  font-size: 11px;
  color: var(--green);
  font-weight: 500;
  line-height: 1.4;
}

.zw-gong-master {
  font-size: 10px;
  color: var(--brown-light);
  margin-top: 2px;
}

.zw-daxian {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ============ 奇门页 ============ */
.qm-info {
  font-size: 14px;
  color: var(--brown);
  margin-bottom: 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--cream-light), var(--cream));
  border-radius: var(--radius-md);
  border-left: 3px solid var(--green);
}

.qm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.qm-gong {
  background: linear-gradient(135deg, var(--cream-light), var(--cream));
  border-radius: var(--radius-sm);
  padding: 12px 4px;
  text-align: center;
  min-height: 76px;
  border: 1px solid var(--border-light);
  transition: transform 0.2s;
}

.qm-gong:active {
  transform: scale(0.96);
}

.qm-gong-pos {
  font-size: 11px;
  color: var(--brown-light);
  font-weight: 500;
}

.qm-gong-star {
  font-size: 14px;
  font-weight: bold;
  color: var(--green);
  margin-top: 3px;
}

.qm-gong-men {
  font-size: 12px;
  color: var(--brown);
  margin-top: 2px;
  font-weight: 500;
}

.qm-gong-shen {
  font-size: 11px;
  color: var(--brown-light);
  margin-top: 2px;
}

/* ============ 合婚页 ============ */
.hh-score {
  font-size: 42px;
  font-weight: bold;
  color: var(--green);
  text-align: center;
  margin: 16px 0 8px;
  font-family: var(--font-kai);
  text-shadow: 0 2px 8px rgba(46,90,60,0.15);
}

.hh-level {
  font-size: 16px;
  color: var(--brown);
  text-align: center;
  margin-bottom: 12px;
  font-weight: 500;
}

/* ============ 择日页 ============ */
.zr-list-title {
  font-size: 14px;
  color: var(--brown);
  margin-bottom: 12px;
  font-weight: 500;
}

.zr-day-card {
  padding: 12px;
}

.zr-date {
  font-size: 15px;
  font-weight: bold;
  color: var(--green);
  margin-bottom: 4px;
}

.zr-lunar {
  font-size: 12px;
  color: var(--brown-light);
  margin-bottom: 8px;
}

.zr-row {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 13px;
}

.zr-label {
  color: var(--brown-light);
  min-width: 24px;
}

.zr-yi .zr-label { color: var(--green); }
.zr-ji .zr-label { color: var(--red); }

.zr-value {
  color: var(--brown);
  flex: 1;
}

/* 择日个性化评分 */
.zr-personal {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
}
.zr-personal-good {
  background: rgba(76, 175, 80, 0.08);
  color: var(--green);
  border: 1px solid rgba(76, 175, 80, 0.2);
}
.zr-personal-bad {
  background: rgba(244, 67, 54, 0.08);
  color: var(--red);
  border: 1px solid rgba(244, 67, 54, 0.2);
}
.zr-personal-neutral {
  background: rgba(158, 158, 158, 0.08);
  color: var(--brown-light);
  border: 1px solid rgba(158, 158, 158, 0.15);
}
.zr-personal-score {
  font-weight: 600;
}

/* ============ 择日 · 事项神煞精细匹配（《协纪辨方书》） ============ */
.zr-em {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(94,71,51,.12);
  background: linear-gradient(180deg, rgba(253,248,238,.7), rgba(248,241,227,.4));
}
.zr-em-top   { border-left: 3px solid #b8442e; background: linear-gradient(180deg, rgba(184,68,46,.10), rgba(184,68,46,.03)); }
.zr-em-good  { border-left: 3px solid #3a7a55; background: linear-gradient(180deg, rgba(58,122,85,.08), rgba(58,122,85,.02)); }
.zr-em-ok    { border-left: 3px solid #b8860b; }
.zr-em-warn  { border-left: 3px solid #d4a24a; background: linear-gradient(180deg, rgba(212,162,74,.10), rgba(212,162,74,.03)); }
.zr-em-bad   { border-left: 3px solid #7a2a1e; background: linear-gradient(180deg, rgba(122,42,30,.10), rgba(122,42,30,.03)); }
.zr-em-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-bottom: 6px;
}
.zr-em-grade {
  font-weight: 700;
  font-size: 13px;
  color: #b8442e;
  letter-spacing: 1px;
}
.zr-em-top .zr-em-grade  { color: #b8442e; }
.zr-em-good .zr-em-grade { color: #3a7a55; }
.zr-em-warn .zr-em-grade { color: #8a6d0e; }
.zr-em-bad .zr-em-grade  { color: #7a2a1e; }
.zr-em-score {
  font-size: 12px;
  color: #5c4733;
  background: rgba(255,255,255,.6);
  padding: 1px 8px;
  border-radius: 10px;
}
.zr-em-jc {
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 10px;
}
.zr-em-jc-good { background: rgba(58,122,85,.15); color: #2e5a3c; }
.zr-em-jc-bad  { background: rgba(184,68,46,.15); color: #7a2a1e; }
.zr-em-jc-mid  { background: rgba(184,134,11,.15); color: #8a6d0e; }
.zr-em-jc-flat { background: rgba(158,158,158,.15); color: #5c4733; }
.zr-em-row {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
  margin: 4px 0;
  font-size: 12px;
}
.zr-em-label {
  color: #8a7554;
  min-width: 32px;
}
.zr-em-pick {
  background: rgba(58,122,85,.15);
  color: #2e5a3c;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  border: 1px solid rgba(58,122,85,.25);
}
.zr-em-avoid {
  background: rgba(184,68,46,.15);
  color: #7a2a1e;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  border: 1px solid rgba(184,68,46,.25);
}
.zr-em-sum {
  color: #5c4733;
  font-size: 12px;
  line-height: 1.55;
  margin-top: 4px;
  font-style: italic;
}
/* 择日总纲卡 */
.zr-brief-card {
  padding: 12px;
  background: linear-gradient(180deg, rgba(253,248,238,.9), rgba(248,241,227,.5));
}
.zr-brief-row {
  display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px;
  margin-bottom: 6px;
  font-size: 12.5px;
}
.zr-brief-label {
  color: #8a7554;
  min-width: 56px;
  font-weight: 600;
}
.zr-em-chip {
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 12px;
  border: 1px solid transparent;
}
.zr-em-top-chip   { background: rgba(184,68,46,.16); color: #b8442e; border-color: rgba(184,68,46,.30); }
.zr-em-good-chip  { background: rgba(58,122,85,.16); color: #2e5a3c; border-color: rgba(58,122,85,.30); }
.zr-em-fatal-chip { background: rgba(122,42,30,.16); color: #7a2a1e; border-color: rgba(122,42,30,.30); }
.zr-em-heavy-chip { background: rgba(184,134,11,.16); color: #8a6d0e; border-color: rgba(184,134,11,.30); }
.zr-brief-refs {
  margin-top: 6px;
  font-size: 11px;
  color: #8a7554;
  font-style: italic;
  line-height: 1.6;
}

/* ============ 命卦页 ============ */
.kua-hero {
  text-align: center;
  padding: 28px 20px;
  background: linear-gradient(135deg, var(--cream-light), var(--cream));
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.kua-num {
  font-size: 52px;
  font-weight: bold;
  color: var(--green);
  line-height: 1;
  font-family: var(--font-kai);
  text-shadow: 0 2px 8px rgba(46,90,60,0.15);
}

.kua-gua {
  font-size: 20px;
  color: var(--brown);
  margin: 10px 0;
  font-weight: 500;
  letter-spacing: 2px;
}

.kua-group-tag {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 14px;
  font-size: 13px;
  margin-bottom: 8px;
  font-weight: 500;
}

.kua-group-tag.east { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-light); }
.kua-group-tag.west { background: #fff3e0; color: var(--orange); border: 1px solid var(--orange-light); }

.kua-element {
  font-size: 14px;
  color: var(--brown-light);
}

.dir-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dir-chip {
  padding: 7px 16px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.2s;
}

.dir-chip:active {
  transform: scale(0.95);
}

.dir-chip.lucky { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-light); }
.dir-chip.unlucky { background: #ffebee; color: var(--red); border: 1px solid var(--red-light); }

/* ============ 飞星页 ============ */
.jm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-width: 420px;
  margin: 0 auto;
}

.jm-cell {
  background: linear-gradient(135deg, var(--cream-light), var(--cream));
  border-radius: var(--radius-md);
  padding: 14px 4px;
  text-align: center;
  border: 2px solid transparent;
  transition: transform 0.2s;
  position: relative;
}

.jm-cell:active {
  transform: scale(0.96);
}

.jm-cell.auspicious { background: linear-gradient(135deg, #e6f0e6, #d4e8d4); border-color: var(--green); }
.jm-cell.inauspicious { background: linear-gradient(135deg, #ffebee, #fccfcf); border-color: var(--red); }
.jm-cell.daji { background: linear-gradient(135deg, #fff8e1, #fff3e0); border-color: var(--gold); box-shadow: 0 0 12px rgba(255,215,0,0.2); }

.star-num {
  font-size: 26px;
  font-weight: bold;
  color: var(--green);
  line-height: 1;
  font-family: var(--font-kai);
}

.jm-cell.inauspicious .star-num { color: var(--red); }
.jm-cell.daji .star-num { color: var(--orange); }

.star-pos {
  font-size: 12px;
  color: var(--brown);
  margin-top: 2px;
}

.star-name {
  font-size: 10px;
  color: var(--brown-light);
}

.quick-section {
  margin-bottom: 10px;
  padding: 10px;
  background: var(--cream);
  border-radius: 8px;
}

.quick-label {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 4px;
}

.quick-items {
  font-size: 13px;
  color: var(--brown);
}

.warning-card {
  background: linear-gradient(135deg, #fff8e1, #fff3e0);
}

/* ============ 八卦/布局页 ============ */
.bg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.bg-cell {
  background: linear-gradient(135deg, var(--cream-light), var(--cream));
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
  min-height: 88px;
  border: 1px solid var(--border-light);
  transition: transform 0.2s;
}

.bg-cell:active {
  transform: scale(0.96);
}

.bg-cell.focus {
  background: linear-gradient(135deg, #e6f0e6, #d4e8d4);
  border: 2px solid var(--green);
  box-shadow: 0 0 12px rgba(46,90,60,0.12);
}

.bg-dir {
  font-size: 12px;
  color: var(--brown-light);
}

.bg-name {
  font-size: 14px;
  font-weight: bold;
  color: var(--green);
  margin: 2px 0;
}

.bg-area {
  font-size: 11px;
  color: var(--brown);
}

.bg-element {
  font-size: 10px;
  color: var(--brown-light);
  margin-top: 2px;
}

.bg-suggestion {
  font-size: 10px;
  color: var(--brown);
  margin-top: 4px;
  line-height: 1.4;
}

/* ============ 五行调理页 ============ */
.wx-type-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wx-type-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--brown);
  cursor: pointer;
}

.wx-type-item.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.wx-type-icon {
  font-size: 18px;
}

/* ============ 知识库页 ============ */
.kw-total {
  font-size: 12px;
  color: var(--brown-light);
  margin-bottom: 8px;
}

.kw-cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.kw-cat-tab {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 14px;
  background: var(--cream);
  color: var(--brown);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.kw-cat-tab:active {
  transform: scale(0.95);
}

.kw-cat-tab.kw-cat-active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.kw-cat-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--green);
  margin-top: 12px;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--cream-dark);
}

.kw-cat-count {
  font-size: 11px;
  font-weight: normal;
  color: var(--brown-light);
}

.kw-item {
  padding: 0;
  border-bottom: 1px solid var(--cream-dark);
}

.kw-item:last-child {
  border-bottom: none;
}

.kw-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  cursor: pointer;
  user-select: none;
}

.kw-item-header:active {
  background: rgba(0,0,0,0.03);
}

.kw-item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--brown);
  flex: 1;
}

.kw-item-arrow {
  font-size: 10px;
  color: var(--brown-light);
  transition: transform 0.2s;
  margin-left: 8px;
}

.kw-item-active .kw-item-arrow {
  transform: rotate(180deg);
}

.kw-item-body {
  padding-bottom: 10px;
}

.kw-item-content {
  font-size: 12px;
  line-height: 1.7;
  color: var(--brown-light);
  padding: 4px 0 8px 0;
}

/* ============ 个人中心页 ============ */
.profile-header {
  display: flex;
  align-items: center;
  padding: 24px 0 16px;
  gap: 16px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 12px;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: bold;
  box-shadow: var(--shadow-green);
}

.profile-logo-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(46,90,60,0.25);
  border: 2px solid rgba(255,255,255,0.8);
  flex-shrink: 0;
}

.user-name {
  font-size: 18px;
  font-weight: 500;
  color: var(--brown);
}

.user-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.status-badge {
  padding: 3px 10px;
  background: var(--green-bg);
  color: var(--green);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--green-light);
}

.activation-code {
  font-size: 12px;
  color: var(--brown-light);
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--cream-dark);
  font-size: 14px;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  color: var(--brown-light);
}

.info-value {
  color: var(--brown);
  font-weight: 500;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--cream-dark);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}

.menu-item:active {
  background: rgba(0,0,0,0.03);
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-icon {
  font-size: 22px;
  margin-right: 14px;
}

.menu-text {
  flex: 1;
  font-size: 15px;
  color: var(--brown);
}

.menu-arrow {
  color: var(--border);
  font-size: 18px;
}

/* ============ 响应式 ============ */
@media (max-width: 380px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
  .zw-grid { grid-template-columns: repeat(3, 1fr); }
  .zone-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .zone-action { padding: 10px 8px; }
  .zone-action-icon { font-size: 22px; width: 30px; }
  .zone-action-title { font-size: 13px; }
  .zone-action-desc { font-size: 10px; }
  .hero-today-solar { font-size: 15px; }
  .hero-score-num { font-size: 18px; }
  .hero-pos-row { flex-direction: column; }
}

@media (max-width: 360px) {
  .zone-grid { grid-template-columns: 1fr; }
}

/* ============ 补充样式 ============ */
.advice-card {
  background: linear-gradient(135deg, #f0f8f0, #e8f5e9);
  border-left: 3px solid var(--green);
}

.zw-gong-ming {
  background: #e6f0e6;
  border: 2px solid var(--green);
}

.user-meta {
  flex: 1;
}

.yunpan-info {
  font-size: 13px;
  color: var(--green);
  padding: 8px 12px;
  background: var(--cream);
  border-radius: 6px;
  margin-bottom: 12px;
  font-weight: 500;
}

/* ============ 紫微斗数新增样式 ============ */
.zw-gong-shen {
  font-size: 11px;
  color: var(--brown-light);
  margin-top: 2px;
}

.zw-gong-daxian {
  font-size: 10px;
  color: var(--green);
  margin-top: 2px;
  font-weight: 500;
}

.zw-gong-pos {
  font-size: 10px;
  color: var(--border);
}

.zw-gong-natal {
  font-size: 9px;
  color: var(--brown-light);
  margin-top: 2px;
  opacity: 0.7;
}

/* 紫微流年盘样式 */
.zw-ln-grid {
  margin-bottom: 12px;
}

.zw-ln-overall {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  text-align: center;
}

.zw-ln-good {
  background: #e6f0e6;
  color: #2d6a2d;
  border: 1px solid #a3d9a3;
}

.zw-ln-bad {
  background: #fce8e8;
  color: #a33;
  border: 1px solid #f0b0b0;
}

.zw-ln-flat {
  background: #fff8e6;
  color: #8a6d3b;
  border: 1px solid #e0d5a0;
}

.zw-ln-section {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--cream);
  border-radius: 8px;
}

.zw-ln-section-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--green);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-light);
}

.zw-ln-fly-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  font-size: 13px;
}

.zw-ln-fly-star {
  font-weight: 600;
}

.zw-ln-fly-gong {
  color: var(--brown-light);
  font-size: 12px;
}

.zw-ln-warning {
  padding: 10px 14px;
  background: #fce8e8;
  border: 1px solid #f0b0b0;
  border-radius: 8px;
  color: #a33;
  font-size: 13px;
  margin-top: 8px;
}

.zw-star-card {
  background: var(--cream);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  border-left: 3px solid var(--green);
}

.zw-star-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.zw-star-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--brown);
}

.zw-star-brightness {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #e8f5e9;
  color: var(--green);
}

.zw-star-element {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 8px;
  background: #fff3e0;
  color: #e65100;
}

.zw-star-nature {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 8px;
  background: #e3f2fd;
  color: #1565c0;
}

.zw-aux-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: var(--cream);
  border-radius: 6px;
  margin-bottom: 6px;
}

.zw-aux-name {
  font-weight: 600;
  color: var(--brown);
  font-size: 14px;
  white-space: nowrap;
}

.zw-aux-nature {
  font-size: 11px;
  color: var(--brown-light);
}

.zw-pattern-item {
  padding: 10px 12px;
  background: linear-gradient(135deg, #f0f8f0, #e8f5e9);
  border-radius: 8px;
  margin-bottom: 8px;
  border-left: 3px solid var(--green);
}

.zw-sanfang-list {
  margin-top: 6px;
}

.zw-sanfang-item {
  padding: 8px 10px;
  background: var(--cream);
  border-radius: 6px;
  margin-bottom: 6px;
}

.zw-sanfang-pos {
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
}

.zw-sanfang-gong {
  font-size: 13px;
  color: var(--brown);
  margin-left: 4px;
}

.zw-sanfang-stars {
  font-size: 12px;
  color: var(--brown-light);
  margin-top: 4px;
}

.zw-sihua-item {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.zw-sihua-star {
  font-weight: 600;
  font-size: 14px;
}

.zw-sihua-gong {
  font-size: 12px;
  color: var(--brown-light);
  margin-left: 6px;
}

.zw-palace-item {
  padding: 10px 12px;
  background: var(--cream);
  border-radius: 8px;
  margin-bottom: 8px;
}

.zw-palace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.zw-palace-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--brown);
}

.zw-palace-pos {
  font-size: 11px;
  color: var(--border);
}

.zw-luck-ji {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #e8f5e9;
  color: var(--green);
}

.zw-luck-xiong {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #ffebee;
  color: #c62828;
}

.zw-luck-ping {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #fff3e0;
  color: #e65100;
}

.zw-palace-key {
  font-size: 12px;
  color: var(--brown-light);
  line-height: 1.6;
  margin-top: 4px;
}

/* ============ 奇门遁甲新增样式 ============ */
.qm-gong-daji {
  background: #c8e6c9 !important;
  border: 2px solid var(--green);
}

.qm-gong-ji {
  background: #dcedc8 !important;
  border: 2px solid #8bc34a;
}

.qm-gong-ping {
  background: #fff8e1 !important;
  border: 2px solid #ffc107;
}

.qm-gong-xiong {
  background: #ffccbc !important;
  border: 2px solid #ff5722;
}

.qm-gong-daxiong {
  background: #ffcdd2 !important;
  border: 2px solid #c62828;
}

.qm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  justify-content: center;
}

.qm-legend-item {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.qm-pattern-item {
  padding: 10px 12px;
  background: var(--cream);
  border-radius: 8px;
  margin-bottom: 8px;
  border-left: 3px solid var(--green);
}

.qm-pattern-name {
  font-weight: 600;
  color: var(--brown);
  font-size: 14px;
  margin-left: 6px;
}

.qm-detail-card {
  background: var(--cream);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  border-left: 3px solid var(--green);
}

.qm-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.qm-detail-pos {
  font-size: 15px;
  font-weight: 600;
  color: var(--brown);
}

.qm-detail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  flex-wrap: wrap;
}

.qm-detail-label {
  font-size: 12px;
  color: var(--brown-light);
  min-width: 36px;
}

.qm-detail-star {
  font-size: 14px;
  font-weight: 600;
  color: #1565c0;
}

.qm-detail-men {
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
}

.qm-detail-shen {
  font-size: 14px;
  font-weight: 600;
  color: #6a1b9a;
}

.qm-detail-nature {
  font-size: 11px;
  color: var(--brown-light);
  padding: 2px 6px;
  background: #fff;
  border-radius: 6px;
}

.qm-dir-item {
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
}

.qm-dir-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.qm-dir-event {
  font-size: 14px;
  font-weight: 600;
  color: var(--brown);
}

.qm-dir-score {
  font-size: 14px;
  color: #f9a825;
  letter-spacing: 2px;
}

.qm-dir-direction {
  font-size: 13px;
  color: var(--green);
  margin-bottom: 4px;
}

.qm-dir-detail {
  font-size: 12px;
  color: var(--brown-light);
  margin-bottom: 4px;
}

/* ============ 深度分析组件 ============ */
.deep-card {
  margin-top: 12px;
}

.deep-section {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: rgba(248,241,227,0.4);
  border-radius: var(--radius-sm);
}

.deep-label {
  font-size: 13px;
  font-weight: bold;
  color: var(--green);
  margin-bottom: 6px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.deep-label::before {
  content: '◆';
  font-size: 10px;
  color: var(--green-light);
}

.deep-text {
  font-size: 13px;
  line-height: 1.8;
  color: var(--brown);
  margin-bottom: 6px;
}

.deep-row {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.deep-col {
  flex: 1;
}

.deep-sub {
  font-size: 12px;
  line-height: 1.7;
  color: var(--brown);
  padding: 5px 0;
}

.deep-good {
  color: var(--green);
  font-weight: 500;
}

.deep-bad {
  color: var(--red);
  font-weight: 500;
}

.deep-block {
  padding: 14px;
  background: linear-gradient(135deg, var(--cream-light), var(--cream));
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  border-left: 3px solid var(--green);
}

.deep-block-focus {
  border-left-color: var(--orange);
  background: linear-gradient(135deg, #fff8e1, #fff3e0);
}

.deep-block-title {
  font-size: 15px;
  font-weight: bold;
  color: var(--green);
  margin-bottom: 8px;
}

.deep-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.deep-tags .tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
}

.deep-classical {
  font-family: var(--font-kai);
  font-style: italic;
  color: var(--brown);
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(248,241,227,0.6));
  border-radius: var(--radius-md);
  border-left: 3px solid var(--brown-light);
  font-size: 14px;
  line-height: 1.8;
}

.deep-summary-card {
  background: linear-gradient(135deg, #f8fdf8, #f0f8f0);
  border: 1px solid var(--green);
  border-radius: var(--radius-md);
}

.deep-summary-text {
  font-size: 14px;
  line-height: 2;
  color: var(--brown);
  text-align: justify;
}

.deep-section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 12px 0;
}

/* 困难化解建议卡片 */
.difficulty-card {
  background: linear-gradient(135deg, #fffef5, #f9f5ec);
  border: 1px solid var(--green);
  border-radius: var(--radius-md);
}

.difficulty-card .deep-section {
  background: rgba(248,241,227,0.5);
  border-left: 3px solid var(--green-light);
}

.deep-action {
  padding: 8px 12px;
  margin: 4px 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.7), rgba(248,241,227,0.5));
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--green);
  font-size: 12px;
  line-height: 1.8;
  color: var(--brown);
}

/* ============ 六爻占卜 ============ */
.ly-hexagram-wrap {
  display: flex;
  justify-content: center;
  gap: 50px;
  padding: 24px 0 16px;
  flex-wrap: wrap;
}

.ly-hex-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ly-hex-title {
  font-size: 15px;
  font-weight: bold;
  color: var(--green);
  margin-bottom: 10px;
  padding: 4px 16px;
  background: var(--green-bg);
  border-radius: 12px;
  letter-spacing: 1px;
}

.ly-yao-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-family: var(--font-kai);
  min-height: 32px;
}

.ly-yao-pos {
  font-size: 12px;
  color: var(--brown-light);
  width: 36px;
  text-align: right;
}

.ly-yao-sym {
  letter-spacing: 3px;
  font-size: 20px;
  color: var(--green);
  position: relative;
  min-width: 130px;
  text-align: center;
  font-weight: 500;
}

.ly-moving-mark {
  color: var(--red);
  font-size: 16px;
  margin-left: 6px;
  font-weight: bold;
}

.ly-yao-mark {
  font-size: 13px;
  width: 22px;
  text-align: center;
  font-weight: bold;
}

.ly-shi-mark {
  color: var(--red);
}

.ly-ying-mark {
  color: var(--blue);
}

.ly-yao-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ly-yao-header {
  display: grid;
  grid-template-columns: 1fr 0.8fr 1fr 1fr 1fr 0.8fr 0.5fr;
  font-weight: bold;
  color: var(--green);
  background: var(--green-bg);
  padding: 10px 0;
  text-align: center;
  border-bottom: 2px solid var(--green-light);
}

.ly-yao-header span {
  text-align: center;
}

.ly-yao-tr {
  display: grid;
  grid-template-columns: 1fr 0.8fr 1fr 1fr 1fr 0.8fr 0.5fr;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  text-align: center;
  color: var(--brown);
  transition: background 0.15s;
}

.ly-yao-tr:last-child {
  border-bottom: none;
}

.ly-yao-tr span {
  text-align: center;
}

.ly-yao-tr.ly-moving {
  background: rgba(198,40,40,0.06);
}

.ly-yao-tr.ly-moving span:first-child {
  color: var(--red);
  font-weight: bold;
}

/* ============ 灵鲤先生 AI 命理师 ============ */
.ai-action-btn {
  width: 100%;
  margin-top: 14px;
  background: linear-gradient(135deg, #3a7a55 0%, #1a4028 100%) !important;
  font-size: 15px;
  letter-spacing: 1px;
}
.ai-btn-icon { margin-right: 6px; }

.ai-unavailable {
  margin-top: 14px;
  padding: 14px;
  text-align: center;
  color: var(--brown-light);
  font-size: 13px;
  background: rgba(248,241,227,0.5);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
}

.ai-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 14px;
  color: var(--green);
  font-size: 14px;
  background: linear-gradient(135deg, #f8fdf8, #f0f8f0);
  border-radius: var(--radius-md);
  margin-top: 12px;
}
.ai-loading-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--green);
  animation: aiPulse 1s ease-in-out infinite;
}
@keyframes aiPulse {
  0%, 100% { transform: scale(0.7); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
}

.ai-result-card {
  margin-top: 14px;
  background: linear-gradient(145deg, #ffffff, #faf6ee);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(209,195,168,0.5);
  box-shadow: 0 4px 20px rgba(94,71,51,0.10);
  overflow: hidden;
  animation: cardIn 0.35s ease;
}
.ai-result-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #3a7a55 0%, #1a4028 100%);
  color: #fff;
}
.ai-master-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: bold;
  font-family: var(--font-kai);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.ai-master-avatar.lg { width: 52px; height: 52px; font-size: 24px; }
.ai-master-name { font-size: 15px; font-weight: bold; letter-spacing: 1px; }
.ai-master-name.lg { font-size: 17px; }
.ai-master-sub { font-size: 11px; opacity: 0.8; margin-top: 2px; }
.ai-meta { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 11px; opacity: 0.9; }
.ai-meta .tag { background: rgba(255,255,255,0.2); color: #fff; }
.ai-model { font-size: 10px; opacity: 0.7; }
.ai-tokens { font-size: 10px; opacity: 0.7; }

.ai-result-body {
  padding: 16px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--brown);
}
.ai-h2 {
  font-size: 16px;
  font-weight: bold;
  color: var(--green);
  margin: 14px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(46,90,60,0.12);
}
.ai-h2:first-child { margin-top: 0; }
.ai-h3 {
  font-size: 14px;
  font-weight: bold;
  color: var(--green-dark);
  margin: 12px 0 6px;
}
.ai-para { margin-bottom: 10px; }
.ai-point {
  padding: 6px 10px;
  margin: 6px 0;
  background: rgba(248,241,227,0.5);
  border-left: 3px solid var(--green-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
}
.ai-item {
  margin: 8px 0;
  padding: 8px 12px;
  background: linear-gradient(135deg, #f8fdf8, #f0f8f0);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.8;
}
.ai-item-num { color: var(--green); font-weight: bold; margin-right: 4px; }
.ai-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 12px 0;
}
.ai-quote {
  padding: 8px 12px;
  margin: 6px 0;
  background: rgba(255,255,255,0.6);
  border-left: 3px solid var(--brown-light);
  font-family: var(--font-kai);
  font-size: 13px;
  color: var(--brown);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.ai-result-body strong { color: var(--green-dark); }

.ai-disclaimer {
  padding: 10px 16px;
  font-size: 11px;
  color: var(--brown-light);
  background: rgba(248,241,227,0.4);
  border-top: 1px solid var(--border-light);
  text-align: center;
}
.ai-error {
  margin-top: 12px;
  padding: 14px;
  color: var(--red);
  background: rgba(198,40,40,0.06);
  border-radius: var(--radius-md);
  font-size: 13px;
  text-align: center;
}

/* 问灵鲤先生页 */
.ai-master-card {
  background: linear-gradient(145deg, #ffffff, #faf6ee) !important;
}
.ai-master-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.ai-master-desc {
  font-size: 13px;
  color: var(--brown);
  line-height: 1.8;
  padding: 8px 12px;
  background: rgba(248,241,227,0.4);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--green-light);
}
.ai-bio-hint {
  margin: 12px 0;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--brown);
  background: rgba(232,240,232,0.6);
  border-radius: var(--radius-md);
  border: 1px solid rgba(46,90,60,0.12);
}
.ai-bio-change { color: var(--brown-light); font-size: 11px; }
.ai-question-input {
  min-height: 80px;
  resize: vertical;
  font-size: 14px;
  line-height: 1.6;
}
.ai-quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}
.ai-quick-tag {
  padding: 6px 12px;
  font-size: 12px;
  color: var(--green-dark);
  background: rgba(232,240,232,0.7);
  border: 1px solid rgba(46,90,60,0.15);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.ai-quick-tag:active, .ai-quick-tag:hover {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

/* ============ 户型图上传 ============ */
.floor-upload-area {
  margin: 10px 0 14px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  background: rgba(248,241,227,0.4);
  transition: all 0.2s;
  cursor: pointer;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.floor-upload-area.floor-drop-active {
  border-color: var(--green);
  background: rgba(232,240,232,0.6);
  transform: scale(1.01);
}
.floor-upload-placeholder {
  color: var(--brown-light);
  font-size: 13px;
}
.floor-upload-icon {
  font-size: 32px;
  margin-bottom: 6px;
}
.floor-preview-wrap {
  width: 100%;
}
.floor-preview-img {
  max-width: 100%;
  max-height: 320px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 12px rgba(94,71,51,0.12);
  margin-bottom: 10px;
}
.floor-remove-btn {
  display: block;
  margin: 0 auto;
  font-size: 12px;
  padding: 6px 16px;
}

/* ============ 平面图绘制模式 ============ */
.floor-mode-tabs {
  display: flex;
  gap: 0;
  margin: 10px 0 14px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.floor-mode-tab {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--brown-light);
  background: rgba(248,241,227,0.4);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  letter-spacing: 1px;
}
.floor-mode-tab.active {
  background: var(--green);
  color: #fff;
}
.floor-mode-panel { display: none; }
.floor-mode-panel.active { display: block; }

/* 房间选择 + 家具面板 */
.floor-draw-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.floor-tool-label {
  width: 100%;
  font-size: 12px;
  color: var(--brown-light);
  margin-top: 6px;
  margin-bottom: 2px;
  letter-spacing: 1px;
}
.floor-tool-chip {
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 13px;
  color: var(--brown);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.floor-tool-chip:hover { border-color: var(--green); }
.floor-tool-chip.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.floor-tool-chip.danger.active {
  background: #c44;
  border-color: #c44;
}

/* 网格画板 */
.floor-grid-wrap {
  position: relative;
  margin: 10px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(94,71,51,0.12);
  background: #f5f0e6;
}
.floor-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 1px;
  background: rgba(46,90,60,0.12);
  padding: 1px;
  aspect-ratio: 1 / 1;
}
.floor-cell {
  background: #faf6ee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  position: relative;
  transition: background 0.1s;
  min-height: 0;
}
.floor-cell:hover { background: #f0e9d6; }
.floor-cell.has-item { background: #e8f0e8; }
.floor-cell.has-item.room-客厅 { background: #e8f0e8; }
.floor-cell.has-item.room-卧室 { background: #f0e8f0; }
.floor-cell.has-item.room-书房 { background: #e8ecf0; }
.floor-cell.has-item.room-厨房 { background: #f5e8d8; }
.floor-cell.has-item.room-卫生间 { background: #d8ecf0; }
.floor-cell.has-item.room-餐厅 { background: #f0f0d8; }
.floor-cell.has-item.room-阳台 { background: #d8f0e0; }
.floor-cell-item {
  font-size: 16px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}
.floor-cell-label {
  position: absolute;
  bottom: 1px;
  left: 1px;
  font-size: 7px;
  color: rgba(94,71,51,0.4);
  line-height: 1;
}

/* 八卦方位叠加层 */
.floor-bagua-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
}
.floor-bagua-tag {
  display: flex;
  align-items: flex-flex-start;
  justify-content: flex-start;
  padding: 2px 3px;
  font-size: 8px;
  color: rgba(46,90,60,0.35);
  font-weight: 600;
  line-height: 1.1;
}

/* 绘制操作按钮 */
.floor-draw-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.floor-draw-actions button { flex: 1; font-size: 13px; }

/* 方向指示 */
.floor-grid-compass {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 11px;
  color: rgba(46,90,60,0.5);
  font-weight: 700;
  pointer-events: none;
  z-index: 2;
  background: rgba(255,255,255,0.7);
  padding: 2px 8px;
  border-radius: 10px;
}

/* ============ 九宫飞星图 ============ */
.yunpan-info {
  background: linear-gradient(135deg, var(--green), #3d6b4e);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 10px;
  text-align: center;
  font-family: var(--font-kai);
  font-weight: 500;
}
.fx-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 3px;
  background: var(--border);
  padding: 3px;
  border-radius: var(--radius-md);
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 12px;
}
.fx-cell {
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 2px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.fx-cell:active { transform: scale(0.96); }
.fx-cell.auspicious { background: #f0f7f0; }
.fx-cell.inauspicious { background: #fdf0f0; }
.fx-cell.daji { background: #fff3e0; }
.fx-cell-active {
  box-shadow: inset 0 0 0 2px var(--green);
  z-index: 2;
}
.fx-cell-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-kai);
  flex-shrink: 0;
  margin-bottom: 2px;
}
.fx-cell-pos {
  font-size: 11px;
  color: var(--brown);
  font-weight: 600;
  font-family: var(--font-kai);
}
.fx-cell-name {
  font-size: 11px;
  color: var(--green);
  font-family: var(--font-kai);
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}
.fx-cell-type {
  font-size: 9px;
  font-weight: 700;
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: 8px;
}
.fx-cell.auspicious .fx-cell-type { color: #fff; background: var(--green); }
.fx-cell.inauspicious .fx-cell-type { color: #fff; background: var(--red); }
.fx-cell.daji .fx-cell-type { color: #fff; background: #e65100; }

/* 飞星详情区 */
.fx-detail-box {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
  min-height: 60px;
}
.fx-detail-title {
  font-size: 15px;
  font-weight: bold;
  font-family: var(--font-kai);
  margin-bottom: 6px;
}
.fx-detail-tip {
  font-size: 12px;
  color: var(--brown);
  margin-bottom: 8px;
  line-height: 1.5;
}
.fx-detail-section {
  font-size: 12px;
  color: var(--brown);
  margin-bottom: 4px;
  line-height: 1.5;
}
.fx-detail-section.fx-good { color: var(--green); }
.fx-detail-section.fx-bad { color: var(--red); }
.fx-detail-combo {
  font-size: 11px;
  color: var(--brown-light);
  padding-left: 12px;
  margin-bottom: 2px;
}

/* 方位速查 */
.quick-section { margin-bottom: 8px; }
.quick-label {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 3px;
  font-family: var(--font-kai);
}
.quick-items {
  font-size: 12px;
  color: var(--brown);
  line-height: 1.5;
}

/* 三大凶方警告 */
.fx-warn-item {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}
.fx-warn-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.fx-warn-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 4px;
  font-family: var(--font-kai);
}

/* ============ 八字表格：超窄屏适配 ============ */
@media (max-width: 380px) {
  .bazi-chart-row {
    min-width: 380px;
  }
  .bazi-gan, .bazi-zhi { font-size: 22px; letter-spacing: 1px; }
  .bazi-canggan { font-size: 13px; letter-spacing: 1px; }
  .bazi-canggan-ss { font-size: 10px; }
  .bazi-chart-label { font-size: 11px; }
  .bazi-chart-cell { font-size: 12px; min-height: 34px; padding: 5px 1px; }
  .bazi-chart-head .bazi-chart-cell { font-size: 13px; }
  .bazi-ss { font-size: 11px; }
  .bazi-nayin { font-size: 11px; }
  .sanchu-grid { grid-template-columns: repeat(2, 1fr); }
  .liunian-overall { flex-wrap: wrap; }
  .liunian-event { flex-wrap: wrap; }
  .liunian-event .ev-type { min-width: auto; }
}

/* ============ 测算历史记录 ============ */
.history-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--cream-dark);
  cursor: pointer;
  transition: background 0.2s;
}
.history-item:active { background: rgba(0,0,0,0.03); }
.history-item:last-child { border-bottom: none; }
.history-item-header {
  display: flex;
  align-items: center;
}
.history-icon {
  font-size: 20px;
  margin-right: 10px;
  flex-shrink: 0;
}
.history-info { flex: 1; min-width: 0; }
.history-title {
  font-size: 14px;
  color: var(--brown);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-meta {
  font-size: 12px;
  color: var(--brown-light);
  margin-top: 2px;
}
.history-arrow {
  color: var(--border);
  font-size: 18px;
  flex-shrink: 0;
  margin-left: 8px;
}
.history-summary {
  font-size: 12px;
  color: var(--brown-light);
  margin-top: 6px;
  margin-left: 30px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ai-result-text { font-size: 14px; line-height: 1.8; color: var(--brown); }
.ai-result-text .ai-h2,
.ai-result-text .ai-h3 { font-size: 15px; font-weight: 600; color: var(--green); margin: 12px 0 6px; }
.ai-result-text .ai-point { margin: 4px 0; padding-left: 4px; }
.ai-result-text .ai-item { margin: 4px 0; }
.ai-result-text .ai-para { margin: 6px 0; }

/* ============ AI 次数徽标 ============ */
.ai-credits {
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
}
.ai-credits-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}
.ai-credits-ok {
  background: #e8f5e9;
  color: var(--green);
}
.ai-credits-low {
  background: #fff3e0;
  color: #e65100;
}
.ai-credits-member {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #fff;
}
.ai-error-action {
  margin-top: 8px;
  font-size: 13px;
  color: var(--brown);
  line-height: 1.6;
}
.ai-error-action strong { color: var(--green); }

/* ============ 会员卡片 ============ */
.member-card {
  background: linear-gradient(135deg, #f0f8f0, #e8f5e9);
  border-left: 3px solid var(--green);
  padding: 14px;
  border-radius: 8px;
  margin-top: 8px;
}
.member-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 6px;
}
.member-card-desc {
  font-size: 13px;
  color: var(--brown);
  line-height: 1.6;
}
.member-card-price {
  font-size: 20px;
  font-weight: 700;
  color: #d4a017;
  margin: 8px 0;
}
.member-card-btn {
  display: block;
  width: 100%;
  padding: 10px;
  text-align: center;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 8px;
}
.member-card-btn:active { opacity: 0.85; }

/* ============ 管理后台 ============ */
.admin-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.admin-search { flex: 1; }
.admin-filter { width: 120px; flex-shrink: 0; }

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.admin-stat-item {
  text-align: center;
  background: linear-gradient(145deg, #ffffff, #faf6ee);
  border-radius: 10px;
  padding: 12px 4px;
  border: 1px solid rgba(209,195,168,0.4);
}
.admin-stat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--green);
  line-height: 1.2;
}
.admin-stat-label {
  font-size: 11px;
  color: var(--brown-light);
  margin-top: 4px;
}

.admin-trend-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-trend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.admin-trend-date {
  width: 48px;
  color: var(--brown-light);
  flex-shrink: 0;
}
.admin-trend-bar-wrap {
  flex: 1;
  height: 10px;
  background: rgba(46,90,60,0.08);
  border-radius: 5px;
  overflow: hidden;
}
.admin-trend-bar {
  height: 100%;
  background: linear-gradient(90deg, #4a7a5c, #2E5A3C);
  border-radius: 5px;
  transition: width .4s ease;
}
.admin-trend-count {
  width: 90px;
  text-align: right;
  color: var(--brown);
  flex-shrink: 0;
  font-size: 12px;
}

.admin-user-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-user-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255,253,248,0.6);
  border-radius: 8px;
  border: 1px solid rgba(209,195,168,0.3);
  cursor: pointer;
  transition: background .15s;
}
.admin-user-item:hover, .admin-user-item:active {
  background: rgba(46,90,60,0.06);
}
.admin-user-code {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--brown);
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-user-meta {
  font-size: 12px;
  color: var(--brown-light);
}

.admin-action-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 8px;
}
.admin-action-btn {
  flex-shrink: 0;
  padding: 10px 16px !important;
  margin-bottom: 0 !important;
}
.admin-action-result {
  margin-top: 8px;
  font-size: 13px;
}
.admin-action-success {
  color: var(--green);
  background: var(--green-bg);
  padding: 10px;
  border-radius: 8px;
}
.admin-action-error {
  color: #c0392b;
  background: #fdecea;
  padding: 10px;
  border-radius: 8px;
}

.admin-log-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-log-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
}
.admin-log-consume { background: rgba(192,57,43,0.06); }
.admin-log-recharge { background: rgba(46,90,60,0.06); }
.admin-log-plan { background: rgba(212,160,23,0.08); }
.admin-log-action { color: var(--brown); font-weight: 500; }
.admin-log-time { color: var(--brown-light); font-size: 11px; }

/* ============ 错误监控 ============ */
.admin-err-num-fatal { color: #c0392b !important; }
.admin-err-num-error { color: #d35400 !important; }
.admin-err-list { display: flex; flex-direction: column; gap: 8px; }
.admin-err-item {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(192,57,43,0.04);
  border: 1px solid rgba(192,57,43,0.10);
  cursor: pointer;
  transition: background .15s;
}
.admin-err-item:hover, .admin-err-item:active { background: rgba(192,57,43,0.08); }
.admin-err-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12px;
}
.admin-err-src { color: var(--brown); font-weight: 500; }
.admin-err-time { color: var(--brown-light); margin-left: auto; font-size: 11px; }
.admin-err-msg {
  color: var(--brown);
  font-size: 13px;
  line-height: 1.5;
  word-break: break-all;
}
.tag-danger { background: #c0392b; color: #fff; }
.tag-error { background: #d35400; color: #fff; }
.tag-warn { background: #d4a017; color: #fff; }
.admin-err-stack {
  background: rgba(94,71,51,0.05);
  border: 1px solid rgba(94,71,51,0.10);
  border-radius: 8px;
  padding: 12px;
  font-size: 11px;
  color: var(--brown);
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 360px;
  overflow-y: auto;
  margin: 0;
}
.admin-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 0 4px;
}
.admin-page-btn { padding: 6px 14px !important; font-size: 12px !important; }
.admin-page-btn:disabled { opacity: .4; }
.admin-page-info { font-size: 12px; color: var(--brown-light); }

@media (max-width: 480px) {
  .admin-stat-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-stat-item:nth-child(4), .admin-stat-item:nth-child(5) { grid-column: span 1; }
  .admin-action-row { flex-wrap: wrap; }
  .admin-action-btn { flex: 1; min-width: 120px; }
  .admin-trend-count { width: 70px; font-size: 11px; }
  .admin-err-stack { font-size: 10px; max-height: 280px; }
  .admin-pager { flex-wrap: wrap; gap: 8px; }
}

/* ============ 分享裂变（邀请有奖） ============ */
.referral-banner {
  background: linear-gradient(135deg, rgba(212,160,23,0.12), rgba(192,57,43,0.08));
  border: 1px solid rgba(212,160,23,0.25);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 0 0 12px 0;
  font-size: 13px;
  color: var(--brown);
  text-align: center;
}
.referral-banner b { color: var(--red); }

.referral-share {
  padding: 4px 0 8px;
}
.referral-share-label {
  font-size: 13px;
  color: var(--brown);
  margin-bottom: 6px;
  font-weight: 500;
}
.referral-share-link {
  margin-bottom: 8px;
}
.referral-share-link input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  color: var(--brown);
  background: var(--bg-soft, #faf7f2);
  font-family: monospace;
}
.referral-share-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.referral-copy-btn,
.referral-code-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.referral-copy-btn {
  background: linear-gradient(135deg, var(--gold), var(--red));
  color: #fff;
}
.referral-code-btn {
  background: var(--bg-soft, #faf7f2);
  color: var(--brown);
  border: 1px solid var(--border);
}
.referral-copy-btn:active,
.referral-code-btn:active { opacity: 0.7; }
.referral-share-tip {
  font-size: 12px;
  color: var(--brown-light);
  line-height: 1.5;
  padding: 8px 10px;
  background: rgba(212,160,23,0.06);
  border-radius: 8px;
}
.referral-share-tip b { color: var(--red); }

.referral-stats-row {
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  margin: 8px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.referral-stat-item { text-align: center; }
.referral-stat-num {
  font-size: 22px;
  font-weight: 600;
  color: var(--red);
  line-height: 1.2;
}
.referral-stat-label {
  font-size: 11px;
  color: var(--brown-light);
  margin-top: 2px;
}

.referral-my-ref {
  font-size: 12px;
  color: var(--brown-light);
  padding: 6px 0;
  text-align: center;
}
.referral-my-ref b { color: var(--brown); }

.referral-list-title {
  font-size: 13px;
  color: var(--brown);
  font-weight: 500;
  margin: 8px 0 6px;
}
.referral-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.referral-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: var(--bg-soft, #faf7f2);
  border-radius: 8px;
  font-size: 12px;
}
.referral-list-code {
  color: var(--brown);
  font-family: monospace;
  font-weight: 500;
}
.referral-list-date {
  color: var(--brown-light);
  font-size: 11px;
}

@media (max-width: 480px) {
  .referral-share-actions { flex-direction: column; }
  .referral-stat-num { font-size: 18px; }
}

/* ============ Tab 导航（八字/紫微结果页） ============ */
.result-tabs {
  display: flex;
  gap: 0;
  margin: -12px -16px 14px -16px;
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 56px;
  z-index: 10;
}
.result-tab-btn {
  flex: 1;
  text-align: center;
  padding: 14px 0;
  font-size: 15px;
  color: var(--brown-light);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  font-weight: 500;
}
.result-tab-btn.active {
  color: var(--green);
  border-bottom-color: var(--green);
  font-weight: 600;
}
.result-tab-pane {
  display: none;
}
.result-tab-pane.active {
  display: block;
}

/* ============ 手风琴折叠卡片（用于深度内容） ============ */
.accordion-card .card-title {
  cursor: pointer;
  margin-bottom: 0;
  padding-bottom: 12px;
}
.accordion-card .card-title .acc-arrow {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.25s;
  color: var(--brown-lighter);
}
.accordion-card.open .card-title .acc-arrow {
  transform: rotate(180deg);
}
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.accordion-card.open .accordion-body {
  /* 深度解读内容量大（奇门 16 段、紫微 20+ 段），预留足够高度并允许自适应，防截断 */
  max-height: none;
  overflow: visible;
}

/* ============ 真人问诊模块 ============ */
/* 师父介绍卡 */
.consult-master { padding: 4px 0; }
.consult-master-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.consult-master-lineage {
  font-size: 13px; color: var(--brown);
  padding: 6px 10px; background: rgba(212,160,23,0.06);
  border-left: 3px solid var(--gold); border-radius: 4px; margin-bottom: 10px;
}
.consult-master-intro {
  font-size: 14px; line-height: 1.75; color: var(--brown-dark);
  margin-bottom: 10px;
}
.consult-master-expert, .consult-master-cities, .consult-master-onsite {
  font-size: 13px; color: var(--brown); margin-bottom: 6px; line-height: 1.6;
}
.consult-master-principles { margin-top: 10px; font-size: 13px; color: var(--brown); }
.consult-master-principles ul { margin: 4px 0 0 16px; padding: 0; }
.consult-master-principles li { line-height: 1.7; }

/* 档位选择 */
.consult-tier-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.consult-tier-item {
  border: 1px solid var(--brown-lighter);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255,255,255,0.4);
}
.consult-tier-item:active { transform: scale(0.99); }
.consult-tier-item.selected {
  border-color: var(--gold);
  background: rgba(212,160,23,0.08);
  box-shadow: 0 2px 8px rgba(212,160,23,0.15);
}
.consult-tier-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;
}
.consult-tier-name { font-size: 15px; font-weight: 600; color: var(--brown-dark); }
.consult-tier-price { font-size: 15px; font-weight: 600; color: var(--red); }
.consult-tier-desc { font-size: 13px; color: var(--brown); line-height: 1.6; margin-bottom: 8px; }
.consult-tier-scope { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.consult-scope-chip {
  font-size: 12px; padding: 3px 8px; border-radius: 10px;
  background: rgba(46,90,60,0.08); color: var(--green);
}
.consult-tier-deliver { margin-top: 4px; }

/* 下单表单微信提示 */
.consult-agree { margin: 10px 0; line-height: 1.7; }

/* 订单详情页 */
.consult-detail-status { margin: 8px 0 12px; }
.consult-price-line {
  display: flex; justify-content: space-between; padding: 4px 0;
  font-size: 14px; color: var(--brown);
}
.consult-price-val.strong { color: var(--red); font-weight: 600; }
.consult-brief {
  font-size: 14px; line-height: 1.75; color: var(--brown-dark);
  white-space: pre-wrap; word-break: break-word;
}

/* 微信引导卡 */
.consult-wechat-card { border-left: 3px solid #07C160; }
.consult-wechat-hint { font-size: 13px; color: var(--brown); margin: 6px 0 8px; line-height: 1.7; }
.consult-wechat-payload {
  font-size: 12px; line-height: 1.7; font-family: monospace;
  background: rgba(0,0,0,0.02); padding: 10px; border-radius: 6px;
  border: 1px dashed var(--brown-lighter);
  width: 100%; box-sizing: border-box; resize: none;
}
.consult-wechat-actions { margin-top: 10px; text-align: center; }

.consult-attach-list { margin: 0; padding-left: 20px; font-size: 13px; }
.consult-attach-list li { padding: 3px 0; }

/* 时间线 */
.consult-timeline { padding-left: 8px; }
.consult-timeline-item { display: flex; gap: 10px; padding: 6px 0; position: relative; }
.consult-timeline-dot {
  width: 8px; height: 8px; background: var(--gold); border-radius: 50%;
  margin-top: 6px; flex-shrink: 0;
}
.consult-timeline-content { flex: 1; }
.consult-timeline-time { font-size: 11px; color: var(--brown-lighter); }
.consult-timeline-note { font-size: 13px; color: var(--brown-dark); line-height: 1.6; }

/* 订单列表 */
.consult-list-item {
  display: block; text-decoration: none; color: inherit;
  padding: 12px;
}
.consult-list-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;
}
.consult-list-orderid { font-size: 13px; color: var(--brown); font-family: monospace; }
.consult-list-tier { font-size: 14px; font-weight: 500; color: var(--brown-dark); margin-bottom: 4px; }
.consult-list-brief { font-size: 13px; color: var(--brown); line-height: 1.6; margin-bottom: 6px; }
.consult-list-foot { display: flex; justify-content: space-between; font-size: 12px; }
.consult-list-price { color: var(--red); font-weight: 500; }
.consult-list-date { color: var(--brown-lighter); }

/* 管理端订单列表 */
.admin-consult-list { display: flex; flex-direction: column; gap: 10px; }
.admin-consult-item { padding: 12px; }
.admin-consult-head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.admin-consult-orderid { font-family: monospace; font-weight: 600; color: var(--brown-dark); }
.admin-consult-meta { font-size: 13px; color: var(--brown); margin-bottom: 6px; }
.admin-consult-brief { font-size: 13px; color: var(--brown-dark); line-height: 1.6; margin-bottom: 6px; }
.admin-consult-contact {
  padding: 6px 8px; background: rgba(212,160,23,0.06); border-radius: 4px;
  font-size: 12px; color: var(--brown-dark); margin-bottom: 6px;
}
.admin-consult-foot { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.admin-consult-price { font-size: 13px; color: var(--red); font-weight: 500; }
.admin-consult-actions {
  display: flex; gap: 6px; flex-wrap: wrap; padding-top: 6px;
  border-top: 1px dashed var(--brown-lighter);
}
.admin-consult-actions .admin-action-btn {
  padding: 5px 10px; font-size: 12px;
}
.admin-timeline-item {
  padding: 4px 0; font-size: 13px; line-height: 1.7; color: var(--brown-dark);
  border-bottom: 1px dashed rgba(0,0,0,0.05);
}
.admin-timeline-time { color: var(--brown-lighter); font-size: 11px; margin-right: 6px; }

/* ============ 交付报告弹窗 ============ */
.ll-modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; padding: 20px;
}
.ll-modal-box {
  background: var(--paper, #F8F5EE); border-radius: 12px;
  width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  display: flex; flex-direction: column;
}
.ll-modal-title {
  padding: 16px 18px 12px; font-size: 16px; font-weight: 600;
  color: var(--brown-dark); border-bottom: 1px solid rgba(0,0,0,0.06);
}
.ll-modal-body { padding: 14px 18px; }
.ll-modal-foot {
  padding: 12px 18px; display: flex; gap: 10px; justify-content: flex-end;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.ll-modal-foot .btn-primary, .ll-modal-foot .btn-secondary {
  min-width: 96px; padding: 8px 16px; font-size: 14px;
}
.ll-modal-divider {
  display: flex; align-items: center; gap: 10px;
  color: var(--brown-lighter); font-size: 12px;
  margin: 12px 0;
}
.ll-modal-divider::before, .ll-modal-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(0,0,0,0.08);
}

