/* ========== 全局变量 - 黎黎的清新风（默认：鼠尾草绿） ========== */
:root {
  --bg: #F5F7F2;
  --sidebar-bg: #EFF3EB;
  --card-bg: #FAFCF8;
  --c-card-tint: #FAFCF8;
  --text: #5C5E54;
  --text-light: #9CA099;
  --text-lighter: #C4C8BE;
  --border: #DDE3D6;
  --border-light: #E8ECE2;
  --border-cal: #D0D6CA;
  --primary: #9CAF88;
  --primary-light: #EFF3EB;
  --primary-dark: #7A8E6A;
  --accent-lav: #B0A8B4;
  --accent-mint: #A0C4A8;
  --accent-peach: #D4B896;
  --accent-coral: #C4A098;
  --accent-teal: #9CC4BC;
  --accent-apricot: #C4B498;
  --accent-bluegray: #A3B0C4;
  --accent-terra: #C4A88A;
  --accent-mauve: #B8B0B4;
  --shadow: 0 2px 12px rgba(var(--c-shadow-rgb), 0.08);
  --shadow-lg: 0 8px 32px rgba(var(--c-shadow-rgb), 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-w: 230px;
  --panel-w: 380px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  /* 渐变端点变量（主题切换用） */
  --c-bg1: #F5F7F2;
  --c-bg2: #EFF3EB;
  --c-bg3: #E8ECE4;
  --c-header-from: #9CAF88;
  --c-header-to: #7A8E6A;
  --c-btn-to: #B0C09C;
  --c-btn-dark-to: #6A7E5A;
  --c-sidebar-from: #EFF3EB;
  --c-sidebar-to: #E8ECE4;
  --c-card-from: #FAFCF8;
  --c-card-to: #F0F4ED;
  --c-tint-1: #F4F7F2;
  --c-tint-2: #EFF4ED;
  --c-tint-3: #F8FAF6;
  --c-tint-4: #F0F5EC;
  --c-tint-5: #E0E8DC;
  --c-tint-6: #E4E8E0;
  --c-shadow-rgb: 156, 175, 136;
}

/* ========== Reset ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, var(--c-bg1) 0%, var(--c-bg2) 50%, var(--c-bg3) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input {
  font-family: inherit;
}

/* ========== App 布局 ========== */
.app {
  display: flex;
  min-height: 100vh;
  padding-top: env(safe-area-inset-top);
}

/* ========== 侧边栏 ========== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-x: hidden;
}

.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 22px;
  border-bottom: 1px solid var(--border-light);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--accent-lav));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  font-weight: bold;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
}

.sidebar__nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 4px;
  position: relative;
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.nav-item:not(.active):hover {
  background: var(--c-bg2);
}

.nav-item--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.nav-item--disabled:hover {
  background: transparent;
}

.nav-item__icon {
  font-size: 20px;
  width: 22px;
  text-align: center;
}

.nav-item__label {
  flex: 1;
}

.nav-item__badge {
  font-size: 11px;
  padding: 2px 6px;
  background: var(--border);
  border-radius: 4px;
  color: var(--text-light);
}

.sidebar__footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
}

.footer-text {
  font-size: 15px;
  color: var(--text-lighter);
}

/* ========== 主内容区 ========== */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 32px 36px;
  min-width: 0;
}

.main__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.main__title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.main__subtitle {
  font-size: 15px;
  color: var(--text-light);
  margin-top: 4px;
}

/* 月份导航 */
.month-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.month-nav__btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 22px;
  color: var(--text-light);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.month-nav__btn:hover {
  background: var(--border-light);
  color: var(--text);
}

.month-nav__title {
  font-size: 17px;
  font-weight: 600;
  min-width: 110px;
  text-align: center;
}

.month-nav__today {
  margin-left: 8px;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-light);
  transition: all var(--transition);
}

.month-nav__today:hover {
  background: #D8E4DC;
}

/* ========== 统计大按钮 ========== */
.stats-bar {
  margin-bottom: 20px;
}

.stats-summary-btn {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px 28px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.stats-summary-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), #B0A8B4);
  border-radius: 4px 0 0 4px;
}

.stats-summary-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(140, 160, 130, 0.15);
  transform: translateY(-1px);
}

.stats-summary-btn__main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.stats-summary-btn__icon {
  font-size: 30px;
}

.stats-summary-btn__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.stats-summary-btn__sub {
  font-size: 15px;
  color: var(--text-light);
  margin-top: 2px;
}

.stats-summary-btn__items {
  flex: 1;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.stats-summary-btn__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 18px;
  border-left: 1px solid var(--border-light);
  min-width: 80px;
}

.ssbi-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.ssbi-label {
  font-size: 13px;
  color: var(--text-light);
}

.stats-summary-btn__arrow {
  position: absolute;
  bottom: 8px;
  right: 18px;
  font-size: 13px;
  color: var(--primary);
  opacity: 0;
  transition: opacity var(--transition);
}

.stats-summary-btn:hover .stats-summary-btn__arrow {
  opacity: 0.7;
}

/* ========== 月度统计弹窗 ========== */
.modal--large {
  width: 760px;
  max-width: 92vw;
  max-height: 88vh;
}

.stats-dashboard {
  padding-bottom: 8px;
}

/* 统计概览行 */
.stats-overview {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.stats-overview__item {
  flex: 1;
  min-width: 100px;
  background: var(--c-tint-1);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  text-align: center;
}

.stats-overview__value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.stats-overview__label {
  font-size: 15px;
  color: var(--text-light);
  margin-top: 4px;
}

/* 图表容器 */
.chart-section {
  margin-bottom: 28px;
}

.chart-section__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.chart-box {
  position: relative;
  height: 240px;
  width: 100%;
}

/* 活动类型明细表 */
.type-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.type-breakdown__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--c-tint-1);
  border-radius: var(--radius-sm);
}

.type-breakdown__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.type-breakdown__name {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.type-breakdown__days {
  font-size: 15px;
  color: var(--text-light);
  min-width: 70px;
  text-align: right;
}

.type-breakdown__points {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  min-width: 60px;
  text-align: right;
}

.type-breakdown__bar {
  flex: 0 0 100px;
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}

.type-breakdown__bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* ========== 图例 ========== */
.legend {
  display: flex;
  gap: 6px 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 14px 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-name {
  font-size: 15px;
  color: var(--text);
}

.legend-points {
  font-size: 15px;
  color: var(--text-light);
}

/* ========== 日历 ========== */
.calendar {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid #D0D6CA;
}

.calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 2px solid #D0D6CA;
}

.calendar__weekdays > div {
  padding: 12px 0;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-light);
  border-right: 1px solid #D0D6CA;
}

.calendar__weekdays > div:nth-child(7n) {
  border-right: none;
}

.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

/* 日历单元格 */
.cal-day {
  min-height: 92px;
  border-right: 1px solid #D0D6CA;
  border-bottom: 1px solid #D0D6CA;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
}

.cal-day:nth-child(7n) {
  border-right: none;
}

.cal-day:hover {
  background: var(--c-tint-1);
}

.cal-day--other {
  color: var(--text-lighter);
  cursor: default;
}

.cal-day--other:hover {
  background: transparent;
}

.cal-day__number {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.cal-day--other .cal-day__number {
  color: var(--text-lighter);
}

.cal-day--today .cal-day__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

.cal-day__dots {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
  margin-bottom: 2px;
}

.cal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-day__points {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 2px;
}

.cal-day--active {
  background: var(--c-card-to);
}

/* ========== 底部编辑栏 ========== */
.calendar-footer {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.btn-edit-types {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  transition: all var(--transition);
  box-shadow: var(--shadow);
}

.btn-edit-types:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-edit-types__icon {
  font-size: 17px;
}

.btn-edit-types__hint {
  font-size: 15px;
  color: var(--text-light);
  font-weight: 400;
  margin-left: 4px;
}

/* ========== 积分兑换通道 ========== */
.rewards-section {
  margin-top: 32px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.rewards-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(135deg, var(--c-card-from), var(--c-card-to));
}

.rewards-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.rewards-subtitle {
  font-size: 15px;
  color: var(--text-light);
  margin-top: 4px;
}

.rewards-balance {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.rewards-balance--clickable {
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  border: 1px solid transparent;
}

.rewards-balance--clickable:hover {
  border-color: #D4B896;
  background: #F0EDE8;
}

.balance-label {
  font-size: 15px;
  color: var(--text-light);
}

.balance-value {
  font-size: 34px;
  font-weight: 800;
  color: #D4B896;
  line-height: 1;
}

/* 兑换 tabs */
.rewards-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-light);
}

.rewards-tab {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}

.rewards-tab:hover {
  color: var(--text);
}

.rewards-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* 兑换商店 */
.rewards-content {
  padding: 20px 24px;
  min-height: 120px;
}

.rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.reward-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition);
  background: var(--c-card-to);
}

.reward-card:hover {
  border-color: #D4B896;
  box-shadow: 0 2px 12px rgba(196, 184, 150, 0.12);
  transform: translateY(-1px);
}

.reward-card__icon {
  font-size: 34px;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F0EDE8;
  border-radius: var(--radius-sm);
}

.reward-card__body {
  flex: 1;
  min-width: 0;
}

.reward-card__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.reward-card__cost {
  font-size: 15px;
  color: #D4B896;
  font-weight: 700;
}

.reward-card__btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  background: #D4B896;
  color: #fff;
  transition: all var(--transition);
  flex-shrink: 0;
}

.reward-card__btn:hover {
  background: #d35400;
}

.reward-card__btn:disabled {
  background: var(--border);
  color: var(--text-light);
  cursor: not-allowed;
}

/* 兑换记录 */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--c-tint-1);
  border-radius: var(--radius-sm);
}

.history-item__icon {
  font-size: 22px;
  flex-shrink: 0;
}

.history-item__body {
  flex: 1;
  min-width: 0;
}

.history-item__name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.history-item__date {
  font-size: 15px;
  color: var(--text-light);
  margin-top: 2px;
}

.history-item__cost {
  font-size: 16px;
  font-weight: 700;
  color: #D4B896;
}

/* 底部管理按钮 */
.rewards-footer {
  padding: 14px 24px 18px;
  border-top: 1px solid var(--border-light);
}

.btn-reward-manage {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-light);
  transition: color var(--transition);
}

.btn-reward-manage:hover {
  color: var(--primary);
}

/* 图标选择 */
.icon-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.icon-swatch {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  background: var(--c-tint-1);
}

.icon-swatch:hover {
  background: var(--c-bg2);
}

.icon-swatch--selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* ========== 活动记录面板 ========== */
.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(var(--c-shadow-rgb), 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  z-index: 200;
  -webkit-tap-highlight-color: transparent;
}

.panel-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.activity-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--panel-w);
  background: var(--card-bg);
  z-index: 201;
  transform: translateX(100%);
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
  padding-top: env(safe-area-inset-top, 0px);
}

.activity-panel.open {
  transform: translateX(0);
}

.activity-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 24px 16px;
  padding-top: max(24px, env(safe-area-inset-top, 20px));
  border-bottom: 1px solid var(--border-light);
}

.activity-panel__date {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.activity-panel__weekday {
  font-size: 15px;
  color: var(--text-light);
  margin-top: 2px;
}

.activity-panel__close {
  font-size: 28px;
  color: var(--text-light);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  position: relative;
  z-index: 210;
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  flex-shrink: 0;
  margin-top: -4px;
}

.activity-panel__close:hover {
  background: var(--border-light);
  color: var(--text);
}

.activity-panel__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--c-tint-3), var(--c-bg3));
  margin: 0 0 0 0;
  border-bottom: 1px solid var(--border-light);
}

.total-label {
  font-size: 15px;
  color: var(--text-light);
  font-weight: 500;
}

.total-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--primary);
}

.activity-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--c-tint-1);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.activity-item:hover {
  background: var(--c-bg2);
}

.activity-item__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.activity-item__name {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.activity-item__points {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.activity-item__delete {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--text-lighter);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  opacity: 0;
}

.activity-item:hover .activity-item__delete {
  opacity: 1;
}

.activity-item__delete:hover {
  background: #E0E5DC;
  color: #e74c3c;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-lighter);
  font-size: 16px;
}

.activity-panel__footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
  background: var(--card-bg);
}

/* ========== 日记区（面板内） ========== */
.diary-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.diary-section__header {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.diary-textarea {
  width: 100%;
  min-height: 80px;
  max-height: 200px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--c-tint-3);
  resize: vertical;
  font-family: inherit;
  transition: border-color var(--transition), background var(--transition);
}

.diary-textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card-bg);
}

.diary-textarea::placeholder {
  color: var(--text-lighter);
  font-size: 15px;
}

.diary-section__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 15px;
  color: var(--text-lighter);
}

/* ========== 每日感悟列表（日历下方） ========== */
.diary-list-section {
  margin-top: 32px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.diary-list-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(135deg, var(--c-card-from), var(--c-card-to));
}

.diary-list-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}

.diary-list-subtitle {
  font-size: 15px;
  color: var(--text-light);
  margin: 0;
}

.diary-list {
  padding: 16px 20px;
  max-height: 600px;
  overflow-y: auto;
}

.diary-card {
  padding: 16px 18px;
  margin-bottom: 12px;
  background: var(--c-tint-3);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
  cursor: pointer;
  transition: all var(--transition);
}

.diary-card:hover {
  background: var(--c-card-to);
  transform: translateX(2px);
}

.diary-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.diary-card__date {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
}

.diary-card__weekday {
  font-size: 15px;
  color: var(--text-lighter);
  padding: 2px 8px;
  background: var(--border-light);
  border-radius: 10px;
}

.diary-card__text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.diary-card--empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-lighter);
  font-size: 16px;
}

.cal-day__diary {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 13px;
  line-height: 1;
}

/* ========== 按钮 ========== */
.btn {
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-size: 17px;
  font-weight: 500;
  transition: all var(--transition);
  border: none;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--primary-dark);
}

.btn--secondary {
  background: var(--border-light);
  color: var(--text);
}

.btn--secondary:hover {
  background: #E8E4E8;
}

.btn--block {
  width: 100%;
}

/* ========== 活动类型选择器 ========== */
.type-picker {
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.type-picker__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--c-tint-1);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.type-picker__manage {
  font-size: 15px;
  color: var(--primary);
  font-weight: 500;
}

.type-picker__manage:hover {
  text-decoration: underline;
}

.type-picker__list {
  max-height: 280px;
  overflow-y: auto;
}

.type-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border-light);
}

.type-picker-item:last-child {
  border-bottom: none;
}

.type-picker-item:hover {
  background: var(--primary-light);
}

.type-picker-item__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.type-picker-item__name {
  flex: 1;
  font-size: 16px;
  color: var(--text);
}

.type-picker-item__points {
  font-size: 15px;
  color: var(--text-light);
  font-weight: 600;
}

/* ========== 活动类型管理弹窗 ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(var(--c-shadow-rgb), 0.30);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  width: 480px;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform var(--transition);
}

.modal-overlay.open .modal {
  transform: scale(1);
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 26px;
  border-bottom: 1px solid var(--border-light);
}

.modal__header h2 {
  font-size: 22px;
  font-weight: 700;
}

.modal__close {
  font-size: 26px;
  color: var(--text-light);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal__close:hover {
  background: var(--border-light);
  color: var(--text);
}

.modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 26px;
}

/* 活动类型列表 */
.type-list {
  margin-bottom: 24px;
}

.type-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--c-tint-1);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: all var(--transition);
}

.type-list-item:hover {
  background: var(--c-bg2);
}

.type-list-item__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.type-list-item__name {
  flex: 1;
  font-size: 17px;
  font-weight: 500;
}

.type-list-item__points {
  font-size: 16px;
  color: var(--text-light);
  font-weight: 600;
  margin-right: 8px;
}

.type-list-item__actions {
  display: flex;
  gap: 4px;
}

.btn-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all var(--transition);
}

.btn-icon--edit {
  color: var(--primary);
}

.btn-icon--edit:hover {
  background: var(--primary-light);
}

.btn-icon--delete {
  color: var(--text-light);
}

.btn-icon--delete:hover {
  background: #E0E5DC;
  color: #e74c3c;
}

/* 活动类型表单 */
.type-form {
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
}

.type-form h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  color: var(--text);
  outline: none;
  transition: border var(--transition);
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(140, 160, 130, 0.1);
}

.color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  border: 2px solid transparent;
}

.color-swatch:hover {
  transform: scale(1.1);
}

.color-swatch--selected {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--text);
}

.color-swatch--selected::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 16px;
  font-weight: bold;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ========== Toast 提示 ========== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(92, 94, 84, 0.92);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 500;
  z-index: 400;
  opacity: 0;
  transition: all var(--transition);
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========== 滚动条 ========== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #C4C8BE;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #B8B0B4;
}

/* ========== 响应式 ========== */
/* ========== 移动端菜单按钮 & 遮罩（桌面端隐藏） ========== */
.menu-toggle {
  display: none;
}
.sidebar-backdrop {
  display: none;
}

@media (max-width: 768px) {
  /* 菜单按钮 */
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: calc(14px + env(safe-area-inset-top));
    left: 14px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
    cursor: pointer;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
  }
  .menu-toggle:active {
    transform: scale(0.92);
  }

  /* 遮罩 */
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .sidebar-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  /* 侧边栏改为抽屉式 */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15);
  }
  .sidebar.open {
    transform: translateX(0);
  }

  /* 主内容区不需要左边距 */
  .main {
    margin-left: 0;
    padding: 64px 16px 20px;
  }

  .cal-day {
    min-height: 60px;
    padding: 4px 5px;
  }

  .cal-day__dots {
    gap: 2px;
  }

  .cal-dot {
    width: 7px;
    height: 7px;
  }

  .activity-panel {
    width: 100%;
  }
}

/* ========== 模块切换 ========== */
.module-content {
  display: none;
}
.module-content--active {
  display: block;
}

/* ========== 理财管理 - 日历 ========== */
.fin-cal-day--worked {
  background: #A0C4A8 !important;
}
.fin-cal-day--worked .cal-day__number {
  color: #fff;
  font-weight: 700;
}
.fin-cal-day--worked .cal-day__income {
  font-size: 13px;
  color: rgba(255,255,255,0.9);
  margin-top: auto;
  font-weight: 600;
}
.fin-cal-day--worked:hover {
  background: #90B89A !important;
}
.fin-cal-day--today.fin-cal-day--worked .cal-day__number {
  background: rgba(255,255,255,0.25);
}

/* ========== 理财管理 - 底部提示栏 ========== */
.fin-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: var(--text);
}
.fin-hint__color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-block;
}

/* ========== 理财管理 - 统计栏 ========== */
.fin-stats-bar {
  margin-bottom: 20px;
}
.fin-stats-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--c-tint-1) 0%, var(--c-tint-2) 100%);
  border: 1px solid #D0D6CA;
  border-left: 4px solid #A0C4A8;
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}
.fin-stats-btn:hover {
  box-shadow: 0 4px 16px rgba(160,196,168,0.15);
  transform: translateY(-1px);
}
.fin-stats-btn__main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.fin-stats-btn__icon {
  font-size: 24px;
}
.fin-stats-btn__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.fin-stats-btn__sub {
  font-size: 15px;
  color: var(--text-light);
}
.fin-stats-btn__items {
  display: flex;
  gap: 24px;
  flex: 1;
  justify-content: flex-end;
}
.fin-stats-btn__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border-left: 1px solid var(--border-light);
  padding: 0 18px;
}
.fin-stats-btn__item .fsbi-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.fin-stats-btn__item .fsbi-label {
  font-size: 15px;
  color: var(--text-light);
}
.fin-stats-btn__arrow {
  font-size: 15px;
  color: #A0C4A8;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ========== 理财管理 - 区块 ========== */
.fin-section {
  margin-top: 24px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.fin-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e8eaed;
}
.fin-section__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

/* ========== 支出列表 ========== */
.expense-list {
  padding: 8px 0;
}
.expense-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  transition: background var(--transition);
}
.expense-item:hover {
  background: var(--c-tint-1);
}
.expense-item__checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid #C4C8BE;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
  background: var(--card-bg);
}
.expense-item__checkbox:hover {
  border-color: #A0C4A8;
}
.expense-item--paid .expense-item__checkbox {
  background: #A0C4A8;
  border-color: #A0C4A8;
}
.expense-item--paid .expense-item__checkbox::after {
  content: '✓';
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}
.expense-item__color {
  width: 4px;
  height: 24px;
  border-radius: 2px;
  flex-shrink: 0;
}
.expense-item__name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
}
.expense-item--paid .expense-item__name {
  text-decoration: line-through;
  color: var(--text-light);
}
.expense-item__amount {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.expense-item--paid .expense-item__amount {
  color: #A0C4A8;
}
.expense-item__status {
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}
.expense-item--paid .expense-item__status {
  background: #E4EEE0;
  color: #A0C4A8;
}
.expense-item--unpaid .expense-item__status {
  background: #EFF0ED;
  color: #C4A098;
}

/* ========== 支出汇总 ========== */
.expense-summary {
  padding: 14px 20px;
  border-top: 1px solid #e8eaed;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.expense-summary__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
}
.expense-summary__label {
  color: var(--text-light);
}
.expense-summary__value {
  font-weight: 700;
  color: var(--text);
}

/* ========== 预算列表 ========== */
.budget-list {
  padding: 8px 0;
}
.budget-item {
  padding: 14px 20px;
  border-bottom: 1px solid var(--c-bg2);
}
.budget-item:last-child {
  border-bottom: none;
}
.budget-item__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.budget-item__color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
.budget-item__name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
}
.budget-item__amount {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.budget-item__bar {
  height: 8px;
  background: var(--c-bg2);
  border-radius: 4px;
  overflow: hidden;
}
.budget-item__bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
  min-width: 2px;
}

/* ========== 预算汇总 ========== */
.budget-summary {
  padding: 14px 20px;
  border-top: 1px solid #e8eaed;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.budget-summary__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
}
.budget-summary__label {
  color: var(--text-light);
}
.budget-summary__value {
  font-weight: 700;
  color: var(--text);
}

/* ========== 日常消费记录 ========== */
.fin-expense-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-import {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: var(--c-bg3);
  border: 1px solid #C4C0D0;
  border-radius: var(--radius);
  color: #7A7088;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-import:hover {
  background: #E4E8E0;
  border-color: var(--primary);
}

/* 手动记账表单 */
.fin-expense-form {
  background: var(--c-tint-1);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.fin-expense-form__row {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.form-group--inline {
  flex: 1;
  min-width: 180px;
  margin-bottom: 0;
}
.form-group--inline label {
  font-size: 15px;
  color: var(--text-light);
  display: block;
  margin-bottom: 4px;
}
.form-group--inline input,
.form-group--inline select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 16px;
  background: var(--card-bg);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}
.form-group--inline input:focus,
.form-group--inline select:focus {
  border-color: var(--primary);
}
.fin-expense-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

/* 导入结果提示 */
.import-result {
  background: #E8EDE4;
  border: 1px solid #C4D8C8;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 15px;
  color: #7A9B7E;
  line-height: 1.6;
}
.import-result--error {
  background: #EEE8E0;
  border-color: #D4C8C0;
  color: #B09890;
}

/* 消费记录列表 */
.daily-expense-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.daily-expense-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card-bg);
  border-radius: 8px;
  transition: background var(--transition);
}
.daily-expense-item:hover {
  background: var(--c-tint-1);
}
.daily-expense-item__tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.daily-expense-item__source {
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 3px;
  background: #E8E4E8;
  color: #999;
  white-space: nowrap;
}
.daily-expense-item__source--imported {
  background: #EEF0EC;
  color: #7A8090;
}
.daily-expense-item__date {
  font-size: 15px;
  color: var(--text-light);
  white-space: nowrap;
  min-width: 72px;
}
.daily-expense-item__note {
  flex: 1;
  font-size: 15px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.daily-expense-item__amount {
  font-size: 16px;
  font-weight: 700;
  color: #C4A098;
  white-space: nowrap;
}
.daily-expense-item__amount--income {
  color: #9CC4BC;
}
.daily-expense-item--income {
  background: #EFF4ED;
  border-left: 3px solid #9CC4BC;
}
.daily-expense-item__source {
  font-size: 15px;
  color: var(--text);
  margin-left: 8px;
}
.daily-expense-item__delete {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: #C4C8BE;
  font-size: 17px;
  cursor: pointer;
  border-radius: 4px;
  transition: all var(--transition);
}
.daily-expense-item__delete:hover {
  background: #DEE5E0;
  color: #C4A098;
}

/* 消费汇总 */
.daily-expense-summary {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--c-tint-1);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  flex-wrap: wrap;
}
.daily-expense-summary__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
}
.daily-expense-summary__label {
  color: var(--text-light);
}
.daily-expense-summary__value {
  font-weight: 700;
  color: var(--text);
}

/* 按分类统计的迷你进度条 */
.expense-category-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  margin-top: 8px;
}
.expense-category-bar__name {
  min-width: 60px;
  color: var(--text-light);
}
.expense-category-bar__track {
  flex: 1;
  height: 6px;
  background: #EEF0EC;
  border-radius: 3px;
  overflow: hidden;
}
.expense-category-bar__fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}
.expense-category-bar__amount {
  font-weight: 600;
  color: var(--text);
  min-width: 60px;
  text-align: right;
}

/* ========== 睡个饱觉模块 ========== */

/* 睡眠统计栏 */
.sleep-stats-bar {
  margin-bottom: 20px;
}

.sleep-stats-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px 24px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.sleep-stats-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), #B0A8B4);
}

.sleep-stats-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(140, 160, 130, 0.15);
  transform: translateY(-1px);
}

.sleep-stats-btn__main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.sleep-stats-btn__icon {
  font-size: 30px;
}

.sleep-stats-btn__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.sleep-stats-btn__sub {
  font-size: 15px;
  color: var(--text-light);
  margin-top: 2px;
}

.sleep-stats-btn__items {
  display: flex;
  gap: 28px;
  margin-left: auto;
  flex-wrap: wrap;
}

.sleep-stats-btn__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 70px;
  border-left: 1px solid var(--border-light);
  padding: 0 18px;
}

.fsbi-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.fsbi-label {
  font-size: 15px;
  color: var(--text-light);
}

/* 图���统计栏 - 2×2 网格布局 */
.book-stats-bar .sleep-stats-btn__items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
  margin-left: 0;
}

.book-stats-bar .sleep-stats-btn__item {
  min-width: 0;
  text-align: left;
  align-items: flex-start;
}

.sleep-stats-btn__arrow {
  font-size: 15px;
  color: var(--primary);
  opacity: 0.6;
  flex-shrink: 0;
}

/* 睡眠图例 */
.sleep-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.sleep-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: var(--text-light);
}

.sleep-legend__dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

/* 睡眠日历格子 */
.sleep-cal-day {
  min-height: 92px;
  border: 1px solid #D0D6CA;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
}

.sleep-cal-day--other {
  opacity: 0.35;
  background: var(--c-tint-1);
}

.sleep-cal-day--today {
  background: var(--c-card-to);
}

.sleep-cal-day__num {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.sleep-cal-day--today .sleep-cal-day__num {
  color: var(--primary);
}

.sleep-cal-day__duration {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.sleep-cal-day__sessions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.sleep-cal-day__session-tag {
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 3px;
  color: #fff;
  white-space: nowrap;
}

.sleep-cal-day__onset {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}

/* 睡眠格子背景色 */
.sleep-bg--great { background: #DCE9DA; }
.sleep-bg--good  { background: #E4EEE0; }
.sleep-bg--low   { background: #F0EDE0; }
.sleep-bg--poor  { background: #DEE5E0; }

/* 睡眠记录面板 */
.sleep-session-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sleep-session-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--c-tint-1);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
  transition: all var(--transition);
}

.sleep-session-item:hover {
  background: var(--c-bg2);
}

.sleep-session-item__time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.sleep-session-item__arrow {
  color: var(--text-light);
  font-size: 15px;
}

.sleep-session-item__duration {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-left: auto;
}

.sleep-session-item__badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #E8E4E8;
  color: var(--text-light);
}

.sleep-session-item__delete {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  border-radius: 4px;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.sleep-session-item__delete:hover {
  background: #E0E5DC;
  color: #C4A098;
}

.sleep-session-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
  font-size: 16px;
}

/* 睡眠添加表单 */
.sleep-add-form__row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.sleep-add-form .form-group--inline {
  flex: 1;
}

.sleep-add-form input[type="time"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
}

/* 统计弹窗内睡眠专用 */
.sleep-stats-overview {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.sleep-chart-section {
  margin-bottom: 24px;
}

.sleep-chart-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.sleep-chart-canvas {
  height: 240px;
  position: relative;
}

.sleep-detail-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sleep-detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--c-tint-1);
  border-radius: 6px;
  font-size: 15px;
}

.sleep-detail-item__date {
  width: 80px;
  font-weight: 600;
  color: var(--text);
}

.sleep-detail-item__sessions {
  flex: 1;
  color: var(--text-light);
  font-size: 15px;
}

.sleep-detail-item__total {
  font-weight: 700;
  color: var(--primary);
  min-width: 60px;
  text-align: right;
}

.sleep-detail-item__onset {
  font-size: 13px;
  color: var(--text-light);
  min-width: 50px;
  text-align: right;
}

/* ========== 图书日志模块 ========== */

/* 统计栏 */
.book-stats-bar {
  margin-bottom: 20px;
}

/* 最近在读区 */
.book-reading-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.book-reading-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  background: linear-gradient(135deg, var(--c-card-from) 0%, var(--c-card-to) 100%);
}

.book-reading-card__cover {
  width: 64px;
  height: 88px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.book-reading-card__info {
  flex: 1;
  min-width: 0;
}

.book-reading-card__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.book-reading-card__author {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.book-reading-card__meta {
  display: flex;
  gap: 16px;
  font-size: 15px;
  color: var(--text-light);
}

.book-reading-card__meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.book-reading-card__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.book-reading-card__btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}

.book-reading-card__btn--finish {
  background: #A0C4A8;
  color: #fff;
}
.book-reading-card__btn--finish:hover {
  background: #8AB498;
}

.book-reading-card__btn--change {
  background: var(--border-light);
  color: var(--text-light);
}
.book-reading-card__btn--change:hover {
  background: #DDE3D6;
  color: var(--text);
}

.book-reading-empty {
  padding: 40px 28px;
  text-align: center;
  color: var(--text-light);
  font-size: 16px;
}

/* 分类标签 */
.book-category-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.book-category-tab {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-light);
  background: var(--c-tint-1);
  cursor: pointer;
  transition: all var(--transition);
}

.book-category-tab:hover {
  background: var(--c-bg2);
  color: var(--text);
}

.book-category-tab.active {
  background: var(--primary);
  color: #fff;
}

/* 书架网格 */
.book-grid {
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.book-card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: var(--c-tint-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.book-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(var(--c-shadow-rgb), 0.1);
  transform: translateY(-2px);
}

.book-card__header {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.book-card__cover {
  width: 40px;
  height: 56px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}

.book-card__info {
  flex: 1;
  min-width: 0;
}

.book-card__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-card__author {
  font-size: 15px;
  color: var(--text-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.book-card__status {
  font-size: 13px;
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.book-card__status--want {
  background: var(--c-bg3);
  color: #9CA099;
}

.book-card__status--reading {
  background: #E4EEE0;
  color: #8AB498;
}

.book-card__status--read {
  background: #EDE8E0;
  color: #B09890;
}

.book-card__category {
  font-size: 13px;
  color: var(--text-light);
}

.book-card__check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border: 2px solid #C4C8BE;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--card-bg);
}

.book-card__check:hover {
  border-color: #A0C4A8;
}

.book-card--read .book-card__check {
  background: #A0C4A8;
  border-color: #A0C4A8;
}

.book-card--read .book-card__check::after {
  content: '✓';
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

/* 分类选择器 */
.book-category-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.book-category-swatch {
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 6px;
}

.book-category-swatch__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.book-category-swatch--selected {
  border-color: var(--text);
}

/* 图书详情弹窗内容 */
.book-detail {
  padding-bottom: 8px;
}

.book-detail__header {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.book-detail__cover {
  width: 72px;
  height: 100px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.book-detail__info {
  flex: 1;
}

.book-detail__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.book-detail__author {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.book-detail__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.book-detail__tag {
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 600;
}

.book-detail__section {
  margin-bottom: 24px;
}

.book-detail__section-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

.book-detail__notes {
  width: 100%;
  min-height: 120px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--c-tint-3);
  resize: vertical;
  font-family: inherit;
  transition: border-color var(--transition), background var(--transition);
}

.book-detail__notes:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card-bg);
}

.book-detail__notes-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 15px;
  color: var(--text-lighter);
}

.book-detail__reading-log {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.book-detail__log-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--c-tint-1);
  border-radius: 6px;
  font-size: 15px;
}

.book-detail__log-date {
  color: var(--text-light);
  min-width: 70px;
}

.book-detail__log-minutes {
  font-weight: 700;
  color: var(--primary);
  margin-left: auto;
}

.book-detail__log-delete {
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: var(--text-lighter);
  cursor: pointer;
  border-radius: 4px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.book-detail__log-delete:hover {
  background: #E0E5DC;
  color: #C4A098;
}

.book-detail__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.book-detail__action-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  transition: all var(--transition);
}

.book-detail__action-btn--reading {
  background: #A0C4A8;
  color: #fff;
}
.book-detail__action-btn--reading:hover {
  background: #8AB498;
}

.book-detail__action-btn--finish {
  background: var(--primary);
  color: #fff;
}
.book-detail__action-btn--finish:hover {
  background: var(--primary-dark);
}

.book-detail__action-btn--edit {
  background: var(--border-light);
  color: var(--text);
}
.book-detail__action-btn--edit:hover {
  background: #DDE3D6;
}

.book-detail__action-btn--delete {
  background: #EDE8E0;
  color: #B09890;
}
.book-detail__action-btn--delete:hover {
  background: #E0D5C8;
}

/* 阅读记录列表项 */
.book-log-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card-bg);
  border-radius: 8px;
  transition: background var(--transition);
}

.book-log-item:hover {
  background: var(--c-tint-1);
}

.book-log-item__date {
  font-size: 15px;
  color: var(--text-light);
  white-space: nowrap;
  min-width: 72px;
}

.book-log-item__book {
  flex: 1;
  font-size: 15px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-log-item__minutes {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.book-log-item__delete {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: #C4C8BE;
  font-size: 17px;
  cursor: pointer;
  border-radius: 4px;
  transition: all var(--transition);
}

.book-log-item__delete:hover {
  background: #DEE5E0;
  color: #C4A098;
}

/* ========== 自动识别提示 ========== */
.form-hint {
  margin-top: 6px;
  padding: 6px 10px;
  font-size: 15px;
  color: #8AB498;
  background: #EFF5EB;
  border-radius: 6px;
  border-left: 3px solid #A0C4A8;
  transition: opacity 0.3s;
}

.form-hint--success {
  color: #7DAA68;
  background: #E8F4E0;
  border-left-color: var(--primary);
}

/* ========== 读后感悟编辑器（全屏） ========== */
.book-notes-overlay {
  z-index: 1001;
  background: rgba(92, 94, 84, 0.3);
  backdrop-filter: blur(4px);
}

.book-notes-editor {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 720px;
  height: 100%;
  background: var(--c-bg1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
  border-radius: 0;
}

.book-notes-editor__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  padding-top: calc(16px + env(safe-area-inset-top));
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.book-notes-editor__back {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--primary);
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 8px;
  transition: background 0.2s;
  white-space: nowrap;
  min-height: 44px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.book-notes-editor__back:hover {
  background: var(--primary-light);
}

.book-notes-editor__title {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-notes-editor__status {
  font-size: 15px;
  color: #8AB498;
  white-space: nowrap;
  min-width: 60px;
  text-align: right;
}

.book-notes-editor__status--saving {
  color: #D4B896;
}

.book-notes-editor__body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}

.book-notes-editor__textarea {
  width: 100%;
  min-height: 60vh;
  border: none;
  background: transparent;
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
  resize: none;
  outline: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.book-notes-editor__textarea::placeholder {
  color: #C0C8BA;
  line-height: 1.9;
}

.book-notes-editor__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 28px;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.book-notes-editor__count {
  font-size: 15px;
  color: var(--text-lighter);
}

.book-notes-editor__hint {
  font-size: 15px;
  color: var(--text-lighter);
}

/* ========== 金句列表 ========== */
.book-quote-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.book-quote-card {
  position: relative;
  padding: 16px 18px 16px 22px;
  background: var(--c-tint-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  border-left: 4px solid #C4B498;
  transition: box-shadow 0.2s, transform 0.2s;
}

.book-quote-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.book-quote-card__text {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.book-quote-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 15px;
  color: var(--text-lighter);
}

.book-quote-card__source {
  color: #B0A070;
  background: #F5F0E4;
  padding: 2px 8px;
  border-radius: 4px;
}

.book-quote-card__date {
  color: var(--text-lighter);
}

.book-quote-card__delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--text-lighter);
  cursor: pointer;
  border-radius: 50%;
  font-size: 17px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  opacity: 0;
}

.book-quote-card:hover .book-quote-card__delete {
  opacity: 1;
}

.book-quote-card__delete:hover {
  background: #DEE5E0;
  color: #C4A098;
}

.book-quote-empty {
  padding: 20px;
  text-align: center;
  color: #C0C8BA;
  font-size: 16px;
}

/* 感悟入口 hover */
.book-detail__notes-entry:hover {
  border-color: var(--primary) !important;
  background: var(--card-bg) !important;
}

/* 金句表单 textarea */
#bookQuoteContent:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card-bg);
}

/* 查看全部金句按钮 */
.book-quote-more {
  text-align: center;
  padding: 8px 0 4px;
}
.book-quote-more__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--primary-light);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
}
.book-quote-more__btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.book-quote-more__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.book-quote-more__btn:hover .book-quote-more__count {
  background: var(--card-bg);
  color: var(--primary);
}

/* 金句全量弹窗 */
#bookQuoteAllBody .book-quote-card {
  margin-bottom: 10px;
}

/* ========== 随手记记模块 ========== */

/* 子导航标签 */
.qn-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.qn-tab {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text-light);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.qn-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.qn-panel {
  display: none;
}
.qn-panel.active {
  display: block;
}

/* 搜索框 */
.qn-search {
  position: relative;
  margin-bottom: 16px;
}
.qn-search__input {
  width: 100%;
  padding: 10px 36px 10px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 16px;
  color: var(--text);
  background: var(--card-bg);
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.qn-search__input:focus {
  outline: none;
  border-color: var(--primary);
}
.qn-search__input::placeholder {
  color: #C0C8BA;
}
.qn-search__clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: var(--border);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 搜索无结果 */
.qn-search-empty {
  padding: 24px;
  text-align: center;
  color: #C0C8BA;
  font-size: 16px;
}

/* 读后感悟列表 */
.book-notes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 20px;
}
.book-notes-item {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s;
}
.book-notes-item:hover {
  box-shadow: var(--shadow);
  border-left-color: var(--primary-dark, #7A8E6A);
}
.book-notes-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.book-notes-item__title {
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
}
.book-notes-item__date {
  font-size: 15px;
  color: var(--text-light);
}
.book-notes-item__preview {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-notes-item__meta {
  margin-top: 6px;
  font-size: 15px;
  color: var(--primary);
}
.book-notes-empty {
  padding: 24px;
  text-align: center;
  color: #C0C8BA;
  font-size: 16px;
}

/* 照片统计 */
.qn-photo-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding: 20px 20px 12px;
}
.qn-photo-stat {
  flex: 1;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  background: #EDF1E8;
  text-align: center;
}
.qn-photo-stat__num {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}
.qn-photo-stat__label {
  font-size: 15px;
  color: var(--text-light);
  margin-top: 2px;
}

/* 照片日历基础样式 */
.calendar-wrapper {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border-cal);
}

/* 当日历在 fin-section 内时有侧边距 */
.fin-section .calendar-wrapper {
  margin: 12px 20px 20px;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 2px solid var(--border-cal);
}
.calendar-header > span {
  padding: 10px 0;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-light);
  border-right: 1px solid var(--border-cal);
}
.calendar-header > span:nth-child(7n) {
  border-right: none;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-cell {
  min-height: 56px;
  border-right: 1px solid var(--border-cal);
  border-bottom: 1px solid var(--border-cal);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
  font-size: 16px;
  color: var(--text);
}
.calendar-cell:nth-child(7n) {
  border-right: none;
}
.calendar-cell--empty {
  cursor: default;
}
.calendar-cell:hover {
  background: var(--c-tint-1);
}
.calendar-cell--empty:hover {
  background: transparent;
}
.calendar-cell__num {
  font-weight: 500;
}
.calendar-cell__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 4px;
}
.calendar-cell.today {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  border-radius: 0;
}
.calendar-cell.today .calendar-cell__dot {
  background: var(--card-bg);
}

/* 照片日历格子 - 有照片标记 */
#qnPhotoCalendar .calendar-cell.has-photo {
  position: relative;
  background: var(--primary-light);
}
#qnPhotoCalendar .calendar-cell.has-photo.today {
  background: var(--primary);
  color: #fff;
}

/* 照片查看弹窗 */
/* 照片弹窗 */
.qn-photo-modal {
  border-radius: 20px;
  overflow: hidden;
  padding: 0;
}
.qn-photo-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--c-header-from) 0%, var(--c-header-to) 100%);
  color: #fff;
}
.qn-photo-modal__header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.qn-photo-modal__icon {
  font-size: 26px;
}
.qn-photo-modal__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #fff;
}
.qn-photo-modal__count {
  font-size: 15px;
  opacity: 0.85;
}
.qn-photo-modal__close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qn-photo-modal__close:hover {
  background: rgba(255, 255, 255, 0.35);
}
.qn-photo-modal .modal-body {
  padding: 18px 22px 24px;
}

/* 多图画廊 */
.qn-photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.qn-photo-gallery__item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}
.qn-photo-gallery__item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.qn-photo-gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.qn-photo-gallery__del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
}
.qn-photo-gallery__del:hover {
  background: rgba(200, 50, 50, 0.8);
  transform: scale(1.15);
}

/* 上传按钮 */
.qn-photo-upload-zone {
  text-align: center;
  padding: 8px 0 4px;
}
.qn-photo-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 24px;
  background: var(--c-header-from);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}
.qn-photo-upload-btn:hover {
  background: var(--c-header-to);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(143, 169, 126, 0.35);
}
.qn-photo-upload-btn--large {
  padding: 14px 32px;
  font-size: 16px;
  border-radius: 28px;
  margin-top: 8px;
}

/* 空状态 */
.qn-photo-empty {
  text-align: center;
  padding: 50px 20px 40px;
}
.qn-photo-empty__icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}
.qn-photo-empty__date {
  font-size: 20px;
  font-weight: 700;
  color: #5A6E48;
  margin-bottom: 8px;
}
.qn-photo-empty__hint {
  font-size: 16px;
  color: #9CA98C;
  margin-bottom: 4px;
}
.qn-photo-empty__sub {
  font-size: 15px;
  color: #B5C0A8;
  margin-bottom: 20px;
  font-style: italic;
}

/* 移动端感悟编辑器 */
@media (max-width: 768px) {
  .book-notes-editor {
    max-width: 100%;
  }
  .book-notes-editor__header {
    padding: 12px 14px;
    padding-top: calc(12px + env(safe-area-inset-top));
  }
  .book-notes-editor__title {
    font-size: 16px;
  }
  .book-notes-editor__body {
    padding: 16px 18px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .book-notes-editor__textarea {
    font-size: 16px;
    min-height: 50vh;
  }
}

/* ========== 黎黎专属 - 可爱风增强 ========== */

/* 侧边栏顶部装饰 */
.sidebar__logo {
  background: linear-gradient(135deg, var(--c-sidebar-from) 0%, var(--c-sidebar-to) 100%);
  border-bottom: 1px solid #DDE3D6;
}

.logo-icon {
  background: linear-gradient(135deg, var(--primary), var(--accent-lav)) !important;
  border-radius: 10px !important;
  font-size: 18px !important;
}

.logo-text {
  font-size: 16px !important;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent-lav));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 侧边栏底部 */
.sidebar__footer {
  background: linear-gradient(135deg, var(--c-sidebar-from) 0%, var(--c-sidebar-to) 100%);
  border-top: 1px solid #DDE3D6;
}

/* 自动保存提示 */
.auto-save-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(160, 196, 168, 0.1);
  border: 1px solid rgba(160, 196, 168, 0.3);
  border-radius: 8px;
  font-size: 13px;
  color: #7A9B7E;
  font-weight: 500;
  margin-bottom: 6px;
  transition: all 0.3s ease;
}

.auto-save-badge--saving {
  background: rgba(var(--c-shadow-rgb), 0.1);
  border-color: rgba(var(--c-shadow-rgb), 0.3);
  color: var(--primary);
}

.auto-save-badge__icon {
  font-size: 15px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* 导航项可爱风 */
.nav-item.active {
  background: linear-gradient(135deg, var(--c-sidebar-from) 0%, var(--c-sidebar-to) 100%) !important;
  color: var(--primary) !important;
}

.nav-item.active::before {
  background: linear-gradient(180deg, var(--primary), #B0A8B4) !important;
  border-radius: 0 3px 3px 0;
}

.nav-item:not(.active):hover {
  background: #F4F7F2 !important;
}

/* 月份导航按钮 */
.month-nav__btn {
  border-radius: 10px !important;
}

.month-nav__btn:hover {
  background: var(--primary-light) !important;
  color: var(--primary) !important;
}

.month-nav__today {
  background: linear-gradient(135deg, var(--c-sidebar-from), var(--c-sidebar-to)) !important;
  color: var(--primary) !important;
  border: 1px solid rgba(var(--c-shadow-rgb), 0.2);
  border-radius: 10px !important;
}

.month-nav__today:hover {
  background: linear-gradient(135deg, var(--c-tint-5), var(--c-tint-6)) !important;
}

/* 今日高亮改为粉色 */
.cal-day--today .cal-day__number {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
}

/* 卡片柔和阴影 */
.calendar,
.rewards-section,
.fin-section {
  box-shadow: 0 2px 16px rgba(var(--c-shadow-rgb), 0.06) !important;
}

/* 按钮圆润 */
.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
  border-radius: 10px !important;
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--c-btn-dark-to)) !important;
}

.btn--secondary {
  background: var(--c-bg2) !important;
  color: var(--primary) !important;
  border-radius: 10px !important;
}

.btn--secondary:hover {
  background: #E0E8DC !important;
}

/* 编辑类型按钮可爱风 */
.btn-edit-types {
  border-radius: 10px !important;
  border: 1px solid #DDE3D6 !important;
}

.btn-edit-types:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  background: var(--primary-light) !important;
}

/* Toast 可爱风 */
.toast {
  background: rgba(92, 94, 84, 0.92) !important;
  border-radius: 12px !important;
}

/* 输入框聚焦粉色光晕 */
.form-group input:focus,
.form-group--inline input:focus,
.form-group--inline select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--c-shadow-rgb), 0.1) !important;
}

/* 颜色选择器选中状态 */
.color-swatch--selected {
  box-shadow: 0 0 0 2px var(--primary) !important;
}

/* 图标选择器选中状态 */
.icon-swatch--selected {
  border-color: var(--primary) !important;
  background: var(--primary-light) !important;
}

/* 响应式 - 手机适配 */
@media (max-width: 480px) {
  .main {
    padding: 16px 12px;
  }
  
  .main__title {
    font-size: 24px;
  }
  
  .stats-summary-btn,
  .fin-stats-btn,
  .sleep-stats-btn {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .stats-summary-btn__items,
  .fin-stats-btn__items,
  .sleep-stats-btn__items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-left: 0;
  }
  .book-stats-bar .sleep-stats-btn__items {
    grid-template-columns: repeat(2, 1fr);
    text-align: left;
  }
  .book-stats-bar .sleep-stats-btn__item {
    align-items: flex-start;
    text-align: left;
  }
  .stats-summary-btn__item,
  .fin-stats-btn__item,
  .sleep-stats-btn__item {
    min-width: 0;
    text-align: center;
    align-items: center;
  }

  .book-reading-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .book-reading-card__actions {
    flex-direction: row;
  }

  .book-reading-card__cover {
    width: 48px;
    height: 68px;
    font-size: 24px;
  }
  
  .cal-day {
    min-height: 56px;
    padding: 3px 4px;
  }
  
  .cal-day__number {
    font-size: 15px;
  }
  
  .cal-dot {
    width: 6px;
    height: 6px;
  }
}

/* ========== AI 智能输入浮窗 ========== */

/* 浮动按钮 */
.ai-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--c-btn-to) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(var(--c-shadow-rgb), 0.35);
  z-index: 900;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: aiFabPulse 3s ease-in-out infinite;
}
.ai-fab:hover {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 6px 24px rgba(var(--c-shadow-rgb), 0.5);
}
.ai-fab:active {
  transform: scale(0.95);
}
.ai-fab__icon {
  margin-top: 2px;
}
@keyframes aiFabPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(var(--c-shadow-rgb), 0.35); }
  50% { box-shadow: 0 4px 24px rgba(var(--c-shadow-rgb), 0.55); }
}

/* 输入弹窗 */
.ai-input-overlay {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 420px;
  max-width: 100%;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.ai-input-overlay.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.ai-input-card {
  margin: 0 16px 16px 16px;
  background: var(--card-bg);
  border-radius: 18px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  border: 1px solid var(--c-bg3);
}

.ai-input-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--c-sidebar-from) 0%, var(--c-sidebar-to) 100%);
  border-bottom: 1px solid #DDE3D6;
}
.ai-input-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.ai-input-card__avatar {
  font-size: 20px;
}
.ai-input-card__close {
  background: none;
  border: none;
  font-size: 24px;
  color: #9CAA8A;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}
.ai-input-card__close:hover {
  color: var(--text);
}

.ai-input-card__body {
  padding: 14px 18px;
}
.ai-input-card__textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--c-tint-3);
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}
.ai-input-card__textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card-bg);
}

.ai-input-card__hints {
  margin-top: 8px;
}
.ai-input-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  margin: 3px 4px 0 0;
  border-radius: 12px;
  font-size: 15px;
  background: #F0F4EC;
  color: #8A9A7A;
  border: 1px solid #E0E8D8;
}
.ai-input-hint--success {
  background: #E8F5E9;
  color: #4A7A3A;
  border-color: #C8E6C9;
}
.ai-input-hint--error {
  background: #FDEDED;
  color: #C06060;
  border-color: #F0C8C8;
}

.ai-input-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px 14px;
  gap: 12px;
}
.ai-input-card__tip {
  font-size: 13px;
  color: #B0B8A8;
  flex: 1;
  line-height: 1.4;
}
.ai-input-card__send {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s;
}
.ai-input-card__send:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--c-shadow-rgb), 0.4);
}
.ai-input-card__send:active {
  transform: translateY(0);
}

/* 移动端浮窗适配 */
@media (max-width: 768px) {
  .ai-fab {
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
  }
  .ai-input-overlay {
    width: 100%;
  }
  .ai-input-card {
    margin: 0 8px 8px 8px;
  }
  .ai-input-card__tip {
    display: none;
  }
}

/* ===== AI 设置面板 ===== */
.ai-input-card__header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-input-card__gear {
  background: none;
  border: none;
  color: #9CAA8A;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.ai-input-card__gear:hover {
  color: var(--text);
  background: rgba(var(--c-shadow-rgb), 0.12);
}
.ai-input-card__gear svg {
  transition: transform 0.3s ease;
}
.ai-input-card__gear.active svg {
  transform: rotate(90deg);
}

.ai-input-card__mode {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
  background: #F0F0F0;
  color: #999;
  border: 1px solid #E0E0E0;
  white-space: nowrap;
}
.ai-input-card__mode.ai-mode {
  background: #E8F5E9;
  color: #4A7A3A;
  border-color: #C8E6C9;
}
.ai-input-card__mode.ai-mode::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #66BB6A;
}
.ai-input-card__mode.offline-mode::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #BBB;
}

/* 设置面板 */
.ai-settings {
  padding: 14px 18px;
  background: var(--c-tint-3);
  border-bottom: 1px solid #DDE3D6;
}
.ai-settings__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.ai-settings__desc {
  font-size: 13px;
  color: #9CA98C;
  line-height: 1.5;
  margin-bottom: 10px;
}
.ai-settings__field {
  margin-bottom: 8px;
}
.ai-settings__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #7A8A6A;
  margin-bottom: 4px;
}
.ai-settings__input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 15px;
  font-family: 'SF Mono', 'Consolas', monospace;
  color: var(--text);
  background: var(--card-bg);
  transition: border-color 0.2s;
}
.ai-settings__input:focus {
  outline: none;
  border-color: var(--primary);
}
.ai-settings__hint {
  font-size: 13px;
  color: #B0B8A8;
  line-height: 1.6;
  margin-bottom: 10px;
}
.ai-settings__hint a {
  color: #7A9A6A;
  text-decoration: none;
}
.ai-settings__hint a:hover {
  text-decoration: underline;
}
.ai-settings__actions {
  display: flex;
  gap: 8px;
}
.ai-settings__btn {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.ai-settings__btn--test {
  background: var(--card-bg);
  color: #7A8A6A;
}
.ai-settings__btn--test:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.ai-settings__btn--save {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  border-color: transparent;
}
.ai-settings__btn--save:hover {
  opacity: 0.9;
}
.ai-settings__status {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  min-height: 16px;
}
.ai-settings__status--success {
  color: #4A7A3A;
}
.ai-settings__status--error {
  color: #C06060;
}

/* 加载条 */
.ai-input-card__loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0 0;
}
.ai-input-card__loading-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #E0E8D8;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: aiSpin 0.8s linear infinite;
}
.ai-input-card__loading-text {
  font-size: 15px;
  color: #9CA98C;
}
@keyframes aiSpin {
  to { transform: rotate(360deg); }
}

/* 发送按钮 loading 状态 */
.ai-input-card__send.loading {
  pointer-events: none;
  opacity: 0.7;
}
.ai-input-card__send.loading span {
  opacity: 0.6;
}

/* 语音输入按钮 */
.ai-input-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ai-input-card__mic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.ai-input-card__mic:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.ai-input-card__mic.recording {
  background: #E85555;
  border-color: #E85555;
  color: #fff;
  animation: mic-pulse 1.2s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@media (max-width: 768px) {
  .ai-input-card__mode {
    display: none;
  }
}

/* ===== 周度报告按钮 ===== */
.weekly-report-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--c-btn-to) 100%);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(var(--c-shadow-rgb), 0.3);
}
.weekly-report-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(var(--c-shadow-rgb), 0.45);
}
.weekly-report-btn__icon {
  font-size: 17px;
}
.weekly-report-btn__label {
  font-size: 15px;
  font-weight: 600;
}

/* ===== 身体健康模块 ===== */
.health-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.health-tab {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}
.health-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.health-tab:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}
.health-panel {
  display: none;
}
.health-panel.active {
  display: block;
}

/* 体型记录 */
.health-body-input {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.health-body-input__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.health-body-input__field {
  min-width: 0;
}
.health-body-input__field label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 4px;
}
.health-body-input__field input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 16px;
  color: var(--text);
  box-sizing: border-box;
}
.health-body-input__field input:focus {
  outline: none;
  border-color: var(--primary);
}
.health-body-input__btn {
  width: 100%;
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.health-body-input__btn:hover {
  transform: translateY(-1px);
}
  box-shadow: 0 2px 8px rgba(var(--c-shadow-rgb), 0.25);
  transition: all 0.2s ease;
  white-space: nowrap;
}
  white-space: nowrap;
  transition: transform 0.2s;
}
.health-body-input__btn:hover {
  transform: translateY(-1px);
}

.health-body-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.health-stat-card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  text-align: center;
}
.health-stat-card__value {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}
.health-stat-card__label {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 4px;
}
.health-stat-card--bmi .health-stat-card__value {
  color: var(--primary);
}

.health-body-latest {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.health-body-history {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
}
.health-record-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.health-record-item:last-child {
  border-bottom: none;
}
.health-record-item__date {
  color: var(--text-light);
}
.health-record-item__data {
  font-weight: 600;
  color: var(--text);
}
.health-record-item__del {
  background: none;
  border: none;
  color: #CCC;
  cursor: pointer;
  font-size: 17px;
  padding: 0 4px;
}
.health-record-item__del:hover {
  color: #C06060;
}

/* 饮食记录 */
.diet-input-section {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.diet-input-section__title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}
.diet-ai-hint {
  font-size: 13px;
  color: #B0B8A8;
  margin-bottom: 8px;
  padding: 4px 10px;
  background: var(--c-tint-3);
  border-radius: 6px;
}
.diet-ai-hint.ai-on {
  color: #4A7A3A;
  background: #E8F5E9;
}
.diet-input-section__textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--c-tint-3);
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
}
.diet-input-section__textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card-bg);
}
.diet-input-section__actions {
  margin-top: 10px;
}
.diet-input-section__btn {
  padding: 8px 24px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(var(--c-shadow-rgb), 0.25);
  transition: all 0.2s ease;
  white-space: nowrap;
}
  transition: transform 0.2s;
}
.diet-input-section__btn:hover {
  transform: translateY(-1px);
}
.diet-input-section__btn:disabled {
  opacity: 0.6;
  pointer-events: none;
}
.diet-input-section__btn--outline {
  background: transparent;
  border: 1.5px solid var(--primary, #9CAF88);
  color: var(--primary, #9CAF88);
  box-shadow: none;
}
.diet-input-section__btn--outline:hover {
  background: var(--primary-light, #EFF3EB);
}
.diet-input-section__loading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.diet-loading-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #E0E8D8;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: aiSpin 0.8s linear infinite;
}
.diet-loading-text {
  font-size: 15px;
  color: #9CA98C;
}

.diet-daily-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.diet-nutrition-card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  text-align: center;
}
.diet-nutrition-card__value {
  font-size: 22px;
  font-weight: 700;
}
.diet-nutrition-card__value--cal { color: #D4B896; }
.diet-nutrition-card__value--protein { color: var(--primary); }
.diet-nutrition-card__value--carb { color: #A0C4A8; }
.diet-nutrition-card__value--fat { color: #C4A098; }
.diet-nutrition-card__label {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 2px;
}
.diet-nutrition-card__unit {
  font-size: 11px;
  color: var(--text-light);
}

.diet-cal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
}
.diet-cal-nav button {
  border: 1px solid var(--border);
  background: var(--card-bg);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  font-size: 17px;
  cursor: pointer;
  color: var(--text);
}
.diet-cal-nav span {
  font-size: 16px;
  font-weight: 600;
}
.diet-calendar-section {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.diet-calendar .calendar-cell.has-diet {
  background: #FFF5E8;
}
.diet-calendar .calendar-cell.has-diet .calendar-cell__dot {
  background: #D4B896;
}

.diet-today-section {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
}
.diet-food-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.diet-food-item:last-child {
  border-bottom: none;
}
.diet-food-item__name {
  font-weight: 500;
  color: var(--text);
}
.diet-food-item__amount {
  color: var(--text-light);
  font-size: 15px;
}
.diet-food-item__nutrition {
  text-align: right;
  font-size: 15px;
  color: var(--text-light);
}
.diet-food-item__del {
  background: none;
  border: none;
  color: #CCC;
  cursor: pointer;
  font-size: 17px;
  padding: 0 4px;
  margin-left: 6px;
}
.diet-food-item__del:hover {
  color: #C06060;
}
.diet-empty {
  text-align: center;
  padding: 20px;
  color: var(--text-light);
  font-size: 15px;
}

/* 周度报告 */
.weekly-report-modal {
  max-width: 680px;
  border-radius: 20px;
  overflow: hidden;
  padding: 0;
}
.weekly-report-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--c-header-from) 0%, var(--c-header-to) 100%);
  color: #fff;
}
.weekly-report-modal__header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.weekly-report-modal__icon {
  font-size: 30px;
}
.weekly-report-modal__title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: #fff;
}
.weekly-report-modal__date {
  font-size: 15px;
  opacity: 0.85;
}
.weekly-report-modal__close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.weekly-report-modal__close:hover {
  background: rgba(255, 255, 255, 0.35);
}
.weekly-report-modal .modal-body {
  padding: 20px 24px 28px;
  max-height: 70vh;
  overflow-y: auto;
}

/* 加载状态 */
.weekly-report-loading {
  text-align: center;
  padding: 50px 20px;
}
.weekly-report-spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid #E0E8D8;
  border-top-color: var(--c-header-from);
  border-radius: 50%;
  animation: aiSpin 0.8s linear infinite;
  margin-bottom: 14px;
}
.weekly-report-loading p {
  font-size: 16px;
  color: #9CA98C;
}

/* 报告内容 */
.weekly-report-content {
  font-size: 16px;
  line-height: 1.8;
}

/* 问候卡片 */
.wr-greeting {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--c-tint-4), var(--c-tint-2));
  border-radius: 14px;
  margin-bottom: 18px;
  border: 1px solid #DDE8D4;
}
.wr-greeting__icon {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 1px;
}
.wr-greeting__text {
  font-size: 16px;
  line-height: 1.8;
  color: #4A5A3E;
}

/* 数据概览网格 */
.wr-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.wr-overview-card {
  text-align: center;
  padding: 14px 8px;
  background: #FAFBF8;
  border-radius: 12px;
  border: 1px solid #EAEFE4;
  transition: transform 0.2s;
}
.wr-overview-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(143, 169, 126, 0.12);
}
.wr-overview-card__icon {
  font-size: 22px;
  margin-bottom: 6px;
}
.wr-overview-card__value {
  font-size: 24px;
  font-weight: 800;
  color: #5A6E48;
  line-height: 1.2;
}
.wr-overview-card__value--neg {
  color: #C06B5A;
}
.wr-overview-card__unit {
  font-size: 13px;
  font-weight: 500;
  margin-left: 2px;
}
.wr-overview-card__label {
  font-size: 13px;
  color: #9CA98C;
  margin-top: 4px;
}

/* 分模块卡片 */
.wr-sections {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.wr-section-card {
  padding: 14px 16px;
  background: #FAFBF8;
  border-radius: 12px;
  border: 1px solid #EAEFE4;
  border-left: 3px solid var(--c-header-from);
}
.wr-section-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.wr-section-card__icon {
  font-size: 17px;
}
.wr-section-card__title {
  font-size: 16px;
  font-weight: 700;
  color: #5A6E48;
}
.wr-section-card__summary {
  font-size: 15px;
  color: #7A8A6E;
  margin-bottom: 4px;
  font-style: italic;
}
.wr-section-card__detail {
  font-size: 15px;
  color: #6B7A5E;
  line-height: 1.7;
}

/* AI洞察 */
.wr-insight {
  padding: 16px 18px;
  background: linear-gradient(135deg, #F5F0E8, #EDE8E0);
  border-radius: 14px;
  border: 1px solid #E0D8CC;
  margin-bottom: 14px;
}
.wr-insight__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.wr-insight__badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  background: var(--c-header-from);
  color: #fff;
  letter-spacing: 0.5px;
}
.wr-insight__title {
  font-size: 16px;
  font-weight: 700;
  color: #5A4E3E;
}
.wr-insight__body {
  font-size: 15px;
  color: #6B5E4E;
  line-height: 1.9;
  white-space: pre-wrap;
}

/* 鼓励语 */
.wr-encourage {
  text-align: center;
  padding: 14px 20px;
  font-size: 15px;
  color: var(--c-header-from);
  font-style: italic;
  background: var(--c-tint-3);
  border-radius: 12px;
  border: 1px dashed #C8D4BC;
}

/* 健康统计弹窗图表 */
.health-chart-section {
  margin-bottom: 20px;
}
.health-chart-section__title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}
.health-bmi-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 10px 0;
}
.health-bmi-bar__segment {
  flex: 1;
  height: 8px;
  border-radius: 4px;
}
.health-bmi-bar__segment--low { background: #B0C4A8; }
.health-bmi-bar__segment--normal { background: var(--primary); }
.health-bmi-bar__segment--over { background: #D4B896; }
.health-bmi-bar__segment--obese { background: #C4A098; }
.health-bmi-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 4px;
}

@media (max-width: 768px) {
  .health-body-input__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   我要做饭模块
   ============================================================ */

/* 食材输入区 */
.cook-input-section {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.cook-input-section__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.cook-input-section__hint {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 12px;
}
.cook-input-section__hint--active {
  color: var(--primary);
}

/* 食材标签 */
.cook-ingredient-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  min-height: 10px;
}
.cook-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: 20px;
  font-size: 15px;
  color: var(--primary);
  font-weight: 500;
}
.cook-tag__remove {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.cook-tag__remove:hover {
  opacity: 1;
}

/* 输入行 */
.cook-input-section__row {
  display: flex;
  gap: 8px;
}
.cook-input-section__input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}
.cook-input-section__input:focus {
  border-color: var(--primary);
}
.cook-input-section__btn {
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.cook-input-section__btn:hover {
  background: var(--primary);
  color: #fff;
}

/* 搜索/清空按钮 */
.cook-input-section__actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.cook-input-section__search-btn {
  flex: 1;
  padding: 11px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.cook-input-section__search-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--c-shadow-rgb), 0.35);
}
.cook-input-section__search-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.cook-input-section__clear-btn {
  padding: 11px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text-light);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.cook-input-section__clear-btn:hover {
  background: #f5f5f5;
  color: var(--text);
}

/* 加载动画 */
.cook-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px 0;
  color: var(--text-light);
  font-size: 16px;
}
.cook-loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid #E0E8D8;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: aiSpin 0.8s linear infinite;
}
.cook-loading-text {
  color: var(--text-light);
}

/* 常用食材快捷标签 */
.cook-quick-ingredients {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 0 4px;
}
.cook-quick-ingredients__label {
  font-size: 15px;
  color: var(--text-light);
}
.cook-quick-tag {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
}
.cook-quick-tag:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* 食谱结果 */
.cook-recipes {
  margin-top: 8px;
}
.cook-recipes__header {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
}
.cook-recipe-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cook-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
  font-size: 16px;
}

/* 食谱卡片 */
.cook-recipe-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s;
}
.cook-recipe-card.expanded {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.cook-recipe-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--c-tint-3), var(--c-tint-4));
  border-bottom: 1px solid #EBF0E6;
}
.cook-recipe-card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.cook-recipe-card__toggle {
  padding: 5px 14px;
  border: 1px solid var(--primary);
  border-radius: 16px;
  background: var(--card-bg);
  color: var(--primary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.cook-recipe-card__toggle:hover {
  background: var(--primary);
  color: #fff;
}

/* 食谱元信息 */
.cook-recipe__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #F0F5EC;
}
.cook-meta__item {
  font-size: 15px;
  color: var(--text-light);
  background: var(--c-tint-3);
  padding: 4px 10px;
  border-radius: 12px;
}

/* 食材清单 + 步骤（默认隐藏，展开时显示） */
.cook-recipe-card .cook-recipe__ingredients,
.cook-recipe-card .cook-recipe__steps,
.cook-recipe-card .cook-recipe__tips {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 20px;
}
.cook-recipe-card.expanded .cook-recipe__ingredients,
.cook-recipe-card.expanded .cook-recipe__steps,
.cook-recipe-card.expanded .cook-recipe__tips {
  max-height: 1200px;
  padding-top: 14px;
  padding-bottom: 16px;
}

.cook-recipe__sub-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

/* 食材列表 */
.cook-ingredient-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cook-ingredient-list li {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
}
.cook-ingredient-list__name {
  color: var(--text);
  font-weight: 500;
}
.cook-ingredient-list__amount {
  color: var(--text-light);
  font-size: 15px;
}
.cook-ingredient-list li::after {
  content: '·';
  color: var(--text-light);
  margin-left: 4px;
}
.cook-ingredient-list li:last-child::after {
  display: none;
}

/* 步骤列表 */
.cook-step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}
.cook-step {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed #EBF0E6;
}
.cook-step:last-child {
  border-bottom: none;
}
.cook-step__num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cook-step__text {
  font-size: 16px;
  color: var(--text);
  line-height: 1.7;
  padding-top: 2px;
}

/* 小贴士 */
.cook-recipe__tips {
  margin-top: 10px;
  padding: 12px 16px;
  background: #FFF9F0;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: #8B7355;
  line-height: 1.6;
}
.cook-recipe-card.expanded .cook-recipe__tips {
  padding: 12px 16px;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .cook-input-section__row {
    flex-direction: column;
  }
  .cook-input-section__btn {
    width: 100%;
  }
}

/* ========== 主题切换系统 ========== */

/* 莫兰迪蓝 */
[data-theme="blue"] {
  --c-card-from: #F8FAFC;
  --bg: #F2F5F8;
  --sidebar-bg: #E8EEF4;
  --card-bg: #F8FAFC;
  --c-card-tint: #F8FAFC;
  --text: #545E68;
  --text-light: #9CA6B0;
  --text-lighter: #C0C8D0;
  --border: #D6DEE6;
  --border-light: #E2E8EE;
  --border-cal: #C8D2DC;
  --primary: #8DA5B8;
  --primary-light: #E8EEF4;
  --primary-dark: #7A95AB;
  --c-bg1: #F2F5F8;
  --c-bg2: #E8EEF4;
  --c-bg3: #E0E8EF;
  --c-header-from: #7A95AB;
  --c-header-to: #5C7A91;
  --c-btn-to: #A0B8CC;
  --c-btn-dark-to: #6A859B;
  --c-sidebar-from: #E8EEF4;
  --c-sidebar-to: #E0E8EF;
  --c-card-to: #E8EEF4;
  --c-tint-1: #F2F5F8;
  --c-tint-2: #E8EEF4;
  --c-tint-3: #F6F8FB;
  --c-tint-4: #E8EFF4;
  --c-tint-5: #D6DEE6;
  --c-tint-6: #DCE4EC;
  --c-shadow-rgb: 141, 165, 184;
}

/* 莫兰迪紫 */
[data-theme="purple"] {
  --c-card-from: #FAF8FC;
  --bg: #F5F2F7;
  --sidebar-bg: #EFEAF3;
  --card-bg: #FAF8FC;
  --c-card-tint: #FAF8FC;
  --text: #58545E;
  --text-light: #A09CA8;
  --text-lighter: #C8C0CE;
  --border: #DDD6E0;
  --border-light: #E8E2EC;
  --border-cal: #D0C8D4;
  --primary: #A89BB8;
  --primary-light: #EFEAF3;
  --primary-dark: #978AB8;
  --c-bg1: #F5F2F7;
  --c-bg2: #EFEAF3;
  --c-bg3: #E8E2ED;
  --c-header-from: #978AB8;
  --c-header-to: #7A6B9E;
  --c-btn-to: #BEB0CC;
  --c-btn-dark-to: #8A7BAA;
  --c-sidebar-from: #EFEAF3;
  --c-sidebar-to: #E8E2ED;
  --c-card-to: #EFEAF3;
  --c-tint-1: #F4F2F7;
  --c-tint-2: #EDE8F2;
  --c-tint-3: #F8F6FB;
  --c-tint-4: #EDE8F2;
  --c-tint-5: #DCD4E4;
  --c-tint-6: #E2DCE8;
  --c-shadow-rgb: 168, 155, 184;
}

/* 莫兰迪粉 */
[data-theme="rose"] {
  --c-card-from: #FCF8FA;
  --bg: #F7F2F5;
  --sidebar-bg: #F3EAEF;
  --card-bg: #FCF8FA;
  --c-card-tint: #FCF8FA;
  --text: #5E5458;
  --text-light: #A89CA4;
  --text-lighter: #D0C0C8;
  --border: #E0D4DC;
  --border-light: #EBDEE4;
  --border-cal: #D4C8D0;
  --primary: #B89BA8;
  --primary-light: #F3EAEF;
  --primary-dark: #A88B9B;
  --c-bg1: #F7F2F5;
  --c-bg2: #F3EAEF;
  --c-bg3: #EDDEE4;
  --c-header-from: #A88B9B;
  --c-header-to: #8E6B7E;
  --c-btn-to: #CCB0BC;
  --c-btn-dark-to: #9C7B8E;
  --c-sidebar-from: #F3EAEF;
  --c-sidebar-to: #EDDEE4;
  --c-card-to: #F3EAEF;
  --c-tint-1: #F5F2F4;
  --c-tint-2: #EFE8EC;
  --c-tint-3: #FAF6F8;
  --c-tint-4: #F0E8EC;
  --c-tint-5: #E0D4DC;
  --c-tint-6: #E6DAE0;
  --c-shadow-rgb: 184, 155, 168;
}

/* 莫兰迪暖沙 */
[data-theme="sand"] {
  --c-card-from: #FCFAF7;
  --bg: #F7F5F2;
  --sidebar-bg: #F0EDE8;
  --card-bg: #FCFAF7;
  --c-card-tint: #FCFAF7;
  --text: #5C5854;
  --text-light: #A09A94;
  --text-lighter: #C8C2BC;
  --border: #E0DAD6;
  --border-light: #ECE6E0;
  --border-cal: #D4CEC8;
  --primary: #B8A88A;
  --primary-light: #F0EDE8;
  --primary-dark: #A89878;
  --c-bg1: #F7F5F2;
  --c-bg2: #F0EDE8;
  --c-bg3: #E8E4DE;
  --c-header-from: #A89878;
  --c-header-to: #8A7A5C;
  --c-btn-to: #CCBC9E;
  --c-btn-dark-to: #988868;
  --c-sidebar-from: #F0EDE8;
  --c-sidebar-to: #E8E4DE;
  --c-card-to: #F0EDE8;
  --c-tint-1: #F5F4F1;
  --c-tint-2: #EDEBE6;
  --c-tint-3: #FAF8F5;
  --c-tint-4: #F0EDE8;
  --c-tint-5: #E0DAD6;
  --c-tint-6: #E4DEDA;
  --c-shadow-rgb: 184, 168, 138;
}

/* ========== 侧边栏工具按钮 ========== */
.sidebar-tools {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.sidebar-tool-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 6px;
  border-radius: 8px;
  background: rgba(var(--c-shadow-rgb), 0.06);
  border: 1px solid rgba(var(--c-shadow-rgb), 0.15);
  font-size: 13px;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}
.sidebar-tool-btn:hover {
  background: rgba(var(--c-shadow-rgb), 0.12);
  border-color: rgba(var(--c-shadow-rgb), 0.3);
  color: var(--text);
}
.sidebar-tool-btn__icon {
  font-size: 16px;
}

/* ========== 主题切换面板 ========== */
.theme-panel-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.theme-panel-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.theme-panel {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 420px;
  max-width: 92vw;
  background: var(--card-bg);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.15);
  z-index: 1001;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.theme-panel.open {
  transform: translateX(-50%) translateY(0);
}
.theme-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  background: linear-gradient(135deg, var(--c-header-from) 0%, var(--c-header-to) 100%);
  color: #fff;
}
.theme-panel__title {
  font-size: 17px;
  font-weight: 700;
}
.theme-panel__close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}
.theme-panel__close:hover {
  background: rgba(255,255,255,0.35);
}
.theme-panel__body {
  padding: 20px 22px 24px;
}
.theme-panel__desc {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.6;
}
.theme-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.theme-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: 12px;
  transition: background 0.2s;
}
.theme-card:hover {
  background: rgba(var(--c-shadow-rgb), 0.06);
}
.theme-card__swatch {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid transparent;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
}
.theme-card.active .theme-card__swatch {
  border-color: var(--text);
  transform: scale(1.1);
}
.theme-card__swatch--green {
  background: linear-gradient(135deg, #9CAF88, #8FA97E);
}
.theme-card__swatch--blue {
  background: linear-gradient(135deg, #8DA5B8, #7A95AB);
}
.theme-card__swatch--purple {
  background: linear-gradient(135deg, #A89BB8, #978AB8);
}
.theme-card__swatch--rose {
  background: linear-gradient(135deg, #B89BA8, #A88B9B);
}
.theme-card__swatch--sand {
  background: linear-gradient(135deg, #B8A88A, #A89878);
}
.theme-card__name {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
}
.theme-card.active .theme-card__name {
  color: var(--text);
  font-weight: 700;
}

/* ========== 数据导出导入弹窗 ========== */
.data-mgr-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.data-mgr-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.data-mgr-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 440px;
  max-width: 92vw;
  max-height: 80vh;
  background: var(--card-bg);
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.2);
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.data-mgr-overlay.open .data-mgr-modal {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.data-mgr-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--c-header-from) 0%, var(--c-header-to) 100%);
  color: #fff;
}
.data-mgr-modal__title {
  font-size: 17px;
  font-weight: 700;
}
.data-mgr-modal__close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
}
.data-mgr-modal__body {
  padding: 20px 22px;
  overflow-y: auto;
}
.data-mgr-section {
  margin-bottom: 20px;
}
.data-mgr-section:last-child {
  margin-bottom: 0;
}
.data-mgr-section__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.data-mgr-section__desc {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 12px;
  line-height: 1.6;
}
.data-mgr-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 10px rgba(var(--c-shadow-rgb), 0.2);
}
.data-mgr-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(var(--c-shadow-rgb), 0.3);
}
.data-mgr-btn--secondary {
  background: rgba(var(--c-shadow-rgb), 0.08);
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--border);
}
.data-mgr-btn--secondary:hover {
  background: rgba(var(--c-shadow-rgb), 0.12);
  box-shadow: none;
}
.data-mgr-btn--danger {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  color: #fff;
  box-shadow: 0 2px 10px rgba(192, 57, 43, 0.25);
}
.data-mgr-btn--danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(192, 57, 43, 0.35);
}
.data-mgr-btn__icon {
  font-size: 20px;
}
.data-mgr-info {
  padding: 12px 14px;
  background: rgba(var(--c-shadow-rgb), 0.05);
  border-radius: 10px;
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.7;
}
.data-mgr-info strong {
  color: var(--text);
}
.data-mgr-warn {
  padding: 10px 14px;
  background: #FFF4E6;
  border: 1px solid #FFD8A8;
  border-radius: 10px;
  font-size: 15px;
  color: #8B5A1A;
  line-height: 1.6;
  margin-top: 8px;
}

@media (max-width: 480px) {
  .theme-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
  .theme-card__swatch {
    width: 40px;
    height: 40px;
  }
}

/* ========== 100小时定律模块 ========== */
.challenge-add-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 24px;
}
.challenge-add-section__row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.challenge-add-section__input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  color: var(--text);
  background: var(--c-tint-3);
  outline: none;
  transition: border var(--transition), background var(--transition);
}
.challenge-add-section__input:focus {
  border-color: var(--primary);
  background: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(var(--c-shadow-rgb), 0.08);
}
.challenge-add-section__input::placeholder {
  color: var(--text-lighter);
}
.challenge-add-section__btn {
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(var(--c-shadow-rgb), 0.25);
  transition: all var(--transition);
  white-space: nowrap;
}
.challenge-add-section__btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* 项目卡片 */
.challenge-projects {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 项目标签栏 */
.challenge-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  -webkit-overflow-scrolling: touch;
}
.challenge-tabs::-webkit-scrollbar {
  height: 4px;
}
.challenge-tabs::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}
.challenge-tabs::-webkit-scrollbar-track {
  background: transparent;
}
.challenge-tab {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
}
.challenge-tab__icon {
  font-size: 17px;
}
.challenge-tab__count {
  font-size: 13px;
  font-weight: 700;
  background: var(--border-light);
  border-radius: 8px;
  padding: 1px 6px;
  color: var(--text-light);
}
.challenge-tab:hover {
  border-color: var(--primary);
  color: var(--text);
}
.challenge-tab--active {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 8px rgba(var(--c-shadow-rgb), 0.2);
}
.challenge-tab--active .challenge-tab__count {
  background: rgba(255,255,255,0.25);
  color: #fff;
}

.challenge-project {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.challenge-project:hover {
  box-shadow: var(--shadow-lg);
}
.challenge-project__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  background: linear-gradient(135deg, var(--c-card-from), var(--c-card-to));
  border-bottom: 1px solid var(--border-light);
}
.challenge-project__header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.challenge-project__icon {
  font-size: 26px;
}
.challenge-project__name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.challenge-project__stats {
  font-size: 15px;
  color: var(--text-light);
  margin-top: 2px;
}
.challenge-project__progress {
  display: flex;
  align-items: center;
  gap: 8px;
}
.challenge-project__progress-bar {
  width: 80px;
  height: 6px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}
.challenge-project__progress-fill {
  height: 100%;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: 4px;
  transition: width 0.4s ease;
}
.challenge-project__progress-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.challenge-project__del {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-lighter);
  font-size: 20px;
  transition: all var(--transition);
  margin-left: 8px;
}
.challenge-project__del:hover {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
}

/* 圆点网格 */
.challenge-dots {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(10, 30px);
  gap: 6px;
  justify-content: center;
}
.challenge-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.challenge-dot:hover {
  transform: scale(1.5);
  z-index: 1;
}
.challenge-dot--filled {
  background: var(--primary);
  box-shadow: 0 0 3px rgba(var(--c-shadow-rgb), 0.4);
}
.challenge-dot--filled:hover {
  transform: scale(1.5);
  filter: brightness(1.05);
  z-index: 1;
}
.challenge-dot--milestone {
  width: 34px;
  height: 34px;
  background: var(--primary-dark);
}
.challenge-dot--milestone.challenge-dot--filled {
  background: var(--primary);
  box-shadow: 0 0 4px rgba(var(--c-shadow-rgb), 0.5);
}

/* 项目底部 */
.challenge-project__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-top: 1px solid var(--border-light);
  background: var(--c-tint-3);
}
.challenge-project__hint {
  font-size: 15px;
  color: var(--text-light);
}
.challenge-project__reset {
  font-size: 15px;
  color: var(--text-lighter);
  padding: 4px 12px;
  border-radius: 6px;
  transition: all var(--transition);
}
.challenge-project__reset:hover {
  background: rgba(231, 76, 60, 0.08);
  color: #e74c3c;
}

/* 空状态 */
.challenge-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-lighter);
}
.challenge-empty__icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.challenge-empty__text {
  font-size: 16px;
  margin-bottom: 4px;
}
.challenge-empty__sub {
  font-size: 15px;
}

/* 完成庆祝 */
.challenge-project--completed .challenge-project__header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.challenge-project--completed .challenge-project__name {
  color: #fff;
}
.challenge-project--completed .challenge-project__stats {
  color: rgba(255,255,255,0.85);
}
.challenge-project--completed .challenge-project__progress-text {
  color: #fff;
}
.challenge-project--completed .challenge-project__progress-bar {
  background: rgba(255,255,255,0.3);
}

/* 响应式 */
@media (max-width: 768px) {
  .challenge-dots {
    grid-template-columns: repeat(10, 30px);
    gap: 4px;
    padding: 10px;
    padding: 12px;
  }
  .challenge-dot {
    font-size: 8px;
  }
  .challenge-add-section__row {
    flex-direction: column;
  }
  .challenge-add-section__btn {
    width: 100%;
  }
  .challenge-project__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ========== 饮食日详情全屏面板 ========== */
.diet-day-overlay {
  z-index: 1001;
  background: rgba(92, 94, 84, 0.3);
  backdrop-filter: blur(4px);
}

.diet-day-panel {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 720px;
  height: 100%;
  background: var(--c-bg1, #F5F7F2);
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
  border-radius: 0;
}

.diet-day-panel__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  padding-top: calc(16px + env(safe-area-inset-top));
  background: var(--card-bg, #FAFCF8);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.diet-day-panel__back {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--primary, #9CAF88);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s;
  white-space: nowrap;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.diet-day-panel__back:active {
  background: var(--primary-light, #EFF3EB);
}

.diet-day-panel__title {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  color: var(--text, #5C5E54);
  text-align: center;
}

.diet-day-panel__body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

/* 营养汇总卡片 */
.diet-day-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.diet-day-summary__card {
  background: var(--card-bg, #FAFCF8);
  border-radius: 10px;
  padding: 14px 8px;
  border: 1px solid var(--border, #E8ECE4);
  text-align: center;
}

.diet-day-summary__value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.diet-day-summary__value--cal { color: #D4B896; }
.diet-day-summary__value--protein { color: var(--primary, #9CAF88); }
.diet-day-summary__value--carb { color: #A0C4A8; }
.diet-day-summary__value--fat { color: #C4A098; }

.diet-day-summary__label {
  font-size: 13px;
  color: var(--text-light, #8B8E83);
  margin-top: 2px;
}

.diet-day-summary__unit {
  font-size: 11px;
  color: var(--text-light, #8B8E83);
}

/* 食物列表 */
.diet-day-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #5C5E54);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.diet-day-food-list {
  background: var(--card-bg, #FAFCF8);
  border-radius: 12px;
  border: 1px solid var(--border, #E8ECE4);
  overflow: hidden;
  margin-bottom: 20px;
}

.diet-day-food {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light, #F0F2EC);
  gap: 12px;
}

.diet-day-food:last-child {
  border-bottom: none;
}

.diet-day-food__info {
  flex: 1;
  min-width: 0;
}

.diet-day-food__name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text, #5C5E54);
}

.diet-day-food__amount {
  font-size: 13px;
  color: var(--text-light, #8B8E83);
  margin-top: 2px;
}

.diet-day-food__cal {
  text-align: right;
  flex-shrink: 0;
}

.diet-day-food__cal-num {
  font-size: 18px;
  font-weight: 700;
  color: #D4B896;
}

.diet-day-food__cal-unit {
  font-size: 11px;
  color: var(--text-light, #8B8E83);
}

.diet-day-food__pcf {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--text-light, #8B8E83);
  margin-top: 2px;
  justify-content: flex-end;
}

/* AI 点评区域 */
.diet-day-advice-section {
  margin-top: 8px;
}

.diet-day-advice-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary, #9CAF88), #8B9E76);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s;
  min-height: 48px;
}

.diet-day-advice-btn:active {
  opacity: 0.8;
}

.diet-day-advice-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.diet-day-advice-loading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: var(--text-light, #8B8E83);
  font-size: 15px;
}

.diet-day-advice-loading.show {
  display: flex;
}

.diet-day-advice-content {
  display: none;
  background: var(--card-bg, #FAFCF8);
  border-radius: 12px;
  border: 1px solid var(--border, #E8ECE4);
  border-left: 4px solid var(--primary, #9CAF88);
  padding: 18px 20px;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text, #5C5E54);
  white-space: pre-wrap;
}

.diet-day-advice-content.show {
  display: block;
}

.diet-day-advice-content__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary, #9CAF88);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.diet-day-no-body {
  background: #FFF8E8;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-light, #8B8E83);
  text-align: center;
  margin-top: 12px;
}

.diet-day-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light, #8B8E83);
  font-size: 16px;
}

/* ===== 补录饮食面板 ===== */
.diet-supplement-date {
  margin-bottom: 16px;
}
.diet-supplement-date__label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #5C5E54);
  margin-bottom: 10px;
}
.diet-supplement-date__row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.diet-supplement-date__quick {
  padding: 8px 18px;
  border: 1.5px solid var(--border, #D0D6CA);
  border-radius: 8px;
  background: var(--card-bg, #FFFFFF);
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #5C5E54);
  cursor: pointer;
  min-height: 44px;
  transition: all 0.2s;
  white-space: nowrap;
}
.diet-supplement-date__quick:hover {
  border-color: var(--primary, #9CAF88);
  color: var(--primary, #9CAF88);
}
.diet-supplement-date__quick.active {
  background: var(--primary, #9CAF88);
  border-color: var(--primary, #9CAF88);
  color: #fff;
}
.diet-supplement-date__picker {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid var(--border, #D0D6CA);
  border-radius: 8px;
  font-size: 15px;
  color: var(--text, #5C5E54);
  background: var(--card-bg, #FFFFFF);
  min-height: 44px;
  outline: none;
}
.diet-supplement-date__picker:focus {
  border-color: var(--primary, #9CAF88);
}

.diet-supplement-existing {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--card-bg, #FFFFFF);
  border-radius: 10px;
  border: 1px solid var(--border, #D0D6CA);
}
.diet-supplement-existing__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light, #8B8E83);
  margin-bottom: 10px;
}
.diet-supplement-existing__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.diet-supplement-existing__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--primary-light, #EFF3EB);
  border-radius: 8px;
  font-size: 14px;
}
.diet-supplement-existing__item-name {
  font-weight: 600;
  color: var(--text, #5C5E54);
}
.diet-supplement-existing__item-cal {
  color: var(--text-light, #8B8E83);
  font-size: 13px;
}

.diet-supplement-input {
  margin-top: 4px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .diet-day-panel {
    max-width: 100%;
  }
  .diet-day-panel__header {
    padding: 12px 14px;
    padding-top: calc(12px + env(safe-area-inset-top));
  }
  .diet-day-panel__body {
    padding: 14px 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .diet-day-summary {
    gap: 8px;
  }
  .diet-day-summary__card {
    padding: 12px 4px;
  }
  .diet-day-summary__value {
    font-size: 19px;
  }
  .diet-day-food {
    padding: 10px 12px;
  }
}

