/* 清新薄荷绿 主题 - 移动优先响应式 */
:root {
  --green-50:  #f0faf4;
  --green-100: #d9f2e3;
  --green-200: #b3e5c7;
  --green-400: #5fcf90;
  --green-500: #3cb878;
  --green-600: #2a9a5e;
  --green-700: #1f7a4a;
  --text:      #1f2d27;
  --text-2:    #5a6b63;
  --text-3:    #95a59c;
  --bg:        #f7fbf8;
  --card:      #ffffff;
  --border:    #e6efe9;
  --shadow:    0 4px 20px rgba(60, 184, 120, 0.08);
  --shadow-lg: 0 10px 40px rgba(60, 184, 120, 0.15);
  --radius:    16px;
  --radius-sm: 10px;
  --danger:    #e85d5d;
  --warning:   #f0a040;
  --safe-bottom: env(safe-area-inset-bottom, 0);
  /* 移动端缩放比例 - 默认桌面 1.0，手机更大 */
  --scale: 1;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
  min-height: 100%;
  min-height: 100dvh; /* iOS 15+ dynamic viewport */
  -webkit-text-size-adjust: 100%; /* 禁止 iOS 自动缩放 */
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; font-size: inherit; }

/* 通用 */
.hidden { display: none !important; }
.muted { color: var(--text-3); font-size: 12px; }
.hint { color: var(--text-2); font-size: 13px; margin: 8px 0; }
.full-width { width: 100%; }

/* App 容器 - 充满全屏 */
.app {
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.btn {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
}
.btn.primary {
  background: var(--green-500);
  color: white;
  box-shadow: 0 2px 8px rgba(60, 184, 120, 0.3);
}
.btn.primary:active { background: var(--green-600); transform: scale(0.98); }
.btn.ghost {
  background: var(--green-50);
  color: var(--green-700);
  border: 1px solid var(--green-100);
}
.btn.ghost:active { background: var(--green-100); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.danger { color: var(--danger); }

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 18px;
  transition: background 0.2s;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
/* 扩大点击区到 iOS HIG 推荐的 44pt */
.icon-btn::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
}
.icon-btn:hover, .icon-btn:active { background: var(--green-50); }

/* Toast */
.toast {
  position: fixed;
  bottom: calc(80px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(31, 45, 39, 0.92);
  color: white;
  padding: 10px 20px;
  border-radius: 22px;
  font-size: 14px;
  z-index: 9999;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: toastIn 0.3s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* 认证页 */
.auth-card {
  max-width: 420px;
  margin: 0 auto;
  padding: 40px 24px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.brand { text-align: center; margin-bottom: 40px; }
.brand-icon { font-size: 56px; margin-bottom: 12px; }
.brand h1 { font-size: 28px; font-weight: 600; color: var(--green-700); }
.brand-sub { color: var(--text-2); margin-top: 6px; }

.auth-step h2 { text-align: center; margin-bottom: 8px; }
.auth-step input {
  display: block;
  width: 100%;
  padding: 14px 16px;
  margin-top: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  font-size: 16px;
  transition: border-color 0.2s;
}
.auth-step input:focus { outline: none; border-color: var(--green-400); }
.auth-step .btn { width: 100%; margin-top: 16px; }
.link { text-align: center; color: var(--green-600); margin-top: 16px; font-size: 14px; cursor: pointer; }

.backup-box {
  margin-top: 20px;
  padding: 16px;
  background: #fff8e6;
  border: 1px solid #ffe0a3;
  border-radius: var(--radius-sm);
  text-align: center;
}
.backup-box code {
  display: block;
  margin: 12px 0;
  padding: 12px;
  background: white;
  border-radius: 8px;
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--warning);
  font-weight: 600;
  word-break: break-all;
}
.backup-box .btn { margin-top: 8px; }
.backup-box .btn + .btn { margin-left: 8px; }

/* 顶部栏 */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 64px;
  /* iOS Safari 适配：避开安全区 */
  padding-top: calc(18px + env(safe-area-inset-top, 0));
  padding-left: calc(20px + env(safe-area-inset-left, 0));
  padding-right: calc(20px + env(safe-area-inset-right, 0));
}
@supports (backdrop-filter: blur(1px)) {
  .topbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.92);
  }
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.logo { font-size: 32px; }
.title { font-size: 20px; font-weight: 700; color: var(--green-700); }
.date { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.topbar-right { display: flex; gap: 4px; }

/* 内容区 */
.content {
  max-width: 720px;
  margin: 0 auto;
  padding: 22px 20px;
  padding-bottom: calc(80px + var(--safe-bottom));
  flex: 1;
}
.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.date-chip {
  font-size: 14px;
  color: var(--text-2);
  background: var(--green-50);
  padding: 3px 12px;
  border-radius: 12px;
  font-weight: 500;
}
.today-section, .stats-preview { margin-bottom: 28px; }

/* 任务列表 */
.task-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }

/* 今日进度条 */
.today-progress {
  margin-top: 16px;
  padding: 18px 18px;
  background: linear-gradient(135deg, #f7fbf8 0%, #e8f7ed 100%);
  border-radius: var(--radius);
  border: 1px solid var(--green-100);
  box-shadow: var(--shadow);
}
.today-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.today-progress-label {
  font-size: 15px;
  color: var(--text-2);
  font-weight: 500;
}
.today-progress-num {
  font-size: 24px;
  color: var(--green-700);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.today-progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(95, 207, 144, 0.15);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 12px;
}
.today-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-400) 0%, var(--green-500) 100%);
  border-radius: 5px;
  transition: width 0.4s ease;
}
.today-progress-fill.full {
  background: linear-gradient(90deg, #ffd97a 0%, #f0a040 100%);
}
.today-progress-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}
.today-progress-done { color: var(--green-600); font-weight: 500; }
.today-progress-todo { color: #b8821a; font-weight: 500; }
.today-progress-pct {
  color: var(--green-700);
  font-weight: 700;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.task-item {
  display: flex;
  align-items: center;
  padding: 16px 16px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.2s;
  border-left: 4px solid var(--green-400);
}
.task-item.checked {
  background: var(--green-50);
  border-left-color: var(--green-500);
}
.task-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--green-50);
  border-radius: 14px;
  margin-right: 14px;
  flex-shrink: 0;
}
.task-info { flex: 1; min-width: 0; }
.task-name { font-weight: 600; font-size: 17px; }
.task-repeat { font-size: 13px; color: var(--text-3); margin-top: 3px; }
.task-streak { font-size: 13px; color: var(--green-600); margin-top: 3px; font-weight: 500; }

.check-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2.5px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-left: 8px;
  position: relative;
}
/* 扩大点击区 - 不可见的 padding */
.check-btn::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
}
.check-btn.checked {
  background: var(--green-500);
  border-color: var(--green-500);
}
.check-btn.checked::after {
  content: "✓";
  color: white;
  font-size: 16px;
  font-weight: bold;
}
.task-item .delete-btn {
  margin-left: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}
.task-item:active .delete-btn,
.task-item:hover .delete-btn { opacity: 0.6; }

.empty-state {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-3);
  font-size: 14px;
}

/* 统计卡片 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.stat-card {
  background: var(--card);
  padding: 24px 14px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--green-50);
}
.stat-num {
  font-size: 38px;
  font-weight: 700;
  color: var(--green-600);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 14px; color: var(--text-2); margin-top: 6px; }

/* 弹窗 */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(31, 45, 39, 0.5);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal-card {
  background: white;
  width: 100%;
  max-width: 520px;
  border-radius: 24px 24px 0 0;
  padding-bottom: var(--safe-bottom);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}
.modal-card.large { max-height: 92vh; }
@keyframes slideUp { from { transform: translateY(100%); } }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 17px; font-weight: 600; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.modal-footer .btn { flex: 1; max-width: 140px; }
@media (min-width: 600px) {
  .modal { align-items: center; }
  .modal-card { border-radius: 24px; }
}

.modal-body label {
  display: block;
  font-size: 13px;
  color: var(--text-2);
  margin: 14px 0 6px;
}
.modal-body label:first-child { margin-top: 0; }
.modal-body input[type="text"],
.modal-body input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
}
.modal-body input:focus { outline: none; border-color: var(--green-400); }

/* 图标/颜色选择 */
.icon-picker, .color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.icon-picker button {
  width: 44px;
  height: 44px;
  font-size: 22px;
  background: var(--green-50);
  border-radius: 12px;
  transition: all 0.15s;
}
.icon-picker button.selected {
  background: var(--green-200);
  transform: scale(1.1);
}
.color-picker button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid white;
  outline: 1.5px solid transparent;
  transition: all 0.15s;
}
.color-picker button.selected {
  outline-color: var(--text);
  transform: scale(1.1);
}

/* 重复选项 */
.repeat-tabs {
  display: flex;
  gap: 6px;
  background: var(--green-50);
  padding: 4px;
  border-radius: var(--radius-sm);
}
.tab {
  flex: 1;
  padding: 8px 0;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-2);
  transition: all 0.2s;
}
.tab.active {
  background: white;
  color: var(--green-700);
  font-weight: 500;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.repeat-panel { margin-top: 12px; }
.weekday-picker {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.weekday-picker button {
  aspect-ratio: 1;
  background: var(--green-50);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-2);
}
.weekday-picker button.selected {
  background: var(--green-500);
  color: white;
  font-weight: 600;
}
.monthday-picker {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
}
.monthday-picker button {
  aspect-ratio: 1;
  background: var(--green-50);
  border-radius: 10px;
  font-size: 12px;
  color: var(--text-2);
}
.monthday-picker button.selected {
  background: var(--green-500);
  color: white;
  font-weight: 600;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--green-500); }

/* 统计详情 */
.stats-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.big-stat-row { display: flex; gap: 12px; margin-bottom: 20px; }
.big-stat {
  flex: 1;
  background: var(--green-50);
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
}
.big-num { font-size: 36px; font-weight: 600; color: var(--green-600); }
.big-label { font-size: 13px; color: var(--text-2); margin-top: 4px; }

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 100px;
  margin: 12px 0 20px;
  padding: 0 4px;
}
.bar {
  flex: 1;
  background: var(--green-200);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  position: relative;
  transition: background 0.2s;
}
.bar.today { background: var(--green-500); }
.bar::after {
  content: attr(data-label);
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text-3);
}

.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-header h4 { font-size: 16px; font-weight: 500; }
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 4px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border-radius: 8px;
  position: relative;
  background: white;
  border: 1px solid var(--border);
}
.cal-day.empty { border: none; background: transparent; }
.cal-day.has-checkin {
  background: var(--green-100);
  color: var(--green-700);
  font-weight: 500;
}
.cal-day.today {
  border-color: var(--green-500);
  border-width: 2px;
}
.cal-day.full-checkin {
  background: var(--green-500);
  color: white;
  font-weight: 600;
}

#per-task-list { display: flex; flex-direction: column; gap: 10px; }
.per-task-item {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  background: var(--green-50);
  border-radius: var(--radius-sm);
}
.per-task-item .icon { font-size: 20px; margin-right: 10px; }
.per-task-item .name { flex: 1; font-weight: 500; }
.per-task-item .count { color: var(--green-600); font-weight: 600; }

/* 分享卡 */
.share-card-wrapper {
  background: linear-gradient(135deg, #e8f7ed 0%, #d3f0de 100%);
  padding: 24px;
  border-radius: var(--radius);
  margin: 12px 0;
}
.share-card {
  background: white;
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  font-family: -apple-system, "PingFang SC", sans-serif;
}
.share-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--green-100);
}
.share-brand { font-size: 14px; font-weight: 600; color: var(--green-700); }
.share-date { font-size: 13px; color: var(--text-2); }
.share-main { display: flex; align-items: center; margin-bottom: 20px; }
.share-big { text-align: center; flex: 0 0 auto; padding: 0 16px; }
.share-big-num { font-size: 48px; font-weight: 700; color: var(--green-600); line-height: 1; }
.share-big-label { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.share-divider { width: 1px; height: 50px; background: var(--green-100); margin: 0 16px; }
.share-row { flex: 1; display: flex; gap: 16px; }
.share-stat { text-align: center; flex: 1; }
.share-stat-num { font-size: 24px; font-weight: 600; color: var(--text); }
.share-stat-label { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.share-tasks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.share-progress {
  margin: 0 0 16px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #f7fbf8 0%, #e8f7ed 100%);
  border-radius: 12px;
  border: 1px solid var(--green-100);
}
.share-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.share-progress-label {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
}
.share-progress-num {
  font-size: 14px;
  color: var(--green-700);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.share-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(95, 207, 144, 0.15);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.share-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-400) 0%, var(--green-500) 100%);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.share-progress-fill.full {
  background: linear-gradient(90deg, #ffd97a 0%, #f0a040 100%);
}
.share-progress-detail {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}
.share-progress-done { color: var(--green-600); font-weight: 500; }
.share-progress-todo { color: #b8821a; font-weight: 500; }
.share-task-tag {
  background: var(--green-50);
  color: var(--green-700);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.share-task-tag.done {
  background: var(--green-100);
}
.share-task-tag.todo {
  background: #fff8e6;
  color: #b8821a;
  border: 1px dashed #ffd97a;
  padding-right: 4px;
}
.share-task-tag .cheer {
  background: #ffd97a;
  color: #8a5d00;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 2px;
}
.share-quote-wrap {
  position: relative;
  margin: 14px 0 10px;
}
.share-quote {
  text-align: center;
  color: var(--text-2);
  font-size: 13px;
  font-style: italic;
  padding: 10px 36px 10px 12px;
  background: linear-gradient(135deg, #f7fbf8 0%, #e8f7ed 100%);
  border-radius: 10px;
  position: relative;
  line-height: 1.6;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}
.share-quote.fading { opacity: 0; }
.share-quote::before {
  content: '"';
  position: absolute;
  top: -4px;
  left: 8px;
  font-size: 28px;
  color: var(--green-200);
  font-family: Georgia, serif;
  line-height: 1;
}
.share-quote::after {
  content: '"';
  position: absolute;
  bottom: -10px;
  right: 32px;
  font-size: 28px;
  color: var(--green-200);
  font-family: Georgia, serif;
  line-height: 1;
}
.quote-refresh {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: white;
  font-size: 14px;
  box-shadow: 0 1px 4px rgba(60, 184, 120, 0.15);
  transition: transform 0.3s;
  z-index: 2;
}
.quote-refresh:hover { background: var(--green-50); }
.quote-refresh:active { transform: translateY(-50%) scale(0.9); }
.quote-refresh.spinning { animation: quoteSpin 0.4s ease; }
@keyframes quoteSpin {
  from { transform: translateY(-50%) rotate(0deg); }
  to { transform: translateY(-50%) rotate(360deg); }
}
.share-footer {
  text-align: center;
  color: var(--text-3);
  font-size: 11px;
  margin-top: 8px;
  letter-spacing: 1px;
}

/* 设置 */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.settings-row:last-child { border-bottom: none; }
.settings-row.danger { gap: 8px; justify-content: flex-end; }
.settings-row code { background: var(--green-50); padding: 4px 8px; border-radius: 6px; font-size: 12px; }

/* 开关 */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 24px;
  transition: 0.3s;
}
.slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch input:checked + .slider { background: var(--green-500); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* 平板/电脑适配 */
@media (min-width: 480px) {
  .content { padding: 22px 20px; }
}
@media (min-width: 768px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .content { padding: 28px; }
  .task-item { padding: 16px 20px; }
  .task-name { font-size: 16px; }
  .stat-num { font-size: 32px; }
}
@media (min-width: 1024px) {
  body { background: linear-gradient(135deg, #e8f7ed 0%, #d3f0de 100%); }
  .content { padding: 32px; }
  .task-item .delete-btn { opacity: 0.5; }
  .stat-num { font-size: 36px; }
}

/* 小屏手机优化 (≤ 480px) - 关键交互元素全部放大 */
@media (max-width: 480px) {
  .content { padding: 18px 14px; }
  .topbar { padding: 16px 14px; }

  /* 标题区 */
  .title { font-size: 18px; }
  .date { font-size: 13px; }
  .section-title { font-size: 17px; }

  /* 任务卡 - 关键交互区，大幅放大 */
  .task-list { gap: 12px; }
  .task-item { padding: 18px 16px; }
  .task-name { font-size: 18px; }
  .task-icon {
    width: 52px;
    height: 52px;
    font-size: 26px;
    border-radius: 14px;
    margin-right: 16px;
  }
  .check-btn {
    width: 40px;
    height: 40px;
    border: 2.5px solid var(--border);
  }
  .check-btn.checked::after { font-size: 18px; }

  /* 进度卡 - 加大数字 */
  .today-progress { padding: 20px 18px; margin-top: 18px; }
  .today-progress-label { font-size: 16px; }
  .today-progress-num { font-size: 28px; }
  .today-progress-bar { height: 12px; border-radius: 6px; }
  .today-progress-detail { font-size: 15px; }
  .today-progress-pct { font-size: 18px; }

  /* 统计卡 - 加大数字 */
  .stat-grid { gap: 10px; }
  .stat-card { padding: 22px 8px; }
  .stat-num { font-size: 38px; }
  .stat-label { font-size: 14px; }

  /* 顶栏按钮 - 增大可点击区 */
  .icon-btn { width: 42px; height: 42px; font-size: 20px; }

  /* 弹窗 - 字号和间距都加大 */
  .modal-body { padding: 20px 18px; }
  .modal-body label { font-size: 14px; }
  .modal-body input[type="text"],
  .modal-body input[type="number"] {
    font-size: 17px;
    padding: 14px 16px;
  }
  .modal-header h3 { font-size: 19px; }
  .modal-header { padding: 20px 20px; }
  .modal-footer { padding: 14px 20px; }
  .btn { padding: 14px 20px; font-size: 16px; }
  .hint { font-size: 14px; }
  .empty-state { font-size: 15px; padding: 40px 20px; }

  /* 弹窗里 weekday/monthday 按钮 - 增大点击区 */
  .weekday-picker button, .monthday-picker button { font-size: 14px; }
  .tab { padding: 10px 0; font-size: 14px; }
  .icon-picker button { width: 50px; height: 50px; font-size: 24px; }
  .color-picker button { width: 38px; height: 38px; }

  /* 分享卡 */
  .share-big-num { font-size: 56px; }
  .share-big-label { font-size: 13px; }
  .share-stat-num { font-size: 28px; }
  .share-progress-num { font-size: 18px; }
  .share-task-tag { font-size: 13px; padding: 5px 12px; }
  .share-task-tag .cheer { font-size: 11px; padding: 2px 7px; }
  .share-quote { font-size: 14px; padding: 12px 40px 12px 14px; min-height: 52px; }
  .quote-refresh { width: 34px; height: 34px; font-size: 16px; }

  /* 设置 */
  .settings-row { padding: 16px 0; font-size: 15px; }
  .switch { width: 50px; height: 28px; }
  .switch .slider::before { width: 22px; height: 22px; }
  .switch input:checked + .slider::before { transform: translateX(22px); }
}
