/* ============================================================
   五行小宝 · 我的日历
   设计风格：苹果极简 + 东方美学（呼应日柱测试 wxti 子站）
   ============================================================ */

/* 颜色变量（继承 style.css 的命名，未定义则回退） */
:root {
  --cal-bg: #FAFAF7;
  --cal-card: #FFFFFF;
  --cal-line: #ECEDE8;
  --cal-text: #2A2A2A;
  --cal-muted: #888;
  --cal-accent: #1661AB;     /* 与 var(--xuan) 同色 */
  --cal-radius: 14px;
  --cal-shadow: 0 2px 8px rgba(60, 70, 90, 0.06);
}

/* ============ 页头 ============ */
.cal-header {
  text-align: center;
  margin-bottom: 32px;
}
.cal-header-mark {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  background: url('../assets/puwen-logo.png') center/contain no-repeat;
  opacity: 0.85;
}
.cal-h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--cal-text);
  margin-bottom: 6px;
}
.cal-sub {
  color: var(--cal-muted);
  font-size: 13px;
  letter-spacing: 1px;
}

/* ============ 空状态 ============ */
.cal-empty {
  text-align: center;
  padding: 60px 20px;
  background: var(--cal-card);
  border-radius: var(--cal-radius);
  box-shadow: var(--cal-shadow);
}
.cal-empty-icon {
  width: 72px; height: 72px;
  margin: 0 auto 18px;
  background: url('../assets/logo-mark-light.png') center/contain no-repeat;
  opacity: 0.4;
}
.cal-empty h3 { font-size: 20px; margin-bottom: 8px; color: var(--cal-text); }
.cal-empty p  { color: var(--cal-muted); margin-bottom: 22px; }

/* ============ 身份条 ============ */
.cal-id-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: var(--cal-card);
  border-radius: var(--cal-radius);
  margin-bottom: 18px;
  box-shadow: var(--cal-shadow);
  flex-wrap: wrap; gap: 8px;
}
.cal-id-left, .cal-id-right {
  display: flex; align-items: center; gap: 14px;
  font-size: 14px;
}
.cal-id-tag { color: var(--cal-text); }
.cal-id-tag strong { font-size: 16px; }
.cal-id-strength {
  padding: 2px 10px;
  background: rgba(22, 97, 171, 0.08);
  border-radius: 999px;
  font-size: 12px;
  color: var(--cal-accent);
  letter-spacing: 1px;
}
.cal-id-xi, .cal-id-ji { font-size: 13px; }
.cal-id-edit {
  font-size: 12px; color: var(--cal-muted);
  text-decoration: none;
}
.cal-id-edit:hover { color: var(--cal-accent); }

/* ============ 月份导航 ============ */
.cal-month-nav {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px; padding: 0 6px;
}
.cal-nav-btn {
  width: 32px; height: 32px;
  border: none; background: transparent;
  font-size: 22px; color: var(--cal-text);
  cursor: pointer;
  border-radius: 50%;
  transition: background .15s;
}
.cal-nav-btn:hover { background: rgba(0,0,0,0.05); }
.cal-month-title {
  font-size: 18px; font-weight: 700;
  letter-spacing: 2px;
  flex: 1; text-align: center;
}
.cal-today-btn {
  padding: 5px 14px;
  background: rgba(22, 97, 171, 0.08);
  border: 1px solid rgba(22, 97, 171, 0.15);
  color: var(--cal-accent);
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  letter-spacing: 1px;
}
.cal-today-btn:hover { background: rgba(22, 97, 171, 0.14); }

/* ============ 月度摘要 ============ */
.cal-month-summary {
  display: flex; gap: 14px; padding: 10px 16px;
  background: var(--cal-card); border-radius: var(--cal-radius);
  margin-bottom: 14px; box-shadow: var(--cal-shadow);
  font-size: 13px; flex-wrap: wrap;
}
.cal-sum-item { display: inline-flex; align-items: center; gap: 6px; color: var(--cal-muted); }
.cal-sum-item i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.cal-sum-item b  { color: var(--cal-text); font-weight: 700; margin-left: 2px; }

/* ============ 月历网格 ============ */
.cal-grid-wrap {
  background: var(--cal-card);
  border-radius: var(--cal-radius);
  padding: 16px 14px;
  box-shadow: var(--cal-shadow);
  margin-bottom: 24px;
}
.cal-week-row {
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 12px; letter-spacing: 2px;
  color: var(--cal-muted);
  padding: 0 4px 10px;
  border-bottom: 1px solid var(--cal-line);
  margin-bottom: 8px;
}
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.cal-cell {
  position: relative;
  aspect-ratio: 1 / 1.15;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s, transform .15s;
  user-select: none;
}
.cal-cell:hover { background: rgba(22, 97, 171, 0.04); }
.cal-cell.out { color: #ccc; cursor: default; }
.cal-cell.out:hover { background: transparent; }
.cal-d {
  font-size: 16px; font-weight: 600; color: var(--cal-text);
  margin-bottom: 4px;
}
.cal-cell.out .cal-d { color: #ccc; font-weight: 400; }
.cal-dot {
  width: 5px; height: 5px; border-radius: 50%;
  margin-bottom: 2px;
}
.cal-cell.out .cal-dot { display: none; }
.cal-score {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0;
  opacity: 0.85;
}
.cal-cell.out .cal-score { display: none; }

/* 节气角标 */
.cal-jq {
  position: absolute; top: 4px; right: 6px;
  font-size: 10px; color: var(--cal-accent);
  background: rgba(22, 97, 171, 0.10);
  padding: 1px 4px; border-radius: 4px;
  letter-spacing: 0;
}

/* 今天 */
.cal-cell.is-today {
  background: rgba(200, 71, 58, 0.08);
}
.cal-cell.is-today .cal-d { color: #C8473A; font-weight: 800; }

/* 选中 */
.cal-cell.is-selected {
  background: var(--cal-text) !important;
}
.cal-cell.is-selected .cal-d,
.cal-cell.is-selected .cal-score { color: #fff !important; }
.cal-cell.is-selected .cal-jq {
  background: rgba(255,255,255,0.18); color: #fff;
}

/* ============ 详情面板 ============ */
.cal-detail {
  background: var(--cal-card);
  border-radius: var(--cal-radius);
  padding: 28px 24px 22px;
  box-shadow: var(--cal-shadow);
}
.cal-detail-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; gap: 16px;
}
.cal-detail-date { flex: 1; }
.cal-detail-d1 {
  font-size: 13px; color: var(--cal-muted);
  letter-spacing: 1px; margin-bottom: 4px;
}
.cal-detail-d2 {
  font-size: 22px; font-weight: 700;
  color: var(--cal-text); letter-spacing: 1px;
}
.cal-detail-d2 small {
  font-size: 14px; color: var(--cal-muted); font-weight: 400;
  margin-left: 6px;
}
.cal-detail-score {
  text-align: center;
  min-width: 86px;
}
.cal-detail-score-num {
  font-size: 38px; font-weight: 800;
  color: var(--lvl, var(--cal-text));
  line-height: 1;
  letter-spacing: -1px;
}
.cal-detail-score-lvl {
  font-size: 13px; color: var(--lvl, var(--cal-muted));
  letter-spacing: 2px; margin-top: 4px;
  font-weight: 600;
  white-space: nowrap;
}

/* 节气提示行 */
.cal-detail-jq {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: rgba(22, 97, 171, 0.06);
  border-radius: 999px;
  font-size: 13px; color: var(--cal-text);
  margin-bottom: 16px;
}
.cal-detail-jq-tag {
  font-size: 11px; padding: 2px 6px;
  background: var(--cal-accent); color: #fff;
  border-radius: 999px; letter-spacing: 1px;
}
.cal-detail-jq small { color: var(--cal-muted); margin-left: 4px; }

/* 寄语 */
.cal-detail-greeting {
  background: linear-gradient(135deg, rgba(22, 97, 171, 0.04), rgba(200, 155, 64, 0.04));
  border-left: 3px solid var(--cal-accent);
  padding: 16px 18px;
  border-radius: 8px;
  margin-bottom: 22px;
}
.cal-detail-greeting-tag {
  font-size: 12px; color: var(--cal-muted);
  letter-spacing: 3px; margin-bottom: 6px;
  font-weight: 500;
}
.cal-detail-greeting-txt {
  font-size: 15px; line-height: 1.85;
  color: var(--cal-text);
}

/* 宜忌区 */
.cal-detail-yiji {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 18px;
}
.cal-yiji-block {
  background: rgba(0,0,0,0.02);
  border-radius: 10px;
  padding: 16px 18px;
}
.cal-yiji-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 2px;
}
.cal-yiji-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%; font-size: 13px;
  color: #fff; font-weight: 800;
}
.cal-yi  .cal-yiji-icon { background: #789262; }
.cal-yi  .cal-yiji-head { color: #5a7649; }
.cal-ji  .cal-yiji-icon { background: #C8473A; }
.cal-ji  .cal-yiji-head { color: #a73828; }
.cal-yiji-block ul {
  list-style: none; padding: 0; margin: 0;
}
.cal-yiji-block li {
  position: relative;
  padding: 5px 0 5px 14px;
  font-size: 14px; line-height: 1.6;
  color: var(--cal-text);
  border-bottom: 1px dashed transparent;
}
.cal-yiji-block li::before {
  content: '·';
  position: absolute; left: 4px;
  color: var(--cal-muted);
  font-weight: 700;
}
.cal-yiji-block li.muted { color: var(--cal-muted); font-style: italic; }

/* 元信息 */
.cal-detail-meta {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  font-size: 12px; color: var(--cal-muted);
  padding: 10px 0; border-top: 1px solid var(--cal-line);
  margin-top: 12px;
  letter-spacing: 0.5px;
}
.cal-detail-meta b { font-weight: 700; }

/* 操作按钮 */
.cal-detail-actions {
  display: flex; gap: 10px; margin-top: 18px;
  flex-wrap: wrap;
}

/* ============ 响应式 ============ */
@media (max-width: 720px) {
  .cal-id-bar { flex-direction: column; align-items: flex-start; }
  .cal-detail-head { flex-direction: column; align-items: flex-start; }
  .cal-detail-yiji { grid-template-columns: 1fr; }
  .cal-d { font-size: 14px; }
  .cal-score { font-size: 9px; }
  .cal-month-title { font-size: 15px; letter-spacing: 1px; }
}

/* ============ 本周趋势图 ============ */
.cal-week-trend {
  background: var(--cal-card);
  border-radius: var(--cal-radius);
  padding: 18px 20px 14px;
  box-shadow: var(--cal-shadow);
  margin-bottom: 24px;
}
.cal-wt-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 8px;
}
.cal-wt-title {
  font-size: 14px; font-weight: 700;
  color: var(--cal-text); letter-spacing: 2px;
  display: flex; align-items: center; gap: 8px;
}
.cal-wt-title::before {
  content: ''; display: inline-block;
  width: 3px; height: 14px;
  background: var(--cal-accent);
  border-radius: 2px;
}
.cal-wt-range {
  font-size: 12px; color: var(--cal-muted);
  letter-spacing: 1px;
}
.cal-wt-nav {
  display: flex; align-items: center; gap: 4px;
}
.cal-wt-nav button {
  width: 28px; height: 28px;
  border: none; background: transparent;
  font-size: 16px; color: var(--cal-text);
  cursor: pointer; border-radius: 50%;
}
.cal-wt-nav button:hover { background: rgba(0,0,0,0.05); }

/* 柱状图主体 */
.cal-wt-bars {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  height: 140px;
  align-items: end;
  padding: 0 4px;
}
.cal-wt-bar {
  display: flex; flex-direction: column; align-items: center;
  height: 100%;
  cursor: pointer;
  position: relative;
  user-select: none;
}
/* 顶部分数标签 */
.cal-wt-bar-num {
  font-size: 11px; font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: 0;
  transition: transform .15s;
}
/* 柱体外层（占整列高度） */
.cal-wt-bar-track {
  flex: 1;
  width: 100%;
  display: flex; align-items: flex-end;
  position: relative;
  border-radius: 4px;
  background: rgba(0,0,0,0.025);
}
/* 柱体本身 */
.cal-wt-bar-fill {
  width: 100%;
  border-radius: 4px;
  transition: height .25s ease;
  min-height: 4px;
  position: relative;
  overflow: hidden;
}
/* 柱顶白色高光（玻璃感的极简版） */
.cal-wt-bar-fill::after {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 30%;
  background: linear-gradient(180deg, rgba(255,255,255,.18), transparent);
  pointer-events: none;
}
/* 选中态：柱子上方更亮 + 描边 */
.cal-wt-bar.is-selected .cal-wt-bar-fill {
  box-shadow: 0 0 0 2px var(--cal-card), 0 0 0 3px currentColor;
}
.cal-wt-bar.is-selected .cal-wt-bar-num {
  transform: translateY(-2px) scale(1.15);
}
/* 今天：柱子下方加一个点 */
.cal-wt-bar.is-today .cal-wt-bar-foot::before {
  content: ''; position: absolute;
  top: -4px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: #C8473A;
}
/* 底部周名 + 日期 */
.cal-wt-bar-foot {
  font-size: 11px; color: var(--cal-muted);
  text-align: center;
  margin-top: 6px; padding-top: 4px;
  position: relative;
  line-height: 1.4;
}
.cal-wt-bar-foot .day {
  font-size: 12px; font-weight: 600; color: var(--cal-text);
  display: block;
}
.cal-wt-bar.is-selected .cal-wt-bar-foot .day { color: var(--cal-accent); font-weight: 800; }
.cal-wt-bar.is-today .cal-wt-bar-foot .day { color: #C8473A; }
.cal-wt-bar-foot .pillar {
  font-size: 9.5px; color: #aaa; letter-spacing: 0;
}

/* 移动端 */
@media (max-width: 720px) {
  .cal-week-trend { padding: 14px 12px 10px; }
  .cal-wt-bars { height: 120px; gap: 3px; padding: 0; }
  .cal-wt-bar-num { font-size: 10px; }
  .cal-wt-bar-foot .day { font-size: 11px; }
  .cal-wt-bar-foot .pillar { font-size: 9px; }
  .cal-wt-title { font-size: 13px; letter-spacing: 1px; }
  .cal-wt-range { font-size: 11px; }
}

/* ============ 档案切换器（多档案管理） ============ */
.cal-prof-switcher {
  position: relative;
  display: inline-block;
  margin-right: 4px;
}
.cal-prof-trigger {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px 4px 12px;
  background: rgba(34, 34, 34, 0.05);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  color: var(--cal-text);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  max-width: 140px;
}
.cal-prof-trigger:hover {
  background: rgba(34, 34, 34, 0.09);
}
.cal-prof-trigger.is-open {
  background: #222;
  color: #fff;
}
.cal-prof-trigger-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}
.cal-prof-trigger-caret {
  font-size: 11px;
  opacity: 0.7;
  transition: transform 0.2s;
}
.cal-prof-trigger.is-open .cal-prof-trigger-caret {
  transform: rotate(180deg);
}

.cal-prof-drawer {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 50;
  width: 280px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  animation: profDrawerIn 0.18s ease-out;
}
@keyframes profDrawerIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.cal-prof-drawer-head {
  padding: 12px 16px 8px;
  font-size: 12px;
  color: var(--cal-muted);
  letter-spacing: 1px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.cal-prof-drawer-head small {
  font-size: 11px;
  color: #aaa;
  letter-spacing: 0;
}

.cal-prof-drawer-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 4px 0;
}

.cal-prof-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.12s;
  position: relative;
}
.cal-prof-item:hover {
  background: rgba(34, 34, 34, 0.04);
}
.cal-prof-item.is-current {
  background: rgba(22, 97, 171, 0.06);
}

.cal-prof-radio {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1.5px solid #222;
  flex-shrink: 0;
  transition: background 0.12s;
}
.cal-prof-item:not(.is-current) .cal-prof-radio {
  border-color: #ccc;
}

.cal-prof-today-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-prof-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--cal-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-prof-self {
  font-size: 10px;
  padding: 1px 6px;
  background: #222;
  color: #fff;
  border-radius: 999px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.cal-prof-score {
  font-size: 12px;
  color: var(--cal-muted);
  font-variant-numeric: tabular-nums;
  min-width: 22px;
  text-align: right;
}

.cal-prof-del {
  width: 22px; height: 22px;
  border: none;
  background: transparent;
  color: #bbb;
  font-size: 16px;
  cursor: pointer;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.12s, background 0.12s, color 0.12s;
  flex-shrink: 0;
  font-family: inherit;
  line-height: 1;
}
.cal-prof-item:hover .cal-prof-del {
  opacity: 1;
}
.cal-prof-del:hover {
  background: rgba(200, 71, 58, 0.12);
  color: var(--wx-fire, #C8473A);
}

.cal-prof-drawer-foot {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.cal-prof-add {
  display: block;
  padding: 12px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--cal-accent, #1661AB);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.12s;
}
.cal-prof-add:hover {
  background: rgba(22, 97, 171, 0.06);
}

/* 移动端适配 */
@media (max-width: 720px) {
  .cal-prof-drawer {
    width: calc(100vw - 32px);
    max-width: 320px;
    left: 0;
  }
  .cal-prof-trigger {
    max-width: 120px;
  }
  .cal-prof-del {
    opacity: 1;  /* 移动端常显 */
  }
}

/* ============================================================
 * 问日子 v2 · 今日 / 本周 / 本月 三段式
 * 加：日级翻页、宜忌专业解释、月历折叠、进场动画
 * ============================================================ */

/* —— 三段区块 —— */
.cal-section {
  margin: 0 0 32px;
}
.cal-section-today .cal-detail {
  margin-top: 0;
}

/* —— 本月折叠区 —— */
.cal-month-collapse {
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(26,26,46,0.06);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
}
[data-theme="dark"] .cal-month-collapse {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}
.cal-month-collapse-head {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.cal-month-collapse-head::-webkit-details-marker { display: none; }
.cal-month-collapse-icon {
  display: inline-block;
  transition: transform 0.18s;
  color: #C89B40;
  font-size: 14px;
}
.cal-month-collapse[open] .cal-month-collapse-icon {
  transform: rotate(0);
}
.cal-month-collapse:not([open]) .cal-month-collapse-icon {
  transform: rotate(-90deg);
}
.cal-month-collapse-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--cal-text, #1A1A2E);
}
.cal-month-collapse-hint {
  margin-left: auto;
  font-size: 12px;
  color: #9A9285;
  letter-spacing: 0.3px;
}
.cal-month-collapse > *:not(.cal-month-collapse-head) {
  padding: 0 18px 18px;
}
.cal-month-collapse .cal-month-nav { padding-top: 6px; }

/* —— 日级翻页栏（前一天 / 今天标签 / 后一天）—— */
.cal-day-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0 18px;
  border-bottom: 1px dashed rgba(26,26,46,0.08);
  margin-bottom: 18px;
}
[data-theme="dark"] .cal-day-nav { border-bottom-color: rgba(255,255,255,0.08); }
.cal-day-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  padding: 6px 10px;
  font-size: 13px;
  color: #6B6357;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.16s, color 0.16s;
  font-family: inherit;
}
.cal-day-nav-btn:hover {
  background: rgba(200,155,64,0.10);
  color: #C89B40;
}
.cal-day-nav-arrow {
  font-size: 20px;
  line-height: 1;
  color: #C89B40;
}
.cal-day-nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.cal-day-nav-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #1A1A2E;
}
[data-theme="dark"] .cal-day-nav-label { color: #EDE8DC; }
.cal-day-nav-back {
  background: transparent;
  border: 1px solid rgba(200,155,64,0.4);
  color: #C89B40;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.3px;
}
.cal-day-nav-back:hover {
  background: rgba(200,155,64,0.12);
}

/* —— 进场动画（日切换）—— */
.cal-detail-card {
  transition: transform 0.28s cubic-bezier(.2,.7,.3,1), opacity 0.28s ease;
}
.cal-detail-card.is-enter-from-right {
  transform: translateX(28px);
  opacity: 0;
}
.cal-detail-card.is-enter-from-left {
  transform: translateX(-28px);
  opacity: 0;
}

/* —— 当日五行副文案 —— */
.cal-detail-d2-sub {
  font-size: 12px;
  color: #9A9285;
  font-weight: 400;
  margin-left: 8px;
}

/* —— 宜忌项升级：txt + 灰字 why —— */
.cal-yiji-li {
  list-style: none;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(26,26,46,0.06);
}
.cal-yiji-li:last-child { border-bottom: none; }
[data-theme="dark"] .cal-yiji-li { border-bottom-color: rgba(255,255,255,0.06); }
.cal-yiji-txt {
  font-size: 14px;
  line-height: 1.5;
  color: #1A1A2E;
}
[data-theme="dark"] .cal-yiji-txt { color: #EDE8DC; }
.cal-yiji-why {
  font-size: 11.5px;
  color: #9A9285;
  margin-top: 2px;
  line-height: 1.5;
  letter-spacing: 0.2px;
}
.cal-yi .cal-yiji-txt::before { content: ''; }
.cal-ji .cal-yiji-txt { color: #8A7062; }

/* —— 专业解读折叠区 —— */
.cal-detail-explain {
  margin-top: 18px;
  background: linear-gradient(180deg, rgba(200,155,64,0.05), rgba(200,155,64,0.02));
  border: 1px solid rgba(200,155,64,0.18);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
}
[data-theme="dark"] .cal-detail-explain {
  background: linear-gradient(180deg, rgba(200,155,64,0.06), rgba(200,155,64,0.02));
  border-color: rgba(200,155,64,0.22);
}
.cal-detail-explain summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  font-size: 13px;
}
.cal-detail-explain summary::-webkit-details-marker { display: none; }
.cal-explain-icon { font-size: 14px; }
.cal-explain-title {
  font-weight: 600;
  color: #1A1A2E;
}
[data-theme="dark"] .cal-explain-title { color: #EDE8DC; }
.cal-explain-hint {
  margin-left: auto;
  font-size: 11.5px;
  color: #9A9285;
}
.cal-detail-explain[open] .cal-explain-hint::after { content: ' ▴'; }
.cal-detail-explain:not([open]) .cal-explain-hint::after { content: ' ▾'; }
.cal-explain-body {
  padding: 4px 16px 14px;
  font-size: 13px;
  color: #4A4338;
}
[data-theme="dark"] .cal-explain-body { color: #BDB6A8; }
.cal-explain-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.cal-explain-k {
  flex: 0 0 78px;
  font-size: 11.5px;
  color: #9A9285;
  letter-spacing: 0.5px;
}
.cal-explain-v {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cal-explain-divider {
  height: 1px;
  background: rgba(200,155,64,0.18);
  margin: 8px 0;
}
.cal-explain-label {
  font-size: 11.5px;
  color: #9A9285;
  letter-spacing: 0.5px;
  margin-top: 4px;
  margin-bottom: 4px;
}
.cal-explain-reasons {
  margin: 4px 0 8px;
  padding: 0;
  list-style: none;
}
.cal-explain-reasons li {
  font-size: 12.5px;
  line-height: 1.7;
  color: #4A4338;
  padding: 2px 0 2px 14px;
  position: relative;
}
[data-theme="dark"] .cal-explain-reasons li { color: #BDB6A8; }
.cal-explain-reasons li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: #C89B40;
  font-weight: 700;
}
.cal-explain-foot {
  margin-top: 6px;
  font-size: 11px;
  color: #B5AB99;
  font-style: italic;
  letter-spacing: 0.3px;
}

/* —— 五行小药丸（专业解读区里展示喜忌的颜色 chip）—— */
.cal-wx-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 8px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--c);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
/* 兜底（不支持 color-mix 的旧浏览器）*/
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .cal-wx-pill {
    background: rgba(200,155,64,0.10);
    border-color: rgba(200,155,64,0.3);
  }
}

/* —— 移动端适配 —— */
@media (max-width: 720px) {
  .cal-day-nav { padding: 4px 0 14px; margin-bottom: 14px; }
  .cal-day-nav-txt { display: none; }   /* 只留箭头，更节省空间 */
  .cal-day-nav-arrow { font-size: 24px; }
  .cal-explain-k { flex: 0 0 64px; font-size: 11px; }
  .cal-explain-body { font-size: 12.5px; }
  .cal-explain-reasons li { font-size: 12px; }
}
