/* 中医问诊系统 - 样式 */
:root {
  --primary: #8B4513;
  --primary-dark: #6B3410;
  --primary-light: #A0522D;
  --gold: #B8860B;
  --bg: #FFF8F0;
  --card-bg: #FFFFFF;
  --text: #3C2415;
  --text-light: #6B4C3B;
  --border: #E8D5C4;
  --success: #2E7D32;
  --warning: #E65100;
  --danger: #C62828;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(139, 69, 19, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, 'Microsoft YaHei', 'PingFang SC', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  background-image: 
    radial-gradient(ellipse at 20% 50%, rgba(139,69,19,0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(184,134,11,0.03) 0%, transparent 50%);
}

/* ====== 头部 ====== */
.header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 16px 20px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
}
.header h1 { font-size: 1.1rem; font-weight: 600; }
.header p { font-size: 0.8rem; opacity: 0.85; margin-top: 2px; }
.progress-bar {
  height: 3px;
  background: rgba(255,255,255,0.2);
  margin-top: 10px;
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--gold);
  transition: width 0.5s ease;
  border-radius: 2px;
}

/* ====== 主容器 ====== */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* ====== 欢迎页 ====== */
.welcome { text-align: center; padding: 40px 20px; }
.welcome-icon { font-size: 4rem; margin-bottom: 16px; }
.welcome h2 { font-size: 1.6rem; color: var(--primary); margin-bottom: 12px; }
.welcome-desc { color: var(--text-light); line-height: 1.8; margin-bottom: 24px; }
.disclaimer {
  background: #FFF3E0;
  border-left: 3px solid var(--warning);
  padding: 12px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.8rem;
  color: var(--warning);
  margin-bottom: 24px;
  text-align: left;
  line-height: 1.6;
}

/* ====== 卡片 ====== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.hint {
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.7;
}
.hint small { font-size: 0.75rem; opacity: 0.7; }

/* ====== 示例 ====== */
.examples {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.examples span {
  background: #FFF8F0;
  border: 1px dashed var(--border);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}
.examples span:hover {
  background: #F5E6D3;
  border-color: var(--primary);
}

/* ====== 输入 ====== */
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  background: #FFFAF5;
  transition: border 0.2s;
}
textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* ====== Chip 多选 ====== */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.chip {
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
  user-select: none;
  background: white;
}
.chip:hover { border-color: var(--primary); background: #FFF8F0; }
.chip-active {
  background: var(--primary) !important;
  color: white !important;
  border-color: var(--primary) !important;
}

/* ====== 选项行 ====== */
.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

/* ====== 表单组 ====== */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--primary);
}

/* ====== 体质问卷 ====== */
.cq-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.cq-item { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.cq-text { font-size: 0.9rem; margin-bottom: 10px; color: var(--text); }
.cq-scale { display: flex; gap: 8px; justify-content: center; }
.cq-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  background: white;
}
.cq-btn:hover { border-color: var(--primary); }
.cq-btn-active { background: var(--primary); color: white; border-color: var(--primary); }
.cq-labels {
  display: flex; justify-content: space-between;
  font-size: 0.7rem; color: var(--text-light); margin-top: 4px; padding: 0 8px;
}
.page-nav { text-align: center; color: var(--text-light); font-size: 0.8rem; margin-bottom: 12px; }

/* ====== 面诊 ====== */
.face-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.face-card {
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.face-card:hover { border-color: var(--primary); background: #FFF8F0; }
.face-card-active { border-color: var(--primary); background: #F5E6D3; }
.face-label { font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; }
.face-desc { font-size: 0.75rem; color: var(--text-light); }

/* ====== 按钮 ====== */
.btn-row {
  display: flex; justify-content: space-between;
  gap: 12px; margin-top: 20px;
}
.btn-primary {
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.1s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(139,69,19,0.3); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  padding: 12px 24px;
  background: white;
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.btn-start {
  padding: 16px 48px;
  font-size: 1.1rem;
  border-radius: 12px;
}

/* ====== 结果页 ====== */
.result { display: flex; flex-direction: column; gap: 16px; }
.result-header {
  text-align: center;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: var(--radius);
}
.result-header h2 { font-size: 1.4rem; margin-bottom: 4px; }
.result-header p { font-size: 0.8rem; opacity: 0.85; }

.result-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.result-card h3 {
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.badge {
  padding: 5px 14px;
  background: #F5E6D3;
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}
.badge-primary {
  background: var(--primary);
  color: white;
  font-size: 0.9rem;
  padding: 6px 18px;
}
.desc { color: var(--text-light); font-size: 0.85rem; line-height: 1.6; }

.constitution-card { border-left: 4px solid var(--gold); }
.formula-card { border-left: 4px solid var(--success); }
.food-card { border-left: 4px solid var(--warning); }

.formula-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.recipe {
  background: #FFF3E0;
  padding: 12px;
  border-radius: 8px;
  margin-top: 8px;
  font-size: 0.85rem;
  line-height: 1.6;
}

.acu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acu-card {
  background: #FFFAF5;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
}
.acu-card strong { display: block; margin-bottom: 4px; color: var(--primary); }
.acu-loc { color: var(--text-light); font-size: 0.75rem; margin-bottom: 2px; }
.acu-method { color: var(--gold); font-size: 0.75rem; }

/* ====== 脉诊模块 ====== */
.pulse-guide {
  background: #FFF3E0;
  border-left: 3px solid var(--gold);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 14px;
  line-height: 1.6;
}
.pulse-options {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.pulse-card {
  background: #FFFAF5;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}
.pulse-card:hover { border-color: var(--primary-light); }
.pulse-card-active {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(139,69,19,0.08), rgba(184,134,11,0.08));
  box-shadow: var(--shadow);
}
.pulse-label { font-weight: 700; color: var(--primary); font-size: 0.95rem; }
.pulse-hint { font-size: 0.7rem; color: var(--text-light); margin-top: 4px; line-height: 1.4; }
.pulse-result-card { border-left: 4px solid #6A1B9A; }

/* ====== 历史档案 ====== */
.btn-ghost {
  display: block;
  margin: 14px auto 0;
  padding: 10px 24px;
  background: transparent;
  color: var(--primary);
  border: 1px dashed var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--primary); background: #FFFAF5; }
.btn-history { font-weight: 500; }
.btn-danger { color: var(--danger); border-color: #f0c4c4; }
.btn-danger:hover { border-color: var(--danger); color: var(--danger); }

.history-list { display: flex; flex-direction: column; gap: 12px; margin: 14px 0; }
.history-item {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #FFFAF5;
  transition: box-shadow 0.2s;
}
.history-item:hover { box-shadow: var(--shadow); }
.history-main { flex: 1; padding: 12px 14px; cursor: pointer; }
.history-date { font-size: 0.72rem; color: var(--text-light); margin-bottom: 4px; }
.history-complaint {
  font-size: 0.9rem; color: var(--text); margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.history-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.history-del {
  width: 46px; border: none; border-left: 1px solid var(--border);
  background: #FFF3EF; color: var(--danger); font-size: 1rem; cursor: pointer;
}
.history-del:hover { background: #FBE0DC; }
.empty-history { text-align: center; padding: 40px 20px; color: var(--text-light); }
.empty-icon { font-size: 3rem; margin-bottom: 10px; }

/* ====== 报告导出容器 ====== */
.report-capture { display: flex; flex-direction: column; gap: 16px; }
.btn-row-result { flex-wrap: wrap; }
.btn-row-result .btn-primary,
.btn-row-result .btn-secondary { flex: 1; min-width: 120px; padding: 12px 14px; }

/* ====== 脉搏计时器 ====== */
.pulse-timer {
  background: linear-gradient(135deg, #FFF8F0, #FDF0E6);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
}
.pt-title { font-weight: 700; color: var(--primary); margin-bottom: 12px; font-size: 0.95rem; }
.pt-display { display: flex; justify-content: center; gap: 28px; align-items: baseline; margin-bottom: 14px; }
.pt-remain { font-size: 2.4rem; font-weight: 800; color: var(--primary); line-height: 1; }
.pt-remain small { font-size: 0.9rem; font-weight: 400; margin-left: 2px; }
.pt-taps { font-size: 1rem; color: var(--text-light); }
.pt-taps span { font-size: 1.6rem; font-weight: 800; color: var(--gold); }
.pt-tap-btn {
  width: 130px; height: 130px; border-radius: 50%;
  border: none; cursor: pointer; margin: 0 auto 14px;
  background: radial-gradient(circle at 35% 30%, #ff8a9b, #e53950);
  color: #fff; font-size: 2.4rem; line-height: 1.1;
  box-shadow: 0 6px 18px rgba(229,57,80,0.4);
  transition: transform 0.1s, box-shadow 0.1s; display: block;
}
.pt-tap-btn small { font-size: 0.62rem; display: block; opacity: 0.9; }
.pt-tap-btn.pt-pulse { transform: scale(0.9); box-shadow: 0 2px 8px rgba(229,57,80,0.6); }
.pt-tap-btn.pt-disabled { background: #ccc; box-shadow: none; cursor: not-allowed; }
.pt-controls { display: flex; gap: 10px; justify-content: center; }
.pt-controls button { flex: 0 1 130px; padding: 9px 14px; }
.bpm-result {
  margin-top: 14px; padding: 10px; border-radius: 10px;
  background: #fff; border: 1px dashed var(--gold); font-size: 1rem;
}
.bpm-result strong { font-size: 1.4rem; color: var(--danger); }
.bpm-tag { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 12px; font-size: 0.8rem; }
.bpm-slow { background: #E3F2FD; color: #1565C0; }
.bpm-fast { background: #FFEBEE; color: #C62828; }
.bpm-normal { background: #E8F5E9; color: #2E7D32; }

/* ====== 档案切换 / 多人管理 ====== */
.profile-switch {
  display: inline-flex; align-items: center; gap: 8px;
  background: #FFFAF5; border: 1px solid var(--border); border-radius: 20px;
  padding: 6px 14px; margin: 0 auto 16px; cursor: pointer; transition: all 0.2s;
}
.profile-switch:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.ps-avatar { font-size: 1.2rem; }
.ps-name { font-weight: 700; color: var(--primary); }
.ps-arrow { font-size: 0.75rem; color: var(--text-light); }

.history-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 1rem; color: var(--text); margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.btn-inline { display: inline-block !important; margin: 0 0 0 auto !important; padding: 4px 12px !important; font-size: 0.78rem !important; }

.profile-list { display: flex; flex-direction: column; gap: 12px; margin: 14px 0; }
.profile-card {
  display: flex; align-items: stretch; border: 2px solid var(--border);
  border-radius: 12px; overflow: hidden; background: #FFFAF5; transition: all 0.2s;
}
.profile-card-active { border-color: var(--primary); box-shadow: var(--shadow); }
.pc-main { flex: 1; display: flex; align-items: center; gap: 12px; padding: 14px; cursor: pointer; }
.pc-avatar { font-size: 2rem; }
.pc-name { font-weight: 700; color: var(--primary); font-size: 1.05rem; }
.pc-badge { font-size: 0.68rem; background: var(--primary); color: #fff; padding: 1px 8px; border-radius: 10px; margin-left: 6px; vertical-align: middle; }
.pc-meta { font-size: 0.78rem; color: var(--text-light); margin-top: 3px; }

/* ====== 证候趋势图 ====== */
.trend-hint {
  background: #FFF8F0; border: 1px dashed var(--border); border-radius: 10px;
  padding: 14px; text-align: center; color: var(--text-light); font-size: 0.85rem; margin-bottom: 14px;
}
.trend-box {
  background: #FFFDFA; border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; margin-bottom: 16px;
}
.trend-title { font-weight: 700; color: var(--primary); font-size: 0.9rem; margin-bottom: 8px; }
.trend-svg { width: 100%; height: auto; display: block; }
.trend-axis { font-size: 9px; fill: #a89680; }
.trend-val { font-size: 10px; fill: #8B4513; font-weight: 700; }
.trend-stats { margin-top: 10px; font-size: 0.83rem; color: var(--text); display: flex; flex-direction: column; gap: 4px; }
.trend-good { color: #2E7D32; font-weight: 700; }
.trend-bad { color: #C62828; font-weight: 700; }
.trend-flat { color: var(--text-light); }

/* ====== 语音输入主诉 ====== */
.complaint-box { position: relative; }
.complaint-box textarea { width: 100%; box-sizing: border-box; padding-right: 54px; }
.voice-btn {
  position: absolute; right: 8px; top: 8px;
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: #FFF3E0; color: var(--primary);
  font-size: 1.2rem; cursor: pointer; transition: all 0.2s;
}
.voice-btn:hover { background: var(--gold); color: #fff; }
.voice-btn.voice-active { background: #e53950; color: #fff; animation: voicepulse 1s infinite; }
@keyframes voicepulse { 0%,100% { box-shadow: 0 0 0 0 rgba(229,57,80,0.5); } 50% { box-shadow: 0 0 0 8px rgba(229,57,80,0); } }
.voice-status { min-height: 20px; margin: 6px 0; font-size: 0.82rem; }
.voice-on { color: #e53950; font-weight: 600; }
.voice-done { color: #2E7D32; }
.voice-err { color: #C62828; }

/* ====== 弹窗（证候详情 / 分享卡片）====== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(60,40,20,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 16px; animation: fadein 0.2s;
  overflow-y: auto;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: 16px; max-width: 420px; width: 100%;
  box-shadow: 0 12px 40px rgba(0,0,0,0.3); animation: slideup 0.25s;
  max-height: 92vh; overflow-y: auto;
}
@keyframes slideup { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--primary), #5d2f0d); border-radius: 16px 16px 0 0;
}
.modal-head h3 { color: #fff; margin: 0; font-size: 1.1rem; }
.modal-close { background: rgba(255,255,255,0.2); border: none; color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 1rem; }
.modal-close:hover { background: rgba(255,255,255,0.35); }
.modal-body { padding: 18px; }
.pk-block { margin-bottom: 14px; }
.pk-label { display: inline-block; background: #FFF3E0; color: var(--primary); font-weight: 700; font-size: 0.8rem; padding: 2px 10px; border-radius: 10px; margin-bottom: 5px; }
.pk-block p { margin: 4px 0 0; line-height: 1.7; color: var(--text); font-size: 0.9rem; }
.pk-hl { color: var(--danger) !important; font-weight: 600; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--border); }
.pk-note { font-size: 0.78rem; color: var(--text-light); }

/* ====== 分享卡片海报 ====== */
.share-modal { max-width: 360px; background: transparent; box-shadow: none; }
.share-poster {
  background: linear-gradient(160deg, #fdf6ea 0%, #f7e9d0 100%);
  border-radius: 18px; padding: 22px; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  border: 2px solid #E8C47A;
}
.sp-head { text-align: center; border-bottom: 2px dashed #d9bd8a; padding-bottom: 12px; margin-bottom: 14px; }
.sp-logo { font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.sp-date { font-size: 0.82rem; color: var(--text-light); margin-top: 4px; }
.sp-body { display: flex; flex-direction: column; gap: 10px; }
.sp-row { display: flex; align-items: baseline; gap: 10px; }
.sp-k { flex: 0 0 52px; font-size: 0.82rem; color: var(--text-light); text-align: right; }
.sp-v { flex: 1; font-size: 0.95rem; color: var(--text); font-weight: 500; }
.sp-hl { color: var(--primary); font-weight: 800; font-size: 1.05rem; }
.sp-tip { margin: 14px 0; padding: 10px 12px; background: rgba(139,69,19,0.08); border-radius: 10px; font-size: 0.85rem; color: var(--primary); text-align: center; }
.sp-foot { display: flex; align-items: center; gap: 12px; border-top: 2px dashed #d9bd8a; padding-top: 12px; }
.sp-qr { font-size: 2.4rem; }
.sp-foot-txt { font-size: 0.8rem; color: var(--text); line-height: 1.5; }
.sp-foot-txt small { color: var(--text-light); font-size: 0.68rem; }
.share-actions { background: #fff; border-radius: 14px; padding: 14px; margin-top: 14px; }
.share-hint { font-size: 0.85rem; color: var(--text-light); text-align: center; margin: 0 0 10px; }

.badge-click { cursor: pointer; transition: all 0.15s; }
.badge-click:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }

/* ====== 首页按钮排布 ====== */
.welcome-row { display: flex; gap: 10px; margin-top: 10px; }
.btn-half { flex: 1; }

/* ====== 智能加减 ====== */
.adjust-box { background: #FFF8EE; border: 1px solid #f0dcbb; border-radius: 14px; padding: 14px 16px; margin-top: 14px; }
.adjust-title { font-weight: 700; color: var(--primary-dark); margin-bottom: 10px; font-size: 0.95rem; }
.adjust-item { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-bottom: 1px dashed #ecdcc0; flex-wrap: wrap; }
.adjust-item:last-of-type { border-bottom: none; }
.adjust-tag { flex-shrink: 0; width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 6px; font-size: 0.8rem; font-weight: 700; color: #fff; }
.adjust-add { background: #2e9e5b; }
.adjust-sub { background: #c0562e; }
.adjust-herb { font-weight: 700; color: var(--text); }
.adjust-reason { color: var(--text-light); font-size: 0.85rem; }
.adjust-reason small { color: #b08a52; }
.adjust-note { margin: 10px 0 0; font-size: 0.78rem; color: #b0793a; }

/* ====== 打卡调理 ====== */
.checkin-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.checkin-head .ps-avatar { font-size: 2rem; }
.ci-cst { font-weight: 700; color: var(--text); }
.ci-cst strong { color: var(--primary-dark); }
.ci-goal { color: var(--text-light); font-size: 0.85rem; margin-top: 3px; }
.checkin-progress { display: flex; align-items: center; gap: 18px; background: #FFF8EE; border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.cp-ring { width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cp-inner { width: 64px; height: 64px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; font-weight: 700; color: var(--primary-dark); }
.cp-info { flex: 1; }
.cp-info strong { color: var(--primary-dark); }
.cp-streak { margin-top: 6px; color: var(--text-light); font-size: 0.9rem; }
.cp-streak strong { color: #e8632a; font-size: 1.1rem; }
.task-list { margin-bottom: 18px; }
.task-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fff; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; cursor: pointer; transition: all 0.15s; }
.task-item:hover { border-color: var(--primary); }
.task-done { background: #f3f9f4; border-color: #cfe6d3; }
.task-done .task-text { color: var(--text-light); text-decoration: line-through; }
.task-check { font-size: 1.1rem; }
.task-icon { font-size: 1.2rem; }
.task-text { flex: 1; color: var(--text); }
.cal-title { font-weight: 700; color: var(--primary-dark); margin-bottom: 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 10px; }
.cal-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: #f2eee7; color: var(--text-light); font-size: 0.85rem; }
.cal-full { background: #2e9e5b; color: #fff; }
.cal-part { background: #f3c96b; color: #7a5a10; }
.cal-legend { font-size: 0.8rem; color: var(--text-light); display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.cal-legend .cal-cell { display: inline-flex; width: 16px; height: 16px; aspect-ratio: auto; }
.reminder-box { background: #FFF8EE; border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; }
.rem-row { display: flex; align-items: center; gap: 10px; }
.rem-row input[type="time"] { padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.95rem; }
.rem-hint { margin: 8px 0 0; font-size: 0.78rem; color: var(--text-light); }
.btn-mini { padding: 6px 14px; border: 1px solid var(--primary); background: #fff; color: var(--primary-dark); border-radius: 20px; font-size: 0.85rem; cursor: pointer; transition: all 0.15s; }
.btn-mini:hover { background: #FFFAF5; }
.btn-mini-on { background: var(--primary); color: #fff; }

/* ====== 云端同步 ====== */
.sync-stat { background: #FFF8EE; border-radius: 12px; padding: 12px 14px; font-size: 0.9rem; color: var(--text); margin-bottom: 16px; text-align: center; }
.sync-section { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; }
.sync-h { font-weight: 700; color: var(--primary-dark); margin-bottom: 12px; }
.sync-h small { font-weight: 400; color: var(--text-light); font-size: 0.78rem; }
.file-label { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.cloud-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.cloud-form input { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 0.9rem; }
.cloud-form input:focus { border-color: var(--primary); outline: none; }
.cloud-status { min-height: 20px; font-size: 0.85rem; margin-top: 4px; }
.sync-ok { color: #2e9e5b; }
.sync-err { color: #c0562e; }

/* ====== Toast 提示 ====== */
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px); background: rgba(40,30,20,0.92); color: #fff; padding: 12px 22px; border-radius: 24px; font-size: 0.9rem; opacity: 0; pointer-events: none; transition: all 0.3s; z-index: 9999; max-width: 86%; text-align: center; }
.toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ====== 响应式（手机优化） ====== */
@media (max-width: 600px) {
  .container { padding: 12px 10px 30px; }
  .card { padding: 16px; }
  .header h1 { font-size: 1rem; }
  .face-options { grid-template-columns: 1fr; }
  .acu-grid { grid-template-columns: 1fr; }
  .pulse-options { grid-template-columns: 1fr 1fr; }
  .cq-scale { gap: 4px; }
  .cq-btn { width: 34px; height: 34px; font-size: 0.85rem; }
  .btn-row { flex-wrap: wrap; }
  .btn-row .btn-primary,
  .btn-row .btn-secondary { flex: 1; min-width: 110px; padding: 12px 10px; font-size: 0.85rem; }
  .btn-start { width: 100%; padding: 15px; }
  .badge { font-size: 0.75rem; }
}
@media (max-width: 360px) {
  .pulse-options { grid-template-columns: 1fr 1fr; }
  .cq-btn { width: 30px; height: 30px; }
}

@media print {
  .header, .btn-row, .btn-row-result, .progress-bar { display: none !important; }
  body { background: white; }
  .result-card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .disclaimer { break-inside: avoid; }
  .site-footer { display: none !important; }
}

/* ====== 页脚免责声明 ====== */
.site-footer {
  max-width: 720px;
  margin: 8px auto 0;
  padding: 18px 16px 28px;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text-light);
  border-top: 1px dashed var(--border);
}
