/* ============ 栖月 · 设计系统 ============ */

@font-face {
  font-family: 'Noto Serif SC';
  src: url('fonts/NotoSerifSC.ttf') format('truetype');
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --bg-main: #090d16;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(201, 173, 118, 0.055);
  --gold: #c9ad76;
  --gold-soft: #d8c294;
  --gold-bright: #e6ca94;
  --gold-muted: #a68c5b;
  --text: #dbe4ec;
  --text-muted: #93a0a8;
  --line: rgba(201, 173, 118, 0.16);
  --font-serif: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', 'Noto Serif CJK SC', serif;
  --font-display: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', serif;
  --font-body: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC', sans-serif;
  --radius: 14px;
  --maxw: 1280px;
}

* { box-sizing: border-box; }

/* 通用隐藏（模式分组、折叠行等） */
.hidden { display: none !important; }

html { height: auto; }

html, body { margin: 0; padding: 0; }

body {
  height: auto;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  overflow-x: hidden;
  overflow-y: auto;
}

/* 输入控件与正文区域保留选中 / 复制能力 */
input,
textarea,
select,
[contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}
::selection {
  background: rgba(201, 173, 118, 0.3);
  color: #f6ecd8;
  text-shadow: 0 0 12px rgba(201, 173, 118, 0.35);
}
.reading,
.reading *,
.reading-content,
.reading-content *,
.me-modal-body,
.me-modal-body *,
.modal-body,
.modal-body *,
pre,
code,
.dg-detail,
.dg-detail * {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* 图标 / 图片 / 装饰元素禁止被拖拽选中 */
img,
svg,
.glyph,
.t-ico,
.moon-seal,
.fan-card,
.c-card,
.coin-3d,
.coin-svg,
.tcard-face,
.fc-face {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

.page {
  position: relative;
  min-height: 100vh;
}

.skyglow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 650px at 50% -8%, rgba(201, 173, 118, 0.05), transparent 62%),
    radial-gradient(900px 700px at 88% 110%, rgba(70, 96, 128, 0.10), transparent 55%);
}

canvas#starfield {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 92% at 50% 42%, transparent 58%, rgba(5, 8, 14, 0.46) 100%);
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: relative;
  z-index: 5;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.moon-seal {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--gold);
  filter: drop-shadow(0 0 8px rgba(201, 173, 118, 0.35));
}

.moon-seal svg { width: 26px; height: 26px; }

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  color: var(--text);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-select {
  padding: 6px 8px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(230, 194, 128, 0.2);
  color: rgba(232, 220, 196, 0.82);
  font-size: 12px; font-family: inherit; letter-spacing: 0.04em;
  outline: none; cursor: pointer;
}
.lang-select option { background: #0d1420; color: #e8dcc4; }

/* 语言切换：地球图标 + 下拉菜单（各语言以母语名称展示） */
.lang-switch {
  position: relative;
  flex: none;
}
.lang-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(232, 220, 196, 0.8);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(230, 194, 128, 0.2);
  cursor: pointer;
  transition: all 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.lang-btn:hover {
  color: #f0d090;
  border-color: rgba(230, 194, 128, 0.5);
  box-shadow: 0 0 14px rgba(201, 173, 118, 0.18);
}
.lang-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 158px;
  padding: 6px;
  background: rgba(13, 20, 32, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(230, 194, 128, 0.22);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lang-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(232, 220, 196, 0.78);
  font-size: 13px;
  font-family: inherit;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.lang-item:hover {
  background: rgba(201, 173, 118, 0.1);
  color: #f0d090;
}
.lang-item.active {
  color: #f0d090;
  background: rgba(201, 173, 118, 0.14);
}

/* 顶栏圆形头像入口（与语言地球图标同尺寸） */
.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  letter-spacing: 0;
  color: #17120a;
  font-family: var(--font-serif);
  background:
    radial-gradient(120% 120% at 50% 28%, rgba(255, 238, 200, 0.9), transparent 58%),
    linear-gradient(135deg, #e6c280, #c5a059);
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 14px rgba(201, 173, 118, 0.28);
  overflow: hidden;
  flex: none;
}
.account-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(230, 194, 128, 0.2);
  cursor: pointer;
  transition: all 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.account-btn:hover {
  border-color: rgba(230, 194, 128, 0.5);
  box-shadow: 0 0 14px rgba(201, 173, 118, 0.18);
}
.nav-account-link {
  padding: 0 !important;
  border-radius: 50%;
  border: 1px solid rgba(230, 194, 128, 0.2);
}
.nav-account-link:hover {
  border-color: rgba(230, 194, 128, 0.5);
  box-shadow: 0 0 14px rgba(201, 173, 118, 0.18);
}

/* ---------- 响应式与多语言排版（自适应） ---------- */
body {
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}
h1, h2, h3, h4, p, span, a, label, li, button, input, select {
  overflow-wrap: break-word;
}
.grid > *, .me-grid > *, .module-card, .pillar, .me-tile, .dg-card, .dg-card2, .zw-cell, .me-reading,
.account-menu, .settings-drawer, .login-card, .me-card, .pf-card, .ad-card {
  min-width: 0;
}
.me-reading .rt b, .me-reading .rt span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.pillar-sub, .dg-lines p, .me-tile span, .recharge-hint, .me-reading time {
  overflow-wrap: anywhere;
}

/* 流式标题字号 */
.tarot-title { font-size: clamp(1.3rem, 3.4vw, 1.85rem); }
.login-title  { font-size: clamp(1.55rem, 4.5vw, 2.2rem); }
.me-name      { font-size: clamp(1.15rem, 3vw, 1.45rem); }
.pf-title     { font-size: clamp(1.35rem, 4vw, 1.8rem); }

/* 英文环境微调：基础字号略收、字距收紧、连字符换行 */
.lang-en { font-size: 0.95em; }
.lang-en .brand-name,
.lang-en .login-title,
.lang-en .me-name,
.lang-en .pf-title,
.lang-en .tarot-title,
.lang-en .me-tile b,
.lang-en .dg-card h3,
.lang-en .settings-head b {
  letter-spacing: 0.08em;
  text-indent: 0;
}
.lang-en .ghost,
.lang-en .btn,
.lang-en .pill,
.lang-en .tab,
.lang-en .account-item,
.lang-en .dg-tag,
.lang-en .login-tabs .tab,
.lang-en .me-badge {
  letter-spacing: 0.03em;
  text-indent: 0;
}
.lang-en .btn,
.lang-en .btn-primary,
.lang-en .btn-gold,
.lang-en .recharge-btn {
  font-size: 0.92em;
  text-indent: 0;
  white-space: nowrap;
}
.lang-en .q-input,
.lang-en .dg-input,
.lang-en .login-field input,
.lang-en .dg-select {
  letter-spacing: 0.02em;
  text-align: left;
}
.lang-en .pill {
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}
.lang-en .me-stat b { font-size: clamp(1.1rem, 3vw, 1.4rem); }

.ghost {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: 13px var(--font-body);
  letter-spacing: 0.08em;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.3s ease, background 0.3s ease;
}

.ghost:hover {
  color: var(--gold-soft);
  background: rgba(201, 173, 118, 0.06);
}

.ghost.icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
}

.ghost.icon svg { width: 18px; height: 18px; }

/* ---------- 主区 ---------- */

main {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 2rem;
}

.hero {
  position: relative;
  text-align: center;
  padding: clamp(84px, 14vh, 150px) 0 clamp(56px, 9vh, 96px);
}

.moon-glow {
  position: absolute;
  left: 50%;
  top: 44%;
  width: min(640px, 90vw);
  height: 340px;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center,
      rgba(201, 173, 118, 0.11),
      rgba(226, 214, 190, 0.05) 46%,
      transparent 72%);
  filter: blur(28px);
}

.brand-title {
  position: relative;
  z-index: 1;
  margin: 0;
  line-height: 0;
}

.brand-title svg {
  display: block;
  width: clamp(300px, 44vw, 480px);
  height: auto;
  margin: 0 auto;
  color: var(--gold);
  filter: drop-shadow(0 0 12px rgba(201, 173, 118, 0.28))
          drop-shadow(0 0 42px rgba(201, 173, 118, 0.12));
}

.hero-sub {
  position: relative;
  z-index: 1;
  margin: 30px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
}

/* ---------- 双主按钮分流 ---------- */

.pill-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 58px;
}

.pill {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 28px;
  border: 1px solid rgba(201, 173, 118, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  cursor: pointer;
  transition:
    border-color 0.35s ease,
    background 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.3s ease;
}

.pill:hover {
  border-color: #c9ad76;
  background: rgba(201, 173, 118, 0.06);
  box-shadow: 0 0 15px rgba(201, 173, 118, 0.2);
  transform: translateY(-1px);
}

.pill-main {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.12em;
  color: var(--gold-soft);
}

.pill-sub {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

/* ---------- 板块 ---------- */

.modules {
  margin-top: clamp(72px, 10vh, 128px);
  padding-bottom: 96px;
}

.module-section {
  margin-bottom: 56px;
}

.module-section:last-child { margin-bottom: 0; }

.section-head {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 20px;
  padding-bottom: 14px;
}

.section-head::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(201, 173, 118, 0.3), rgba(201, 173, 118, 0));
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 18px;
  letter-spacing: 0.2em;
  color: var(--gold-soft);
}

.section-head span {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: rgba(201, 173, 118, 0.4);
}

.featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

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

.grid.single {
  grid-template-columns: 1fr 1fr;
}

.module-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  text-decoration: none;
  transition:
    box-shadow 0.45s ease,
    transform 0.45s ease;
}

.module-card:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 20px rgba(201, 173, 118, 0.1),
    0 0 0 1px rgba(201, 173, 118, 0.08),
    0 16px 44px -18px rgba(0, 0, 0, 0.6);
}

.module-card.featured {
  min-height: 112px;
  padding: 28px 30px;
}

.glyph {
  flex: none;
  width: 38px;
  height: 38px;
  color: var(--gold);
  opacity: 0.82;
  transition: transform 0.5s ease, opacity 0.4s ease;
}

.module-card:hover .glyph {
  transform: rotate(-3deg) scale(1.04);
  opacity: 1;
}

.module-card.featured .glyph { width: 44px; height: 44px; }

.card-text { min-width: 0; }

.card-text h2 {
  margin: 0 0 7px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 19px;
  letter-spacing: 0.14em;
  color: var(--text);
}

.module-card.featured .card-text h2 { font-size: 22px; }

.card-text p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

/* ---------- 页脚 ---------- */

.footer {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 2rem 42px;
  text-align: center;
}

.footer p {
  margin: 0;
  color: rgba(147, 160, 168, 0.5);
  font-size: 11.5px;
  letter-spacing: 0.06em;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 9;
  transform: translateX(-50%) translateY(16px);
  padding: 12px 24px;
  border-radius: 999px;
  background: rgba(16, 22, 34, 0.9);
  border: 1px solid rgba(201, 173, 118, 0.24);
  color: var(--gold-soft);
  font-size: 13px;
  letter-spacing: 0.08em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- 登录页 ---------- */
.login-main {
  min-height: calc(100vh - 150px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 54px 20px 40px;
  position: relative;
  z-index: 2;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 44px 38px 34px;
  border: 1px solid rgba(201, 173, 118, 0.16);
  border-radius: 18px;
  background: rgba(15, 20, 30, 0.74);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: center;
  box-shadow: 0 28px 70px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.login-seal {
  width: 46px;
  margin: 0 auto 16px;
  color: var(--gold);
  filter: drop-shadow(0 0 12px rgba(201, 173, 118, 0.4));
}

.login-title {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  color: var(--gold-soft);
  margin: 0 0 6px;
  text-shadow: 0 0 22px rgba(201, 173, 118, 0.25);
}

.login-sub {
  font-size: 12px;
  letter-spacing: 0.3em;
  color: rgba(230, 194, 128, 0.55);
  margin: 0 0 32px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.login-field {
  display: grid;
  gap: 7px;
}

.login-field span {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: rgba(230, 194, 128, 0.7);
}

.login-field input {
  width: 100%;
  padding: 13px 15px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(230, 194, 128, 0.22);
  color: #f0e6d8;
  font-size: 15px;
  letter-spacing: 0.05em;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.login-field input:focus {
  border-color: rgba(230, 194, 128, 0.55);
  box-shadow: 0 0 0 1px rgba(230, 194, 128, 0.18), 0 0 18px rgba(230, 194, 128, 0.1);
}

.login-field input::placeholder { color: rgba(147, 160, 168, 0.45); }

.login-form .btn {
  letter-spacing: 0.24em;
}

.login-hint {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-muted);
  text-align: center;
  margin: 2px 0 0;
  min-height: 1.4em;
}

.login-note {
  font-size: 11px;
  line-height: 1.7;
  color: rgba(147, 160, 168, 0.5);
  text-align: center;
  margin: 8px 0 0;
}

/* ---------- 响应式 ---------- */

@media (max-width: 860px) {
  .featured { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .topbar { padding: 22px 18px 0; }
  main { padding: 0 18px; }
  .footer { padding: 0 18px 30px; }
  .pill-row { flex-direction: column; align-items: stretch; }
  .pill { justify-content: center; }
  .module-card { padding: 20px 22px; }
  .featured, .grid { gap: 14px; }
  .grid.single { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ============ 塔罗牌阵页 ============ */

.tarot-main {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(56px, 9vh, 110px) 2rem 60px;
  position: relative;
  z-index: 2;
}

.tarot-head { text-align: center; margin-bottom: 52px; }

.tarot-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(30px, 5vw, 42px);
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: var(--gold-soft);
}

.tarot-sub {
  margin: 18px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 0.2em;
}

.step {
  animation: stepIn 0.5s ease both;
}

.step.hidden { display: none; }

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

.step-label {
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.24em;
  color: var(--gold-muted);
  margin-bottom: 18px;
  text-align: center;
}

.q-input {
  display: block;
  width: 100%;
  max-width: 560px;
  margin: 0 auto 22px;
  padding: 16px 20px;
  border: 1px solid rgba(201, 173, 118, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  font: 15px var(--font-body);
  letter-spacing: 0.04em;
  outline: none;
  text-align: center;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.q-input::placeholder { color: rgba(147, 160, 168, 0.5); }

.q-input:focus {
  border-color: rgba(201, 173, 118, 0.45);
  box-shadow: 0 0 0 1px rgba(201, 173, 118, 0.18), 0 0 22px rgba(201, 173, 118, 0.08);
}

/* 起卦页“所问何事”按钮居中 */
#step-question {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- 历史记录详情弹窗 ---------- */
.me-modal {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(5, 9, 15, 0.72);
  backdrop-filter: blur(6px);
}
.me-modal-card {
  width: min(680px, 100%);
  max-height: 82vh; overflow-y: auto;
  background: rgba(13, 18, 26, 0.97);
  border: 1px solid rgba(230, 194, 128, 0.2);
  border-radius: 16px;
  padding: 24px 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}
.me-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.me-modal-head b { font-size: 1rem; font-weight: 400; letter-spacing: .14em; color: #f0d090; font-family: var(--font-serif); }
.me-modal-close { background: none; border: 0; color: rgba(147,160,168,.8); font-size: 22px; cursor: pointer; line-height: 1; padding: 2px 4px; }
.me-modal-close:hover { color: #f0d090; }
.me-modal-meta { font-size: .76rem; color: rgba(147,160,168,.8); margin-bottom: 14px; letter-spacing: .06em; }
.me-modal-body { font-size: .88rem; line-height: 1.85; color: rgba(232,220,196,.92); }
.me-modal-body h1, .me-modal-body h2, .me-modal-body h3, .me-modal-body h4 { color: #f0d090; font-weight: 400; letter-spacing: .08em; margin: 14px 0 8px; }
.me-modal-body strong { color: #f0d090; font-weight: 600; }
.me-modal-body hr { border: none; height: 1px; margin: 16px 0; background: linear-gradient(90deg, transparent, rgba(230,194,128,.3), transparent); }
.me-modal-body ul { padding-left: 18px; }

.btn-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 26px;
}

.btn {
  display: inline-block;
  padding: 13px 30px;
  border: 1px solid rgba(201, 173, 118, 0.28);
  border-radius: 999px;
  background: rgba(201, 173, 118, 0.07);
  color: var(--gold-soft);
  font: 14px var(--font-serif);
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

.btn:hover:not(:disabled) {
  border-color: #c9ad76;
  background: rgba(201, 173, 118, 0.12);
  box-shadow: 0 0 18px rgba(201, 173, 118, 0.16);
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn.ghost-btn {
  background: transparent;
  border-color: rgba(201, 173, 118, 0.16);
  color: var(--text-muted);
}

.btn.loading { opacity: 0.6; pointer-events: none; }

/* 牌阵选择 */
.spread-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 30px;
}

.spread-card {
  position: relative;
  padding: 20px 18px;
  border: 1px solid rgba(201, 173, 118, 0.13);
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.spread-card:hover {
  border-color: rgba(201, 173, 118, 0.3);
  box-shadow: 0 0 18px rgba(201, 173, 118, 0.07);
}

.spread-card.selected {
  border-color: rgba(201, 173, 118, 0.55);
  background: rgba(201, 173, 118, 0.06);
  box-shadow: 0 0 22px rgba(201, 173, 118, 0.12);
}

.spread-card .s-name {
  display: block;
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 0.12em;
  color: var(--gold-soft);
  margin-bottom: 8px;
}

.spread-card .s-desc {
  display: block;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted);
}

.spread-card .s-count {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(201, 173, 118, 0.5);
}

/* 牌面 */
.card-fan {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(8px, 2.4vw, 22px);
  min-height: 320px;
  padding: 20px 0 34px;
  perspective: 1200px;
}

.tarot-card {
  width: clamp(92px, 15vw, 132px);
  flex: none;
}

.tcard-pos {
  display: block;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(201, 173, 118, 0.55);
  margin-bottom: 12px;
  min-height: 15px;
}

.tcard-flip {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(0.23, 1, 0.32, 1);
}

.tarot-card.flipped .tcard-flip { transform: rotateY(180deg); }

.tcard-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(201, 173, 118, 0.22);
  background: #121822;
  box-shadow: 0 14px 36px -18px rgba(0, 0, 0, 0.75);
}

.tcard-back {
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 120% at 50% 30%, rgba(201, 173, 118, 0.14), transparent 58%),
    linear-gradient(160deg, #141b26, #0d1119);
}

.tcard-back::before {
  content: '';
  width: 58%;
  height: 58%;
  border: 1px solid rgba(201, 173, 118, 0.35);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(201, 173, 118, 0.55) 0 2px, transparent 3px),
    radial-gradient(circle, transparent 52%, rgba(201, 173, 118, 0.18) 54% 56%, transparent 58%);
}

.tcard-front {
  transform: rotateY(180deg);
  background: #0e1217;
}

.tcard-front img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 14px rgba(201, 173, 118, 0.16));
}

.tarot-card.reversed .tcard-front img {
  transform: rotate(180deg);
}

/* ---------- 塔罗手动抽牌：扇形轮盘 ---------- */
.result-cards {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: clamp(8px, 2.4vw, 22px);
  min-height: 320px;
  padding: 20px 0 34px;
  perspective: 1200px;
}

.pick-slots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 auto 18px;
  max-width: 720px;
}
.pick-slot {
  width: 84px;
  min-height: 132px;
  padding: 8px 6px 10px;
  border: 1px solid rgba(201, 173, 118, 0.14);
  border-radius: 10px;
  background: rgba(10, 14, 22, 0.4);
  text-align: center;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.pick-slot.active {
  border-color: rgba(230, 194, 128, 0.5);
  background: rgba(201, 173, 118, 0.06);
  box-shadow: 0 0 16px rgba(201, 173, 118, 0.12);
  animation: stepIn 0.4s ease both;
}
.pick-slot.filled {
  border-color: rgba(230, 194, 128, 0.32);
}
.pick-slot .ps-name {
  display: block;
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--gold-soft);
  margin-bottom: 8px;
}
.pick-slot .ps-card {
  position: relative;
  display: block;
  width: 54px;
  height: 86px;
  margin: 0 auto;
  border-radius: 7px;
  overflow: hidden;
  background: linear-gradient(160deg, #141b26, #0d1119);
  border: 1px solid rgba(230, 194, 128, 0.35);
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.7);
}
.pick-slot .ps-card.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(230, 194, 128, 0.4);
  font-size: 18px;
  background:
    radial-gradient(100% 100% at 50% 30%, rgba(201, 173, 118, 0.1), transparent 60%),
    linear-gradient(160deg, #141b26, #0d1119);
}
.pick-slot .ps-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pick-slot .ps-card img.rev {
  transform: rotate(180deg);
}
.pick-slot .ps-rev {
  position: absolute;
  left: 3px;
  bottom: 3px;
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(214, 120, 120, 0.95);
  background: rgba(5, 9, 15, 0.75);
  border-radius: 4px;
  padding: 1px 4px;
}

.card-wheel {
  position: relative;
  max-width: 900px;
  height: 296px;
  margin: 0 auto 6px;
  overflow-x: auto;
  overflow-y: hidden;
  touch-action: pan-x;
  cursor: grab;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.card-wheel::-webkit-scrollbar { display: none; }
.card-wheel:active { cursor: grabbing; }
.card-fan.wheel {
  position: relative;
  display: block;
  height: 270px;
  margin: 0;
  padding: 0;
  min-height: 0;
  perspective: 1400px;
  transform-origin: 50% 100%;
}
.card-wheel.shuffling .card-fan.wheel {
  animation: fanShuffle 0.9s ease both;
}
@keyframes fanShuffle {
  0%   { transform: translateX(0) rotateZ(0); opacity: 0.3; }
  30%  { transform: translateX(-26px) rotateZ(-2deg); opacity: 1; }
  60%  { transform: translateX(24px) rotateZ(2deg); }
  100% { transform: translateX(0) rotateZ(0); }
}
.fan-card {
  position: absolute;
  bottom: 18px;
  width: 54px;
  height: 88px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform-origin: 50% 100%;
  transform: rotate(var(--a, 0deg));
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1), filter 0.35s;
  -webkit-tap-highlight-color: transparent;
}
.fan-card:hover {
  transform: rotate(var(--a, 0deg)) translateY(-12px);
  filter: brightness(1.12);
  z-index: 5;
}
.fan-card.picked {
  transform: rotate(var(--a, 0deg)) translateY(-24px) scale(0.9);
  filter: brightness(1.2);
  opacity: 0.55;
  pointer-events: none;
}
.fc-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
.fan-card.flipped .fc-inner {
  transform: rotateY(180deg);
}
.fc-face {
  position: absolute;
  inset: 0;
  border-radius: 7px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.fc-back {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background:
    radial-gradient(120% 120% at 50% 26%, rgba(201, 173, 118, 0.18), transparent 58%),
    linear-gradient(160deg, #171f2c, #0c1017);
  border: 1px solid rgba(230, 194, 128, 0.4);
  box-shadow: inset 0 0 0 2px rgba(5, 9, 15, 0.55), inset 0 0 18px rgba(201, 173, 118, 0.08);
}
.fc-back .fc-brand {
  font-family: var(--font-serif);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: rgba(230, 194, 128, 0.75);
}
.fc-back .fc-mark {
  color: rgba(230, 194, 128, 0.45);
  font-size: 13px;
}
.fc-front {
  transform: rotateY(180deg);
  background: #0e1217;
  border: 1px solid rgba(230, 194, 128, 0.4);
}
.fc-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wheel-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: rgba(230, 194, 128, 0.55);
  pointer-events: none;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.8);
}

/* ---------- 塔罗手动抽牌：圆形转盘（MysticX 风格） ---------- */
.card-circle-wrap {
  position: relative;
  max-width: 760px;
  margin: 0 auto 8px;
}
.card-circle-stage {
  position: relative;
  width: 100%;
  height: var(--stage-h, 560px);
}
.card-circle {
  position: absolute;
  left: 50%;
  top: var(--circle-y);
  width: var(--circle-size);
  height: var(--circle-size);
  margin-left: calc(var(--circle-size) / -2);
  margin-top: calc(var(--circle-size) / -2);
  touch-action: none;
  cursor: grab;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.card-circle.dragging {
  cursor: grabbing;
  transition: none;
}
.card-circle.shuffling {
  animation: circleShake 0.9s ease both;
}
@keyframes circleShake {
  0%   { transform: rotate(0) scale(0.96); opacity: 0.35; }
  30%  { transform: rotate(-1.5deg) scale(1.02); opacity: 1; }
  60%  { transform: rotate(1.5deg) scale(0.99); }
  100% { transform: rotate(0) scale(1); }
}
.c-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--card-w);
  height: var(--card-h);
  margin-left: calc(var(--card-w) / -2);
  margin-top: calc(var(--card-h) / -2);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  transform: translate(var(--x), var(--y)) rotate(var(--rot)) scale(0.4);
  animation: cCardPop 0.55s cubic-bezier(0.34, 1.2, 0.64, 1) both;
  animation-delay: var(--delay);
  will-change: transform, opacity;
  transition: transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.45s, filter 0.35s;
}
.c-card.ready {
  opacity: 1;
  transform: translate(var(--x), var(--y)) rotate(var(--rot)) scale(1);
  animation: none;
}
.c-card:hover {
  filter: brightness(1.14) drop-shadow(0 0 12px rgba(201, 173, 118, 0.25));
  z-index: 20;
}
.c-card.picked {
  transform: translate(var(--x2), var(--y2)) rotate(var(--rot)) scale(1.08);
  z-index: 999;
  filter: brightness(1.2) drop-shadow(0 0 18px rgba(201, 173, 118, 0.4));
}
.c-card.slide-away {
  animation: cCardAway 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: calc(var(--delay) * 0.2);
  pointer-events: none;
}
@keyframes cCardPop {
  0%   { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--rot)) scale(0.4); }
  70%  { opacity: 1; transform: translate(var(--x), var(--y)) rotate(var(--rot)) scale(1.06); }
  100% { opacity: 1; transform: translate(var(--x), var(--y)) rotate(var(--rot)) scale(1); }
}
@keyframes cCardAway {
  to { opacity: 0; transform: translate(0, 0) rotate(0) scale(0); }
}
.c-card .fc-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
.c-card.flipped .fc-inner {
  transform: rotateY(180deg);
}
.c-card .fc-face {
  position: absolute;
  inset: 0;
  border-radius: clamp(5px, 1.2vw, 8px);
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.c-card .fc-back {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background:
    radial-gradient(120% 120% at 50% 26%, rgba(201, 173, 118, 0.18), transparent 58%),
    linear-gradient(160deg, #171f2c, #0c1017);
  border: 1px solid rgba(230, 194, 128, 0.4);
  box-shadow: inset 0 0 0 2px rgba(5, 9, 15, 0.55), inset 0 0 18px rgba(201, 173, 118, 0.08);
}
.c-card .fc-back .fc-brand {
  font-family: var(--font-serif);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: rgba(230, 194, 128, 0.75);
}
.c-card .fc-back .fc-mark {
  color: rgba(230, 194, 128, 0.45);
  font-size: 12px;
}
.c-card .fc-front {
  transform: rotateY(180deg);
  background: #0e1217;
  border: 1px solid rgba(230, 194, 128, 0.4);
}
.c-card .fc-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.spin-btn {
  position: absolute;
  top: var(--spin-y, 50%);
  z-index: 30;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(230, 194, 128, 0.85);
  background: rgba(15, 20, 30, 0.68);
  border: 1px solid rgba(230, 194, 128, 0.3);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 22px;
  line-height: 1;
  padding-bottom: 2px;
  transition: all 0.25s ease;
}
.spin-btn:hover {
  color: #f0d090;
  border-color: rgba(230, 194, 128, 0.6);
  box-shadow: 0 0 16px rgba(201, 173, 118, 0.2);
}
.spin-left { left: 1%; transform: translateY(-50%); }
.spin-right { right: 1%; transform: translateY(-50%); }

/* 选牌后飞向牌位的 overlay */
.card-fly {
  position: fixed;
  left: var(--fly-left);
  top: var(--fly-top);
  width: var(--fly-w);
  height: var(--fly-h);
  z-index: 9999;
  pointer-events: none;
  perspective: 1000px;
  transition:
    left 0.75s cubic-bezier(0.34, 1.56, 0.64, 1),
    top 0.75s cubic-bezier(0.34, 1.56, 0.64, 1),
    width 0.75s cubic-bezier(0.34, 1.56, 0.64, 1),
    height 0.75s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.5s 0.5s;
}
.card-fly .card-fly-face {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #0e1217;
  border: 1px solid rgba(230, 194, 128, 0.4);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  transform: rotateY(180deg);
  opacity: 0;
  transition: transform 0.55s 0.3s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.35s 0.3s;
}
.card-fly .card-fly-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-fly.centered {
  left: var(--target-left);
  top: var(--target-top);
  width: var(--target-w);
  height: var(--target-h);
}
.card-fly.revealed .card-fly-face {
  transform: rotateY(0);
  opacity: 1;
}
.card-fly.done {
  opacity: 0;
}

/* ---------- 塔罗烫金质感（极细金属描边，渐变由 SVG 线稿承载） ---------- */
.tcard-face {
  border-color: rgba(230, 194, 128, 0.28);
  box-shadow: 0 14px 36px -18px rgba(0, 0, 0, 0.75);
}
.tcard-front img {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
}

.tcard-name {
  display: block;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--gold-soft);
  margin-top: 12px;
  min-height: 18px;
}

.tcard-name .rev { color: var(--gold-muted); font-size: 10px; margin-left: 6px; }

/* 解读区 */
.reading {
  max-width: 660px;
  margin: 0 auto;
  padding: 30px 34px;
  border-radius: 16px;
  border: 1px solid rgba(201, 173, 118, 0.14);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  font: 15px/1.85 var(--font-body);
  letter-spacing: 0.02em;
}

.reading h1,
.reading h2,
.reading h3,
.reading h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: #e6c280;
  text-shadow: 0 0 18px rgba(230, 194, 128, 0.25);
}

.reading h1 {
  font-size: 22px;
  letter-spacing: 0.24em;
  margin: 28px 0 12px;
}

.reading h2 {
  font-size: 18px;
  letter-spacing: 0.2em;
  margin: 26px 0 10px;
}

.reading h2:first-child { margin-top: 0; }

.reading h3 {
  font-size: 15px;
  letter-spacing: 0.14em;
  margin: 20px 0 8px;
}

.reading h4 {
  font-size: 14px;
  letter-spacing: 0.12em;
  color: #d8c08a;
  margin: 16px 0 8px;
}

.reading strong { color: #f0d090; font-weight: 600; }

.reading em { color: rgba(230, 202, 148, 0.82); }

.reading p { margin: 0 0 12px; }

.reading hr {
  border: none;
  height: 1px;
  margin: 18px 0;
  background: linear-gradient(90deg, transparent, rgba(230, 194, 128, 0.32), transparent);
}

.reading ul {
  margin: 0 0 12px;
  padding-left: 0;
  list-style: none;
}

.reading ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

.reading ul li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 7px;
}

.reading ul li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(230, 194, 128, 0.65);
  box-shadow: 0 0 8px rgba(230, 194, 128, 0.55);
}

.reading ol li { margin-bottom: 7px; }

.reading code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
  color: #e6c280;
  background: rgba(230, 194, 128, 0.07);
  border: 1px solid rgba(230, 194, 128, 0.14);
  border-radius: 4px;
  padding: 1px 5px;
}

.reading blockquote {
  margin: 14px 0;
  padding: 4px 0 4px 16px;
  border-left: 1px solid rgba(201, 173, 118, 0.3);
  color: var(--text-muted);
  font-style: normal;
}

/* ---------- AI 解读续聊（全站） ---------- */
.interpret-chat {
  max-width: 660px;
  margin: 22px auto 0;
  padding: 14px 16px 16px;
  border: 1px solid rgba(201, 173, 118, 0.16);
  border-radius: 14px;
  background: rgba(10, 14, 22, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.interpret-chat .ic-hint {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gold-muted);
  text-align: center;
  margin-bottom: 10px;
}
.interpret-chat .ic-row {
  display: flex;
  gap: 10px;
}
.interpret-chat .ic-input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(201, 173, 118, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: 14px var(--font-body);
  letter-spacing: 0.02em;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.interpret-chat .ic-input:focus {
  border-color: rgba(201, 173, 118, 0.5);
  box-shadow: 0 0 0 1px rgba(201, 173, 118, 0.18), 0 0 18px rgba(201, 173, 118, 0.08);
}
.interpret-chat .ic-send {
  white-space: nowrap;
  flex-shrink: 0;
}
.chat-turn {
  margin-top: 18px;
}
.chat-turn .chat-q {
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--gold-soft);
  margin-bottom: 8px;
  padding-left: 10px;
  border-left: 2px solid rgba(201, 173, 118, 0.35);
}
.chat-turn .chat-a {
  color: var(--text);
}

/* ---------- AI 解读前置背景收集（多轮追问） ---------- */
.ic-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 9, 15, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ic-card {
  width: min(520px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: rgba(13, 18, 26, 0.97);
  border: 1px solid rgba(230, 194, 128, 0.2);
  border-radius: 16px;
  padding: 24px 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}
.ic-title {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 0.24em;
  color: #f0d090;
  margin-bottom: 8px;
}
.ic-sub {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}
.ic-q {
  margin-bottom: 18px;
}
.ic-q label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--gold-soft);
  margin-bottom: 8px;
}
.ic-q-input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid rgba(201, 173, 118, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: 14px var(--font-body);
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.ic-q-input:focus {
  border-color: rgba(201, 173, 118, 0.5);
  box-shadow: 0 0 0 1px rgba(201, 173, 118, 0.18), 0 0 18px rgba(201, 173, 118, 0.08);
}
.ic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}
.ic-chip {
  padding: 4px 11px;
  border: 1px solid rgba(201, 173, 118, 0.18);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.ic-chip:hover {
  border-color: rgba(230, 194, 128, 0.5);
  color: var(--gold-soft);
}
.ic-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 6px;
}
.ic-actions .btn {
  min-width: 140px;
}

.reading .cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  vertical-align: -0.15em;
  background: var(--gold);
  opacity: 0.7;
  animation: blink 1s steps(2) infinite;
}

@keyframes blink { 50% { opacity: 0.15; } }

@media (max-width: 860px) {
  .spread-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .tarot-main { padding-left: 18px; padding-right: 18px; }
  .reading { padding: 22px 20px; }
  .card-fan { gap: 6px; }
}

/* ============ 六爻页 ============ */

.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 620px;
  margin: 0 auto 30px;
}

.method-card {
  padding: 26px 22px;
  border: 1px solid rgba(201, 173, 118, 0.16);
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.method-card:hover {
  border-color: rgba(201, 173, 118, 0.4);
  background: rgba(201, 173, 118, 0.05);
  box-shadow: 0 0 20px rgba(201, 173, 118, 0.1);
}
.method-card.selected {
  border-color: rgba(230, 194, 128, 0.55);
  background: rgba(201, 173, 118, 0.07);
  box-shadow: 0 0 22px rgba(201, 173, 118, 0.14);
}

.method-card .m-name {
  display: block;
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 0.16em;
  color: var(--gold-soft);
  margin-bottom: 10px;
}

.method-card .m-desc {
  display: block;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* 数字 / 指定起卦面板 */
.method-sub-panel {
  max-width: 620px;
  margin: -12px auto 30px;
  padding: 22px 24px 24px;
  border: 1px solid rgba(201, 173, 118, 0.16);
  border-radius: 14px;
  background: rgba(10, 14, 22, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: stepIn 0.4s ease both;
}
.panel-title {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--gold-soft);
  margin-bottom: 18px;
}
.num-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.num-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
}
.num-field label {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.num-input {
  width: 116px;
  padding: 11px 12px;
  text-align: center;
  border: 1px solid rgba(201, 173, 118, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: 15px var(--font-body);
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.num-input:focus {
  border-color: rgba(201, 173, 118, 0.5);
  box-shadow: 0 0 0 1px rgba(201, 173, 118, 0.18), 0 0 18px rgba(201, 173, 118, 0.08);
}
.method-sub-panel .btn {
  display: block;
  margin: 0 auto;
}

/* 指定起卦：手动选爻分段按钮 */
.manual-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.manual-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.manual-name {
  width: 58px;
  text-align: right;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--gold-muted);
}
.seg-opt {
  padding: 8px 15px;
  border: 1px solid rgba(201, 173, 118, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: all 0.25s;
}
.seg-opt:hover {
  border-color: rgba(201, 173, 118, 0.45);
  color: var(--gold-soft);
}
.seg-opt.on {
  background: linear-gradient(135deg, #e6c280, #c5a059);
  color: #0f141e;
  font-weight: 600;
  border-color: transparent;
  box-shadow: 0 0 16px rgba(201, 173, 118, 0.25);
}

.coin-area {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  max-width: 620px;
  margin: 0 auto 26px;
}

.coin-slot {
  border: 1px solid rgba(201, 173, 118, 0.14);
  border-radius: 10px;
  padding: 14px 8px;
  text-align: center;
  min-height: 72px;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.coin-slot.active {
  border-color: rgba(201, 173, 118, 0.5);
  background: rgba(201, 173, 118, 0.05);
  animation: stepIn 0.4s ease both;
}

.coin-slot.done { border-color: rgba(201, 173, 118, 0.3); }

.coin-slot .cs-n {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gold-muted);
  margin-bottom: 8px;
}

.coin-slot .cs-c {
  display: block;
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--gold-soft);
  min-height: 20px;
}

/* 铜钱摇卦舞台 */
.coin-stage {
  position: relative;
  height: 92px;
  max-width: 460px;
  margin: 0 auto 24px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 30px;
  pointer-events: none;
}
.coin-3d {
  width: 66px;
  height: 66px;
  position: relative;
  transform-style: preserve-3d;
  transform: translate(calc(-50% + var(--x, 0px)), var(--y, 0px)) rotateZ(var(--rot, 0deg));
  transition: transform 0.55s cubic-bezier(0.3, 0.7, 0.3, 1);
}
.coin-3d .coin-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.coin-3d .coin-face.coin-back {
  transform: rotateY(180deg);
}
.coin-3d.face-back {
  transform: translate(calc(-50% + var(--x, 0px)), var(--y, 0px)) rotateY(180deg) rotateZ(var(--rot, 0deg));
}
.coin-3d.tossing {
  animation: coinToss 1.5s cubic-bezier(0.3, 0.45, 0.4, 1) both;
  animation-delay: var(--d, 0ms);
}
.coin-svg {
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
}
@keyframes coinToss {
  0%   { transform: translate(calc(-50% + var(--x, 0px)), calc(var(--y, 0px) + 14px)) rotateY(0deg) rotateZ(0deg) scale(0.85); opacity: 0; }
  12%  { opacity: 1; transform: translate(calc(-50% + var(--x, 0px)), calc(var(--y, 0px) - 6px)) rotateY(70deg) rotateZ(16deg) scale(1); }
  30%  { transform: translate(calc(-50% + var(--x, 0px)), calc(var(--y, 0px) - 66px)) rotateY(220deg) rotateZ(-24deg) scale(1); }
  46%  { transform: translate(calc(-50% + var(--x, 0px)), calc(var(--y, 0px) - 96px)) rotateY(400deg) rotateZ(36deg) scale(1.06); }
  60%  { transform: translate(calc(-50% + var(--x, 0px)), calc(var(--y, 0px) - 60px)) rotateY(550deg) rotateZ(-18deg) scale(1); }
  74%  { transform: translate(calc(-50% + var(--x, 0px)), calc(var(--y, 0px) - 18px)) rotateY(690deg) rotateZ(10deg) scale(1); }
  86%  { transform: translate(calc(-50% + var(--x, 0px)), calc(var(--y, 0px) - 2px)) rotateY(720deg) rotateZ(-6deg) scale(1.1); }
  93%  { transform: translate(calc(-50% + var(--x, 0px)), var(--y, 0px)) rotateY(720deg) rotateZ(var(--rot, 0deg)) scale(0.95); }
  100% { transform: translate(calc(-50% + var(--x, 0px)), var(--y, 0px)) rotateY(720deg) rotateZ(var(--rot, 0deg)) scale(1); }
}

/* 爻槽内的小铜钱与爻名 */
.coin-slot .cs-coins {
  display: flex;
  justify-content: center;
  gap: 3px;
  min-height: 26px;
  margin-bottom: 6px;
}
.coin-slot .cs-coins .coin-svg {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}
.coin-slot .cs-coins.empty {
  opacity: 0.22;
}
.cs-yao {
  display: block;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--gold-soft);
}
.cs-yao i {
  font-style: normal;
  margin-left: 2px;
  color: var(--gold-muted);
  font-size: 12px;
}
.cs-yao.moving {
  color: #e6c280;
}

/* 卦象 */
.hexagram-panel {
  max-width: 620px;
  margin: 0 auto 30px;
  padding: 26px 30px 20px;
  border: 1px solid rgba(201, 173, 118, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hex-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}

.hex-main {
  font-family: var(--font-serif);
  font-size: 24px;
  letter-spacing: 0.16em;
  color: var(--gold-soft);
}

.hex-arrow { color: var(--gold-muted); font-size: 14px; }

.hex-changed {
  font-family: var(--font-serif);
  font-size: 17px;
  letter-spacing: 0.12em;
  color: var(--gold-muted);
}

.hex-meta {
  text-align: center;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.hex-lines {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.yao-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.yao-god {
  width: 44px;
  flex: none;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(201, 173, 118, 0.65);
}

.yao-tags {
  width: 34px;
  flex: none;
  display: flex;
  gap: 3px;
}

.tag {
  display: inline-block;
  min-width: 15px;
  text-align: center;
  font-size: 9.5px;
  padding: 1px 2px;
  border-radius: 3px;
  border: 1px solid rgba(201, 173, 118, 0.25);
  color: rgba(201, 173, 118, 0.7);
}

.tag.world {
  border-color: rgba(201, 173, 118, 0.6);
  color: var(--gold-soft);
}

.tag.resp { border-color: rgba(147, 160, 168, 0.4); color: var(--text-muted); }

.yao-graphic {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
}

.bar {
  display: inline-block;
  height: 9px;
  width: 58px;
  background: rgba(230, 202, 148, 0.85);
  border-radius: 2px;
}

.bar.gap { background: transparent; width: 9px; }

.yao-mark {
  margin-left: 6px;
  color: var(--gold-soft);
  font-size: 13px;
  font-weight: 600;
}

.yao-relation {
  width: 130px;
  flex: none;
  text-align: right;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--text);
}

.reading .waiting {
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* ============ 大衍筮法 · 高古质感（天体仪底纹 + 金棕标题 + 浅灰层级） ============ */
.astrolabe {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.astrolabe svg {
  width: min(116vmin, 900px);
  height: auto;
  color: #d4af37;
  opacity: 0.12;
  filter: drop-shadow(0 0 34px rgba(212, 175, 55, 0.1));
  animation: astroSpin 240s linear infinite;
}
@keyframes astroSpin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .astrolabe svg { animation: none; }
}

.dayan-page .tarot-title {
  color: var(--gold-soft);
  text-shadow: 0 0 24px rgba(201, 173, 118, 0.22);
}
.dayan-page .tarot-sub,
.dayan-page .step-label {
  color: #a0a0a0;
  font-weight: 300;
}
.dayan-page .tarot-sub { letter-spacing: 0.24em; }
.dayan-page .q-input {
  color: #cccccc;
  font-weight: 300;
}
.dayan-page .ritual-detail { color: #8a8f98; }

/* ============ 大衍筮法（揲蓍仪式） ============ */
.dayan-stage {
  max-width: 760px;
  margin: 0 auto;
  padding: 4px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.ritual-status {
  margin: 0 0 14px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 0.22em;
  color: var(--gold-soft);
  text-shadow: 0 0 18px rgba(201, 173, 118, 0.22);
  min-height: 1.6em;
}

.dayan-table {
  position: relative;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.yarrow-svg {
  display: block;
  width: 100%;
  height: auto;
  color: rgba(170, 124, 17, 0.42);
  filter: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* 高古哑光金棕细条：单线、纤细、无 3D 发光 */
.yarrow-svg .yarrow-stalk .stalk-base {
  stroke: rgba(170, 124, 17, 0.82);
  stroke-width: 1.5;
  stroke-linecap: round;
  transition: stroke 0.35s, stroke-width 0.35s, opacity 0.35s;
}
.yarrow-svg .yarrow-available .stalk-base { stroke: rgba(170, 124, 17, 0.9); }
.yarrow-svg .yarrow-unusedOne .stalk-base { stroke: rgba(170, 124, 17, 0.78); }
.yarrow-svg .yarrow-takenOne .stalk-base { stroke: rgba(170, 124, 17, 0.88); stroke-width: 1.8; }
.yarrow-svg .yarrow-countedLeft .stalk-base,
.yarrow-svg .yarrow-countedRight .stalk-base { stroke: rgba(170, 124, 17, 0.45); stroke-width: 1.5; }
.yarrow-svg .yarrow-remainder .stalk-base { stroke: rgba(170, 124, 17, 0.72); stroke-width: 1.6; }
.yarrow-svg .yarrow-spentFirst .stalk-base,
.yarrow-svg .yarrow-spentSecond .stalk-base { stroke: rgba(170, 124, 17, 0.2); stroke-width: 1.4; }

/* 哑光端点（无发光） */
.yarrow-svg .yarrow-tip { fill: rgba(170, 124, 17, 0.7); transition: fill 0.35s; }
.yarrow-svg .yarrow-available .yarrow-tip { fill: rgba(170, 124, 17, 0.8); }
.yarrow-svg .yarrow-unusedOne .yarrow-tip { fill: rgba(170, 124, 17, 0.72); }

.yarrow-svg.can-split {
  cursor: crosshair;
}
.yarrow-svg.can-split .yarrow-available .stalk-base {
  stroke-width: 3;
  filter: brightness(1.08);
}
.yarrow-svg.can-split .yarrow-available .stalk-core {
  stroke: #e6c280;
}
.yarrow-svg.can-split .yarrow-available:hover {
  filter: brightness(1.15);
}

/* 分蓍引导：仅可分蓍时浮现，置于蓍草正上方，不遮挡主体 */
.split-hint {
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s;
  z-index: 3;
}
.yarrow-svg.can-split ~ .split-hint {
  opacity: 1;
}
.split-hint .hint-text {
  font-size: 12px;
  letter-spacing: 0.3em;
  color: rgba(230, 194, 128, 0.92);
  text-shadow: 0 0 14px rgba(230, 194, 128, 0.45);
  white-space: nowrap;
  padding: 5px 16px;
  border-radius: 999px;
  border: 1px solid rgba(230, 194, 128, 0.22);
  background: rgba(9, 13, 22, 0.42);
  animation: hintBreath 2.2s ease-in-out infinite;
}

@keyframes hintBreath {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.ritual-detail {
  margin: 12px 0 0;
  min-height: 1.5em;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(201, 173, 118, 0.55);
}

.yao-progress {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.yao-slot {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(201, 173, 118, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  transition: border-color 0.4s, background 0.4s, box-shadow 0.4s;
}

.yao-slot b { font-weight: 400; }

.yao-slot .mini-bar {
  display: none;
}

.yao-slot.yang {
  border-color: rgba(230, 202, 148, 0.55);
  color: var(--gold-soft);
  background: rgba(201, 173, 118, 0.1);
  box-shadow: 0 0 14px rgba(201, 173, 118, 0.12);
}

.yao-slot.yin {
  border-color: rgba(201, 173, 118, 0.4);
  color: rgba(230, 202, 148, 0.75);
}

.yao-slot.moving {
  box-shadow: 0 0 18px rgba(230, 194, 128, 0.3);
}

@media (max-width: 620px) {
  .dayan-stage { padding: 18px 12px 16px; }
  .ritual-status { font-size: 14px; letter-spacing: 0.16em; }
  .yao-slot { width: 30px; height: 30px; }
}

@media (max-width: 620px) {
  .method-grid { grid-template-columns: 1fr; }
  .coin-area { grid-template-columns: repeat(3, 1fr); }
  .manual-row { flex-wrap: wrap; }
  .manual-name { width: auto; text-align: center; }
  .seg-opt { padding: 8px 10px; font-size: 12px; }
  .num-input { width: 92px; }
  .yao-god { width: 34px; }
  .yao-relation { width: 96px; font-size: 11px; }
  .bar { width: 42px; }
}

/* ============ 八字命盘 ============ */
.bazi-form {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.field-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.7rem;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}
.field > span {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: rgba(201, 173, 118, 0.55);
}
.field select,
.field input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(201, 173, 118, 0.18);
  border-radius: 10px;
  color: var(--gold-soft, #e2e8e5);
  padding: 0.65rem 0.7rem;
  font: inherit;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field select:focus,
.field input:focus {
  border-color: rgba(201, 173, 118, 0.45);
  box-shadow: 0 0 14px rgba(201, 173, 118, 0.12);
}
.field select option {
  background: #141b26;
  color: #e2e8e5;
}
.seg {
  display: flex;
  border: 1px solid rgba(201, 173, 118, 0.2);
  border-radius: 10px;
  overflow: hidden;
}
.seg-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  color: rgba(226, 232, 229, 0.65);
  border: 0;
  padding: 0.62rem 0.5rem;
  font: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.seg-btn.active {
  background: rgba(201, 173, 118, 0.14);
  color: var(--gold, #c9ad76);
}

.bazi-meta {
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: rgba(226, 232, 229, 0.72);
  margin-bottom: 1.4rem;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  max-width: 760px;
  margin: 0 auto 1.6rem;
}
.pillar {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(201, 173, 118, 0.16);
  border-radius: 14px;
  padding: 1rem 0.6rem 0.9rem;
  text-align: center;
  backdrop-filter: blur(6px);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.pillar:hover {
  border-color: rgba(201, 173, 118, 0.35);
  box-shadow: 0 0 20px rgba(201, 173, 118, 0.08);
}
.pillar-day {
  border-color: rgba(201, 173, 118, 0.42);
  background: rgba(201, 173, 118, 0.06);
}
.pillar-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: rgba(201, 173, 118, 0.6);
  margin-bottom: 0.55rem;
}
.pillar-gan,
.pillar-zhi {
  font-family: var(--font-serif, serif);
  font-size: 1.9rem;
  line-height: 1.15;
  color: var(--gold, #c9ad76);
  text-shadow: 0 0 16px rgba(201, 173, 118, 0.28);
}
.pillar-zhi {
  font-size: 1.55rem;
  opacity: 0.88;
}
.pillar-sub {
  margin-top: 0.42rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: rgba(226, 232, 229, 0.82);
}
.pillar-sub.dim {
  color: rgba(201, 173, 118, 0.45);
  font-size: 0.68rem;
  margin-top: 0.28rem;
}

.wx-block,
.luck-block {
  max-width: 760px;
  margin: 0 auto 1.8rem;
}
.step-label.small {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: rgba(201, 173, 118, 0.6);
  margin-bottom: 0.9rem;
}
.wx-bar {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.wx-item {
  display: grid;
  grid-template-columns: 2.2rem 1fr 2.2rem;
  align-items: center;
  gap: 0.7rem;
}
.wx-name {
  font-family: var(--font-serif, serif);
  color: var(--gold, #c9ad76);
  font-size: 0.95rem;
  text-align: center;
}
.wx-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.wx-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(201, 173, 118, 0.35), var(--gold, #c9ad76));
  transition: width 0.8s ease;
}
.wx-num {
  text-align: right;
  color: rgba(226, 232, 229, 0.6);
  font-size: 0.85rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  max-width: 760px;
  margin: 0 auto 1.8rem;
}
.meta-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.65rem 1.1rem;
  border: 1px solid rgba(201, 173, 118, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.meta-chip b {
  color: var(--gold, #c9ad76);
  font-weight: 400;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
}
.meta-chip span {
  color: rgba(226, 232, 229, 0.6);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.luck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 0.65rem;
}
.luck-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  padding: 0.7rem 0.4rem;
  border: 1px solid rgba(201, 173, 118, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.3s;
}
.luck-chip:hover {
  border-color: rgba(201, 173, 118, 0.4);
}
.luck-chip b {
  font-family: var(--font-serif, serif);
  color: var(--gold, #c9ad76);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.12em;
}
.luck-chip span {
  color: rgba(226, 232, 229, 0.5);
  font-size: 0.68rem;
}

@media (max-width: 640px) {
  .field-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .pillar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============ 紫微斗数盘面 ============ */
.zw-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  max-width: 820px;
  margin: 0 auto 1.8rem;
}
.zw-cell {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(201, 173, 118, 0.16);
  border-radius: 12px;
  padding: 0.65rem 0.55rem;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  backdrop-filter: blur(6px);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.zw-cell:hover {
  border-color: rgba(201, 173, 118, 0.35);
  box-shadow: 0 0 18px rgba(201, 173, 118, 0.07);
}
.zw-head {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.zw-head b {
  color: var(--gold, #c9ad76);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
}
.zw-head span {
  color: rgba(201, 173, 118, 0.5);
  font-size: 0.72rem;
}
.zw-badge {
  font-style: normal;
  border: 1px solid rgba(201, 173, 118, 0.35);
  color: rgba(201, 173, 118, 0.8);
  border-radius: 4px;
  font-size: 0.6rem;
  padding: 0 3px;
}
.zw-stars {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.55rem;
}
.zw-star {
  color: #e6c280;
  font-family: var(--font-serif, serif);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}
.zw-star em {
  font-style: normal;
  font-size: 0.6rem;
  color: rgba(201, 173, 118, 0.55);
  margin-left: 2px;
  vertical-align: super;
}
.zw-minors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.45rem;
}
.zw-minor {
  font-size: 0.66rem;
  color: rgba(226, 232, 229, 0.48);
}
.zw-minor em {
  font-style: normal;
  font-size: 0.55rem;
  color: rgba(201, 173, 118, 0.45);
  margin-left: 1px;
  vertical-align: super;
}
.zw-adj-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.18rem 0.4rem;
  margin-top: 0.3rem;
}
.zw-adj {
  font-size: 0.6rem;
  color: rgba(230, 194, 128, 0.62);
  letter-spacing: 0.05em;
}
.zw-12s {
  display: flex;
  flex-wrap: wrap;
  gap: 0.18rem 0.4rem;
  margin-top: 0.25rem;
}
.zw-12 {
  font-size: 0.58rem;
  color: rgba(147, 160, 168, 0.72);
  letter-spacing: 0.04em;
}
.zw-dec {
  margin-top: auto;
  font-size: 0.62rem;
  color: rgba(201, 173, 118, 0.4);
  letter-spacing: 0.08em;
}
.zw-xiao {
  font-size: 0.58rem;
  color: rgba(147, 160, 168, 0.55);
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.mut {
  font-style: normal;
  font-size: 0.6rem;
  border-radius: 4px;
  padding: 0 3px;
  margin-left: 2px;
  vertical-align: super;
}
.mut-lu { color: #e6c280; border: 1px solid rgba(230, 194, 128, 0.55); }
.mut-quan { color: #f0d9a8; border: 1px solid rgba(240, 217, 168, 0.55); }
.mut-ke { color: #a9c4d6; border: 1px solid rgba(169, 196, 214, 0.5); }
.mut-ji { color: #d6a9a1; border: 1px solid rgba(214, 169, 161, 0.5); }

.zw-center {
  align-items: center;
  justify-content: center;
  grid-column: span 2;
  grid-row: span 2;
  gap: 0.55rem;
  background: rgba(201, 173, 118, 0.05);
  border-color: rgba(201, 173, 118, 0.3);
}
.zw-center-item {
  text-align: center;
}
.zw-center-item b {
  display: block;
  font-weight: 400;
  color: rgba(201, 173, 118, 0.55);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  margin-bottom: 0.2rem;
}
.zw-center-item span {
  color: var(--gold, #c9ad76);
  font-family: var(--font-serif, serif);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
}

@media (max-width: 640px) {
  .zw-cell { min-height: 96px; }
  .zw-star { font-size: 0.84rem; }
  .zw-minor { font-size: 0.6rem; }
}

/* ============ 问真风格排盘表单 ============ */
.chart-card {
  max-width: 760px;
  margin: 0 auto;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  border: 1px solid rgba(201, 173, 118, 0.22);
  border-radius: 20px;
  padding: 1.6rem 1.6rem 1.8rem;
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}
.card-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.section-title {
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  color: rgba(201, 173, 118, 0.62);
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(201, 173, 118, 0.12);
}
.name-field input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(201, 173, 118, 0.2);
  border-radius: 12px;
  color: var(--gold-soft, #e2e8e5);
  padding: 0.78rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.name-field input:focus {
  border-color: rgba(201, 173, 118, 0.5);
  box-shadow: 0 0 16px rgba(201, 173, 118, 0.12);
}
.seg-3 .seg-btn {
  font-size: 0.88rem;
}

.time-cols {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.7rem;
}
.time-cols.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}
.time-cols label {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  min-width: 0;
}
.time-cols label > span {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: rgba(201, 173, 118, 0.55);
  text-align: center;
}
.time-cols select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, rgba(201, 173, 118, 0.55) 50%) calc(100% - 14px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, rgba(201, 173, 118, 0.55) 50%, transparent 50%) calc(100% - 8px) 50% / 6px 6px no-repeat,
    rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(201, 173, 118, 0.2);
  border-radius: 12px;
  color: var(--gold, #c9ad76);
  font-family: var(--font-serif, serif);
  font-size: 1.15rem;
  font-weight: 300;
  text-align: center;
  padding: 0.72rem 0.4rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.time-cols select:hover,
.time-cols select:focus {
  border-color: rgba(201, 173, 118, 0.45);
  box-shadow: 0 0 14px rgba(201, 173, 118, 0.1);
}
.time-cols select option {
  background: #141b26;
  color: #e2e8e5;
  font-family: var(--font-sans, sans-serif);
  font-size: 0.9rem;
}
.mode-hint {
  font-size: 0.72rem;
  color: rgba(201, 173, 118, 0.42);
  letter-spacing: 0.06em;
  margin: 0;
}
.leap-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: rgba(226, 232, 229, 0.7);
  cursor: pointer;
}
.leap-toggle input {
  accent-color: var(--gold, #c9ad76);
}

.lon-row {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(201, 173, 118, 0.18);
  border-radius: 999px;
  color: rgba(226, 232, 229, 0.68);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  transition: all 0.25s;
}
.chip:hover {
  border-color: rgba(201, 173, 118, 0.45);
  color: var(--gold, #c9ad76);
}
.chip.active {
  background: rgba(201, 173, 118, 0.14);
  border-color: rgba(201, 173, 118, 0.5);
  color: var(--gold, #c9ad76);
}
.lon-input-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.lon-input-wrap input[type='number'] {
  width: 180px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(201, 173, 118, 0.2);
  border-radius: 10px;
  color: var(--gold-soft, #e2e8e5);
  padding: 0.58rem 0.8rem;
  font: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.lon-input-wrap input[type='number']:focus {
  border-color: rgba(201, 173, 118, 0.5);
  box-shadow: 0 0 14px rgba(201, 173, 118, 0.12);
}
.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  user-select: none;
}
.switch input {
  display: none;
}
.switch-track {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(201, 173, 118, 0.25);
  position: relative;
  transition: background 0.25s;
}
.switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(201, 173, 118, 0.65);
  transition: transform 0.25s, background 0.25s;
}
.switch input:checked + .switch-track {
  background: rgba(201, 173, 118, 0.22);
}
.switch input:checked + .switch-track::after {
  transform: translateX(18px);
  background: var(--gold, #c9ad76);
  box-shadow: 0 0 10px rgba(201, 173, 118, 0.45);
}
.switch-label {
  font-size: 0.8rem;
  color: rgba(226, 232, 229, 0.72);
  letter-spacing: 0.1em;
}

.ts-row {
  background: rgba(201, 173, 118, 0.07);
  border: 1px solid rgba(230, 194, 128, 0.24);
  border-radius: 10px;
  padding: 11px 14px;
  margin: 12px 0 4px;
}
.ts-row .switch-label {
  color: rgba(240, 208, 144, 0.9);
  font-weight: 600;
}

.btn-gold {
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.95rem 1rem;
  font-size: 1.02rem;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  background: linear-gradient(135deg, rgba(201, 173, 118, 0.22), rgba(201, 173, 118, 0.1));
  border: 1px solid rgba(201, 173, 118, 0.45);
  color: var(--gold, #c9ad76);
  box-shadow: 0 0 26px rgba(201, 173, 118, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.btn-gold:hover {
  box-shadow: 0 0 34px rgba(201, 173, 118, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-color: rgba(201, 173, 118, 0.7);
}

/* ---------- 右上角账户下拉菜单 ---------- */
.account-wrap { position: relative; }
.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 250px;
  z-index: 60;
  padding: 10px;
  background: rgba(13, 18, 26, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(230, 194, 128, 0.18);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45), 0 0 24px rgba(201, 173, 118, 0.08);
  animation: fadein .22s ease;
}
.account-head {
  display: flex; gap: 12px; align-items: center;
  padding: 8px 10px 12px;
  border-bottom: 1px solid rgba(201, 173, 118, 0.14);
  margin-bottom: 6px;
}
.account-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #17120a;
  background: linear-gradient(135deg, #e6c280, #c5a059);
  box-shadow: 0 0 14px rgba(201, 173, 118, 0.25);
  font-family: 'Noto Serif SC', 'Songti SC', serif;
}
.account-id { min-width: 0; }
.account-id b {
  display: block; font-size: .86rem; font-weight: 400;
  color: #f0e6d8; letter-spacing: .08em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.account-id span {
  display: block; margin-top: 2px; font-size: .7rem;
  color: rgba(147, 160, 168, 0.8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.account-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px; border-radius: 9px;
  color: rgba(232, 220, 196, 0.82); font-size: .82rem; letter-spacing: .1em;
  text-decoration: none; background: transparent; border: 0; cursor: pointer;
  font-family: inherit; text-align: left;
  transition: background .2s ease, color .2s ease;
}
.account-item:hover { background: rgba(201, 173, 118, 0.08); color: #f0d090; }
.account-item svg { width: 15px; height: 15px; flex: none; }
.account-logout {
  margin-top: 6px; border-top: 1px solid rgba(201, 173, 118, 0.12);
  border-radius: 0 0 9px 9px; padding-top: 11px;
  color: rgba(214, 120, 120, 0.85);
}
.account-logout:hover { background: rgba(214, 120, 120, 0.08); color: #e08a8a; }

/* ---------- 五行配色（低饱和高奢色系） ---------- */
.wx-jin { color: #e2c98f; }
.wx-mu  { color: #93c29b; }
.wx-shui{ color: #83aecd; }
.wx-huo { color: #d2907f; }
.wx-tu  { color: #c8a878; }

/* ---------- 排盘设置抽屉 ---------- */
.settings-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(5, 9, 15, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.settings-overlay.show { opacity: 1; pointer-events: auto; }
.settings-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 81;
  width: min(360px, 92vw);
  background: rgba(13, 18, 26, 0.96);
  backdrop-filter: blur(18px);
  border-left: 1px solid rgba(230, 194, 128, 0.18);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.45);
  transform: translateX(105%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.settings-drawer.show { transform: translateX(0); }
.settings-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px 14px; border-bottom: 1px solid rgba(201, 173, 118, 0.14);
}
.settings-head b { font-size: .95rem; font-weight: 400; letter-spacing: .28em; text-indent: .28em; color: #f0e6d8; font-family: var(--font-serif); }
.settings-close {
  background: none; border: 0; color: rgba(147,160,168,.8); font-size: 20px;
  cursor: pointer; line-height: 1; padding: 4px; font-family: inherit;
}
.settings-close:hover { color: #f0d090; }
.settings-body { flex: 1; overflow-y: auto; padding: 10px 22px 24px; }
.settings-group { margin-top: 20px; }
.settings-group > .sg-label {
  font-size: .72rem; letter-spacing: .22em; color: rgba(230,194,128,.7);
  margin-bottom: 6px; display: flex; align-items: center; gap: 8px;
}
.settings-group > .sg-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(201,173,118,.25), transparent); }
.settings-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 2px; border-bottom: 1px solid rgba(201,173,118,.08);
}
.settings-row .sl b { display: block; font-size: .86rem; font-weight: 400; color: #e8dcc4; letter-spacing: .08em; }
.settings-row .sl span { display: block; margin-top: 3px; font-size: .72rem; color: rgba(147,160,168,.72); line-height: 1.5; }
.settings-row .sr { flex: none; }
.settings-row select {
  padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.05);
  border: 1px solid rgba(230,194,128,.25); color: #e8dcc4; font-size: .78rem; font-family: inherit; outline: none;
}
.settings-row select option { background: #0d1420; }
.drawer-action { margin-top: 22px; width: 100%; }

/* ---------- 神煞与流年 ---------- */
.shensha-block { margin-top: 22px; }
.shensha-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.shensha-col { padding: 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(230,194,128,.1); }
.shensha-col b { display: block; font-size: .74rem; font-weight: 400; letter-spacing: .2em; color: rgba(230,194,128,.8); margin-bottom: 8px; }
.ss-chip { display: inline-block; margin: 0 4px 6px 0; padding: 2px 8px; font-size: .7rem; letter-spacing: .06em; color: rgba(232,220,196,.85); background: rgba(201,173,118,.08); border: 1px solid rgba(201,173,118,.18); border-radius: 999px; }
.liunian-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.liunian-chip { padding: 8px 14px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid rgba(230,194,128,.12); font-size: .78rem; letter-spacing: .12em; color: #e8dcc4; }
.liunian-chip span { color: rgba(147,160,168,.7); margin-right: 6px; }

/* 飞星自化徽标（区别于原局四化） */
.mut.fly {
  border: 1px solid rgba(230, 194, 128, 0.4);
  background: rgba(201, 173, 118, 0.08);
  box-shadow: none;
}

/* ---------- 通用占卜（奇门/大六壬/小六壬） ---------- */
.dg-card {
  margin-bottom: 16px; padding: 18px 20px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(230, 194, 128, 0.14);
}
.dg-card h3 { margin: 0 0 10px; font-size: 1rem; font-weight: 400; letter-spacing: .2em; color: #f0d090; font-family: var(--font-serif); }
.dg-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dg-tag {
  font-size: .72rem; letter-spacing: .08em; color: rgba(230, 194, 128, .9);
  padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(230, 194, 128, .28);
  background: rgba(201, 173, 118, .07);
}
.dg-lines p { margin: 6px 0; font-size: .84rem; line-height: 1.8; color: rgba(232, 220, 196, .88); }
.dg-detail { margin-top: 10px; }
.dg-detail summary { cursor: pointer; font-size: .76rem; letter-spacing: .14em; color: rgba(147,160,168,.85); }
.dg-detail pre {
  margin-top: 8px; padding: 12px; max-height: 280px; overflow: auto; white-space: pre-wrap;
  font-size: .72rem; line-height: 1.6; color: rgba(200,205,205,.85);
  background: rgba(0,0,0,.25); border: 1px solid rgba(230,194,128,.12); border-radius: 10px;
}

/* ---------- 可视化盘面（奇门/六壬/小六壬/金口诀/雷诺曼/灵签/太乙/择日） ---------- */
.dg-visual { margin-bottom: 14px; }
.dg-vhead {
  font-family: var(--font-serif); font-size: .9rem; letter-spacing: .24em; color: #f0d090;
  text-align: center; margin-bottom: 12px;
}
.dg-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.dg-chip {
  font-size: .72rem; letter-spacing: .1em; color: rgba(230,194,128,.92);
  padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(230,194,128,.26);
  background: rgba(201,173,118,.06);
}
.dg-sec-title {
  font-family: var(--font-serif); font-size: .78rem; letter-spacing: .2em;
  color: rgba(230,194,128,.8); margin: 0 0 10px;
}
.dg-dim { color: rgba(147,160,168,.75); font-size: .72rem; line-height: 1.6; }
.dg-void { font-style: normal; color: rgba(214,120,120,.95); font-size: .68rem; margin-left: 4px; }

/* 小六壬 六宫掌诀 */
.dg-xl-path {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px;
  font-family: var(--font-serif); font-size: .82rem; color: rgba(230,194,128,.92); margin-bottom: 14px;
}
.dg-xl-path .dg-arrow { color: rgba(230,194,128,.5); font-style: normal; }
.dg-xl-result { color: #f0d090; }
.dg-xl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dg-xl-palace {
  padding: 12px 14px; border-radius: 12px; text-align: center;
  background: rgba(255,255,255,.03); border: 1px solid rgba(230,194,128,.14);
  transition: border-color .3s, background .3s;
}
.dg-xl-palace.hit {
  border-color: rgba(230,194,128,.55); background: rgba(201,173,118,.08);
  box-shadow: 0 0 18px rgba(201,173,118,.14);
}
.dg-xl-name { font-family: var(--font-serif); font-size: .9rem; letter-spacing: .18em; color: #f0d090; margin-bottom: 8px; }
.dg-xl-palace p { margin: 0; font-size: .7rem; line-height: 1.7; color: rgba(232,220,196,.72); }
.dg-mark {
  font-style: normal; font-size: .6rem; color: #17120a; border-radius: 4px;
  padding: 1px 4px; margin-left: 4px; vertical-align: 2px;
}
.dg-mark.m { background: rgba(230,194,128,.95); }
.dg-mark.d { background: rgba(214,120,120,.9); }
.dg-mark.h { background: rgba(120,170,210,.9); }

/* 奇门 九宫格 */
.dg-qm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dg-qm-cell {
  padding: 10px; border-radius: 10px; text-align: center;
  background: rgba(255,255,255,.025); border: 1px solid rgba(230,194,128,.14);
}
.dg-qm-head b { display: block; font-size: .78rem; font-weight: 400; letter-spacing: .1em; color: #f0d090; font-family: var(--font-serif); }
.dg-qm-head span { display: block; font-size: .62rem; color: rgba(147,160,168,.7); margin: 2px 0 4px; }
.dg-qm-hit { font-style: normal; font-size: .6rem; color: rgba(214,120,120,.95); }
.dg-qm-tian { font-size: .82rem; color: rgba(230,194,128,.95); margin-bottom: 5px; letter-spacing: .08em; }
.dg-qm-row { font-size: .68rem; color: rgba(232,220,196,.8); }
.dg-qm-row span { display: inline-block; width: 22px; color: rgba(147,160,168,.7); }

/* 大六壬 四课三传 */
.dg-lr-section { margin-bottom: 16px; }
.dg-lr-lessons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dg-lr-lesson {
  padding: 10px; border-radius: 10px; text-align: center;
  background: rgba(255,255,255,.025); border: 1px solid rgba(230,194,128,.14);
}
.dg-lr-name { font-family: var(--font-serif); font-size: .74rem; letter-spacing: .14em; color: rgba(230,194,128,.85); margin-bottom: 6px; }
.dg-lr-upper { font-size: .84rem; color: #f0d090; }
.dg-lr-upper i { font-style: normal; font-size: .66rem; color: rgba(147,160,168,.8); margin-left: 4px; }
.dg-lr-lower { font-size: .78rem; color: rgba(232,220,196,.85); margin-top: 3px; }
.dg-lr-rel { font-size: .66rem; color: rgba(147,160,168,.75); margin-top: 4px; }
.dg-lr-trans-row { display: flex; align-items: stretch; gap: 8px; }
.dg-lr-trans {
  flex: 1; padding: 10px; border-radius: 10px; text-align: center;
  background: rgba(255,255,255,.03); border: 1px solid rgba(230,194,128,.2);
}
.dg-lr-trans b { display: block; font-weight: 400; font-size: .7rem; letter-spacing: .14em; color: rgba(230,194,128,.8); margin-bottom: 6px; }
.dg-lr-tr-branch { font-size: 1.05rem; color: #f0d090; font-family: var(--font-serif); margin-bottom: 4px; }
.dg-lr-plates { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.dg-lr-plate {
  padding: 6px 4px; border-radius: 8px; text-align: center;
  background: rgba(255,255,255,.025); border: 1px solid rgba(230,194,128,.12);
}
.dg-lr-plate b { display: block; font-size: .78rem; font-weight: 400; color: #f0d090; font-family: var(--font-serif); }
.dg-lr-plate span { display: block; font-size: .62rem; color: rgba(230,194,128,.75); }
.dg-lr-plate i { display: block; font-style: normal; font-size: .6rem; color: rgba(147,160,168,.7); }

/* 金口诀 四位一体 */
.dg-jk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dg-jk-cell {
  padding: 10px; border-radius: 10px; text-align: center;
  background: rgba(255,255,255,.025); border: 1px solid rgba(230,194,128,.14);
}
.dg-jk-name { font-family: var(--font-serif); font-size: .82rem; letter-spacing: .14em; color: #f0d090; margin-bottom: 6px; }
.dg-jk-line { font-size: .76rem; color: rgba(232,220,196,.88); line-height: 1.7; }
.dg-jk-main {
  margin-top: 12px; padding: 10px 14px; border-radius: 10px; font-size: .78rem; line-height: 1.8;
  color: rgba(232,220,196,.85); background: rgba(201,173,118,.06); border: 1px solid rgba(230,194,128,.18);
}

/* 雷诺曼 牌阵 */
.dg-ln-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.dg-ln-card {
  width: 110px; padding: 10px; border-radius: 12px; text-align: center;
  background: rgba(255,255,255,.03); border: 1px solid rgba(230,194,128,.18);
}
.dg-ln-num { font-size: .66rem; color: rgba(147,160,168,.75); letter-spacing: .1em; }
.dg-ln-name { font-family: var(--font-serif); font-size: .9rem; letter-spacing: .12em; color: #f0d090; margin: 4px 0 6px; }
.dg-ln-pos { font-size: .64rem; color: rgba(230,194,128,.8); margin-top: 6px; }

/* 三山国王灵签 */
.dg-ss-card { padding: 20px 22px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid rgba(230,194,128,.18); }
.dg-ss-title { font-family: var(--font-serif); font-size: 1rem; letter-spacing: .16em; color: #f0d090; text-align: center; }
.dg-ss-jixiong { text-align: center; margin-top: 6px; font-size: .76rem; color: rgba(230,194,128,.85); }
.dg-ss-poem {
  margin: 14px 0; padding: 12px; text-align: center; border-radius: 10px;
  font-family: var(--font-serif); font-size: .9rem; line-height: 2; color: rgba(240,208,144,.95);
  background: rgba(201,173,118,.07); border: 1px solid rgba(230,194,128,.2);
}
.dg-ss-detail { font-size: .78rem; line-height: 1.9; color: rgba(232,220,196,.85); }
.dg-ss-rows { margin-top: 12px; }
.dg-ss-row { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed rgba(230,194,128,.12); font-size: .76rem; line-height: 1.7; }
.dg-ss-row b { flex: none; width: 64px; font-weight: 400; color: rgba(230,194,128,.85); }
.dg-ss-row span { color: rgba(232,220,196,.82); }

/* 太乙神数 */
.dg-ty-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dg-ty-item { padding: 10px; border-radius: 10px; text-align: center; background: rgba(255,255,255,.025); border: 1px solid rgba(230,194,128,.14); }
.dg-ty-item b { display: block; font-weight: 400; font-size: .68rem; letter-spacing: .12em; color: rgba(147,160,168,.8); margin-bottom: 5px; }
.dg-ty-item span { font-size: .82rem; color: #f0d090; font-family: var(--font-serif); }
.dg-ty-judge { margin-top: 14px; }
.dg-ty-judge .dg-tag { margin: 0 6px 6px 0; }

/* 黄历择日 */
.dg-am-list { display: flex; flex-direction: column; gap: 10px; }
.dg-am-day { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.025); border: 1px solid rgba(230,194,128,.14); }
.dg-am-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.dg-am-head b { font-family: var(--font-serif); font-size: .92rem; font-weight: 400; color: #f0d090; letter-spacing: .08em; }
.dg-am-head span { font-size: .7rem; color: rgba(147,160,168,.8); }
.dg-am-sub { font-size: .68rem; color: rgba(230,194,128,.72); margin-top: 3px; }
.dg-am-hi { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dg-am-lists { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.dg-am-rec, .dg-am-av { display: flex; align-items: flex-start; gap: 6px; flex-wrap: wrap; font-size: .7rem; }
.dg-am-rec b, .dg-am-av b { font-weight: 400; color: rgba(147,160,168,.8); }
.dg-tag.ok { color: rgba(150, 205, 165, .95); border-color: rgba(150, 205, 165, .35); background: rgba(80, 140, 100, .1); }
.dg-tag.no { color: rgba(214, 120, 120, .92); border-color: rgba(214, 120, 120, .35); background: rgba(150, 70, 70, .1); }
.dg-tag.warn { color: rgba(235, 190, 120, .95); border-color: rgba(235, 190, 120, .35); background: rgba(180, 130, 60, .12); }

@media (max-width: 620px) {
  .dg-xl-grid, .dg-qm-grid { grid-template-columns: repeat(2, 1fr); }
  .dg-lr-lessons { grid-template-columns: repeat(2, 1fr); }
  .dg-lr-plates { grid-template-columns: repeat(4, 1fr); }
  .dg-jk-grid { grid-template-columns: repeat(2, 1fr); }
  .dg-ty-grid { grid-template-columns: repeat(2, 1fr); }
  .dg-lr-trans-row { flex-direction: column; }
}

.quick-card {
  max-width: 760px;
  margin: 1rem auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.2rem;
  border: 1px dashed rgba(201, 173, 118, 0.28);
  border-radius: 14px;
  background: rgba(201, 173, 118, 0.045);
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.quick-card:hover {
  border-color: rgba(201, 173, 118, 0.55);
  background: rgba(201, 173, 118, 0.08);
  box-shadow: 0 0 20px rgba(201, 173, 118, 0.1);
}
.quick-label {
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  color: rgba(201, 173, 118, 0.55);
}
.quick-gz {
  font-family: var(--font-serif, serif);
  font-size: 1.15rem;
  letter-spacing: 0.22em;
  color: var(--gold, #c9ad76);
  text-shadow: 0 0 14px rgba(201, 173, 118, 0.3);
}
.quick-hint {
  font-size: 0.7rem;
  color: rgba(226, 232, 229, 0.42);
  letter-spacing: 0.06em;
}

@media (max-width: 720px) {
  .time-cols {
    grid-template-columns: repeat(2, 1fr);
  }
  .time-cols.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .chart-card {
    padding: 1.2rem 1rem 1.4rem;
  }
}

/* ============ 梅花易数 ============ */
.gua-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  max-width: 760px;
  margin: 0 auto 1.2rem;
}
.gua-card {
  flex: 1;
  max-width: 300px;
  background: rgba(15, 20, 30, 0.6);
  border: 1px solid rgba(230, 194, 128, 0.18);
  border-radius: 14px;
  padding: 1.1rem 1rem 1.2rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: center;
}
.gua-name {
  font-family: var(--font-serif, serif);
  font-size: 1.25rem;
  letter-spacing: 0.14em;
  color: #f2e3c2;
  margin-bottom: 0.9rem;
}
.hex-view {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.9rem;
}
.hex-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 118px;
}
.hex-bar {
  display: block;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, #e6c280, #c5a059);
  box-shadow: 0 0 8px rgba(230, 194, 128, 0.35);
}
.hex-line.yang .hex-bar {
  width: 100%;
}
.hex-line.yin .hex-bar {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(230, 194, 128, 0.85);
  box-shadow: none;
  height: 3px;
  margin: 1px 0;
}
.hex-line.moving .hex-bar {
  background: linear-gradient(90deg, #f7e3b0, #e6c280);
  box-shadow: 0 0 16px rgba(247, 227, 176, 0.65);
}
.hex-tag {
  font-style: normal;
  font-size: 0.6rem;
  color: #f7e3b0;
  border: 1px solid rgba(247, 227, 176, 0.6);
  border-radius: 4px;
  padding: 0 3px;
}
.gua-judgment {
  font-size: 0.78rem;
  line-height: 1.7;
  color: rgba(240, 230, 216, 0.62);
  letter-spacing: 0.04em;
}
.gua-arrow {
  font-size: 1.4rem;
  color: rgba(230, 194, 128, 0.5);
  flex: none;
}
.moving-note {
  max-width: 640px;
  margin: 0 auto 1.2rem;
  text-align: center;
  font-size: 0.86rem;
  line-height: 1.8;
  color: rgba(247, 227, 176, 0.85);
  letter-spacing: 0.05em;
}

@media (max-width: 620px) {
  .gua-pair {
    flex-direction: column;
    gap: 0.8rem;
  }
  .gua-arrow {
    transform: rotate(90deg);
  }
}
