/* ============================================================
   components.css — 圆角卡片 / 按钮 / 列表 / 输入框 / 今日五大板块
   / 习惯打卡 / 统计 / 月历 / 弹窗 通用组件
   按需求规格书 v1（执行版）第三、四部分重构。
   变量名以规格书为准（--text / --accent-dark / --shadow / --radius 等）。
   ============================================================ */

/* ---------- 卡片（规格书 3.1 / 3.4） ---------- */
.card {
  background: var(--card-bg);
  border: var(--border-width) solid var(--card-border);
  border-radius: 16px;            /* 规格书 3.1：板块容器 16px（回问清单 #3 按 16px 执行） */
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  padding: 16px 18px;
  margin-bottom: 14px;            /* 规格书 3.4 */
  position: relative;
}
.card > * { position: relative; z-index: 1; }

/* 卡片标题（规格书 3.2） */
.card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 10px 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-title svg { width: 14px; height: 14px; stroke: var(--text); }
.todo-title svg { stroke: var(--warm); }
.habit-title svg,
.write-title svg { stroke: var(--accent); }

/* 卡片右上角简笔画（规格书 3.3） */
.card-deco {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 20px;
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}
.card-deco svg { display: block; width: 100%; height: 100%; }

/* ---------- 通用区块标题（review/settings 沿用） ---------- */
.section-title {
  font-size: 13px;
  font-weight: 400;
  color: var(--text2);
  letter-spacing: 1px;
  margin: 0 0 10px 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-title svg { width: 15px; height: 15px; stroke: var(--text2); }

/* ---------- 按钮 ---------- */
.btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  cursor: pointer;
  background: var(--accent-soft);
  color: var(--accent-dark);
  transition: transform 0.12s ease, background 0.2s, opacity 0.2s;
}
.btn:active { transform: scale(0.96); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--ghost { background: transparent; border: 1px solid var(--input-border); color: var(--text2); }
.btn--block { display: block; width: 100%; text-align: center; }
.btn--sm { padding: 6px 12px; font-size: 12.5px; }

/* ---------- 输入框 / 文本域 ---------- */
.field {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  font-weight: 300;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}
.field:focus { border-color: var(--accent); }
textarea.field { resize: none; line-height: 1.6; }
input[type="time"].field { width: auto; flex: 1; }

/* ---------- 今日板块：作息（规格书 4.1） ---------- */
.routine-row { display: flex; gap: 12px; margin-bottom: 4px; }
.routine-col { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.routine-label { display: flex; align-items: center; gap: 6px; }
.routine-label svg { width: 14px; height: 14px; color: #7A7A7A; }
.routine-label .lbl { font-size: 13px; color: #2D2D2D; font-weight: 500; }
.time-input {
  width: 100%;
  background: #E8F5EC;
  border: 1px dashed #B8DBC8;
  border-radius: 10px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  outline: none;
  min-width: 0;
}
.sleep-ic {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sleep-ic svg { width: 14px; height: 14px; stroke: var(--text2); stroke-width: 1.6; fill: none; }
.tip {
  background: #E8F5EC;
  border-radius: 10px;
  color: var(--accent);
  font-size: 11px;
  text-align: center;
  padding: 8px 12px;
  margin-top: 10px;
}

/* ---------- 今日板块：Done List（规格书 4.2） ---------- */
.done-item {
  background: #fff;
  border: var(--border-width) solid var(--card-border);
  border-radius: 10px;
  padding: 9px 11px;
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.done-item.uncompleted { border: var(--border-width) dashed var(--warm); }
.done-item .text { flex: 1; font-size: 14px; color: var(--text); padding-top: 1px; word-break: break-word; }
.done-item .text.done-text { text-decoration: line-through; opacity: 0.6; }
.check-box {
  width: 22px; height: 22px;
  border-radius: 7px;
  border: 1.5px solid var(--card-border);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  margin-top: 1px;
  transition: background 0.2s, border 0.2s;
}
.check-box svg { width: 13px; height: 13px; stroke-width: 2.2; stroke-linecap: round; fill: none; }
.check-box.done { border-color: var(--accent); background: var(--accent-light); }
.check-box.done svg { stroke: var(--accent); }
.check-box.fail { border-color: var(--warm); background: var(--warm-light); }
.check-box.fail svg { stroke: var(--warm); }
.check-box.pending { border-color: var(--card-border); background: #fff; }
.delete-btn {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #F5F0EB;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.delete-btn svg { width: 10px; height: 10px; stroke: var(--text-faint); stroke-width: 2; stroke-linecap: round; fill: none; }
.note-input {
  border: 1px solid #EBE6DD;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 11px;
  color: var(--text2);
  background: #FAF8F3;
  font-family: inherit;
  width: 100%;
  margin-top: 6px;
  outline: none;
}
.note-input:focus { border-color: var(--accent); }
.add-btn {
  color: var(--accent);
  font-size: 12px;
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0 0;
  font-family: inherit;
}
.add-btn svg { width: 14px; height: 14px; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; fill: none; }
/* 行内编辑主输入框（添加交互修正补丁）：融为文字行，无边框 */
.main-input {
  display: block; width: 100%;
  font-family: inherit; font-size: 14px; color: var(--text);
  border: none; background: transparent; padding: 0; outline: none;
}
.main-input::placeholder { color: var(--text-faint); }

/* ---------- 今日板块：明日待办（规格书 4.3，暖色变体） ---------- */
.todo-item {
  background: #fff;
  border: var(--border-width) dashed var(--warm);   /* 待做态默认：虚线暖色 */
  border-radius: 10px;
  padding: 9px 11px;
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.todo-item .text { flex: 1; font-size: 14px; color: var(--text); padding-top: 1px; word-break: break-word; }
.todo-item .td-created { font-size: 11px; color: var(--text-faint); margin-left: 2px; }
/* 待办清单勾选框：唯一形态 = 虚线暖色（单击即完成搬移，无三态循环） */
.todo-item .check-box { border: 1.5px dashed var(--warm); cursor: pointer; }
.todo-add { color: var(--warm); }
.todo-add svg { stroke: var(--warm); }

/* ---------- 今日板块：今日习惯（规格书 4.4） ---------- */
.habit-item {
  border-radius: var(--radius-pill);
  padding: 7px 7px 7px 5px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.habit-item.done { background: #F0F7F2; }
.habit-item.pending { background: #fff; border: var(--border-width) solid var(--card-border); }
.habit-check {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}
.habit-check.done { background: var(--accent); }
.habit-check.done svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; fill: none; }
.habit-check.pending { border: 1.5px solid var(--card-border); background: #fff; }
.habit-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.habit-name { font-size: 13px; color: var(--text); font-weight: 500; }
.habit-sub { font-size: 10px; color: var(--accent); }
.habit-sub.pending { color: var(--text-faint); }
.habit-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.habit-icon.done { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.habit-icon.pending { background: #F5F0EB; }
.habit-icon svg { width: 18px; height: 18px; stroke: var(--text2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; fill: none; }

/* ---------- 今日板块：今日书写（规格书 4.5） ---------- */
.mood-row {
  display: flex;
  gap: 14px;
  padding: 4px 0 12px;
}
.mood-item {
  font-size: 24px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}
.mood-item.selected { background: var(--accent-light); }
.write-box {
  background: #FAF6EC;
  border: 1px solid #E8E0D0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 2;
  color: var(--text);
  background-image: repeating-linear-gradient(transparent, transparent 31px, #D8CFBE 31px, #D8CFBE 32px);
  min-height: 120px;
  width: 100%;
  resize: none;
  font-family: inherit;
  outline: none;
}

/* ---------- 顶部 header（今日页，规格书 2.1-2.8） ---------- */
.date-header {
  padding: 24px 4px 18px;       /* 左右 4px + .page 16px = 20px（规格书 2.1） */
  position: relative;
  overflow: hidden;
}
.dh-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dh-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  font-size: 16px;
  color: #6b7a6b;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  transition: opacity 0.2s;
}
.dh-btn.disabled { opacity: 0.35; cursor: default; }
.dh-center { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; }
.dh-weekday {
  font-size: 10px;
  letter-spacing: 2.5px;
  color: #6b7a6b;
  text-transform: uppercase;
  font-weight: 400;
}
.dh-date {
  font-size: 48px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-weight: 300;
  letter-spacing: -2px;
  color: #4a5a4a;
  line-height: 1;
}
.dh-month { font-size: 10px; letter-spacing: 1px; color: #6b7a6b; }
.dh-today {
  font-size: 10px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(124, 158, 138, 0.3);
  border-radius: 12px;
  padding: 2px 12px;
  margin-top: 6px;
  cursor: pointer;
  font-family: inherit;
}
.dh-divider { border: none; border-top: 1px dashed rgba(107, 122, 107, 0.3); margin: 12px 0 0; }
.quote-area {
  border-top: 1px dashed rgba(107, 122, 107, 0.3);
  padding-top: 12px;
  margin-top: 10px;
  position: relative;
}
.quote-text { font-size: 12px; line-height: 1.8; color: #4a5a4a; }
.quote-author { text-align: right; font-size: 10px; color: #7a8a7a; margin-top: 2px; }
.quote-refresh {
  position: absolute;
  top: 10px;
  right: 0;
  color: #7a8a7a;
  cursor: pointer;
  display: inline-flex;
  transition: color 0.2s, transform 0.3s;
}
.quote-refresh:hover { color: var(--accent-dark); }
.quote-refresh:active { transform: rotate(120deg); }
.quote-refresh svg { width: 14px; height: 14px; }

/* ---------- 列表 / 优先级 / 圆点（review/settings 沿用） ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 11px 4px; border-bottom: 1px solid var(--divider); }
.list-item:last-child { border-bottom: none; }
.prio { font-size: 11px; padding: 2px 9px; border-radius: var(--radius-pill); font-weight: 400; white-space: nowrap; }
.prio--high { background: var(--prio-high); color: #fff; }
.prio--mid { background: var(--prio-mid); color: #fff; }
.prio--low { background: var(--prio-low); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot--high { background: var(--prio-high); }
.dot--mid { background: var(--prio-mid); }
.dot--low { background: var(--prio-low); }

/* ---------- 小工具行 ---------- */
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.muted { color: var(--text2); font-size: 12.5px; }
.spacer { flex: 1; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; color: var(--text-faint); font-size: 13px; padding: 22px 0; }

/* ---------- 统计（review/settings 沿用） ---------- */
.stat-row { display: flex; gap: 12px; }
.stat { flex: 1; text-align: center; background: var(--input-bg); border-radius: var(--radius-sm); padding: 10px 6px; }
.stat .num { font-size: 22px; font-weight: 400; color: var(--accent-dark); }
.stat .lbl { font-size: 11px; color: var(--text2); margin-top: 2px; }

/* ---------- 弹层（review/settings 沿用） ---------- */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(74, 85, 79, 0.32);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 24px;
}
.modal-mask.show { display: flex; }
.modal {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  max-width: 340px;
  box-shadow: var(--shadow);
}
.modal h3 { margin: 0 0 14px; font-weight: 400; font-size: 16px; color: var(--text); }

/* ---------- 月历方格（review 沿用） ---------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head { margin-bottom: 6px; }
.cal-head span { text-align: center; font-size: 11px; color: var(--text-faint); }
.cal-cell {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 2px; position: relative; overflow: hidden;
}
.cal-cell::before { content: ""; position: absolute; inset: 0; background: var(--accent); opacity: calc(var(--r, 0) * 0.22); z-index: 0; }
.cal-cell.full::before { opacity: 0.34; }
.cal-cell.cal-out { opacity: 0.4; }
.cal-cell > * { position: relative; z-index: 1; }
.cal-num { font-size: 11px; color: var(--text); font-weight: 400; }
.cal-dots { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; max-width: 100%; }
.cal-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--input-border); }
.cal-dot.on { background: var(--accent-dark); }

/* ---------- 待办勾选框（review/settings 沿用） ---------- */
.tcheck {
  width: 20px; height: 20px;
  border-radius: 7px;
  border: 1.5px solid var(--input-border);
  background: var(--input-bg);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex: 0 0 auto; color: #fff;
  transition: background 0.15s, border 0.15s;
}
.tcheck.on { background: var(--accent); border-color: var(--accent); }
.tcheck svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 3; fill: none; opacity: 0; }
.tcheck.on svg { opacity: 1; }

/* ---------- 作息小标签 / 皮肤选项 / 习惯图标选择器（review/settings 沿用） ---------- */
.tag-chip {
  font-size: 12px; padding: 5px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--input-border);
  background: var(--input-bg); color: var(--text2);
  cursor: pointer;
  transition: background 0.15s, border 0.15s, color 0.15s; user-select: none;
}
.tag-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }
.theme-opt { transition: border 0.2s, background 0.2s; }
.theme-opt.active { border-color: var(--accent); background: var(--accent-soft); }
.theme-opt.disabled { opacity: 0.6; }
.hb-ic { color: var(--text2); transition: background 0.15s; }
.hb-ic:hover { background: var(--input-bg); }
.hb-ic.active { background: var(--accent-soft); color: var(--accent-dark); }

/* ---------- 轻提示 toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 96px;
  transform: translateX(-50%) translateY(10px);
  background: var(--text); color: #fff;
  font-size: 13px; padding: 9px 18px;
  border-radius: var(--radius-pill);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 200; max-width: 80%; text-align: center;
}
.toast.show { opacity: 0.94; transform: translateX(-50%) translateY(0); }

/* ---------- 底部导航（规格书第四部分：规整线条 SVG，选中仅颜色区分） ---------- */
.nav-bar {
  position: fixed; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: var(--app-max-width);
  display: flex; justify-content: space-around; align-items: center;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  background: #FFFCF7;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 50;
}
.nav-tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10px; color: #B0A89E;
  background: none; border: none; cursor: pointer;
  padding: 4px 14px; font-family: inherit; transition: color 0.2s;
}
.nav-tab svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.6; fill: none; }
.nav-tab.active { color: #7C9E8A; }
/* 选中态仅靠颜色区分：不放大、不加背景块、不加顶部色条 */

/* ---------- 复盘页 header + 分段控件（规格书第二部分） ---------- */
.review-header { padding: 22px 4px 14px; text-align: center; }
.review-date { font-size: 13px; color: #6b7a6b; letter-spacing: 1px; margin-bottom: 12px; }
.seg {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--input-bg);
  border-radius: var(--radius-pill);
  padding: 4px;
}
.seg-btn {
  border: none; background: transparent; color: var(--text2);
  font-size: 14px; padding: 7px 22px; border-radius: var(--radius-pill);
  cursor: pointer; font-family: inherit; transition: background 0.2s, color 0.2s;
}
.seg-btn.active { background: #7C9E8A; color: #fff; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chart-wrap {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 12px; padding: 8px 4px 0; margin-bottom: 6px;
}

/* 习惯打卡矩阵（周：每习惯 7 格，绿=打卡/灰=未打卡） */
.hm { display: flex; flex-direction: column; gap: 10px; }
.hm-row { display: flex; align-items: center; gap: 10px; }
.hm-label { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text); flex: 0 0 92px; min-width: 0; }
.hm-label svg { width: 16px; height: 16px; stroke: var(--text2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; fill: none; flex-shrink: 0; }
.hm-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-cells { display: flex; gap: 5px; flex: 1; }
.hm-cell { flex: 1; aspect-ratio: 1 / 1; max-width: 34px; border-radius: 7px; background: var(--input-bg); border: 1px solid var(--input-border); }
.hm-cell.on { background: var(--accent); border-color: var(--accent); }

/* 习惯打卡手风琴（月：每习惯 30 格，可折叠） */
.acc { display: flex; flex-direction: column; gap: 4px; }
.acc-item { border-radius: 12px; overflow: hidden; }
.acc-row {
  display: flex; align-items: center; gap: 10px; padding: 11px 6px;
  cursor: pointer; background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 12px;
}
.acc.open .acc-row { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.acc-ic { width: 16px; height: 16px; }
.acc-ic svg { width: 16px; height: 16px; stroke: var(--text2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.acc-name { flex: 1; font-size: 13px; color: var(--text); }
.acc-arrow { color: var(--text-faint); display: inline-flex; transition: transform 0.2s; }
.acc.open .acc-arrow { transform: rotate(90deg); }
.acc-panel { background: var(--card-bg); border: 1px solid var(--card-border); border-top: none; border-radius: 0 0 12px 12px; padding: 12px; }
.acc-cells { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.acc-cell { aspect-ratio: 1 / 1; border-radius: 6px; background: var(--input-bg); border: 1px solid var(--input-border); }
.acc-cell.on { background: var(--accent); border-color: var(--accent); }
.acc-stat { margin-top: 10px; font-size: 12px; color: var(--text2); text-align: center; }

.review-summary {
  width: 100%; min-height: 96px; box-sizing: border-box;
  border: 1px solid var(--input-border); border-radius: 12px;
  padding: 12px 14px; font-family: inherit; font-size: 13px; line-height: 1.7;
  color: var(--text); background: var(--card-bg); resize: none; outline: none;
}
.review-summary:focus { border-color: var(--accent); }
.center { text-align: center; }

/* ---------- 设置页：四分组白卡 + 行式列表（规格书第三部分） ---------- */
.set-group {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
  position: relative;
}
.set-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 2px; border-bottom: 1px solid var(--divider); cursor: pointer;
}
.set-row:last-child { border-bottom: none; }
.set-row--danger { cursor: pointer; }
.set-label { font-size: 14px; color: var(--text); }
.set-val { font-size: 13px; color: var(--text2); }
.set-right { display: flex; align-items: center; gap: 6px; color: var(--text-faint); }
.set-chev { font-size: 18px; color: var(--text-faint); line-height: 1; }
.set-danger { color: #C0584F !important; }
.set-plus svg { stroke: var(--accent); }
.theme-swatches { display: flex; gap: 14px; }
.theme-swatch { display: flex; flex-direction: column; align-items: center; gap: 5px; background: none; border: none; cursor: pointer; font-family: inherit; padding: 0; }
.sw-circle { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; box-sizing: border-box; }
.theme-swatch.active .sw-circle { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-light); }
.sw-name { font-size: 10px; color: var(--text2); }
.switch { width: 42px; height: 24px; border-radius: 999px; background: var(--input-border); border: none; position: relative; cursor: pointer; transition: background 0.2s; padding: 0; flex: 0 0 auto; }
.switch.on { background: var(--accent); }
.switch-knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left 0.2s; }
.switch.on .switch-knob { left: 20px; }
.set-back { background: none; border: none; color: var(--accent); font-size: 13px; cursor: pointer; font-family: inherit; }
.row-between { display: flex; align-items: center; justify-content: space-between; }

/* ---------- 隐藏 html2canvas 用的离屏卡片容器 ---------- */
#card-stage { position: fixed; left: -9999px; top: 0; width: 360px; pointer-events: none; }
