/* ═══════════════════════════════════════════════════════════════
   命理研习社 · 公共样式 core.css
   版式来源：模板/基础版八字命理报告.html / 感情报告模板.html /
             合婚报告.html / 桃花正缘.html / 职业分析报告.html
   铁律：颜色与组件样式一律沿用模板，勿另起炉灶。
   ═══════════════════════════════════════════════════════════════ */

/* ===== 色板（合并 5 套模板的一致变量） ===== */
:root {
  --bg: #FFF8F3;
  --card: #FFFFFF;
  --gold: #C4925B;
  --rose: #D4697B;
  --teal: #6B9AC4;
  --text: #3D2E2A;
  --text-light: #8B7355;
  --text-muted: #A8A0A0;
  --border: #F0E4D8;
  --accent-pink: #F8E8EC;
  --accent-cream: #FEF7EE;
  --accent-blue: #E8F0F8;
  --tag-bg: #F5EDE3;
  --highlight: #E85D75;
  --wood: #8FBC8F;
  --fire: #E85D75;
  --earth: #C4925B;
  --metal: #D4C5A9;
  --water: #6B9AC4;
  --good: #6B9AC4;
  --warn: #E8A87C;
  --bad: #D4697B;
  --green: #5A9A6A;
  --amber: #D4A05A;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Serif SC", serif;
  color: var(--text); line-height: 1.8; -webkit-font-smoothing: antialiased;
}
.container { max-width: 520px; margin: 0 auto; padding: 16px; }

/* ===== 工具页眉 ===== */
.app-header { text-align: center; padding: 22px 16px 6px; }
.app-brand { font-size: 22px; font-weight: 800; letter-spacing: 3px; color: var(--text); font-family: "STKaiti","KaiTi","Noto Serif SC",serif; }
.app-brand .dot { color: var(--rose); }
.app-tagline { font-size: 12px; color: var(--text-light); letter-spacing: 2px; margin-top: 4px; }
.app-tagline .pill { display: inline-block; background: var(--accent-pink); color: var(--rose); font-size: 11px; padding: 2px 10px; border-radius: 12px; margin-top: 6px; letter-spacing: 1px; }
.back-link { display: inline-block; font-size: 12px; color: var(--text-muted); text-decoration: none; margin-top: 6px; letter-spacing: 1px; }
.back-link:hover { color: var(--rose); }

/* ===== 输入表单 ===== */
.form-card { background: var(--card); border-radius: 16px; padding: 18px 20px; margin: 14px 0; box-shadow: 0 2px 12px rgba(139,115,85,0.08); }
.form-title { font-size: 15px; font-weight: 700; color: var(--rose); margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }
.f-row { margin-bottom: 12px; }
.f-label { font-size: 12px; color: var(--text-light); margin-bottom: 6px; letter-spacing: 1px; }
.seg { display: flex; background: var(--tag-bg); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 7px 0; border-radius: 8px; font-size: 13px; color: var(--text-light); cursor: pointer; font-family: inherit; }
.seg button.on { background: var(--card); color: var(--rose); font-weight: 700; box-shadow: 0 1px 4px rgba(139,115,85,0.15); }
.input-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.input-grid.two { grid-template-columns: repeat(2, 1fr); }
.input-grid.four { grid-template-columns: repeat(4, 1fr); }
.input-grid select, .input-grid input[type=date], .input-grid input[type=number], .input-grid input[type=text] {
  width: 100%; padding: 8px 4px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--card); color: var(--text); font-size: 13px; font-family: inherit; text-align: center; outline: none;
}
.input-grid input[type=date] { text-align: left; padding: 8px 8px; }
select:focus, input:focus { border-color: var(--gold); }
.leap-box { display: none; align-items: center; gap: 6px; font-size: 12px; color: var(--text-light); margin-top: 8px; }
.leap-box.show { display: flex; }
.leap-box input { accent-color: var(--rose); }
.place-box select { width: 100%; padding: 9px 6px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--text); font-size: 13px; font-family: inherit; outline: none; }
.custom-lon { display: none; margin-top: 8px; }
.custom-lon.show { display: block; }
.custom-lon input { width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 9px; font-size: 13px; font-family: inherit; outline: none; }
input.place-text { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; font-family: inherit; outline: none; background: var(--card); color: var(--text); }
input.place-text:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(196,146,91,0.15); }
details.place-advanced summary { font-size: 12px; color: var(--text-light); cursor: pointer; user-select: none; letter-spacing: 1px; }
details.place-advanced summary::-webkit-details-marker { color: var(--gold); }
.hint { font-size: 11px; color: var(--text-muted); margin-top: 6px; line-height: 1.6; }
.hint.ok { color: #4E7A4E; }
.hint.ok b { color: #35613C; }
.hint.warn { color: #9A7B2D; }
.btn-primary {
  width: 100%; border: 0; border-radius: 12px; padding: 13px 0; margin-top: 4px;
  background: linear-gradient(135deg, var(--rose), #C4556A); color: #fff; font-size: 16px; font-weight: 700;
  letter-spacing: 6px; cursor: pointer; font-family: inherit; box-shadow: 0 4px 14px rgba(212,105,123,0.3);
}
.btn-primary:disabled { opacity: .55; cursor: wait; }
.btn-primary.loading { letter-spacing: 2px; }
.err-msg { display: none; background: #FDECEC; color: #B03A3A; font-size: 12px; border-radius: 10px; padding: 8px 12px; margin-top: 10px; }
.err-msg.show { display: block; }

/* ===== 双人表单（合婚） ===== */
.pair-grid { display: grid; gap: 12px; }
.pair-box { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.pair-box.f { background: linear-gradient(180deg, #FFFDFC, var(--accent-pink)); }
.pair-box.m { background: linear-gradient(180deg, #FDFEFF, var(--accent-blue)); }
.pair-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.pair-box.f .pair-title { color: var(--rose); }
.pair-box.m .pair-title { color: var(--teal); }
.pair-title .tag-person { font-size: 10px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: var(--card); }

/* ===== 状态条 ===== */
.status-banner { display: none; border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; font-size: 13px; line-height: 1.7; }
.status-banner.show { display: block; }
.status-banner.info { background: var(--accent-cream); border: 1px solid var(--gold); color: var(--text-light); }
.status-banner.warn { background: #FFF6E0; border: 1px solid #E8C36A; color: #8A6D1F; }
.status-banner.ai-ok { background: #EFF7EF; border: 1px solid #BFD9BF; color: #4E7A4E; }
.status-banner.ai-fail { background: #FDECEC; border: 1px solid #E8B4B4; color: #A34848; }

/* ===== Hero ===== */
.hero { text-align: center; padding: 28px 20px 16px; }
.hero .badge {
  display: inline-block; background: linear-gradient(135deg, #F8E8EC, #FDE8E0);
  color: var(--rose); font-size: 12px; padding: 4px 14px; border-radius: 20px;
  letter-spacing: 2px; margin-bottom: 12px;
}
.hero h1 { font-size: 26px; font-weight: 700; color: var(--text); letter-spacing: 3px; margin-bottom: 4px; line-height: 1.5; }
.hero .subtitle { font-size: 13.5px; color: var(--text-light); letter-spacing: 1px; }
.hero .divider-line { width: 40px; height: 2px; background: var(--gold); margin: 12px auto; border-radius: 1px; }

/* ===== 信息卡 ===== */
.info-card { background: var(--card); border-radius: 16px; padding: 16px 20px; margin-bottom: 14px; box-shadow: 0 2px 12px rgba(139,115,85,0.06); }
.info-row { display: flex; align-items: flex-start; padding: 4px 0; font-size: 13.5px; }
.info-row .label { color: var(--text-light); width: 56px; flex-shrink: 0; }
.info-row .value { color: var(--text); font-weight: 500; }
.person-block { margin-bottom: 12px; }
.person-block:last-child { margin-bottom: 0; }
.person-header {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 14px; font-weight: 600; color: var(--rose);
  margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.person-header .tag-female { background: var(--accent-pink); color: var(--rose); font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.person-header .tag-male { background: var(--accent-blue); color: var(--teal); font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.badge-corr { display: inline-block; font-size: 11px; border-radius: 10px; padding: 1px 8px; margin-left: 6px; }
.badge-corr.done { background: #EFF7EF; color: #4E7A4E; }
.badge-corr.skip { background: #FFF3D6; color: #9A7B2D; }
.notice-minor { background: linear-gradient(135deg,#FFF5F5,#FDF0EA); border:1px solid #F0CFC5; border-radius:12px; padding:10px 14px; font-size:12.5px; color:#8A5A50; margin-bottom:14px; }

/* ===== 四柱：卡片式（基础版/职业） ===== */
.bazi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 14px; }
.bazi-cell {
  background: var(--card); border-radius: 14px; padding: 14px 4px; text-align: center;
  box-shadow: 0 2px 12px rgba(139,115,85,0.06); position: relative; overflow: hidden;
}
.bazi-cell::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.bazi-cell.year::before { background: var(--metal); }
.bazi-cell.month::before { background: var(--earth); }
.bazi-cell.day::before { background: var(--rose); }
.bazi-cell.hour::before { background: var(--fire); }
.bazi-cell .pillar-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; letter-spacing: 1px; }
.bazi-cell .pillar-chars { font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: 2px; font-family: "STKaiti","KaiTi","Noto Serif SC",serif; line-height: 1.4; }
.bazi-cell .pillar-ss { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.bazi-cell .pillar-elem { font-size: 10px; color: var(--text-light); }
.bazi-cell .pillar-nayin { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.bazi-cell .pillar-hidden { font-size: 9px; color: var(--text-muted); margin-top: 3px; line-height: 1.5; }
.bazi-cell.day { border: 2px solid var(--rose); }
.bazi-cell.day .pillar-label { color: var(--rose); font-weight: 600; }

/* ===== 四柱：柱式（感情/桃花/合婚） ===== */
.bazi-pair { display: flex; gap: 10px; margin-bottom: 14px; }
.bazi-side { flex: 1; }
.bazi-side-label { text-align: center; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.bazi-side-label.f { color: var(--rose); }
.bazi-side-label.m { color: var(--teal); }
.bazi-pillars { display: flex; gap: 4px; justify-content: center; margin-bottom: 14px; }
.bazi-side .bazi-pillars { margin-bottom: 0; }
.bazi-pillar {
  background: var(--card); border-radius: 10px; padding: 8px 6px;
  text-align: center; flex: 1; box-shadow: 0 1px 6px rgba(139,115,85,0.05);
  position: relative; overflow: hidden;
}
.bazi-pillar::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.bazi-pillar.year::before { background: var(--wood); }
.bazi-pillar.month::before { background: var(--fire); }
.bazi-pillar.day::before { background: var(--metal); }
.bazi-pillar.hour::before { background: var(--earth); }
.bazi-pillar .pl-label { font-size: 9px; color: var(--text-muted); margin-bottom: 3px; }
.bazi-pillar .pl-chars { font-size: 16px; font-weight: 700; color: var(--text); font-family: "STKaiti","KaiTi","Noto Serif SC",serif; }
.bazi-pillar .pl-elem { font-size: 9px; color: var(--text-light); margin-top: 2px; }
.bazi-pillar.day { border: 1.5px solid var(--rose); }
.bazi-pillar.unknown { opacity: 0.4; }
.bazi-pillar.unknown .pl-chars { font-size: 11px; color: var(--text-muted); }

/* ===== 十神表 ===== */
.shishen-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 13px; }
.shishen-table th { background: var(--accent-pink); color: var(--rose); padding: 8px; font-weight: 600; }
.shishen-table td { padding: 8px; text-align: center; border-bottom: 1px solid var(--border); }
.shishen-table .hl { background: var(--accent-cream); font-weight: 600; }

/* ===== 五行力量 ===== */
.wuxing-bars { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.wx-row { display: flex; align-items: center; gap: 8px; }
.wx-name { width: 24px; font-size: 13px; color: var(--text); font-weight: 600; text-align: center; }
.wx-track { flex: 1; height: 10px; background: #F5F0E8; border-radius: 6px; overflow: hidden; }
.wx-fill { height: 100%; border-radius: 6px; }
.wx-pct { width: 44px; font-size: 12px; color: var(--text-light); text-align: right; }
.wuxing-compare { margin: 10px 0; }
.wx-compare-row { display: flex; align-items: center; margin-bottom: 6px; gap: 8px; }
.wx-compare-row .wx-name { width: 20px; font-size: 14px; text-align: center; flex-shrink: 0; }
.wx-compare-bar-wrap { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.wx-mini-bar { height: 10px; border-radius: 5px; position: relative; }
.wx-mini-bar.f { background: var(--rose); }
.wx-mini-bar.m { background: var(--teal); }
.wx-compare-pct { width: 88px; font-size: 11px; display: flex; justify-content: space-between; flex-shrink: 0; }
.wx-compare-pct .f-pct { color: var(--rose); }
.wx-compare-pct .m-pct { color: var(--teal); }

/* ===== 卡片与标题 ===== */
.section-card { background: var(--card); border-radius: 16px; padding: 20px; margin-bottom: 14px; box-shadow: 0 2px 12px rgba(139,115,85,0.06); }
.section-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.section-title .icon { font-size: 20px; }
.section-title .mark { color: var(--rose); }
.section-desc { font-size: 14px; color: var(--text); line-height: 1.9; }
.section-desc p { margin-bottom: 10px; }
.section-desc p:last-child { margin-bottom: 0; }
.section-note { font-size: 12px; color: var(--text-light); margin-bottom: 10px; }

/* ===== 信号框 ===== */
.signal-box { border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; font-size: 13px; line-height: 1.8; }
.signal-box.good { background: var(--accent-blue); border-left: 3px solid var(--good); }
.signal-box.warn { background: #FFF5EE; border-left: 3px solid var(--warn); }
.signal-box.bad { background: var(--accent-pink); border-left: 3px solid var(--bad); }
.signal-box.caution { background: #FFF0F0; border-left: 3px solid var(--bad); }
.signal-box .sb-title { font-weight: 600; margin-bottom: 4px; }
.signal-box.good .sb-title { color: var(--good); }
.signal-box.warn .sb-title { color: var(--warn); }
.signal-box.bad .sb-title, .signal-box.caution .sb-title { color: var(--bad); }

/* ===== 引用框 ===== */
.quote-box { background: var(--accent-cream); border-left: 3px solid var(--gold); padding: 12px 16px; border-radius: 0 12px 12px 0; margin: 14px 0 0; font-size: 14px; color: var(--text); font-style: italic; }

/* ===== 标签 ===== */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag { background: var(--tag-bg); color: var(--text-light); font-size: 12px; padding: 4px 12px; border-radius: 14px; letter-spacing: 1px; }
.tag.highlight { background: var(--accent-pink); color: var(--rose); font-weight: 600; }
.tag.good { background: var(--accent-blue); color: var(--teal); font-weight: 600; }

/* ===== 大运时间线（行式） ===== */
.timeline { position: relative; margin-top: 10px; }
.tl-item { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.tl-item:last-child { border-bottom: none; }
.tl-age { width: 92px; flex-shrink: 0; color: var(--text-light); font-size: 12px; text-align: right; }
.tl-main { flex: 1; }
.tl-gz { font-size: 16px; font-weight: 700; color: var(--text); font-family: "STKaiti","KaiTi",serif; }
.tl-years { font-size: 12px; color: var(--text-muted); margin-left: 6px; }
.tl-item.current { background: var(--accent-pink); border-radius: 10px; padding: 9px 12px; margin: 0 -4px; border-bottom: none; }
.tl-item.current .tl-gz { color: var(--rose); }

/* ===== 流年时间线（块式） ===== */
.timeline-item { padding: 12px 0; font-size: 13px; border-bottom: 1px solid var(--border); }
.timeline-item:last-child { border-bottom: none; }
.timeline-item .tl-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; flex-wrap: wrap; gap: 4px; }
.timeline-item .tl-name { font-weight: 600; color: var(--text); }
.timeline-item .tl-age { font-size: 11px; color: var(--text-muted); }
.timeline-item .tl-desc { font-size: 12px; color: var(--text-light); }
.timeline-item.current .tl-name { color: var(--rose); }

/* ===== 网格卡 ===== */
.sg-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin: 10px 0; }
.sg-card { background: var(--accent-cream); border-radius: 10px; padding: 12px 10px; text-align: center; }
.sg-card .sg-icon { font-size: 20px; margin-bottom: 4px; }
.sg-card .sg-name { font-size: 11px; color: var(--text-light); }
.sg-card .sg-val { font-size: 16px; font-weight: 700; color: var(--rose); margin-top: 2px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-card { background: var(--accent-cream); border-radius: 12px; padding: 12px; }
.mini-card .m-title { font-size: 12px; color: var(--text-light); margin-bottom: 4px; }
.mini-card .m-body { font-size: 13px; color: var(--text); line-height: 1.6; }

/* ===== 八卦/测评卡 ===== */
.gossip-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin: 10px 0; }
.gossip-card { background: var(--accent-cream); border-radius: 10px; padding: 14px 12px; text-align: center; position: relative; overflow: hidden; }
.gossip-card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.gossip-card.safe::after { background: var(--green); }
.gossip-card.danger::after { background: var(--bad); }
.gossip-card.neutral::after { background: var(--warn); }
.gossip-card .gc-icon { font-size: 28px; margin-bottom: 6px; }
.gossip-card .gc-name { font-size: 12px; color: var(--text-light); font-weight: 600; margin-bottom: 4px; }
.gossip-card .gc-score { font-size: 26px; font-weight: 900; margin-bottom: 2px; line-height: 1.2; }
.gossip-card .gc-detail { font-size: 10px; color: var(--text-muted); }
.gossip-card.safe .gc-score { color: var(--green); }
.gossip-card.danger .gc-score { color: var(--bad); }
.gossip-card.neutral .gc-score { color: var(--amber); }

/* ===== 评分条 ===== */
.gossip-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.gossip-bar-row .gb-label { width: 80px; font-size: 12px; color: var(--text-light); flex-shrink: 0; }
.gossip-bar-row .gb-bar-wrap { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.gossip-bar-row .gb-bar { height: 100%; border-radius: 4px; }
.gossip-bar-row .gb-bar.low { background: var(--green); }
.gossip-bar-row .gb-bar.mid { background: var(--warn); }
.gossip-bar-row .gb-bar.high { background: var(--bad); }
.gossip-bar-row .gb-val { width: 44px; font-size: 12px; font-weight: 700; flex-shrink: 0; text-align: right; }
.gossip-bar-row .gb-val.low { color: var(--green); }
.gossip-bar-row .gb-val.mid { color: var(--warn); }
.gossip-bar-row .gb-val.high { color: var(--bad); }
.score-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.score-bar-row .sbr-label { width: 76px; font-size: 12px; color: var(--text-light); flex-shrink: 0; }
.score-bar-row .sbr-bar-wrap { flex: 1; height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; }
.score-bar-row .sbr-bar { height: 100%; border-radius: 5px; }
.score-bar-row .sbr-val { width: 40px; font-size: 12px; font-weight: 700; text-align: right; flex-shrink: 0; }
.sbr-note { font-size: 11px; color: var(--text-muted); margin: -4px 0 8px; }
.prog-bar-wrap { background: #F0E4D8; border-radius: 6px; height: 10px; overflow: hidden; margin: 6px 0; }
.prog-bar-fill { height: 100%; border-radius: 6px; }
.prog-bar-fill.good { background: var(--good); }
.prog-bar-fill.warn { background: var(--warn); }
.prog-bar-fill.bad { background: var(--bad); }

/* ===== 合婚：评分环 ===== */
.score-ring { text-align: center; margin: 10px 0; }
.score-circle { display: inline-flex; align-items: center; justify-content: center; width: 100px; height: 100px; border-radius: 50%; background: conic-gradient(var(--rose) 0% 82%, var(--border) 82% 100%); position: relative; }
.score-inner { width: 80px; height: 80px; border-radius: 50%; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-num { font-size: 28px; font-weight: 700; color: var(--rose); line-height: 1.1; }
.score-label { font-size: 10px; color: var(--text-light); }
.score-grade { font-size: 14px; font-weight: 600; color: var(--gold); margin-top: 8px; }

/* ===== 合婚：逐柱对比 ===== */
.compare-row { display: flex; gap: 12px; margin: 10px 0; align-items: stretch; }
.compare-side { flex: 1; padding: 10px 12px; border-radius: 12px; font-size: 13px; }
.compare-side.f { background: var(--accent-pink); }
.compare-side.m { background: var(--accent-blue); }
.compare-side .cs-label { font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.compare-side.f .cs-label { color: var(--rose); }
.compare-side.m .cs-label { color: var(--teal); }
.compare-vs { display: flex; align-items: center; justify-content: center; width: 28px; font-size: 11px; color: var(--text-muted); font-weight: 600; }
.compare-result { width: 100%; text-align: center; font-size: 12px; padding: 4px 0; color: var(--text-light); font-style: italic; }
.compare-col { flex: 1; border-radius: 10px; padding: 10px 12px; }
.compare-col.pos { background: var(--accent-blue); }
.compare-col.neg { background: var(--accent-pink); }
.compare-col .c-head { font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.compare-col.pos .c-head { color: var(--good); }
.compare-col.neg .c-head { color: var(--bad); }
.compare-col .c-body { font-size: 12px; color: var(--text); line-height: 1.6; }

/* ===== 职业：匹配表 ===== */
.career-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.career-table th { background: var(--accent-cream); color: var(--gold); padding: 8px; font-weight: 600; text-align: center; border: 1px solid var(--border); }
.career-table td { padding: 8px 10px; text-align: center; border: 1px solid var(--border); color: var(--text); }
.career-table .match-high { background: #EDF5F0; font-weight: 600; }
.career-table .match-mid { background: #FEF9F0; }
.career-table .match-low { background: #FFF0F0; }

/* ===== 职业：发展路线 ===== */
.roadmap { position: relative; padding-left: 20px; }
.roadmap::before { content: ''; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: var(--border); border-radius: 1px; }
.roadmap-item { position: relative; padding: 10px 0 10px 20px; font-size: 13px; border-bottom: 1px solid var(--border); }
.roadmap-item:last-child { border-bottom: none; }
.roadmap-item::before { content: ''; position: absolute; left: -16px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--card); border: 2px solid var(--gold); }
.roadmap-item.current::before { background: var(--teal); border-color: var(--teal); }
.roadmap-item .rm-stage { font-size: 12px; color: var(--text-muted); }
.roadmap-item .rm-title { font-weight: 700; color: var(--text); font-size: 15px; }
.roadmap-item.current .rm-title { color: var(--teal); }
.roadmap-item .rm-desc { font-size: 12px; color: var(--text-light); margin-top: 3px; }

/* ===== 方位块 ===== */
.direction-block { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 16px; background: var(--accent-cream); border-radius: 12px; margin: 10px 0; }
.direction-block .dir-icon { font-size: 40px; }
.direction-block .dir-info { text-align: left; }
.direction-block .dir-name { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: 2px; }
.direction-block .dir-detail { font-size: 12px; color: var(--text-light); }

/* ===== 建议条 ===== */
.advice-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.advice-item:last-child { border-bottom: none; }
.advice-num { width: 24px; height: 24px; border-radius: 50%; background: var(--rose); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }

/* ===== 金句 ===== */
.golden-quote { text-align: center; padding: 24px 20px; background: linear-gradient(180deg, var(--card) 0%, var(--accent-cream) 100%); border-radius: 16px; margin-bottom: 14px; box-shadow: 0 2px 12px rgba(139,115,85,0.06); }
.golden-quote .quote-icon { font-size: 24px; margin-bottom: 8px; }
.golden-quote .quote-text { font-size: 16px; font-weight: 600; color: var(--text); font-family: "STKaiti","KaiTi","Noto Serif SC",serif; letter-spacing: 1px; line-height: 2; }

/* ===== 免责与页脚 ===== */
.disclaimer { margin-top: 8px; padding: 14px 16px; font-size: 12px; color: var(--text-muted); text-align: center; line-height: 1.7; border-top: 1px solid var(--border); }
.app-footer { text-align: center; font-size: 11px; color: var(--text-muted); padding: 6px 16px 24px; line-height: 1.9; }

/* ===== AI 加载态 ===== */
.ai-placeholder { color: var(--text-muted); font-size: 13px; }
.ai-loading { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 13px; }
.ai-loading i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); display: inline-block; animation: aiBlink 1.2s infinite ease-in-out; }
.ai-loading i:nth-child(2) { animation-delay: .2s; }
.ai-loading i:nth-child(3) { animation-delay: .4s; }
@keyframes aiBlink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
details.local-detail { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 8px; }
details.local-detail summary { font-size: 12px; color: var(--text-muted); cursor: pointer; user-select: none; }
details.local-detail p { font-size: 12px; color: var(--text-light); line-height: 1.8; margin-top: 6px; }

/* ===== 生成后：收起表单 + 回改入口 ===== */
.again-bar {
  display: inline-block; margin: 0 0 12px; font-size: 12.5px; color: var(--text-muted);
  cursor: pointer; user-select: none; border-bottom: 1px dashed var(--border); padding-bottom: 1px;
  transition: color .12s ease, border-color .12s ease;
}
.again-bar:hover { color: var(--rose); border-color: var(--rose); }

/* 失败状态条里的「重试」链接 */
.banner-retry {
  display: inline-block; margin-left: 8px; color: var(--rose); font-weight: 700;
  text-decoration: none; border-bottom: 1px dashed var(--rose); cursor: pointer;
}
.banner-retry:hover { color: var(--highlight); border-color: var(--highlight); }

/* ═══════════════════════════════════════════════════════════════
   移动端交互层（picker.js 配套）
   1) 字段触发按钮   2) 底部抽屉   3) 滚轮选择器   4) 出生地   5) 音效开关
   ═══════════════════════════════════════════════════════════════ */

/* ===== 1. 字段触发按钮（替代原生 date / select 的"大按钮"） ===== */
.field-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; font-family: inherit; color: var(--text); cursor: pointer;
  transition: border-color .14s ease, box-shadow .14s ease, transform .1s ease;
  -webkit-tap-highlight-color: transparent;
}
.field-btn:active { transform: scale(.985); background: var(--accent-cream); }
.field-btn:focus-visible { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(196,146,91,.18); }
.field-btn .fb-icon { font-size: 16px; flex-shrink: 0; opacity: .9; }
.field-btn .fb-main { font-size: 15px; font-weight: 600; letter-spacing: .5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-btn .fb-sub { flex: 1; text-align: right; font-size: 11.5px; color: var(--text-muted); letter-spacing: .5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-btn .fb-sub.ok { color: #4E7A4E; }
.field-btn .fb-sub.warn { color: #9A7B2D; }
.field-btn .fb-arrow { flex-shrink: 0; color: var(--gold); font-size: 11px; margin-left: 2px; }
.field-btn.empty .fb-main { color: var(--text-muted); font-weight: 400; }
.field-btn.empty .fb-sub { color: var(--text-muted); }

/* ===== 2. 底部抽屉 ===== */
body.sheet-open { overflow: hidden; }
.sheet-mask {
  position: fixed; inset: 0; z-index: 999; background: rgba(58,46,42,.42);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .22s ease; -webkit-tap-highlight-color: transparent;
}
.sheet-mask.show { opacity: 1; }
.sheet {
  width: 100%; max-width: 520px; max-height: 84vh; display: flex; flex-direction: column;
  background: var(--card); border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 28px rgba(58,46,42,.18);
  transform: translateY(102%); transition: transform .27s cubic-bezier(.22,.9,.3,1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.sheet-mask.show .sheet { transform: translateY(0); }
.sheet-grip { flex-shrink: 0; padding: 9px 0 3px; cursor: grab; touch-action: none; }
.sheet-grip::before { content: ''; display: block; width: 38px; height: 4px; border-radius: 2px; background: var(--border); margin: 0 auto; }
.sheet-head { flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 6px 18px 10px; border-bottom: 1px solid var(--border); }
.sheet-title { flex: 1; font-size: 14.5px; font-weight: 700; color: var(--text); letter-spacing: 1px; }
.sheet-done {
  border: 0; border-radius: 10px; padding: 7px 16px; background: var(--accent-pink); color: var(--rose);
  font-size: 13.5px; font-weight: 700; font-family: inherit; cursor: pointer; letter-spacing: 1px;
  -webkit-tap-highlight-color: transparent;
}
.sheet-done:active { background: var(--rose); color: #fff; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* ===== 3. 滚轮选择器 ===== */
.picker-body { padding: 8px 16px 18px; }
.wheel-row { display: flex; gap: 8px; }
.wheel-col { flex: 1; min-width: 0; }
@media (min-width: 520px) { .picker-body .wheel-row { max-width: 400px; margin: 0 auto; } }
.wheel { position: relative; height: 200px; overflow: hidden; }
.wheel::before {
  content: ''; position: absolute; left: 6px; right: 6px; top: 80px; height: 40px; z-index: 0;
  border-radius: 11px; background: var(--accent-cream);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  pointer-events: none;
}
.wheel::after {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg,
    rgba(255,255,255,.97) 0%, rgba(255,255,255,.82) 7%, rgba(255,255,255,0) 27%,
    rgba(255,255,255,0) 73%, rgba(255,255,255,.82) 93%, rgba(255,255,255,.97) 100%);
}
.wheel-list {
  position: relative; z-index: 1; height: 100%; overflow-y: scroll; padding: 80px 0;
  scrollbar-width: none; -ms-overflow-style: none; touch-action: pan-y;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.wheel-list::-webkit-scrollbar { display: none; width: 0; }
.wheel-item {
  height: 40px; line-height: 40px; text-align: center; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; font-size: 15px; color: var(--text-muted);
  letter-spacing: 1px; scroll-snap-align: center; user-select: none;
  transition: color .16s ease, opacity .16s ease;
}
.wheel-item.on { color: var(--text); font-weight: 700; font-size: 17.5px; }
.wheel.dragging { cursor: grabbing; }
.wheel.dragging .wheel-item { cursor: grabbing; }
@media (hover: none) and (pointer: coarse) {
  .wheel-list { scroll-snap-type: y mandatory; }
}
.pick-hint { text-align: center; font-size: 12.5px; color: var(--text-light); margin-top: 12px; letter-spacing: 1px; }
.leap-toggle {
  display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-light);
  margin-top: 8px; padding: 12px 2px 0; border-top: 1px dashed var(--border); cursor: pointer;
}
.leap-toggle input { width: 17px; height: 17px; accent-color: var(--rose); flex-shrink: 0; }

/* ===== 4. 出生地选择 ===== */
.place-body { padding: 0; display: flex; flex-direction: column; height: 64vh; max-height: 540px; }
.place-search { flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.place-input {
  flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--border); border-radius: 11px;
  font-size: 15px; font-family: inherit; outline: none; background: var(--bg); color: var(--text);
}
.place-input:focus { border-color: var(--gold); background: var(--card); }
.place-clear {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: var(--tag-bg); color: var(--text-light); font-size: 13px; font-family: inherit; cursor: pointer;
}
.place-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 2px 0 18px; }
.place-sec { font-size: 11.5px; color: var(--text-muted); letter-spacing: 1px; padding: 13px 16px 7px; }
.place-grid { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px; }
.place-chip {
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  font-size: 13.5px; font-family: inherit; padding: 9px 15px; border-radius: 999px;
  cursor: pointer; line-height: 1.4; -webkit-tap-highlight-color: transparent;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.place-chip:active { background: var(--accent-pink); border-color: var(--rose); color: var(--rose); }
.place-chip.ghost { background: var(--accent-cream); font-size: 12.5px; padding: 9px 15px; text-align: left; color: var(--text-light); }
.place-chip.ghost b { display: block; font-size: 11px; font-weight: 500; color: var(--text-muted); }
.place-list { padding: 2px 16px 0; }
.place-list.tight { padding-top: 0; }
.place-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  border: 0; border-bottom: 1px solid var(--border); background: transparent;
  padding: 12px 2px; font-family: inherit; font-size: 14.5px; color: var(--text); cursor: pointer; text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.place-row:last-child { border-bottom: none; }
.place-row em { font-style: normal; font-size: 11.5px; color: var(--text-muted); flex-shrink: 0; }
.place-flag {
  font-style: normal; font-size: 10px; font-weight: 600; margin-left: 7px; padding: 1px 7px;
  border-radius: 8px; background: var(--accent-pink); color: var(--rose); vertical-align: 1px;
}
.place-flag.approx { background: var(--accent-cream); color: var(--gold); }
.place-row:active { background: var(--accent-cream); }
.place-empty { text-align: center; padding: 30px 16px; font-size: 13px; color: var(--text-muted); line-height: 2.2; }
.place-chip.sel { background: var(--rose); border-color: var(--rose); color: #fff; }
.place-chip.sel b { color: rgba(255,255,255,.82); }
.place-row.sel { background: var(--accent-pink); }
.place-row.sel span { color: var(--rose); font-weight: 700; }

/* 精确经度 */
.lon-body { padding: 10px 16px 20px; }
.lon-tip { font-size: 12px; color: var(--text-light); line-height: 1.95; margin-bottom: 14px; }
.lon-input {
  width: 100%; padding: 14px; border: 1px solid var(--border); border-radius: 12px;
  font-size: 18px; font-family: inherit; text-align: center; letter-spacing: 1px;
  outline: none; background: var(--bg); color: var(--text);
}
.lon-input:focus { border-color: var(--gold); background: var(--card); }
.lon-input.bad { border-color: var(--bad); background: #FDECEC; animation: shakeX .32s ease; }
.lon-ok {
  width: 100%; margin-top: 14px; border: 0; border-radius: 12px; padding: 13px 0;
  background: linear-gradient(135deg, var(--rose), #C4556A); color: #fff;
  font-size: 15px; font-weight: 700; letter-spacing: 5px; font-family: inherit; cursor: pointer;
  box-shadow: 0 4px 14px rgba(212,105,123,.28);
}
.lon-ok:active { transform: scale(.99); }
@keyframes shakeX { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ===== 5. 音效开关 ===== */
.app-header { position: relative; }
.sound-toggle {
  position: absolute; top: 6px; right: 10px; z-index: 900;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--card); color: var(--text-light);
  font-size: 15px; line-height: 1; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(139,115,85,.12);
  -webkit-tap-highlight-color: transparent;
  transition: opacity .16s ease, transform .1s ease;
}
.sound-toggle:active { transform: scale(.9); }
.sound-toggle.off { opacity: .5; }
/* 无页眉时（兜底）改为右下角悬浮 */
.sound-toggle.floating { position: fixed; top: auto; bottom: 14px; right: 14px; width: 44px; height: 44px; font-size: 17px; box-shadow: 0 3px 12px rgba(139,115,85,.18); }

@media (prefers-reduced-motion: reduce) {
  .sheet, .sheet-mask, .field-btn, .wheel-item, .sound-toggle { transition: none; }
  .lon-input.bad { animation: none; }
}

/* ===== 响应式 ===== */
@media (max-width: 400px) {
  .bazi-cell .pillar-chars { font-size: 19px; }
  .hero h1 { font-size: 22px; }
  .bazi-pillar { padding: 6px 3px; }
  .bazi-pillar .pl-chars { font-size: 14px; }
  .container { padding: 10px; }
  .app-header { padding: 14px 16px 2px; }
  .app-brand { font-size: 20px; letter-spacing: 2px; }
  .app-tagline { font-size: 11px; letter-spacing: 1px; }
  .form-card { padding: 14px 14px; }
  .field-btn { padding: 13px 13px; }
  .field-btn .fb-main { font-size: 15px; }
  .place-body { height: 68vh; }
}
