/* sites/www.luobu.cn/styles/style.css —— 萝卜起名主题（每站独立设计）
   基调：暖米白宣纸底 · 朱砂红点睛 · 竹青辅色 · 圆润宋体标题；移动优先 */

:root {
  --paper: #faf5ec;
  --paper-2: #f3ecdd;
  --card: #fffdf8;
  --ink: #372e23;
  --ink-2: #6f6350;
  --ink-3: #9a8b73;
  --line: #e6dcc7;
  --line-2: #d8cbaf;
  --red: #bd4230;
  --red-d: #96311f;
  --red-bg: #f9ebe6;
  --green: #4e7d6a;
  --green-d: #3c6454;
  --green-bg: #e6efe8;
  --gold: #a9822f;
  --gold-bg: #f5ecd6;
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  font-size: 15px;
}

a { color: var(--green-d); text-decoration: none; }
a:hover { color: var(--red); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ---------- 头部 ---------- */
.hd { background: var(--card); border-bottom: 1px solid var(--line-2); }
.hd-in {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 8px 16px; max-width: 1100px; margin: 0 auto;
}
.hd-brand {
  font-family: var(--serif); font-size: 21px; font-weight: 700; color: var(--ink);
  white-space: nowrap; letter-spacing: 1px;
}
.hd-brand:hover { color: var(--red); }
.hd-sub {
  display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 400;
  color: var(--gold); letter-spacing: 2px; transform: translateY(-2px);
}
.hd-nav {
  display: flex; gap: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hd-nav::-webkit-scrollbar { display: none; }
.hd-nav a {
  padding: 8px 12px; font-size: 14px; color: var(--ink-2); white-space: nowrap;
  border-radius: 8px; min-height: 40px; display: inline-flex; align-items: center;
}
.hd-nav a.on { color: var(--card); background: var(--red); font-weight: 600; }

/* ---------- 页头 ---------- */
.page-h { padding: 26px 0 18px; }
.page-h h1 {
  font-family: var(--serif); font-size: 25px; letter-spacing: 1px; line-height: 1.4;
}
.page-h h1::before {
  content: ""; display: inline-block; width: 6px; height: 22px; margin-right: 10px;
  background: linear-gradient(180deg, var(--red), var(--gold)); border-radius: 3px;
  transform: translateY(2px);
}
.crumb { color: var(--ink-3); font-size: 13px; margin-top: 6px; padding-left: 16px; }

/* ---------- 区块 ---------- */
.sec {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 16px; margin-bottom: 16px;
}
.sec-h {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-bottom: 12px; flex-wrap: wrap;
}
.sec-h h2 {
  font-family: var(--serif); font-size: 19px; letter-spacing: 1px;
}
.sec-h h2::before {
  content: ""; display: inline-block; width: 4px; height: 16px; margin-right: 8px;
  background: var(--red); border-radius: 2px; transform: translateY(1px);
}
.sec-h .more { font-size: 12.5px; color: var(--ink-3); }
.note { color: var(--ink-3); font-size: 12.5px; margin-top: 10px; line-height: 1.7; }

/* ---------- 双栏 ---------- */
.cols { display: block; }
.side { margin-top: 16px; }
.side .sec { padding: 14px 14px; }

/* ---------- 表单 ---------- */
.form-card { border: 1px solid var(--line-2); background: var(--card); border-radius: 12px; padding: 18px 16px; }
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f-item { display: flex; flex-direction: column; gap: 6px; }
.f-item.full { grid-column: 1 / -1; }
.f-item label { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.f-item label i { font-style: normal; color: var(--ink-3); font-weight: 400; font-size: 12px; }
.f-item input, .f-item select {
  height: 46px; padding: 0 12px; font-size: 16px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 10px;
  font-family: var(--sans); width: 100%;
}
.f-item input:focus, .f-item select:focus {
  outline: none; border-color: var(--red); background: #fff;
  box-shadow: 0 0 0 3px rgba(189, 66, 48, 0.1);
}
.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1; height: 44px; border: 1px solid var(--line-2); background: var(--paper);
  border-radius: 10px; font-size: 15px; color: var(--ink-2); cursor: pointer;
  font-family: var(--sans); transition: all .15s;
}
.seg button.on { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  height: 38px; padding: 0 14px; border: 1px solid var(--line-2); background: var(--paper);
  border-radius: 19px; font-size: 13.5px; color: var(--ink-2); cursor: pointer;
  font-family: var(--sans); transition: all .15s;
}
.chips button.on { background: var(--green-bg); border-color: var(--green); color: var(--green-d); font-weight: 600; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 10px 26px; font-size: 16px; font-weight: 600;
  border-radius: 23px; border: none; cursor: pointer; font-family: var(--sans);
  transition: transform .1s, box-shadow .15s;
}
.btn:active { transform: scale(0.97); }
.btn-main { background: linear-gradient(135deg, var(--red), var(--red-d)); color: #fff; box-shadow: 0 4px 14px rgba(150, 49, 31, 0.25); }
.btn-main:hover { box-shadow: 0 6px 18px rgba(150, 49, 31, 0.35); }
.btn-line { background: var(--card); border: 1px solid var(--red); color: var(--red); }
.btn-green { background: var(--green-bg); border: 1px solid var(--green); color: var(--green-d); }
.btn-sm { min-height: 36px; padding: 6px 16px; font-size: 13.5px; border-radius: 18px; }
.f-actions { margin-top: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.f-tip { font-size: 12px; color: var(--ink-3); }

/* ---------- 名字卡片 ---------- */
.names-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.nm-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 12px 12px;
  background: linear-gradient(180deg, #fffef9, var(--card)); position: relative;
  display: flex; flex-direction: column; gap: 6px;
}
.nm-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.nm-name { font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: 2px; line-height: 1.3; }
.nm-score {
  flex: none; min-width: 44px; text-align: center; font-size: 13px; font-weight: 700;
  color: var(--green-d); background: var(--green-bg); border-radius: 8px; padding: 3px 8px;
}
.nm-score.mid { color: var(--gold); background: var(--gold-bg); }
.nm-score.low { color: var(--red-d); background: var(--red-bg); }
.nm-py { font-size: 12px; color: var(--ink-3); letter-spacing: 0.5px; }
.nm-meta { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.nm-meta b { color: var(--ink); font-weight: 600; }
.nm-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.nm-tags span {
  font-size: 11px; color: var(--green-d); background: var(--green-bg);
  border-radius: 4px; padding: 1px 7px;
}
.nm-tags span.wx { color: var(--gold); background: var(--gold-bg); }
.nm-src {
  font-size: 12px; color: var(--ink-3); line-height: 1.6;
  border-top: 1px dashed var(--line); padding-top: 6px;
}
.nm-src b { color: var(--green-d); font-weight: 600; }
.nm-act { display: flex; gap: 8px; margin-top: 2px; }
.nm-act .btn { flex: 1; }

/* ---------- 工具卡片 ---------- */
.links-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.link-card {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
}
.link-card:hover { border-color: var(--green); box-shadow: 0 4px 12px rgba(78, 125, 106, 0.12); }
.link-card b { font-family: var(--serif); font-size: 17px; color: var(--ink); }
.link-card span { font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }

/* ---------- 侧栏 ---------- */
.quick-list { display: flex; flex-direction: column; gap: 8px; }
.quick-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper); font-size: 14px; min-height: 46px;
}
.quick-list a small { color: var(--ink-3); font-size: 11.5px; }
.side-note { font-size: 13px; color: var(--ink-2); line-height: 2; }
.side-note b { color: var(--red-d); }

/* ---------- 表格 ---------- */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 420px; }
.tbl th, .tbl td { border: 1px solid var(--line); padding: 8px 10px; text-align: center; }
.tbl th { background: var(--paper-2); font-weight: 600; white-space: nowrap; }
.tbl td.l { text-align: left; }

/* ---------- 重量速查网格（称骨页：自适应列数，手机不撑破） ---------- */
.wgt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.wgt-cell { border: 1px solid var(--line); border-radius: 8px; padding: 6px 4px; text-align: center; background: var(--paper); }
.wgt-cell b { display: block; font-size: 14.5px; font-family: var(--serif); }
.wgt-cell span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.wgt-cell span.t { font-size: 11px; }
@media (max-width: 639px) { .wgt-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 5px; } .wgt-cell b { font-size: 13.5px; } }
.tbl-fit { min-width: 0; }
.tbl-fit th, .tbl-fit td { padding: 7px 6px; }

/* ---------- 五格 / 结果面板 ---------- */
.wg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.wg-cell {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center;
  background: var(--paper);
}
.wg-cell .k { font-size: 12.5px; color: var(--ink-3); }
.wg-cell .v { font-family: var(--serif); font-size: 26px; font-weight: 700; margin: 2px 0; }
.wg-cell .s { font-size: 12px; }
.s.ji { color: var(--green-d); }
.s.mid { color: var(--gold); }
.s.xiong { color: var(--red-d); }
.big-score {
  display: flex; align-items: center; gap: 14px; padding: 14px; margin-bottom: 14px;
  border: 1px solid var(--line-2); border-radius: 14px; background: var(--card);
}
.big-score .num {
  flex: none; width: 88px; height: 88px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  font-family: var(--serif); border: 4px solid var(--green);
  color: var(--green-d); background: var(--green-bg);
}
.big-score .num b { font-size: 34px; line-height: 1.1; }
.big-score .num span { font-size: 11px; }
.big-score .num.mid { border-color: var(--gold); color: var(--gold); background: var(--gold-bg); }
.big-score .num.low { border-color: var(--red); color: var(--red-d); background: var(--red-bg); }
.big-score .t { font-size: 14.5px; line-height: 1.8; color: var(--ink-2); }
.big-score .t b { font-size: 17px; color: var(--ink); font-family: var(--serif); letter-spacing: 2px; }

/* ---------- 称骨结果卡 ---------- */
.cg-score {
  margin-bottom: 14px; padding: 20px 16px 16px; text-align: center;
  border: 1px solid var(--line-2); border-radius: 14px; background: var(--card);
}
.cg-score .cg-w { margin: 0; }
.cg-score .cg-w b {
  font-family: var(--serif); font-size: 38px; line-height: 1.2; letter-spacing: 3px;
  color: var(--green-d);
}
.cg-score .cg-grade {
  display: inline-block; margin-top: 8px; padding: 3px 14px; border-radius: 14px;
  font-size: 13px; font-weight: 600; background: var(--green-bg); color: var(--green-d);
}
.cg-score.mid .cg-w b { color: var(--gold); }
.cg-score.mid .cg-grade { background: var(--gold-bg); color: var(--gold); }
.cg-score.low .cg-w b { color: var(--red-d); }
.cg-score.low .cg-grade { background: var(--red-bg); color: var(--red-d); }
.cg-info { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); text-align: left; }
.cg-info p { margin: 0 0 8px; }
.cg-info .cg-line { font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.cg-info .cg-label { font-size: 14.5px; color: var(--ink); }
.cg-info .cg-label b { color: var(--red-d); }
.cg-info .cg-song { font-family: var(--serif); font-size: 16px; line-height: 2; letter-spacing: 1px; color: var(--ink); margin: 0 0 6px; }
.cg-info .cg-plain { font-size: 13px; line-height: 1.8; color: var(--ink-3); margin: 0; }

/* ---------- 八字四柱 ---------- */
.bz-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bz-col { text-align: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 4px; background: var(--paper); }
.bz-col .k { font-size: 11.5px; color: var(--ink-3); margin-bottom: 2px; }
.bz-col .gz { font-family: var(--serif); font-size: 21px; font-weight: 700; letter-spacing: 2px; }
.bz-col .sc { font-size: 11px; color: var(--green-d); margin-top: 2px; }

/* ---------- 五行条 ---------- */
.wx-row { display: flex; align-items: center; gap: 8px; margin: 7px 0; }
.wx-row .k { flex: none; width: 3.2em; font-size: 13px; }
.wx-row .bar { flex: 1; height: 14px; background: var(--paper-2); border-radius: 7px; overflow: hidden; }
.wx-row .bar i { display: block; height: 100%; border-radius: 7px; }
.wx-row .n { flex: none; width: 2.6em; font-size: 12.5px; color: var(--ink-2); text-align: right; }
.wx-jin { background: #c9a227; } .wx-mu { background: #5d8a4a; } .wx-shui { background: #4a7fa5; }
.wx-huo { background: #c25b45; } .wx-tu { background: #a1793f; }

/* ---------- 热门字 ---------- */
.hot-words { columns: 2; column-gap: 18px; }
.hot-line { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; break-inside: avoid; border-bottom: 1px dashed var(--line); }
.hot-line .no { flex: none; width: 22px; height: 22px; border-radius: 6px; background: var(--paper-2); color: var(--ink-3); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.hot-line:nth-child(-n+3) .no { background: var(--red); color: #fff; }
.hot-line .w { font-family: var(--serif); font-size: 18px; font-weight: 700; }
.hot-line .p { font-size: 12px; color: var(--ink-3); }

/* ---------- 字根卡 ---------- */
.root-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.root-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--paper); }
.root-card.good { border-color: var(--green); }
.root-card.bad { border-color: var(--red); opacity: .92; }
.root-card .rt { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.root-card.good .rt { color: var(--green-d); }
.root-card.bad .rt { color: var(--red-d); }
.root-card .rc { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }
.root-card .rc b { color: var(--ink); }

/* ---------- 配图 ---------- */
.imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.imgs img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); display: block; }

/* ---------- FAQ ---------- */
.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; margin-bottom: 8px; background: var(--paper); }
.faq summary {
  cursor: pointer; font-size: 14.5px; font-weight: 600; padding: 12px 0; min-height: 44px;
  display: flex; align-items: center; list-style: none; line-height: 1.5;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "问"; flex: none; width: 22px; height: 22px; margin-right: 8px; border-radius: 6px; background: var(--red-bg); color: var(--red-d); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.faq .ans { padding: 0 0 12px 30px; font-size: 13.5px; color: var(--ink-2); }
.faq .ans b { color: var(--ink); }

/* ---------- 正文段落 ---------- */
.txt p { font-size: 14px; color: var(--ink-2); margin-bottom: 10px; text-align: justify; }
.txt b { color: var(--ink); }
.txt h2 { margin-top: 6px; }

/* ---------- 空态 / 提示 ---------- */
.empty-tip { text-align: center; color: var(--ink-3); font-size: 13.5px; padding: 18px 0; }
.warn-tip {
  border: 1px solid var(--gold); background: var(--gold-bg); color: #7a5c1c;
  border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px;
}

/* ---------- 404 ---------- */
.nf { text-align: center; padding: 72px 0; }
.nf h1 { font-family: var(--serif); font-size: 26px; margin-bottom: 10px; }
.nf p { color: var(--ink-2); }
.nf-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.nf-links a {
  border: 1px solid var(--line-2); border-radius: 18px; padding: 8px 18px; font-size: 14px;
  min-height: 40px; display: inline-flex; align-items: center; background: var(--card);
}

/* ---------- 页脚 ---------- */
.ft { background: var(--paper-2); border-top: 1px solid var(--line-2); margin-top: 28px; }
.ft-in { max-width: 1100px; margin: 0 auto; padding: 20px 16px; }
.ft-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 12px; }
.ft-nav a { font-size: 13.5px; color: var(--ink-2); }
.ft p { font-size: 12.5px; color: var(--ink-3); line-height: 1.9; }
.ft-cr { margin-top: 8px; }

/* ---------- 周易卦象卡 ---------- */
.zy-gua-card {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin-bottom: 10px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
}
.zy-syms {
  flex: none; width: 52px; text-align: center; padding: 6px 0;
  border-right: 1px dashed var(--line-2);
}
.zy-syms i {
  display: block; font-style: normal; font-family: var(--serif);
  font-size: 26px; line-height: 1.15; color: var(--red-d);
}
.zy-gua-body { flex: 1; min-width: 0; }
.zy-gua-name { font-size: 15.5px; margin-bottom: 2px; }
.zy-gua-name b { font-family: var(--serif); font-size: 19px; letter-spacing: 2px; margin: 0 4px; }
.zy-gua-name .s { font-size: 12px; border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; }
.zy-gua-body p { font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.zy-gua-body p.zy-plain { color: var(--ink); }
.zy-wxnote p { font-size: 13.5px; color: var(--ink-2); line-height: 1.8; padding: 4px 0 4px 12px; border-left: 2px solid var(--line-2); }
.zy-wxnote p + p { margin-top: 6px; }

/* 六十四卦全表网格 */
.zy-gua-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.zy-gua-cell {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper);
}
.zy-gua-cell b { font-family: var(--serif); font-size: 14.5px; letter-spacing: 1px; font-weight: 600; }
.zy-gua-cell span { font-size: 11.5px; flex: none; }
.zy-gua-cell.ji { border-color: #cfe0d3; }
.zy-gua-cell.ji b { color: var(--green-d); }
.zy-gua-cell.ji span { color: var(--green-d); background: var(--green-bg); border-radius: 4px; padding: 0 5px; }
.zy-gua-cell.mid { border-color: #e3d6b4; }
.zy-gua-cell.mid b { color: var(--gold); }
.zy-gua-cell.mid span { color: var(--gold); background: var(--gold-bg); border-radius: 4px; padding: 0 5px; }
.zy-gua-cell.xiong { border-color: #e8cfc6; }
.zy-gua-cell.xiong b { color: var(--red-d); }
.zy-gua-cell.xiong span { color: var(--red-d); background: var(--red-bg); border-radius: 4px; padding: 0 5px; }

/* ---------- 桌面端 ---------- */
@media (min-width: 960px) {
  body { font-size: 15.5px; }
  .wrap { padding: 0 24px; }
  .page-h h1 { font-size: 30px; }
  .sec { padding: 22px 24px; }
  .cols { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
  .side { margin-top: 0; position: sticky; top: 16px; }
  .side .sec { margin-bottom: 14px; }
  .names-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .links-grid { grid-template-columns: repeat(3, 1fr); }
  .f-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .f-item.full { grid-column: 1 / -1; }
  .wg-grid { grid-template-columns: repeat(5, 1fr); }
  .bz-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .root-cards { grid-template-columns: repeat(3, 1fr); }
  .hot-words { columns: 2; }
  .hd-in { padding: 10px 24px; }
  .hd-brand { font-size: 23px; }
  .hd-nav a { padding: 8px 16px; font-size: 15px; }
}

@media (max-width: 400px) {
  .names-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .nm-name { font-size: 20px; }
  .bz-grid { gap: 5px; }
  .bz-col .gz { font-size: 18px; }
}
