/* main.css — Chinese Calendar Chart · UI v2「Modern SaaS · Teal Care」
 * 2026-11-14 重设计：中性 slate 底 + 青 blue 主色 + 男蓝/女粉双语义色 + 自动暗色
 * 三层 token：primitive → semantic → component。改主题只动 semantic 层。
 * v4 */
:root {
  /* primitive · slate 灰阶 */
  --slate-50: #F8FAFC; --slate-100: #F1F5F9; --slate-200: #E2E8F0; --slate-400: #94A3B8;
  --slate-500: #64748B; --slate-700: #334155; --slate-900: #0F172A;
  /* primitive · teal 主色 */
  --teal-50: #F0FDFA; --teal-100: #E0F2FE; --teal-500: #0891B2; --teal-600: #0E7490; --teal-700: #155E75;
  /* primitive · 语义双色（男/女） */
  --boy-50: #EFF6FF; --boy-100: #DBEAFE; --boy-500: #3B82F6; --boy-700: #1D4ED8;
  --girl-50: #FDF2F8; --girl-100: #FCE7F3; --girl-500: #EC4899; --girl-700: #BE185D;
  /* primitive · 节气四季（低饱和） */
  --spring: #059669; --summer: #0EA5E9; --autumn: #D97706; --winter: #475569;
  /* primitive · 功能色 */
  --green-600: #16A34A; --red-600: #DC2626; --amber-600: #D97706;

  /* semantic · light */
  --bg: var(--slate-50);
  --surface: #FFFFFF;
  --surface-2: var(--slate-100);
  --border: var(--slate-200);
  --border-strong: var(--slate-400);
  --text: var(--slate-900);
  --text-2: var(--slate-500);
  --text-3: var(--slate-400);
  --accent: #0E7490;          /* 文本/链接级 teal（白底 5.4:1） */
  --accent-btn: #0891B2;      /* 按钮底色（白字，粗体 ≥3:1） */
  --accent-hover: #155E75;
  --accent-soft: #E0F2FE;
  --accent-ink: #0E7490;
  --focus-ring: rgba(8, 145, 178, .28);
  --boy-bg: var(--boy-50); --boy-ink: var(--boy-700);
  --girl-bg: var(--girl-50); --girl-ink: var(--girl-700);
  --foot-bg: var(--slate-900); --foot-ink: #CBD5E1;

  /* component */
  --font-display: Inter, "Noto Sans SC", system-ui, sans-serif;
  --font-body: Inter, "Noto Sans SC", system-ui, sans-serif;
  --radius: 16px; --radius-ctl: 10px;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-pop: 0 12px 32px rgba(8, 145, 178, .14);
  --boy-cell: var(--boy-100); --girl-cell: var(--girl-100);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1220; --surface: #16223B; --surface-2: #101A2E;
    --border: #2B3A55; --border-strong: #475569;
    --text: #F1F5F9; --text-2: #94A3B8; --text-3: #64748B;
    --accent: #22D3EE; --accent-btn: #0891B2; --accent-hover: #67E8F9;
    --accent-soft: rgba(34, 211, 238, .12); --accent-ink: #67E8F9;
    --focus-ring: rgba(34, 211, 238, .32);
    --boy-bg: rgba(59, 130, 246, .16); --boy-ink: #93C5FD;
    --girl-bg: rgba(236, 72, 153, .14); --girl-ink: #F9A8D4;
    --boy-cell: rgba(59, 130, 246, .22); --girl-cell: rgba(236, 72, 153, .18);
    --spring: #34D399; --summer: #38BDF8; --autumn: #FBBF24; --winter: #94A3B8;
    --foot-bg: #101A2E; --foot-ink: #94A3B8;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-pop: 0 12px 32px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); line-height: 1.65; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: 40px; font-weight: 800; margin: 0 0 12px; }
h2 { font-size: 25px; font-weight: 700; margin: 0 0 10px; }
a { color: var(--accent); }
.hidden { display: none !important; }
::selection { background: var(--accent-soft); }

/* 导航：毛玻璃白底 + 当前页高亮 + 移动端两行 */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 84%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; gap: 20px; min-height: 58px; flex-wrap: wrap; padding: 6px 20px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 14.5px; text-decoration: none; color: var(--text); letter-spacing: -.01em; }
.logo { display: inline-flex; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent-btn) 0%, var(--boy-500) 100%); color: #fff; align-items: center; justify-content: center; font-size: 13px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 14px; padding: 7px 12px; border-radius: 8px; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.on { color: var(--accent); background: var(--accent-soft); }
.lang-switcher { position: relative; margin-left: auto; }
.lang-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 13px; cursor: pointer; }
.lang-arrow { font-size: 10px; margin-left: 5px; }
.lang-dropdown { display: none; position: absolute; right: 0; margin-top: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-pop); min-width: 130px; overflow: hidden; }
.lang-switcher.open .lang-dropdown { display: block; }
.lang-option { display: block; padding: 9px 14px; text-decoration: none; color: var(--text); font-size: 14px; }
.lang-option:hover { background: var(--surface-2); }

main { padding: 32px 20px 64px; }
.hero { padding: 8px 0 6px; text-align: center; }
.hero .sub, .sub { color: var(--text-2); max-width: 720px; margin: 0 auto 18px; font-size: 15px; }
.badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 0 0 16px; }
.badges span { font-size: 12px; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 4px 13px; }
.cta-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 14px 0; }
.grid-h, .sec { margin: 64px 0; }
.grid-h:first-of-type, .sec:first-of-type { margin-top: 12px; }
.hero .sub, .sub { color: var(--text-2); max-width: 720px; margin: 0 auto 18px; font-size: 15px; }
.badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 0 0 16px; }
.badges span { font-size: 12px; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 4px 13px; }
.cta-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 14px 0; }
.sec-lead { color: var(--text-2); font-size: 14px; max-width: 880px; margin: 0 0 10px; }
.sec-sub { color: var(--text-2); font-size: 14px; max-width: 880px; margin: 0 0 10px; }
.sec-note { color: var(--text-2); font-size: 13px; margin: 10px 0 0; }
.info-callout { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border)); color: var(--accent-ink); border-radius: 10px; font-size: 12.5px; padding: 8px 12px; margin: 10px 0; }

/* 按钮 */
.btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--radius-ctl); padding: 10px 20px; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; transition: .15s; }
.btn.primary { background: var(--accent-btn); border-color: var(--accent-btn); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn:focus-visible, .f-input:focus-visible, .tab:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }

/* 卡片与表单 */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 20px; max-width: 560px; }
.pg-gender .card { margin-left: auto; margin-right: auto; }
.form-card.mini { max-width: 560px; }
.form-row { display: flex; flex-direction: column; gap: 5px; margin: 12px 0; }
.form-row label, .f-label { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.form-row input, .form-row select { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-ctl); padding: 10px 12px; font: inherit; font-size: 14px; color: var(--text); }
.form-row input:focus, .form-row select:focus { outline: none; border-color: var(--accent-btn); box-shadow: 0 0 0 3px var(--focus-ring); }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tri-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.tri-row select { width: 100%; padding: 10px 6px; font-size: 13px; }
/* 结果卡 verdict */
.verdict-tag { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--text-3); text-transform: uppercase; margin-bottom: 8px; }
.verdict { font-size: 36px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.verdict.v-boy { color: var(--boy-ink); }
.verdict.v-girl { color: var(--girl-ink); }
.form-note { color: var(--text-2); font-size: 12.5px; margin: 4px 0 0; }
.form-err { color: var(--red-600); font-size: 13.5px; font-weight: 600; }
/* segmented control（预测器三模式） */
.seg-ctl { display: flex; background: var(--surface-2); border-radius: var(--radius-ctl); padding: 3px; gap: 3px; }
.seg-ctl button { flex: 1; border: 1px solid transparent; background: transparent; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 700; padding: 8px 4px; border-radius: 8px; cursor: pointer; }
.seg-ctl button.on { background: var(--surface); color: var(--accent-ink); border-color: var(--border); box-shadow: var(--shadow-card); }
/* 测验 pill */
.quiz-opts .pill { position: relative; display: inline-block; cursor: pointer; }
.quiz-opts .pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.quiz-opts .pill span { display: inline-block; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 5px 18px; font-size: 13px; font-weight: 700; transition: .12s; }
.quiz-opts .pill:has(input:checked) span { background: var(--accent-btn); border-color: var(--accent-btn); color: #fff; }
.quiz-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-bottom: 1px dashed var(--border); padding: 9px 0; flex-wrap: wrap; }
.quiz-q { font-size: 14px; }

/* 结果卡 */
.result-card { border-left: 4px solid var(--accent); animation: rise .24s ease-out; }
.result-card h3 { margin: 0 0 8px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.result-card .verdict { font-size: 32px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 10px; }
.verdict.v-boy { color: var(--boy-ink); }
.verdict.v-girl { color: var(--girl-ink); }
.result-card .est { color: var(--text-2); font-size: 13px; margin: 0 0 6px; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin: 14px 0 0; }
.res-grid > div { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.res-grid dt { color: var(--text-3); font-size: 11.5px; font-weight: 700; }
.res-grid dd { margin: 2px 0 0; font-weight: 800; font-size: 14.5px; }
.result-line { font-size: 15px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 首页 tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-decoration: none; }
.tile.live { border-top: 3px solid var(--accent); transition: transform .15s, box-shadow .15s; }
.tile.live:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.tile.live .tile-name { color: var(--accent-ink); }
.tile.soon { border-style: dashed; color: var(--text-3); }
.tile-name { font-weight: 800; font-size: 16.5px; letter-spacing: -.01em; }
.tile-desc { font-size: 13.5px; color: var(--text-2); }
.badge { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--text-3); border: 1px dashed var(--border-strong); border-radius: 999px; padding: 2px 10px; width: fit-content; }

/* 图表（SaaS 数据表） */
.chart-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.chart-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.chart-head b { font-size: 14px; }
.legend { margin-left: auto; display: flex; gap: 14px; font-size: 12px; color: var(--text-2); align-items: center; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.legend .lb i { background: var(--boy-500); } .legend .lg i { background: var(--girl-500); }
.gchart { border-collapse: collapse; min-width: 720px; width: 100%; font-size: 13px; }
.gchart th, .gchart td { border-bottom: 1px solid var(--border); padding: 5px 8px; text-align: center; }
.gchart thead th { background: var(--surface-2); font-size: 11px; color: var(--text-3); font-weight: 700; position: sticky; top: 0; }
.gchart tbody th { background: var(--surface); font-weight: 800; color: var(--text-2); min-width: 44px; position: sticky; left: 0; }
.gchart td.cell { min-width: 34px; }
.gchart .mh-n { display: none; }
.gchart td.cb { background: var(--boy-cell); }
.gchart td.cg { background: var(--girl-cell); }
.gchart tbody tr:hover td { filter: brightness(.96); }
.gchart tr.hl td { background: var(--accent-soft); }
.gchart tr.hl th { color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.gchart tr.hl { border-left: 3px solid var(--accent); }

/* 年份 tabs + 农历月表 */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0 16px; background: var(--surface-2); border-radius: 999px; padding: 3px; width: fit-content; }
.tab { border: 0; background: transparent; color: var(--text-2); border-radius: 999px; padding: 7px 18px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.tab.on { background: var(--accent-btn); color: #fff; }
.year-panel { display: none; }
.year-panel.on { display: block; }
.ytable { border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; font-size: 14px; min-width: 480px; }
.ytable th, .ytable td { text-align: left; padding: 8px 14px; border-bottom: 1px solid var(--border); }
.ytable tbody tr:last-child td { border-bottom: none; }
.ytable thead th { background: var(--surface-2); font-size: 11.5px; color: var(--text-3); font-weight: 700; }
.ytable tr.leaprow td { color: var(--autumn); font-weight: 700; }

/* 择月结果 */
.pl-h { font-size: 16px; margin: 8px 0; }
.pl-list { list-style: none; margin: 8px 0; padding: 0; }
.pl-list li { display: flex; gap: 14px; align-items: center; border-bottom: 1px dashed var(--border); padding: 7px 0; }
.pl-month { font-weight: 700; min-width: 110px; }
.pl-range { color: var(--text-2); font-size: 13.5px; }

/* FAQ */
.faq-list { max-width: 880px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px 16px; margin: 8px 0; transition: border-color .15s; }
.faq-item:hover { border-color: var(--border-strong); }
.faq-item summary { cursor: pointer; font-weight: 700; padding: 11px 0; font-size: 14.5px; }
.faq-item p { color: var(--text-2); font-size: 14px; margin: 4px 0 12px; }

/* 免责声明 */
.disclaimer-box { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--green-600); border-radius: var(--radius); padding: 16px 18px; max-width: 880px; }
.disclaimer-box h2 { font-size: 18px; }
.disclaimer-box p { color: var(--text-2); font-size: 14px; margin: 0; }

/* 节气页 */
.page-jumpy { position: sticky; top: 64px; z-index: 15; display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; margin-bottom: 20px; box-shadow: var(--shadow-card); }
.page-jumpy a { text-decoration: none; color: var(--text-2); font-weight: 700; font-size: 13px; border-radius: 999px; padding: 5px 14px; }
.page-jumpy a:hover { color: var(--accent); background: var(--accent-soft); }
.today-chip { margin-left: auto; font-size: 12.5px; color: var(--text-2); }
.today-card { display: flex; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; max-width: 640px; flex-wrap: wrap; box-shadow: var(--shadow-card); }
.pg-seasons .today-card, .pg-seasons .form-card, .pg-seasons .chart-scroll { margin-left: auto; margin-right: auto; }
.today-card .small { color: var(--text-3); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.today-card .big { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.today-card .mid { color: var(--text-2); font-size: 13px; }
.today-card .mid { color: var(--text-2); font-size: 13px; }
.count-chip { margin-left: auto; background: var(--accent-btn); color: #fff; border-radius: 999px; padding: 7px 15px; font-size: 13px; font-weight: 700; }
.season-chips, .schips { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 16px; }
.schip { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 5px 14px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.schip .dot { width: 9px; height: 9px; border-radius: 50%; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; margin-top: 14px; }
.tcard { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.tcard.now { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tcard .no { position: absolute; top: 15px; right: 16px; font-size: 10.5px; color: var(--text-3); font-weight: 700; }
.tcard { position: relative; }
.tcard .dot-row { display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: var(--text-3); }
.tcard .dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.spring { background: var(--spring); } .dot.summer { background: var(--summer); }
.dot.autumn { background: var(--autumn); } .dot.winter { background: var(--winter); }
.tcard .en { font-weight: 800; font-size: 17px; margin-top: 12px; letter-spacing: -.01em; }
.tcard .cn { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.tcard .date { font-weight: 800; margin-top: 12px; font-size: 15px; }
.tcard .wd { font-weight: 400; color: var(--text-3); font-size: 12px; margin-left: 6px; }
.tcard .desc { font-size: 12.5px; color: var(--text-2); margin-top: 9px; line-height: 1.6; }
.explain { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; max-width: 880px; }
.explain p { margin: 6px 0; font-size: 14.5px; }
/* 内容列与标题同轴居中（2026-11-15 用户反馈：880px 列贴左，1040 容器右侧留空一截） */
.grid-h h2, .sec h2 { text-align: center; }
.explain, .faq-list { margin-left: auto; margin-right: auto; }
/* explain 内键值行（生肖页今年卡） */
.explain .kv { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14.5px; }
.explain .kv:last-of-type { border-bottom: none; }
.explain .kv span { color: var(--text-2); }
.explain .kv b { text-align: right; }

/* 页脚：深色收尾 */
footer { background: var(--foot-bg); color: var(--foot-ink); margin-top: 48px; }
footer .wrap { padding: 30px 20px; }
footer a { color: #E2E8F0; text-decoration: none; font-weight: 600; font-size: 13.5px; }
footer a:hover { color: #fff; }
.foot-grid { display: flex; gap: 30px; flex-wrap: wrap; justify-content: space-between; }
.foot-grid > div:first-child a { display: block; margin: 4px 0; }
.foot-note { color: var(--foot-ink); font-size: 12.5px; opacity: .85; }
footer .foot-note:last-child { opacity: .6; margin-top: 10px; }

/* 桌面默认隐藏移动滑动提示 */
.swipe-hint { display: none; }

/* 打印：性别页只印图表区；节气页印双年清单 */
/* ---- 转换器 / 虚岁 / 生肖 / 节日页（2026-11-14 扩展；必须在 @media 块之前，否则 base 规则压掉断点） ---- */
/* 转换器双卡：桌面并排、移动单列（640px 断点在下方） */
.conv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 860px; margin: 0 auto; text-align: left; }
.conv-grid .f-label { font-size: 14px; margin: 2px 0 6px; color: var(--text); }
/* 双卡等高、按钮行钉卡底：左卡内容矮，按钮随内容流会高于右卡——flex 列 + margin-top:auto 对齐 */
.conv-grid .card { display: flex; flex-direction: column; }
.conv-grid .card .cta-row { margin: 0; margin-top: auto; padding-top: 10px; }
.conv-grid .card .cta-row .btn { flex: 1; width: 100%; }
/* 复选行（闰月） */
.chk-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.chk-row input { width: 16px; height: 16px; accent-color: var(--accent-btn); }
/* 结果卡键值行 */
.result-card .kv { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14.5px; }
.result-card .kv:last-of-type { border-bottom: none; }
.result-card .kv span { color: var(--text-2); }
.result-card .kv b { text-align: right; }
/* 生肖表第一列加粗 */
.atable .ani-name { font-weight: 800; }
/* footer 链接两列均 block 化（原规则只管第一列） */
.foot-grid > div a { display: block; margin: 4px 0; }
/* nav 链接整词显示（防 CJK 逐字换行），放不下走横向滚动 */
.nav-links a { white-space: nowrap; }
/* 节日页：表格容器收进 880 内容列并居中（ytable 内容宽 ~500px 装在通栏容器里右侧全空），表撑满容器、描述块同轴 */
.pg-cele .chart-scroll { max-width: 880px; margin: 0 auto; }
.pg-cele .ytable { width: 100%; }
.fest-descs { max-width: 880px; margin: 0 auto; }
/* 2026-11-15 全站贴左扫描修复（居中语言延续）：底部 CTA 无样式裸链贴左、引导段/免责框贴左、
 * 性别页年份 tabs+面板表贴左、生肖页属相表容器通栏、闰月页表格在 explain 卡内贴左、首页 tools 网格 4+1 孤行 */
.sec .cta { display: block; width: fit-content; margin: 0 auto; }
.sec-lead, .sec-sub { margin: 0 auto 10px; }
.disclaimer-box { margin: 0 auto; }
.tabs { margin-left: auto; margin-right: auto; }
.year-panel .ytable { margin: 0 auto; }
.pg-ani .chart-scroll { max-width: 660px; margin: 0 auto; }
.pg-ani .ytable { width: 100%; }
.explain .chart-scroll { max-width: 520px; margin: 0 auto; }
.explain .ytable { width: 100%; }
/* tools 8 卡（生肖两页+节日+春节 2026-11-15）：回到基础 240px=4 列 → 4+4 两满行；guides 3 卡靠 auto-fit 塌空轨仍满行（300px/3 列版本在 8 卡下会出 3+3+2 孤行，已删） */
/* 春节专题页（v22）：倒计时卡/查询器/年区时间线全部复用现有组件（today-card/ytable/form-card），只补居中与查询卡宽 */
.pg-cny .today-card, .pg-cny .chart-scroll, .pg-cny .form-card { margin-left: auto; margin-right: auto; }
.pg-cny .ytable { width: 100%; }
.cny-q { max-width: 520px; }
.count-chip { font-weight: 800; color: var(--accent-ink); white-space: nowrap; }

@media print {  .nav, footer, button, .tabs, .form-card, .result-card, .disclaimer-box, .page-jumpy, .chart-head .btn, .badges, .swipe-hint { display: none !important; }
  body { background: #fff; }
  body.pg-gender .hero, body.pg-gender .grid-h:not(#chart), body.pg-gender .sec-lead,
  body.pg-gender .sec-note, body.pg-gender .sec-sub { display: none !important; }
  .chart-scroll { border: none; overflow: visible; }
  .gchart { min-width: 0; width: 100%; }
  .gchart td.cb, .gchart td.cg { outline: 1px solid #94A3B8; }
  .explain { border: none; padding: 0; }
}

@media (max-width: 719px) {
  /* 图表移动端：压缩为全可见色块矩阵（无需横滑），容器限高内部滚动 + 双 sticky */
  .chart-scroll { max-height: 72vh; overflow: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
  .gchart { min-width: 0; width: 100%; table-layout: fixed; font-size: 11px; }
  .gchart th, .gchart td { padding: 0; border: 1px solid var(--border); }
  .gchart thead th { position: sticky; top: 0; z-index: 2; height: 26px; }
  .gchart thead th .mh-full { display: none; }
  .gchart thead th .mh-n { display: inline; font-size: 10.5px; }
  .gchart thead th:first-of-type { text-align: left; padding-left: 8px; }
  .gchart thead th:first-of-type .mh-n { font-size: 10px; }
  .gchart tbody th { position: sticky; left: 0; z-index: 1; width: 34px; font-size: 11.5px; text-align: center; }
  .gchart td.cell { height: 23px; }
  /* 农历月对照表：移动端压缩到一屏宽（无滑动） */
  .ytable { min-width: 0; width: 100%; font-size: 12px; }
  .ytable th, .ytable td { padding: 6px 8px; white-space: nowrap; }
  .swipe-hint { display: block; }
}

@media (max-width: 640px) {
  h1 { font-size: 30px; }
  .nav-inner { gap: 10px; }
  .nav-links { order: 3; width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .form-row.two { grid-template-columns: 1fr; }
  .res-grid { grid-template-columns: 1fr 1fr; }
  .page-jumpy { flex-wrap: wrap; border-radius: 14px; }
  .today-chip { margin-left: 0; }
  .count-chip { margin-left: 0; }
  .conv-grid { grid-template-columns: 1fr; }
}
