/**
 * 八字测算网站 - 现代简约风格
 * 干净留白、无衬线、卡片式、响应式
 */

:root {
  --bg: #f8f9fa;
  --bg2: #fff;
  --surface: #fff;
  --ink: #1a1a2e;
  --muted: #6c757d;
  --rule: #e9ecef;
  --accent: #4a6fa5;
  --accent2: #e07a5f;
  --accent-light: rgba(74, 111, 165, 0.08);
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
  --radius: 14px;
  --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- Header ---- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-title .icon {
  font-size: 1.4rem;
}

.site-nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nav-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.nav-btn:hover { background: var(--accent-light); color: var(--accent); }

/* ---- Container ---- */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ---- Hero ---- */
.hero-section {
  text-align: center;
  padding: 3rem 1rem 2rem;
}

.hero-section h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.hero-section .subtitle {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---- Form ---- */
.form-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.form-group input,
.form-group select {
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  background: var(--bg);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group.half {
  grid-column: span 2;
}

.gender-group {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.gender-group label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.city-input-wrap {
  position: relative;
}

.manual-lng-box {
  margin-top: 0.5rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.manual-lng-box.hidden { display: none; }

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #3d5d8a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74, 111, 165, 0.25);
}

.btn-secondary {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--rule);
}

.btn-secondary:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

/* ---- Result Section ---- */
.result-section {
  margin-top: 2rem;
}

.result-section.hidden { display: none; }

.result-info {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.result-info span {
  background: var(--surface);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 1px solid var(--rule);
}

.result-info .true-solar {
  color: var(--accent2);
  border-color: rgba(224, 122, 95, 0.3);
}

/* ---- Bazi Card ---- */
.bazi-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.pillar {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: all 0.2s;
}

.pillar:hover { border-color: var(--accent-light); transform: translateY(-2px); }

.pillar .gan {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.pillar .zhi {
  font-size: 1.5rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.pillar.highlight {
  border-color: var(--accent);
  background: var(--accent-light);
}

.pillar.highlight .gan { color: var(--accent); }

/* ---- Tabs ---- */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.5rem;
}

.tab-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  font-family: inherit;
  position: relative;
}

.tab-btn:hover { color: var(--accent); background: var(--accent-light); }

.tab-btn.active {
  color: var(--accent);
  background: var(--accent-light);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -0.55rem;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---- Interpretation Sections ---- */
.interp-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.interp-section .section-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
}

.interp-section .sec-icon { font-size: 1.2rem; }

/* ---- Bazi Table ---- */
.bazi-table-wrap { overflow-x: auto; }

.bazi-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.bazi-table th,
.bazi-table td {
  padding: 0.75rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid var(--rule);
}

.bazi-table th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.8rem;
}

.bazi-table .label {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: left;
}

.bazi-table .gan { font-size: 1.3rem; font-weight: 700; color: var(--accent); }
.bazi-table .zhi { font-size: 1.1rem; color: var(--ink); }
.bazi-table .ss { font-size: 0.7rem; color: var(--muted); margin-left: 0.15rem; }
.bazi-table .cang { font-size: 0.8rem; color: var(--muted); }
.bazi-table .nayin { font-size: 0.8rem; color: var(--accent2); }

.day-master-info {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ---- Wangshuai ---- */
.wangshuai-box { text-align: center; }

.ws-level {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.ws-身强 { background: rgba(74, 153, 105, 0.1); color: #4a9969; }
.ws-身弱 { background: rgba(224, 122, 95, 0.1); color: #e07a5f; }
.ws-中和偏强 { background: rgba(74, 111, 165, 0.1); color: var(--accent); }
.ws-中和偏弱 { background: rgba(168, 131, 51, 0.1); color: #a88333; }

.ws-desc { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }

.ws-factors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.factor {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.factor span { display: block; font-weight: 600; font-size: 0.85rem; }
.factor small { font-size: 0.75rem; color: var(--muted); }
.factor.yes { background: rgba(74, 153, 105, 0.08); }
.factor.no { background: rgba(224, 122, 95, 0.05); }

/* ---- Wuxing Chart ---- */
.wx-chart {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1.5rem;
  height: 160px;
  padding: 1rem 0;
}

.wx-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  max-width: 60px;
}

.wx-bar {
  width: 36px;
  border-radius: 6px 6px 0 0;
  min-height: 4px;
  transition: height 0.5s ease;
}

.wx-icon { font-size: 1.2rem; }
.wx-name { font-size: 0.75rem; color: var(--muted); }
.wx-count { font-size: 0.85rem; font-weight: 700; }

.wx-missing {
  text-align: center;
  color: var(--accent2);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* ---- Shishen ---- */
.shishen-groups { display: grid; gap: 1rem; }

.ss-group {
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.ss-group h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.ss-desc { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.5rem; }

.ss-items { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.ss-tag {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 20px;
  font-size: 0.8rem;
}

.ss-empty { color: var(--muted); font-size: 0.8rem; }

/* ---- Shensha ---- */
.shensha-list { display: grid; gap: 0.5rem; }

.shensha-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.shensha-item .ss-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--accent);
}

.shensha-item .ss-desc { font-size: 0.8rem; color: var(--muted); }

/* ---- Zhangsheng ---- */
.zhangsheng-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.zs-item {
  text-align: center;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.zs-pos { font-size: 0.75rem; color: var(--muted); }
.zs-zhi { font-size: 1.2rem; font-weight: 700; color: var(--ink); margin: 0.25rem 0; }
.zs-state { font-size: 0.85rem; color: var(--accent); }

.zs-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* ---- Geju ---- */
.geju-list { display: grid; gap: 0.75rem; }

.geju-item {
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent2);
}

.geju-item.primary { border-left-color: var(--accent); }

.gj-type { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.2rem; }
.gj-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.35rem; }
.gj-desc { font-size: 0.85rem; color: var(--muted); }

/* ---- Dizhi Relations ---- */
.dizhi-relations { display: grid; gap: 0.5rem; }

.dz-rel {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.rel-type {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.dz-rel.六合 .rel-type { background: rgba(74, 153, 105, 0.1); color: #4a9969; }
.dz-rel.六冲 .rel-type { background: rgba(224, 122, 95, 0.1); color: #e07a5f; }
.dz-rel.三合 .rel-type,
.dz-rel.半合 .rel-type { background: rgba(74, 111, 165, 0.1); color: var(--accent); }
.dz-rel.三会 .rel-type,
.dz-rel.半会 .rel-type { background: rgba(168, 131, 51, 0.1); color: #a88333; }
.dz-rel.三刑 .rel-type { background: rgba(192, 57, 43, 0.1); color: #c0392b; }
.dz-rel.六害 .rel-type { background: rgba(142, 68, 173, 0.1); color: #8e44ad; }

.rel-desc { font-size: 0.85rem; color: var(--ink); }

/* ---- Tougen ---- */
.tougen-section h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem;
}

.tougen-section h4:first-child { margin-top: 0; }

.tonggen-list,
.tougan-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.tg-tag {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  background: var(--bg);
  border-radius: 20px;
  font-size: 0.8rem;
}

.tg-tag.benqi {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 500;
}

/* ---- Dayun ---- */
.dayun-info { text-align: center; }

.dy-dir { font-size: 0.9rem; color: var(--muted); margin-bottom: 1rem; }

.dayun-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.yun-item {
  padding: 0.75rem 0.5rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  text-align: center;
}

.yun-age { font-size: 0.75rem; color: var(--muted); }
.yun-gz { font-size: 1rem; font-weight: 700; color: var(--ink); margin: 0.2rem 0; }
.yun-ss { font-size: 0.75rem; color: var(--accent); }

/* ---- Xiyong ---- */
.xiyong-box { text-align: center; }

.xy-summary {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.xy-tags {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.xy-tag {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.xy-tag span {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.7rem;
  line-height: 20px;
  text-align: center;
}

.xy-tag.xi { background: rgba(74, 153, 105, 0.1); color: #4a9969; }
.xy-tag.xi span { background: #4a9969; }
.xy-tag.yong { background: rgba(74, 111, 165, 0.1); color: var(--accent); }
.xy-tag.yong span { background: var(--accent); }
.xy-tag.ji { background: rgba(224, 122, 95, 0.1); color: #e07a5f; }
.xy-tag.ji span { background: #e07a5f; }

.xy-tip {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---- Liunian ---- */
.liunian-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.ln-item {
  padding: 0.75rem 0.5rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  text-align: center;
}

.ln-year { font-size: 0.8rem; color: var(--muted); }
.ln-gz { font-size: 1rem; font-weight: 700; margin: 0.2rem 0; }
.ln-ss { font-size: 0.75rem; color: var(--accent); }

.ln-item.current { background: var(--accent-light); }
.ln-item.current .ln-year { color: var(--accent); font-weight: 600; }

.ln-tip {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* ---- Fortune Tab ---- */
.fortune-content { display: grid; gap: 1.5rem; }

.fortune-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.dayun-grid,
.liunian-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.dayun-card,
.liunian-card {
  padding: 0.75rem 0.5rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  text-align: center;
}

.dayun-card .dy-age,
.liunian-card .ln-year { font-size: 0.75rem; color: var(--muted); }
.dayun-card .dy-gz,
.liunian-card .ln-gz { font-size: 1rem; font-weight: 700; margin: 0.2rem 0; }
.dayun-card .dy-ss,
.liunian-card .ln-ss { font-size: 0.75rem; color: var(--accent); }

.liunian-card.current { background: var(--accent-light); }

/* ---- AI Tab ---- */
.ai-tab-content { display: grid; gap: 1.5rem; }

.ai-intro p { color: var(--muted); font-size: 0.9rem; }

.ai-nokey {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(224, 122, 95, 0.05);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(224, 122, 95, 0.2);
}

.ai-nokey p { color: var(--accent2); margin-bottom: 0.5rem; }

.ai-q-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.ai-q-btn {
  padding: 0.75rem;
  border: 1px solid var(--rule);
  background: var(--surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.ai-q-btn:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

.ai-output { min-height: 100px; }

.ai-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  color: var(--muted);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--rule);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.ai-answer {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.ai-answer-header {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.ai-answer-body {
  font-size: 0.9rem;
  line-height: 1.8;
}

.ai-answer-body p { margin-bottom: 0.75rem; }

.ai-error {
  padding: 1.5rem;
  background: rgba(224, 122, 95, 0.05);
  border-radius: var(--radius);
  color: var(--accent2);
  text-align: center;
}

/* ---- Settings Panel ---- */
.settings-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 360px;
  max-width: 90vw;
  height: 100vh;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.settings-panel.open { right: 0; }

.settings-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.settings-header h3 { font-size: 1.1rem; }

.settings-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
}

.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.settings-body .form-group { margin-bottom: 0; }

.settings-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--rule);
}

.settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.settings-overlay.open { opacity: 1; pointer-events: auto; }

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  z-index: 200;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
}

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

/* ---- Footer ---- */
.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
}

.site-footer .note {
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---- Interpretation Notes ---- */
.interp-note {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--ink);
  border-left: 3px solid var(--accent);
}

.interp-note strong { color: var(--accent2); }

.interp-note p { margin-bottom: 0.5rem; }
.interp-note p:last-child { margin-bottom: 0; }

.ss-detail {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
  line-height: 1.6;
}

/* ---- Zhangsheng good/bad ---- */
.zs-item.zs-good { background: rgba(74, 153, 105, 0.1); border: 1px solid rgba(74, 153, 105, 0.2); }
.zs-item.zs-bad { background: rgba(224, 122, 95, 0.08); border: 1px solid rgba(224, 122, 95, 0.15); }

/* ---- Dayun Xiyong highlight ---- */
.yun-item.yun-xi { background: rgba(74, 153, 105, 0.08); border: 1px solid rgba(74, 153, 105, 0.2); }

/* ---- Liunian Xiyong highlight ---- */
.ln-item.ln-xi { background: rgba(74, 153, 105, 0.08); border: 1px solid rgba(74, 153, 105, 0.15); }

/* ---- Empty text ---- */
.empty-text { color: var(--muted); font-size: 0.9rem; text-align: center; padding: 1rem; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .form-group.half { grid-column: span 2; }
  
  .bazi-card { grid-template-columns: repeat(2, 1fr); }
  
  .ws-factors { grid-template-columns: 1fr; }
  
  .dayun-list,
  .liunian-list,
  .dayun-grid,
  .liunian-grid { grid-template-columns: repeat(3, 1fr); }
  
  .zhangsheng-table { grid-template-columns: repeat(2, 1fr); }
  
  .ai-q-buttons { grid-template-columns: repeat(2, 1fr); }
  
  .tabs { overflow-x: auto; }
  
  .container { padding: 1rem; }
  
  .form-card { padding: 1.5rem; }
}

@media (max-width: 400px) {
  .dayun-list,
  .liunian-list,
  .dayun-grid,
  .liunian-grid { grid-template-columns: repeat(2, 1fr); }
}
