/* ═══════════════════════════════════════════
   青沐书笺 · 每日挑战 · Esther Editorial
   日历 · 进度 · 打卡记录
   ═══════════════════════════════════════════ */

.dc-page {
  padding-bottom: 20px;
}

.dc-main {
  flex: 1;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 20px;
}

/* ─── 标题 ─── */
.dc-header-area {
  text-align: center;
  padding: 24px 0 28px;
}

.dc-title {
  font-family: var(--font-disp);
  font-size: 30px;
  font-weight: 900;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -.02em;
}

.dc-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* ─── 顶部并排区 ─── */
.dc-top-row {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  align-items: flex-start;
}

/* ─── 日历区 ─── */
.dc-calendar-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 14px;
  width: 48%;
  flex-shrink: 0;
  box-shadow: var(--shadow-card);
}

.dc-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dc-calendar-nav {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s var(--ease);
}
.dc-calendar-nav:hover {
  background: var(--accent-tint);
  border-color: var(--accent);
}

.dc-calendar-month {
  font-family: var(--font-disp);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}

.dc-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.dc-calendar-weekday {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding: 4px 0;
  font-weight: 500;
  font-family: var(--font-mono);
}

.dc-calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text);
  position: relative;
  transition: all .2s var(--ease);
}
.dc-calendar-day.other-month {
  color: var(--muted);
  opacity: .35;
}
.dc-calendar-day.today {
  border: 2px solid var(--accent);
  font-weight: 700;
}
.dc-calendar-day.checked {
  background: rgba(34, 197, 94, .1);
}
.dc-calendar-day.checked::after {
  content: '✓';
  font-size: 12px;
  color: #22c55e;
  font-weight: 700;
  margin-top: -2px;
}
.dc-calendar-day .dc-day-num { line-height: 1; }

/* ─── 统计区 ─── */
.dc-stats-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dc-stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  box-shadow: var(--shadow-card);
}

.dc-stat-num {
  font-family: var(--font-disp);
  font-size: 30px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -.02em;
}

.dc-stat-label {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

.dc-stat-hint {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
  padding: 0 8px;
}

/* ─── 进度条 + 礼物箱 ─── */
.dc-progress-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}

.dc-progress-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.dc-progress-label {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}
.dc-progress-label strong {
  color: var(--accent);
  font-size: 18px;
  font-family: var(--font-disp);
  font-weight: 900;
}

.dc-progress-hint {
  font-size: 12px;
  color: var(--muted);
}

.dc-progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dc-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.dc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #22c55e);
  border-radius: 4px;
  transition: width .4s var(--ease);
  width: 0%;
}

.dc-gift-box {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .3s var(--ease);
  flex-shrink: 0;
}
.dc-gift-box.unlocked {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  animation: dc-gift-pulse 1.5s infinite;
}
.dc-gift-box.claimed {
  background: var(--border);
  opacity: .5;
  animation: none;
}
.dc-gift-icon { font-size: 18px; line-height: 1; }
.dc-gift-label {
  font-size: 9px;
  color: #fff;
  font-weight: 600;
  line-height: 1;
}

@keyframes dc-gift-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(251,191,36,.4); }
  50%      { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(251,191,36,0); }
}

/* ─── 打卡记录列表 ─── */
.dc-history-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.dc-section-title {
  font-family: var(--font-disp);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 14px;
  letter-spacing: -.01em;
}

.dc-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dc-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: all .2s var(--ease);
}
.dc-history-item:hover {
  background: var(--accent-tint);
  border-color: var(--accent-soft);
}

.dc-history-left { flex: 1; min-width: 0; }
.dc-history-item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dc-history-item-date {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  font-family: var(--font-mono);
}

.dc-history-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 12px;
}
.dc-history-score {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}
.dc-history-score.no-score {
  color: var(--muted);
  font-weight: 400;
}

/* ─── 空状态 ─── */
.dc-empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
  font-size: 14px;
}
.dc-empty-icon {
  display: block;
  font-size: 34px;
  margin-bottom: 10px;
}

/* ─── Toast ─── */
/* daily-challenge toast 已删除：实际使用 core.js 的全局 toast()，样式在 index.css */
