/* sites/www.nvrenshuo.com/styles/style.css —— 本站主题（岁数通 · 年龄工具站）
   设计基调：奶油白纸感底 + 珊瑚红主色 + 墨绿数字点缀，圆角卡片与柔和投影，
   大号等宽数字排版；中文现代无衬线，像一本温柔而严谨的生活手册。 */

:root {
  --bg: #fff8f4;
  --bg-2: #fdf1ea;
  --card: #ffffff;
  --ink: #2c2622;
  --ink-2: #6f6259;
  --ink-3: #9a8d84;
  --line: #f2e3da;
  --line-2: #e8d5ca;
  --brand: #e05a45;
  --brand-dark: #c2452f;
  --brand-soft: #fdece7;
  --green: #2f6f62;
  --green-soft: #e9f3f0;
  --gold: #b8860b;
  --gold-soft: #fdf4e0;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 14px rgba(120, 78, 62, .07);
  --shadow-2: 0 6px 26px rgba(120, 78, 62, .10);
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 0%, #fff1e9 0, rgba(255, 241, 233, 0) 42%),
    radial-gradient(circle at 92% 8%, #fdeaf1 0, rgba(253, 234, 241, 0) 38%);
  background-repeat: no-repeat;
  line-height: 1.78;
  font-size: 16px;
  overflow-x: hidden;
}

a { color: var(--brand-dark); text-decoration: none; }
main a, .ft a { text-decoration: underline; text-decoration-color: rgba(224, 90, 69, .35); text-underline-offset: 3px; }
main a:hover, .ft a:hover { color: var(--brand); text-decoration-color: var(--brand); }
a.btn, .hd a, .nf-links a, .toolcard, .zx-item, .yearcell { text-decoration: none; }

img { max-width: 100%; height: auto; display: block; }
table { border-collapse: collapse; width: 100%; }

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

/* ---------- 头部 ---------- */
.hd {
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(160%) blur(8px);
}
.hd-top {
  max-width: 880px; margin: 0 auto; padding: 10px 16px 6px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.logo { display: flex; align-items: center; gap: 9px; color: var(--ink); }
.logo-mark {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px;
  background: linear-gradient(150deg, var(--brand), #f08a63);
  color: #fff; font-size: 19px; font-weight: 700; line-height: 34px; text-align: center;
  box-shadow: 0 3px 10px rgba(224, 90, 69, .3);
}
.logo-txt { font-size: 17px; font-weight: 700; letter-spacing: .5px; display: flex; flex-direction: column; line-height: 1.15; }
.logo-txt em { font-style: normal; font-size: 11px; font-weight: 400; color: var(--ink-3); letter-spacing: 1px; }
.hd-tag { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.hd-nav {
  display: flex; gap: 6px; overflow-x: auto; white-space: nowrap;
  max-width: 880px; margin: 0 auto; padding: 2px 16px 9px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.hd-nav::-webkit-scrollbar { display: none; }
.hd-nav a {
  font-size: 13.5px; color: var(--ink-2); padding: 4px 11px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid transparent;
}
.hd-nav a:hover { color: var(--brand-dark); background: var(--brand-soft); border-color: #f6d3c9; }

/* ---------- 主体 ---------- */
main { padding: 20px 0 8px; }
section + section { margin-top: 22px; }
h1 { font-size: 25px; line-height: 1.35; letter-spacing: .3px; }
h2 {
  font-size: 18.5px; line-height: 1.5; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
h2::before {
  content: ''; width: 4px; height: 17px; border-radius: 2px; flex: 0 0 4px;
  background: linear-gradient(180deg, var(--brand), #f0a07a);
}
h3 { font-size: 16px; margin-bottom: 6px; }
p { margin-bottom: 10px; }
.lead { color: var(--ink-2); font-size: 15px; }

.crumbs { font-size: 12.5px; color: var(--ink-3); margin-bottom: 12px; }
.crumbs a { color: var(--ink-2); }
.crumbs span { margin: 0 5px; color: var(--line-2); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 14px; }
.card-soft { background: linear-gradient(160deg, #fffdfc, var(--bg-2)); }

/* ---------- 答案区（首屏给结论） ---------- */
.hero {
  background: linear-gradient(155deg, #fff 0%, #fff4ef 62%, #fdeee9 100%);
  border: 1px solid #f6dcd2; border-radius: var(--radius);
  padding: 18px 16px; box-shadow: var(--shadow-2);
}
.hero-h1 { font-size: 25px; line-height: 1.34; margin-bottom: 8px; }
.hero-sub { color: var(--ink-2); font-size: 14.5px; margin-bottom: 12px; }
.hero-sub b { color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.answer {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px;
}
.answer .ans {
  flex: 1 1 128px; min-width: 118px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 12px;
}
.answer .ans-k { font-size: 12.5px; color: var(--ink-3); margin-bottom: 2px; }
.answer .ans-v { font-size: 25px; font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; line-height: 1.24; }
.answer .ans-v small { font-size: 13px; font-weight: 500; color: var(--ink-2); margin-left: 2px; }
.answer .ans-v.hot { color: var(--brand); }
.answer .ans-x { font-size: 12.5px; color: var(--ink-2); }

/* ---------- 统计小卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.stat-k { font-size: 12.5px; color: var(--ink-3); }
.stat-v { font-size: 19px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-v small { font-size: 12px; font-weight: 400; color: var(--ink-2); }
.stat-v.g { color: var(--green); }
.stat-v.b { color: var(--brand); }

/* ---------- 表格 ----------
   两条原则：
   ① 默认允许换行——长文本列（法律依据/说明等）不再把表格撑到容器之外（PC 曾被裁切）；
   ② 手机端两种模式：数据密集表 → 首列冻结 + 横向滑动；长文本表加 .tbl-stack → 堆叠卡片。 */
.tbl-box {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
table.tbl { font-size: 14px; min-width: 100%; }
table.tbl th, table.tbl td {
  padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums; vertical-align: top;
  white-space: normal; overflow-wrap: anywhere;
}
table.tbl thead th {
  background: var(--bg-2); color: var(--ink-2); font-weight: 600; font-size: 13px;
  position: sticky; top: 0; z-index: 1;
}
table.tbl tbody tr:nth-child(even) { background: #fffcfb; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl td.num, table.tbl th.num { text-align: right; }
table.tbl td.nw, table.tbl th.nw { white-space: nowrap; }
table.tbl td.wrapcell, table.tbl th.wrapcell { white-space: normal; overflow-wrap: anywhere; }
table.tbl tr.on { background: var(--brand-soft) !important; }
table.tbl tr.on td { font-weight: 600; }
table.tbl a { color: var(--brand-dark); }
.tbl-note { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }

/* 手机端 · 数据密集表：列不折断（保持可读的行高）+ 首列冻结 + 容器内横向滑动
   （页面本身不产生横向滚动；长文本表用 .tbl-stack 走下面的堆叠卡片，不需要滑动） */
@media (max-width: 720px) {
  table.tbl { font-size: 13px; }
  table.tbl th, table.tbl td { padding: 7px 8px; }
  table.tbl:not(.tbl-stack) th, table.tbl:not(.tbl-stack) td { white-space: nowrap; }
  /* 标记了 .wrapcell 的长文本列（生肖区间、公历区间、春节等）仍允许换行，能把表格压窄、少滑动 */
  table.tbl:not(.tbl-stack) td.wrapcell, table.tbl:not(.tbl-stack) th.wrapcell { white-space: normal; }
  .tbl-box:has(table.tbl:not(.tbl-stack)) { position: relative; }
  .tbl-box table.tbl:not(.tbl-stack) td:first-child,
  .tbl-box table.tbl:not(.tbl-stack) th:first-child {
    position: sticky; left: 0; z-index: 2; background: #fff;
    box-shadow: 1px 0 0 var(--line);
  }
  .tbl-box table.tbl:not(.tbl-stack) thead th:first-child { background: var(--bg-2); z-index: 3; }
  .tbl-box table.tbl:not(.tbl-stack) tbody tr:nth-child(even) td:first-child { background: #fffcfb; }
  .tbl-box table.tbl:not(.tbl-stack) tbody tr.on td:first-child { background: var(--brand-soft); }
}

/* 手机端「堆叠卡片」表：一行 = 一张卡，td 用 data-th 显示列名，长文本表不再需要横向滑动 */
@media (max-width: 720px) {
  table.tbl-stack { display: block; font-size: 14px; }
  table.tbl-stack thead { display: none; }
  table.tbl-stack tbody, table.tbl-stack tr, table.tbl-stack td { display: block; width: auto; }
  table.tbl-stack tbody tr {
    padding: 11px 13px 12px; border-bottom: 1px solid var(--line); background: #fff;
  }
  table.tbl-stack tbody tr:nth-child(even) { background: #fffcfb; }
  table.tbl-stack tbody tr:last-child { border-bottom: 0; }
  table.tbl-stack td {
    border: 0; padding: 2px 0; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 9px;
  }
  table.tbl-stack td::before {
    content: attr(data-th); color: var(--ink-3); font-size: 12.5px; line-height: 1.75;
  }
  table.tbl-stack td:first-child {
    display: block; font-size: 15.5px; font-weight: 700; color: var(--ink); padding-bottom: 5px;
  }
  table.tbl-stack td:first-child::before { content: none; }
  table.tbl-stack td.num { text-align: left; }
}

/* ---------- 计算器表单 ---------- */
.calc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
.calc-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-size: 13px; color: var(--ink-2); }
.field select, .field input {
  font: inherit; font-size: 15px; color: var(--ink); background: #fff;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 9px 10px; width: 100%; min-width: 0; appearance: none;
}
.field input[type="date"] { appearance: auto; }
.field select:focus, .field input:focus { outline: 2px solid #f6cdc2; border-color: var(--brand); }
.calc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.btn {
  display: inline-block; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  white-space: nowrap;
  background: linear-gradient(150deg, var(--brand), #ef7f5f); color: #fff;
  border: 0; border-radius: 999px; padding: 10px 22px; box-shadow: 0 4px 14px rgba(224, 90, 69, .28);
}
.btn:hover { color: #fff; filter: brightness(1.04); }
.btn-ghost {
  background: #fff; color: var(--brand-dark); border: 1px solid #f3cfc4;
  box-shadow: none;
}
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-dark); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.quick button {
  font: inherit; font-size: 13.5px; cursor: pointer; color: var(--ink-2);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 14px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
}
.quick button:hover { color: var(--brand-dark); background: var(--brand-soft); border-color: #f3cfc4; }

/* ---------- 强调 / 提示 ---------- */
.hl { color: var(--brand-dark); font-weight: 700; font-variant-numeric: tabular-nums; }
.hl-g { color: var(--green); font-weight: 700; font-variant-numeric: tabular-nums; }
.num-big { font-size: 30px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; line-height: 1.2; }
.tag {
  display: inline-block; font-size: 12px; color: var(--green); background: var(--green-soft);
  border-radius: 999px; padding: 1px 9px; margin-right: 6px;
}
.tag.warm { color: var(--brand-dark); background: var(--brand-soft); }
.tag.gold { color: var(--gold); background: var(--gold-soft); }
.note {
  font-size: 13px; color: var(--ink-2); background: #fffaf7;
  border-left: 3px solid var(--line-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 9px 12px;
}
.note b { color: var(--brand-dark); }
.warn { border-left-color: #f0c07a; background: var(--gold-soft); }

ul.plain, ol.plain { padding-left: 20px; margin-bottom: 10px; }
ul.plain li, ol.plain li { margin-bottom: 5px; }
ul.tick { list-style: none; padding-left: 0; }
ul.tick li { padding-left: 20px; position: relative; margin-bottom: 6px; }
ul.tick li::before { content: '·'; position: absolute; left: 6px; color: var(--brand); font-weight: 700; }

/* ---------- FAQ ---------- */
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 13px; margin-bottom: 8px;
}
.faq details[open] { border-color: #f3cfc4; box-shadow: var(--shadow); }
.faq summary { font-weight: 600; font-size: 15px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '＋'; float: right; color: var(--brand); font-weight: 400; }
.faq details[open] summary::after { content: '－'; }
.faq .faq-a { font-size: 14.5px; color: var(--ink-2); padding-top: 7px; }
.faq .faq-a p:last-child { margin-bottom: 0; }

/* ---------- 内部链接块 ---------- */
.links-row { display: flex; flex-wrap: wrap; gap: 8px; }
.links-row a {
  font-size: 13.5px; color: var(--ink-2); background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 12px; text-decoration: none;
}
.links-row a:hover { color: var(--brand-dark); background: var(--brand-soft); border-color: #f3cfc4; }
.links-row a.on { color: #fff; background: var(--brand); border-color: var(--brand); }

.toolcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.toolcard {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; box-shadow: var(--shadow);
}
.toolcard:hover { border-color: #f3cfc4; box-shadow: var(--shadow-2); }
.toolcard b { display: block; font-size: 15px; color: var(--ink); }
.toolcard span { font-size: 12.5px; color: var(--ink-3); }

.yeargrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 7px; }
.yearcell {
  display: block; text-align: center; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 7px 4px; color: var(--ink);
}
.yearcell:hover { border-color: #f3cfc4; background: var(--brand-soft); }
.yearcell b { display: block; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.yearcell span { font-size: 11.5px; color: var(--ink-3); }

/* ---------- 配图 ---------- */
.fig-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fig-grid figure { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px; }
.fig-grid img { width: 100%; border-radius: 8px; }
.fig-grid figcaption { font-size: 12px; color: var(--ink-3); text-align: center; padding-top: 5px; }
.fig-one img { border-radius: var(--radius-sm); border: 1px solid var(--line); }

/* ---------- 页脚 ---------- */
.ft { margin-top: 34px; background: #fff; border-top: 1px solid var(--line); }
.ft-in { max-width: 880px; margin: 0 auto; padding: 20px 16px 26px; }
.ft-title { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; letter-spacing: .5px; }
.ft-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ft-nav a {
  font-size: 13px; color: var(--ink-2); background: var(--bg-2);
  border-radius: 999px; padding: 3px 11px; text-decoration: none;
}
.ft-nav a:hover { color: var(--brand-dark); background: var(--brand-soft); }
.ft-note { font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }
.ft-copy { font-size: 12px; color: var(--ink-3); margin-top: 8px; }

/* ---------- 404 ---------- */
.nf { text-align: center; padding: 40px 8px 20px; }
.nf-code { font-size: 62px; font-weight: 700; color: var(--brand); line-height: 1; font-variant-numeric: tabular-nums; }
.nf h1 { font-size: 21px; margin: 10px 0 8px; }
.nf-lead { color: var(--ink-2); font-size: 14.5px; }
.nf-links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 16px 0 20px; }
.nf-links a {
  font-size: 13.5px; background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 14px; color: var(--ink-2);
}
.nf-links a:hover { color: var(--brand-dark); background: var(--brand-soft); border-color: #f3cfc4; }

/* ---------- 大屏 ---------- */
@media (min-width: 720px) {
  body { font-size: 16.5px; }
  h1 { font-size: 29px; }
  .hero-h1 { font-size: 29px; }
  h2 { font-size: 20px; }
  .answer .ans-v { font-size: 27px; }
  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .toolcards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fig-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card { padding: 20px; }
  .hero { padding: 22px 20px; }
  .calc { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .calc-2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  main { padding: 26px 0 8px; }
}

@media (max-width: 420px) {
  .calc, .calc-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc .field:last-child, .calc-2 .field:last-child { grid-column: 1 / -1; }
  .answer .ans { min-width: 132px; }
}
