:root {
  --bg-primary: #0A0A14;
  --bg-secondary: #10101E;
  --bg-card: rgba(18, 18, 32, 0.82);
  --bg-card-solid: #141428;
  --border-color: rgba(180, 155, 100, 0.15);
  --purple: #8B7EC8;
  --purple-light: #B8A9E0;
  --purple-dark: #5B4E8C;
  --gold: #C9A84C;
  --gold-light: #E8D48B;
  --gold-dark: #8B7530;
  --text-primary: #E8E0D0;
  --text-secondary: #ADA496;
  --text-muted: #706B60;
  --success: #6DBF7B;
  --error: #D46A6A;
  --warning: #D4A94C;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --transition: all 0.3s ease;
  --font-main: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', -apple-system, sans-serif;
  --font-serif: 'STSong', 'Songti SC', 'SimSun', 'PingFang SC', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ========== 背景图 + 叠加层 ========== */
.bg-ink {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: url('../bg_main.jpg') center top / cover no-repeat;
}

.bg-ink::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 30%, rgba(90,70,140,0.08), transparent),
    radial-gradient(ellipse 500px 350px at 75% 60%, rgba(140,120,80,0.05), transparent);
}

.bg-ink::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,14,24,0.25) 0%, rgba(14,14,24,0.05) 40%, rgba(14,14,24,0.35) 100%);
}

/* 金色光点粒子 */
.gold-particles {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}

.gold-particle {
  position: absolute;
  width: 2px; height: 2px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(201,168,76,0.4);
  animation: particleFloat 15s ease-in-out infinite;
  opacity: 0;
}

.gold-particle:nth-child(1) { left:10%; top:20%; animation-delay:0s; animation-duration:18s; }
.gold-particle:nth-child(2) { left:30%; top:60%; animation-delay:3s; animation-duration:22s; }
.gold-particle:nth-child(3) { left:55%; top:15%; animation-delay:6s; animation-duration:16s; }
.gold-particle:nth-child(4) { left:75%; top:45%; animation-delay:9s; animation-duration:20s; }
.gold-particle:nth-child(5) { left:20%; top:80%; animation-delay:2s; animation-duration:24s; }
.gold-particle:nth-child(6) { left:85%; top:70%; animation-delay:5s; animation-duration:19s; }
.gold-particle:nth-child(7) { left:45%; top:35%; animation-delay:8s; animation-duration:21s; }
.gold-particle:nth-child(8) { left:65%; top:85%; animation-delay:1s; animation-duration:17s; }

@keyframes particleFloat {
  0%   { opacity: 0; transform: translateY(0) scale(0.5); }
  15%  { opacity: 0.7; }
  50%  { opacity: 0.3; transform: translateY(-40px) scale(1); }
  85%  { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-80px) scale(0.5); }
}

/* 祥云暗纹装饰线 */
.bg-pattern {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.03;
  background-image:
    repeating-linear-gradient(90deg, transparent, transparent 80px, rgba(201,168,76,0.3) 80px, transparent 81px),
    repeating-linear-gradient(0deg, transparent, transparent 80px, rgba(201,168,76,0.2) 80px, transparent 81px);
}

/* ========== 容器 ========== */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px;
  position: relative;
  z-index: 1;
}

/* ========== 头部 ========== */
.header {
  text-align: center;
  padding: 30px 0 20px;
}

.header h1 {
  font-size: 1.8rem;
  font-family: var(--font-serif);
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 6px;
  margin-bottom: 6px;
}

.header .subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 6px;
  font-family: var(--font-serif);
}

/* 装饰分隔线 */
.header-deco {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 10px 0 6px;
  color: var(--gold);
  opacity: 0.4;
  font-size: 0.7rem;
}

.header-deco::before, .header-deco::after {
  content: '';
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ========== 卡片面板 ========== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin-bottom: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.card-title {
  font-size: 0.95rem;
  color: var(--gold);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
}

.card-title .icon { font-size: 1.1rem; }

/* ========== 表单 ========== */
.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-row { display: flex; gap: 10px; }
.form-row .form-group { flex: 1; }

input, select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(10, 10, 20, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

input:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(201, 168, 76, 0.15);
}

select option { background: var(--bg-secondary); }

/* ========== 性别/历法按钮 ========== */
.gender-toggle, .calendar-toggle {
  display: flex;
  gap: 10px;
}

.calendar-toggle { margin-bottom: 16px; }

.gender-btn, .cal-btn {
  flex: 1;
  padding: 10px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.cal-btn { padding: 8px; font-size: 0.85rem; }

.gender-btn:hover, .cal-btn:hover { border-color: var(--gold); }

.gender-btn.active, .cal-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201, 168, 76, 0.08);
  box-shadow: 0 0 12px rgba(201, 168, 76, 0.1);
}

/* ========== 按钮 ========== */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border: none;
  border-radius: var(--radius-md);
  color: #1a1a2e;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-serif);
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 3px;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(201, 168, 76, 0.3);
}

.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: var(--transition);
}

.btn-primary:hover::after { opacity: 1; }

.btn-secondary {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ========== 加载 ========== */
.loading-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(10, 10, 20, 0.92);
  z-index: 1000; justify-content: center; align-items: center;
  flex-direction: column; gap: 20px;
}

.loading-overlay.active { display: flex; }

.spinner {
  width: 50px; height: 50px;
  border: 2px solid rgba(201, 168, 76, 0.15);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
  font-family: var(--font-serif);
}

/* ========== Toast ========== */
.toast {
  position: fixed; top: 20px; left: 50%;
  transform: translateX(-50%) translateY(-100px);
  padding: 12px 24px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  z-index: 2000;
  transition: transform 0.3s ease;
  backdrop-filter: blur(12px);
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { border-color: var(--error); color: var(--error); }
.toast.success { border-color: var(--success); color: var(--success); }

/* ========== 分隔线 ========== */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.2), transparent);
  margin: 20px 0;
}

/* ========== 今日星曜 (首页钩子) ========== */
.daily-star {
  position: relative;
  background: linear-gradient(135deg, rgba(201,168,76,0.06), rgba(18,18,32,0.8));
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
}

.daily-star:hover {
  border-color: rgba(201,168,76,0.3);
  box-shadow: 0 0 20px rgba(201,168,76,0.08);
}

.daily-star-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.daily-star-name {
  font-size: 1.3rem;
  font-family: var(--font-serif);
  color: var(--gold);
  margin-bottom: 6px;
  letter-spacing: 2px;
}

.daily-star-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.daily-star-tips {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.daily-tip {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(201,168,76,0.15);
  color: var(--gold);
  background: rgba(201,168,76,0.05);
}

/* ========== 命宫速测 ========== */
.quick-test {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  text-align: center;
}

.quick-result {
  display: none;
  margin-top: 16px;
  padding: 16px;
  background: rgba(201,168,76,0.05);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: var(--radius-md);
  animation: fadeSlideIn 0.5s ease;
}

.quick-result.show { display: block; }

.quick-star-name {
  font-size: 1.5rem;
  font-family: var(--font-serif);
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: 3px;
}

.quick-star-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.quick-cta {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 20px;
  border: 1px solid var(--gold);
  border-radius: 20px;
  color: var(--gold);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  background: transparent;
  font-family: inherit;
}

.quick-cta:hover {
  background: rgba(201,168,76,0.1);
  box-shadow: 0 0 15px rgba(201,168,76,0.15);
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== 罗盘仪式动画 ========== */
.ritual-overlay {
  display: none; position: fixed; inset: 0;
  background: var(--bg-primary);
  z-index: 1000;
  justify-content: center; align-items: center;
  flex-direction: column;
}

.ritual-overlay.active { display: flex; }

.compass-ring {
  width: 200px; height: 200px;
  border: 2px solid rgba(201,168,76,0.3);
  border-radius: 50%;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}

.compass-ring::before {
  content: '';
  position: absolute; inset: 10px;
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 50%;
}

.compass-needle {
  width: 2px; height: 80px;
  background: linear-gradient(var(--gold), transparent);
  transform-origin: bottom center;
  animation: needleSpin 3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  position: absolute; top: 20px;
}

@keyframes needleSpin {
  0% { transform: rotate(0deg); }
  40% { transform: rotate(720deg); }
  70% { transform: rotate(1040deg); }
  100% { transform: rotate(1080deg); }
}

.compass-chars {
  position: absolute; width: 100%; height: 100%;
  animation: charsRotate 3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes charsRotate {
  0% { transform: rotate(0deg); opacity: 0.3; }
  50% { opacity: 1; }
  100% { transform: rotate(-360deg); opacity: 0.6; }
}

.compass-char {
  position: absolute;
  font-size: 0.7rem;
  color: var(--gold);
  font-family: var(--font-serif);
}

.ritual-text {
  margin-top: 30px;
  color: var(--gold);
  font-size: 0.9rem;
  font-family: var(--font-serif);
  letter-spacing: 4px;
  opacity: 0;
  animation: ritualTextIn 1s 1s ease forwards;
}

@keyframes ritualTextIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 0.8; transform: translateY(0); }
}

/* ========== 宫位逐个揭示 ========== */
.palace-cell.hidden-palace {
  opacity: 0;
  transform: scale(0.8);
}

.palace-cell.reveal-palace {
  animation: palaceReveal 0.4s ease forwards;
}

@keyframes palaceReveal {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* ========== 命盘格子 (专业版) ========== */
.palace-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, auto);
  gap: 0;
  margin: 12px 0;
  border: 1px solid rgba(180,155,100,0.2);
}

.palace-cell {
  background: rgba(14, 14, 24, 0.85);
  border: 1px solid rgba(180, 155, 100, 0.12);
  padding: 0;
  font-size: 0.7rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  min-height: 100px;
}

.palace-cell:hover {
  background: rgba(201,168,76,0.04);
  z-index: 1;
}

.palace-cell.is-ming {
  background: linear-gradient(180deg, rgba(201,168,76,0.08), rgba(14,14,24,0.85));
}

.palace-cell.is-ming .p-header { border-bottom-color: rgba(201,168,76,0.25); }

.palace-cell.is-shen {
  background: linear-gradient(180deg, rgba(139,126,200,0.06), rgba(14,14,24,0.85));
}

/* 宫位顶栏 */
.p-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 5px;
  border-bottom: 1px solid rgba(180,155,100,0.08);
  background: rgba(201,168,76,0.03);
  min-height: 18px;
}

.p-name {
  font-size: 0.62rem;
  color: var(--gold);
  font-family: var(--font-serif);
  letter-spacing: 1px;
  font-weight: bold;
}

.p-name .ming-mark {
  color: #E8D48B;
  font-size: 0.5rem;
  margin-left: 2px;
}

.p-gz {
  font-size: 0.55rem;
  color: var(--text-muted);
  font-family: var(--font-serif);
}

/* 星曜区域 */
.p-body {
  flex: 1;
  padding: 3px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* 主星行 */
.p-main-stars {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  margin-bottom: 2px;
}

.p-main-star {
  font-size: 0.68rem;
  color: var(--gold);
  font-weight: bold;
  font-family: var(--font-serif);
  white-space: nowrap;
}

.p-main-star .s-bright {
  font-size: 0.48rem;
  color: var(--gold-dark);
  font-weight: normal;
  vertical-align: super;
}

/* 吉星行 */
.p-lucky-stars {
  display: flex;
  flex-wrap: wrap;
  gap: 1px 4px;
}

.p-lucky-star {
  font-size: 0.58rem;
  color: var(--success);
  white-space: nowrap;
}

/* 煞星行 */
.p-evil-stars {
  display: flex;
  flex-wrap: wrap;
  gap: 1px 4px;
}

.p-evil-star {
  font-size: 0.58rem;
  color: var(--error);
  white-space: nowrap;
}

/* 四化标记 */
.p-sihua {
  display: flex;
  gap: 3px;
  margin-top: auto;
  padding-top: 2px;
}

/* 底栏 */
.p-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 4px;
  border-top: 1px solid rgba(180,155,100,0.06);
  min-height: 14px;
}

.p-changsheng {
  font-size: 0.48rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.p-daxian {
  font-size: 0.48rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* 空宫标记 */
.p-empty {
  font-size: 0.55rem;
  color: rgba(112,107,96,0.5);
  font-style: italic;
  text-align: center;
  padding: 6px 0;
}

/* 中宫 */
.palace-center {
  grid-column: 2 / 4;
  grid-row: 2 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(14, 14, 24, 0.9);
  border: 1px solid rgba(180, 155, 100, 0.12);
  padding: 16px 12px;
}

.center-title {
  font-size: 1.1rem;
  font-family: var(--font-serif);
  color: var(--gold);
  margin-bottom: 10px;
  letter-spacing: 6px;
}

.center-info {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 2;
  font-family: var(--font-serif);
}

.center-info .ci-label {
  color: var(--text-muted);
  font-size: 0.6rem;
}

.center-info .ci-value {
  color: var(--gold);
}

/* 小屏适配 */
@media (max-width: 420px) {
  .palace-cell { min-height: 80px; }
  .p-name { font-size: 0.55rem; }
  .p-gz { font-size: 0.48rem; }
  .p-main-star { font-size: 0.6rem; }
  .p-lucky-star, .p-evil-star { font-size: 0.5rem; }
  .p-main-star .s-bright { font-size: 0.42rem; }
}

/* 大屏加高 */
@media (min-width: 640px) {
  .palace-cell { min-height: 120px; }
  .p-name { font-size: 0.7rem; }
  .p-main-star { font-size: 0.78rem; }
  .p-lucky-star, .p-evil-star { font-size: 0.65rem; }
}

/* 旧class兼容 */
.star-tag.main { color: var(--gold); font-weight: bold; }
.star-tag.lucky { color: var(--success); }
.star-tag.evil { color: var(--error); }

/* ========== 结果页: 分段渐入 ========== */
.reveal-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.result-section {
  margin-bottom: 16px;
}

.result-section h3 {
  font-size: 0.95rem;
  color: var(--gold);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-serif);
}

.result-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.9;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag {
  padding: 4px 12px;
  background: rgba(201, 168, 76, 0.06);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--gold);
}

/* ========== 模糊付费区 ========== */
.locked-section {
  position: relative;
  overflow: hidden;
}

.locked-section .locked-content {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
}

.locked-section .unlock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 20, 0.5);
  backdrop-filter: blur(2px);
  z-index: 2;
}

.unlock-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  opacity: 0.8;
}

.unlock-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  text-align: center;
  line-height: 1.6;
}

.unlock-btn {
  padding: 10px 28px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border: none;
  border-radius: 24px;
  color: #1a1a2e;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 1px;
}

.unlock-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(201,168,76,0.3);
}

.unlock-alt {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.unlock-alt a {
  color: var(--gold);
  text-decoration: none;
}

/* ========== 追问 ========== */
.followup-box { margin-top: 16px; }

.followup-input {
  display: flex;
  gap: 8px;
}

.followup-input input { flex: 1; }
.followup-input button { padding: 10px 16px; white-space: nowrap; }

.followup-history { margin-top: 12px; }

.followup-item {
  margin-bottom: 12px;
  padding: 14px;
  background: rgba(10, 10, 20, 0.4);
  border-radius: var(--radius-sm);
  border-left: 2px solid rgba(201,168,76,0.2);
}

.followup-q {
  font-size: 0.8rem;
  color: var(--gold);
  margin-bottom: 8px;
  font-family: var(--font-serif);
}

.followup-a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ========== 四化徽章 ========== */
.sihua-badge {
  display: inline-block;
  font-size: 0.55rem;
  padding: 0 3px;
  border-radius: 2px;
  margin-left: 2px;
  font-weight: bold;
}
.sihua-badge.lu { color: #6DBF7B; }
.sihua-badge.quan { color: #D4A94C; }
.sihua-badge.ke { color: #6B9ED4; }
.sihua-badge.ji { color: #D46A6A; }

.brightness {
  font-size: 0.5rem;
  color: var(--text-muted);
  margin-left: 1px;
}

.daxian-label {
  position: absolute; bottom: 1px; right: 2px;
  font-size: 0.5rem; color: var(--text-muted); opacity: 0.7;
}

.changsheng-label {
  position: absolute; top: 1px; right: 2px;
  font-size: 0.5rem; color: var(--text-muted); opacity: 0.7;
}

/* ========== 页脚 ========== */
.footer {
  text-align: center;
  padding: 30px 0 20px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.footer a { color: var(--gold); text-decoration: none; }

/* ========== 响应式 ========== */
@media (max-width: 360px) {
  .container { padding: 12px 10px; }
  .card { padding: 16px 14px; }
  .palace-cell { padding: 4px; font-size: 0.6rem; }
  .star-tag { font-size: 0.55rem; }
}

/* ========== 宫位弹窗 ========== */
.palace-modal {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(10,10,20,0.92);
  justify-content: center; align-items: center; padding: 20px;
}

.palace-modal.active { display: flex; }

/* ========== 引导红点 ========== */
.notify-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--gold);
  border-radius: 50%;
  margin-left: 6px;
  animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(201,168,76,0); }
}

/* ========== 整体解读引言 ========== */
.reading-intro {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 2;
  font-style: italic;
  padding: 16px 20px;
  margin-bottom: 16px;
  border-left: 2px solid var(--gold);
  background: linear-gradient(90deg, rgba(201,168,76,0.04), transparent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-serif);
}

/* ========== 建议卡片 ========== */
.advice-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px; border-radius: var(--radius-md);
  background: rgba(10,10,20,0.3);
  border: 1px solid rgba(201,168,76,0.08);
  transition: var(--transition);
  margin-bottom: 10px;
}

.advice-item:hover {
  border-color: rgba(201,168,76,0.2);
  transform: translateX(4px);
}

.advice-num {
  flex-shrink: 0; width: 26px; height: 26px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: #1a1a2e;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
}

.advice-text {
  font-size: 0.85rem; color: var(--text-secondary); line-height: 1.8; padding-top: 2px;
}
