/* ============================================================
   AURA 工作台 · 设计系统
   白色底色 + 黑绿撞色 + 圆角矩形 · iOS 质感
   ============================================================ */
:root {
  --green: #34C759;
  --green-ink: #1E8E3E;
  --green-soft: rgba(52, 199, 89, .13);
  --green-soft-2: rgba(52, 199, 89, .22);
  --green-border: rgba(52, 199, 89, .34);
  --green-glow: rgba(52, 199, 89, .45);
  --ink: #1D1D1F;
  --ink-2: #6E6E73;
  --ink-3: #A9A9AE;
  --bg: #F5F5F7;
  --card: #FFFFFF;
  --field: #F2F2F5;
  --line: rgba(0, 0, 0, .07);
  --hair: rgba(0, 0, 0, .05);
  --orange: #FF9F0A;
  --red: #FF3B30;
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
  --sh-card: 0 1px 2px rgba(16, 20, 24, .04), 0 10px 30px -12px rgba(16, 20, 24, .10);
  --sh-pop: 0 24px 70px -16px rgba(0, 0, 0, .30);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
b { font-weight: 700; }
::selection { background: var(--green-soft-2); }
* { scrollbar-width: thin; scrollbar-color: #D9D9DE transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #D9D9DE; border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 布局 ---------------- */
.app { display: flex; gap: 18px; max-width: 1400px; margin: 0 auto; padding: 18px; min-height: 100vh; }

.sidebar {
  width: 238px; flex: 0 0 238px;
  background: var(--card); border-radius: var(--r-lg);
  padding: 18px 14px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 18px; height: calc(100vh - 36px);
  box-shadow: var(--sh-card);
}
.brand { display: flex; gap: 12px; align-items: center; padding: 4px 8px 18px; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 14px; flex: 0 0 auto;
  background: var(--ink); color: var(--green);
  display: grid; place-items: center;
}
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: -.2px; }
.brand-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; position: relative;
  padding: 11px 12px; border-radius: 14px;
  color: var(--ink-2); font-weight: 600; font-size: 14.5px;
  transition: background .16s, color .16s, transform .16s;
}
.nav-item:hover { background: #F4F4F6; color: var(--ink); }
.nav-item.active {
  background: var(--ink); color: #fff;
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, .55);
}
.nav-item.active:hover { background: #000; }
.nav-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); position: absolute; right: 14px; opacity: 0;
  transition: opacity .16s;
}
.nav-item.active .nav-dot { opacity: 1; }

.sidebar-foot { margin-top: auto; }
.profile {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 16px; background: #F6F6F8; cursor: pointer;
  transition: background .16s;
}
.profile:hover { background: #EFEFF2; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto;
  background: var(--green-soft-2); display: grid; place-items: center; font-size: 19px;
}
.avatar-lg { width: 44px; height: 44px; font-size: 23px; }
.profile-meta { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.profile-name { font-size: 13.5px; font-weight: 700; }
.profile-sub { font-size: 11px; color: var(--ink-3); }

.main { flex: 1; min-width: 0; padding: 10px 8px 44px 4px; }
.view { animation: rise .38s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 移动端底部标签栏 */
.tabbar {
  display: none; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50;
  height: 64px; padding: 0 8px;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-radius: 22px; box-shadow: 0 12px 40px rgba(0, 0, 0, .16);
  justify-content: space-around; align-items: center;
}
.tab-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10.5px; font-weight: 600; color: var(--ink-3); width: 60px;
}
.tab-item.active { color: var(--ink); }
.tab-item.active .ic { color: var(--green); }

/* ---------------- 标题与分区 ---------------- */
.page-head { padding: 10px 6px 18px; }
.page-head.ph-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.h-title { font-size: 30px; font-weight: 800; letter-spacing: -.6px; }
.h-sub { color: var(--ink-2); font-size: 13.5px; margin-top: 4px; }
.section { margin-top: 16px; }
.sec-head { display: flex; align-items: baseline; gap: 10px; margin: 22px 4px 12px; }
.sec-head h2 { font-size: 17px; font-weight: 750; letter-spacing: -.2px; }
.sec-sub { font-size: 12.5px; color: var(--ink-3); }
.sec-label { font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .08em; margin: 20px 4px 8px; }
.sec-tools { display: flex; justify-content: space-between; align-items: center; margin: 0 4px 12px; }

/* ---------------- 卡片 ---------------- */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g-plan { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.g-goal { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card {
  background: var(--card); border-radius: var(--r-lg);
  padding: 20px; box-shadow: var(--sh-card);
}
.card.pad-lg { padding: 24px; }
.card-dark {
  background: linear-gradient(150deg, #1A1A1C, #0A0A0B);
  border-radius: 30px; color: #fff; position: relative; overflow: hidden;
  box-shadow: 0 18px 44px -18px rgba(0, 0, 0, .5);
}
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-title { font-size: 16.5px; font-weight: 750; letter-spacing: -.2px; }
.card-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.dim { color: var(--ink-3); }

.icon-tile {
  width: 40px; height: 40px; border-radius: 14px; flex: 0 0 auto;
  display: grid; place-items: center;
}
.t-green { background: var(--green); color: #fff; }
.t-black { background: var(--ink); color: #fff; }
.t-soft { background: var(--green-soft); color: var(--green-ink); }

/* ---------------- 按钮 / 胶囊 / 徽章 ---------------- */
.btn {
  height: 44px; padding: 0 20px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-weight: 650; font-size: 14.5px; white-space: nowrap;
  transition: transform .15s, box-shadow .15s, background .15s, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .5); }
.btn-primary:hover { background: #000; }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 12px 24px -10px var(--green-glow); }
.btn-ghost { background: #F2F2F4; color: var(--ink); }
.btn-ghost:hover { background: #EAEAEC; }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 10px; flex: 0 0 auto;
  display: grid; place-items: center; color: var(--ink-3);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: #F2F2F4; color: var(--ink); }
.link-btn { color: var(--green-ink); font-weight: 650; font-size: 13px; }
.link-btn:hover { text-decoration: underline; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3.5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 650; white-space: nowrap;
}
.chip-green { background: var(--green-soft); color: var(--green-ink); }
.chip-black { background: var(--ink); color: #fff; }
.chip-gray { background: #F0F0F2; color: var(--ink-2); }
.chip-outline { background: #fff; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.chip-warn { background: rgba(255, 159, 10, .16); color: #9A6400; }
.chip-bad { background: rgba(255, 59, 48, .12); color: #D70015; }

/* ---------------- 分段控制器 ---------------- */
.seg {
  display: flex; background: #EEEEF0; border-radius: 13px; padding: 3px; gap: 2px;
}
.seg button {
  flex: 1; padding: 8px 10px; border-radius: 10px;
  font-size: 13.5px; font-weight: 650; color: var(--ink-2);
  transition: background .16s, color .16s, box-shadow .16s; white-space: nowrap;
}
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .09); }
.seg-sm { display: inline-flex; width: auto; }
.seg-sm button { padding: 6px 14px; }

/* ---------------- 列表 ---------------- */
.list { background: #fff; border-radius: 20px; box-shadow: var(--sh-card); overflow: hidden; }
.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; position: relative; background: #fff;
}
.list-row:not(:first-child)::before {
  content: ''; position: absolute; left: 16px; right: 0; top: 0;
  height: 1px; background: var(--hair);
}
.list-row.col { flex-direction: column; align-items: stretch; gap: 10px; }
.chev { color: var(--ink-3); margin-left: auto; flex: 0 0 auto; display: grid; place-items: center; }
.t-main { min-width: 0; flex: 1; }
.t-title { font-size: 15px; font-weight: 650; letter-spacing: -.1px; }
.t-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 1px; }

/* ---------------- 表单 ---------------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 650; color: var(--ink-2); margin: 0 2px 6px; }
.field input, .field textarea, .field select {
  width: 100%; background: var(--field);
  border: 1.5px solid transparent; border-radius: 13px;
  padding: 11px 13px; font-size: 14.5px; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--green); background: #fff;
  box-shadow: 0 0 0 3.5px var(--green-soft);
}
.field textarea { resize: vertical; min-height: 76px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.mini-seg { display: flex; background: #EEEEF0; border-radius: 11px; padding: 3px; gap: 2px; }
.mini-seg button { flex: 1; padding: 7px 4px; border-radius: 8px; font-size: 13px; font-weight: 650; color: var(--ink-2); }
.mini-seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .09); }

/* iOS 开关 */
.switch {
  width: 50px; height: 30px; border-radius: 999px; background: #E9E9EB;
  position: relative; flex: 0 0 auto; transition: background .2s;
}
.switch i {
  position: absolute; top: 2px; left: 2px; width: 26px; height: 26px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
  transition: left .2s;
}
.switch.on { background: var(--green); }
.switch.on i { left: 22px; }

/* 进度条 */
.progress { height: 8px; border-radius: 999px; background: #EFEFF1; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 999px; background: var(--green); transition: width .4s cubic-bezier(.2, .8, .3, 1); }

/* ---------------- 首页 Hero ---------------- */
.hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 28px 30px; }
.hero::before {
  content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, var(--green-glow), transparent 62%);
  top: -180px; right: -90px; opacity: .55; filter: blur(6px); pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .07), transparent 65%);
  bottom: -160px; left: -60px; pointer-events: none;
}
.hero-main { position: relative; z-index: 1; }
.hero-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--green-soft-2); color: var(--green); border: 1px solid var(--green-border);
}
.hero-title { font-size: 30px; font-weight: 800; letter-spacing: -.5px; margin: 14px 0 6px; }
.hero-sub { color: rgba(255, 255, 255, .55); font-size: 14px; }
.hero-stats { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.hstat {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .13); color: #E8E8EA;
}
.hstat .ic { color: var(--green); }
.hero-avatar {
  width: 96px; height: 96px; border-radius: 32px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 46px;
  background: var(--green-soft-2); border: 1px solid var(--green-border);
  position: relative; z-index: 1;
}

.ov-card { cursor: pointer; transition: transform .18s, box-shadow .18s; }
.ov-card:hover { transform: translateY(-2px); box-shadow: 0 4px 6px rgba(16, 20, 24, .04), 0 18px 40px -14px rgba(16, 20, 24, .16); }
.ov-top { display: flex; align-items: center; justify-content: space-between; }
.ov-go { color: var(--ink-3); transition: color .18s, transform .18s; }
.ov-card:hover .ov-go { color: var(--ink); transform: translateX(2px); }
.ov-big { font-size: 19px; font-weight: 750; letter-spacing: -.3px; margin: 14px 0 4px; }
.ov-sub { font-size: 13px; color: var(--ink-2); }

.quick-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.q-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 999px; padding: 11px 18px;
  font-weight: 650; font-size: 13.5px; box-shadow: var(--sh-card);
  transition: transform .16s, box-shadow .16s;
}
.q-btn .ic { color: var(--green-ink); }
.q-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 8px rgba(16, 20, 24, .05), 0 16px 34px -14px rgba(16, 20, 24, .18); }

.quote-card { display: flex; align-items: flex-start; gap: 14px; margin-top: 16px; }
.quote-mark { font-family: Georgia, "Times New Roman", serif; font-size: 44px; line-height: .9; color: var(--green); }
.quote-text { font-size: 15.5px; font-weight: 650; letter-spacing: -.1px; }
.quote-sub { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

/* ---------------- 健身模块 ---------------- */
.ex-list { margin-top: 16px; display: flex; flex-direction: column; gap: 4px; }
.ex-row {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 10px; border-radius: 14px; cursor: pointer;
  transition: background .14s;
}
.ex-row:hover { background: #F7F7F9; }
.ex-check {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid #D7D7DC; display: grid; place-items: center; color: #fff;
  transition: background .16s, border-color .16s;
}
.ex-check .ic { opacity: 0; transform: scale(.5); transition: all .16s; }
.ex-row.done .ex-check { background: var(--green); border-color: var(--green); }
.ex-row.done .ex-check .ic { opacity: 1; transform: none; }
.ex-info { display: flex; flex-direction: column; }
.ex-info b { font-size: 14.5px; font-weight: 650; transition: color .16s; }
.ex-info span { font-size: 12px; color: var(--ink-2); }
.ex-row.done .ex-info b { color: var(--ink-3); text-decoration: line-through; }
.row-btns { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

.week-strip { display: flex; gap: 8px; }
.ws-cell {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 11px 0; border-radius: 14px; background: #F6F6F8;
  font-size: 12.5px; font-weight: 650; color: var(--ink-2);
  transition: background .15s;
}
.ws-cell.on { background: var(--ink); color: #fff; }
.ws-dot { width: 6px; height: 6px; border-radius: 50%; background: #DDDDDF; }
.ws-dot.has { background: var(--green); }

.plan-card { display: flex; flex-direction: column; gap: 10px; }
.plan-card.today { box-shadow: 0 1px 2px rgba(16, 20, 24, .04), 0 10px 30px -10px var(--green-glow); }
.plan-head { display: flex; align-items: center; justify-content: space-between; }
.plan-count { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.plan-title { font-size: 16.5px; font-weight: 750; letter-spacing: -.2px; }
.plan-items { flex: 1; display: flex; flex-direction: column; gap: 2px; min-height: 60px; }
.plan-items div { display: flex; justify-content: space-between; gap: 8px; font-size: 12.8px; color: var(--ink-2); }
.plan-items div span { color: var(--ink-3); flex: 0 0 auto; }
.plan-edit { align-self: stretch; justify-content: center; }

.diet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 14px; }
.meal {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px; background: #F8F8FA; border-radius: 16px;
}
.meal .icon-tile { width: 36px; height: 36px; border-radius: 12px; }
.meal b { font-size: 13.5px; }
.meal p { font-size: 13px; color: var(--ink-2); line-height: 1.5; margin-top: 2px; word-break: break-all; }
.day-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.dc {
  min-width: 42px; height: 38px; padding: 0 10px; border-radius: 12px;
  background: #F2F2F5; font-weight: 650; font-size: 13px; color: var(--ink-2);
  position: relative; transition: background .15s, color .15s;
}
.dc.on { background: var(--ink); color: #fff; }
.dc-today::after {
  content: ''; position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--green);
}

.goal-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.goal-top b { font-size: 15.5px; letter-spacing: -.2px; }
.goal-nums { display: flex; align-items: baseline; gap: 5px; margin: 12px 0 10px; }
.goal-nums > b { font-size: 30px; font-weight: 800; letter-spacing: -1px; }
.goal-nums .unit { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.goal-target { margin-left: auto; font-size: 12.5px; color: var(--ink-2); }
.goal-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.goal-foot > span:first-child { font-size: 12.5px; font-weight: 700; color: var(--green-ink); }
.goal-btns { margin-left: auto; display: flex; gap: 2px; }
.goal-btns .icon-btn:hover { color: var(--ink); }

.item-row { display: grid; grid-template-columns: 1fr 64px 88px 32px; gap: 8px; margin-bottom: 8px; }
.item-row input {
  background: var(--field); border: 1.5px solid transparent; border-radius: 11px;
  padding: 9px 11px; font-size: 13.5px; outline: none; min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
.item-row input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.item-row .icon-btn { align-self: center; }

/* ---------------- 打卡模块 ---------------- */
.ck-grid { grid-template-columns: 400px 1fr; align-items: start; }
.ck-left, .ck-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.punch-card { padding: 26px 28px; }
.punch-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; position: relative; z-index: 1; }
.punch-date { color: rgba(255, 255, 255, .55); font-size: 13px; font-weight: 600; }
.clock {
  font-size: 46px; font-weight: 800; letter-spacing: .5px; margin: 8px 0 6px;
  font-variant-numeric: tabular-nums; color: #fff;
}
.punch-rule { color: rgba(255, 255, 255, .45); font-size: 12px; }
.punch-btn {
  width: 152px; height: 152px; border-radius: 50%; flex: 0 0 auto;
  background: var(--green); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 18.5px; font-weight: 800; letter-spacing: 1px;
  border: 4px solid rgba(255, 255, 255, .14);
  box-shadow: 0 18px 44px -10px var(--green-glow), inset 0 -3px 0 rgba(0, 0, 0, .12);
  transition: transform .14s, box-shadow .14s;
}
.punch-btn:hover { box-shadow: 0 22px 52px -10px var(--green-glow), inset 0 -3px 0 rgba(0, 0, 0, .12); }
.punch-btn:active { transform: scale(.94); }
.punch-btn i { font-style: normal; font-size: 11px; font-weight: 600; opacity: .8; letter-spacing: 2px; }

.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: 0 0 auto; }
.rec-time { font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: .3px; min-width: 56px; }
.rec-del { margin-left: auto; }

.rep-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; }
.rep-nav b { font-size: 15px; font-weight: 750; }
.rep-back { text-align: center; margin-bottom: 10px; }
.rep-row .rep-date { width: 92px; flex: 0 0 auto; }
.rep-date b { display: block; font-size: 14px; }
.rep-date span { font-size: 11.5px; color: var(--ink-3); }
.rep-rec { flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rep-hours { width: 56px; flex: 0 0 auto; text-align: right; font-size: 13px; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rep-row .chip { flex: 0 0 auto; }
.rep-row[data-day] { cursor: pointer; }
.rep-row[data-day]:hover { background: #FAFAFB; }

.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.cal-head span { text-align: center; font-size: 11.5px; font-weight: 650; color: var(--ink-3); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-cell {
  min-height: 62px; border-radius: 14px; background: #F6F6F8;
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 8px 9px; transition: background .14s; text-align: left;
}
.cal-cell:hover { background: #EFEFF2; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--ink); }
.cal-cell > span { font-size: 13px; font-weight: 700; }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; background: #D8D8DC; }
.cal-dot.good { background: var(--green); }
.cal-dot.warn { background: var(--orange); }
.cal-dot.bad { background: var(--red); }
.cal-cell em { font-style: normal; font-size: 10.5px; color: var(--ink-3); font-weight: 650; font-variant-numeric: tabular-nums; }
.cal-cell.future { opacity: .45; }
.cal-blank { min-height: 62px; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; padding: 0 4px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.cal-legend i { width: 8px; height: 8px; border-radius: 50%; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 10px; margin-top: 14px; }
.stat { background: #F6F6F8; border-radius: 16px; padding: 12px 14px; }
.stat b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.4px; }
.stat span { font-size: 11.5px; color: var(--ink-2); font-weight: 600; }

.dm-status { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dm-hours { font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; }
.dm-add { display: flex; gap: 8px; margin-top: 12px; }
.dm-add input {
  flex: 1; background: var(--field); border: 1.5px solid transparent; border-radius: 12px;
  padding: 9px 12px; font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.dm-add input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }

/* ---------------- 计划模块 ---------------- */
.group { margin-bottom: 18px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 8px; }
.group-head b { font-size: 14px; font-weight: 750; }
.group-head span { font-size: 12px; color: var(--ink-3); font-weight: 600; }

.task { cursor: pointer; transition: background .14s; }
.task:hover { background: #FAFAFB; }
.tick {
  width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid #D7D7DC; display: grid; place-items: center; color: #fff;
  transition: background .16s, border-color .16s;
}
.tick .ic { opacity: 0; transform: scale(.5); transition: all .16s; }
.task.done .tick { background: var(--green); border-color: var(--green); }
.task.done .tick .ic { opacity: 1; transform: none; }
.task.done .t-title { color: var(--ink-3); text-decoration: line-through; }
.t-meta { display: flex; align-items: center; gap: 7px; margin-top: 4px; flex-wrap: wrap; }
.t-time {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums;
}
.t-detail {
  font-size: 12px; color: var(--ink-3); max-width: 340px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------------- 设置模块 ---------------- */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; align-items: start; }
.swatches { display: flex; gap: 10px; }
.swatch {
  width: 32px; height: 32px; border-radius: 50%; background: var(--sw);
  border: 2.5px solid #fff; box-shadow: 0 0 0 1.5px var(--line);
  transition: box-shadow .15s, transform .15s;
}
.swatch:hover { transform: scale(1.08); }
.swatch.on { box-shadow: 0 0 0 2.5px var(--ink); }
.rest-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.rc {
  min-width: 44px; height: 36px; padding: 0 10px; border-radius: 11px;
  background: #F2F2F5; font-size: 13px; font-weight: 650; color: var(--ink-2);
  transition: background .15s, color .15s;
}
.rc.on { background: var(--ink); color: #fff; }
.att-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.about { font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.about b { color: var(--ink); }
.av-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.av-opt {
  height: 46px; border-radius: 14px; background: #F4F4F6;
  display: grid; place-items: center; font-size: 22px;
  border: 2px solid transparent; transition: border-color .14s, background .14s;
}
.av-opt.on { border-color: var(--green); background: var(--green-soft); }

/* ---------------- 弹窗 ---------------- */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(24, 24, 28, .42);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fade .2s;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: var(--card); border-radius: 26px; width: 100%; max-width: 540px;
  max-height: min(86vh, 780px); display: flex; flex-direction: column;
  box-shadow: var(--sh-pop);
  animation: pop .3s cubic-bezier(.2, .9, .3, 1.1);
}
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(14px); } }
.modal-wide { max-width: 640px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 8px; }
.modal-title { font-size: 17.5px; font-weight: 750; letter-spacing: -.2px; }
.modal-body { padding: 8px 20px 16px; overflow: auto; }
.modal-foot { padding: 4px 20px 20px; display: flex; gap: 10px; }
.modal-foot .btn { flex: 1; }
.confirm-msg { color: var(--ink-2); font-size: 14px; padding: 4px 2px 10px; line-height: 1.65; }

/* ---------------- 轻提示 ---------------- */
#toast-root {
  position: fixed; left: 0; right: 0; bottom: 36px; z-index: 80;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.toast {
  background: rgba(20, 20, 22, .92); color: #fff;
  padding: 10px 18px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
  animation: toastIn .32s cubic-bezier(.2, .9, .3, 1.15);
}
.toast .ic { color: var(--green); }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .25s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.92); } }

/* ---------------- 空状态 ---------------- */
.empty { text-align: center; padding: 40px 20px; color: var(--ink-2); }
.empty .icon-tile { margin: 0 auto 14px; width: 48px; height: 48px; border-radius: 16px; }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.empty p { font-size: 13.5px; max-width: 320px; margin: 0 auto 14px; }
.empty-sm { padding: 16px; color: var(--ink-3); font-size: 13.5px; text-align: center; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .ck-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .app { padding: 0; }
  .sidebar { display: none; }
  .tabbar { display: flex; }
  .main { padding: 16px 16px calc(92px + env(safe-area-inset-bottom)); }
  .h-title { font-size: 25px; }
  .hero { flex-direction: column; align-items: flex-start; padding: 24px; }
  .hero-avatar { position: absolute; top: 22px; right: 22px; width: 64px; height: 64px; font-size: 30px; border-radius: 22px; }
  .hero-title { font-size: 24px; }
  .g2 { grid-template-columns: 1fr; }
  .diet-grid { grid-template-columns: 1fr; }
  .punch-inner { flex-direction: column; }
  .punch-btn { width: 138px; height: 138px; }
  .clock { font-size: 40px; }
  .card { padding: 17px; border-radius: 22px; }
  .card-dark { border-radius: 24px; }
  .cal-cell { min-height: 52px; padding: 6px; }
  .cal-cell em { display: none; }
  .cal-blank { min-height: 52px; }
  .overlay { padding: 0; align-items: flex-end; }
  .modal { border-radius: 26px 26px 0 0; max-width: 100%; max-height: 92vh; animation: sheet .32s cubic-bezier(.2, .9, .3, 1); }
  @keyframes sheet { from { transform: translateY(60px); opacity: 0; } }
}
