/* ===== 设计令牌（Lime Night 风格：深炭黑绿底 × 青柠亮绿 accent × 白字主体） ===== */
:root {
  --brand: #D3F34B;          /* 青柠亮绿：主按钮 / 进度 / 激活 */
  --brand-deep: #BFE43A;     /* 按压态：柠檬绿加深 */
  --brand-ink: #F2F5EF;      /* 标题 / 数字：近白 */
  --brand-ink-2: #2B2F2B;
  --brand-soft: #2C351D;     /* 徽章底 / 选中底：暗柠檬 */
  --brand-soft-2: #242B24;   /* 次级面板底 */
  --bg: #171C17;             /* 深炭黑绿页面底 */
  --card: #1F251F;           /* 卡片：深色浮起 */
  --text: #F2F5EF;
  --text-2: #C2CAC0;
  --muted: #8C968B;
  --border: #2E352E;
  --danger: #F0655E;
  --danger-soft: rgba(240, 101, 94, .14);
  --warn: #E8A23F;
  --warn-soft: rgba(232, 162, 63, .15);
  --info: #6FA8EE;
  --info-soft: rgba(111, 168, 238, .15);
  --ok: #9CD45E;
  --ok-soft: rgba(156, 212, 94, .14);
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 0 0 1px var(--ring), 0 10px 26px rgba(0, 0, 0, .35);
  --tabbar-h: 58px;
  /* 主题可切换层：深色为默认，html.theme-light 覆盖 */
  --surface-2: #232923;      /* 输入框 / tabbar 底 */
  --surface-3: #2A312A;      /* muted 徽章 / 进度槽 / 圆点 */
  --surface-4: #262D26;      /* ghost 按钮底 */
  --line-2: #3A423A;         /* 深一档的边线（勾选框/圆点边/禁用底） */
  --focus-bg: #1C231C;       /* 输入框聚焦背景 */
  --on-brand: #161B10;       /* 青柠底上的黑字 */
  --tabbar-fg: rgba(255, 255, 255, .55);
  --ring: rgba(255, 255, 255, .06); /* 深色组件的白色描边环 */
  --danger-strong: #FF9B94;  /* 提醒标题亮色变体 */
  --warn-strong: #F4C476;
  --stat-num: #D3F34B;       /* 统计数字强调色 */
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
}

body.no-scroll { overflow: hidden; }

h1, h2, h3, p { margin: 0; }
button { font-family: inherit; font-size: inherit; color: inherit; border: none; background: none; cursor: pointer; }
input, select, textarea { font-family: inherit; }
.hidden { display: none !important; }
img { -webkit-user-drag: none; }

/* ===== 启动遮罩 ===== */
.boot {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(165deg, #0E110E 0%, #161616 52%, #2E352E 100%);
  color: #fff;
}
.boot__logo {
  width: 88px; height: 88px;
  display: grid; place-items: center;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
  overflow: hidden;
}
.boot__logo img { width: 72px; height: 72px; object-fit: contain; }
.boot__text { font-size: 13px; opacity: .85; letter-spacing: 1px; }

.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 登录 ===== */
.auth {
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(env(safe-area-inset-top) + 30px) 20px calc(env(safe-area-inset-bottom) + 28px);
  background: linear-gradient(180deg, #0E110E 0%, #161616 36%, var(--bg) 36.2%);
}
.auth__brand { text-align: center; color: #fff; padding-bottom: 24px; }
.auth__logo {
  width: 84px; height: 84px; margin: 0 auto 14px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .3);
  overflow: hidden;
}
.auth__logo img { width: 68px; height: 68px; object-fit: contain; }
.auth__brand h1 { font-size: 21px; font-weight: 700; letter-spacing: 1px; }
.auth__brand p { font-size: 12.5px; opacity: .75; margin-top: 6px; letter-spacing: .5px; }

.auth__card {
  background: var(--card);
  border-radius: 18px;
  padding: 22px 18px 18px;
  box-shadow: 0 14px 34px rgba(10, 12, 10, .16);
}
.auth__title { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.auth__tip { margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.6; }

.link {
  color: var(--muted);
  font-size: 13px;
  padding: 2px 4px;
  text-decoration: none;
}

/* ===== 应用外壳 ===== */
/* 高度由 app.js 用 innerHeight 实测写入 --app-h：
   iOS standalone(添加到主屏幕) 下 100dvh 有残留 bug，会导致 fixed 导航悬空。
   tabbar 走流内 flex 贴底，FAB/toast 用 absolute 相对 .app，彻底免疫视口 bug。 */
.app {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: var(--app-h, 100dvh);
  overflow: hidden;
}
.main {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 74px);
}

.loading {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 80px 0; color: var(--muted); font-size: 13px;
}
.loading .spinner { border-color: var(--border); border-top-color: var(--brand); }

/* ===== 底部导航（流内贴底 + 青柠激活块） ===== */
.tabbar {
  position: relative;
  flex: none;
  z-index: 30;
  display: flex;
  border-radius: 14px 14px 0 0;
  background: var(--surface-2);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, .45), 0 0 0 1px var(--ring);
  padding-bottom: env(safe-area-inset-bottom);
  overflow: hidden;
}
.tabbar__item {
  position: relative;
  flex: 1;
  height: var(--tabbar-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 10px;
  color: var(--tabbar-fg);
  transition: color .16s;
}
.tabbar__item > * { position: relative; z-index: 1; }
.tabbar__item .icon { width: 21px; height: 21px; }
.tabbar__item.is-active { color: var(--on-brand); font-weight: 700; }
.tabbar__item.is-active::before {
  content: '';
  position: absolute;
  inset: 6px 7px;
  border-radius: 18px;
  background: var(--brand);
  box-shadow: 0 2px 8px rgba(120, 140, 40, .22);
}

/* ===== 页面通用 ===== */
.view {
  padding: calc(env(safe-area-inset-top) + 14px) 14px 8px;
}
.view--home { padding-top: calc(env(safe-area-inset-top) + 10px); }

.page-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 2px;
}
.page-head h1 { font-size: 24px; font-weight: 700; letter-spacing: .2px; color: var(--brand-ink); }
.page-head__count { font-size: 12.5px; color: var(--muted); }

/* 概览顶部紧凑条：左（日期+概況） + 右（提醒铃铛） */
.home-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 10px;
}
.home-head__left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.home-head__date { font-size: 21px; font-weight: 700; color: var(--brand-ink); letter-spacing: .3px; }
.home-head__sub { font-size: 12px; color: var(--muted); }
.bell {
  position: relative;
  flex: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 19px;
  display: grid; place-items: center;
  transition: transform .12s;
}
.bell:active { transform: scale(.92); }
.bell__icon { display: grid; place-items: center; color: var(--text-2); }
.bell__icon .icon { width: 21px; height: 21px; }
.bell--on { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn-soft); }
.bell--on .bell__icon { color: var(--warn); }
.bell__badge {
  position: absolute;
  top: -5px; right: -5px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: var(--on-brand);
  font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center;
}

.block { margin-bottom: 16px; }
.block__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 2px;
}
.block__head h2 { font-size: 14.5px; font-weight: 700; color: var(--brand-ink); }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 18px 0 10px;
}
.section-head h3 { font-size: 14px; font-weight: 700; }

/* ===== 提醒区（逾期 / 临期） ===== */
.remind {
  display: flex; flex-direction: column; gap: 7px;
  margin-bottom: 14px;
}
.remind__item {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  text-align: left;
}
.remind__item i {
  flex: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-style: normal;
  font-size: 12px; font-weight: 700;
}
.remind__item--danger { background: var(--danger-soft); }
.remind__item--danger i { background: var(--danger); color: var(--on-brand); }
.remind__item--danger .remind__title { color: var(--danger-strong); }
.remind__item--warn { background: var(--warn-soft); }
.remind__item--warn i { background: var(--warn); color: var(--on-brand); font-size: 10px; }
.remind__item--warn .remind__title { color: var(--warn-strong); }
.remind__title {
  flex: 1; min-width: 0;
  font-size: 13.5px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.remind__meta { flex: none; font-size: 11px; color: var(--muted); }

/* ===== 统计条（一行三格，紧凑） ===== */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.stat-strip__item {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 9px 6px 8px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-strip__item b {
  display: block;
  font-size: 20px; font-weight: 700; line-height: 1.2;
  color: var(--stat-num);
}
.stat-strip__item b.text-danger { color: var(--danger); }
.stat-strip__item span { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }

/* ===== 统计卡（我的页用） ===== */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px; }
.stat {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.stat__value { font-size: 22px; font-weight: 700; line-height: 1.15; }
.stat__label { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.stat__hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.stat--brand .stat__value { color: var(--brand-ink); }
.stat--info .stat__value { color: var(--info); }
.stat--danger .stat__value { color: var(--danger); }
.stat--warn .stat__value { color: var(--warn); }
.stat--ok .stat__value { color: var(--ok); }

/* ===== 卡片 ===== */
.list { display: flex; flex-direction: column; gap: 8px; }
.list--tight { gap: 7px; }
.card {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  box-shadow: var(--shadow);
}
.card--slim { padding: 10px 13px; }
.card--tap:active { transform: scale(.985); transition: transform .1s; }
.card__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card__title { font-size: 14.5px; font-weight: 700; line-height: 1.4; color: var(--text); }
.card__sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.card__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px;
  font-size: 11px; color: var(--muted); margin-top: 6px;
}
.card__line .progress { margin-top: 8px; }
.card.is-done { opacity: .55; }

.text-danger { color: var(--danger); }
.text-warn { color: var(--warn); }
.text-muted { color: var(--muted); }

/* ===== 徽章 ===== */
.badge {
  display: inline-flex; align-items: center;
  padding: 1.5px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  flex: none;
}
.badge--brand { background: var(--brand-soft); color: var(--brand); }
.badge--info { background: var(--info-soft); color: var(--info); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--muted { background: var(--surface-3); color: var(--muted); }

/* ===== 进度条 ===== */
.progress {
  height: 6px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}
.progress__bar {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-deep));
  transition: width .35s ease;
}

/* ===== 筛选 chips ===== */
.chips {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 0 14px 12px;
  margin: 0 -14px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px;
  white-space: nowrap;
}
.chip.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
}

/* ===== 任务卡（紧凑两行） ===== */
.task { padding: 10px 12px; }
.task__row { display: flex; gap: 10px; align-items: center; }
.task__main { flex: 1; min-width: 0; }
.task__line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.task__line .card__title {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.task__due { flex: none; font-size: 11px; font-weight: 700; }
.check {
  flex: none;
  width: 21px; height: 21px;
  border-radius: 50%;
  border: 1.8px solid var(--border);
  display: grid; place-items: center;
  font-size: 11.5px; line-height: 1;
  color: #fff;
  transition: .16s;
}
.check--muted { border-color: var(--line-2); }
.check--info { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.check--ok { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }
.task .card__sub { margin-top: 3px; }
.task .badge { font-size: 10px; padding: 1px 6px; }

/* ===== 空态 / 提示 ===== */
.empty {
  text-align: center;
  padding: 38px 20px;
  color: var(--muted);
}
.empty__icon { font-size: 28px; opacity: .32; }
.empty__title { font-size: 14px; color: var(--text-2); margin-top: 8px; font-weight: 600; }
.empty__hint { font-size: 12.5px; margin: 6px 0 16px; line-height: 1.6; }

.hint-box {
  background: #242B24;
  border-radius: var(--radius-sm);
  padding: 13px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

/* ===== 悬浮按钮（青柠圆钮 + 线性图标，相对 .app 定位，免疫视口 bug） ===== */
.fab {
  position: absolute;
  right: 18px;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 6px);
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(120, 140, 40, .28);
  z-index: 20;
}
.fab .icon { width: 26px; height: 26px; }
.fab:active { transform: scale(.92); background: var(--brand-deep); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 700;
  transition: .16s;
}
.btn--block { width: 100%; }
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:active { background: var(--brand-deep); }
.btn--primary[disabled] { background: var(--line-2); color: var(--muted); }
.btn--ghost { background: var(--surface-4); color: var(--text-2); }
.btn--danger { background: var(--danger); color: var(--on-brand); }
.btn--danger-ghost { background: var(--danger-soft); color: var(--danger); }
.btn--sm { padding: 9px 16px; font-size: 13px; }
.btn[disabled] { opacity: .6; }

/* ===== 表单 ===== */
.form { display: flex; flex-direction: column; gap: 13px; }
.field { display: block; }
.field__label {
  display: block;
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 6px;
  font-weight: 600;
}
.field__label i { color: var(--danger); font-style: normal; margin-left: 2px; }
.field__input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 16px; /* 避免 iOS 聚焦时自动放大 */
  outline: none;
  transition: border-color .16s, background .16s;
  appearance: none;
}
.field__input:focus { border-color: var(--brand); background: var(--focus-bg); }
.field__input--area { resize: vertical; min-height: 74px; line-height: 1.5; }
select.field__input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238C948C' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-actions { margin-top: 4px; }
.form-actions--split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }

/* ===== 底部弹层 ===== */
.sheet-mask {
  position: fixed; inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, .62);
  display: flex; align-items: flex-end;
  padding: 12px;
  opacity: 0;
  transition: opacity .22s;
}
.sheet-mask.is-in { opacity: 1; }
/* 居中弹出模式（表单类） */
.sheet-mask--modal { align-items: center; padding: 20px 16px; }
.sheet--modal {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  max-height: 84vh;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5), 0 0 0 1px var(--ring);
}
.sheet {
  width: 100%;
  max-height: 88vh;
  background: var(--card);
  border-radius: 18px;
  display: flex; flex-direction: column;
  transform: translateY(14px);
  transition: transform .26s cubic-bezier(.22, .8, .3, 1);
}
.sheet-mask.is-in .sheet { transform: translateY(0); }
.sheet__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 10px;
  flex: none;
}
.sheet__title { font-size: 16px; font-weight: 700; color: var(--brand-ink); }
.sheet__close {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 19px;
  line-height: 1;
  display: grid; place-items: center;
}
.sheet__body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 18px 22px;
}

.confirm__msg { font-size: 14px; color: var(--text-2); line-height: 1.65; }
.confirm__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }

/* ===== 项目详情 ===== */
.detail__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 18px; font-weight: 700; margin-bottom: 14px; color: var(--brand-ink);
}
.detail__meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  background: var(--brand-soft-2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.detail__meta span { display: block; font-size: 11.5px; color: var(--muted); }
.detail__meta b { font-size: 13px; font-weight: 600; word-break: break-all; }
.detail__progress {
  margin-top: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.detail__progress-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; }
.detail__desc {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
  background: var(--brand-soft-2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  white-space: pre-wrap;
}

.timeline { display: flex; flex-direction: column; }
.timeline__item { display: flex; align-items: center; gap: 11px; padding: 9px 0; }
.timeline__item + .timeline__item { border-top: 1px dashed var(--border); }
.dot {
  flex: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 2px solid var(--line-2);
}
.dot--info { background: var(--brand-soft); border-color: var(--brand); }
.dot--ok { background: var(--brand); border-color: var(--brand); }
.timeline__body { flex: 1; min-width: 0; }
.timeline__title { font-size: 13.5px; font-weight: 600; }
.timeline__meta { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.icon-btn {
  flex: none;
  font-size: 12px;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-4);
}

/* ===== 周报 ===== */
.report__text {
  margin: 0 0 14px;
  padding: 14px;
  background: var(--brand-soft-2);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  color: var(--text-2);
  max-height: 52vh;
  overflow-y: auto;
}

/* ===== 我的 ===== */
.profile-card { display: flex; align-items: center; gap: 14px; padding: 15px; }
.avatar {
  width: 52px; height: 52px; flex: none;
  border-radius: 18px;
  background: var(--brand);
  color: var(--on-brand);
  display: grid; place-items: center;
  font-size: 22px; font-weight: 700;
}
.profile-card__name { font-size: 16.5px; font-weight: 700; color: var(--brand-ink); }
.profile-card__email { font-size: 12.5px; color: var(--muted); margin-top: 3px; word-break: break-all; }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 13px 6px;
  box-shadow: var(--shadow);
}
.metrics--three { grid-template-columns: repeat(3, 1fr); }
.metric { text-align: center; }
.metric span { display: block; font-size: 11.5px; color: var(--muted); }
.metric b { font-size: 18px; font-weight: 700; color: var(--brand-ink); }

.menu {
  background: var(--card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.menu__item {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  font-size: 14.5px;
  text-align: left;
}
.menu__item + .menu__item { border-top: 1px solid var(--border); }
.menu__item:active { background: var(--surface-4); }
.menu__item i { color: #4A524A; font-style: normal; font-size: 17px; }
.menu__item--danger span { color: var(--danger); }

.brand-foot { text-align: center; margin-top: 26px; }
.brand-foot img { height: 34px; width: auto; opacity: .9; }
.footnote { text-align: center; font-size: 11.5px; color: var(--muted); margin: 10px 0 8px; }

/* ===== 轻提示 ===== */
#toast-root {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 68px);
  z-index: 70;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
  padding: 0 24px;
}
.toast {
  max-width: 100%;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(242, 245, 239, .96);
  color: var(--on-brand);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .22s, transform .22s;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}
.toast.is-in { opacity: 1; transform: translateY(0); }
.toast--error { background: rgba(240, 101, 94, .96); color: #fff; }
.toast--ok { background: rgba(211, 243, 75, .96); color: var(--on-brand); }

/* 登录页轻提示（.app 隐藏时启用，fixed 兜底） */
#toast-root-float {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 90px);
  z-index: 70;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
  padding: 0 24px;
}

/* ===== 窄屏适配 ===== */
@media (max-width: 340px) {
  .field-grid { grid-template-columns: 1fr; }
  .stat-strip { gap: 6px; }
  .stat-strip__item b { font-size: 18px; }
}

/* ===== 快捷记任务（语音/打字 + 智能解析） ===== */

/* 麦克风入口：悬浮在主 + 按钮上方，深色底 + 青柠图标，与主按钮区分 */
.fab--mic {
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 74px);
  background: #242B24;
  color: var(--brand);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .40), 0 0 0 1px var(--ring);
}
.fab--mic .icon { width: 24px; height: 24px; }
.fab--mic:active { background: #2C351D; transform: scale(.92); color: var(--brand); }

.quick__input { min-height: 92px; line-height: 1.6; font-size: 16px; }

.quick__mic-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
}
.quick__mic {
  flex: none;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid; place-items: center;
  transition: .16s;
}
.quick__mic .icon { width: 22px; height: 22px; }
.quick__mic:active { background: #3A4726; }
.quick__mic.is-listening {
  background: var(--danger);
  color: var(--on-brand);
  animation: quick-pulse 1.1s ease-in-out infinite;
}
.quick__mic-hint { font-size: 12.5px; color: var(--muted); }

@keyframes quick-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(180, 50, 50, .35); }
  50% { box-shadow: 0 0 0 8px rgba(180, 50, 50, 0); }
}

.quick__preview {
  margin-top: 6px;
  padding: 14px;
  border: 1.5px dashed var(--brand-deep);
  border-radius: var(--radius-sm);
  background: var(--brand-soft-2);
  display: flex; flex-direction: column; gap: 13px;
}
.quick__preview-head {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: .3px;
}
.quick__preview .field__input { background: var(--focus-bg); }


/* ===== 设置：浅色主题（html.theme-light 覆盖变量） ===== */
html.theme-light {
  --bg: #F1F4EA;
  --card: #FFFFFF;
  --text: #1C211C;
  --text-2: #4B534B;
  --muted: #8A928A;
  --border: #E3E7DB;
  --brand-ink: #232A12;
  --brand-soft: #F0F7D0;
  --brand-soft-2: #F4F6EC;
  --surface-2: #FFFFFF;
  --surface-3: #EDEFE2;
  --surface-4: #EFF2E4;
  --line-2: #CDD3C2;
  --focus-bg: #FBFCF5;
  --tabbar-fg: #9AA296;
  --ring: rgba(0, 0, 0, .05);
  --danger: #D64545;
  --danger-soft: rgba(214, 69, 69, .12);
  --danger-strong: #A93333;
  --warn: #C9821F;
  --warn-soft: rgba(201, 130, 31, .14);
  --warn-strong: #8F5F14;
  --stat-num: #2A3A10;
  --info: #3B7DD8;
  --info-soft: rgba(59, 125, 216, .12);
  --ok: #4C8A1D;
  --ok-soft: rgba(76, 138, 29, .14);
  --shadow: 0 0 0 1px rgba(0, 0, 0, .04), 0 10px 26px rgba(40, 50, 30, .08);
}
html.theme-light .auth { background: linear-gradient(180deg, #E7EDDA 0%, #F1F4EA 36%, var(--bg) 36.2%); }
html.theme-light .auth__brand { color: #2A3320; }
html.theme-light .auth__card { box-shadow: 0 14px 34px rgba(40, 50, 20, .10); }
html.theme-light .toast { background: rgba(28, 33, 28, .94); color: #F2F5EF; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
html.theme-light .toast--error { background: rgba(214, 69, 69, .96); color: #fff; }
html.theme-light .toast--ok { background: var(--brand); color: var(--on-brand); }
html.theme-light .fab--mic { background: #FFFFFF; color: #2A3320; box-shadow: 0 10px 24px rgba(0, 0, 0, .14), 0 0 0 1px var(--ring); }
html.theme-light .tabbar { box-shadow: 0 -8px 24px rgba(40, 50, 30, .16), 0 0 0 1px var(--ring); }
html.theme-light .tabbar__item.is-active::before { box-shadow: 0 2px 8px rgba(140, 170, 30, .22); }

/* ===== 设置：字体大小三档 ===== */
html.font-s body { font-size: 13.5px; }
html.font-s .page-head h1 { font-size: 21px; }
html.font-s .block__head h2 { font-size: 13px; }
html.font-s .stat-strip__item b { font-size: 17px; }
html.font-s .metric b { font-size: 16px; }
html.font-s .btn { font-size: 13px; }
html.font-s .field__input { font-size: 15px; }
html.font-s .sheet__title { font-size: 14.5px; }
html.font-s .profile-card__name { font-size: 15px; }
html.font-s .tabbar__item { font-size: 9.5px; }
html.font-l body { font-size: 16.5px; }
html.font-l .page-head h1 { font-size: 26px; }
html.font-l .block__head h2 { font-size: 16px; }
html.font-l .stat-strip__item b { font-size: 22px; }
html.font-l .metric b { font-size: 20px; }
html.font-l .btn { font-size: 15.5px; }
html.font-l .field__input { font-size: 17px; }
html.font-l .sheet__title { font-size: 17.5px; }
html.font-l .profile-card__name { font-size: 18px; }
html.font-l .tabbar__item { font-size: 11.5px; }

/* ===== 设置卡片（我的页） ===== */
.setting-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
}
.setting-row + .setting-row { border-top: 1px solid var(--border); }
.setting-row__label { font-size: 14px; font-weight: 600; color: var(--text); }
.seg {
  display: flex; gap: 2px;
  background: var(--surface-3);
  border-radius: 999px;
  padding: 3px;
}
.seg__btn {
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-2);
  background: transparent;
  transition: .16s;
}
.seg__btn.is-active { background: var(--brand); color: var(--on-brand); font-weight: 700; }

/* ============ Vibe 动效升级 ============ */

/* 页面切换：淡入 + 上移 */
.view { animation: view-in .34s cubic-bezier(.22, .8, .3, 1); }
@keyframes view-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* 列表逐条入场（stagger） */
.list > * { animation: item-in .38s cubic-bezier(.22, .8, .3, 1) backwards; }
.list > *:nth-child(1) { animation-delay: .02s; }
.list > *:nth-child(2) { animation-delay: .07s; }
.list > *:nth-child(3) { animation-delay: .12s; }
.list > *:nth-child(4) { animation-delay: .17s; }
.list > *:nth-child(5) { animation-delay: .22s; }
.list > *:nth-child(6) { animation-delay: .27s; }
.list > *:nth-child(7) { animation-delay: .32s; }
.list > *:nth-child(8) { animation-delay: .37s; }
@keyframes item-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* 进度条从左生长 */
.progress__bar { animation: progress-grow .7s cubic-bezier(.22, .8, .3, 1); }
@keyframes progress-grow { from { width: 0; } }

/* 悬浮按钮弹入 */
.fab { animation: fab-in .42s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes fab-in {
  from { opacity: 0; transform: scale(.5); }
  to { opacity: 1; transform: scale(1); }
}

/* 底部导航激活块弹入 */
.tabbar__item.is-active::before { animation: seg-pop .3s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes seg-pop {
  from { transform: scale(.7); opacity: .4; }
  to { transform: scale(1); opacity: 1; }
}

/* 空态图标轻微浮动 */
.empty__icon { animation: float-y 2.8s ease-in-out infinite; }
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* 铃铛有提醒时轻微摆动提醒 */
.bell--on .bell__icon { animation: bell-ring 3.2s ease-in-out infinite; }
@keyframes bell-ring {
  0%, 72%, 100% { transform: rotate(0); }
  76% { transform: rotate(12deg); }
  82% { transform: rotate(-9deg); }
  88% { transform: rotate(6deg); }
  94% { transform: rotate(-3deg); }
}

/* 任务勾选按钮按压反馈 */
.check { transition: transform .15s ease, background .15s ease; }
.check:active { transform: scale(.78); }

/* 卡片统一按压反馈 */
.card--tap { transition: transform .16s ease, box-shadow .22s ease; }
.card--tap:active { transform: scale(.98); box-shadow: 0 6px 18px rgba(0, 0, 0, .28), 0 0 0 1px var(--ring); }

/* 已完成任务：标题划线淡化 */
.task.is-done .card__title { text-decoration: line-through; opacity: .55; transition: .25s; }

/* 弹层遮罩柔化 */
.sheet-mask { backdrop-filter: blur(3px); }
.sheet { transition: transform .36s cubic-bezier(.22, .9, .3, 1); }

/* ============ 骨架屏（加载态） ============ */
.loading-skeleton { padding: 16px 16px 40px; display: flex; flex-direction: column; gap: 12px; }
.sk {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-4) 50%, var(--surface-3) 75%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes sk-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
.sk--head { height: 22px; width: 46%; }
.sk--stat { height: 70px; }
.sk--card { height: 92px; }

/* 无障碍：减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .view, .list > *, .progress__bar, .fab, .tabbar__item.is-active::before,
  .empty__icon, .bell--on .bell__icon, .sk { animation: none !important; }
}
