/* ============================================================
   象术仁元 — 全局样式（新中式暗黑主题）
   Design System v1.0 — 小戴 frontend-architect
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --color-brand-primary: #D4A574;
  --color-brand-gold: #E8C9A0;
  --color-brand-copper: #8B6914;
  --color-brand-secondary: #2F4F4F;
  --color-accent-red: #C0392B;
  --color-accent-green: #27AE60;

  --bg-body: #0C0A09;
  --bg-card: #1C1917;
  --bg-card-hover: #292524;
  --bg-input: #292524;
  --bg-overlay: rgba(12, 10, 9, 0.85);

  --text-primary: #F5F0EB;
  --text-secondary: #A8A29E;
  --text-muted: #78716C;
  --text-gold: #D4A574;

  --border-subtle: rgba(212, 165, 116, 0.15);
  --border-gold: rgba(212, 165, 116, 0.35);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-gold: 0 0 20px rgba(212, 165, 116, 0.12);
  --shadow-gold-strong: 0 0 30px rgba(212, 165, 116, 0.2);

  --font-title: 'STKaiti', 'KaiTi', 'SimSun', 'Noto Serif SC', serif;
  --font-body: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --nav-height: 60px;
  --container-max: 1200px;
  --container-narrow: 800px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ---------- Layout Container ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}
.container--narrow {
  max-width: var(--container-narrow);
}

/* ---------- Top Navigation ---------- */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-height);
  background: rgba(12, 10, 9, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-title);
  font-size: 1.25rem;
  color: var(--text-gold);
}
.nav-brand-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--color-brand-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  animation: taijiSpin 20s linear infinite;
  background: conic-gradient(var(--bg-card) 0deg, var(--bg-card) 180deg, var(--color-brand-primary) 180deg, var(--color-brand-primary) 360deg);
  position: relative;
}
.nav-brand-icon::before {
  content: ''; position: absolute;
  width: 10px; height: 10px; border-radius: 50%;
  top: 6px; left: 50%; transform: translateX(-50%);
  background: var(--bg-card);
  box-shadow: inset 0 0 0 2.5px var(--bg-card);
}
.nav-brand-icon::after {
  content: ''; position: absolute;
  width: 10px; height: 10px; border-radius: 50%;
  bottom: 6px; left: 50%; transform: translateX(-50%);
  background: var(--color-brand-primary);
  box-shadow: inset 0 0 0 2.5px var(--color-brand-primary);
}
@keyframes taijiSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.nav-links {
  display: flex; gap: 8px; list-style: none;
}
.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  transition: all 0.25s ease;
  color: var(--text-secondary);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text-gold);
  background: rgba(212, 165, 116, 0.1);
}
.nav-toggle {
  display: none;
  background: none; border: none;
  color: var(--text-primary);
  font-size: 1.5rem; cursor: pointer;
  padding: 4px 8px;
}

/* ---------- Hero Section ---------- */
.hero {
  padding-top: calc(var(--nav-height) + 40px);
  padding-bottom: 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(212,165,116,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-title {
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  color: var(--text-gold);
  letter-spacing: 0.15em;
  margin-bottom: 16px;
  text-shadow: 0 0 40px rgba(212,165,116,0.2);
}
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.8;
}
.hero-badge {
  display: inline-block;
  padding: 6px 20px;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-gold);
  background: rgba(212,165,116,0.06);
  margin-bottom: 24px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-brand-primary), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.card:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}
.card:hover::before { opacity: 1; }

.card-title {
  font-family: var(--font-title);
  font-size: 1.2rem;
  color: var(--text-gold);
  margin-bottom: 8px;
}
.card-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ---------- Grid Layouts ---------- */
.grid {
  display: grid;
  gap: 20px;
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  text-align: center;
}
.btn--primary {
  background: linear-gradient(135deg, var(--color-brand-primary), var(--color-brand-copper));
  color: #0C0A09;
  box-shadow: 0 4px 16px rgba(212,165,116,0.3);
}
.btn--primary:hover {
  box-shadow: 0 6px 24px rgba(212,165,116,0.45);
  transform: translateY(-1px);
}
.btn--outline {
  background: transparent;
  border: 1px solid var(--border-gold);
  color: var(--text-gold);
}
.btn--outline:hover {
  background: rgba(212,165,116,0.08);
}
.btn--sm { padding: 8px 18px; font-size: 0.85rem; }
.btn--block { width: 100%; }

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: border-color 0.25s ease;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 3px rgba(212,165,116,0.1);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---------- Section ---------- */
.section {
  padding: 60px 0;
}
.section-title {
  font-family: var(--font-title);
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--text-gold);
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: 0.1em;
}
.section-desc {
  text-align: center;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
}

/* ---------- Master Card ---------- */
.master-card {
  text-align: center;
  padding: 32px 24px;
}
.master-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 2px solid var(--border-gold);
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  background: rgba(212,165,116,0.06);
}
.master-name {
  font-family: var(--font-title);
  font-size: 1.15rem;
  color: var(--text-gold);
  margin-bottom: 4px;
}
.master-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.master-tags {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  margin-bottom: 16px;
}
.tag {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  background: rgba(212,165,116,0.1);
  color: var(--text-gold);
  border: 1px solid rgba(212,165,116,0.15);
}
.master-rating {
  color: var(--color-brand-primary);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

/* ---------- Chat Interface ---------- */
.chat-container {
  padding-top: calc(var(--nav-height) + 16px);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
}
.chat-msg {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.6;
}
.chat-msg--user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--color-brand-primary), var(--color-brand-copper));
  color: #0C0A09;
}
.chat-msg--ai {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}
.chat-input-bar {
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-card);
  display: flex; gap: 10px;
}
.chat-input-bar input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  outline: none;
}
.chat-input-bar input:focus {
  border-color: var(--color-brand-primary);
}

/* ---------- Hexagram Display ---------- */
.hexagram-display {
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 20px;
}
.hex-line {
  width: 200px; height: 4px;
  margin: 8px 0;
  border-radius: 2px;
  transition: all 0.5s ease;
}
.hex-line--yang {
  background: var(--color-brand-primary);
  box-shadow: 0 0 8px rgba(212,165,116,0.3);
}
.hex-line--yin {
  background: transparent;
  display: flex; justify-content: space-between;
  gap: 10px;
}
.hex-line--yin::before, .hex-line--yin::after {
  content: '';
  flex: 1; height: 4px;
  background: var(--color-brand-primary);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(212,165,116,0.3);
}
/* 聊天气泡内卦象表：爻线宽度独立于排盘页 200px */
.gua-hex-table .hex-line {
  width: 48px;
  margin: 3px 0;
}
/* 聊天气泡内阴爻：48px 宽线下缺口需接近段长才一眼可辨 */
.gua-hex-table .hex-line--yin {
  gap: 16px;
}
.hex-name {
  font-family: var(--font-title);
  font-size: 1.8rem;
  color: var(--text-gold);
  margin: 24px 0 8px;
  letter-spacing: 0.15em;
}
.hex-meaning {
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-align: center;
  max-width: 400px;
}

/* ---------- Progress Bar ---------- */
.progress-bar {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 32px;
  padding: 0 20px;
}
.step-indicator {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all 0.3s ease;
}
.step-indicator.active {
  border-color: var(--color-brand-primary);
  color: var(--text-gold);
  background: rgba(212,165,116,0.1);
  box-shadow: 0 0 12px rgba(212,165,116,0.2);
}
.step-indicator.completed {
  border-color: var(--color-accent-green);
  color: #fff;
  background: var(--color-accent-green);
}
.step-line {
  width: 40px; height: 2px;
  background: var(--border-subtle);
  transition: background 0.3s ease;
}
.step-line.active { background: var(--color-brand-primary); }

/* ---------- Review Stars ---------- */
.star-rating {
  display: flex; gap: 8px; justify-content: center;
  margin: 16px 0;
}
.star-rating .star {
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.star-rating .star.filled, .star-rating .star:hover {
  color: var(--color-brand-primary);
}

/* ---------- Toast ---------- */
.toast-container {
  position: fixed; top: calc(var(--nav-height) + 16px); right: 20px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  box-shadow: var(--shadow-card);
}
.toast--success { background: var(--color-accent-green); color: #fff; }
.toast--error { background: var(--color-accent-red); color: #fff; }
.toast--info { background: var(--color-brand-secondary); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px); } }

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 20px;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-brand {
  font-family: var(--font-title);
  color: var(--text-gold);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

/* ---------- Animations ---------- */
.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   六爻排盘结果展示样式 — 传统左右分栏布局
   ============================================================ */

/* ---------- 铜钱动画样式 ---------- */
.coin-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
  perspective: 1000px;
}

.coin {
  width: 80px;
  height: 80px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

.coin.spinning {
  animation: coinSpin 1s linear infinite;
}

.coin.flipped {
  transform: rotateX(180deg);
}

@keyframes coinSpin {
  0% { transform: rotateX(0deg) rotateY(0deg); }
  25% { transform: rotateX(90deg) rotateY(90deg); }
  50% { transform: rotateX(180deg) rotateY(180deg); }
  75% { transform: rotateX(270deg) rotateY(270deg); }
  100% { transform: rotateX(360deg) rotateY(360deg); }
}

.coin-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
}

.coin-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coin-front {
  background: radial-gradient(ellipse at 30% 30%, #F4D03F, #D4A574 40%, #B8860B 70%, #8B6914);
  border: 3px solid #D4A574;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5), inset 0 2px 10px rgba(255,255,255,0.3);
}

.coin-back {
  background: radial-gradient(ellipse at 30% 30%, #888, #555 50%, #333);
  border: 3px solid #666;
  transform: rotateX(180deg);
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* 乾隆通宝铜钱文字 */
.coin-char {
  position: absolute;
  font-family: 'STKaiti', 'KaiTi', serif;
  font-size: 14px;
  font-weight: bold;
  color: #1a1a1a;
  text-shadow: 0 1px 1px rgba(255,255,255,0.2);
}

.coin-char.top { top: 8px; left: 50%; transform: translateX(-50%); }
.coin-char.bottom { bottom: 8px; left: 50%; transform: translateX(-50%); }
.coin-char.left { left: 8px; top: 50%; transform: translateY(-50%); }
.coin-char.right { right: 8px; top: 50%; transform: translateY(-50%); }

/* 方孔 */
.coin-hole {
  position: absolute;
  width: 18px;
  height: 18px;
  background: #0C0A09;
  border: 2px solid rgba(139, 105, 20, 0.5);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.coin-edge {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(184, 148, 31, 0.3);
  top: 0;
  left: 0;
}

/* 满文 */
.manchu-text {
  position: absolute;
  font-size: 12px;
  color: #aaa;
}

.manchu-text.left { left: 12px; top: 50%; transform: translateY(-50%); }
.manchu-text.right { right: 12px; top: 50%; transform: translateY(-50%); }

/* 结果容器 */
.paipan-result-wrap {
  background: linear-gradient(180deg, #1a1510 0%, #0d0a08 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-gold-strong);
  position: relative;
}

.paipan-result-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-brand-primary), transparent);
}

.paipan-title-bar {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.paipan-title-bar h2 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  color: var(--text-gold);
  letter-spacing: 0.2em;
  margin-bottom: 6px;
}

.paipan-title-bar .subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* 卦象分栏 */
.gua-split {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: center;
  position: relative;
}

/* 卦象标题装饰线 */
.gua-split::before {
  content: '☰';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-brand-primary);
  opacity: 0.3;
  font-size: 1.5rem;
  pointer-events: none;
}

.gua-panel {
  flex: 1;
  max-width: 320px;
  background: rgba(28, 25, 23, 0.8);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  padding: 16px;
  min-width: 0;
}

.gua-panel-header {
  font-family: var(--font-title);
  font-size: 1rem;
  color: var(--text-gold);
  text-align: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-gold);
  margin-bottom: 12px;
  letter-spacing: 0.15em;
  background: linear-gradient(180deg, rgba(212,165,116,0.08) 0%, transparent 100%);
  position: relative;
}

.gua-panel-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 25%;
  right: 25%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-brand-primary), transparent);
}

.gua-panel-name {
  font-family: var(--font-title);
  font-size: 1.2rem;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 16px;
  padding: 8px;
  background: rgba(212, 165, 116, 0.06);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

/* 爻位行 */
.yao_row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 6px;
  border-bottom: 1px solid rgba(212, 165, 116, 0.08);
  transition: all 0.25s ease;
  min-height: 44px;
  position: relative;
  margin-left: 20px;
}

/* 爻位编号 */
.yao_row::before {
  content: attr(data-pos) '爻';
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 0.5;
  font-family: var(--font-title);
  writing-mode: vertical-rl;
  letter-spacing: 2px;
}

.yao_row:last-child {
  border-bottom: none;
}

.yao_row:hover {
  background: rgba(212, 165, 116, 0.04);
}

.yao_row.moving {
  background: rgba(192, 57, 43, 0.12);
  border-left: 3px solid var(--color-accent-red);
  padding-left: 3px;
}

/* 六神 */
.yao-shen {
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 50px;
  text-align: left;
  padding-right: 8px;
  font-family: var(--font-title);
  letter-spacing: 0.05em;
}

/* 爻象符号 - 统一使用 hex-line 类（与铜钱栏一致） */
/* .hex-line 样式已在上方定义（铜钱栏使用） */
/* 排盘栏爻象宽度自适应 */
.gua-panel .hex-line { width: 100%; max-width: 260px; }

/* 动爻标记 - 红色高亮 */
.yao_row.moving .hex-line {
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.6), 0 0 3px rgba(231, 76, 60, 0.3);
  animation: yaoGlow 1.5s ease-in-out infinite;
}

@keyframes yaoGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(231, 76, 60, 0.6), 0 0 3px rgba(231, 76, 60, 0.3); }
  50% { box-shadow: 0 0 15px rgba(231, 76, 60, 0.9), 0 0 6px rgba(231, 76, 60, 0.5); }
}

/* 干支 */
.yao-ganzhi {
  font-size: 0.95rem;
  color: var(--color-accent-gold);
  min-width: 55px;
  text-align: center;
  font-family: 'STKaiti', 'KaiTi', serif;
  font-weight: 600;
  letter-spacing: 1px;
}

/* 六亲 */
.yao-qin {
  font-size: 0.85rem;
  color: var(--text-secondary);
  min-width: 60px;
  text-align: right;
  padding-left: 8px;
  font-family: var(--font-title);
  letter-spacing: 0.05em;
}

/* 世应标记 - 传统印章风格 */
.marker-shi,
.marker-ying {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin-left: 6px;
  font-weight: 700;
  font-family: var(--font-title);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  position: relative;
  top: -2px;
}

.marker-shi {
  background: linear-gradient(135deg, #D4A574 0%, #B8860B 100%);
  color: #1a1a1a;
  border: 2px solid #E8C9A0;
  box-shadow: 0 0 10px rgba(212, 165, 116, 0.5);
  animation: shiPulse 2s ease-in-out infinite;
}

.marker-ying {
  background: linear-gradient(135deg, #27AE60 0%, #1E8449 100%);
  color: #fff;
  border: 2px solid #2ECC71;
  box-shadow: 0 0 10px rgba(39, 174, 96, 0.5);
}

@keyframes shiPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(212, 165, 116, 0.5); }
  50% { box-shadow: 0 0 18px rgba(212, 165, 116, 0.8); }
}

/* 动爻徽章 - 传统朱砂风格 */
.moving-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #fff;
  font-weight: 700;
  margin-left: 8px;
  padding: 3px 10px;
  background: linear-gradient(135deg, #C0392B 0%, #922B21 100%);
  border: 1px solid #E74C3C;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(192, 57, 43, 0.5);
  animation: badgeBounce 1.2s ease-in-out infinite;
  font-family: var(--font-title);
}

@keyframes badgeBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* 伏神区域 */
.fu-shen-area {
  margin-top: 16px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.fu-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-family: var(--font-title);
  letter-spacing: 0.1em;
}

.fu-item {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 4px 10px;
  background: rgba(212, 165, 116, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  margin: 4px 6px 4px 0;
}

/* 响应式 */
@media (max-width: 768px) {
  .gua-split {
    flex-direction: column;
    align-items: center;
  }
  
  .gua-panel {
    max-width: 100%;
    width: 100%;
  }
  
  .paipan-result-wrap {
    padding: 16px;
  }
  
  .yao_row {
    margin-left: 16px;
  }
}

@media (max-width: 480px) {
  .yao-shen {
    min-width: 40px;
    font-size: 0.75rem;
  }
  
  .yao-ganzhi {
    min-width: 45px;
    font-size: 0.8rem;
  }

  .yao-qin {
    min-width: 40px;
    font-size: 0.8rem;
  }
}
.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }

/* ---------- Responsive: Tablet ---------- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed; top: var(--nav-height); left: 0; right: 0;
    background: rgba(12,10,9,0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid var(--border-subtle);
    transform: translateY(-120%);
    transition: transform 0.3s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: block; }
  .hero { padding-top: calc(var(--nav-height) + 24px); padding-bottom: 40px; }
  .section { padding: 40px 0; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .chat-msg { max-width: 90%; }
}

/* ---------- Responsive: Small Mobile ---------- */
@media (max-width: 480px) {
  html { font-size: 14px; }
  .card { padding: 20px 16px; }
  .btn { padding: 10px 20px; font-size: 0.9rem; }
  .hex-line { width: 160px; }
  .hex-line--yin { gap: 12px; }
}
