:root {
  --deep: #162A23;
  --deep-2: #1D362C;
  --deep-3: #254438;
  --paper: #F7F1E2;
  --paper-2: #FBF6EA;
  --card: #FFFCF4;
  --ink: #232B26;
  --ink-2: #5C655C;
  --ink-3: #929A8E;
  --red: #B23A2E;
  --red-dark: #8E2B21;
  --gold: #C9A45C;
  --gold-light: #E8CF98;
  --jade: #2E6A55;
  --line: #E5DAC0;
  --line-2: #D6C6A3;
  --radius: 14px;
  --serif: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

[hidden] { display: none !important; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--paper); color: var(--ink); font-size: 15px; line-height: 1.75; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3, h4, .logo, .btn { font-family: var(--serif); font-weight: 600; }
a { color: var(--red); text-decoration: none; }

/* ---------- 通用 ---------- */
.section { padding: 88px 0; position: relative; }
.section-alt { background: #F1E9D5; }
.section-paper { background: var(--paper-2); }
.section-head { text-align: center; margin-bottom: 48px; }
.section-kicker {
  display: inline-block; font-size: 11.5px; letter-spacing: 3px; color: var(--red);
  border: 1px solid var(--line-2); border-radius: 20px; padding: 4px 18px;
  background: rgba(255, 252, 244, .7); margin-bottom: 16px;
}
.section-head h2 { font-size: 32px; letter-spacing: 3px; }
.section-head h2::after { content: ""; display: block; width: 46px; height: 3px; background: var(--gold); margin: 16px auto 0; border-radius: 2px; }
.section-head p { color: var(--ink-2); margin-top: 14px; font-size: 14.5px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: 0 4px 20px rgba(35, 43, 38, .05); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; cursor: pointer; font-size: 15px; letter-spacing: 1.5px; border-radius: 10px; padding: 12px 32px; transition: transform .15s, background .15s, box-shadow .15s; }
.btn em { font-style: normal; font-family: var(--sans); }
.btn:hover { transform: translateY(-2px); }
.btn-lg { padding: 15px 44px; font-size: 17px; }
.btn-sm { padding: 8px 20px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 6px 16px rgba(178, 58, 46, .22); }
.btn-primary:hover { background: var(--red-dark); }
.btn-primary:disabled { background: #C9928A; cursor: not-allowed; transform: none; }
.btn-gold { background: var(--gold); color: #223027; box-shadow: 0 8px 22px rgba(201, 164, 92, .3); }
.btn-gold:hover { background: var(--gold-light); }
.btn-outline { background: transparent; border-color: rgba(232, 207, 152, .55); color: var(--gold-light); }
.btn-outline:hover { border-color: var(--gold-light); background: rgba(232, 207, 152, .08); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--ink-3); color: var(--ink); }

/* ---------- 顶栏 ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: rgba(247, 241, 226, .95); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 12px; }
/* 顶栏元素一律不换行不压缩：LOGO / 人气 / 导航 / 按钮必须同处一行 */
.logo { flex: none; display: flex; align-items: center; gap: 10px; font-size: 20px; color: var(--ink); letter-spacing: 2px; white-space: nowrap; }
.logo-mark { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; background: var(--red); color: #fff; border-radius: 6px; font-size: 19px; box-shadow: 0 3px 8px rgba(178, 58, 46, .25); }
.logo-dot { color: var(--gold); }
.nav { flex: none; margin-left: auto; white-space: nowrap; }
.nav a { color: var(--ink-2); margin-left: 18px; font-size: 14px; transition: color .15s; }
.nav a:hover { color: var(--red); }
.header-cta { flex: none; margin-left: 8px; white-space: nowrap; }

/* 顶栏人气：LOGO 右侧两行小字，常驻吸顶 */
.header-proof { flex: 0 0 216px; min-width: 0; padding-left: 18px; border-left: 1px solid var(--line-2); }
.hp-count { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.hp-unit-short { display: none; }
.hp-count b { font-family: var(--serif); font-size: 16px; font-weight: 600; color: var(--red-dark); font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.hp-feed { margin-top: 1px; font-size: 11px; line-height: 1.5; color: #626B61; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .3s; }
.hp-feed.is-out { opacity: 0; }
.hp-feed b { font-weight: 600; color: var(--ink-2); }
.sp-feed-time { font-variant-numeric: tabular-nums; }

/* ---------- 首屏 ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--deep) 0%, var(--deep-2) 55%, var(--deep-3) 100%); color: #F6EEDC; padding: 72px 0 0; }
.hero-rays { position: absolute; inset: -40% -10% auto -10%; height: 180%; background: repeating-conic-gradient(from 0deg at 50% 45%, rgba(232, 207, 152, .055) 0deg 1deg, transparent 1deg 15deg); pointer-events: none; }
.hero-cloud { position: absolute; left: 0; right: 0; bottom: 60px; color: rgba(232, 207, 152, .22); height: 120px; pointer-events: none; }
.hero-cloud svg { width: 100%; height: 100%; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 40px; padding-bottom: 64px; }
.eyebrow { font-size: 12px; letter-spacing: 3px; color: var(--gold-light); display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.eyebrow i { display: block; width: 28px; height: 1px; background: var(--gold); }
.hero h1 { font-size: 46px; line-height: 1.45; letter-spacing: 4px; font-weight: 600; }
.hero h1 span { color: var(--gold-light); }
.hero-sub { color: #C9D2C6; font-size: 15px; line-height: 2; margin: 22px 0 34px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 52px; padding-top: 26px; border-top: 1px solid rgba(232, 207, 152, .22); }
.hero-stats div { border-left: 2px solid rgba(232, 207, 152, .35); padding-left: 12px; }
.hero-stats b { display: block; font-family: var(--serif); font-size: 26px; color: var(--gold-light); line-height: 1.3; }
.hero-stats span { font-size: 12px; color: #AEBBAE; letter-spacing: 1px; }
.hero-visual { display: flex; justify-content: center; }
.hero-chart-wrap { position: relative; width: 100%; max-width: 400px; }
#heroChart { width: 100%; height: auto; display: block; filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .28)); }
.hero-orbit { transform-origin: 210px 210px; animation: tickspin 80s linear infinite reverse; }
.hero-chart-caption { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); background: rgba(22, 42, 35, .9); border: 1px solid rgba(232, 207, 152, .4); color: var(--gold-light); font-size: 12px; letter-spacing: 3px; padding: 6px 18px; border-radius: 20px; white-space: nowrap; }
.hero-bottom-bar { position: relative; background: rgba(10, 24, 19, .45); border-top: 1px solid rgba(232, 207, 152, .16); padding: 14px 0; }
.hero-bottom-bar .wrap { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; }
.hero-bottom-bar span { font-size: 12.5px; letter-spacing: 3px; color: #C8D2C4; }
.hero-bottom-bar i { width: 5px; height: 5px; border: 1px solid var(--gold); transform: rotate(45deg); }

/* ---------- 出生年份速查 ---------- */
.year-lookup { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line-2); border-radius: 18px; padding: 26px 30px; margin-bottom: 30px; box-shadow: 0 8px 28px rgba(35, 43, 38, .06); }
.year-lookup::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(var(--gold), var(--red)); }
.yl-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.yl-kicker { font-size: 11px; letter-spacing: 2.5px; color: var(--red); }
.yl-copy h3 { font-size: 20px; margin-top: 6px; letter-spacing: 1px; }
.yl-copy p { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.yl-search { display: flex; gap: 10px; }
.yl-search input { width: 196px; border: 1px solid var(--line-2); background: var(--paper-2); border-radius: 9px; padding: 11px 14px; font-size: 15px; color: var(--ink); font-family: var(--sans); }
.yl-search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 164, 92, .16); }
.yl-search .btn { padding: 11px 24px; font-size: 14px; letter-spacing: 1px; }
.yl-decades { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line-2); }
.yl-chip { display: flex; flex-direction: column; align-items: center; gap: 1px; width: 100%; min-width: 0; padding: 7px 8px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; transition: background .15s, border-color .15s; }
.yl-chip b { font-family: var(--serif); font-size: 14px; font-weight: 600; color: var(--ink); }
.yl-chip small { font-size: 10px; color: var(--ink-3); }
.yl-chip:hover { border-color: var(--gold); background: #FFF8E8; }
.yl-chip.active, .yl-chip.active:hover { background: var(--red); border-color: var(--red); }
.yl-chip.active b, .yl-chip.active small { color: #fff; }
.yl-grid-wrap { margin-top: 18px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 18px; }
.yl-grid-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.yl-grid-head b { font-family: var(--serif); font-size: 16px; color: var(--red); }
.yl-grid-tip { font-size: 12px; color: var(--ink-3); }
.yl-close { margin-left: auto; border: none; background: none; color: var(--ink-3); cursor: pointer; font-size: 12.5px; }
.yl-close:hover { color: var(--red); }
.yl-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; }
.yl-cell { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 9px 4px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); cursor: pointer; transition: border-color .15s, transform .15s, background .15s; }
.yl-cell b { font-size: 13.5px; color: var(--ink); font-weight: 600; }
.yl-cell span { font-family: var(--serif); font-size: 17px; color: var(--jade); line-height: 1.3; }
.yl-cell small { font-size: 10px; color: var(--ink-3); }
.yl-cell:hover { border-color: var(--gold); transform: translateY(-2px); }
.yl-cell.active, .yl-cell.active:hover { background: var(--red); border-color: var(--red); box-shadow: 0 5px 14px rgba(178, 58, 46, .24); transform: none; }
.yl-cell.active b, .yl-cell.active span, .yl-cell.active small { color: #fff; }
.yl-result { margin-top: 16px; background: linear-gradient(100deg, var(--deep-2), var(--deep-3)); color: #F5EBD5; border-radius: 10px; padding: 13px 18px; font-size: 14px; }
.yl-result b { color: var(--gold-light); font-family: var(--serif); font-size: 18px; }
.yl-result.error { background: #FBEDEA; color: var(--red-dark); border: 1px solid #E7C5BE; }
.yl-note { margin-top: 14px; font-size: 11.5px; color: var(--ink-3); line-height: 1.8; }

/* ---------- 生肖环形图 ---------- */
.zodiac-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 32px; align-items: stretch; }
.zodiac-wheel-card { position: relative; background: radial-gradient(circle at 50% 45%, #203A30 0%, #14261F 70%, #102019 100%); border: 1px solid rgba(201, 164, 92, .35); border-radius: 20px; padding: 18px; box-shadow: 0 18px 44px rgba(20, 38, 31, .22); }
.wheel-corner { position: absolute; width: 20px; height: 20px; border-color: var(--gold); opacity: .7; }
.wheel-corner.tl { top: 12px; left: 12px; border-top: 1px solid; border-left: 1px solid; }
.wheel-corner.tr { top: 12px; right: 12px; border-top: 1px solid; border-right: 1px solid; }
.wheel-corner.bl { bottom: 12px; left: 12px; border-bottom: 1px solid; border-left: 1px solid; }
.wheel-corner.br { bottom: 12px; right: 12px; border-bottom: 1px solid; border-right: 1px solid; }
#zodiacSvg { width: 100%; height: auto; display: block; }
#zodiacPointer { transform-origin: 280px 280px; transition: transform .7s cubic-bezier(.22, .8, .26, 1); }
#zodiacTicks { transform-origin: 280px 280px; animation: tickspin 90s linear infinite; }
@keyframes tickspin { to { transform: rotate(360deg); } }
.z-node { cursor: pointer; }
.z-node-bg { fill: rgba(255, 252, 244, .055); stroke: rgba(201, 164, 92, .38); stroke-width: 1; transition: fill .3s, stroke .3s, r .3s; }
.z-node-animal { fill: #E9DCC0; font-family: var(--serif); font-size: 20px; text-anchor: middle; dominant-baseline: central; transition: fill .3s, font-size .3s; }
.z-node-branch { fill: #9FB0A0; font-family: var(--serif); font-size: 10px; text-anchor: middle; dominant-baseline: central; transition: fill .3s; }
.z-node.active .z-node-bg { fill: var(--red); stroke: var(--gold-light); stroke-width: 2; }
.z-node.active .z-node-animal { fill: #FFF6E2; font-size: 23px; }
.z-node.active .z-node-branch { fill: var(--gold-light); }
.z-node:hover .z-node-bg { fill: rgba(201, 164, 92, .28); stroke: var(--gold-light); }
.z-node.active:hover .z-node-bg { fill: var(--red); }
.z-node-halo { fill: none; stroke: var(--gold); stroke-width: 1; opacity: 0; transition: opacity .3s, r .3s; }
.z-node.active .z-node-halo { opacity: .8; }
.zc-animal { fill: #F4E7C8; font-family: var(--serif); font-size: 60px; text-anchor: middle; dominant-baseline: central; }
.zc-branch { fill: var(--gold-light); font-family: var(--serif); font-size: 15px; letter-spacing: 4px; text-anchor: middle; }
.zc-element { fill: #B8C6B6; font-size: 12px; letter-spacing: 2px; text-anchor: middle; }
.zc-line { stroke: rgba(201, 164, 92, .5); stroke-width: 1; }
#zodiacCenterText { animation: zcIn .45s ease; }
@keyframes zcIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.wheel-controls { display: flex; justify-content: center; gap: 10px; margin-top: 4px; }
.wheel-btn { background: rgba(255, 252, 244, .06); border: 1px solid rgba(201, 164, 92, .4); color: #E4D8BC; border-radius: 8px; padding: 8px 16px; cursor: pointer; font-size: 13px; transition: background .15s; }
.wheel-btn:hover { background: rgba(201, 164, 92, .22); }
.wheel-btn-main { background: var(--gold); color: #223027; border-color: var(--gold); font-weight: 600; }
.wheel-btn-main:hover { background: var(--gold-light); }
.wheel-hint { text-align: center; color: #93A594; font-size: 12px; margin-top: 10px; letter-spacing: 1px; }

.zodiac-info { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 34px 36px; box-shadow: 0 10px 30px rgba(35, 43, 38, .07); display: flex; flex-direction: column; }
.z-kicker { font-size: 12px; letter-spacing: 3px; color: var(--ink-3); }
.z-kicker span { margin-left: 8px; font-size: 10px; color: var(--gold); }
.z-title { display: flex; align-items: baseline; gap: 16px; margin-top: 8px; }
.z-title #zAnimal { font-family: var(--serif); font-size: 68px; color: var(--red); line-height: 1.2; }
.z-title em { font-style: normal; font-family: var(--serif); font-size: 22px; color: var(--gold); border: 1px solid var(--line-2); border-radius: 50%; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; }
.z-divider { height: 1px; background: linear-gradient(90deg, var(--gold), rgba(201, 164, 92, .1)); margin: 16px 0 20px; }
.z-meta-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; margin-bottom: 22px; }
.z-meta-row > div { background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.z-label { display: block; font-size: 12px; color: var(--ink-3); letter-spacing: 1px; }
.z-element { font-family: var(--serif); font-size: 22px; color: var(--jade); }
.z-years { font-size: 15px; color: var(--ink); letter-spacing: .5px; }
.z-years-box { margin: -4px 0 22px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--paper-2); }
.z-years-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 12px; color: var(--ink-3); letter-spacing: .5px; }
.z-years-toggle { border: none; background: none; color: var(--red); cursor: pointer; font-size: 12px; white-space: nowrap; padding: 2px 0; }
.z-years-toggle:hover { text-decoration: underline; }
.z-years-quick, .z-years-panel { display: flex; flex-wrap: wrap; gap: 7px; }
.z-year-chip { border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2); border-radius: 7px; padding: 5px 11px; font-size: 13px; cursor: pointer; transition: background .15s, border-color .15s; }
.z-year-chip:hover { border-color: var(--gold); }
.z-year-chip.active { background: var(--red); border-color: var(--red); color: #fff; }
.select:disabled { opacity: .5; cursor: not-allowed; }
.z-years-panel { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.z-era { width: 100%; display: flex; align-items: flex-start; gap: 10px; }
.z-era > b { flex: 0 0 76px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); padding-top: 6px; letter-spacing: .5px; }
.z-era-years { display: flex; flex-wrap: wrap; gap: 7px; }
.z-block { margin-bottom: 20px; }
.z-block-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.z-block p { color: var(--ink-2); font-size: 14px; }
.z-block-note { color: var(--ink-3) !important; font-size: 12px !important; margin-top: 6px; }
.ic { display: inline-block; width: 16px; height: 16px; border: 1.5px solid var(--red); border-radius: 4px; position: relative; }
.ic-star { border-radius: 50%; }
.ic-star::after { content: ""; position: absolute; inset: 3px; border: 1px solid var(--red); border-radius: 50%; }
.ic-pen { transform: rotate(45deg); border-radius: 2px; }
.ic-ring { border-radius: 50%; }
.ic-ring::after { content: ""; position: absolute; inset: 4px; border: 1px solid var(--red); border-radius: 50%; }
.ic-clock, .ic-book, .ic-user { border-radius: 3px; }
.ic-user::after, .ic-clock::after, .ic-book::after { content: ""; position: absolute; left: 3px; right: 3px; top: 6px; height: 1px; background: var(--red); }
.z-lucky { display: flex; flex-wrap: wrap; gap: 8px; }
.z-lucky span { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; padding: 6px 10px; border: 1px solid var(--line-2); background: var(--paper-2); border-radius: 8px; font-family: var(--serif); font-size: 18px; color: var(--ink); }
.z-lucky span.active { background: var(--red); border-color: var(--red); color: #fff; }
.z-pairs { display: flex; gap: 12px; flex-wrap: wrap; }
.z-pairs span { font-size: 13px; color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; }
.z-pairs b { color: var(--red); font-family: var(--serif); font-size: 15px; margin-left: 6px; }
.zodiac-info .btn { margin-top: auto; }
.z-disclaimer { text-align: center; color: var(--ink-3); font-size: 11.5px; margin-top: 12px; }

/* ---------- 起名方式 · 五行相生相克 ---------- */
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-card { cursor: pointer; position: relative; }
.mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.mc-inner { display: block; position: relative; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 14px 16px 13px; background: var(--paper-2); transition: border-color .15s, background .15s, box-shadow .15s; }
.mc-inner:hover { border-color: var(--gold); }
.mode-card input:checked + .mc-inner { border-color: var(--red); background: #FFF6EA; box-shadow: 0 4px 14px rgba(178, 58, 46, .12); }
.mode-card input:focus-visible + .mc-inner { outline: 2px solid var(--gold); outline-offset: 2px; }
.mc-inner::after { content: "✓"; position: absolute; right: 12px; top: 11px; width: 18px; height: 18px; border-radius: 50%; background: var(--red); color: #fff; font-size: 12px; display: none; align-items: center; justify-content: center; }
.mode-card input:checked + .mc-inner::after { display: flex; }
.mc-icon { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 8px; color: #FFF7E4; font-family: var(--serif); font-size: 17px; font-style: normal; }
.mc-wx { background: var(--jade); }
.mc-sj { background: #8A6A32; }
.mc-inner b { display: block; font-family: var(--serif); font-size: 17px; margin-top: 8px; }
.mc-inner small { display: block; font-size: 12px; color: var(--ink-2); margin-top: 2px; line-height: 1.6; }
.mc-inner em { display: inline-block; font-style: normal; font-size: 11px; color: var(--red); margin-top: 8px; letter-spacing: .5px; }
.mode-panel { margin: 18px 0 4px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(140deg, #FFFDF7, #FBF4E4); padding: 16px 18px; }
.mp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.mp-head b { font-family: var(--serif); font-size: 17px; color: var(--ink); }
.mp-head span { font-size: 12px; color: var(--ink-3); margin-left: 10px; }
.mp-tabs { display: flex; gap: 6px; }
.mp-tabs button { border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2); border-radius: 20px; padding: 5px 14px; font-size: 12px; cursor: pointer; transition: background .15s, color .15s; }
.mp-tabs button:hover { border-color: var(--gold); }
.mp-tabs button.active, .mp-tabs button.active:hover { background: var(--red); border-color: var(--red); color: #fff; }
.mp-body { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 16px; align-items: start; }
.wx-chart { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
#wxDiagram { width: 100%; height: auto; display: block; }
.wx-chart-hint { text-align: center; font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.wx-node { cursor: pointer; }
.wx-node-bg { stroke: #FFF9EC; stroke-width: 2; transition: filter .15s; }
.wx-node-halo { fill: none; stroke: var(--gold); stroke-width: 1.5; opacity: 0; transition: opacity .2s; }
.wx-node.active .wx-node-halo { opacity: .9; }
.wx-node:hover .wx-node-bg { filter: brightness(1.12); }
.wx-sheng-arc, .wx-ke-arc { transition: opacity .2s, stroke-width .2s; }
.wx-sheng-arc.dim, .wx-ke-arc.dim { opacity: .2; }
.wx-arc-label { font-family: var(--serif); }
.wx-d-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.wx-d-head i { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 8px; color: #fff; font-style: normal; font-family: var(--serif); font-size: 19px; }
.wx-d-head span { font-size: 13px; color: var(--ink-2); }
.wx-d-rel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.wx-d-rel div { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 7px 6px; text-align: center; }
.wx-d-rel small { display: block; font-size: 10px; color: var(--ink-3); }
.wx-d-rel b { display: block; font-family: var(--serif); font-size: 19px; color: var(--red); line-height: 1.3; }
.wx-d-rel em { display: block; font-style: normal; font-size: 10px; color: var(--ink-3); }
.wx-d-tip { background: #FFF6E6; border-left: 3px solid var(--gold); border-radius: 6px; padding: 8px 11px; font-size: 12px; color: var(--ink-2); line-height: 1.8; margin-bottom: 10px; }
.wx-d-tip b { color: var(--red); }
.wx-d-list-title { font-size: 11.5px; color: var(--ink-3); letter-spacing: 1px; margin-bottom: 6px; }
.wx-d-list-title span { font-size: 10px; }
.wx-d-list { display: grid; grid-template-columns: 1fr; gap: 4px; }
.wx-rel-item { display: flex; flex-direction: column; align-items: flex-start; gap: 0; font-size: 11.5px; background: var(--card); border: 1px solid transparent; border-radius: 6px; padding: 4px 9px; line-height: 1.45; }
.wx-rel-item b { font-family: var(--serif); color: var(--ink); white-space: nowrap; font-size: 12px; }
.wx-rel-item span { color: var(--ink-3); font-size: 10.5px; }
.wx-rel-item.hit { border-color: var(--gold); background: #FFF8E8; }
.mp-note { margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line-2); font-size: 12px; color: var(--ink-2); line-height: 1.9; }
.mp-note b { color: var(--ink); }
.sj-list { display: grid; gap: 8px; }
.sj-quote { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 9px 13px; }
.sj-quote b { font-family: var(--serif); font-size: 14px; color: var(--jade); font-weight: 600; }
.sj-quote span { font-size: 11.5px; color: var(--ink-3); }

/* ---------- 起名表单 ---------- */
.form-layout { display: grid; grid-template-columns: .72fr 1.28fr; gap: 28px; align-items: stretch; }
.form-aside { position: relative; overflow: hidden; background: linear-gradient(150deg, var(--deep), var(--deep-3)); color: #EDE4CE; border-radius: var(--radius); padding: 38px 32px; }
.form-aside::after { content: ""; position: absolute; right: -70px; bottom: -70px; width: 220px; height: 220px; border: 1px solid rgba(232, 207, 152, .22); border-radius: 50%; box-shadow: 0 0 0 24px rgba(232, 207, 152, .05), 0 0 0 52px rgba(232, 207, 152, .04); }
.aside-seal { width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--gold); color: var(--gold-light); font-family: var(--serif); font-size: 26px; border-radius: 8px; margin-bottom: 24px; }
.form-aside h3 { font-size: 26px; line-height: 1.6; letter-spacing: 2px; color: #F6EBD2; }
.form-aside p { color: #B9C7B8; font-size: 13.5px; margin: 16px 0 26px; line-height: 2; }
.aside-list { list-style: none; position: relative; z-index: 1; }
.aside-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(232, 207, 152, .16); font-size: 13.5px; color: #DCD6C0; }
.aside-list i { font-style: normal; font-family: var(--serif); color: var(--gold-light); font-size: 14px; }
.aside-stamp { position: relative; z-index: 1; margin-top: 28px; font-size: 12px; letter-spacing: 3px; color: var(--gold-light); }
.form-card { padding: 34px 38px; }
.form-steps { display: flex; align-items: center; justify-content: space-between; background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 20px; margin-bottom: 28px; }
.fs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.fs i { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--line-2); font-style: normal; font-family: var(--serif); font-size: 13px; }
.fs.active { color: var(--red); font-weight: 600; }
.fs.active i { background: var(--red); border-color: var(--red); color: #fff; }
.fs-line { flex: 1; height: 1px; background: repeating-linear-gradient(90deg, var(--line-2) 0 5px, transparent 5px 10px); margin: 0 12px; }
.form-group-title { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 15px; color: var(--ink); border-left: 3px solid var(--red); padding-left: 10px; margin: 26px 0 18px; }
.form-group-title:first-of-type { margin-top: 0; }
.form-group-title small { font-family: var(--sans); font-size: 11.5px; color: var(--ink-3); margin-left: auto; }
.field { display: flex; margin-bottom: 18px; }
.label { width: 96px; flex-shrink: 0; text-align: right; padding-right: 18px; color: var(--ink-2); font-size: 14px; line-height: 42px; }
.control { flex: 1; min-width: 0; }
.input, .select { height: 42px; padding: 0 12px; font-size: 15px; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 8px; outline: none; font-family: var(--sans); transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(178, 58, 46, .1); }
.input { min-width: 200px; width: 240px; }
.input-sm { width: 110px; min-width: 0; }
.select { margin-right: 4px; }
.radio { display: inline-flex; align-items: center; margin-right: 22px; cursor: pointer; line-height: 42px; font-size: 14px; }
.radio input { margin-right: 6px; accent-color: var(--red); }
.radio b { font-weight: 600; color: var(--red); }
.hint { color: var(--ink-3); font-size: 12.5px; margin-top: 6px; }
.birth-control em { font-style: normal; color: var(--ink-2); font-size: 13px; margin-right: 10px; }
.form-error { background: #FBEFEC; color: var(--red-dark); border: 1px solid #EAD3CC; border-radius: 8px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 18px; }
.agree-hint { text-align: center; color: var(--ink-3); font-size: 12.5px; margin-top: 14px; }

/* ---------- 结果页 ---------- */
.result-card { max-width: 720px; margin: 0 auto; border-top: 4px solid var(--red); }
.result-head { text-align: center; margin-bottom: 8px; }
.result-head h3 { font-size: 24px; letter-spacing: 2px; }
.result-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--deep); color: var(--gold-light); border-radius: 20px; padding: 4px 14px; font-size: 12px; letter-spacing: 1px; margin-top: 10px; }
.result-badges { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.result-badges .result-badge:nth-child(2) { background: var(--red); color: #FFF3D9; }
.wx-reason { background: linear-gradient(120deg, #F3F7F1, #FBF7E9); border: 1px solid var(--line); border-left: 3px solid var(--jade); border-radius: 10px; padding: 14px 18px; margin-bottom: 20px; }
.wx-reason-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.wx-reason p { font-size: 13px; color: var(--ink-2); line-height: 1.9; }
.wx-reason p b { color: var(--red); }
.wx-chain { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.wx-chain span { color: #fff; border-radius: 6px; padding: 3px 12px; font-family: var(--serif); font-size: 15px; }
.wx-chain i { font-style: normal; font-size: 12px; color: var(--ink-3); }
.wx-chain b { font-size: 12.5px; color: var(--jade); font-weight: 600; }
.sj-intro { background: #F4F7F2; border: 1px dashed var(--line-2); border-radius: 10px; padding: 12px 16px; margin-bottom: 20px; font-size: 13px; color: var(--ink-2); text-align: center; }
.sj-intro b { color: var(--jade); }
.sj-item { border-left-color: var(--jade); }
.sj-origin { font-family: var(--serif); font-size: 14.5px; color: var(--jade); letter-spacing: 1px; }
.tag.src { background: #EDF3EC; border-color: #CFDFCC; color: var(--jade); font-family: var(--sans); font-size: 11.5px; }
.sj-seal { flex: 0 0 38px; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--jade); border-radius: 8px; color: var(--jade); font-family: var(--serif); font-size: 20px; }
.name-item.locked .sj-seal { opacity: .35; }
.result-sub { text-align: center; color: var(--ink-2); font-size: 13px; margin-bottom: 24px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.result-box { background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; }
.result-box .k { color: var(--ink-3); font-size: 12px; letter-spacing: 1px; }
.result-box .v { font-family: var(--serif); font-size: 19px; margin-top: 4px; letter-spacing: 2px; }
.wx-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.wx-name { width: 40px; color: var(--ink-2); font-size: 13px; font-family: var(--serif); }
.wx-bar { flex: 1; height: 10px; background: #EAE2CE; border-radius: 6px; overflow: hidden; }
.wx-bar i { display: block; height: 100%; border-radius: 6px; transition: width .6s; }
.wx-count { width: 46px; text-align: right; color: var(--ink-2); font-size: 13px; }
.name-list { margin-top: 24px; }
.name-item { display: flex; align-items: center; gap: 16px; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 10px; padding: 14px 18px; margin-bottom: 12px; background: #fff; transition: box-shadow .15s, transform .15s; }
.name-item:hover { box-shadow: 0 6px 18px rgba(35, 43, 38, .08); transform: translateX(2px); }
.name-item .nm { font-family: var(--serif); font-size: 23px; letter-spacing: 4px; width: 112px; color: var(--ink); }
.name-item .nm-info { flex: 1; min-width: 0; }
.name-item .pinyin { color: var(--ink-3); font-size: 12px; letter-spacing: 1px; }
.name-item .mean { color: var(--ink-2); font-size: 13.5px; margin-top: 4px; }
.name-item .tags { margin-top: 6px; }
.tag { display: inline-block; font-size: 12px; padding: 1px 10px; border-radius: 20px; border: 1px solid var(--line-2); color: var(--ink-2); margin-right: 6px; margin-top: 4px; }
.tag.wx { border-color: #CFE3D6; color: var(--jade); background: #F0F7F2; }
.score { font-family: var(--serif); font-size: 26px; color: var(--red); width: 64px; text-align: center; }
.score small { display: block; font-family: var(--sans); font-size: 11px; color: var(--ink-3); }
.name-item.locked { background: #FBF7EC; border-left-color: var(--line-2); }
.name-item.locked .nm { color: #C7BFA9; letter-spacing: 6px; }
.name-item.locked .mean { color: #C0B79F; }
.unlock-bar { text-align: center; border: 1px dashed var(--line-2); border-radius: 12px; padding: 24px; margin: 20px 0 8px; background: linear-gradient(180deg, #FFF9EA, #FBF3DF); }
.unlock-bar p { color: var(--ink-2); font-size: 13.5px; margin-bottom: 14px; }
.paid-banner { text-align: center; color: var(--jade); background: #F0F7F2; border: 1px solid #CFE3D6; border-radius: 10px; padding: 14px; margin-top: 20px; font-size: 14px; }
.section-head-compact { text-align: center; margin: 28px 0 16px; }
.section-head-compact h3 { font-size: 19px; letter-spacing: 3px; color: var(--gold); }
.score-note { font-size: 12px; color: var(--ink-2); text-align: center; line-height: 1.7; margin: -8px 0 16px; }

/* ---------- 特色 / 流程 / FAQ ---------- */
.feature { position: relative; overflow: hidden; text-align: left; transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(35, 43, 38, .1); }
.feature-icon { width: 48px; height: 48px; color: var(--red); margin-bottom: 16px; }
.feature-icon svg { width: 100%; height: 100%; }
.feature-no { font-family: var(--serif); color: var(--gold); font-size: 13px; letter-spacing: 2px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { color: var(--ink-2); font-size: 14px; }
.steps-grid { text-align: center; position: relative; }
.steps-grid::before { content: ""; position: absolute; top: 20px; left: 12%; right: 12%; height: 1px; background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 12px); }
.step { position: relative; }
.step b { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; background: var(--card); border: 1.5px solid var(--gold); color: var(--red); border-radius: 50%; font-family: var(--serif); font-size: 18px; margin-bottom: 12px; position: relative; z-index: 1; }
.step h4 { font-size: 16px; margin-bottom: 4px; }
.step p { color: var(--ink-2); font-size: 13px; }
.faq-card { max-width: 800px; margin: 0 auto; }
.faq-card details { border-bottom: 1px solid var(--line); padding: 4px 8px; }
.faq-card details:last-child { border-bottom: none; }
.faq-card summary { cursor: pointer; font-weight: 600; padding: 14px 0; font-size: 15px; list-style: none; display: flex; align-items: center; }
.faq-card summary::before { content: "＋"; color: var(--red); margin-right: 12px; font-size: 16px; }
.faq-card details[open] summary::before { content: "－"; }
.faq-card p { color: var(--ink-2); font-size: 14px; padding: 0 0 14px 28px; }

/* ---------- 页脚 / 弹窗 ---------- */
.site-footer { background: var(--deep); color: #C4D0C1; padding: 48px 0 24px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.footer-logo { font-family: var(--serif); font-size: 24px; color: #F3E7CC; letter-spacing: 2px; }
.footer-logo span { color: var(--gold); }
.site-footer p { font-size: 13px; margin-top: 8px; color: #9BAEA0; }
.footer-links a { color: #C4D0C1; margin-left: 22px; font-size: 13px; }
.footer-links a:hover { color: var(--gold-light); }
.footer-bottom { border-top: 1px solid rgba(232, 207, 152, .16); margin-top: 32px; padding-top: 18px; font-size: 12px; color: #859A8B; text-align: center; }

.modal-mask { position: fixed; inset: 0; background: rgba(16, 32, 25, .62); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(3px); }
.modal { background: var(--card); border-radius: 16px; padding: 34px; width: 100%; max-width: 430px; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, .28); position: relative; }
.modal-seal { position: absolute; top: 26px; right: 28px; width: 38px; height: 38px; border: 1.5px solid var(--red); color: var(--red); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 20px; opacity: .8; }
.modal h3 { font-size: 21px; margin-bottom: 8px; }
.modal-sub { color: var(--ink-2); font-size: 13.5px; margin-bottom: 20px; padding-right: 40px; }
.modal .input { width: 100%; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
/* ---------- 收款码付款弹窗 ---------- */
.modal-mask { overflow-y: auto; }
.modal { max-height: calc(100vh - 40px); overflow-y: auto; }
.modal-pay { max-width: 470px; padding: 30px 30px 24px; }
.pay-tabs { display: flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin-bottom: 16px; }
.pay-tab { flex: 1; padding: 9px 6px; background: #fff; border: 0; border-right: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); cursor: pointer; transition: background .15s; }
.pay-tab:last-child { border-right: 0; }
.pay-tab.active { background: var(--deep); color: #F3E8CE; font-weight: 600; }
.pay-qr-area { text-align: center; }
/* 官方收款码多为竖版长图，固定方框会把二维码缩得扫不出来；改为等比自适应大图 */
.pay-qr-frame { width: 100%; max-width: 300px; margin: 0 auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 4px 16px rgba(30, 50, 40, .07); }
.pay-qr-frame img { display: block; width: auto; height: auto; max-width: 100%; max-height: min(58vh, 420px); }
.pay-qr-frame img[hidden] { display: none; }
.pay-qr-empty { color: var(--ink-3); font-size: 13px; line-height: 1.8; padding: 12px; }
.pay-qr-empty small { font-size: 11.5px; }
/* 米纸底上的辅助文字专用色：--ink-3 仅约 2.6:1，改用 4.7:1 以上保证可读 */
.modal-pay { --pay-muted: #626B61; }
.pay-donate-word {
  font-family: var(--serif); font-size: 14px; line-height: 2; text-align: center;
  color: var(--ink-2); background: #FBF6EA; border: 1px solid var(--line);
  border-radius: 9px; padding: 10px 14px; margin: 4px 0 16px;
}
.pay-donate-word b { color: var(--red-dark); font-weight: 600; }
.pay-qr-tip { font-size: 12px; color: var(--pay-muted); margin: 9px 0 14px; }
.pay-order-line { font-size: 11.5px; color: var(--pay-muted); text-align: center; margin: 2px 0 12px; }
.pay-order-line span { font-family: ui-monospace, Consolas, monospace; }
.pay-order-line em { display: block; font-style: normal; color: var(--ink-2); margin-top: 3px; }
.pay-note { font-size: 12px; color: var(--ink-2); background: #F4F7F1; border-radius: 7px; padding: 8px 11px; margin-bottom: 12px; }
.pay-foot { font-size: 11px; color: var(--pay-muted); text-align: center; line-height: 1.7; margin-top: 14px; }
.modal-pay .modal-actions { margin-top: 14px; }
/* 窄屏：收小收款码长图，让「我已随喜」按钮尽量落在首屏，避免用户以为没有下一步 */
@media (max-width: 720px) {
  .modal-pay { padding: 24px 18px 18px; }
  .pay-donate-word { font-size: 13px; line-height: 1.9; padding: 8px 10px; margin-bottom: 12px; }
  .pay-qr-frame img { max-height: min(30vh, 240px); }
  .pay-qr-tip { font-size: 11.5px; margin: 7px 0 10px; }
  .modal-pay .modal-actions { gap: 8px; }
  /* 两个按钮并排时收紧字号，避免「暂不需要」「我已随喜，查看全部名字」折成两行 */
  .modal-pay .modal-actions .btn { font-size: 12px; letter-spacing: .3px; padding: 10px 8px; white-space: nowrap; }
}
.toast { position: fixed; top: 88px; left: 50%; transform: translateX(-50%); background: var(--deep); color: #F5E9CC; border: 1px solid rgba(201, 164, 92, .5); border-radius: 8px; padding: 10px 24px; font-size: 14px; z-index: 200; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .hero h1 { font-size: 36px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 360px; margin: 0 auto; }
  .zodiac-layout, .form-layout { grid-template-columns: 1fr; }
  .nav a { margin-left: 14px; }
  .yl-decades { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .section { padding: 60px 0; }
  .hero { padding-top: 44px; }
  .hero h1 { font-size: 30px; letter-spacing: 2px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .steps-grid::before { display: none; }
  .nav { display: none; }
  .header-cta { margin-left: auto; }
  .field { flex-direction: column; }
  .label { width: auto; text-align: left; padding: 0 0 6px; line-height: 1.6; }
  .result-grid { grid-template-columns: 1fr; }
  .name-item { flex-wrap: wrap; }
  .form-card { padding: 24px 20px; }
  .zodiac-info { padding: 26px 22px; }
  .section-head h2 { font-size: 26px; }
  .year-lookup { padding: 20px 18px; }
  .yl-top { flex-direction: column; align-items: stretch; }
  .yl-search input { flex: 1; width: auto; min-width: 0; }
  .yl-decades { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .yl-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .yl-grid-tip { display: none; }
  .z-era { flex-direction: column; gap: 4px; }
  .z-era > b { flex: none; padding-top: 0; }
  .mode-cards { grid-template-columns: 1fr; }
  .mp-body { grid-template-columns: 1fr; }
  .wx-chart { max-width: 340px; margin: 0 auto; }
  .wx-d-rel { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 起名方式门户（页面顶部先选方式） ---------- */
.method-gate { padding: 82px 0 86px; background: #F1E9D5; position: relative; overflow: hidden; }
.method-gate::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(162, 133, 82, .16) 1px, transparent 1px); background-size: 26px 26px; opacity: .5; pointer-events: none; }
.method-gate > .wrap { position: relative; }
.gate-head { text-align: center; margin-bottom: 38px; }
.gate-kicker { display: inline-block; font-size: 11.5px; letter-spacing: 3px; color: var(--red); border: 1px solid var(--line-2); border-radius: 20px; padding: 4px 18px; background: rgba(255, 252, 244, .8); margin-bottom: 16px; }
.gate-head h2 { font-family: var(--serif); font-size: 32px; letter-spacing: 3px; font-weight: 600; }
.gate-head h2::after { content: ""; display: block; width: 46px; height: 3px; background: var(--gold); margin: 16px auto 0; border-radius: 2px; }
.gate-head p { color: var(--ink-2); margin-top: 14px; font-size: 14.5px; }
.gate-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.gate-card { position: relative; display: block; width: 100%; min-height: 436px; padding: 0; text-align: left; font: inherit; border: 2px solid transparent; border-radius: 16px; overflow: hidden; cursor: pointer; transition: transform .25s, box-shadow .25s, border-color .25s, filter .25s; }
.gate-card:hover { transform: translateY(-5px); }
.gate-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.gate-figure { position: absolute; top: 0; right: 0; width: 53%; height: 100%; object-fit: cover; object-position: center 40%; z-index: 0; }
.gate-veil { position: absolute; inset: 0; z-index: 1; }
.gate-watermark { position: absolute; right: 8px; top: -34px; z-index: 1; font-family: var(--serif); font-size: 190px; line-height: 1; pointer-events: none; }
.gate-wx { background: #14261F; color: #F4E9D0; border-color: rgba(201, 164, 92, .3); box-shadow: 0 12px 34px rgba(20, 38, 31, .18); }
.gate-wx .gate-veil { background: linear-gradient(90deg, #14261F 0%, rgba(20, 38, 31, .97) 36%, rgba(20, 38, 31, .5) 66%, rgba(20, 38, 31, .1) 100%), linear-gradient(0deg, rgba(20, 38, 31, .8), transparent 48%); }
.gate-wx .gate-watermark { color: rgba(201, 164, 92, .09); }
.gate-sj { background: #FBF7EC; color: #2A3A31; border-color: #D9D0B8; box-shadow: 0 12px 34px rgba(60, 74, 62, .1); }
.gate-sj .gate-figure { width: 56%; object-position: center 62%; opacity: .95; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 44%); mask-image: linear-gradient(90deg, transparent 0%, #000 44%); }
.gate-sj .gate-veil { background: linear-gradient(90deg, #FBF7EC 0%, rgba(251, 247, 236, .97) 34%, rgba(251, 247, 236, .3) 68%, rgba(251, 247, 236, 0) 100%), linear-gradient(0deg, rgba(251, 247, 236, .82), transparent 52%); }
.gate-sj .gate-watermark { color: rgba(46, 106, 85, .07); }
.gate-body { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; padding: 34px 32px; max-width: 66%; }
.gate-no { font-size: 10.5px; letter-spacing: 2.6px; opacity: .72; }
.gate-seal { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 20px 0 14px; border-radius: 6px; font-family: var(--serif); font-size: 24px; }
.gate-wx .gate-seal { background: rgba(201, 164, 92, .16); color: #E8CF98; border: 1px solid rgba(232, 207, 152, .6); }
.gate-sj .gate-seal { background: #B23A2E; color: #fff; border: 1px solid #B23A2E; }
.gate-title { font-family: var(--serif); font-size: 27px; letter-spacing: 2px; font-weight: 600; }
.gate-desc { font-size: 13.5px; line-height: 2; margin-top: 12px; opacity: .86; max-width: 300px; }
.gate-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.gate-tags i { font-style: normal; font-size: 11px; padding: 3px 10px; border: 1px solid currentColor; border-radius: 20px; opacity: .7; }
.gate-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; padding-bottom: 4px; border-bottom: 1px solid currentColor; font-family: var(--serif); font-size: 15px; letter-spacing: 1px; }
.gate-cta em { font-style: normal; font-family: var(--sans); }
.gate-wx .gate-cta { color: #E8CF98; }
.gate-sj .gate-cta { color: #8E2B21; }
.gate-chosen { display: none; position: absolute; top: 14px; right: 14px; z-index: 3; font-size: 11px; letter-spacing: 1px; padding: 4px 12px; border-radius: 20px; }
.gate-wx.active .gate-chosen { display: block; background: #C9A45C; color: #1A2C23; }
.gate-sj.active .gate-chosen { display: block; background: #B23A2E; color: #fff; }
.gate-card.active { transform: translateY(-3px); }
.gate-wx.active { border-color: #C9A45C; box-shadow: 0 18px 44px rgba(20, 38, 31, .3), inset 0 0 0 1px rgba(201, 164, 92, .22); }
.gate-sj.active { border-color: #B23A2E; box-shadow: 0 18px 44px rgba(60, 74, 62, .18); }
.gate-cards .gate-card:not(.active) { filter: saturate(.82); }
.gate-note { text-align: center; margin-top: 26px; font-size: 12.5px; color: var(--ink-2); }

/* ---------- 起名表单：两套视觉主题 ---------- */
.naming-section { position: relative; overflow: hidden; transition: background .35s; }
.naming-section > .wrap { position: relative; z-index: 1; }
.naming-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.naming-section[data-mode="wuxing"] { background: linear-gradient(155deg, #162A23 0%, #1E3A2E 55%, #162A23 100%); }
.naming-section[data-mode="wuxing"] .naming-bg { background-image: radial-gradient(circle at 12% 76%, rgba(201, 164, 92, .11) 0 1px, transparent 1px); background-size: 52px 52px; }
.naming-section[data-mode="wuxing"] .naming-bg::after { content: "☰  ☵  ☷"; position: absolute; right: 3%; top: 10%; font-family: var(--serif); font-size: 110px; color: rgba(201, 164, 92, .06); letter-spacing: 24px; white-space: nowrap; transform: rotate(-8deg); }
.naming-section[data-mode="wuxing"] .section-head h2 { color: #F6EBD2; }
.naming-section[data-mode="wuxing"] .section-head p { color: #B9C7B8; }
.naming-section[data-mode="wuxing"] .section-head h2::after { background: #C9A45C; }
.naming-section[data-mode="wuxing"] .section-kicker { color: #E8CF98; border-color: rgba(232, 207, 152, .45); background: rgba(255, 255, 255, .05); }
.naming-section[data-mode="wuxing"] .form-card { border-color: rgba(201, 164, 92, .55); box-shadow: 0 20px 48px rgba(0, 0, 0, .28); }
.naming-section[data-mode="wuxing"] .form-steps { background: rgba(255, 255, 255, .05); border-color: rgba(232, 207, 152, .24); }
.naming-section[data-mode="wuxing"] .form-group-title { border-left-color: #B98C3A; }
.naming-section[data-mode="shijing"] { background: linear-gradient(160deg, #FBF7EC 0%, #EDF3EA 58%, #F7F1E2 100%); }
.naming-section[data-mode="shijing"] .naming-bg { background-image: radial-gradient(circle at 88% 20%, rgba(46, 106, 85, .1) 0 1px, transparent 1px); background-size: 44px 44px; }
.naming-section[data-mode="shijing"] .naming-bg::after { content: "关 关 雎 鸠 · 在 河 之 洲"; position: absolute; right: 2%; top: 6%; writing-mode: vertical-rl; font-family: var(--serif); font-size: 32px; letter-spacing: 8px; color: rgba(46, 106, 85, .075); }
.naming-section[data-mode="shijing"] .section-head h2 { color: #24463A; }
.naming-section[data-mode="shijing"] .section-head h2::after { background: #2E6A55; }
.naming-section[data-mode="shijing"] .section-kicker { color: #2E6A55; border-color: #B9CFC0; background: rgba(255, 255, 255, .72); }
.naming-section[data-mode="shijing"] .form-card { border-color: #BFD3C4; box-shadow: 0 16px 42px rgba(46, 106, 85, .13); }
.naming-section[data-mode="shijing"] .form-steps { background: rgba(46, 106, 85, .045); border-color: #CFE0D3; }
.naming-section[data-mode="shijing"] .form-group-title { border-left-color: #2E6A55; }
.naming-section[data-mode="shijing"] .btn-primary { background: #2E6A55; box-shadow: 0 6px 16px rgba(46, 106, 85, .22); }
.naming-section[data-mode="shijing"] .btn-primary:hover { background: #245544; }
.naming-section[data-mode="shijing"] .fs.active i { background: #2E6A55; }
.naming-section[data-mode="shijing"] .mode-panel { border-color: #CFE0D3; background: linear-gradient(140deg, #FFFFFF, #F3F8F2); }
.naming-section[data-mode="shijing"] .mp-tabs button.active { background: #2E6A55; border-color: #2E6A55; }

/* 左侧说明卡：两套完全不同的人物与配色 */
.form-aside { padding: 0; background: transparent; }
.aside-face { display: none; position: relative; height: 100%; box-sizing: border-box; overflow: hidden; border-radius: var(--radius); padding: 38px 32px; }
#form[data-mode="wuxing"] .aside-wx, #form[data-mode="shijing"] .aside-sj { display: block; }
.aside-figure { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.aside-veil { position: absolute; inset: 0; z-index: 1; }
.aside-vtext { position: absolute; right: 18px; top: 26px; z-index: 1; writing-mode: vertical-rl; font-family: var(--serif); font-size: 21px; letter-spacing: 8px; opacity: .22; }
.aside-inner { position: relative; z-index: 2; }
.aside-wx { background: linear-gradient(150deg, #162A23, #254438); color: #EDE4CE; }
.aside-wx .aside-figure { object-position: center 45%; opacity: .5; }
.aside-wx .aside-veil { background: linear-gradient(180deg, rgba(18, 34, 27, .74), rgba(18, 34, 27, .14) 44%, rgba(18, 34, 27, .9)); }
.aside-wx .aside-seal { background: rgba(201, 164, 92, .16); color: #E8CF98; border-color: rgba(232, 207, 152, .6); }
.aside-sj { background: linear-gradient(155deg, #FBF7EC, #E7EFE5); color: #2A3A31; border: 1px solid #D7E2D6; }
.aside-sj .aside-figure { object-position: center 62%; opacity: .4; -webkit-mask-image: linear-gradient(180deg, transparent, #000 42%, #000); mask-image: linear-gradient(180deg, transparent, #000 42%, #000); }
.aside-sj .aside-veil { background: linear-gradient(180deg, rgba(251, 247, 236, .76), rgba(251, 247, 236, .16) 46%, rgba(251, 247, 236, .9)); }
.aside-sj .aside-seal { background: #B23A2E; color: #fff; border-color: #B23A2E; }
.aside-sj .form-aside h3, .aside-sj h3 { color: #24463A; }
.aside-sj p { color: #5B6E61; }
.aside-sj .aside-list li { color: #40584A; }
.aside-sj .aside-list i { color: #2E6A55; }
.aside-sj .aside-stamp { color: #7C8E7F; }

/* 表单内「当前方式」条 */
.mode-current { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 24px; background: var(--paper-2); }
.mode-current-seal { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 6px; font-family: var(--serif); font-size: 21px; color: #fff; }
.mode-current-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mode-current-copy b { font-family: var(--serif); font-size: 15px; color: var(--ink); }
.mode-current-copy small { font-size: 11.5px; color: var(--ink-3); }
.mode-change { flex: none; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); border-radius: 20px; padding: 5px 13px; font-size: 12px; cursor: pointer; transition: color .15s, border-color .15s; }
.mode-change:hover { color: var(--red); border-color: var(--red); }
#form[data-mode="wuxing"] .mode-current { background: rgba(201, 164, 92, .1); border-color: rgba(185, 140, 58, .45); }
#form[data-mode="wuxing"] .mode-current-seal { background: #8E2B21; }
#form[data-mode="shijing"] .mode-current { background: rgba(46, 106, 85, .07); border-color: #BFD3C4; }
#form[data-mode="shijing"] .mode-current-seal { background: #2E6A55; }

@media (max-width: 980px) {
  .gate-body { max-width: 72%; }
  .gate-card { min-height: 400px; }
  .nav a { margin-left: 10px; font-size: 13.5px; }
}
@media (max-width: 720px) {
  .method-gate { padding: 60px 0; }
  .gate-cards { grid-template-columns: 1fr; gap: 18px; }
  .gate-card { min-height: 360px; }
  .gate-figure, .gate-sj .gate-figure { width: 50%; }
  .gate-body { max-width: 68%; padding: 26px 22px; }
  .gate-title { font-size: 23px; }
  .gate-desc { font-size: 12.5px; line-height: 1.85; }
  .gate-head h2 { font-size: 26px; }
  .mode-current { flex-wrap: wrap; }
  .mode-change { margin-left: 54px; }
  .naming-bg::after { display: none; }
}

/* ---------- 近年热名参考模块 ---------- */
/* 浅纸底辅助文字专用色，保证 4.5:1 以上（--ink-3 仅约 2.6:1） */
.hot-names {
  --sp-muted: #626B61;
  padding: 62px 0 66px; background: var(--paper-2);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  scroll-margin-top: 76px;
}
.hn-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.hn-head .section-kicker { margin-bottom: 12px; }
.hn-head h2 { font-family: var(--serif); font-size: 27px; letter-spacing: 2px; font-weight: 600; color: var(--ink); }
.hn-head p { margin-top: 9px; font-size: 13px; line-height: 1.8; color: var(--ink-2); max-width: 660px; }
.hn-jump { flex: none; font-size: 13px; color: var(--red-dark); border: 1px solid var(--line-2); border-radius: 20px; padding: 7px 17px; background: rgba(255, 252, 244, .7); transition: border-color .15s, background .15s; }
.hn-jump em { font-style: normal; font-family: var(--sans); }
.hn-jump:hover { border-color: var(--red); background: #FFF8E8; }
.hn-jump:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.hn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 30px; }
.hn-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 12px; box-shadow: 0 4px 18px rgba(35, 43, 38, .045); }
.hn-card-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.hn-seal { flex: none; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 5px; background: var(--red); color: #FFF6E6; font-family: var(--serif); font-size: 14px; line-height: 1; }
.hn-card:nth-child(2) .hn-seal { background: var(--jade); }
.hn-card:nth-child(3) .hn-seal { background: #8A7548; }
.hn-card-head h3 { font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: 2px; color: var(--ink); }
.hn-card-head em { margin-left: auto; font-style: normal; font-family: var(--sans); font-size: 10px; letter-spacing: 2px; color: var(--sp-muted); }
.hn-list { list-style: none; margin: 6px 0 0; }
.hn-item { display: grid; grid-template-columns: 62px 1fr 14px; align-items: center; gap: 0 8px; width: 100%; text-align: left; border: 0; border-radius: 7px; background: none; padding: 7px 8px; cursor: pointer; transition: background .15s; }
.hn-item:hover { background: #FBF3E3; }
.hn-item:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
.hn-name { font-family: var(--serif); font-size: 16px; letter-spacing: 2px; color: var(--ink); transition: color .15s; }
.hn-item:hover .hn-name { color: var(--red-dark); }
.hn-item small { font-size: 11.5px; line-height: 1.5; color: var(--sp-muted); }
.hn-use { font-style: normal; font-size: 12px; color: var(--red); opacity: 0; transition: opacity .15s; }
.hn-item:hover .hn-use { opacity: 1; }
.hn-more { display: none; width: 100%; margin-top: 8px; border: 0; border-top: 1px dashed var(--line-2); background: none; padding: 10px 0 2px; font-size: 12px; color: var(--red-dark); cursor: pointer; }
.hn-more em { font-style: normal; font-family: var(--sans); }
.hn-note { margin-top: 20px; font-size: 11.5px; line-height: 1.8; color: var(--sp-muted); text-align: center; }
.sp-flash { border-color: var(--red) !important; box-shadow: 0 0 0 3px rgba(178, 58, 46, .14) !important; }
.naming-section { scroll-margin-top: 76px; }

@media (max-width: 1180px) {
  .header-proof { flex-basis: 200px; padding-left: 14px; }
  .nav a { margin-left: 14px; }
}
@media (max-width: 980px) {
  .header-proof { flex-basis: 176px; }
  .nav a { margin-left: 10px; font-size: 13.5px; }
  .hn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hn-card:last-child { grid-column: 1 / -1; }
  .hn-card:last-child .hn-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; }
  .hn-item { grid-template-columns: 56px 1fr; padding: 6px; }
  .hn-name { font-size: 15px; }
  .hn-use { display: none; }
}
@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; height: auto; min-height: 60px; gap: 6px 12px; padding-top: 9px; padding-bottom: 8px; }
  .header-proof { order: 3; flex: 0 0 100%; display: flex; align-items: center; gap: 10px; padding: 6px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .hp-count { flex: none; font-size: 11.5px; }
  .hp-count b { font-size: 14px; }
  /* 窄屏精简人数文案，把第二行空间让给动态播报 */
  .hp-pre, .hp-unit-full { display: none; }
  .hp-unit-short { display: inline; }
  .hp-feed { flex: 1; min-width: 0; margin-top: 0; font-size: 11px; }
  .hot-names { padding: 48px 0 52px; scroll-margin-top: 104px; }
  .naming-section, .method-gate { scroll-margin-top: 104px; }
  .hn-head h2 { font-size: 22px; }
  .hn-head p { font-size: 12.5px; }
  .hn-jump { display: none; }
  .hn-grid { grid-template-columns: 1fr; gap: 14px; margin-top: 24px; }
  .hn-card:last-child { grid-column: auto; }
  .hn-card:last-child .hn-list { display: block; }
  .hn-card .hn-list li:nth-child(n+5) { display: none; }
  .hn-card.is-expanded .hn-list li:nth-child(n+5) { display: block; }
  .hn-item { grid-template-columns: 62px 1fr; }
  .hn-more { display: block; }
  .hn-note { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .hp-feed, .hn-item, .hn-use { transition: none; }
}

/* ---------- 辅助区折叠：主流程保持连续，参考内容按需展开 ---------- */
.fold-section { scroll-margin-top: 76px; }
.fold-section.is-folded { padding: 0; background: var(--paper-2); }
.hot-names.fold-section.is-folded { padding: 0; border-top: 0; border-bottom: 0; }
.more-group { scroll-margin-top: 76px; }
.fold-bar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper-2); }
.fold-head {
  display: flex; align-items: center; gap: 16px; width: 100%;
  background: none; border: 0; padding: 14px 0; text-align: left; cursor: pointer;
  font-family: var(--sans);
}
.fold-head:hover .fold-title { color: var(--red); }
.fold-head:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }
.fold-title { flex: none; font-family: var(--serif); font-size: 16px; letter-spacing: 1.5px; color: var(--ink); transition: color .15s; }
.fold-desc { flex: 1; min-width: 0; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fold-toggle { flex: none; font-size: 12px; color: var(--red-dark); white-space: nowrap; }
.fold-toggle em { font-style: normal; font-family: var(--sans); }
.method-gate { scroll-margin-top: 76px; }

/* ---------- 结果区名字分页 ---------- */
.name-page { scroll-margin-top: 88px; }
.name-pager { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; margin: 18px 0 4px; font-size: 12.5px; color: var(--ink-2); }
.name-pager b { color: var(--red-dark); font-variant-numeric: tabular-nums; }
.nm-pg-btn { border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2); border-radius: 8px; padding: 6px 14px; font-size: 12.5px; cursor: pointer; transition: border-color .15s, color .15s; }
.nm-pg-btn:hover:not(:disabled) { border-color: var(--red); color: var(--red); }
.nm-pg-btn:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 720px) {
  .fold-section, .more-group, .method-gate { scroll-margin-top: 104px; }
  .fold-head { flex-wrap: wrap; gap: 2px 10px; padding: 11px 0; }
  .fold-title { font-size: 15px; }
  .fold-desc { flex-basis: 100%; order: 3; font-size: 11px; white-space: normal; line-height: 1.5; }
  .fold-toggle { margin-left: auto; font-size: 11.5px; }
  .name-page { scroll-margin-top: 112px; }
  .name-pager { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .fold-title { transition: none; }
}
