/* 好日历 — 样式。无构建步骤，直接由 Tomcat 提供。 */
:root {
  --green-900: #1d4d26;
  --green-800: #245f2f;
  --green-700: #2f7d3b;
  --green-600: #3b9147;
  --green-500: #52a85d;
  --green-200: #c8e6c4;
  --green-100: #e3f2df;
  --green-50: #f2f9f0;
  --red: #d9381e;
  --red-bg: #fff3f0;
  --orange: #e8590c;
  --ink: #1f2a22;
  --ink-2: #47524a;
  --muted: #7a857d;
  --line: #e3e8e2;
  --bg: #f4f6f2;
  --card: #fff;
  --work-bg: #f2f3f5;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 40, 20, .06), 0 4px 16px rgba(20, 40, 20, .05);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--green-700); }
h1, h2 { margin: 0; }
button { font: inherit; }
.muted { color: var(--muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* ---------------------------------------------------------------- 页头 */
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 24px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; text-decoration: none; color: var(--ink); }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(160deg, var(--green-500), var(--green-700));
  color: #fff; font-weight: 700; font-size: 19px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 700; font-size: 19px; letter-spacing: .5px; white-space: nowrap; }
.brand-tag { font-size: 12px; color: var(--muted); }
.nav { display: flex; gap: 18px; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--green-700); }
.top-weather { display: none; } /* 单栏布局（手机）才显示，见响应式部分 */
.lang-switch { margin-left: auto; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.lang-switch a { color: var(--muted); text-decoration: none; padding: 2px 6px; border-radius: 6px; font-weight: 600; }
.lang-switch a.on { color: #fff; background: var(--green-700); }

.clockbar { background: var(--green-800); color: #e8f5e9; font-size: 14px; }
.clockbar-inner { display: flex; align-items: center; gap: 14px; min-height: 40px; }
.local-clock { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; flex: none; }
.lc-label { opacity: .8; }
.lc-time { font-size: 18px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.lc-offset { opacity: .75; font-size: 12px; }
.world-clocks {
  display: flex; gap: 13px; margin: 0; padding: 0; list-style: none;
  overflow-x: auto; scrollbar-width: none; flex: 0 1 auto; min-width: 0; /* 电脑上不撑满，"更多"按钮紧跟在北京时间右边 */
}
.world-clocks::-webkit-scrollbar { display: none; }
.world-clocks li { white-space: nowrap; font-variant-numeric: tabular-nums; }
.world-clocks .wc-time { color: #fff; font-weight: 600; margin: 0 3px 0 4px; }
.world-clocks .wc-off { opacity: .7; font-size: 11px; }
.world-clocks .wc-am { font-size: .78em; font-weight: 500; margin-left: 1px; opacity: .85; }
/* 时区行右边的"更多 ›"，点开世界时间（手机上只剩 "›"，见 ≤900px） */
.wc-more { display: inline-flex; align-items: center; gap: 3px; flex: none; height: 26px; padding: 0 6px 0 9px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 6px; background: rgba(255, 255, 255, .12); color: #fff; font: inherit; font-size: 13px; line-height: 1; cursor: pointer; }
.wc-more-arrow { font-size: 18px; line-height: 1; }
.wc-more:hover { background: rgba(255, 255, 255, .25); }
/* 世界时间弹窗 */
.wt-list { column-count: 2; column-gap: 24px; margin: 4px 0 0; padding: 0; list-style: none; } /* 先读完左列再读右列，从西到东的顺序不乱 */
.wt-list li { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; break-inside: avoid; }
.wt-list li.here { background: var(--green-50); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 6px; }
.wt-city { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.wt-time .wc-am { font-size: .78em; font-weight: 500; margin-left: 1px; color: var(--muted); }
.wt-time small { margin-left: 4px; font-size: 11px; font-weight: 500; color: var(--orange); }
.wt-diff { flex: none; min-width: 3.2em; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* 屏幕放不下时可以左右滑动，右侧渐隐提示还有内容（放得下时不加，免得最后几个数字变淡） */
.world-clocks.more {
  mask-image: linear-gradient(90deg, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
}

/* ---------------------------------------------------------------- 布局 */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 411px;
  gap: 20px;
  padding-top: 20px;
  padding-bottom: 20px;
  align-items: start;
}
.col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}
.card-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { font-size: 18px; }
.card-sub { color: var(--muted); font-size: 13px; }
.attr { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.attr a { color: inherit; }
.note { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.link-btn {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--green-700); font-size: 13px;
}
.link-btn:hover { text-decoration: underline; }
.pill {
  display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 12px;
  background: var(--green-700); color: #fff; vertical-align: 1px;
}

/* ---------------------------------------------------------------- 月历 */
.cal { padding: 0; overflow: hidden; }
.cal-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  padding: 6.5px 18px;
  background: linear-gradient(180deg, var(--green-500), var(--green-700));
}
.tb-group { display: flex; align-items: center; gap: 4px; }
.tb-arrow {
  display: grid; place-items: center; width: 28px; height: 34px;
  color: #fff; font-size: 24px; line-height: 1; text-decoration: none; border-radius: 6px;
}
.tb-arrow:hover { background: rgba(255, 255, 255, .15); }
.tb-arrow:not([href]) { opacity: .35; pointer-events: none; }
.tb-select {
  height: 34px; padding: 0 30px 0 12px; border: 0; border-radius: 6px;
  font: inherit; font-size: 15px; color: var(--ink); background-color: #fff; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%232f7d3b'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
/* 当年放假安排的下拉：电脑上靠最右；手机上单独一行、占满（见 ≤640px） */
.tb-holiday { margin-left: auto; max-width: 220px; }
/* "返回今天"紧跟在月份箭头右边 */
.tb-today {
  padding: 5px 14px; border-radius: 6px;
  color: #fff; text-decoration: none; font-weight: 600;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .45);
}
.tb-today:hover { background: rgba(255, 255, 255, .28); }

.cal-grid { padding: 0 12px 12px; }
.cal-swipe { touch-action: pan-y pinch-zoom; } /* 横向滑动交给脚本换月，上下滚动和双指缩放照常 */
.cal-head {
  display: grid; grid-template-columns: repeat(7, 1fr);
  background: var(--green-100); margin: 0 -12px 8px; padding: 10px 12px;
  text-align: center; font-weight: 600; color: var(--ink-2);
}
.cal-head .weekend { color: var(--orange); }
.wd-short { display: none; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
.cell {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-end;
  min-height: 77px; padding: 7px 12px 6px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  color: var(--ink); text-decoration: none;
  transition: border-color .12s, box-shadow .12s;
}
.cell:hover { border-color: var(--green-500); box-shadow: 0 2px 8px rgba(47, 125, 59, .12); }
.cell .num { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cell .sub {
  margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--muted);
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cell.weekend .num { color: var(--orange); }
.cell.k-fest .sub { color: var(--red); }
.cell.k-term .sub { color: var(--green-700); }
.cell.k-month .sub { color: var(--orange); }
.cell.off { background: var(--red-bg); border-color: #f8d9d2; }
.cell.work { background: var(--work-bg); }
.cell.out { opacity: .38; }
.mark {
  position: absolute; top: 6px; right: 6px;
  padding: 2px 4px; border-radius: 4px; font-size: 11px; line-height: 1.1; font-weight: 600;
  color: #fff; background: var(--red);
}
.cell.work .mark { background: #5d6670; }
.cell.selected { border-color: var(--green-600); box-shadow: inset 0 0 0 1px var(--green-600); }
.cell.today { background: var(--green-200); border-color: var(--green-600); }
.cell.today::before {
  content: ""; position: absolute; top: -1px; left: -1px;
  border-style: solid; border-width: 26px 26px 0 0;
  border-color: var(--green-700) transparent transparent transparent;
  border-top-left-radius: 8px;
}
:lang(zh) .cell.today::after { content: "今"; position: absolute; top: 0; left: 3px; font-size: 11px; color: #fff; }
.cell.today .num, .cell.today .sub { color: var(--green-900); }

/* ---------------------------------------------------------------- 黄历 */
.almanac { padding: 0; overflow: hidden; }
/* 打开锦囊的按钮 */
.dc-btn {
  padding: 3px 11px; border: 1px solid var(--orange); border-radius: 999px; background: #fff7e8;
  color: var(--orange); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.dc-btn:hover { background: var(--orange); color: #fff; }
.alm-hero { position: relative; padding: 12px 18px 14px; text-align: center; background: var(--green-50); }
.alm-lunar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; }
.alm-lunar { font-size: 36px; font-weight: 700; line-height: 1.2; color: var(--green-700); }
.alm-gz { margin-top: 2px; color: var(--ink-2); }
.alm-xz { margin-top: 2px; font-size: 14px; color: var(--ink-2); } /* 和上一行干支同色，页面配色统一 */
.alm-xz-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; margin-top: 2px; }
.alm-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.chip { padding: 1px 10px; border-radius: 999px; font-size: 13px; background: #fff; border: 1px solid var(--line); }
.chip-fest { color: var(--red); border-color: #f5cfc7; }
.chip-off { color: #fff; background: var(--red); border-color: var(--red); }
.chip-work { color: #fff; background: #5d6670; border-color: #5d6670; }
.yiji { display: grid; gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.yj { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; background: #fff; }
.yj p { margin: 0; line-height: 1.75; }
.yj-tag {
  flex: none; display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px;
  border-radius: 6px; color: #fff; font-weight: 700; font-size: 17px;
}
.yi .yj-tag { background: var(--green-600); }
.ji .yj-tag { background: var(--red); }
:lang(en) .yj-tag { font-size: 13px; }
.alm-table { margin: 0; padding: 6px 18px 14px; }
.alm-table > div { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.alm-table > div:last-child { border-bottom: 0; }
.alm-table dt { color: var(--muted); font-size: 13px; padding-top: 1px; }
.alm-table dd { margin: 0; font-size: 14px; }
.alm-table dd.good { color: var(--green-700); }
.alm-table dd.bad { color: var(--red); }
:lang(en) .alm-table > div { grid-template-columns: 96px 1fr; }

/* ---------------------------------------------------------------- 日期提醒 */
/* 按钮 = 圆形铃铛图标 + 下面一行小字（比正文略小） */
.remind-btn {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px; width: 30px; padding: 0; border: 0;
  background: none; color: var(--green-700); font: inherit; cursor: pointer;
}
.remind-ico { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--green-600); border-radius: 50%; background: #fff; }
.remind-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* 小字比圆圈宽：让它左右对称地伸出去，不占这一行的横向空间，否则 390px 以下铃铛会掉到下一行 */
.remind-txt { font-size: 12.5px; line-height: 1; white-space: nowrap; color: var(--ink-2); }
.remind-btn.on .remind-ico { color: #fff; background: var(--orange); border-color: var(--orange); }
:lang(en) .remind-btn { margin: 0; } /* 英文这一行本来就会折行、干支那行也很宽，小字不往下探 */
.remind-box { padding: 12px 18px; border-top: 1px solid var(--line); background: #fff; }
.remind-box input {
  width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; outline: none;
}
.remind-box input:focus { border-color: var(--green-600); box-shadow: 0 0 0 3px var(--green-100); }
/* 提前几天提醒的下拉 */
.remind-when { margin-top: 8px; }
.remind-before {
  height: 36px; padding: 0 30px 0 10px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-size: 14px; color: var(--ink); background-color: #fff; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%232f7d3b'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.remind-before:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 3px var(--green-100); }
.remind-before:disabled { color: var(--muted); background-color: #f4f4f4; cursor: default; opacity: 1; }
.remind-hint { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.remind-actions { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.remind-msg { margin: 6px 0 0; font-size: 13px; color: var(--green-700); }
.link-btn.danger { color: var(--red); margin-left: auto; }
.btn-primary {
  padding: 5px 16px; border: 0; border-radius: 6px; cursor: pointer; font: inherit; font-size: 14px;
  color: #fff; background: var(--green-700);
}
.btn-primary:hover { background: var(--green-800); }
.rem-dot { position: absolute; left: 7px; bottom: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.remind-overlay {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: rgba(20, 30, 20, .45);
}
.remind-dialog {
  width: min(380px, 100%); padding: 22px 22px 18px; border-radius: 14px; background: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .25); text-align: center;
}
.remind-dialog h2 { font-size: 20px; color: var(--green-800); margin-bottom: 12px; }
.remind-list { margin: 0 0 16px; padding: 0; list-style: none; text-align: left; }
.remind-list li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.remind-date { display: block; font-size: 12px; color: var(--muted); }
.remind-text { font-size: 16px; }

/* 节气当天：格子左侧放节气小插图 */
.cell-term { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; pointer-events: none; }
.cell.today .cell-term { top: 58%; }

/* 右侧详情：当前节气卡片 */
/* 左边插画，右边两行说明竖排（从上到下，列从左到右） */
.alm-term {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 18px;
  padding: 32px 18px 12px; border-top: 1px solid var(--line); /* 上面留出左上角"二十四节气"的位置，不压插画 */
}
/* 节气的书法字：马善政楷书（SIL OFL），只截了"二十四节气、第、数字和 24 个节气名"共 41 个字（16KB），
   放在本站，不依赖 Google Fonts。没加载到时用系统的楷体 */
@font-face {
  font-family: "Ma Shan Zheng";
  src: url("/fonts/mashanzheng-jieqi-ccbecf669cd79bbe5f730c2fb59aacd9.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+4e00, U+4e03, U+4e09, U+4e4b, U+4e5d, U+4e8c, U+4e94, U+516b, U+516d, U+51ac, U+5206, U+5341, U+56db, U+5904, U+590f, U+5927, U+5bd2, U+5c0f, U+60ca, U+660e, U+6625, U+6691, U+6c14, U+6c34, U+6e05, U+6ee1, U+767d, U+79cb, U+79cd, U+7acb, U+7b2c, U+81f3, U+8282, U+8292, U+86f0, U+8c37, U+964d, U+96e8, U+96ea, U+971c, U+9732;
}
/* 农历日期左边的节气名，竖排书法字 */
.alm-term-bubble {
  writing-mode: vertical-rl; text-orientation: upright;
  font-family: "Ma Shan Zheng", "Kaiti SC", "STKaiti", "KaiTi", serif; font-size: 22px; line-height: 1;
  letter-spacing: 3px; color: #6b4423; text-decoration: none;
}
/* 英文不竖排（竖排会一个字母一个字母地摞起来，"Cold Dew" 高近 200px），改成横排斜体小标签 */
:lang(en) .alm-term-bubble { writing-mode: horizontal-tb; text-orientation: mixed; font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 16px; letter-spacing: 0; }
.alm-term-tag {
  position: absolute; top: 8px; left: 14px; z-index: 1;
  font-family: "Ma Shan Zheng", "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-size: 20px; line-height: 1.2; letter-spacing: 1px; color: #6b4423; text-decoration: none;
}
:lang(en) .alm-term-tag { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 15px; letter-spacing: 0; }
.alm-term-img { flex: none; }
.alm-term-img img { display: block; width: 160px; height: auto; }
.alm-term-lines {
  margin: 0; writing-mode: vertical-lr;
  font-family: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", serif;
  font-size: 15px; line-height: 2; letter-spacing: 4px; color: #4a3b2a;
}
.alm-term-en { margin: 0; font-size: 13px; color: var(--ink-2); text-align: left; }
.alm-term-en b { color: var(--green-800); }

/* 二十四节气页 */
.jieqi-page { margin: 20px 0; }
.jq-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; padding: 0; list-style: none; }
.jq a {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; height: 100%;
  padding: 10px 8px 14px; border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); text-decoration: none; text-align: center; background: #fff;
}
.jq a:hover { border-color: var(--green-500); box-shadow: 0 2px 10px rgba(47, 125, 59, .12); }
.jq img { width: 100%; max-width: 200px; height: auto; aspect-ratio: 1; }
.jq-name { font-weight: 700; font-size: 16px; }
.jq-date { font-size: 14px; }
.jq-time { font-size: 12px; color: var(--muted); }
.jq-time b { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.jq-intro, .jq-food { font-size: 12px; color: var(--ink-2); }
.jq-now a { border-color: var(--green-600); box-shadow: 0 0 0 2px var(--green-100); background: var(--green-50); }
.jq-badge { position: absolute; top: 8px; left: 8px; padding: 0 8px; border-radius: 999px; font-size: 12px; background: var(--green-700); color: #fff; }
@media (max-width: 1100px) { .jq-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .jq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cell-term { display: none; }
  .rem-dot { left: 3px; bottom: 3px; width: 5px; height: 5px; }
  .footer-sep { margin: 0 7px; }
  .footer-copy { flex-basis: 100%; } /* 手机上版权单独一行，后面那根竖线不显示 */
  .footer-sep-break { display: none; }
  .info-page { padding: 20px 16px 24px; margin: 14px 0; }
  .remind-btn { width: 28px; margin: -5px 0; } /* 带小字比农历大字高一点，上下各收 5px，这一行不因此变高 */
  .remind-ico { width: 28px; height: 28px; }
  .remind-txt { font-size: 11px; transform: translateX(-2px); } /* 用户看着太靠右，分两次各往左挪了 1px */
  .alm-term-bubble { font-size: 20px; letter-spacing: 2px; }
  .alm-term-img img { width: 140px; }
}

/* ---------------------------------------------------------------- 生肖 */
.zodiac-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.z {
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
.z-top { display: flex; align-items: center; gap: 6px; }
.z-name { font-weight: 600; }
.z-level { margin-left: auto; padding: 0 9px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.lv-ji .z-level { background: #e3f4e5; color: #1f7a31; }
.lv-ping .z-level { background: #eef0f2; color: #59626b; }
.lv-xiong .z-level { background: #fde9e5; color: #c52f17; }
.z-reason { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }

/* 中文页：12 生肖排成一行，每列上面是生肖和吉凶，下面的解释竖排（从上到下，列从左到右） */
:lang(zh) .zodiac-grid {
  grid-template-columns: repeat(12, minmax(56px, 1fr));
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
:lang(zh) .z { display: flex; flex-direction: column; align-items: center; padding: 10px 2px 12px; }
:lang(zh) .z-top { flex-direction: column; gap: 4px; }
:lang(zh) .z-name { font-size: 15px; white-space: nowrap; }
:lang(zh) .z-level { margin-left: 0; }
:lang(zh) .z-reason {
  writing-mode: vertical-lr;
  height: 11em;
  margin: 10px auto 0;
  font-size: 12.5px;
  line-height: 1.55;
  letter-spacing: 1px;
}

/* ---------------------------------------------------------------- 历史上的今天 */
.hist-list { margin: 0; padding: 0; list-style: none; }
.hist-list li { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.hist-list li:last-child { border-bottom: 0; }

/* ---------------------------------------------------------------- 今日心情 */
.mood-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.mood-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 8px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; cursor: pointer;
  transition: transform .12s, border-color .12s, background-color .12s;
}
.mood-btn img { width: 56px; height: 56px; }
.mood-btn:hover { border-color: var(--green-500); transform: translateY(-2px); }
.mood-btn.on { border-color: var(--green-600); background: var(--green-50); box-shadow: inset 0 0 0 1px var(--green-600); }
.mood-l { font-size: 14px; font-weight: 600; color: var(--ink); }
.mood-n { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mood-btn.on .mood-n { color: var(--green-700); font-weight: 600; }
.mood-n.bump { animation: mood-bump .35s ease-out; }
@keyframes mood-bump { 50% { transform: scale(1.25); color: var(--orange); } }
.mood-msg { margin: 10px 0 0; min-height: 1.3em; font-size: 13px; color: var(--green-700); }
.hist-year {
  flex: none; min-width: 54px; text-align: right; font-weight: 700; color: var(--green-700);
  font-variant-numeric: tabular-nums;
}
.hist-text { flex: 1; min-width: 0; }
.hist-link { flex: none; text-decoration: none; color: var(--muted); }
.hist-link:hover { color: var(--green-700); }
.history details { margin-top: 8px; }
.history summary { cursor: pointer; color: var(--green-700); font-weight: 500; padding: 4px 0; }

/* ---------------------------------------------------------------- 天气 */
.w-actions { margin-left: auto; display: flex; gap: 14px; }
.w-search { margin-bottom: 12px; }
.w-search input {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; outline: none;
}
.w-search input:focus { border-color: var(--green-600); box-shadow: 0 0 0 3px var(--green-100); }
.w-results { margin: 6px 0; padding: 0; list-style: none; }
.w-results button {
  width: 100%; text-align: left; padding: 7px 10px; border: 0; border-radius: 6px;
  background: none; cursor: pointer; color: var(--ink);
}
.w-results button:hover { background: var(--green-50); }
.w-results small { color: var(--muted); margin-left: 6px; }
.w-now { display: flex; align-items: center; gap: 14px; }
.w-icon { font-size: 46px; line-height: 1; }
.w-temp { font-size: 40px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.w-none { margin: 0; padding: 18px 0; text-align: center; font-size: 15px; }
.w-temp .w-lo { font-size: 22px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.w-desc { font-weight: 600; }
.w-meta { margin-top: 4px; font-size: 13px; color: var(--muted); }
.w-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 14px; text-align: center; }
.w-day { padding: 6px 0; border-radius: 8px; font-size: 12px; }
.w-day.on { background: var(--green-50); } /* 今天，或日历上选中的那天 */
.w-day .d-icon { font-size: 20px; line-height: 1.5; }
.w-day .d-hi { font-weight: 700; font-size: 13px; }
.w-day .d-lo { color: var(--muted); }
.w-day .d-pop { color: #2d74c4; font-size: 11px; }
.w-day { cursor: pointer; }
.w-day.open { box-shadow: inset 0 0 0 1px var(--green-500); } /* 打开了逐小时横条的那天 */

/* 逐小时天气横条：天气卡片里点某一天、手机页头点天气时打开 */
.w-detail { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.top-detail { background: #fff; border-bottom: 1px solid var(--line); padding: 10px 0 8px; }
.top-detail .w-detail { margin-top: 0; padding-top: 0; border-top: 0; }
.wd-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.wd-close { margin-left: auto; padding: 0 4px; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; }
.wd-sum { margin: 4px 0 8px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.wd-hours { display: flex; gap: 2px; margin: 0; padding: 0 0 4px; list-style: none; overflow-x: auto; scroll-snap-type: x proximity; }
.wd-hours li { flex: 0 0 46px; padding: 4px 0; border-radius: 6px; text-align: center; font-size: 12px; scroll-snap-align: start; }
.wd-hours li.wet { background: #eef5fc; } /* 下雨下雪的小时 */
.wd-hours .h-t { color: var(--muted); white-space: nowrap; }
.wd-hours .h-day { display: block; font-size: 10px; line-height: 1.2; color: var(--green-700); }
.wd-hours .h-i { font-size: 18px; line-height: 1.5; }
.wd-hours .h-c { font-weight: 600; }
.wd-hours .h-p { min-height: 1.4em; font-size: 11px; color: #2d74c4; }

/* ---------------------------------------------------------------- 新闻 */
.news-list { margin: 0; padding: 0; list-style: none; counter-reset: n; }
.news-list li { position: relative; padding: 8px 0 8px 28px; border-bottom: 1px dashed var(--line); }
.news-list li:last-child { border-bottom: 0; }
.news-list li.item::before {
  counter-increment: n; content: counter(n);
  position: absolute; left: 0; top: 10px; width: 20px; height: 20px; border-radius: 5px;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--green-100); color: var(--green-800);
}
.news-list li.item:nth-child(-n+3)::before { background: var(--orange); color: #fff; }
.news-list li.muted { padding-left: 0; }
.news-list a { color: var(--ink); text-decoration: none; font-weight: 500; }
.news-list a:hover { color: var(--green-700); text-decoration: underline; }
.news-meta { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.news-tag {
  display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 4px;
  font-size: 11px; line-height: 17px; vertical-align: 1px;
}
.tag-local { background: var(--green-100); color: var(--green-800); }
.tag-national { background: #e8f0fb; color: #2b5ea7; }
.tag-global { background: #f3eafa; color: #7240a8; }

/* ---------------------------------------------------------------- 放假安排页 */
.holidays-page { margin: 20px 0; }
.hp-head { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 16px; }
.hp-head h1 { font-size: 24px; }
.hp-head .tb-arrow { color: var(--green-700); }
.hp-head .tb-arrow:hover { background: var(--green-50); }
.table-wrap { overflow-x: auto; }
.hp-table { width: 100%; border-collapse: collapse; }
.hp-table th, .hp-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.hp-table th { background: var(--green-100); font-weight: 600; white-space: nowrap; }
.hp-name a { font-weight: 600; color: var(--red); text-decoration: none; white-space: nowrap; }
.hp-days { white-space: nowrap; font-weight: 600; }
.hp-none { padding: 24px; text-align: center; background: var(--green-50); border-radius: 8px; }

/* ---------------------------------------------------------------- 页脚 */
.site-footer { padding: 18px 0 30px; font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--line); }
.site-footer p { margin: 4px 0; }
.site-footer a { color: inherit; }
/* 版权 | 联系方式 | 意见反馈；隐私政策 | 服务条款 | 关于 | 联系我们（参照 health_view） */
.footer-meta { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); text-align: center; }
.footer-row {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  margin: 0 !important; font-size: 12px; line-height: 2; color: var(--muted);
}
.footer-row a { color: var(--green-700); text-decoration: none; }
.footer-row a:hover { text-decoration: underline; }
.footer-sep { color: #d3dad0; margin: 0 10px; }

/* 关于 / 隐私政策 / 服务条款 / 联系我们 */
.info-page { max-width: 780px; margin: 24px auto; padding: 28px 32px 32px; }
.eyebrow { margin: 0 0 4px; font-size: 13px; color: var(--green-700); font-weight: 600; letter-spacing: 1px; }
.info-page h1 { font-size: 26px; margin-bottom: 6px; }
.info-updated { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.prose h2 { margin: 22px 0 6px; font-size: 17px; }
.prose p { margin: 6px 0; line-height: 1.85; color: var(--ink-2); }
.prose a { color: var(--green-700); }
.info-list { margin: 6px 0 10px; padding-left: 22px; line-height: 1.9; color: var(--ink-2); }
.callout { padding: 12px 14px; border-radius: 8px; background: #fff7e8; border-left: 4px solid var(--orange); }
.contact-email { font-size: 20px !important; }

/* ---------------------------------------------------------------- 锦囊（弹窗） */
.dc-overlay {
  position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px;
  background: rgba(20, 30, 20, .5);
}
body.dc-open { overflow: hidden; }
.dc {
  width: min(540px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); /* dvh：手机浏览器地址栏占掉的高度不算在内 */
  overflow: auto; -webkit-overflow-scrolling: touch;
  padding: 0 20px 14px; border-radius: 16px; background: #fffdf7; box-shadow: 0 12px 48px rgba(0, 0, 0, .3);
}
/* 标题栏（带 ×）钉在卡片顶部，内容往下滚它不动，随时能关 */
.dc-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: baseline; gap: 10px; padding: 16px 0 8px; background: #fffdf7; }
.dc-title { font-family: "Kaiti SC", "STKaiti", "KaiTi", serif; font-size: 26px; font-weight: 700; color: var(--green-800); }
.dc-sub { font-size: 13px; color: var(--muted); }
.dc-x { margin-left: auto; width: 40px; height: 40px; margin-right: -10px; margin-bottom: -8px; border: 0; border-radius: 50%; background: none; font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; }
.dc-x:hover, .dc-x:active { background: var(--green-50); color: var(--ink); }
.dc-date { display: flex; align-items: center; gap: 14px; margin: 6px 0 6px; }
.dc-num { font-size: 56px; font-weight: 700; line-height: 1; color: var(--green-700); font-variant-numeric: tabular-nums; }
.dc-lunar { display: flex; flex-direction: column; gap: 2px; font-size: 15px; line-height: 1.4; }
.dc-lunar small { font-size: 12px; color: var(--muted); }
.dc-chips span { display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 999px; background: var(--red-bg); color: var(--red); }
.dc-rows { margin: 0; padding: 0; list-style: none; }
.dc-rows li { display: flex; gap: 10px; padding: 4px 0; border-top: 1px dashed var(--line); font-size: 14px; line-height: 1.5; }
.dc-k { flex: none; color: var(--muted); }
/* 分区之间的空白压到最少：横线和标题贴着，h3 不要浏览器默认的上下边距 */
.dc-sec { margin-top: 4px; padding-top: 3px; border-top: 1px solid var(--line); }
.dc-sec h3 { margin: 0 0 3px; font-size: 15px; color: var(--green-800); }
.dc-fact { margin-bottom: 6px; }
.dc-fact:last-child { margin-bottom: 0; }
.dc-q {
  display: flex; align-items: baseline; gap: 8px; width: 100%; margin: 0 0 4px; padding: 0; border: 0; background: none;
  font: inherit; font-weight: 600; line-height: 1.5; text-align: left; color: var(--ink); cursor: pointer;
}
.dc-q-hint { flex: none; font-size: 13px; font-weight: 500; color: var(--green-700); }
.dc-q[aria-expanded="true"] .dc-q-hint { color: var(--muted); }
.dc-a { padding: 8px 10px; border-radius: 8px; background: var(--green-50); font-size: 14px; line-height: 1.6; }
.dc-a b { display: block; margin-bottom: 2px; color: var(--green-800); }
.dc-a p { margin: 0; color: var(--ink-2); }
.dc-fortune-body { padding: 0; text-align: center; }
/* 签筒：两张用户给的图（已抠掉背景），罐身对齐、底边对齐。抽的时候先摇签筒图，
   然后换成"签升起"的图，用遮罩从筒口往上慢慢露出那根签 */
/* 容器只留 18px 头部空间，签升起来时（高出筒口 45px）越过"抽签"标题那一行——标题靠左、签在正中，互不遮挡；
   这样标题和签筒之间就没有一大块空白 */
.dc-jar-wrap { position: relative; width: 140px; height: 150px; margin: 0 auto 8px; }
.dc-jar, .dc-jar-up { position: absolute; left: 50%; bottom: 0; width: auto; transform: translateX(-50%); filter: drop-shadow(0 3px 6px rgba(80, 30, 10, .25)); }
.dc-jar { height: 132px; transform-origin: 50% 92%; }
.dc-jar.shake { animation: dc-shake .9s ease-in-out; }
.dc-jar.hide { opacity: 0; }
.dc-jar-up { height: 177px; opacity: 0; clip-path: inset(51px 0 0 0); }
.dc-jar-up.out { opacity: 1; animation: dc-rise .7s ease-out forwards; }
@keyframes dc-rise {
  from { clip-path: inset(51px 0 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
.dc-slip-slot:not(:empty) { margin: 4px 0 12px; }
@keyframes dc-shake { /* 签筒本身用 translateX(-50%) 居中，摇的时候要保留 */
  0%, 100% { transform: translateX(-50%) rotate(0); }
  20% { transform: translateX(-50%) rotate(-14deg); }
  40% { transform: translateX(-50%) rotate(12deg); }
  60% { transform: translateX(-50%) rotate(-9deg); }
  80% { transform: translateX(-50%) rotate(6deg); }
}
.dc-draw {
  padding: 8px 26px; border: 0; border-radius: 999px; background: var(--orange); color: #fff;
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.dc-draw:disabled { opacity: .6; }
/* 签：像幸运饼干里的纸条 */
.dc-slip {
  display: inline-block; min-width: min(300px, 100%); max-width: 100%; padding: 14px 18px;
  border: 2px solid #d4aa4f; border-radius: 6px; background: #fff8e4;
  box-shadow: 0 2px 10px rgba(120, 80, 0, .12); text-align: center; animation: dc-pop .35s ease-out;
}
@keyframes dc-pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.dc-slip-no { font-size: 12px; letter-spacing: 2px; color: #8a6a3a; }
.dc-slip-level { font-family: "Kaiti SC", "STKaiti", "KaiTi", serif; font-size: 28px; font-weight: 700; letter-spacing: 4px; color: #b5452b; }
.dc-slip.lv-best .dc-slip-level { color: #c0392b; }
.dc-slip.lv-plain .dc-slip-level { color: #6b4f3a; }
.dc-slip-text { margin: 6px 0 0; font-size: 15px; line-height: 1.7; color: #4a3b2a; }
.dc-lucky { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #d4aa4f; font-size: 14px; color: #4a3b2a; }
.dc-lucky b { font-size: 16px; color: #b5452b; }
.dc-lucky-why { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
/* 黄道十二宫圆盘 */
.alm-xz { cursor: pointer; }
.alm-xz:hover { color: var(--green-700); }
.zw-svg { display: block; width: 100%; max-width: 400px; margin: 6px auto 2px; }
.zw-sign path { fill: #fff; stroke: #d9c9a3; stroke-width: 1; cursor: pointer; transition: fill .12s; }
.zw-sign:nth-child(even) path { fill: #fbf6ea; }
.zw-sign:hover path, .zw-sign.sel path { fill: var(--green-100); }
.zw-sign.on path { fill: var(--green-200); stroke: var(--green-600); }
.zw-sign:focus { outline: none; }
.zw-sign:focus path { stroke: var(--green-700); stroke-width: 2; }
.zw-sign text { pointer-events: none; fill: var(--ink); }
.zw-glyph { font-size: 22px; }
.zw-name { font-size: 12px; font-weight: 600; }
.zw-range { font-size: 9.5px; fill: var(--muted) !important; font-variant-numeric: tabular-nums; }
.zw-center { fill: #fffdf7; stroke: #d9c9a3; }
.zw-c-glyph { font-size: 46px; fill: var(--green-700); }
.zw-c-name { font-size: 18px; font-weight: 700; fill: var(--green-800); }
.zw-c-range { font-size: 13px; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .dc-overlay { padding: 0; place-items: end center; }
  .dc { width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 16px 16px 0 0; padding: 0 16px calc(14px + env(safe-area-inset-bottom)); }
  .dc-head { padding-top: 14px; }
  .dc-num { font-size: 48px; }
}

/* ---------------------------------------------------------------- 添加到手机桌面 */
.a2hs {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50;
  display: flex; align-items: center; gap: 10px; max-width: 560px; margin: 0 auto; padding: 12px 10px 12px 12px;
  border-radius: 12px; background: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); font-size: 14px; line-height: 1.5;
}
.a2hs img { flex: none; width: 40px; height: 40px; border-radius: 9px; }
.a2hs-text { flex: 1; min-width: 0; }
.a2hs-text b { display: block; }
.a2hs-text span { color: var(--ink-2); font-size: 13px; }
/* iPhone 的分享图标：蓝色，和系统里的一样 */
.share-icon {
  display: inline-block; width: 1.3em; height: 1.3em; margin: 0 2px; vertical-align: -0.3em;
  fill: none; stroke: #007aff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.a2hs-add {
  flex: none; padding: 6px 14px; border: 0; border-radius: 8px; background: var(--green-700); color: #fff;
  font: inherit; font-weight: 600; cursor: pointer;
}
.a2hs-x { flex: none; align-self: flex-start; padding: 0 2px; border: 0; background: none; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; }
.a2hs.at-top { top: calc(58px + env(safe-area-inset-top)); bottom: auto; } /* 点页头按钮打开时显示在页头下面 */
/* 页头"添加到桌面"按钮：只在手机（单栏）上显示 */
.a2hs-btn {
  display: none; flex: none; padding: 3px 9px; border: 1px solid var(--green-600); border-radius: 999px;
  background: #fff; color: var(--green-700); font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer;
}

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 1fr) 366px; }
  .zodiac-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  /* 单栏：月历 → 黄历 → 天气 → 生肖 → 新闻 → 历史 */
  /* 时间栏和月历之间只留 3px（用户 2026-10-18 要求缩到原来 14px 的 20%）；
     各个卡片占屏幕宽度的 98%，左右各留 1%（用户 2026-10-18 先要 99%、又改成 98%；原来 .wrap 两边各 16px） */
  .layout { display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding: 3px 1% 20px; }
  /* 黄历第一行（节气、农历日期、锦囊、铃铛）在手机上拉开到整行：两头顶到边，中间平均分 */
  .alm-lunar-row { justify-content: space-between; }
  :lang(en) .alm-lunar-row { justify-content: center; } /* 英文这一行会折成两三行，拉开反而歪，保持居中 */
  .col { display: contents; }
  #calendar { order: 1; }
  #almanac { order: 2; }
  #weather { order: 3; }
  #zodiac { order: 4; }
  #news { order: 5; }
  #history { order: 6; }
  #mood { order: 7; }
  .nav { display: none; }
  /* 天气卡片排到了月历和黄历下面，页头放一个简短的天气 */
  .top-weather {
    display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; /* 实在放不下时末尾显示"…"，不压到语言切换 */
    padding: 2px 10px; border-radius: 999px; background: var(--green-50);
    color: var(--ink-2); text-decoration: none; font-size: 15px; white-space: nowrap;
    border: 0; font-family: inherit; cursor: pointer;
  }
  .top-weather[aria-expanded="true"] { background: var(--green-100); }
  .top-weather .tw-label { color: var(--muted); margin-right: 4px; }
  /* 靠右，紧挨着 EN | CN */
  .top-weather { margin-left: auto; }
  .top-weather:not(:empty) + .lang-switch { margin-left: 0; }
  .top-weather:empty { display: none; }
  .a2hs-btn:not([hidden]) { display: inline-block; }
  /* 页头一行要放下"好日历、添加到桌面、天气、语言"：语言只显示要切换到的那个（中文页显示 EN） */
  .lang-switch a.on, .lang-switch > span { display: none; }
  .lang-switch a { padding: 2px 4px; }
}

@media (max-width: 640px) {
  body { font-size: 14px; }
  .topbar-inner { min-height: 52px; gap: 8px; }
  .a2hs-btn { padding: 2px 8px; font-size: 12px; }
  .top-weather { padding: 2px 8px; font-size: 14px; }
  .brand-tag { display: none; }
  .brand-mark { width: 30px; height: 30px; font-size: 16px; }
  .clockbar-inner { gap: 10px; }
  .lc-label, .lc-offset { display: none; }
  .lc-time { font-size: 16px; }
  .world-clocks { gap: 11px; font-size: 13px; }
  /* 这一行要放下本地时间、三个城市和"›"，北京的时间不能被挤出去 */
  .wc-more { width: 22px; height: 22px; font-size: 16px; }
  .clockbar .wrap { padding-left: 10px; padding-right: 10px; }
  .clockbar-inner { gap: 7px; }
  .world-clocks { gap: 7px; font-size: 12.5px; }
  .world-clocks .wc-time { margin-left: 2px; }
  .lc-time { font-size: 15px; }
  .wt-list { column-count: 1; }
  .world-clocks .wc-suffix, .world-clocks .wc-off { display: none; } /* 手机上只显示"纽约 22:12" */
  .world-clocks { flex: 1; } /* 手机上时区列表撑满、可横向滑动，"›" 靠最右 */
  .wc-more { width: 24px; height: 24px; padding: 0; justify-content: center; }
  .wc-more-txt { display: none; }
  .card { padding: 14px; }
  .card.cal, .card.almanac { padding: 0; }
  /* 年份、月份两组控件和"返回今天"要放在一行里 */
  .cal-toolbar { padding: 5px 8px; gap: 6px; }
  .tb-group { gap: 1px; }
  .tb-arrow { width: 24px; }
  .tb-select { height: 32px; font-size: 14px; padding: 0 22px 0 7px; background-position: right 7px center; }
  .tb-today { padding: 4px 9px; font-size: 13px; white-space: nowrap; }
  .tb-holiday { flex: 1 1 100%; max-width: none; margin-left: 0; }
  .cal-grid { padding: 0 6px 6px; }
  .cal-head { margin: 0 -6px 6px; padding: 8px 6px; font-size: 15px; }
  .wd-long { display: none; }
  .wd-short { display: inline; }
  .cal-row { gap: 3px; margin-bottom: 3px; }
  .cell { min-height: 54px; padding: 4px 2px 3px; align-items: center; justify-content: flex-end; border-radius: 6px; }
  .cell .num { font-size: 22px; line-height: 1; } /* 手机上字号放大（家人说看不清）；电脑版保持原来大小 */
  .cell .sub { font-size: 12px; line-height: 1.15; margin-top: 1px; }
  /* 休 / 班做成贴着右上角的角标，和放大后的数字留出间距 */
  .mark { top: 0; right: 0; padding: 0 3px; font-size: 10px; line-height: 1.2; border-radius: 0 5px 0 4px; }
  .cell.today::before { border-width: 16px 16px 0 0; border-top-left-radius: 6px; }
  :lang(zh) .cell.today::after { font-size: 10px; left: 1px; top: -1px; }
  .alm-hero { padding: 10px 10px 12px; } /* 左右 10px：铃铛下的小字比圆圈宽出 10px，正好不被裁 */
  .alm-lunar { font-size: 30px; }
  .zodiac-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .z { padding: 8px 10px; }
  .hp-table th, .hp-table td { padding: 10px 8px; font-size: 13px; }
  .mood-grid { gap: 5px; }
  .mood-btn { padding: 8px 2px 6px; }
  .mood-btn img { width: 44px; height: 44px; }
  .mood-l { font-size: 13px; }
  .mood-n { font-size: 11px; }
  .w-days { gap: 2px; }
}

@media (max-width: 380px) {
  .zodiac-grid { grid-template-columns: minmax(0, 1fr); }
  /* 工具栏一行放下年份、月份和"返回今天" */
  .cal-toolbar { padding: 5px 6px; gap: 4px; }
  .tb-arrow { width: 20px; }
  .tb-select { font-size: 13px; padding: 0 20px 0 6px; background-position: right 6px center; }
  .tb-today { padding: 4px 7px; }
  /* 详情卡片：寒露 + 农历 + 锦囊、星座 + 节日标签各放一行 */
  .alm-lunar-row { gap: 4px 8px; }
  .alm-lunar { font-size: 26px; }
  .alm-term-bubble { font-size: 18px; letter-spacing: 1px; }
  .alm-xz-row { gap: 4px 8px; }
  .alm-xz { font-size: 13px; }
  .alm-chips .chip { font-size: 12px; padding: 1px 7px; }
  /* 320px 宽的手机：页头收紧间距，放下"好日历  天气 晴 21°C  EN | CN" */
  .topbar-inner { gap: 8px; }
  .brand { gap: 6px; }
  .top-weather { padding: 2px 7px; font-size: 13px; }
  .lang-switch { gap: 2px; }
  .lang-switch a { padding: 2px 4px; }
  /* 世界时间再收紧：本地时间、三个城市（带 am）和"›"都在一行 */
  .clockbar .wrap { padding-left: 8px; padding-right: 8px; }
  .clockbar-inner { gap: 6px; }
  .lc-time { font-size: 14px; }
  .world-clocks { gap: 6px; font-size: 12px; }
  .world-clocks .wc-time { margin: 0 0 0 2px; }
}

@media (max-width: 340px) {
  .remind-btn { align-items: flex-end; } /* 320px 时小字居中会顶到卡片右边，改成右对齐铃铛 */
  .world-clocks .wc-am { display: none; } /* 320px 的老手机放不下 am，北京时间优先 */
  .tb-today-pre { display: none; } /* 最窄的屏幕上只显示"今天" */
  .alm-lunar { font-size: 24px; }
  .tb-arrow { width: 18px; }
  /* 320px 宽的老手机：页头再紧一点，天气不被截断 */
  .brand-name { font-size: 17px; }
  .a2hs-btn { padding: 2px 6px; font-size: 11px; }
  .topbar .wrap { padding-left: 10px; padding-right: 10px; }
  .topbar-inner { gap: 6px; }
  .top-weather .tw-label { display: none; } /* 有 °C 在，不会被看成日期 */
}
