@charset "UTF-8";
/* ==================================================================
   万年历 · 样式表（与主站同一套配色：米灰页底 + 960 白底内容区）
   页头 / 页脚 / 内容外框由主站的 assets/header.css + assets/chrome.css 提供，
   本文件只负责日历正文（月历、宜忌、通书表等）的排版。
   ================================================================== */
:root {
  /* —— 面 ——
     内容区已经是白底（主站 .wrapper），所以卡片不再用纯白纸面色，
     统一走 #fff + 浅灰描边，和主站 .box 的观感一致。 */
  --paper:      #f7f7f7;
  --paper-2:    #f2f2f2;
  --paper-3:    #ebebeb;
  --card:       #ffffff;
  --line:       #e2e2e2;
  --line-soft:  #eeeeee;
  /* 表单控件 / 浮层等需要略亮一档的「近白面」 */
  --field:      #ffffff;

  /* —— 墨色 ——
     中性灰墨比暖墨更适合白底；正文 #333 与主站 body 同色。 */
  --ink:        #333333;
  --ink-2:      #4a4a4a;
  --muted:      #6f6f6f;
  --muted-2:    #7a7a7a;

  /* —— 彩（与主站的 #c33 红、#d81313 字色对齐）—— */
  --red:        #cc3333;
  --red-deep:   #aa1111;
  --red-soft:   #fbeae7;
  --gold:       #b8902f;
  --gold-soft:  #faf2df;
  --green:      #3b7d4f;
  --green-soft: #eaf4ee;
  --blue:       #31648f;
  --blue-soft:  #ecf2f8;

  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 1px 2px rgba(80, 60, 30, .05), 0 6px 16px rgba(80, 60, 30, .06);
  --shadow-lg:  0 10px 30px rgba(80, 60, 30, .16);

  --sans:  -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
           "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  --serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", "SimSun", serif;
  /* 数字：使用系统无衬线 UI 字体 + tabular-nums，避免衬线数字长短不齐 */
  --num:   "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Source Han Sans SC", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0;
  /* 页底与主站 body 同色（主站 assets/style.css 的 body{background:#f2f0ea}） */
  background: #f2f0ea;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: #f6d9d3; color: var(--red-deep); }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
ul, ol, li { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; }
p { margin: 0; }
b, strong { font-weight: 700; }

input, select, button, textarea { font-family: inherit; font-size: inherit; color: inherit; }

.serif { font-family: var(--serif); }
.num   { font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* 容器：已经站在主站 .wrapper（960 白底）里面，这里只负责内边距与刘海屏安全区 */
.max {
  max-width: 100%;
  margin: 0;
  padding: 6px 10px;
  padding-left:  max(10px, env(safe-area-inset-left));
  padding-right: max(10px, env(safe-area-inset-right));
}
.blank { height: 16px; clear: both; }

/* ================= 顶部 / 导航 =================
   页头（站名、栏目标题、主导航、二级菜单）与工具栏统一由主站的
   inc/header.php::site_header() 输出，样式在 assets/header.css，
   子站不再自己画一份。 */

/* ================= 通用卡片 / 标题 ================= */
.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.tit {
  position: relative;
  padding: 2px 0 2px 13px; margin: 0 0 14px;
  font-size: 19px; letter-spacing: .5px; color: var(--ink);
  font-family: var(--serif);
}
.tit::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 4px; border-radius: 3px;
  background: linear-gradient(180deg, var(--red), #e08a7c);
}
.tit small {
  font-size: 13.5px; color: var(--muted); font-weight: 400;
  margin-left: 9px; font-family: var(--sans); letter-spacing: 0;
}

.sec { margin-top: 18px; padding: 18px 20px; }
.sec > .tit { margin-bottom: 14px; }
/* 说明段落：加大行距与对比，便于阅读（.note 小字注释保持原样式） */
.sec > p:not(.note) {
  font-size: 15.5px; line-height: 1.95; color: var(--ink-2); padding: 4px 0;
}
.sec > p:not(.note) > label {
  color: var(--muted); font-size: 14.5px; font-weight: 700; margin-right: 6px;
}

/* ================= 主体两列 ================= */
.cols { display: flex; gap: 16px; align-items: flex-start; }
.col-main { flex: 1 1 auto; min-width: 0; }
.col-side { flex: 0 0 300px; }

/* ================= 月历容器 ================= */
.cal-nav {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 12px 14px; border-bottom: 1px solid var(--line-soft);
}
.cal-nav .step { display: inline-flex; align-items: center; gap: 4px; }
.cal-nav .btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; padding: 6px 9px; border: 1px solid var(--line);
  background: #fdfaf3; border-radius: var(--radius-sm); color: var(--ink-2);
  font-size: 15px; cursor: pointer; transition: .15s; white-space: nowrap;
}
.cal-nav .btn:hover {
  border-color: var(--red); color: var(--red); background: #fff;
}
.cal-nav .label {
  font-size: 21px; font-weight: 700; color: var(--red-deep);
  font-family: var(--serif); min-width: 74px; text-align: center;
}
.cal-nav select {
  border: 1px solid var(--line); background: var(--field); padding: 5px 7px;
  border-radius: var(--radius-sm); color: var(--ink); font-size: 15px;
}
.cal-nav .today-btn {
  margin-left: auto; color: #fff; background: var(--red); border-color: var(--red);
  font-weight: 700;
}
.cal-nav .today-btn:hover { background: var(--red-deep); color: #fff; }
/* 合并后的一行式日期导航：末尾灰字范围提示 */
.cal-nav .hint { font-size: 13.5px; color: var(--muted); line-height: 1.6; padding-left: 2px; }
.cal-nav .step.jmp-group { padding-left: 2px; }
.cal-nav .step.jmp-group .btn { min-width: 26px; padding: 6px 7px; }
/* 内容区宽 960（与主站页头对齐）后，「年月步进 + 快速跳年 + 返回今日 + 范围提示」一行放不下，
   后两项独占一行：按钮靠左、范围提示靠右 */
.cal-nav .nav-end {
  flex: 1 0 100%; display: flex; align-items: center; gap: 8px; margin-top: 2px;
}
.cal-nav .nav-end .today-btn { margin-left: 0; }
.cal-nav .nav-end .hint { margin-left: auto; }

.wnl { padding: 12px 14px 16px; }
.wnl .week, .wnl .grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
}
.wnl .week { margin-bottom: 8px; }
.wnl .week li {
  text-align: center; font-size: 14px; font-weight: 700; color: var(--ink-2);
  padding: 8px 0; background: var(--paper-2); border-radius: var(--radius-sm);
  letter-spacing: 2px;
}
.wnl .week li.we, .wnl .week li.su { color: var(--red); background: var(--red-soft); }

.wnl .grid { position: relative; }
.day {
  position: relative; min-height: 88px;
  border: 1px solid var(--line-soft); border-radius: 10px; background: var(--card);
  text-align: center; transition: border-color .15s, box-shadow .15s, transform .15s;
  overflow: hidden;
}
.day > a { display: block; padding: 7px 3px 5px; color: inherit; }
.day:hover {
  border-color: var(--red); box-shadow: 0 5px 14px rgba(150, 35, 26, .13);
  transform: translateY(-1px); z-index: 2;
}
.day.out { background: #f4efe2; }
.day.out .dd { color: #bdb4a2; }
.day.out .ln { color: #c6bda9; }
.day .dd {
  display: inline-block; min-width: 1.6em; text-align: center; font-size: 22px; font-weight: 700; line-height: 1.15; color: var(--ink);
  font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; letter-spacing: 0;
}
.day .ln {
  display: block; font-size: 14px; line-height: 1.35; color: var(--ink-2);
  margin-top: 3px; font-family: var(--serif); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -.2px;
}
.day .ln.festival { color: var(--red); }
.day .ln.jieqi    { color: var(--gold); font-weight: 700; }
.day .ln.other    { color: var(--blue); }
.day.is-sun .dd, .day.is-sat .dd { color: var(--red); }
.day.rest .dd, .day.rest .ln { color: #c79736; }

.day .tag {
  position: absolute; top: 4px; right: 5px; font-size: 12px; line-height: 1;
  padding: 3px 6px; border-radius: 5px; color: #fff; font-style: normal;
  font-weight: 700; letter-spacing: 0;
}
.day .tag.xiu { background: #d9534f; }
.day .tag.ban { background: #6b7f96; }
/* 推算出的节日当天（官方放假安排尚未公布）：空心 + 虚线，区别于权威数据 */
.day .tag.xiu.pre {
  background: transparent; color: #c79736;
  border: 1px dashed #c79736; padding: 2px 4px;
}
.day.rest-pre .dd { color: #c79a4e; }

.day.today {
  border-color: var(--red); background: var(--red-soft);
  box-shadow: inset 0 0 0 1px rgba(192, 57, 43, .28);
}
.day.today .dd { color: var(--red); }
.day.sel {
  background: var(--gold-soft); border-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(184, 144, 47, .5);
}
.day.sel.today { border-color: var(--red); box-shadow: inset 0 0 0 1px rgba(192, 57, 43, .35); }

/* ================= 右侧「今日宜忌」 ================= */
.jiyi { padding: 18px; text-align: center; }
.jiyi .j-top { font-size: 15px; color: var(--ink-2); letter-spacing: .5px; }
.jiyi .j-day {
  display: inline-block; min-width: 1.35em; text-align: center;
  font-size: 80px; line-height: 1; font-weight: 700; color: var(--red);
  font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
  margin: 4px 0 6px; text-shadow: 0 2px 0 rgba(192, 57, 43, .08);
}
.jiyi .j-lunar {
  font-size: 18.5px; color: var(--ink); letter-spacing: 1px;
  font-family: var(--serif); font-weight: 700;
}
.jiyi .j-gz {
  font-size: 14px; color: var(--muted); margin-top: 3px; line-height: 1.7;
  word-break: break-all;
}
.yjrow {
  display: flex; gap: 10px; align-items: flex-start; text-align: left;
  padding: 10px 0; border-top: 1px dashed var(--line-soft);
}
.yjrow b {
  flex: 0 0 33px; height: 33px; line-height: 33px; text-align: center; color: #fff;
  border-radius: var(--radius-sm); font-size: 16px;
}
.yjrow.yi b { background: var(--red); }
.yjrow.ji b { background: var(--green); }
.yjrow .words { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.yjrow .words span {
  font-size: 14.5px; padding: 3px 10px; border-radius: 999px;
  background: var(--paper-2); color: var(--ink-2); line-height: 1.5;
}
.yjrow.yi .words span { background: var(--red-soft); color: var(--red-deep); }
.yjrow.ji .words span { background: var(--green-soft); color: var(--green); }
.jiyi .more {
  display: inline-block; margin-top: 14px; color: var(--red); font-size: 15px;
  font-weight: 700; padding: 6px 14px; border: 1px solid #eccfc9;
  border-radius: 999px; background: var(--red-soft); transition: .15s;
}
.jiyi .more:hover { background: var(--red); color: #fff; border-color: var(--red); }
.jiyi .more + .more { margin-left: 8px; }

/* ================= 侧栏：本月节气 / 本月节日 ================= */
.sidebox { padding: 12px 14px 6px; margin-top: 14px; }
.sidebox .side-tit {
  position: relative; margin: 0 0 2px; padding: 2px 0 2px 12px;
  font-size: 16.5px; letter-spacing: .5px; color: var(--ink);
  font-family: var(--serif); font-weight: 700;
}
.sidebox .side-tit::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 4px; border-radius: 3px; background: var(--gold);
}
.sidebox .side-tit small { font-size: 12.5px; font-weight: 400; margin-left: 6px; }
.sidebox .side-tit small a { color: var(--muted); }
.sidebox .side-tit small a:hover { color: var(--red); }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { border-top: 1px dashed var(--line-soft); }
.side-list li:first-child { border-top: 0; }
.side-list li.empty { padding: 8px 2px; color: var(--muted); font-size: 13px; }
.side-list a {
  display: block; padding: 7px 2px 8px; text-decoration: none;
}
.side-list .l1 {
  display: flex; align-items: baseline; gap: 7px; min-width: 0;
}
.side-list .nm {
  font-family: var(--serif); font-weight: 700; font-size: 15.5px;
  color: var(--ink); white-space: nowrap; transition: color .15s;
}
.side-list .dt {
  flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--ink-2);
  font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.side-list .rl { font-size: 12px; color: var(--muted); white-space: nowrap; }
.side-list a:hover .nm { color: var(--red); }
/* 侧栏本月节气：交节时刻（X时XX分），比日期弱一档 */
.side-list .dt .tm {
  font-style: normal; font-weight: 500;
  color: var(--muted); white-space: nowrap;
}

/* 「查看月历」等通用跳转链接 + 选择器行 */
a.more { color: var(--red); font-weight: 700; white-space: nowrap; }
.picker-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.picker-row > a.more { margin-left: auto; }
.picker-row .form-inline { flex: 1 1 auto; min-width: 0; }

/* ================= 老黄历页头部 ================= */
.hl-head {
  display: flex; align-items: stretch; gap: 0; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; overflow: hidden;
}
.hl-head .hl-title {
  flex: 1; padding: 15px 20px; min-width: 0;
  background: linear-gradient(135deg, #c0392b, #90231a); color: #fff;
}
.hl-head .hl-title h1 {
  font-size: 28px; letter-spacing: 2px; font-family: var(--serif); line-height: 1.35;
}
.hl-head .hl-title h1 .num { font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.hl-head .hl-title p { font-size: 14px; opacity: .92; margin-top: 2px; line-height: 1.6; }
.hl-nav { display: flex; }
.hl-nav a {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 0 20px; min-width: 106px; border-left: 1px solid var(--line-soft);
  color: var(--ink-2); font-size: 14px; background: #fdfaf3; transition: .15s;
}
.hl-nav a:hover { background: var(--red-soft); color: var(--red); }
.hl-nav a b { font-size: 16px; white-space: nowrap; }
.hl-nav a span { font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ================= 顶部信息条（生肖/冲煞/星座/星期/农历） ================= */
.one {
  display: flex; align-items: stretch; gap: 0;
  background: var(--card); border: 1px solid var(--line); border-top: none;
  border-radius: 0 0 var(--radius) var(--radius); padding: 14px 16px; flex-wrap: wrap;
}
.one .sx { display: flex; align-items: center; justify-content: center; }
.one .sx svg { border-radius: 12px; box-shadow: 0 3px 12px rgba(0, 0, 0, .1); }
.one .blk {
  flex: 1 1 auto; min-width: 0; padding: 10px 12px; text-align: center;
  border-left: 1px solid var(--line-soft);
  /* 块内容垂直居中：左侧生肖印较高时，文字块不再贴顶 */
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.one .blk .k {
  font-size: 13.5px; color: var(--muted); letter-spacing: 1px; line-height: 1.5;
  white-space: nowrap;
}
.one .blk .v {
  font-size: 21px; font-weight: 700; color: var(--ink);
  font-family: var(--serif); margin-top: 3px; line-height: 1.35;
  white-space: nowrap;
}
.one .blk .v.red { color: var(--red); }
/* 冲煞第二行「煞X」：稍小、贴紧第一行 */
.one .blk .v.sub { font-size: 17px; margin-top: 1px; opacity: .92; }
/* 冲煞/星座块为横向布局（徽记 + 文字），覆盖上面的纵向排列 */
.one .chong-box {
  display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 10px;
}
.one .chong-box svg { border-radius: 12px; }
.one .chong-txt { text-align: left; }

/* ================= 老黄历页主视觉（三列：宜 / 日期 / 忌） ================= */
/* 纸面统一：整个主视觉内部都是「白纸」，只靠双线框与细分割线分区。
   早先宜 / 忌 两栏铺的是土黄底（#efe8da / #ece5d6），和中列、下方格子的
   近白纸面完全不是一套色，看着像贴了两块旧牛皮纸，故全部改为统一纸面。 */
.hl-hero {
  --hl-paper: var(--card);      /* 主视觉纸面 = 全站卡片色 */
  --hl-line:  var(--line);      /* 内部分割线 = 全站通用线色 */
  position: relative;
  display: grid; grid-template-columns: 1.05fr 1.75fr 1.05fr; gap: 0;
  align-items: stretch;
  background: var(--hl-paper);
  border: 1px solid #c4b18c;
  border-radius: 3px;
  padding: 4px;
  overflow: hidden;
}
/* 内层细线：形成传统「双线框」（外金茶粗线 + 留白 + 内细线） */
.hl-hero::after {
  content: ''; position: absolute; inset: 3px;
  border: 1px solid #ded1b9; border-radius: 2px;
  pointer-events: none; z-index: 2;
}
.hl-col { display: flex; flex-direction: column; min-width: 0; position: relative; z-index: 1; }
.hl-col.left, .hl-col.right { background: transparent; }
.hl-col.left  { border-right: 1px solid var(--hl-line); }
.hl-col.right { border-left: 1px solid var(--hl-line); }
.hl-col.mid   { background: transparent; }

/* —— 宜 / 忌 栏（徽记 + 词条自然排列，参考主流黄历 App） —— */
.hl-yj {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 12px 14px; gap: 12px;
}
/* 宜/忌 栏右上角的解说入口 */
.hl-yj > .qm { position: absolute; top: 11px; right: 10px; }
/* 宜 / 忌 两栏不再各铺一层土黄底 —— 与纸面同色，区分只交给徽记与词条颜色 */
.hl-yj.ji { background: transparent; }
.hl-badge { flex: none; }
.hl-badge i {
  display: block; width: 62px; height: 62px; line-height: 62px; border-radius: 50%;
  text-align: center; color: #fff; font-size: 29px; font-weight: 700;
  font-family: var(--serif); font-style: normal;
  box-shadow: 0 3px 9px rgba(0,0,0,.18);
}
.hl-yj.yi .hl-badge i { background: #35934a; }
.hl-yj.ji .hl-badge i { background: #3a3a3a; }

/* 词条：空格分隔自然换行，全部词条都显示（参考图样式） */
.hl-yj .words {
  width: 100%; display: flex; flex-wrap: wrap;
  justify-content: center; align-items: baseline; gap: 5px 12px;
}
/* 字重策略（实测墨量）：本机衬线栈落到宋体 SimSun，只有 400/700 两个面，
   500 与 400 渲染完全一致（墨量 1012 : 1012），必须给到 600 浏览器才会做
   合成加粗（墨量 →1388，+37%），笔画终于立得住。
   无衬线栈落到 Noto Sans SC 可变字重，500 是真实中等字重（墨量 1714 → 2108，+23%）。 */
.hl-yj .words span {
  font-family: var(--serif); font-size: 16px; line-height: 1.5;
  letter-spacing: 1px; color: var(--ink-2); font-weight: 600;
}
.hl-yj.yi .words span { color: #2f8f45; }
.hl-yj.ji .words span { color: #3a3a3a; }
.hl-yj .words span.empty { color: var(--muted); letter-spacing: 0; }

/* —— 灰条：胎神 / 五行 —— */
.hl-strip {
  position: relative;
  background: #7d7d7d; color: #fff; text-align: center;
  padding: 8px 26px; font-size: 13.5px; letter-spacing: .3px; line-height: 1.5;
  font-weight: 500;
}
.hl-strip > .qm {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  color: #fff; opacity: .8;
}
.hl-strip > .qm:hover { color: #fff; background: rgba(255, 255, 255, .22); border-color: #fff; opacity: 1; }

/* —— 左右列底部两格：吉神宜趋|财神位 / 凶煞宜忌|冲煞 —— */
.hl-pair {
  flex: 1; display: grid; grid-template-columns: 1fr 1fr; align-content: start;
  background: transparent;
}
.hl-cell { padding: 10px 7px 14px; min-width: 0; border-right: 1px solid var(--hl-line); }
.hl-cell:last-child { border-right: none; }
.hl-cell h4 {
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
  font-size: 14.5px; color: var(--ink); margin: 0 0 8px; padding-bottom: 6px;
  border-bottom: 1px solid var(--hl-line); font-weight: 700; letter-spacing: .5px;
}
/* keep-all：吉神/凶煞是一串用全角空格分隔的词，一旦容器变窄，
   浏览器会在词中间断行（「驿」「马」分居两行）。keep-all 禁止 CJK 字间断行，
   只允许在全角空格处换行，「词」才会整颗掉到下一行。 */
.hl-cell p { font-size: 13.5px; color: var(--ink-2); line-height: 1.95; margin: 0; font-weight: 500; word-break: keep-all; }
.hl-cell p.chong { font-size: 13.5px; letter-spacing: -.2px; color: var(--red-deep); font-weight: 700; }
.hl-cell ul { list-style: none; margin: 0; padding: 0; }
.hl-cell li { font-size: 13.5px; color: var(--ink-2); line-height: 1.95; font-weight: 500; }
.hl-cell li span { color: var(--muted); }
.hl-cell .cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 6px; }
.hl-cell .cols2 span { font-size: 13.5px; color: var(--ink-2); line-height: 1.95; font-weight: 500; }
/* 吉神方位：六神方位逐行列出 */
.hl-cell .pos-list li { white-space: nowrap; }
.hl-cell .pos-list li span { color: var(--muted); }

/* —— 中间列：公历 / 日期 / 农历 / 干支 —— */
.hl-main {
  flex: 1; padding: 14px 16px 8px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.hl-meta {
  font-size: 15px; color: var(--ink); font-weight: 600; letter-spacing: .3px; margin-bottom: 6px;
  font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
}
.hl-date-row { display: flex; align-items: center; justify-content: center; gap: 22px; }
.hl-arr {
  width: 46px; height: 46px; border-radius: 50%;
  background: #1f1f1f; color: #fff;
  font-size: 26px; line-height: 44px; text-align: center;
  text-decoration: none; transition: .15s; font-family: var(--serif);
}
.hl-arr:hover { background: var(--red); }
.hl-bigday {
  font-size: 100px; font-weight: 700; color: #c0392b; line-height: .92;
  font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
}
.hl-week {
  display: flex; align-items: baseline; justify-content: center; gap: 4px;
  color: var(--red); margin-top: 4px;
}
.hl-week em { font-style: normal; font-size: 16px; font-weight: 700; }
.hl-week b  { font-size: 30px; font-weight: 700; line-height: 1; font-family: var(--serif); }
.hl-lunar {
  font-size: 16.5px; color: var(--ink); margin-top: 6px;
  font-family: var(--serif); letter-spacing: .5px; font-weight: 600;
}
/* 当天交节的精确时刻（仅在交节日出现） */
.hl-jqtime {
  margin-top: 7px; font-size: 16.5px; line-height: 1.6;
  color: var(--red-deep); font-family: var(--serif); letter-spacing: .5px; font-weight: 600;
}
.hl-jqtime .qm { vertical-align: 1px; }
.hl-gzbox {
  width: fit-content; max-width: calc(100% - 28px);
  margin: 10px auto 14px; border: 1px solid #cbbb9d;
  padding: 8px 18px; background: var(--hl-paper); text-align: center;
  box-shadow: inset 0 0 0 2px var(--hl-paper), inset 0 0 0 3px var(--hl-line);
}
.hl-gz {
  font-size: 17px; font-weight: 700; color: var(--ink);
  letter-spacing: 1px; font-family: var(--serif);
}
.hl-pz { font-size: 14px; color: var(--ink-2); margin-top: 5px; line-height: 1.6; font-weight: 500; }

/* ================= 三列：宜忌 / 财神方位 / 值神 ================= */
.two { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.two > .box {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 14px; box-shadow: var(--shadow);
}
.zy {
  text-align: center; font-size: 20px; letter-spacing: 2px; color: #fff;
  background: linear-gradient(135deg, #cfae5d, #b4872c); border-radius: var(--radius-sm);
  padding: 10px 0; margin-bottom: 13px; font-family: var(--serif);
  box-shadow: 0 2px 8px rgba(180, 135, 44, .22);
}
.zy b { font-weight: 400; font-size: 14.5px; opacity: .92; margin-right: 6px; }
.zy small { font-family: var(--sans); letter-spacing: 0; }
.zy.red  { background: linear-gradient(135deg, #c0392b, #8f2317); box-shadow: 0 2px 8px rgba(143, 35, 23, .22); }
.zy.dark { background: linear-gradient(135deg, #3f7f52, #2b5b39); box-shadow: 0 2px 8px rgba(43, 91, 57, .22); }

.jp { display: flex; gap: 10px; padding: 8px 0; align-items: flex-start; }
.jp i, .jp em {
  flex: 0 0 31px; height: 31px; line-height: 31px; text-align: center; font-size: 14.5px;
  color: #fff; border-radius: var(--radius-sm); font-style: normal; font-weight: 700;
}
.jp.yi i, .jp.yi em { background: var(--red); }
.jp.ji i, .jp.ji em { background: var(--green); }
.jp.j1 em { background: var(--blue); }
.jp.j2 em { background: #8a6d3b; }
.jp .words { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.jp .words span {
  font-size: 14.5px; padding: 3px 10px; border-radius: 999px;
  background: var(--paper-2); color: var(--ink-2); line-height: 1.5;
}
.jp.yi .words span { background: var(--red-soft);   color: var(--red-deep); }
.jp.ji .words span { background: var(--green-soft); color: var(--green); }
.jp.j1 .words span { background: var(--blue-soft);  color: var(--blue); }
.jp.j2 .words span { background: var(--gold-soft);  color: #7a5a2a; }

.jx-box { text-align: center; margin-bottom: 14px; }
.jx-box .cap { font-size: 14px; color: var(--ink-2); margin-top: 8px; line-height: 1.7; font-weight: 500; }
.jx-box .cap b { color: var(--gold); font-size: 16px; }
.fw { display: grid; grid-template-columns: repeat(auto-fit, minmax(98px, 1fr)); gap: 8px; }
.fw li {
  background: var(--paper-2); border-radius: var(--radius-sm); padding: 9px 4px;
  text-align: center; font-size: 15.5px; border: 1px solid var(--line-soft);
  font-weight: 600; line-height: 1.5;
}
.fw li b {
  display: block; font-size: 12.5px; color: var(--muted); font-weight: 500;
  letter-spacing: .5px;
}

/* ================= 六宫格 ================= */
.fres { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.fres .c {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 12px; text-align: center; box-shadow: var(--shadow);
}
.fres .c .k {
  font-size: 13.5px; color: #fff; background: var(--red); display: inline-block;
  padding: 4px 13px; border-radius: 999px; margin-bottom: 10px; letter-spacing: 1px;
  font-weight: 700; transition: .15s;
}
/* 胶囊标题即解说页链接：整块可点 */
a.k:hover { filter: brightness(1.1); box-shadow: 0 3px 10px rgba(0, 0, 0, .16); }
.fres .c .k .qm { color: #fff; opacity: .75; margin-left: 6px; vertical-align: 1px; }
a.k:hover .qm { opacity: 1; }
.fres .c .k .qm:hover { background: rgba(255, 255, 255, .25); border-color: #fff; }
.fres .c .v {
  font-size: 18.5px; color: var(--ink); font-family: var(--serif); font-weight: 700;
  line-height: 1.6;
}
.fres .c .v.small { font-size: 15px; color: var(--ink-2); font-weight: 500; line-height: 1.7; }
/* 吉凶 / 黄黑道 标注：吉·黄道=红，凶·黑道=绿（与全站吉凶配色一致） */
.fres .c .v .lk { font-style: normal; font-weight: 700; font-size: .78em; letter-spacing: 0; }
.fres .c .v .lk.ji    { color: var(--red); }
.fres .c .v .lk.xiong { color: var(--green); }
.fres .c.gold .k  { background: var(--gold); }
.fres .c.green .k { background: var(--green); }
.fres .c.blue .k  { background: var(--blue); }
.fres .c.wide { grid-column: span 4; }
.fres .c.span2 { grid-column: span 2; }
.fres .c.xiu {
  display: flex; flex-direction: column; align-items: stretch;
  text-align: left; padding: 16px 18px;
}
.fres .c.xiu .k { align-self: flex-start; }
.xiu-main { margin-top: 4px; }
.xiu-title {
  font-size: 22px; font-weight: 700; color: var(--ink);
  font-family: var(--serif); line-height: 1.4;
}
.xiu-sub {
  font-size: 14.5px; color: var(--muted); margin-top: 3px; line-height: 1.6; font-weight: 500;
}
.xiu-poem {
  font-size: 14px; color: var(--ink-2); font-family: var(--sans); font-weight: 500;
  line-height: 1.85; margin-top: 10px; text-align: justify;
}
.fres .c .v.poem {
  font-size: 13.5px; color: var(--ink-2); font-family: var(--sans); font-weight: 500;
  line-height: 1.65; margin-top: 6px; text-align: justify;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ================= 今日方位与冲合 ================= */
.rel { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.rel-box {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.rel-box > .k {
  font-size: 13.5px; color: #fff; background: var(--red); display: inline-block;
  padding: 4px 15px; border-radius: 999px; margin-bottom: 12px; letter-spacing: 1px; font-weight: 700;
}
.rel-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.rel-tag {
  font-size: 14px; color: var(--ink-2); background: var(--paper-2);
  border: 1px solid var(--line-soft); border-radius: 999px; padding: 5px 14px;
  font-weight: 500;
}
/* 标签内嵌的「?」解说徽标：跟着文字基线走，别把胶囊撑高 */
.rel-tag .qm { width: 14px; height: 14px; font-size: 10px; margin-left: 5px; vertical-align: 0; }
.rel-tag .qm:hover { color: var(--red); opacity: 1; }
/* 高亮款：合太岁（六合）/ 三合 —— 红字纸底红边，与其他标签拉开层次 */
.rel-tag.hl {
  color: var(--red); font-weight: 700;
  background: var(--card); border-color: #e0b4ab;
}
.rel-tag.hl .qm { color: var(--red); border-color: #e0b4ab; }
.rel-note { margin-top: 9px; font-size: 12.5px; line-height: 1.75; color: var(--muted); font-weight: 500; }
/* 多条说明（三合一句 + 六合一句）连排，按换行读，不留额外段间距 */
.rel-note + .rel-note { margin-top: 0; }
.rel-note b { color: var(--ink-2); font-weight: 700; }
.ss-tip { margin-top: 9px; font-size: 12.5px; line-height: 1.75; color: var(--muted); font-weight: 500; }
.ss-tip::before { content: '提示：'; color: var(--green); font-weight: 700; }
.ss-list { list-style: none; margin: 0; padding: 0; }
.ss-list li { font-size: 14.5px; color: var(--ink-2); line-height: 2; font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; font-weight: 500; }
.ss-list b { color: var(--ink); font-weight: 700; }

/* 十二时辰小宫格 */
.hourbox { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; }
.hourbox li {
  background: var(--paper-2); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 7px 0; font-size: 14px; text-align: center; line-height: 1.45;
  font-family: var(--serif); font-weight: 600;
}
.hourbox li b { font-weight: 700; margin-left: 1px; }
.hourbox li.g { background: var(--red-soft); color: var(--red-deep); border-color: #f0cfcb; }
.hourbox li.b { background: var(--green-soft); color: var(--green); border-color: #cfe3d6; }

/* ================= 信息列表 ================= */
.info { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0 22px; }
.info li {
  display: flex; align-items: baseline; gap: 5px;
  font-size: 15.5px; color: var(--ink); font-weight: 500;
  border-bottom: 1px dashed var(--line-soft); padding: 8px 0; line-height: 1.6;
  min-width: 0;
}
/* 标签定宽 + 两端对齐，冒号对齐后数值列自然成一条线 */
.info li label {
  flex: 0 0 4.7em; color: var(--muted); font-size: 14.5px; font-weight: 500;
  text-align: justify; text-align-last: justify; margin-right: 4px;
}
.info li > span, .info li > i { font-style: normal; }

/* 倒计时/年度进度里的数字统一字体 */
.countdown b, .countdown .count-meta { font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.countdown .count-meta { color: var(--muted); font-size: 13.5px; }

/* ================= 时辰吉凶表 ================= */
.lsr ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.lsr > ul > li {
  display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px;
}
.lsr .zn { text-align: center; }
.lsr .zn b {
  display: block; width: 46px; height: 46px; line-height: 44px; border-radius: 50%;
  background: var(--red-soft); color: var(--red-deep); font-size: 20px; border: 1px solid #f0d5d1;
  font-family: var(--serif);
}
.lsr .zn em { display: block; font-size: 13.5px; font-style: normal; margin-top: 5px; font-weight: 700; }
.lsr .zn em.ji { color: var(--red); }
.lsr .zn em.xiong { color: var(--green); }
.lsr .scjx { min-width: 0; }
.lsr .scjx h3 { font-size: 15.5px; color: var(--ink); font-weight: 700; line-height: 1.6; }
.lsr .scjx h4 { font-size: 13.5px; color: var(--muted); font-weight: 500; margin-bottom: 6px; line-height: 1.6; }
.lsr .scjx p { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; margin-top: 5px; }
.lsr .scjx p i {
  flex: 0 0 27px; height: 27px; line-height: 27px; text-align: center; font-style: normal;
  color: #fff; border-radius: 6px; font-size: 13.5px; font-weight: 700;
}
.lsr .scjx p.y i { background: var(--red); }
.lsr .scjx p.j i { background: var(--green); }
.lsr .scjx p.w i { background: var(--gold); }
.lsr .scjx p span { flex: 1; color: var(--ink-2); line-height: 1.75; min-width: 0; font-weight: 500; }

/* ================= 表格 ================= */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -2px; padding: 0 2px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.tbl th, .tbl td { border: 1px solid var(--line-soft); padding: 10px 12px; text-align: left; }
.tbl th {
  background: var(--paper-2); color: var(--ink-2); font-weight: 700;
  white-space: nowrap; letter-spacing: .5px;
}
.tbl td { line-height: 1.65; font-weight: 500; }
.tbl td.c { text-align: center; }
.tbl tbody tr:nth-child(even) td { background: #f4efe2; }
.tbl tr:hover td { background: #fff8ec; }
.tbl .xg { color: var(--red); font-weight: 700; }
.tbl .ban { color: var(--blue); }
.tbl .btn-cell { white-space: nowrap; }
.tbl a.btn {
  display: inline-block; padding: 4px 12px; border: 1px solid var(--red);
  border-radius: 999px; color: var(--red); font-size: 14px; font-weight: 700;
  transition: .15s;
}
.tbl a.btn:hover { background: var(--red); color: #fff; }

/* 更新历法库页（update-lib.php）的按钮与执行日志 */
.upd-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.upd-btns a.btn {
  display: inline-block; padding: 7px 16px; border: 1px solid var(--red);
  border-radius: 999px; color: var(--red); font-size: 14.5px; font-weight: 700;
  background: var(--red-soft); text-decoration: none; transition: .15s;
}
.upd-btns a.btn:hover { background: var(--red); color: #fff; }
.upd-btns a.btn.ghost {
  color: var(--muted); border-color: var(--line); background: var(--field);
}
.upd-btns a.btn.ghost:hover { color: #fff; background: var(--muted); border-color: var(--muted); }
/* 更新页：身份状态条 */
.upd-state {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 14px; padding: 8px 14px; font-size: 13.5px; font-weight: 600;
  background: var(--field); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
}
.upd-state .ok { color: var(--green); }
.upd-state .no { color: var(--red); }
.upd-state .tag { color: var(--muted); font-weight: 500; }
.upd-state a {
  font-size: 13px; font-weight: 500; color: var(--muted);
  border-bottom: 1px dashed var(--line); text-decoration: none;
}
.upd-state a:hover { color: var(--red); border-bottom-color: var(--red); }

/* 更新页：口令输入 */
.upd-auth {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 14px; padding: 10px 14px;
  background: var(--field); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
}
.upd-auth label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.upd-auth input[type="text"] {
  flex: 1 1 200px; min-width: 0; padding: 6px 10px; font-size: 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--card); color: var(--ink);
}
.upd-auth button {
  padding: 6px 18px; font-size: 14px; font-weight: 700; cursor: pointer;
  color: #fff; background: var(--red); border: 0; border-radius: var(--radius-sm);
}
.upd-auth button:hover { background: var(--red-deep); }

/* 更新页：底部指引 */
.upd-guide p, .upd-guide li {
  font-size: 14.5px; line-height: 1.9; color: var(--ink-2); font-weight: 500;
}
.upd-guide p { margin-top: 12px; }
.upd-guide p:first-child { margin-top: 0; }
.upd-guide p b { color: var(--ink); font-weight: 700; }
.upd-guide ol, .upd-guide ul { padding-left: 22px; margin-top: 6px; list-style: disc; }
.upd-guide ol { list-style: decimal; }
.upd-guide li { margin-top: 5px; }
.upd-guide code {
  padding: 1px 5px; font-family: var(--num); font-size: 13px;
  background: var(--field); border: 1px solid var(--line-soft); border-radius: 3px;
  word-break: break-all;
}
.upd-guide pre.upd-log { margin-top: 8px; max-height: none; font-size: 12.5px; }

.upd-tit { margin: 18px 0 8px; font-family: var(--serif); font-size: 16px; color: var(--ink); font-weight: 600; }
.upd-log {
  margin: 0; padding: 12px 14px; max-height: 460px; overflow: auto;
  font-family: var(--num); font-size: 13px; line-height: 1.75; color: var(--ink-2);
  background: var(--field); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  white-space: pre-wrap; word-break: break-all;
}

/* 黄道吉日：小屏卡片版（桌面隐藏） */
.hd-cards { display: none; }

.jq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.jq-grid .jq-item {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 8px; text-align: center; transition: .15s;
}
.jq-grid .jq-item:hover { border-color: var(--red); box-shadow: 0 4px 12px rgba(150, 35, 26, .12); }
.jq-grid .jq-item.now {
  border-color: var(--red); background: var(--red-soft);
  box-shadow: 0 0 0 1px rgba(192, 57, 43, .2);
}
.jq-grid .jq-item b {
  font-size: 19px; color: var(--ink); font-family: var(--serif); font-weight: 700;
  display: block; line-height: 1.4;
}
.jq-grid .jq-item.now b { color: var(--red); }
.jq-grid .jq-item span {
  display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px;
  font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
  font-weight: 500;
}
/* 交节时刻（X时XX分）：日期下面第三行，比日期弱一档 */
.jq-grid .jq-item .tm {
  display: block; margin-top: 3px; font-style: normal;
  font-size: 12.5px; color: var(--muted); opacity: .9; white-space: nowrap;
  font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
  font-weight: 500;
}
.jq-grid .jq-item.now .tm { color: var(--red); opacity: 1; }

/* ================= 节假日 ================= */
.hd-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(305px, 1fr)); gap: 12px; }
.hd-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 14px 16px; }
.hd-item h3 {
  font-size: 17px; color: var(--red-deep); margin-bottom: 8px;
  font-family: var(--serif); line-height: 1.5;
}
.hd-item h3 span { font-family: var(--sans); }
.hd-item .days { display: flex; flex-wrap: wrap; gap: 6px; }
.hd-item .days span {
  font-size: 13.5px; padding: 3px 10px; border-radius: 999px;
  background: var(--red-soft); color: var(--red-deep); line-height: 1.5;
  font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
}
.hd-item .days span.w { background: var(--blue-soft); color: var(--blue); }

/* ================= 表单 ================= */
.form-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form-inline select, .form-inline input {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 9px;
  background: var(--field); color: var(--ink); font-size: 15px;
}
.form-inline .btn {
  border: 1px solid var(--red); background: var(--red); color: #fff;
  border-radius: var(--radius-sm); padding: 7px 18px; cursor: pointer;
  font-size: 15px; font-weight: 700; transition: .15s;
}
.form-inline .btn:hover { background: var(--red-deep); border-color: var(--red-deep); }
/* 年月输入框（可输入 + 自绘下拉） + 快速跳转 */
.form-inline .year { width: 92px; text-align: center; font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.form-inline .mon  { width: 60px; text-align: center; font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.form-inline .dnum { width: 74px; text-align: center; font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.form-inline .suf  { font-size: 15px; color: var(--ink-2); margin-left: -4px; }
.form-inline .inp-lab { font-size: 14px; color: var(--muted); }

/* ----- 年月自绘下拉组件 ----- */
.ymsel { position: relative; display: inline-flex; align-items: center; }
.ymsel input {
  min-width: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
  font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.ymsel .dd-toggle {
  border: 1px solid var(--line); border-left: none; background: #fdfaf3;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 6px 8px;
  font-size: 12px; line-height: 1; color: var(--ink-2); cursor: pointer; transition: .15s;
}
.ymsel .dd-toggle:hover { color: var(--red); background: #fff; }
.dd-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  background: var(--field); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-lg); padding: 10px; width: 296px;
}
.dd-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 8px; }
.dd-head b { font-size: 13.5px; color: var(--red-deep); font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.dd-shift {
  border: 1px solid var(--line); background: #fdfaf3; border-radius: var(--radius-sm);
  padding: 5px 9px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; transition: .15s;
  white-space: nowrap;
}
.dd-shift:hover { border-color: var(--red); color: var(--red); background: #fff; }
.dd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.dd-item {
  border: 1px solid var(--line-soft); background: var(--field); border-radius: var(--radius-sm);
  padding: 10px 2px; font-size: 15.5px; color: var(--ink-2); cursor: pointer;
  text-align: center; transition: .12s; font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.dd-item:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.dd-item.on {
  background: var(--red); border-color: var(--red); color: #fff; font-weight: 700;
}

/* 预渲染候选项（农历月 / 日 等）：内容由 PHP 输出，JS 只负责铺成宫格 */
.ymsel .dd-opts { display: none; }
.dd-lm .dd-item, .dd-ld .dd-item { font-family: var(--serif); font-size: 14.5px; padding: 9px 1px; }
.dd-ly .dd-item { font-family: var(--num); }

/* ----- 日历头部的年月（大字） ----- */
.cal-nav input.nav-num {
  width: 80px; text-align: center; font-size: 21px; font-weight: 700;
  color: var(--red-deep); font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
  border: 1px solid var(--line); border-right: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--field); padding: 4px 6px;
}
.cal-nav .ymsel .dd-toggle { padding-top: 10px; padding-bottom: 10px; }
.cal-nav .suf.big {
  font-size: 20px; font-weight: 700; color: var(--red-deep);
  font-family: var(--serif); margin: 0 2px 0 -3px;
}
.form-inline a.jmp {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper-2);
  color: var(--ink-2); padding: 6px 10px; font-size: 14px; line-height: 1.2;
  cursor: pointer; min-width: 34px; transition: .15s;
}
.form-inline a.jmp:hover { border-color: var(--red); color: var(--red); background: #fff; }
.form-inline .hint { font-size: 13.5px; color: var(--muted); line-height: 1.6; }

/* ----- 农历（阴历）选择行：在老黄历的年月日选择器下面 ----- */
.lunar-form {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed var(--line-soft);
}
.lunar-form .ly-cap {
  font-size: 13.5px; color: var(--muted);
  letter-spacing: 1px; margin-right: -2px;
}
.lunar-form input.year { width: 76px; }
.lunar-form input.ly-mon { width: 92px; text-align: center; }
.lunar-form input.ly-day { width: 80px; text-align: center; }
.lunar-form .lunar-extra { margin-left: auto; }
.note.warn {
  color: #8a5a12; background: #fdf6e6; border: 1px solid #ecdcb6;
  border-radius: var(--radius-sm); padding: 9px 13px; margin: 10px 0 0; font-size: 14px;
}

/* ================= 页脚 =================
   页脚（友情链接 + 版权 + 回顶部）统一由主站的 inc/footer.php::site_footer() 输出，
   样式在 assets/chrome.css，子站不再自己画一份。
   （.dc-body 以下是免责声明页正文排版，与页脚无关） */

/* 免责声明页正文 */
.dc-body h3 {
  margin: 22px 0 6px; font-family: var(--serif); font-size: 16.5px; color: var(--ink);
  letter-spacing: .5px; border-left: 3px solid var(--red); padding-left: 10px; font-weight: 600;
}
.dc-body p, .dc-body ul { font-size: 14.5px; line-height: 1.95; color: var(--ink-2); font-weight: 500; }
.dc-body ul { padding-left: 22px; margin-top: 6px; }
.dc-body ul li { list-style: disc; margin-top: 5px; }
.dc-thanks { margin-top: 24px; text-align: center; color: var(--muted); }

.note {
  margin-top: 14px; font-size: 14px; color: var(--muted); line-height: 1.95; font-weight: 500;
}
.note code {
  background: var(--paper-2); border: 1px solid var(--line-soft); border-radius: 4px;
  padding: 1px 5px; font-size: 13.5px; font-family: ui-monospace, Consolas, monospace;
}
.note b { color: var(--ink-2); }

/* ==================================================================
   响应式
   ================================================================== */

/* —— 平板 / 窄屏 —— */
@media (max-width: 900px) {
  .cols { flex-direction: column; }
  .col-side { width: 100%; flex: none; }
  .two { grid-template-columns: 1fr 1fr; }
  .two > .box:last-child { grid-column: span 2; }
  .fres { grid-template-columns: repeat(2, 1fr); }
  .fres .c.wide { grid-column: span 2; }
  .info { grid-template-columns: repeat(2, 1fr); }
  .lsr ul { grid-template-columns: 1fr; }
  .hourbox { grid-template-columns: repeat(6, 1fr); }
  .jiyi { text-align: center; }

  /* 老黄历主视觉：窄平板压缩两侧 */
  .hl-hero { grid-template-columns: 1fr 1.65fr 1fr; }
  .hl-yj { padding: 12px 8px 10px; gap: 9px; }
  .hl-badge i { width: 52px; height: 52px; line-height: 52px; font-size: 24px; }
  .hl-yj .words span { font-size: 14px; }
  .hl-cell { padding: 9px 7px 12px; }
  .hl-cell h4 { font-size: 13.5px; }
  .hl-cell p, .hl-cell li, .hl-cell .cols2 span { font-size: 12.5px; }
  .hl-bigday { font-size: 82px; }
  .hl-meta { font-size: 14px; }
}

@media (max-width: 760px) {
  .two { grid-template-columns: 1fr; }
  .two > .box:last-child { grid-column: auto; }
  /* 信息条：两列网格重排，不再每块独占一行竖着堆 */
  .one {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 8px; padding: 12px;
  }
  .one .sx, .one .blk {
    border-left: none; min-width: 0; flex: none;
    padding: 10px 6px; background: var(--paper-2); border-radius: 10px;
  }
  .one .sx               { grid-area: 1 / 1; }   /* 生肖印 */
  .one .blk:nth-child(2) { grid-area: 1 / 2; }   /* 冲煞：徽记上、文字下 */
  .one .blk:nth-child(3) { grid-area: 2 / 1; }   /* 星座 */
  .one .blk:nth-child(4) { grid-area: 2 / 2; }   /* 星期 */
  .one .blk:nth-child(5) { grid-area: 3 / 1; }   /* 农历 */
  .one .blk:nth-child(6) { grid-area: 3 / 2; }   /* 干支 */
  .one .sx svg { width: 108px; height: 108px; }
  .one .blk svg { width: 78px; height: 78px; }
  .one .blk .k { font-size: 12.5px; }
  .one .blk .v { font-size: 19px; }
  .one .blk .v.sub { font-size: 15px; }
  .one .blk.chong-box { flex-direction: column; gap: 6px; }
  .one .chong-txt { text-align: center; }

  /* 老黄历主视觉：日期区独占一行置顶，宜 / 忌 两列并排 */
  .hl-hero {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "mid mid" "left right";
  }
  .hl-col.mid   { grid-area: mid; border-bottom: 1px solid var(--hl-line); align-items: center; }
  .hl-col.left  { grid-area: left; border-right: 1px solid var(--hl-line); border-left: none; border-top: 1px solid var(--hl-line); }
  .hl-col.right { grid-area: right; border-left: none; border-top: 1px solid var(--hl-line); }
  .hl-yj {
    flex-direction: column; align-items: center; justify-content: flex-start;
    padding: 12px 10px; gap: 10px;
  }
  .hl-yj .words { width: 100%; justify-content: center; }
  .hl-badge i { width: 46px; height: 46px; line-height: 46px; font-size: 21px; }
  .hl-main { padding: 16px 14px 10px; }
  .hl-bigday { font-size: 80px; }
  .hl-gzbox { margin: 8px auto 12px; }
  .hl-cell { padding: 10px 8px 12px; }
}

/* —— 手机 —— */
@media (max-width: 600px) {
  body { font-size: 16.5px; }           /* 手机上略放大正文，更易读 */
  .max { padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }

  .sec { padding: 15px 13px; margin-top: 14px; }
  .tit { font-size: 18px; }
  .tit small { display: block; margin-left: 0; margin-top: 2px; }

  /* 月历 */
  .wnl { padding: 10px 9px 12px; }
  .wnl .week, .wnl .grid { gap: 4px; }
  .wnl .week li { font-size: 13.5px; padding: 5px 0; letter-spacing: 0; }
  .day { min-height: 72px; border-radius: 8px; }
  .day > a { padding: 5px 2px 4px; }
  .day .dd { font-size: 19px; }
  .day .ln { font-size: 12.5px; margin-top: 2px; letter-spacing: -.4px; }
  .day .tag { top: 2px; right: 2px; font-size: 11px; padding: 2px 3px; }
  .day:hover { transform: none; }

  /* 日历头：年份、月份各占一行更整齐 */
  .cal-nav { padding: 10px; gap: 8px 6px; }
  .cal-nav .step { flex: 1 1 auto; }
  .cal-nav .today-btn { margin-left: auto; }
  .cal-nav .btn { padding: 7px 10px; }
  .cal-nav input.nav-num { width: 82px; font-size: 19px; }
  .cal-nav .suf.big { font-size: 18px; }
  .cal-nav .ymsel .dd-toggle { padding: 9px 8px; }

  /* 表单 */
  .form-inline { gap: 7px; }
  .form-inline .btn { padding: 8px 18px; }
  .form-inline a.jmp { padding: 8px 11px; }
  .form-inline .hint { flex: 1 1 100%; }

  /* 老黄历头 */
  .hl-head { flex-direction: column; }
  .hl-head .hl-title { padding: 13px 16px; text-align: center; }
  .hl-head .hl-title h1 { font-size: 24px; }
  .hl-nav a {
    border-left: none; border-top: 1px solid var(--line-soft);
    min-width: 0; flex: 1; padding: 10px 6px;
  }
  .hl-nav a b { font-size: 15px; }

  /* 老黄历主视觉 */
  .hl-main { padding: 14px 12px 10px; }
  .hl-meta { font-size: 13.5px; letter-spacing: 0; margin-bottom: 6px; }
  .hl-date-row { gap: 14px; }
  .hl-arr { width: 38px; height: 38px; line-height: 36px; font-size: 22px; }
  .hl-bigday { font-size: 66px; }
  .hl-week em { font-size: 14px; }
  .hl-week b  { font-size: 24px; }
  .hl-lunar { font-size: 14.5px; margin-top: 6px; }
  .hl-gzbox { padding: 7px 12px; margin: 8px 12px 12px; }
  .hl-gz { font-size: 15px; }
  .hl-pz { font-size: 12.5px; margin-top: 4px; }
  .hl-yj { padding: 11px 12px; gap: 10px; }
  .hl-badge i { width: 44px; height: 44px; line-height: 44px; font-size: 21px; }
  .hl-yj .words span { font-size: 13.5px; }
  .hl-strip { font-size: 12.5px; padding: 7px 8px; }
  .hl-cell { padding: 10px 8px 12px; }
  .hl-cell h4 { font-size: 13.5px; }
  .hl-cell p, .hl-cell li, .hl-cell .cols2 span { font-size: 12.5px; }
  .xiu-title { font-size: 19px; }
  .xiu-poem { font-size: 13px; line-height: 1.75; }

  /* 选择器行：极窄屏下让「查看月历」另起一行，避免被截断 */
  .picker-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .picker-row > a.more { margin-left: 0; align-self: flex-end; }

  /* 右侧宜忌 */
  .jiyi { padding: 16px 14px; }
  .jiyi .j-day { font-size: 66px; }
  .yjrow { gap: 8px; }
  .yjrow b { flex: 0 0 31px; height: 31px; line-height: 31px; font-size: 15px; }
  .yjrow .words span { font-size: 14.5px; padding: 4px 11px; }

  /* 六宫格：小屏下一行两个，宽卡片仍独占整行 */
  .fres { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .fres .c { padding: 12px 8px; }
  .fres .c.wide { grid-column: span 2; }
  .fres .c.span2 { grid-column: span 1; }
  .fres .c .v { font-size: 16px; }
  .fres .c .v.small { font-size: 13px; line-height: 1.65; }
  .fres .c .k { font-size: 12px; padding: 3px 9px; margin-bottom: 8px; }
  .fres .c.xiu { padding: 14px 12px; }
  .xiu-title { font-size: 19px; }
  .xiu-poem { font-size: 12.5px; }
  .rel { grid-template-columns: 1fr; gap: 10px; }
  .hourbox { grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .hourbox li { font-size: 14.5px; padding: 7px 0; }
  .info { grid-template-columns: 1fr; }
  .info li { font-size: 15.5px; padding: 9px 0; }

  .fw { grid-template-columns: repeat(3, 1fr); }
  .jp .words span, .yjrow .words span { font-size: 14.5px; }

  /* 时辰详表 */
  .lsr > ul > li { grid-template-columns: 46px 1fr; gap: 9px; padding: 11px; }
  .lsr .zn b { width: 42px; height: 42px; line-height: 40px; font-size: 18px; }

  /* 节气 / 节假日 */
  .jq-grid { grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 8px; }
  .jq-grid .jq-item { padding: 10px 5px; }
  .jq-grid .jq-item b { font-size: 16.5px; }
  .hd-list { grid-template-columns: 1fr; }

  /* 黄道吉日：手机上改为卡片列表 */
  .tbl-wrap { display: none; }
  .hd-cards {
    display: grid; grid-template-columns: 1fr; gap: 12px;
    margin-top: 8px;
  }
  .hd-card {
    display: flex; align-items: stretch; gap: 12px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 14px 12px; box-shadow: 0 2px 8px rgba(130, 90, 50, .05);
  }
  .hd-card.today { background: var(--red-soft); border-color: #f0d5d1; }
  .hd-left {
    flex: 0 0 52px; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 2px;
    background: var(--paper-2); border-radius: 10px; padding: 6px 0;
  }
  .hd-left b { font-size: 28px; font-weight: 700; color: var(--ink); line-height: 1; font-family: var(--num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
  .hd-left span { font-size: 13px; color: var(--muted); }
  .hd-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
  .hd-line { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; font-size: 14.5px; }
  .hd-week { color: var(--muted); }
  .hd-lunar { color: var(--ink-2); position: relative; padding-left: 9px; }
  .hd-lunar::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 1px; height: 12px; background: var(--line);
  }
  .hd-ganzhi { color: var(--muted); font-size: 13.5px; }
  .hd-tags { margin-top: 2px; }
  .hd-shen {
    color: var(--red); font-weight: 700; font-size: 15.5px;
    background: var(--red-soft); padding: 2px 8px; border-radius: 999px;
  }
  .hd-zhi { color: var(--ink-2); font-size: 14px; }
  .hd-yi {
    font-size: 14px; color: var(--ink-2); line-height: 1.65;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .hd-card .hd-btn {
    flex: 0 0 auto; align-self: center;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 48px; padding: 7px 11px; border: 1px solid var(--red);
    border-radius: 999px; color: var(--red); font-size: 14px; font-weight: 700;
    transition: .15s;
  }
  .hd-card .hd-btn:active { background: var(--red); color: #fff; }

  .dd-panel { width: min(324px, calc(100vw - 24px)); }
  .dd-item { padding: 11px 2px; font-size: 16px; }
  .dd-grid { gap: 7px; }

  /* 输入控件 16px，避免 iOS 聚焦时自动放大页面 */
  .ymsel input,
  .form-inline input,
  .form-inline select,
  .cal-nav input.nav-num { font-size: 16.5px; }
  .cal-nav input.nav-num { font-size: 18px; }

  /* 老黄历选择器：隐藏 ±100/±10 跳年箭头与提示，让输入行尽量单排 */
  .form-inline a.jmp { display: none; }
  .form-inline .hint { display: none; }
  .form-inline .year { width: 80px; }
  .form-inline .mon  { width: 56px; }
  .form-inline .dnum { width: 66px; }
  .lunar-form input.year   { width: 68px; }
  .lunar-form input.ly-mon { width: 84px; }
  .lunar-form input.ly-day { width: 72px; }

  /* 老黄历主视觉：吉神/方位/凶煞/冲煞 四格改单列，避免过窄 */
  .hl-pair { grid-template-columns: 1fr; }
  .hl-cell { border-right: none; border-bottom: 1px solid #e6dcc8; }
  .hl-cell:last-child { border-bottom: none; }
  .hl-cell .pos-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 10px; }
  .hl-cell .pos-list li { white-space: normal; }

  /* 时辰吉凶详表：手机单列显示，避免两列过挤 */
  .lsr ul { grid-template-columns: 1fr; }
}

/* —— 超小屏 —— */
@media (max-width: 380px) {
  .one { gap: 6px; padding: 10px; }
  .one .sx svg { width: 96px; height: 96px; }
  .one .blk .v { font-size: 17px; }
  .one .blk .v.sub { font-size: 14px; }
  .day { min-height: 64px; }
  .day .dd { font-size: 17px; }
  .day .ln { font-size: 12px; }
  .jiyi .j-day { font-size: 58px; }
  .hourbox { grid-template-columns: repeat(3, 1fr); }
  .fw { grid-template-columns: repeat(2, 1fr); }
  .jq-grid { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); }
  .jq-grid .jq-item .tm { font-size: 12px; }
  .dd-panel { width: calc(100vw - 20px); }

  .hl-bigday { font-size: 58px; }
  .form-inline .year { width: 72px; }
  .form-inline .mon  { width: 50px; }
  .form-inline .dnum { width: 60px; }
  .lunar-form input.year   { width: 62px; }
  .lunar-form input.ly-mon { width: 78px; }
  .lunar-form input.ly-day { width: 68px; }
  .hl-meta { font-size: 12.5px; }
  .hl-lunar { font-size: 13px; }
  .hl-pz { font-size: 11.5px; }
  .hl-arr { width: 34px; height: 34px; line-height: 32px; font-size: 20px; }
  .hl-badge i { width: 40px; height: 40px; line-height: 40px; font-size: 19px; }
  .hl-yj { gap: 8px; padding: 10px; }
  .hl-yj .words span { font-size: 13px; }
  .hl-cell { padding: 9px 6px 11px; }
  .hl-cell h4 { font-size: 12.5px; }
  .hl-cell p, .hl-cell li, .hl-cell .cols2 span { font-size: 12px; }
}

/* —— 触屏：去掉 hover 位移，避免点击残留态 —— */
@media (hover: none) {
  .day:hover { transform: none; box-shadow: none; border-color: var(--line-soft); }
  .day.today:hover { border-color: var(--red); }
  .day.sel:hover { border-color: var(--gold); }
}

/* ==================================================================
   名词解说：小「?」徽标（全站通用，点击跳 jieshuo.php 对应段落）
   ================================================================== */
.qm {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; flex: none;
  border: 1px solid currentColor; border-radius: 50%;
  font-family: var(--sans); font-size: 10.5px; font-weight: 700; font-style: normal;
  line-height: 1; letter-spacing: 0; color: var(--muted); opacity: .6;
  vertical-align: 1px;
  transition: color .15s, background .15s, border-color .15s, opacity .15s;
}
a.qm { margin-left: 5px; }
a.qm:hover { opacity: 1; color: var(--red); border-color: var(--red); background: var(--red-soft); }
.qm-text { color: var(--red); font-weight: 400; }
.qm-text:hover { text-decoration: underline; }

/* ==================================================================
   名词解说页（jieshuo.php）
   ================================================================== */
.js-intro p { font-size: 15.5px; line-height: 1.95; color: var(--ink-2); padding: 2px 0; font-weight: 500; }
.js-intro p a { color: var(--red); font-weight: 700; }
.js-intro p a:hover { text-decoration: underline; }

.js-steps { counter-reset: js-s; display: grid; gap: 9px; margin: 14px 0 2px; }
.js-steps li {
  counter-increment: js-s; position: relative; padding-left: 33px;
  font-size: 15px; color: var(--ink-2); line-height: 1.85; font-weight: 500;
}
.js-steps li::before {
  content: counter(js-s); position: absolute; left: 0; top: 3px;
  width: 22px; height: 22px; line-height: 22px; text-align: center;
  border-radius: 50%; background: linear-gradient(135deg, #c8412f, #96231a);
  color: #fff; font-size: 12.5px; font-weight: 700; font-family: var(--num);
}
.js-steps li b { color: var(--ink); }

.js-cta-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.js-cta {
  display: inline-block; padding: 9px 20px; border-radius: 999px;
  background: linear-gradient(135deg, #c8412f, #96231a); color: #fff;
  font-weight: 700; font-size: 15px; box-shadow: 0 3px 10px rgba(150, 35, 26, .24);
  transition: .15s;
}
.js-cta:hover { color: #fff; filter: brightness(1.08); transform: translateY(-1px); }
.js-cta.ghost { background: #fff; color: var(--red); border: 1px solid #eccfc9; box-shadow: none; }
.js-cta.ghost:hover { background: var(--red-soft); transform: none; }
.js-note { font-size: 13.5px; color: var(--muted); font-weight: 500; }

/* 目录 */
.js-toc .toc-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 20px; }
/* 目录的 <summary> 只给小屏用（见文件末尾 ≤600px 段），桌面隐藏、.tit 照旧 */
.js-toc > .js-toc-sum{display:none;}
.toc-g { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; min-width: 0; }
.toc-g b {
  flex: 0 0 100%; font-size: 13.5px; color: var(--muted);
  letter-spacing: .5px; margin-bottom: 1px; font-weight: 700;
}
.toc-g a {
  font-size: 13.5px; padding: 4px 11px; border-radius: 999px;
  background: var(--paper-2); color: var(--ink-2);
  border: 1px solid var(--line-soft); transition: .15s;
}
.toc-g a:hover { background: var(--red-soft); color: var(--red-deep); border-color: #eccfc9; }

/* 分组 */
.js-group { margin-top: 26px; }
.js-gtit {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px 2px;
  font-size: 20px; color: var(--ink); font-family: var(--serif); letter-spacing: 1px;
}
.js-gtit span {
  flex: none; width: 30px; height: 30px; line-height: 30px; text-align: center;
  border-radius: 8px; color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 0;
  background: linear-gradient(135deg, #c8412f, #96231a);
  box-shadow: 0 2px 8px rgba(150, 35, 26, .22);
}
.js-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

/* 词条卡片 */
.js-term {
  position: relative; padding: 16px 18px 18px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  scroll-margin-top: 16px;
}
.js-term:target {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, .13), var(--shadow);
}
.js-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.js-head h3 { font-size: 17.5px; color: var(--ink); font-family: var(--serif); letter-spacing: .5px; }
.js-badge {
  font-size: 11.5px; color: #fff; background: var(--red);
  padding: 2px 8px; border-radius: 999px; letter-spacing: .5px; font-weight: 700;
  white-space: nowrap;
}
.js-top { margin-left: auto; font-size: 12px; color: var(--muted); opacity: .8; white-space: nowrap; }
.js-top:hover { color: var(--red); opacity: 1; }

/* 卡片头「当天老黄历」胶囊：把「↑ 顶部」挤到它右边 */
.js-hl {
  margin-left: auto; display: inline-block; white-space: nowrap;
  font-size: 12px; font-weight: 600; letter-spacing: .3px;
  color: var(--red-deep); background: var(--field);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px;
}
.js-hl:hover { color: #fff; background: var(--red); border-color: var(--red); }
.js-head .js-hl ~ .js-top { margin-left: 0; }
.js-dict-head .js-hl { margin-left: auto; align-self: center; }
.js-dict-head .js-hl ~ .js-top { margin-left: 0; }

.js-one {
  margin-top: 10px; padding: 8px 12px;
  font-size: 15px; font-weight: 600; line-height: 1.7; color: var(--red-deep);
  background: var(--red-soft); border-left: 3px solid var(--red);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.js-body > p { font-size: 14.5px; color: var(--ink-2); line-height: 1.9; margin-top: 8px; font-weight: 500; }
.js-body > p b { color: var(--ink); }
.js-eg {
  margin-top: 11px; padding: 9px 12px; font-size: 14px; color: var(--ink); line-height: 1.85;
  background: var(--field); border: 1px dashed var(--line);
  border-radius: var(--radius-sm); word-break: break-word;
}
.js-eg b {
  display: inline-block; margin-right: 7px; padding: 1px 7px;
  font-size: 11.5px; color: #fff; background: var(--gold);
  border-radius: 999px; letter-spacing: .5px; vertical-align: 1px;
}
.js-eg b + br { display: none; }
/* 示例里的传统歌诀 / 长引文（星宿歌诀等）：单独起一行，字号略小 */
.js-eg .eg-song {
  display: block; margin-top: 6px; padding-left: 9px;
  border-left: 2px solid var(--line); font-size: 13px; color: var(--ink-2);
  line-height: 1.85;
}
/* 示例里可点击的胶囊（跳到全表对应行） */
.js-eg a.eg-pill,
.js-body a.eg-pill {
  display: inline-block; margin-right: 7px; padding: 1px 7px;
  font-size: 11.5px; color: #fff; background: var(--gold);
  border-radius: 999px; letter-spacing: .5px; vertical-align: 1px;
  text-decoration: none; transition: .15s; cursor: pointer;
}
.js-eg a.eg-pill:hover,
.js-body a.eg-pill:hover { background: var(--red); transform: translateY(-1px); }
.js-tip { margin-top: 10px; font-size: 13.5px; color: var(--muted); line-height: 1.8; font-weight: 500; }
.js-tip i { font-style: normal; font-weight: 700; color: var(--green); margin-right: 6px; }
.js-outro p { font-size: 15.5px; line-height: 1.95; color: var(--ink-2); font-weight: 500; }

/* ================= 全表块（吉神 / 凶煞 / 彭祖百忌 / 日禄） ================= */
.js-list > .js-dict { grid-column: 1 / -1; }          /* 词条是两列网格，全表整行铺开 */
/* 指定几张词条卡片（宜 / 忌、凶煞宜忌、三煞方、空亡所值、二十八星宿、建除十二神、
   值神、九星、六曜、七十二候、月相、三伏 · 数九、黄道吉日）加 .js-wide，
   与「宜 / 忌 词条全解 · 142 条」同宽整行铺开；其余卡片仍是两列各半。 */
.js-list > .js-term.js-wide { grid-column: 1 / -1; }
.js-dict {
  margin-top: 2px; background: var(--field); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; scroll-margin-top: 16px;
  box-shadow: var(--shadow);
}
.js-dict:target {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, .13), var(--shadow);
}
.js-dict-head {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding: 9px 14px; background: #f4efe2; border-bottom: 1px solid var(--line);
}
.js-dict-head b { font-family: var(--serif); font-size: 16px; color: var(--ink); font-weight: 600; }
.js-dict-head .note { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.js-dict-head em { font-style: normal; font-size: 12px; color: var(--muted); opacity: .85; }
.js-dict-cols,
.js-dict .di {
  position: relative; display: grid; grid-template-columns: 100px 1fr 1.3fr; gap: 4px 14px;
  padding: 7px 14px; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); font-weight: 500;
  border-top: 1px dashed var(--line-soft);
  scroll-margin-top: 24px;
}
.js-dict.has-back .di { padding-right: 64px; }        /* 留出「返回」链接的位置 */
.js-dict .di:first-child { border-top: 0; }
.js-dict-cols {
  display: grid; grid-template-columns: 100px 1fr 1.3fr; gap: 4px 14px;
  padding: 7px 14px; font-size: 12px; color: var(--muted);
  letter-spacing: .5px; font-weight: 600; background: var(--field);
  border-bottom: 1px solid var(--line-soft);
}
.js-dict .di b { font-family: var(--serif); font-size: 15px; color: var(--ink); font-weight: 600; white-space: nowrap; }
.js-dict .di .dt { word-break: keep-all; }
.js-dict .di .md { color: var(--muted); font-size: 13px; }
.js-dict .di .md i { font-style: normal; opacity: .95; }
/* 示例胶囊点击跳转到全表行：命中行短暂闪烁 + 金色高亮 */
.js-dict .di:target {
  background: #fff6df; box-shadow: inset 3px 0 0 var(--gold);
  animation: diFlash 1.4s ease .15s 2;
}
@keyframes diFlash { 50% { background: #ffe9c4; } }
/* 行尾「返回」：桌面悬停浮现，触屏常显 */
.js-dict .di .back {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 11.5px; color: var(--muted); text-decoration: none; white-space: nowrap;
  opacity: 0; transition: .15s;
}
.js-dict .di:hover .back { opacity: .85; color: var(--red); }
.js-dict .di .back:hover { opacity: 1; }
@media (hover: none) {
  .js-dict .di .back { opacity: .55; }
}
/* 值神全表行级吉凶：黄道红、黑道绿（与全站吉凶配色一致） */
.js-dict .di.ji { box-shadow: inset 3px 0 0 rgba(168, 52, 42, .35); }
.js-dict .di.xiong { box-shadow: inset 3px 0 0 rgba(53, 147, 74, .35); }
.js-dict .di.ji.on { box-shadow: inset 3px 0 0 var(--red); }
.js-dict .di.xiong.on { box-shadow: inset 3px 0 0 var(--green); }
/* 本日命中：吉用红、凶用绿（与全站吉凶配色一致） */
.js-dict .di.on { background: #fdf3ef; box-shadow: inset 3px 0 0 var(--red); }
.js-dict .di.on b { color: var(--red-deep); }
.js-dict.xiong .di.on { background: #eef6ee; box-shadow: inset 3px 0 0 var(--green); }
.js-dict.xiong .di.on b { color: #2f7a3d; }
.on-tag {
  display: inline-block; margin-left: 6px; padding: 0 6px; font-style: normal;
  font-size: 10.5px; line-height: 17px; color: #fff; background: var(--red);
  border-radius: 999px; vertical-align: 2px; font-weight: 700; letter-spacing: .5px;
}
.js-dict.xiong .on-tag { background: var(--green); }

@media (max-width: 900px) {
  .js-list { grid-template-columns: 1fr; }
  .js-toc .toc-groups { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .js-toc .toc-groups { grid-template-columns: 1fr; gap: 12px; }
  .js-term { padding: 14px 15px 16px; }
  .js-head h3 { font-size: 16.5px; }
  .js-one { font-size: 14.5px; padding: 7px 11px; }
  .js-body > p, .js-eg { font-size: 14px; }
  .js-gtit { font-size: 18.5px; }
  .js-cta { padding: 8px 16px; font-size: 14.5px; }
  .js-note { font-size: 12.5px; }
  .hl-strip { padding: 8px 24px; }
}

/* ==================================================================
   名词解说页：日期切换条（例子跟随所选日期）
   ================================================================== */
.js-datebar { padding: 12px 16px; }
.js-daynav {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-soft);
}
.js-daynav .hl-arr { width: 34px; height: 34px; line-height: 34px; font-size: 19px; }
.js-cur {
  font-size: 16px; font-weight: 700; color: var(--ink);
  font-family: var(--serif); letter-spacing: .5px;
}
.js-daynav .js-today {
  margin-left: auto; font-size: 13.5px; padding: 5px 14px; border-radius: 999px;
  background: var(--red-soft); color: var(--red-deep); border: 1px solid #f0d5cf;
  white-space: nowrap;
}
.js-daynav .js-today:hover { background: #fff; border-color: var(--red); color: var(--red); }
.js-datehint { margin-top: 10px; font-size: 13.5px; color: var(--muted); line-height: 1.8; }
.js-datehint b { color: var(--red); }

@media (max-width: 600px) {
  .js-datebar { padding: 12px; }
  .js-daynav { gap: 8px; }
  .js-cur { font-size: 14.5px; width: 100%; order: -1; }
  .js-daynav .js-today { margin-left: auto; font-size: 12.5px; padding: 4px 11px; }
  .js-datehint { font-size: 12.5px; }
}

/* ================= 返回顶部 ================= */
.totop {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #fff;
  background: linear-gradient(135deg, #c8412f, #96231a);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .25s ease, visibility .25s ease, transform .25s ease,
              box-shadow .18s ease;
}
.totop.show { opacity: 1; visibility: visible; transform: translateY(0); }
.totop:hover { box-shadow: 0 14px 34px rgba(150, 35, 26, .34); }
.totop:active { transform: scale(.93); }
.totop:focus-visible { outline: 3px solid rgba(200, 65, 47, .4); outline-offset: 2px; }
@media (max-width: 600px) {
  .totop {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    width: 42px;
    height: 42px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .totop { transition: opacity .2s ease, visibility .2s ease; }
  .totop.show { transform: none; }
}

/* ================= 分享 / 收藏 / 扫码 工具条 ================= */
/* 结构：.page-tools > .tool-item > (button.tool-btn + .tool-popup)
   弹层不放在 button 内部，保证 DOM 合法、点击不会误触发按钮本身。 */
.page-tools {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px auto 0;
}
.tool-item { display: inline-block; }

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 16px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-2);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: color .18s, background .18s, border-color .18s,
              transform .18s, box-shadow .18s;
}
.tool-btn:hover,
.tool-btn:focus-visible {
  color: var(--red-deep);
  background: #f8f0e0;
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(80, 60, 30, .06), 0 8px 20px rgba(80, 60, 30, .10);
  outline: none;
}
.tool-btn[aria-expanded="true"] {
  color: var(--red-deep);
  background: #f7eedc;
  border-color: var(--gold);
}
.tool-btn .ico {
  font-size: 15px;
  font-style: normal;
  line-height: 1;
  /* 明确指定彩色 emoji 字体，避免回退到黑白符号字体 */
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji",
               "Segoe UI Symbol", sans-serif;
}

/* 弹层：fixed 定位；显示时由 JS 临时挂到 body 下，避开 overflow 裁剪 */
.tool-popup {
  display: none;
  position: fixed;
  z-index: 99999;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
  animation: toolFade .18s ease;
}
.tool-popup.is-open { display: block; }
@keyframes toolFade {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.popup-title {
  padding: 8px 16px 7px;
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--muted);
  border-bottom: 1px solid var(--line-soft);
}

/* —— 分享 —— */
.share-popup { width: 288px; padding-bottom: 8px; }
.share-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px;
}
.share-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--ink-2);
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.share-opt:hover { background: #f5ecdb; color: var(--red-deep); }
.share-opt .ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 5px;
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  color: #fff;
  border-radius: 50%;
}
.share-opt[data-action="copy"]    .ico { background: #8a7a5e; }
.share-opt[data-action="wechat"]  .ico { background: #07c160; }
.share-opt[data-action="moments"] .ico { background: #1aad19; }
.share-opt[data-action="weibo"]   .ico { background: #e6162d; }
.share-opt[data-action="qq"]      .ico { background: #1296db; }
.share-opt[data-action="qzone"]   .ico { background: #f5b301; color: #5a3d00; }

/* —— 收藏 —— */
.fav-popup { width: 288px; }
.fav-body { padding: 14px 16px 16px; }
.fav-tip { font-size: 13px; color: var(--ink-2); }
.fav-keys {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--red-deep);
}
.fav-keys kbd {
  min-width: 24px;
  padding: 3px 8px;
  font-family: "Courier New", monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  background: linear-gradient(180deg, #fff, #f1e8d7);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
}
.fav-hint { font-size: 12.5px; color: var(--muted); }
.fav-copy {
  display: inline-block;
  margin-top: 12px;
  padding: 7px 16px;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(135deg, #c8412f, #96231a);
  border-radius: 999px;
  cursor: pointer;
  transition: filter .18s ease;
}
.fav-copy:hover { filter: brightness(1.08); color: #fff; }
/* 移动端：链接按钮拉满宽度，方便点按 */
.fav-copy-em {
  display: block;
  width: 100%;
  margin-top: 12px;
  text-align: center;
}

/* —— 扫码 —— */
.qr-popup { width: 190px; padding: 14px; text-align: center; }
.qr-holder {
  display: block;
  width: 158px;
  height: 158px;
  margin: 0 auto 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}
.qr-holder img,
.qr-holder canvas {
  display: block;
  width: 158px !important;
  height: 158px !important;
  background: #fff;
  border: none;
}
.qr-holder table { margin: 0 auto !important; border-collapse: collapse; }
.qr-tip { font-size: 12.5px; color: var(--muted); }

/* —— 轻提示 —— */
.tool-toast {
  position: fixed;
  left: 50%;
  bottom: 66px;
  z-index: 100000;
  max-width: 90vw;
  padding: 10px 20px;
  font-size: 13.5px;
  color: var(--field);
  white-space: nowrap;
  background: rgba(51, 47, 41, .94);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity .25s ease, bottom .25s ease;
}
.tool-toast.show { opacity: 1; bottom: 86px; }

@media (max-width: 760px) {
  /* 全表在手机上改成卡片式堆叠，避免三列挤成一团 */
  .js-dict-cols { display: none; }
  .js-dict .di { grid-template-columns: 1fr; gap: 3px; padding: 9px 12px; }
  .js-dict .di b { font-size: 14.5px; }
  .js-dict .di .md { font-size: 12.5px; }
  .page-tools { gap: 6px; margin-top: 12px; }
  .tool-btn { padding: 6px 13px; font-size: 13px; }
  .share-popup,
  .fav-popup { width: 252px; }
  .qr-popup { width: 172px; }
  .qr-popup .qr-holder,
  .qr-popup .qr-holder img,
  .qr-popup .qr-holder canvas {
    width: 142px !important;
    height: 142px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tool-popup { animation: none; }
  .tool-btn { transition: none; }
}

@media (max-width: 360px) {
  /* 极窄屏（如 320px）：工具条允许折行，避免第三颗按钮被挤出屏幕 */
}

/* ==================================================================
   友好 404 页（src/not-found.php）
   原来请求不存在的路径只回一句「403 Forbidden」纯文本，既不友好也不像本站。
   现在给一个带站点框架、能继续点进各栏目的说明页。
   ================================================================== */
.sec.panel.nf {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding-top: 30px;
  padding-bottom: 26px;
  text-align: center;
}
.nf .nf-code {
  font-family: var(--num);
  font-variant-numeric: tabular-nums;
  font-size: 62px;
  line-height: 1;
  letter-spacing: 6px;
  color: var(--red);
  opacity: .16;
  margin-bottom: 6px;
}
.nf .tit {
  /* 标题居中时，.tit::before 那根红色装饰条要跟着标题走（默认它是 left:0 的绝对定位） */
  display: inline-block;
  padding-left: 16px;
  margin-bottom: 12px;
}
.nf .tit small {
  font-family: var(--num);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
}
.nf .nf-lead { margin-top: 4px; color: var(--ink); }
.nf .nf-url {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  font-family: var(--num);
  font-size: 13.5px;
  color: var(--ink-2);
}
.nf .nf-why,
.nf .nf-tip { color: var(--ink-2); }
.nf .nf-why { margin-top: 10px; }
.nf .nf-why strong { color: var(--red-deep); }
.nf .nf-tip { margin-top: 16px; font-size: 14.5px; color: var(--muted); }
.nf .nf-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px 10px;
  margin-top: 10px;
}
.nf .nf-links a {
  display: inline-block;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.4;
}
.nf .nf-links a:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-soft);
}
.nf .note { margin-top: 20px; text-align: left; }
.nf .note code { font-family: var(--num); font-size: 13.5px; }

@media (max-width: 600px) {
  .nf .nf-code { font-size: 48px; }
  .nf .nf-links a { padding: 7px 12px; font-size: 14px; }
}

/* ==========================================================================
   宜 / 忌 词条全解（jieshuo.php 的 142 条词表，类名 yj- 前缀）
   表体沿用 .js-dict（.di 三列 / 窄屏单列已由上面的规则处理），
   这里只补分区标题与分类跳转胶囊。
   ========================================================================== */
.yj-head {
  grid-column: 1 / -1; margin-top: 14px; padding: 12px 16px;
  background: var(--field); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); scroll-margin-top: 16px;
}
.yj-head b { display: block; font-family: var(--serif); font-size: 17px; color: var(--ink); font-weight: 600; }
.yj-head em { display: block; margin-top: 2px; font-style: normal; font-size: 12px; color: var(--muted); }
.yj-head .yj-note { display: block; margin-top: 8px; font-size: 13.5px; line-height: 1.85; color: var(--ink-2); }
.yj-chips {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 4px;
}
.yj-chips a {
  padding: 6px 14px; font-size: 13.5px; color: var(--ink-2); background: var(--field);
  border: 1px solid var(--line); border-radius: 999px; text-decoration: none;
  transition: color .15s, border-color .15s, background .15s;
}
.yj-chips a:hover { color: var(--red); border-color: rgba(192, 57, 43, .35); background: #fdf3ef; text-decoration: none; }
@media (max-width: 600px) {
  .yj-head { padding: 10px 12px; margin-top: 10px; }
  .yj-head b { font-size: 16px; }
  .yj-chips a { padding: 5px 11px; font-size: 12.5px; }
}

/* ------------------------------------------------------------------
   宜 / 忌 词条：本日在值区 + 分类折叠（jieshuo.php）
   本日在值的词条直接铺开并标「宜 / 忌」，其余按用途收进 <details>。
   ------------------------------------------------------------------ */
.yj-chips a i {
  font-style: normal; margin-left: 5px; padding: 0 5px; font-size: 11px;
  line-height: 16px; color: #fff; background: var(--muted); border-radius: 999px;
  vertical-align: 1px; opacity: .8;
}
.yj-chips a.on { color: var(--red); border-color: rgba(192, 57, 43, .38); background: #fdf3ef; }
.yj-chips a.on i { background: var(--red); opacity: 1; }

.yj-onsec { grid-column: 1 / -1; margin-top: 4px; }
.yj-onsec-h {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; background: #fdf3ef; border: 1px solid rgba(192, 57, 43, .22);
  border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0;
}
.yj-onsec-h b { font-family: var(--serif); font-size: 16px; color: var(--red-deep); font-weight: 600; }
.yj-onsec-h span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.yj-onsec .js-dict { margin-top: 0; border-radius: 0 0 var(--radius) var(--radius); }

/* 名称后的「宜 / 忌」小标 */
.yj-tag {
  display: inline-block; margin-left: 6px; padding: 0 5px; font-style: normal;
  font-size: 10.5px; line-height: 16px; border-radius: 3px; vertical-align: 2px;
  font-weight: 700; letter-spacing: .5px; color: #fff;
}
.yj-tag.yi { background: var(--red); }
.yj-tag.ji { background: var(--green); }

/* 折叠块（宜忌分类 + 吉神/凶煞/星宿等全表共用） */
.js-dict.js-fold { margin-top: 8px; }
.js-dict.js-fold > summary {
  cursor: pointer; user-select: none; list-style: none;
  transition: background .15s;
}
.js-dict.js-fold > summary::-webkit-details-marker { display: none; }
.js-dict.js-fold > summary:hover { background: #efe8d6; }
.js-dict.js-fold > summary:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.js-more { margin-left: auto; align-self: center; font-size: 12.5px; color: var(--red); font-weight: 600; white-space: nowrap; }
.js-more::after { content: '展开 ▾'; }
.js-dict.js-fold[open] > summary { background: #f4efe2; }
.js-dict.js-fold[open] .js-more::after { content: '收起 ▴'; }
.js-dict.js-fold[open] > summary { border-bottom: 1px solid var(--line); }
.js-dict.js-fold:target > summary { background: #fff6df; }
.js-dict.js-fold .note::before { content: '·'; margin-right: 5px; color: #c3b79c; }
/* 展开后顶部补的「老黄历 / 回到 xx」一行（折叠时表头里那两个链接会一起藏起来） */
.js-fold-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 14px 0; font-size: 12.5px;
}
.js-fold-bar .js-hl { margin-left: 0; }
.js-fold-bar .js-top { margin-left: auto; }
@media (max-width: 600px) {
  .js-dict.js-fold .note { display: none; }        /* 窄屏只留标题与条数，避免挤成三行 */
  .js-dict.js-fold .js-more { font-size: 12px; }
  .yj-onsec-h { padding: 8px 12px; gap: 4px; }
  .yj-onsec-h span { font-size: 11.5px; }
}

/* 折叠表头里「说明 + 条数」之间补一个分隔点，读起来不会连成一串。
   用 ~（通用兄弟）而不是 +：中间插了 .js-on-badge 徽标时也要保留这个点。 */
.js-dict-head .note ~ em::before { content: '·'; margin-right: 5px; color: #c3b79c; }

/* ------------------------------------------------------------------
   「本日在值」区块（吉神 / 凶煞 / 彭祖 / 星宿 / 九星 等全表共用）
   折叠的全表若有当天在值行，会在折叠块上方自动多输出一张不折叠的
   .dict-on 小表（与宜 / 忌 词条全解同一套样式），折叠标题上则提示
   「本日 N 条已列在上方」，点开仍能在全表里看到同样的高亮行。
   ------------------------------------------------------------------ */
.js-dict.dict-on {
  margin-top: 0;
  border-color: rgba(192, 57, 43, .22);
  box-shadow: 0 1px 0 rgba(192, 57, 43, .10), var(--shadow);
}
.js-dict.dict-on > .js-dict-head { background: #fdf3ef; }
.js-dict.dict-on > .js-dict-head b { color: var(--red-deep); }
/* 前缀标只在没有外层 .yj-onsec 头时加（宜忌那块自己已经写了「本日在值」） */
.js-dict.dict-on > .js-dict-head b::before {
  content: '本日在值'; display: inline-block; margin-right: 8px;
  padding: 0 7px; border-radius: 3px; vertical-align: 2px;
  font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: 1px;
  color: #fff; background: var(--red);
}
.yj-onsec .js-dict.dict-on > .js-dict-head b::before { content: none; margin-right: 0; }
.js-dict.dict-on.xiong { border-color: rgba(53, 147, 74, .24); }
.js-dict.dict-on.xiong > .js-dict-head { background: #eef6ee; }
.js-dict.dict-on.xiong > .js-dict-head b { color: #2f7a3d; }
.js-dict.dict-on.xiong > .js-dict-head b::before { background: var(--green); }

/* 折叠标题里的「本日 N 条已列在上方」提示（中性，不抢红/绿的吉凶配色） */
.js-on-note {
  font-style: normal; flex: 0 1 auto; align-self: center;
  margin-left: 8px; padding: 1px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .3px;
  color: var(--ink-2); background: var(--field); border: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 15em;
}
@media (max-width: 600px) {
  .js-dict.js-fold .js-on-note { margin-left: 6px; padding: 1px 7px; font-size: 11px; max-width: 9em; }
}
/* 宜忌本日在值区头部的宜 / 忌条数 */
.yj-onsec-h .yj-cnt-yi { color: var(--red); font-weight: 700; }
.yj-onsec-h .yj-cnt-ji { color: var(--green); font-weight: 700; }

/* 单元格很短的折叠表（如三伏 · 数九：名称 / 起止日期 / 天数）：
   窄屏不拆成三行，改成一行内换行，12 段看下来不会太长 */
@media (max-width: 600px) {
  .js-dict.dict-inline .di {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px;
    padding: 8px 12px;
  }
  .js-dict.dict-inline .di b { flex: 0 0 auto; }
  .js-dict.dict-inline .di .dt { flex: 1 1 60%; }
  .js-dict.dict-inline .di .md { flex: 0 0 auto; font-size: 12.5px; }
}
/* 说明文字折行后，行首的「·」会被甩到下一行开头（窄屏尤甚）——窄屏统一去掉。
   选择器与上面两条保持同权重，靠「写在后面」覆盖（不能降权重，会被压住）。 */
@media (max-width: 760px) {
  .js-dict.js-fold .note::before,
  .js-dict-head .note ~ em::before { content: none; }
}

/* ==========================================================================
   小屏优化（≤600px）：时辰吉凶 12 项**始终全展开** · 目录收起 · 长表横滑
   --------------------------------------------------------------------------
   桌面端 .lsr 每个时辰是一张 52px + 正文的卡片，12 张两列排 6 行，一屏能看完一半。
   到了 390px 变单列，12 项全展开是 2500px 的长条。
   ⚠️ 2026-10-19 修订：这里原来让子站 app.js 在 ≤600px 移除 .shr 的 open，
   收成「点一下才展开」。用户反馈「时辰吉凶这个卡片不用折叠，显示完整内容」
   —— 时辰是这一页最核心的查询结果，收起后每看一个时辰都要多点两次。
   现在 .shr 永远带 open，CSS 只负责把 summary 做成一条清晰的标题行
   （子时 + 时段 + 吉/凶 + 箭头），下面的宜忌一路铺到底；
   箭头仍保留，用户自己临时收起某一个时辰也方便。
   ========================================================================== */
.shr > summary{list-style:none;cursor:default;}
.shr > summary::-webkit-details-marker{display:none;}
/* 桌面：details 透明化，两列网格交给外层 li */
.lsr > ul > li > .shr{display:contents;}
.lsr .shr-t{display:none;}

/* 小屏：单列卡片，每项收成一行 */
@media (max-width:600px){
  .lsr > ul > li{display:block;padding:0;}
  .lsr > ul > li > .shr{display:block;border-radius:var(--radius-sm);}
  .lsr .shr > summary{
    display:flex;align-items:center;gap:10px;list-style:none;cursor:pointer;
    padding:11px 12px;-webkit-tap-highlight-color:transparent;
  }
  .lsr .shr > summary::-webkit-details-marker{display:none;}
  .lsr .shr .zn b{width:34px;height:34px;line-height:32px;font-size:16px;flex:0 0 34px;}
  .lsr .shr .shr-t{flex:1 1 auto;min-width:0;font-size:13px;color:var(--muted);
    overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
  .lsr .shr .zn em{flex:0 0 auto;margin-top:0;font-size:14px;}
  /* 箭头指示还有内容 */
  .lsr .shr > summary::after{
    content:"›";flex:0 0 auto;font-size:18px;line-height:1;color:#c3b79c;
    transition:transform .18s ease;
  }
  .lsr .shr[open] > summary::after{transform:rotate(90deg);}
  .lsr .shr[open] > summary{border-bottom:1px solid var(--line-soft);}
  .lsr .shr .scjx{padding:2px 12px 12px;}
  /* 收起时只留吉/凶两个关键信息，其余（干支、宜忌、五行）点开再看 */
  .lsr .scjx h3{font-size:14.5px;}
  .lsr .scjx p{font-size:14px;}

  /* 目录（名词解说页）在小屏收成一块，避免 1042px 的锚点列表压在正文前 */
  .js-toc{border:1px solid var(--line);border-radius:var(--radius);background:var(--card);}
  .js-toc > .js-toc-sum{
    display:flex;align-items:center;gap:8px;padding:11px 13px;cursor:pointer;list-style:none;
    font-size:15px;color:var(--ink);font-family:var(--serif);
  }
  .js-toc > .js-toc-sum::-webkit-details-marker{display:none;}
  .js-toc > .js-toc-sum::after{content:"目录 ›";margin-left:auto;font-family:var(--sans);
    font-size:12.5px;color:var(--muted);}
  .js-toc[open] > .js-toc-sum::after{content:"收起 ▴";}
  .js-toc:not([open]) > *:not(.js-toc-sum){display:none;}
  .js-toc:not([open]) > .tit{display:none;}

  /* 长表格：允许横向滚动，不再硬挤列宽把行高撑爆 */
  .tbl-wrap{border-radius:var(--radius-sm);}
  .tbl{min-width:520px;}
}

/* 名词解说页词条卡（.js-term）小屏瘦身
   --------------------------------------------------------------------------
   35 张卡在 390px 下是 18658px，平均每张 533px —— 想找「七十二候」得滚十几屏。
   现在服务端把每张卡拆成：标题 + 一句话概述（.js-one）+ 当日示例（.js-eg）常驻，
   「详细解说段落 + 小贴士」放进 <details class="js-more-box" open>。
   桌面端 display:contents + 隐藏 summary，外观与之前完全一致；
   ≤600px 时 summary 变成一枚「详细解说 ›」胶囊，app.js 移除 open 即收起。 */
.js-term > .js-more-box{display:contents;}
.js-term > .js-more-box > summary{display:none;}

@media (max-width:600px){
  .js-term{padding:13px 13px 14px;}
  .js-term > .js-more-box{display:block;}
  .js-term > .js-more-box > summary{
    display:inline-flex;align-items:center;gap:6px;margin-top:9px;
    padding:4px 12px;list-style:none;cursor:pointer;
    font-size:13px;color:var(--red-deep);background:var(--red-soft);
    border:1px solid rgba(192,57,43,.22);border-radius:999px;
  }
  .js-term > .js-more-box > summary::-webkit-details-marker{display:none;}
  .js-term > .js-more-box > summary::after{content:"›";font-size:15px;line-height:1;color:#c3b79c;
    transition:transform .18s ease;}
  .js-term > .js-more-box[open] > summary::after{transform:rotate(90deg);}
  /* 展开后正文紧跟 summary，不再留多余上间距（.js-body > p 自带 margin-top） */
  .js-term > .js-more-box .js-body{margin-top:0;}
}
