/* 万年历独立微信风格；不加载共享 style.css，避免影响其他页面。 */
:root {
  color-scheme:light;
  --accent:#07c160;
  --green-text:#079447;
  --ink:#191919;
  --muted:#888;
  --line:#ededed;
  --bg:#f7f7f7;
  --red:#e25555;
  --success:#079447;
  --text:#191919;
  --text-2:#555;
  --text-3:#888;
  --text-muted:#888;
  --text-dim:#b2b2b2;
  --border-soft:#ededed
}

* {
  box-sizing:border-box
}
body {
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  -webkit-font-smoothing:antialiased;
  font-size:14px
}
a {
  color:inherit;
  text-decoration:none
}
button {
  font:inherit;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent
}
button:active {
  transform:scale(.97)
}
button:focus-visible,a:focus-visible {
  outline:2px solid var(--green-text);
  outline-offset:3px
}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap
}
.site-header {
  background:#fff;
  border-bottom:1px solid var(--line)
}
.header-inner {
  max-width:1320px;
  margin:auto;
  height:72px;
  display:flex;
  align-items:center;
  gap:66px;
  padding:0 20px
}
.site-brand {
  display:flex;
  align-items:center;
  gap:7px;
  font-size:17px;
  font-weight:500;
  letter-spacing:.2px;
  flex:none
}
.clock-logo {
  width:22px;
  height:22px;
  display:block;
  flex:none;
}
.primary-nav {
  height:100%;
  display:flex;
  align-items:stretch;
  gap:34px
}
.primary-nav a {
  position:relative;
  display:flex;
  align-items:center;
  font-size:16px;
  padding:0 4px
}
.primary-nav a.active {
  color:var(--green-text);
  font-weight:500
}
.primary-nav a.active:after {
  position:absolute;
  content:"";
  width:22px;
  height:3px;
  background:var(--accent);
  border-radius:2px;
  bottom:0;
  left:50%;
  transform:translateX(-50%)
}
.header-caption {
  margin-left:auto;
  color:#b2b2b2;
  font-size:12px;
  white-space:nowrap
}
.sub-nav {
  max-width:1120px;
  margin:0 auto;
  height:56px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:32px;
  font-size:14px;
  color:#888
}
.sub-nav a.active {
  color:var(--green-text);
  font-weight:500
}
/* 保留页脚访问统计浮层。 */
.stats-brand {
  position: relative;
  cursor: default;
  border-bottom: 1px dashed var(--text-dim);
}

.brand-stats {
  position: absolute;
  bottom: calc(100% + 10px);
  top: auto;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #fff;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xl);
  padding: 14px 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease;
  pointer-events: none;
  z-index: 20;
  white-space: nowrap;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.4;
}

.stats-brand:hover .brand-stats,
.stats-brand.open .brand-stats {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.bs-today {
  font-size: var(--fs-sm);
  color: var(--text-2);
  margin-bottom: 10px;
}

.bs-today strong {
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.bs-bars {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.bs-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.bs-track {
  width: 12px;
  height: 40px;
  display: flex;
  align-items: flex-end;
  background: var(--fill);
  border-radius: var(--r-xs);
  overflow: hidden;
}

.bs-track i {
  display: block;
  width: 100%;
  background: var(--accent);
  border-radius: var(--r-xs) var(--r-xs) 0 0;
}

.bs-bar em {
  font-size: var(--fs-2xs);
  font-style: normal;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.bs-bar span {
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.bs-loading {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  padding: 4px 2px;
}


:root {
  --r-xs: 4px;
  --r-md: 8px;
  --shadow-xl: 0 4px 20px rgba(0, 0, 0, .06);
  --fill: #f2f2f2;
  --fs-2xs: 11px;
  --fs-xs: 12px;
  --fs-sm: 13px;
}
.brand-stats { border-color: var(--line); transform: translateX(-50%) translateY(4px); }

/* 桌面页头独立于内容宽度，主菜单保持居中；两栏按内容自然等高。 */
@media (min-width: 851px) {
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
  }
  .site-brand { justify-self: start; }
  .primary-nav { justify-self: center; }
  .header-caption { justify-self: end; }
  .cal-main { align-items: stretch; }
  .calendar-column, .day-column {
    display: flex;
    flex-direction: column;
  }
  .cal-card {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .cal-grid { flex: 1; }
  .hl-today-card { flex: 1; }
}
.header-inner{height:56px;display:grid;grid-template-columns:1fr auto 1fr;gap:24px}.site-brand{justify-self:start}.header-caption{justify-self:end}.primary-nav{justify-self:center}.history-main{max-width:880px;margin:0 auto}.history-toolbar{background:#fff;border-radius:8px;padding:24px 28px 0}.history-date-row{display:flex;align-items:center;justify-content:space-between;gap:16px}.date-picker{position:relative;display:flex;align-items:center;gap:12px;width:max-content;font-size:22px;font-weight:500;cursor:pointer}.date-picker>span:last-child{font-size:16px;color:#999}.date-picker input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.date-picker:focus-within{outline:2px solid var(--green-text);outline-offset:4px;border-radius:3px}#historyLunar{margin:8px 0 0;font-size:12px;color:#999}.date-actions{display:flex;gap:6px;align-items:center}.date-actions button{min-width:36px;min-height:36px;border:0;background:transparent;border-radius:4px;font-size:22px;color:#777}.date-actions #historyToday{background:#f5f5f5;font-size:13px;color:var(--green-text);padding:0 15px;margin-left:8px}.date-actions button:hover{background:#f5f5f5}.history-filter-row{display:flex;align-items:center;justify-content:space-between;margin-top:23px;border-top:1px solid #ededed}.history-filters{display:flex;gap:28px}.history-filters button{position:relative;min-height:50px;background:transparent;border:0;padding:0 2px;color:#888;font-size:14px}.history-filters button[aria-pressed=true]{color:var(--green-text);font-weight:500}.history-filters button[aria-pressed=true]:after{content:'';position:absolute;bottom:0;left:0;right:0;height:2px;background:#07c160}#historyCount{font-size:12px;color:#aaa}.history-list{display:flex;flex-direction:column;gap:12px;margin-top:16px}.history-card{background:#fff;border-radius:8px;padding:26px 28px;display:grid;grid-template-columns:90px minmax(0,1fr);gap:24px}.history-year{font-size:27px;line-height:1.3;font-weight:400;font-variant-numeric:tabular-nums}.history-age{font-size:11px;color:#aaa;margin-top:7px}.history-kind{font-size:11px;color:var(--green-text);margin-bottom:9px}.history-card h3{font-size:19px;font-weight:500;line-height:1.6;margin:0;color:#191919}.history-body{font-size:15px;line-height:1.95;color:#555;white-space:pre-wrap;margin:12px 0 0;overflow-wrap:anywhere}.history-aside{font-size:13px;line-height:1.8;color:#888;border-left:2px solid #e2eee6;padding-left:12px;margin:16px 0 0}.history-card .history-actions{border-top:1px solid #f1f1f1;margin-top:20px;padding-top:10px;gap:24px}.history-card .history-actions button{background:transparent;border:0;border-radius:4px;padding:0;min-height:36px;color:#888}.history-card .history-actions button[aria-pressed=true]{color:var(--green-text);background:transparent}.history-action-count{border:0;padding-left:1px}#historyStatus{padding:50px 20px 16px;text-align:center;color:#999;font-size:14px}#historyStatus:empty{display:none}#historyRetry{display:block;margin:0 auto 30px;border:0;border-radius:4px;background:#eaf8ef;color:var(--green-text);padding:10px 20px}footer{margin:30px auto;text-align:center;font-size:11px;color:#aaa;line-height:1.9}.footer-links{display:flex;justify-content:center;gap:24px;font-size:12px;color:#888}.site-meta{margin:10px 0 0}.history-list[aria-busy=true]{opacity:.5}.history-dialog h2{font-weight:500}
@media(max-width:1190px){.header-caption{display:none}.header-inner{padding:0 28px}.history-main{margin-inline:28px}}
@media(max-width:600px){.header-inner{display:flex;flex-wrap:wrap;height:auto;min-height:102px;padding:18px 20px 0;gap:15px}.site-brand{font-size:16px;gap:6px}.clock-logo{width:21px;height:21px}.primary-nav{width:100%;height:43px;justify-content:space-between;gap:0}.primary-nav a{font-size:15px;padding:0 2px 7px}.sub-nav{height:48px;padding:0 20px;gap:28px;justify-content:safe center;white-space:nowrap;overflow:auto;font-size:13px}.sub-nav a{flex:none}.history-main{margin-inline:12px}.history-toolbar{padding:20px 18px 0;border-radius:6px}.date-picker{font-size:19px;gap:8px}.date-actions{gap:0}.date-actions button{min-width:32px;min-height:40px}.date-actions #historyToday{padding:0 10px;margin-left:3px}.history-filter-row{margin-top:18px}.history-card{padding:20px;grid-template-columns:1fr;gap:12px;border-radius:6px}.history-timeline{display:flex;align-items:baseline;gap:10px}.history-year{font-size:21px}.history-age{margin:0}.history-card h3{font-size:18px}.history-kind{display:none}.history-body{font-size:15px}.history-list{margin-top:12px}.history-card .history-actions button{min-height:44px}}
[hidden]{display:none!important}

/* 统一轻量导航：缩小视觉字号，保留原点击高度。 */
.site-brand{font-size:15px;font-weight:400;letter-spacing:.1px;gap:6px}
.clock-logo{width:20px;height:20px}
.primary-nav a{font-size:14px;font-weight:400}
.primary-nav a.active{font-weight:400}
.primary-nav a.active:after{width:18px;height:2px}
.sub-nav{font-size:12px}
.sub-nav a.active{font-weight:400}
@media(max-width:600px){
 .site-brand{font-size:14px;gap:5px}
 .clock-logo{width:19px;height:19px}
 .primary-nav a{font-size:13px}
 .sub-nav{font-size:12px}
}

/* 桌面三列、手机双列的可阅读卡片墙。 */
.history-main{max-width:1120px}
.history-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:stretch}
.history-card{display:flex;flex-direction:column;padding:0;gap:0;overflow:hidden;cursor:pointer}
.history-timeline{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:4px;min-height:112px;padding:22px 24px;background:#edf4ef}
.history-card[data-kind=person] .history-timeline{background:#f0f2f5}
.history-year{font-size:36px;line-height:1.2;letter-spacing:-1px;color:#344a3b;font-weight:400}
.history-card[data-kind=person] .history-year{color:#536271}
.history-age{font-size:11px;color:#829087;margin:0}
.history-card-content{padding:20px 22px 12px;display:flex;flex-direction:column;flex:1;min-width:0}
.history-card h3{font-size:17px;line-height:1.6}
.history-read{display:block;width:100%;text-align:left;font:inherit;font-weight:500;color:inherit;border:0;padding:0;background:transparent;cursor:pointer}
.history-card .history-body{font-size:14px;line-height:1.85;margin-top:10px;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.history-card .history-aside{font-size:12px;line-height:1.8;margin-top:12px;margin-bottom:16px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.history-card .history-actions{margin-top:auto;gap:20px;padding-top:10px}
.history-kind{font-size:10px;margin-bottom:7px}
.history-detail{width:min(580px,calc(100% - 32px));max-height:85dvh;padding:30px;border:0;border-radius:8px;color:#191919;background:#fff;overflow:auto}
.history-detail::backdrop{background:#0006}
.history-detail-close{display:block;margin:0 0 18px auto;background:transparent;border:0;min-height:36px;color:#777;font-size:13px}
.history-detail-date{font-size:12px;color:#999}
.history-detail h2{font-size:21px;line-height:1.6;font-weight:500;margin:14px 0}
@media(max-width:850px){.history-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}
@media(max-width:600px){
 .history-list{gap:10px;grid-template-columns:repeat(2,minmax(0,1fr))}
 .history-timeline{min-height:100px;padding:18px 14px;gap:4px}
 .history-year{font-size:30px}
 .history-age{font-size:10px}
 .history-card-content{padding:14px 12px 7px}
 .history-card h3{font-size:14px;line-height:1.65}
 .history-card .history-body{font-size:12px;line-height:1.8;-webkit-line-clamp:4;margin-top:8px}
 .history-card .history-aside{font-size:11px;line-height:1.7;padding-left:8px;margin-top:10px}
 .history-card .history-actions{gap:12px;flex-wrap:wrap;padding-top:5px}
 .history-card .history-actions button{font-size:11px;gap:4px;min-height:40px}
 .history-actions svg{width:14px;height:14px}
 .history-detail{margin:auto 0 0;width:100%;max-width:100%;max-height:88dvh;border-radius:12px 12px 0 0;padding:22px}
 .history-detail h2{font-size:19px}
}
/* 桌面固定四列，限制内容宽度；手机保持双列。 */
@media(min-width:1100px){
 .history-main{width:calc(100% - 64px);max-width:1480px;margin-inline:auto}
 .history-list{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
 .history-card-content{padding:18px 18px 10px}
 .history-timeline{padding-inline:18px}
}

/* 手机瀑布流：按从左到右的内容顺序落位，行跨度随卡片实际高度计算。 */
@media(max-width:600px){
 .history-list{grid-auto-rows:1px;row-gap:0;align-items:start}
 .history-card{align-self:start;margin-bottom:10px}
 .history-card .history-body,.history-card .history-aside{display:block;overflow:visible;-webkit-line-clamp:unset}
 .history-card .history-actions{margin-top:12px}
}

/* 无分类筛选，日期工具栏保持紧凑。 */
.history-toolbar{padding-bottom:24px}
@media(max-width:600px){.history-toolbar{padding-bottom:20px}}

/* 年份压缩为轻量卡头，互动采用图标与数字。 */
.history-timeline{min-height:76px;padding:14px 18px;gap:3px}
.history-year{font-size:30px;line-height:1.15}
.history-card .history-actions{border-top:0;padding-top:4px;gap:20px}
.history-card .history-actions button{gap:5px;min-height:36px}
.history-action-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.history-card .history-action-count{border:0;padding:0;opacity:1;font-size:12px;color:inherit}
.history-card .history-actions svg{width:18px;height:18px;stroke-width:1.5}
.history-card .history-actions button[aria-pressed=true]{color:#ed6478}
@media(max-width:600px){
 .history-timeline{min-height:68px;padding:12px 14px;gap:3px}
 .history-year{font-size:25px}
 .history-age{font-size:10px}
 .history-card .history-actions{gap:18px;margin-top:8px}
 .history-card .history-actions button{min-height:40px}
 .history-card .history-action-count{font-size:11px}
}
