/* 首页右栏：农历日历 + 最新动态（日历配色与 nightfall7 一致：青绿色系） */
#sidebar-calendar.sidebar-loading,
#sidebar-dynamics.sidebar-loading {
  color: var(--text-p3);
  font-size: 13px;
  padding: 4px 0;
}

/* 右栏组件无框：去掉外框与主题自带的小底，内容直接悬浮 */
.l_right .widgets {
  gap: 8px;
}
.l_right .widget-wrapper.markdown .widget-body {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 2px 0;
}

/* 日历：很淡的圆角框；最新动态：无框 */
.l_right .widget-wrapper.sidebar-box-calendar {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  padding: 10px 12px 8px;
  margin: 2px 8px 8px;
  box-shadow: none;
}
.l_right .widget-wrapper.sidebar-box-calendar .widget-header {
  padding-left: 0;
  padding-right: 0;
}
.l_right .widget-wrapper.sidebar-box-dynamics {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  margin: 2px 4px 0;
}
@media (prefers-color-scheme: dark) {
  .l_right .widget-wrapper.sidebar-box-calendar {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.16);
  }
}
[data-theme="dark"] .l_right .widget-wrapper.sidebar-box-calendar {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.16);
}

/* ===== 日历 ===== */
.sidebar-calendar-container {
  padding: 4px 4px 0;
}
.cal-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cal-title {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-p2);
  padding: 4px 0 6px;
  border-bottom: 1px solid rgba(57, 197, 187, 0.25);
  margin-bottom: 4px;
  letter-spacing: 1px;
}
.cal-cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}
.cal-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 2px 0;
  font-size: 12px;
  border-radius: 5px;
  color: var(--text-p1);
  font-variant-numeric: tabular-nums;
}
.cal-head {
  color: var(--text-p3);
  font-weight: 600;
  font-size: 11px;
  opacity: 0.7;
  min-height: 18px;
}
.cal-empty {
  visibility: hidden;
}
.cal-day-num {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 500;
}
.cal-day-lunar {
  font-size: 9px;
  line-height: 1.1;
  color: var(--text-p3);
  font-weight: 400;
  margin-top: 1px;
  min-height: 10px;
  text-align: center;
}
/* 周末：表头与日期数字用淡蓝色 */
.cal-weekend-head {
  color: #39C5BB !important;
  opacity: 1;
}
.cal-day.cal-weekend:not(.cal-today) .cal-day-num {
  color: #39C5BB !important;
}
/* 今天：淡蓝圈 */
.cal-day.cal-today {
  background: transparent !important;
  box-shadow: none !important;
  position: relative !important;
}
.cal-day.cal-today .cal-day-num {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  background: #39C5BB !important;
  color: #fff !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(57, 197, 187, 0.45) !important;
}
.cal-day.cal-today .cal-day-lunar {
  color: #39C5BB !important;
  font-weight: 600 !important;
}

/* 今日农历与宜忌 */
.cal-day-info {
  margin-top: 8px;
  padding: 8px 4px 0;
  border-top: 1px dashed var(--bg-a60, rgba(0, 0, 0, 0.10));
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cal-lunar-date {
  text-align: center;
  font-size: 12px;
  color: var(--text-p2);
  font-weight: 500;
  margin-bottom: 2px;
}
.cal-yi,
.cal-ji {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11px;
  line-height: 1.5;
}
.cal-yi-label,
.cal-ji-label {
  flex-shrink: 0;
  font-weight: 700;
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
  line-height: 1.3;
  margin-top: 1px;
}
.cal-yi-label {
  background: #4caf50;
}
.cal-ji-label {
  background: #f44336;
}
.cal-yi-list,
.cal-ji-list {
  color: var(--text-p2);
  flex: 1;
}

/* 法定节假日倒计时 */
.cal-countdown {
  margin-top: 10px;
  padding: 8px 4px 0;
  border-top: 1px dashed var(--bg-a60, rgba(0, 0, 0, 0.10));
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cal-countdown-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-p3);
}
.cal-countdown-ico {
  width: 14px;
  height: 14px;
  opacity: 0.85;
}
.cal-countdown-numbers {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}
.cal-num {
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.cal-num-val {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #39C5BB;
  line-height: 1;
}
.cal-num-unit {
  font-size: 11px;
  color: var(--text-p3);
}
.cal-sep {
  color: var(--text-p3);
  font-size: 14px;
  opacity: 0.6;
}

/* 暗色适配 */
[data-theme="dark"] .cal-title {
  color: var(--text-p2);
  border-bottom-color: rgba(120, 220, 210, 0.25);
}
[data-theme="dark"] .cal-weekend-head,
[data-theme="dark"] .cal-day.cal-weekend:not(.cal-today) .cal-day-num {
  color: #63D8CF !important;
}
[data-theme="dark"] .cal-day-info {
  border-top-color: rgba(255, 255, 255, 0.10);
}
[data-theme="dark"] .cal-yi-list,
[data-theme="dark"] .cal-ji-list,
[data-theme="dark"] .cal-lunar-date {
  color: var(--text-p2);
}
[data-theme="dark"] .cal-countdown {
  border-top-color: rgba(255, 255, 255, 0.10);
}
[data-theme="dark"] .cal-num-val {
  color: #63D8CF;
}

/* ===== 最新动态（时间线样式） ===== */
.sidebar-dynamics-list {
  margin-top: 2px;
}
.sidebar-dynamics-list .timenode .body,
.sidebar-dynamics-list a.body {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 2px 0 !important;
}
.sidebar-dynamics-list .timenode .header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.sidebar-dynamics-list .user-info {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-p1);
  text-decoration: none;
  font-size: 12px;
  min-width: 0;
}
.sidebar-dynamics-list .user-info img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex: none;
}
.sidebar-dynamics-list .user-info span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-dynamics-list .sd-time {
  flex: none;
  font-size: 11px;
  color: var(--text-p3);
}
.sidebar-dynamics-list .timenode .body p {
  margin: 2px 0 0;
  color: var(--text-p1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-empty {
  font-size: 13px;
  color: var(--text-p3);
}

/* 动态页分页控件 */
.dyn-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
.dyn-pagination button {
  background: transparent;
  border: 1px solid rgba(57, 197, 187, 0.4);
  color: var(--text-p2);
  border-radius: 8px;
  padding: 3px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.dyn-pagination button:hover:not(:disabled) {
  background: rgba(57, 197, 187, 0.12);
  border-color: #39C5BB;
}
.dyn-pagination button:disabled {
  opacity: 0.35;
  cursor: default;
}
.dyn-pagination .dyn-page-info {
  font-size: 12px;
  color: var(--text-p3);
}
