:root {
  --paper: #f4eee2; --card: #fffdf8; --ink: #221d17; --ink2: #6f665a; --line: #e3d9c7;
  --red: #b13a2a; --red-soft: #f7e4dd; --ji: #2f5362; --ji-soft: #e2ebee; --gold: #a37424; --dim: #8b8377;
  --shadow: 0 1px 2px rgba(60, 40, 10, .06), 0 6px 20px rgba(60, 40, 10, .05);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171411; --card: #221e1a; --ink: #ece4d6; --ink2: #a79e90; --line: #3a332b;
    --red: #e3826b; --red-soft: #3a221c; --ji: #93bccb; --ji-soft: #1d2b31; --gold: #d4a85c; --dim: #7d7568;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.65 var(--sans); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h2 { font: 600 17px/1.3 var(--serif); margin: 0 0 12px; letter-spacing: .04em; }
h3 { margin: 0; }
p { margin: 8px 0 0; }
.muted { color: var(--ink2); font-size: 13px; }
.note { font-size: 13px; padding: 8px 12px; border-left: 3px solid var(--gold); background: color-mix(in srgb, var(--gold) 9%, transparent); border-radius: 0 6px 6px 0; margin-top: 12px; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink2); white-space: nowrap; }
.link { border: 0; background: none; padding: 0; color: var(--red); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }

.top { border-bottom: 1px solid var(--line); background: var(--card); }
.top-in, .wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.top-in { display: flex; align-items: center; gap: 10px; height: 52px; }
.brand { font: 700 19px var(--serif); letter-spacing: .12em; }
.proto { font-size: 12px; padding: 1px 8px; border-radius: 4px; background: var(--ink); color: var(--paper); }
.top-in .muted { margin-left: auto; text-align: right; }
.wrap { padding-bottom: 40px; }

.bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 0; }
.btn, .bar input { height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.btn:hover:not(:disabled) { border-color: var(--ink2); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.ghost { margin-left: auto; }
.bar input { padding: 0 10px; min-width: 150px; }

.layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
main, aside { display: grid; gap: 16px; align-content: start; min-width: 0; }
@media (min-width: 920px) { .layout { grid-template-columns: minmax(0, 1fr) 320px; } aside { position: sticky; top: 12px; align-self: start; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); }

/* 结论区 */
.hero-date { display: flex; align-items: center; gap: 18px; }
.big { font: 700 76px/1 var(--serif); min-width: 1.15em; text-align: center; }
.ym { color: var(--ink2); }
.lunar { font: 600 18px/1.5 var(--serif); }
.gz { letter-spacing: .06em; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tags .tag { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.verdict { display: flex; gap: 16px; align-items: center; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.seal { flex: none; width: 76px; height: 76px; display: grid; place-items: center; border-radius: 10px; font: 700 30px/1 var(--serif); letter-spacing: .05em; border: 2px solid; }
.tier-daji .seal { background: var(--red); border-color: var(--red); color: #fff; }
.tier-ji .seal { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.tier-ping .seal { color: var(--gold); border-color: var(--gold); }
.tier-xiong .seal { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.verdict-label { font-size: 13px; color: var(--ink2); }
.verdict-body p { margin-top: 2px; }
.term { border: 0; background: none; padding: 0 1px; font-weight: 600; border-bottom: 1px dotted var(--ink2); }
.term:hover { color: var(--red); border-color: var(--red); }

/* 生肖 */
.zodiac { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 12px 18px; }
.zodiac label { color: var(--ink2); font-size: 13px; white-space: nowrap; }
.zodiac select { margin-left: 6px; height: 32px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); padding: 0 6px; }
.zodiac p { margin: 0; flex: 1 1 220px; }
.zodiac.hit { border-color: var(--red); background: var(--red-soft); }

/* 常办的事 */
.quick-grid { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 560px) { .quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 760px) { .quick-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.quick { position: relative; display: grid; gap: 0; text-align: left; padding: 10px 10px 8px; border: 1px solid var(--line); border-radius: 10px; background: none; }
.quick b { font-size: 15px; }
.quick span { font-size: 12px; color: var(--ink2); }
.quick em { font: 700 13px var(--serif); font-style: normal; justify-self: start; padding: 0 7px; border-radius: 4px; margin-bottom: 4px; }
.q-yi { border-color: color-mix(in srgb, var(--red) 45%, transparent); background: var(--red-soft); }
.q-yi em { background: var(--red); color: #fff; }
.q-ji { border-color: color-mix(in srgb, var(--ji) 45%, transparent); background: var(--ji-soft); }
.q-ji em { background: var(--ji); color: var(--card); }
.q-none em { color: var(--dim); border: 1px solid var(--line); }
.q-none b { color: var(--ink2); }

/* 宜忌 */
.src { font: 12px var(--sans); letter-spacing: 0; color: var(--ink2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; vertical-align: 2px; margin-left: 4px; }
.yj-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .yj-grid { grid-template-columns: 3fr 2fr; } .yj-ji { border-left: 1px dashed var(--line); padding-left: 16px; } }
.yj h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.yj-badge { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font: 700 18px var(--serif); color: #fff; }
.yj-yi .yj-badge { background: var(--red); }
.yj-ji .yj-badge { background: var(--ji); color: var(--card); }
.count { font-size: 13px; font-weight: 400; color: var(--ink2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line); background: none; }
.chip b { font-weight: 600; }
.chip span { font-size: 12px; color: var(--ink2); }
.yj-yi .chip:hover { border-color: var(--red); }
.yj-ji .chip:hover { border-color: var(--ji); }
.mark { font-size: 13px; color: var(--ink2); }

/* 时辰 */
.hours { display: grid; gap: 6px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (min-width: 560px) { .hours { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .hours { grid-template-columns: repeat(12, minmax(0, 1fr)); } }
.hour { display: grid; justify-items: center; padding: 8px 2px; border: 1px solid var(--line); border-radius: 8px; background: none; color: var(--dim); }
.hour b { font: 700 18px/1.2 var(--serif); }
.hour span { font-size: 11px; white-space: nowrap; }
.hour i { font-style: normal; font-size: 12px; }
.hour.yellow { color: var(--red); background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.hour.now { outline: 2px solid var(--ink); outline-offset: 1px; }

/* 冲煞与方位 */
.cs { display: grid; gap: 16px; align-items: center; }
@media (min-width: 640px) { .cs { grid-template-columns: 1fr 252px; } }
.cs-text strong { font: 700 20px var(--serif); }
.compass { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; max-width: 280px; }
.cmp { min-height: 76px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cmp small { color: var(--dim); font-size: 11px; }
.cmp.center { justify-content: center; font: 600 15px var(--serif); color: var(--ink2); border-style: dashed; }
.god { font-size: 12px; line-height: 1.5; color: var(--red); background: var(--red-soft); border-radius: 4px; padding: 0 6px; white-space: nowrap; }
.sha { font-size: 12px; line-height: 1.5; color: var(--card); background: var(--ji); border-radius: 4px; padding: 0 6px; }

/* 详细栏目 */
.more summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; cursor: pointer; list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary h2 { margin: 0; }
.more summary::after { content: "展开"; margin-left: auto; color: var(--red); font-size: 13px; }
.more[open] summary::after { content: "收起"; }
.rows { display: grid; grid-template-columns: 5.2em minmax(0, 1fr); gap: 10px 12px; margin: 16px 0 0; }
.rows dt { color: var(--ink2); font-size: 13px; padding-top: 2px; }
.rows dd { margin: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.pill { border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; font-weight: 400; }
.good .pill { color: var(--red); }
.bad .pill { color: var(--ji); }

/* 月历 */
.cal { padding: 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head h2 { margin: 0; }
.icon { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: none; font-size: 18px; line-height: 1; }
.icon:disabled { opacity: .35; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-week span { text-align: center; font-size: 12px; color: var(--dim); padding: 2px 0; }
.cal-day { display: grid; justify-items: center; padding: 4px 0 5px; border: 1px solid transparent; border-radius: 8px; background: none; }
.cal-day b { font: 600 15px/1.3 var(--sans); }
.cal-day span { font-size: 10px; line-height: 1.3; color: var(--dim); white-space: nowrap; }
.cal-day span.is-term { color: var(--red); }
.cal-day i, .legend i { display: block; width: 7px; height: 7px; border-radius: 50%; margin-top: 3px; border: 1.5px solid; }
.t-daji i { background: var(--red); border-color: var(--red); }
.t-ji i { border-color: var(--red); }
.t-ping i { border-color: var(--gold); }
.t-xiong i { background: var(--dim); border-color: var(--dim); }
.cal-day:hover { border-color: var(--line); }
.cal-day.today b { text-decoration: underline; text-underline-offset: 3px; }
.cal-day.sel { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.legend { display: flex; justify-content: center; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--ink2); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { margin: 0; }
.about ul { margin: 0; padding-left: 1.2em; font-size: 13px; color: var(--ink2); }
.about li + li { margin-top: 4px; }

/* 弹层 */
dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); padding: 0; width: min(560px, calc(100vw - 24px)); max-height: min(80vh, 720px); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
dialog::backdrop { background: rgba(20, 15, 10, .45); }
.dlg-in { padding: 20px 20px 16px; }
.dlg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dlg-head h3 { font: 700 22px var(--serif); }
.dict { display: grid; grid-template-columns: 3.2em minmax(0, 1fr); gap: 8px 12px; margin: 0; }
.dict dt { color: var(--ink2); font-size: 13px; padding-top: 2px; }
.dict dd { margin: 0; }
.ftable { border-collapse: collapse; width: 100%; margin-top: 10px; }
.ftable th, .ftable td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.ftable th { font-family: var(--serif); white-space: nowrap; width: 4em; }
.dlg-foot { display: flex; justify-content: flex-end; margin-top: 14px; }

@media (max-width: 480px) {
  .big { font-size: 60px; }
  .lunar { font-size: 16px; }
  .seal { width: 64px; height: 64px; font-size: 26px; }
  .card { padding: 14px; }
  .btn { padding: 0 10px; }
  .btn.ghost { margin-left: 0; }
  .top-in .muted { display: none; }
}

/* 古法推演 */
.gufa-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.gufa-level { flex: none; min-width: 64px; padding: 6px 10px; border: 1.5px solid var(--ink2); border-radius: 8px; text-align: center; }
.gufa-level small { display: block; font-size: 11px; color: var(--ink2); line-height: 1.2; }
.gufa-level b { font: 700 20px/1.3 var(--serif); }
.gufa-rule { font-weight: 600; }
.gufa-head p { margin: 2px 0 0; }
.chip.diff { border-style: dashed; border-color: var(--gold); }
.chip i { font-style: normal; font-size: 12px; color: var(--gold); }
.gufa-more { margin-top: 12px; }
.gufa-more summary { cursor: pointer; color: var(--red); font-size: 13px; }
.gufa-more .pill { cursor: default; }
.fixlist { margin: 10px 0 0; padding-left: 1.4em; }
.fixlist li + li { margin-top: 8px; }
dialog { overflow: auto; }

/* 正式站在原型样式（base.css）之上补的部分：导航、页脚、链接形态、文章排版、列表页。生成时与 base.css 合成一个文件。 */
a { color: inherit; }
.brand { text-decoration: none; white-space: nowrap; flex: none; }
[data-ym].today { outline: 2px solid var(--ink); outline-offset: 1px; }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; }
.nav a { padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--ink2); white-space: nowrap; font-size: 14px; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.foot { border-top: 1px solid var(--line); margin-top: 24px; padding: 20px 0 32px; color: var(--ink2); font-size: 13px; }
.foot .wrap { padding-bottom: 0; }
.foot a { color: var(--ink2); }
.crumb { font-size: 13px; color: var(--ink2); padding: 14px 0 0; }
.crumb a { color: var(--ink2); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.crumb i { font-style: normal; margin: 0 6px; color: var(--dim); }

/* 原型里是按钮的地方，正式站是链接 */
a.btn, span.btn { display: inline-flex; align-items: center; text-decoration: none; }
span.btn.disabled, a.btn.disabled { opacity: .4; }
a.btn.disabled { pointer-events: none; }
a.term { text-decoration: none; font-weight: 600; border-bottom: 1px dotted var(--ink2); }
a.chip, a.quick, a.hour, a.cal-day, a.pill { text-decoration: none; }
span.term { font-weight: 600; }
a.icon, span.icon { display: grid; place-items: center; text-decoration: none; }
span.icon.disabled { opacity: .35; }
.cal-head h2 a { text-decoration: none; }
.hero h1.ym { font: inherit; color: var(--ink2); margin: 0; }
.chip.court { display: none; }
.gufa.show-court .chip.court { display: inline-flex; }
.link { cursor: pointer; }
p a, li a, dd a { color: var(--red); text-underline-offset: 3px; }

/* 文章 */
.article { max-width: 760px; }
.article h1 { font: 700 30px/1.3 var(--serif); margin: 12px 0 8px; letter-spacing: .02em; }
.article .lede { color: var(--ink2); margin: 0 0 16px; }
.draft { font-size: 13px; padding: 8px 12px; border: 1px dashed var(--gold); border-radius: 8px; color: var(--ink2); margin: 0 0 20px; }
.prose { font-size: 16px; line-height: 1.85; }
.prose h2 { font: 700 21px/1.4 var(--serif); margin: 32px 0 10px; padding-top: 8px; border-top: 1px solid var(--line); letter-spacing: .02em; }
.prose h3 { font: 700 17px/1.4 var(--serif); margin: 22px 0 6px; }
.prose p { margin: 10px 0; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 10px 0; }
.prose li + li { margin-top: 4px; }
.prose blockquote { margin: 12px 0; padding: 6px 14px; border-left: 3px solid var(--gold); color: var(--ink2); }
.prose code { font-size: .9em; background: color-mix(in srgb, var(--ink) 6%, transparent); padding: 1px 5px; border-radius: 4px; }
.prose .table-wrap { overflow-x: auto; margin: 14px 0; }
.prose table { border-collapse: collapse; font-size: 14px; line-height: 1.6; min-width: 100%; }
.prose th, .prose td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.prose th { background: color-mix(in srgb, var(--ink) 4%, transparent); white-space: nowrap; font-weight: 600; }
.prose .nolink { color: var(--ink2); }

/* 列表页 */
.page-head h1 { font: 700 28px/1.3 var(--serif); margin: 14px 0 6px; }
.page-head p { color: var(--ink2); margin: 0 0 18px; }
.list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.list a.item { display: block; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.list a.item:hover { border-color: var(--ink2); }
.list a.item b { font: 700 16px/1.4 var(--serif); display: block; }
.list a.item span { font-size: 13px; color: var(--ink2); display: block; margin-top: 4px; }
.section-title { font: 700 19px/1.3 var(--serif); margin: 28px 0 12px; }
.termlist { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.termlist a { text-decoration: none; border: 1px solid var(--line); border-radius: 8px; padding: 3px 10px; background: var(--card); }
.termlist a:hover { border-color: var(--red); }
.termlist a small { color: var(--ink2); margin-left: 6px; }

/* 月历页、吉日页 */
.month-big .cal-day { padding: 8px 0 9px; }
.month-big .cal-day b { font-size: 18px; }
.month-big .cal-day span { font-size: 12px; }
.daylist { display: grid; gap: 8px; }
.dayrow { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.dayrow:hover { border-color: var(--ink2); }
.dayrow .d { font: 700 20px/1.2 var(--serif); min-width: 2.6em; }
.dayrow .info small { color: var(--ink2); display: block; font-size: 13px; }
.badge { font: 700 13px var(--serif); padding: 2px 9px; border-radius: 6px; border: 1.5px solid; white-space: nowrap; }
.badge.t-daji { background: var(--red); border-color: var(--red); color: #fff; }
.badge.t-ji { color: var(--red); border-color: var(--red); }
.badge.t-ping { color: var(--gold); border-color: var(--gold); }
.badge.t-xiong { color: var(--ink2); border-color: var(--dim); }
.monthnav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 16px; }
.pickrow { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.pickrow a { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; background: var(--card); font-size: 14px; }
.pickrow a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
@media (max-width: 560px) {
  .article h1 { font-size: 24px; }
  .prose { font-size: 15.5px; }
  .top-in { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 6px; gap: 2px 8px; }
  .nav { margin-left: 0; width: 100%; flex-wrap: wrap; gap: 0 2px; }
  .nav a { padding: 4px 8px; font-size: 13.5px; }
}

/* 首页与搜索 */
.home-hero { padding: 26px 0 8px; }
.home-hero h1 { font: 700 34px/1.2 var(--serif); margin: 0 0 14px; letter-spacing: .1em; }
.home-hero h1 small { display: block; font: 400 15px/1.6 var(--sans); letter-spacing: 0; color: var(--ink2); margin-top: 6px; }
.search { display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.search input:focus { outline: 2px solid var(--ink2); outline-offset: 1px; }
.search.lg input { height: 46px; font-size: 16px; }
.search.lg .btn { height: 46px; }
.home-layout { margin-top: 16px; }
.home-today .hero-date { margin-bottom: 12px; }
.home-today .seal-wrap { margin-left: auto; }
.home-rows { margin: 0 0 14px; }
.home-jiri .quick { padding: 12px; }
.home-cols { display: grid; gap: 16px 20px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.home-col h3 { font: 700 17px/1.3 var(--serif); }
.home-col h3 a { text-decoration: none; }
.home-col h3 small { display: block; font: 400 13px/1.5 var(--sans); color: var(--ink2); margin-top: 2px; }
.home-col ul { list-style: none; padding: 0; margin: 8px 0 6px; }
.home-col li { margin: 4px 0; }
.home-col .more { font-size: 13px; color: var(--ink2); }
.nav-search { border: 1px solid var(--line); }
.search-results { margin-top: 16px; display: grid; gap: 8px; max-width: 760px; }
.sr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.sr:hover { border-color: var(--ink2); }
.sr b { font: 700 16px/1.4 var(--serif); }
.sr em { font-style: normal; font-size: 12px; color: var(--ink2); align-self: center; white-space: nowrap; }
.sr span { grid-column: 1 / -1; font-size: 13px; color: var(--ink2); }
.sr-date { border-color: var(--red); }

/* 知识文章页和词典页补充的样式。其余尽量复用 site.css 里已有的类（.article .prose .draft .list .termlist .page-head .section-title）。 */
.nolink { color: var(--ink2); }
.section-title a { text-decoration: none; }
.section-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
a.tag { text-decoration: none; }
a.tag:hover { border-color: var(--red); }

/* 参考来源里有很长的网址和文件路径，手机上要能折行 */
.prose { overflow-wrap: break-word; }

/* 列表页顶部的说明、各组导语：和正文同宽 */
.prose.intro { max-width: 760px; }
.prose.intro + .section-title { margin-top: 24px; }

/* 文末：相关文章、上一篇／下一篇 */
.related { margin-top: 36px; }
.list .item.pending { background: var(--card); border: 1px dashed var(--line); border-radius: 12px; padding: 14px 16px; }
.list .item.pending b { font: 700 16px/1.4 var(--serif); display: block; }
.list .item.pending span { font-size: 13px; color: var(--ink2); display: block; margin-top: 4px; }
.pager { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin: 28px 0 0; }
.pager a { display: block; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; min-width: 0; }
.pager a:hover { border-color: var(--ink2); }
.pager small { display: block; color: var(--ink2); font-size: 12px; }
.pager b { font: 600 15px/1.45 var(--serif); }
.pager .next { grid-column: 2; text-align: right; }

/* 词条页 */
.termpage h1 { margin-bottom: 4px; }
.termpage .tags { margin: 0 0 14px; }
.termpage .card { margin: 0 0 14px; }
.termpage .dict { grid-template-columns: 3.4em minmax(0, 1fr); line-height: 1.75; }
.termpage .dict dd { overflow-wrap: anywhere; }
.termpage .dict code { font-size: .9em; background: color-mix(in srgb, var(--ink) 6%, transparent); padding: 1px 5px; border-radius: 4px; }

@media (max-width: 480px) {
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: auto; }
}

/* 事项吉日（/jiri/）的补充样式。生成时自动并在 base.css、site.css 之后。
   尽量复用已有的类（.page-head .daylist .dayrow .badge .pickrow .monthnav .list .note .muted .rows .about）；
   新增的选择器一律以 .j 开头或挂在 .jmain / .jrow 下面，不影响别的页面。颜色只用 base.css 里的变量。 */

.jmain { padding-top: 4px; }
.jmain .page-head p.jsum { color: var(--ink); font-size: 16px; }
.jmain .page-head p.jsum b { font: 700 19px var(--serif); color: var(--red); }
.jhint { margin: 0; }

/* 月页：每一组吉日 */
.jgroup h2 { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.jgroup > p.muted { margin: 0 0 12px; }
.jgroup-down h2 { color: var(--ink2); }

/* 每个吉日一行：基础样式沿用 .dayrow，这里只补日期下的星期、冲生肖、原因、今天 */
.jrow .d { display: grid; justify-items: start; }
.jrow .d small { font: 400 12px/1.3 var(--sans); color: var(--ink2); }
.jrow .info { min-width: 0; }
.jrow .info small + small { margin-top: 2px; }
.jrow .seg { display: inline-block; white-space: nowrap; margin-right: 10px; }
.jchong { color: var(--ji); font-weight: 600; }
.jrow .jwhy { color: var(--ink2); }
.jrow.jdown { border-style: dashed; }
.jrow.jdown .d { color: var(--ink2); }
/* 浏览器脚本给"今天"的行加 .today */
.jrow.today { border-color: var(--red); box-shadow: inset 3px 0 0 var(--red); }
.jrow.today .d::after { content: "今天"; font: 600 12px/1.3 var(--sans); color: var(--red); }

/* 总览页：每年 12 个月的方块 */
.jmonths { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 560px) { .jmonths { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 760px) { .jmonths { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.jm { display: grid; align-content: start; gap: 1px; padding: 9px 10px 8px; text-decoration: none; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.jm:hover { border-color: var(--ink2); }
.jm b { font: 700 16px/1.3 var(--serif); }
.jm span { font-size: 14px; color: var(--red); font-weight: 600; }
.jm small { font-size: 12px; color: var(--ink2); }
.jm.jm-none { background: none; }
.jm.jm-none b, .jm.jm-none span { color: var(--dim); font-weight: 400; }
.card > h2 .count { margin-left: 10px; }

/* 总览页：判定规则 */
.jrules { margin: 0; padding-left: 1.4em; }
.jrules li + li { margin-top: 6px; }
.jnote h2 { margin-bottom: 8px; }
.jnote p.muted { margin-top: 10px; }
.jnote p.muted + p.muted { margin-top: 4px; }

@media (max-width: 480px) {
  .jmain .page-head p.jsum { font-size: 15px; }
  .jrow { gap: 8px; padding: 10px; }
  .jrow .d { font-size: 18px; }
}
