/* =====================================================================
   掌萌宠物 · 设计系统 v3
   风格：温暖奶油系 + 软渐变 + 大圆角 + 暖阴影
   ===================================================================== */

:root {
  /* ---- 色彩：奶油底 ---- */
  --bg: #FFF8F0;
  --bg-2: #FFFBF5;
  --bg-warm: linear-gradient(180deg, #FFF1E2 0%, #FFF8F0 60%);
  --surface: #FFFFFF;
  --surface-2: #FFFBF5;

  /* ---- 品牌色：暖橙 ---- */
  --brand: #FF7A45;
  --brand-deep: #E85A2A;
  --brand-darker: #C2410C;
  --brand-50:  #FFF1E6;
  --brand-100: #FFE3CC;
  --brand-200: #FFCBA8;
  --brand-300: #FFB07A;
  --brand-400: #FF9560;
  --brand-500: #FF8E5C;
  --brand-600: #FF7A45;
  --brand-700: #E85A2A;
  --brand-grad: linear-gradient(135deg, #FF9560 0%, #FF7A45 50%, #FF6B6B 100%);
  --brand-grad-soft: linear-gradient(135deg, #FFE3CC 0%, #FFCFA8 100%);

  /* ---- 强调色 ---- */
  --accent-feed:    #16A34A;
  --accent-walk:    #FF7A45;
  --accent-weight:  #8B5CF6;
  --accent-sleep:   #6366F1;
  --accent-vaccine: #0891B2;
  --accent-deworm:  #D97706;
  --accent-medicine:#DB2777;
  --accent-checkup: #2563EB;
  --accent-bath:    #0284C7;
  --accent-note:    #64748B;

  /* ---- 文字：暖深棕 ---- */
  --ink:   #2B1F14;
  --ink-2: #5C4632;
  --ink-3: #9C836B;
  --ink-4: #C7B19A;

  /* ---- 边线：暖灰 ---- */
  --line:      #F0E4D2;
  --line-warm: #FFE3CC;
  --line-soft: #FAF1E3;

  /* ---- 语义 ---- */
  --success: #16A34A;
  --success-bg: #DCFCE7;
  --warning: #F59E0B;
  --warning-bg: #FEF3C7;
  --danger:  #DC2626;
  --danger-bg: #FEE2E2;
  --info:    #3B82F6;
  --info-bg: #DBEAFE;

  /* ---- 圆角 ---- */
  --r-xs: 8px;
  --r-sm: 12px;
  --r:    16px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-2xl: 32px;
  --r-full: 999px;

  /* ---- 阴影：暖色多层 ---- */
  --sh-xs: 0 1px 2px rgba(180, 90, 30, 0.06);
  --sh-sm: 0 2px 8px rgba(180, 90, 30, 0.06), 0 1px 2px rgba(180, 90, 30, 0.04);
  --sh:    0 4px 16px rgba(180, 90, 30, 0.08), 0 1px 3px rgba(180, 90, 30, 0.04);
  --sh-lg: 0 12px 32px rgba(180, 90, 30, 0.10), 0 2px 6px rgba(180, 90, 30, 0.05);
  --sh-xl: 0 24px 48px rgba(180, 90, 30, 0.14), 0 4px 12px rgba(180, 90, 30, 0.06);
  --sh-fab:0 8px 24px rgba(255, 122, 69, 0.36), 0 2px 6px rgba(255, 122, 69, 0.20);

  /* ---- 间距：8 倍 ---- */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-7: 32px; --s-8: 40px; --s-9: 48px; --s-10: 64px;

  /* ---- 字号 ---- */
  --fs-xs: 11px; --fs-sm: 12px; --fs-md: 13px; --fs-base: 14px;
  --fs-lg: 16px; --fs-xl: 18px; --fs-2xl: 20px; --fs-3xl: 24px;
  --fs-4xl: 28px; --fs-5xl: 36px; --fs-6xl: 44px;

  /* ---- 按钮高 ---- */
  --btn-h: 48px;
  --btn-h-lg: 56px;
  --tap: 44px;
}

/* ---- 容器查询 ---- */
.phone { container-type: inline-size; container-name: phone; }

/* =====================================================================
   1. 基础
   ===================================================================== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: var(--fs-base);
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, #FFE9D2 0%, transparent 40%),
    radial-gradient(circle at 100% 100%, #FFE3D2 0%, transparent 40%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; border: 0; background: transparent; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }

/* =====================================================================
   2. 展示台
   ===================================================================== */
.stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.stage-bar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 248, 240, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding: var(--s-3) var(--s-5);
  display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap;
}
.stage-title { font-size: var(--fs-xl); font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: var(--s-2); }
.stage-title .badge { font-size: var(--fs-sm); padding: 2px 8px; background: var(--brand-grad); color: #fff; border-radius: var(--r-full); font-weight: 600; }
.stage-tools { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin-left: auto; }
.tool-group { display: flex; gap: var(--s-1); background: var(--surface); border: 1px solid var(--line); padding: 3px; border-radius: var(--r-full); box-shadow: var(--sh-xs); }
.tool-btn { padding: 6px 12px; border-radius: var(--r-full); font-size: var(--fs-sm); color: var(--ink-2); white-space: nowrap; transition: all .15s; }
.tool-btn[aria-selected="true"] { background: var(--brand); color: #fff; box-shadow: var(--sh-xs); }
.tool-btn:hover:not([aria-selected="true"]) { background: var(--bg-2); color: var(--ink); }

.stage-body {
  flex: 1; display: flex; align-items: stretch; gap: 0;
  min-height: 0;
}
.device-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: var(--s-5); min-width: 0;
}
.device {
  background: var(--surface);
  border-radius: var(--r-2xl);
  box-shadow: var(--sh-xl);
  overflow: hidden;
  position: relative;
  display: flex; flex-direction: column;
  transition: width .3s, height .3s;
}
.device[data-size="phone"]    { width: 390px; height: 844px; }
.device[data-size="tablet"]   { width: 834px; height: 1180px; }
.device[data-size="foldable"] { width: 1100px; height: 760px; }

.side {
  width: 320px; flex: 0 0 320px;
  background: var(--surface);
  border-left: 1px solid var(--line);
  padding: var(--s-5);
  overflow-y: auto;
  display: none;
}
@media (min-width: 1100px) { .side { display: block; } }
.side h3 { font-size: var(--fs-lg); font-weight: 700; margin-bottom: var(--s-3); display: flex; align-items: center; gap: var(--s-2); }
.side h4 { font-size: var(--fs-md); font-weight: 600; color: var(--ink-2); margin: var(--s-4) 0 var(--s-2); }
.side p, .side li { font-size: var(--fs-md); color: var(--ink-2); line-height: 1.7; }
.side ul { padding-left: 18px; margin: 0; }
.side code { background: var(--bg-2); padding: 1px 6px; border-radius: var(--r-xs); font-size: var(--fs-sm); color: var(--brand-darker); }
.side .pill { display: inline-block; padding: 2px 8px; border-radius: var(--r-full); background: var(--brand-100); color: var(--brand-darker); font-size: var(--fs-sm); font-weight: 600; }

/* =====================================================================
   3. 应用骨架
   ===================================================================== */
.app {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  background: var(--bg);
  container-type: inline-size; container-name: app;
  overflow: hidden;
}
.app-main {
  flex: 1; overflow-y: auto; padding: var(--s-4) var(--s-4) calc(80px + 64px);
  display: flex; flex-direction: column; gap: var(--s-4);
  -webkit-overflow-scrolling: touch;
}
.app-main::-webkit-scrollbar { width: 0; }

/* ---- 顶部应用栏 ---- */
.appbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: var(--s-2);
  padding: 12px var(--s-4);
  background: rgba(255, 248, 240, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.appbar h1 { font-size: var(--fs-xl); font-weight: 700; flex: 1; }
.appbar .icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r-full); color: var(--ink); transition: background .15s; }
.appbar .icon-btn:hover { background: var(--bg-2); }
.appbar .icon-btn svg { width: 22px; height: 22px; }

/* ---- 底部 Tab 5 + 居中 FAB ---- */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-around;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  z-index: 40;
}
.tabbar-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 0;
  color: var(--ink-3); font-size: 10px; font-weight: 500;
  position: relative; transition: color .15s;
}
.tabbar-item svg { width: 24px; height: 24px; transition: transform .2s; }
.tabbar-item[aria-selected="true"] { color: var(--brand); }
.tabbar-item[aria-selected="true"] svg { transform: scale(1.08); }
.tabbar-item[aria-selected="true"]::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 18px; height: 3px; background: var(--brand); border-radius: var(--r-full);
}
.tabbar-fab {
  flex: 0 0 56px; width: 56px; height: 56px;
  background: var(--brand-grad);
  border-radius: var(--r-full);
  display: grid; place-items: center;
  color: #fff;
  box-shadow: var(--sh-fab);
  margin-top: -24px;
  transition: transform .15s;
}
.tabbar-fab:hover { transform: scale(1.05); }
.tabbar-fab:active { transform: scale(0.95); }
.tabbar-fab svg { width: 28px; height: 28px; stroke-width: 2.2; }

/* ---- 平板：底部导航居中 ---- */
@container app (min-width: 600px) {
  .tabbar { max-width: 520px; margin: 0 auto; left: 50%; right: auto; transform: translateX(-50%); border-radius: 0 0 var(--r-2xl) var(--r-2xl); border: 0; box-shadow: none; }
}

/* ---- 折叠屏展开：左侧导航 ---- */
@container app (min-width: 960px) {
  .app { flex-direction: row; }
  .appbar { display: none; }
  .tabbar {
    position: static;
    flex-direction: column; justify-content: flex-start; align-items: stretch;
    width: 220px; flex: 0 0 220px;
    gap: var(--s-1);
    border-top: 0; border-right: 1px solid var(--line);
    background: var(--surface);
    padding: var(--s-6) var(--s-3);
    border-radius: 0;
    max-width: none; margin: 0; transform: none; left: auto; right: auto;
  }
  .tabbar-item {
    flex-direction: row; justify-content: flex-start; gap: var(--s-3);
    padding: 10px 14px; border-radius: var(--r);
    font-size: var(--fs-md); font-weight: 500;
  }
  .tabbar-item[aria-selected="true"] { background: var(--brand-50); }
  .tabbar-item[aria-selected="true"]::before { display: none; }
  .tabbar-fab { margin: var(--s-4) auto 0; }
  .app-main { padding: var(--s-7) var(--s-7) var(--s-7); gap: var(--s-5); }
  .app-shell { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; position: relative; }
}

/* =====================================================================
   4. Hero 区
   ===================================================================== */
.hero {
  position: relative;
  margin: calc(var(--s-4) * -1) calc(var(--s-4) * -1) 0;
  padding: var(--s-5) var(--s-4) 72px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 200, 150, 0.5), transparent 60%),
    var(--brand-grad);
  color: #fff;
  border-radius: 0 0 var(--r-2xl) var(--r-2xl);
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: -60px; left: -30px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(255, 200, 150, 0.18), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-row {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.hero-greet { font-size: var(--fs-sm); opacity: 0.9; }
.hero-greet strong { font-weight: 600; }
.hero-avatar {
  width: 44px; height: 44px; border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.25);
  display: grid; place-items: center;
  flex: 0 0 44px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--sh-sm);
  overflow: hidden;
  font-size: 20px;
}
.hero-meta { flex: 1; }
.hero-meta .name { font-size: var(--fs-lg); font-weight: 700; line-height: 1.2; }
.hero-meta .sub { font-size: var(--fs-sm); opacity: 0.9; margin-top: 2px; }
.hero-icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--r-full);
  color: #fff; position: relative;
}
.hero-icon-btn:hover { background: rgba(255, 255, 255, 0.3); }
.hero-icon-btn svg { width: 20px; height: 20px; }
.hero-icon-btn .dot {
  position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px; background: #fff;
  border: 2px solid var(--brand-600);
  border-radius: var(--r-full);
}

.hero-pet {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: var(--s-3);
  background: rgba(255, 255, 255, 0.18);
  padding: var(--s-3);
  border-radius: var(--r-xl);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.hero-pet-avatar {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  flex: 0 0 56px;
  border-radius: var(--r-full);
  overflow: hidden;
}
.hero-pet-avatar svg { width: 56px; height: 56px; display: block; }
.hero-watermark { position: absolute; right: -18px; bottom: -28px; width: 168px; height: 168px; z-index: 0; opacity: .22; pointer-events: none; }
.hero-watermark svg { width: 100%; height: 100%; display: block; }
.deco-paw { position: absolute; z-index: 0; color: rgba(255,255,255,.5); pointer-events: none; }
.deco-paw.a { left: 18px; top: 16px; width: 22px; height: 22px; }
.deco-paw.b { right: 70px; top: 44px; width: 16px; height: 16px; }
.deco-paw.c { left: 42%; bottom: 16px; width: 18px; height: 18px; }
.deco-paw svg { width: 100%; height: 100%; display: block; }
.hero-pet-info { flex: 1; min-width: 0; }
.hero-pet-info .name { font-size: var(--fs-xl); font-weight: 700; line-height: 1.2; }
.hero-pet-info .meta { font-size: var(--fs-sm); opacity: 0.92; margin-top: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hero-pet-info .meta .pip { width: 4px; height: 4px; background: #fff; border-radius: var(--r-full); opacity: 0.6; }
.hero-pet-info .badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: var(--r-full);
  font-size: var(--fs-sm); font-weight: 500;
}
.hero-pet-info .badge svg { width: 12px; height: 12px; }
.hero-pet-switch {
  width: 32px; height: 32px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--r-full); color: #fff;
}
.hero-pet-switch svg { width: 18px; height: 18px; }

/* =====================================================================
   5. 卡片
   ===================================================================== */
.card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: var(--s-4);
  box-shadow: var(--sh);
  border: 1px solid var(--line-soft);
}
.card-tight { padding: var(--s-3); }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-3);
}
.card-head h3 { font-size: var(--fs-lg); font-weight: 700; display: flex; align-items: center; gap: var(--s-2); }
.card-head h3 .accent { width: 4px; height: 18px; background: var(--brand-grad); border-radius: var(--r-full); }
.card-head .more { color: var(--ink-3); font-size: var(--fs-md); display: flex; align-items: center; gap: 2px; }
.card-head .more svg { width: 14px; height: 14px; }
.card-section-label {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-md); font-weight: 600; color: var(--ink-2);
  margin: var(--s-2) 0 var(--s-2);
}
.card-section-label svg { width: 16px; height: 16px; color: var(--brand); }

/* =====================================================================
   6. 统计格
   ===================================================================== */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2);
}
.stat {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s-3) var(--s-2);
  text-align: center;
  border: 1px solid var(--line-soft);
  box-shadow: var(--sh-xs);
}
.stat-value {
  font-size: var(--fs-3xl); font-weight: 700; color: var(--ink); line-height: 1.1;
  display: flex; align-items: baseline; justify-content: center; gap: 2px;
}
.stat-value .unit { font-size: var(--fs-sm); color: var(--ink-3); font-weight: 500; }
/* 2026-09-07（D-4 定案）：体重趋势口径 = 升 success 绿 / 降 danger 红。
   此处是**唯一色源**——不要在 JS 里用内联 style 覆盖颜色。
   背景：app.js 曾用内联 dColor（升红降绿）渲染「较上次」，与此处同屏打架，已删除该内联写法改走本类。
   三重编码：颜色须与箭头图标、±X.X 数字同时出现，不得只靠颜色（红绿色觉障碍约占男性 8%）。 */
.stat-value .trend { font-size: var(--fs-sm); font-weight: 600; margin-left: 4px; display: inline-flex; align-items: center; gap: 1px; }
.stat-value .trend.up { color: var(--success); }
.stat-value .trend.down { color: var(--danger); }
.stat-value .trend svg { width: 10px; height: 10px; }
.stat-label { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 4px; }

/* =====================================================================
   7. 快速记录
   ===================================================================== */
.quick-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2);
}
.quick-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  padding: var(--s-3) 4px;
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--line-soft);
  box-shadow: var(--sh-xs);
  transition: transform .15s, box-shadow .15s;
}
.quick-item:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.quick-item:active { transform: translateY(0); }
.quick-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--r);
  background: var(--brand-50);
  color: var(--brand);
}
.quick-icon svg { width: 22px; height: 22px; }
.quick-icon.feed    { background: #DCFCE7; color: var(--accent-feed); }
.quick-icon.walk    { background: var(--brand-50); color: var(--accent-walk); }
.quick-icon.weight  { background: #F3E8FF; color: var(--accent-weight); }
.quick-icon.sleep   { background: #E0E7FF; color: var(--accent-sleep); }
.quick-icon.vaccine { background: #CFFAFE; color: var(--accent-vaccine); }
.quick-icon.deworm  { background: #FEF3C7; color: var(--accent-deworm); }
.quick-icon.medicine{ background: #FCE7F3; color: var(--accent-medicine); }
.quick-icon.checkup { background: #DBEAFE; color: var(--accent-checkup); }
.quick-icon.bath    { background: #E0F2FE; color: var(--accent-bath); }
.quick-icon.note    { background: #F1F5F9; color: var(--accent-note); }
.quick-label { font-size: var(--fs-md); color: var(--ink-2); font-weight: 500; }

/* =====================================================================
   8. 列表项
   ===================================================================== */
.list { display: flex; flex-direction: column; gap: var(--s-2); }
.list-item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3);
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--line-soft);
  box-shadow: var(--sh-xs);
  transition: transform .15s, box-shadow .15s;
}
.list-item:hover { transform: translateY(-1px); box-shadow: var(--sh-sm); }
.list-icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--r);
  flex: 0 0 40px;
}
.list-icon svg { width: 22px; height: 22px; }
.list-body { flex: 1; min-width: 0; }
.list-title { font-size: var(--fs-base); font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.list-sub { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.list-sub .pip { width: 3px; height: 3px; background: var(--ink-4); border-radius: var(--r-full); }
.list-trailing { text-align: right; flex: 0 0 auto; display: flex; align-items: center; gap: 6px; color: var(--ink-3); }
.list-trailing svg { width: 16px; height: 16px; }

/* =====================================================================
   时间线：按天分组 + 竖式步骤条
   参考 Element Steps 形态：左竖轴 + 圆形节点 + 连线 + 右侧内容
   ===================================================================== */
.timeline {
  display: flex; flex-direction: column; gap: var(--s-3);
  padding: 0 0 var(--s-4);
}
.tl-day {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--line-soft);
  padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4);
  box-shadow: var(--sh-xs);
  position: relative;
}
.tl-day.today {
  background: linear-gradient(180deg, #FFF6EC 0%, var(--surface) 60%);
  border-color: #FFD7B5;
}
.tl-day.future { opacity: .85; }

.tl-day-head {
  display: flex; align-items: center; gap: var(--s-2);
  margin-bottom: var(--s-3);
  padding-bottom: var(--s-2);
  border-bottom: 1px dashed var(--line-soft);
}
.tl-day-label {
  font-size: var(--fs-lg); font-weight: 700; color: var(--ink);
  display: flex; align-items: center; gap: 6px;
}
.tl-day.today .tl-day-label { color: var(--brand-darker); }
.tl-day.today .tl-day-label::before {
  content: ''; width: 8px; height: 8px; border-radius: var(--r-full);
  background: var(--brand); box-shadow: 0 0 0 4px rgba(255, 122, 69, .15);
  animation: tlTodayPulse 1.6s ease-in-out infinite;
}
@keyframes tlTodayPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255, 122, 69, .15); }
  50%      { box-shadow: 0 0 0 8px rgba(255, 122, 69, .05); }
}
.tl-day-count {
  font-size: var(--fs-sm); color: var(--ink-3);
  background: var(--bg-2); padding: 2px 10px;
  border-radius: var(--r-full); font-variant-numeric: tabular-nums;
}

.tl-steps { display: flex; flex-direction: column; }

/* 单条步骤 */
.tl-step {
  display: flex; align-items: stretch; gap: var(--s-3);
  padding: var(--s-2) 0;
  cursor: pointer;
  transition: transform .15s;
  border-radius: var(--r);
}
.tl-step:hover { transform: translateX(2px); }
.tl-step:active { background: var(--bg-2); }

.tl-rail {
  flex: 0 0 28px;
  display: flex; flex-direction: column; align-items: center;
  position: relative;
}
.tl-node {
  width: 28px; height: 28px;
  border-radius: var(--r-full);
  display: grid; place-items: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: transform .2s;
}
.tl-step:hover .tl-node { transform: scale(1.08); }
.tl-node svg { width: 13px; height: 13px; }

.tl-node.today {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(255, 122, 69, .15);
}
.tl-node.past {
  background: var(--bg-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.tl-node.future {
  background: var(--surface);
  color: var(--ink-4);
  border: 1px dashed var(--line);
}

.tl-node-pulse {
  position: absolute; inset: -4px;
  border-radius: var(--r-full);
  border: 2px solid var(--brand);
  opacity: .6;
  animation: tlNodeRing 1.6s ease-out infinite;
}
@keyframes tlNodeRing {
  0%   { transform: scale(.85); opacity: .6; }
  100% { transform: scale(1.35); opacity: 0; }
}

.tl-line {
  flex: 1; width: 2px;
  background: linear-gradient(180deg, var(--line) 0%, var(--line-soft) 100%);
  margin-top: 2px; min-height: 16px;
}

.tl-body { flex: 1; min-width: 0; padding-top: 4px; }
.tl-row1 {
  display: flex; align-items: center; gap: var(--s-2);
  justify-content: space-between;
}
.tl-title {
  font-size: var(--fs-base); font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0; flex: 1;
}
.tl-value {
  font-size: var(--fs-md); font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  background: var(--bg-2);
  padding: 2px 8px; border-radius: var(--r);
}
.tl-row2 {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: var(--fs-sm); color: var(--ink-3);
}
.tl-time {
  font-variant-numeric: tabular-nums;
  background: var(--bg-2);
  padding: 1px 6px; border-radius: var(--r-sm);
  font-size: 12px;
}
.tl-pet-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 12px; font-weight: 500;
}
.tl-pet-tag.cat     { background: #FFF1E6; color: #C2410C; }
.tl-pet-tag.dog     { background: #DCFCE7; color: #15803D; }
.tl-pet-tag.hamster { background: #FEF3C7; color: #A16207; }
.tl-pet-tag.rabbit  { background: #FAE8FF; color: #A21CAF; }
.tl-pet-tag.bird    { background: #DBEAFE; color: #1D4ED8; }
.tl-pet-tag.fish    { background: #CFFAFE; color: #0E7490; }
.tl-pet-tag svg { width: 12px; height: 12px; }

.tl-note {
  display: inline-block;
  font-size: 12px;
  color: var(--ink-3);
  background: var(--bg-2);
  padding: 2px 8px;
  border-radius: var(--r-sm);
  max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.tl-action {
  flex-shrink: 0;
  align-self: center;
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  background: transparent;
  border: 0;
  display: grid; place-items: center;
  color: var(--ink-4);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.tl-action:hover { background: var(--bg-2); color: var(--brand); }
.tl-action svg { width: 16px; height: 16px; }

/* 暗黑模式时间线 */
:root[data-theme="dark"] .tl-day {
  background: var(--surface);
  border-color: var(--line);
}
:root[data-theme="dark"] .tl-day.today {
  background: linear-gradient(180deg, rgba(255, 122, 69, .12) 0%, var(--surface) 60%);
  border-color: rgba(255, 122, 69, .35);
}
:root[data-theme="dark"] .tl-node.past {
  background: var(--bg-2);
  color: var(--ink-2);
  border-color: var(--line);
}
:root[data-theme="dark"] .tl-line {
  background: linear-gradient(180deg, var(--line) 0%, transparent 100%);
}
:root[data-theme="dark"] .tl-pet-tag.cat     { background: rgba(255, 122, 69, .15); color: #FFB088; }
:root[data-theme="dark"] .tl-pet-tag.dog     { background: rgba(74, 222, 128, .15);  color: #86EFAC; }
:root[data-theme="dark"] .tl-pet-tag.hamster { background: rgba(250, 204, 21, .15);  color: #FDE68A; }
:root[data-theme="dark"] .tl-pet-tag.rabbit  { background: rgba(192, 132, 252, .15); color: #D8B4FE; }
:root[data-theme="dark"] .tl-pet-tag.bird    { background: rgba(96, 165, 250, .15);  color: #93C5FD; }
:root[data-theme="dark"] .tl-pet-tag.fish    { background: rgba(34, 211, 238, .15);  color: #67E8F9; }

/* =====================================================================
   弹层：消息中心
   ===================================================================== */
.notice-item {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
}
.notice-item:hover { transform: translateY(-1px); box-shadow: var(--sh-xs); }
.notice-icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--r);
  flex-shrink: 0;
}
.notice-icon svg { width: 20px; height: 20px; }
.notice-body { flex: 1; min-width: 0; }
.notice-title {
  font-size: var(--fs-base); font-weight: 500; color: var(--ink);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.notice-time { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 4px; }

/* =====================================================================
   徽章成就
   ===================================================================== */
.badge-progress {
  height: 8px; background: var(--bg-2); border-radius: var(--r-full);
  margin-top: var(--s-3); overflow: hidden;
}
.badge-progress-bar {
  height: 100%; background: linear-gradient(90deg, var(--brand), #FFB84D);
  border-radius: var(--r-full);
  transition: width .6s ease;
}
.badge-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3);
  padding: 0 0 var(--s-4);
}
.badge-item {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: var(--s-3) var(--s-2);
  text-align: center;
  transition: transform .15s, box-shadow .15s;
}
.badge-item.got { box-shadow: var(--sh-xs); }
.badge-item.locked { opacity: .45; filter: grayscale(.6); }
.badge-item:hover { transform: translateY(-2px); box-shadow: var(--sh-sm); }
.badge-medal {
  width: 56px; height: 56px;
  margin: 0 auto var(--s-2);
  display: grid; place-items: center;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, #FFE3CC, #FFD7B5);
  color: var(--brand-darker);
}
.badge-item.got .badge-medal {
  background: linear-gradient(135deg, #FFD27A, #FFB84D);
  box-shadow: 0 4px 12px rgba(255, 184, 77, .35);
}
.badge-item.locked .badge-medal {
  background: var(--bg-2);
  color: var(--ink-4);
}
.badge-medal svg { width: 28px; height: 28px; }
.badge-name { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.badge-desc { font-size: 12px; color: var(--ink-3); margin-top: 4px; line-height: 1.4; }

/* =====================================================================
   开关（iOS 风）
   ===================================================================== */
.switch {
  position: relative; display: inline-block;
  width: 44px; height: 26px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--ink-4);
  border-radius: 26px;
  transition: .25s;
}
.switch-slider::before {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  left: 2px; top: 2px;
  background: #fff;
  border-radius: var(--r-full);
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
  transition: .25s;
}
.switch input:checked + .switch-slider { background: var(--brand); }
.switch input:checked + .switch-slider::before { transform: translateX(18px); }

/* =====================================================================
   提醒页：完成态样式
   ===================================================================== */
.reminder.done .reminder-title { text-decoration: line-through; color: var(--ink-3); }
.reminder.done .reminder-icon { opacity: .5; }
.tag.done { background: #DCFCE7; color: #15803D; }
.tag.success { background: #DCFCE7; color: #15803D; }
:root[data-theme="dark"] .tag.done { background: rgba(74, 222, 128, .15); color: #86EFAC; }
:root[data-theme="dark"] .tag.success { background: rgba(74, 222, 128, .15); color: #86EFAC; }

/* =====================================================================
   日历：选中态
   ===================================================================== */
.cal-day.selected { background: var(--brand); color: #fff; font-weight: 700; }
.cal-day.selected .dots span { background: #fff; }
.cal-day { cursor: pointer; transition: transform .15s, background .15s; }
.cal-day:active { transform: scale(.95); }
.cal-title { cursor: pointer; }

/* =====================================================================
   弹层：切换宠物列表
   ===================================================================== */
.pet-list { display: flex; flex-direction: column; gap: var(--s-2); }
.pet-list-item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all .15s;
}
.pet-list-item:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: var(--sh-sm);
}
.pet-list-item.active {
  border-color: var(--brand);
  background: linear-gradient(135deg, #FFF6EC 0%, var(--surface) 100%);
}
.pet-list-avatar {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  background: var(--bg-2);
  flex-shrink: 0;
}
.pet-list-avatar svg { width: 56px; height: 56px; }
.pet-list-body { flex: 1; min-width: 0; }
.pet-list-row1 {
  display: flex; align-items: center; gap: 6px;
}
.pet-list-name {
  font-size: var(--fs-lg); font-weight: 700; color: var(--ink);
}
.pet-list-row2 {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: var(--fs-sm); color: var(--ink-3);
}
.pet-list-row2 .pip { width: 3px; height: 3px; background: var(--ink-4); border-radius: var(--r-full); }
.pet-list-row2 .feed-state { color: var(--brand-darker); font-weight: 500; }
.pet-list-check {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  background: var(--brand);
  color: #fff;
  flex-shrink: 0;
}
.pet-list-check svg { width: 16px; height: 16px; }

:root[data-theme="dark"] .pet-list-item { border-color: var(--line); }
:root[data-theme="dark"] .pet-list-item.active {
  border-color: var(--brand);
  background: rgba(255, 122, 69, .08);
}

/* =====================================================================
   弹层：记录详情
   ===================================================================== */
.rd-head {
  display: flex; align-items: center; gap: var(--s-3);
  padding-bottom: var(--s-3);
  border-bottom: 1px dashed var(--line-soft);
}
.rd-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: var(--r-lg);
  flex-shrink: 0;
}
.rd-icon svg { width: 28px; height: 28px; }
.rd-title { font-size: var(--fs-lg); font-weight: 700; color: var(--ink); }
.rd-time { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 4px; font-variant-numeric: tabular-nums; }
.rd-stat {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-3);
  background: var(--bg-2);
  border-radius: var(--r);
}
.rd-label { font-size: var(--fs-sm); color: var(--ink-3); }
.rd-val {
  font-size: var(--fs-xl); font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.rd-val em { font-style: normal; font-size: var(--fs-md); color: var(--ink-3); margin-left: 4px; }
.rd-note {
  padding: var(--s-3);
  background: linear-gradient(135deg, #FFF6EC, #FFE3CC);
  border-radius: var(--r);
  color: var(--ink-2);
  line-height: 1.6;
  border-left: 3px solid var(--brand);
}
.rd-note.muted { background: var(--bg-2); color: var(--ink-3); border-left-color: var(--line); }

:root[data-theme="dark"] .rd-note {
  background: rgba(255, 122, 69, .08);
  color: var(--ink-2);
}

.btn-danger { color: #DC2626; }
.btn-danger:hover { background: #FEE2E2; color: #B91C1C; }
:root[data-theme="dark"] .btn-danger { color: #F87171; }
:root[data-theme="dark"] .btn-danger:hover { background: rgba(248, 113, 113, .12); color: #FCA5A5; }

.empty {
  text-align: center; padding: var(--s-8) var(--s-4);
  color: var(--ink-3);
}
.empty-icon {
  width: 80px; height: 80px; margin: 0 auto var(--s-3);
  background: var(--brand-50);
  border-radius: var(--r-full);
  display: grid; place-items: center;
  color: var(--brand);
}
.empty-icon svg { width: 36px; height: 36px; }
.empty-title { font-size: var(--fs-lg); font-weight: 600; color: var(--ink-2); }
.empty-desc { font-size: var(--fs-md); margin-top: 4px; }
.empty-art { width: 96px; height: 96px; margin: 0 auto var(--s-3); }
.empty-art svg { width: 100%; height: 100%; display: block; }

/* =====================================================================
   9. Chip / 标签
   ===================================================================== */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  color: var(--ink-2);
  font-weight: 500;
  white-space: nowrap;
  transition: all .15s;
}
.chip svg { width: 14px; height: 14px; }
.chip[aria-selected="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip[aria-selected="true"] svg { color: #fff; }
.chip.ghost { background: transparent; }
.chip.brand { background: var(--brand-50); color: var(--brand-darker); border-color: var(--brand-100); }
.chip.glass { background: rgba(255, 255, 255, 0.25); color: #fff; border: 1px solid rgba(255, 255, 255, 0.4); backdrop-filter: blur(8px); }

.chip-row { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.chip-scroll { display: flex; gap: var(--s-2); overflow-x: auto; padding: 4px 0 var(--s-2); -webkit-overflow-scrolling: touch; }
.chip-scroll::-webkit-scrollbar { display: none; }
.chip-scroll .chip { flex: 0 0 auto; }

.tag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.tag.brand  { background: var(--brand-100); color: var(--brand-darker); }
.tag.success{ background: var(--success-bg); color: var(--success); }
.tag.warn   { background: var(--warning-bg); color: var(--warning); }
.tag.danger { background: var(--danger-bg); color: var(--danger); }
.tag.info   { background: var(--info-bg); color: var(--info); }
.tag.ghost  { background: var(--bg-2); color: var(--ink-2); }

/* =====================================================================
   10. 按钮
   ===================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--btn-h);
  min-width: 64px;
  padding: 0 20px;
  border-radius: var(--r);
  font-size: var(--fs-base);
  font-weight: 600;
  white-space: nowrap;
  transition: all .15s;
  position: relative;
  flex: 0 0 auto;
}
.btn svg { width: 18px; height: 18px; flex: 0 0 18px; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn-primary {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 122, 69, 0.3);
}
.btn-primary:hover { box-shadow: 0 6px 16px rgba(255, 122, 69, 0.4); }
.btn-ghost {
  background: var(--surface);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--bg-2); border-color: var(--brand-200); }
.btn-text {
  background: transparent;
  color: var(--brand-darker);
}
.btn-text:hover { background: var(--brand-50); }
.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}
.btn-lg { height: var(--btn-h-lg); padding: 0 28px; font-size: var(--fs-lg); border-radius: var(--r-lg); }
.btn-lg svg { width: 20px; height: 20px; }
.btn-block { width: 100%; }
.btn-icon {
  width: 44px; height: 44px; min-width: 44px;
  padding: 0;
  border-radius: var(--r-full);
}
.btn-row { display: flex; gap: var(--s-2); align-items: center; }
.btn-row > .btn { flex: 1; }
.btn-row > .btn-text { flex: 0 0 auto; }

/* =====================================================================
   11. 表单
   ===================================================================== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: var(--fs-md); font-weight: 600; color: var(--ink-2); }
.field-hint { font-size: var(--fs-sm); color: var(--ink-3); }
.input, .textarea, .select {
  display: flex; align-items: center; gap: var(--s-2);
  height: 48px;
  padding: 0 14px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  font-size: var(--fs-base);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(255, 122, 69, 0.12);
}
.textarea { height: auto; min-height: 88px; padding: 12px 14px; align-items: flex-start; resize: vertical; }
.input svg { width: 18px; height: 18px; color: var(--ink-3); flex: 0 0 18px; }
.input input, .textarea textarea, .select select { flex: 1; border: 0; background: transparent; outline: none; min-width: 0; }
.input-group { display: flex; gap: var(--s-2); }
.input-group .input { flex: 1; }

/* 宠物选择横滑卡 */
.pet-scroll { display: flex; gap: var(--s-2); overflow-x: auto; padding: 4px 2px var(--s-2); -webkit-overflow-scrolling: touch; }
.pet-scroll::-webkit-scrollbar { display: none; }
.pet-card {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  min-width: 78px;
  transition: all .15s;
  cursor: pointer;
}
.pet-card[aria-selected="true"] { border-color: var(--brand); background: var(--brand-50); }
.pet-card-avatar {
  width: 44px; height: 44px;
  background: transparent;
  border-radius: var(--r-full);
  display: grid; place-items: center;
}
.pet-card-avatar svg { width: 40px; height: 40px; display: block; }
.pet-card[aria-selected="true"] .pet-card-avatar { background: var(--brand); }
.pet-card[aria-selected="true"] .pet-card-avatar svg { color: #fff; }
.pet-card .pet-card-name { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.pet-card[aria-selected="true"] .pet-card-name { color: var(--brand-darker); }
.pet-card.add {
  background: transparent; border-style: dashed; border-color: var(--line);
  color: var(--ink-3);
}
.pet-card.add .pet-card-avatar { background: var(--bg-2); }
.pet-card.add .pet-card-avatar svg { color: var(--ink-3); }

/* 4 类 Tab（疫苗/驱虫/用药/体检） */
.cat-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2);
}
.cat-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  padding: var(--s-3) 4px;
  background: var(--surface);
  border: 1.5px solid var(--line-soft);
  border-radius: var(--r-lg);
  transition: all .15s;
  min-width: 0;
}
.cat-tab-icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  background: var(--bg-2);
  color: var(--ink-3);
  transition: all .15s;
}
.cat-tab-icon svg { width: 20px; height: 20px; }
.cat-tab-label { font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.cat-tab[aria-selected="true"] { border-color: var(--brand); background: var(--brand-50); box-shadow: var(--sh-sm); }
.cat-tab[aria-selected="true"] .cat-tab-label { color: var(--brand-darker); font-weight: 600; }
.cat-tab.vaccine[aria-selected="true"]  .cat-tab-icon,
.cat-tab.vaccine[aria-selected="true"]  .cat-tab-icon { background: var(--accent-vaccine); color: #fff; }
.cat-tab.vaccine  .cat-tab-icon { background: #CFFAFE; color: var(--accent-vaccine); }
.cat-tab.deworm[aria-selected="true"]   .cat-tab-icon { background: var(--accent-deworm); color: #fff; }
.cat-tab.deworm   .cat-tab-icon { background: #FEF3C7; color: var(--accent-deworm); }
.cat-tab.medicine[aria-selected="true"] .cat-tab-icon { background: var(--accent-medicine); color: #fff; }
.cat-tab.medicine .cat-tab-icon { background: #FCE7F3; color: var(--accent-medicine); }
.cat-tab.checkup[aria-selected="true"]  .cat-tab-icon { background: var(--accent-checkup); color: #fff; }
.cat-tab.checkup  .cat-tab-icon { background: #DBEAFE; color: var(--accent-checkup); }

/* =====================================================================
   12. 图表
   ===================================================================== */
.chart {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: var(--s-4);
  box-shadow: var(--sh);
  border: 1px solid var(--line-soft);
}
.chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-3); }
.chart-svg { width: 100%; height: 180px; display: block; }
.chart-tick { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--ink-3); margin-top: 4px; }
/* 体重统计卡（吸收原型：最新/最高/最低/较上次） */
.chart-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2);
  margin-top: var(--s-3);
}
.chart-stats .stat {
  padding: var(--s-2) 4px;
  box-shadow: none;
  background: var(--bg-2);
  border-color: transparent;
}
.chart-stats .stat-value { font-size: var(--fs-lg); font-weight: 700; }

/* =====================================================================
   13. 提醒卡片
   ===================================================================== */
.reminder {
  position: relative;
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--line-soft);
  box-shadow: var(--sh-xs);
  overflow: hidden;
}
.reminder::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--brand);
}
.reminder.due-today::before { background: var(--warning); }
.reminder.overdue::before  { background: var(--danger); }
.reminder.done::before     { background: var(--success); }
.reminder.done { opacity: 0.6; }
.reminder.done .reminder-title { text-decoration: line-through; color: var(--ink-3); }
.reminder.due-today { background: linear-gradient(90deg, #FFF7E6 0%, var(--surface) 50%); }
.reminder.overdue  { background: linear-gradient(90deg, #FEE2E2 0%, var(--surface) 60%); }

.reminder-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--r);
  background: var(--brand-50); color: var(--brand);
  flex: 0 0 44px;
}
.reminder-icon svg { width: 22px; height: 22px; }
.reminder-body { flex: 1; min-width: 0; }
.reminder-title { font-size: var(--fs-base); font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.reminder-meta { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.reminder-meta .pip { width: 3px; height: 3px; background: var(--ink-4); border-radius: var(--r-full); }
.reminder-actions { display: flex; gap: 4px; }
.reminder-actions .icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r-full); color: var(--ink-3); }
.reminder-actions .icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.reminder-actions .icon-btn svg { width: 16px; height: 16px; }

/* =====================================================================
   14. 日历
   ===================================================================== */
.calendar {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: var(--s-4);
  box-shadow: var(--sh);
  border: 1px solid var(--line-soft);
}
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-3); }
.cal-title { font-size: var(--fs-xl); font-weight: 700; }
.cal-nav { display: flex; gap: 4px; }
.cal-nav .icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r-full); color: var(--ink-2); }
.cal-nav .icon-btn:hover { background: var(--bg-2); }
.cal-nav .icon-btn svg { width: 18px; height: 18px; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 6px; }
.cal-week div { font-size: var(--fs-sm); color: var(--ink-3); text-align: center; padding: 6px 0; font-weight: 500; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day {
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: var(--r); font-size: var(--fs-md); color: var(--ink-2); cursor: pointer; position: relative;
  transition: background .15s;
}
.cal-day:hover { background: var(--bg-2); }
.cal-day.muted { color: var(--ink-4); }
.cal-day.today { background: var(--brand-50); color: var(--brand-darker); font-weight: 700; }
.cal-day.selected { background: var(--brand); color: #fff; font-weight: 700; }
.cal-day .dots { display: flex; gap: 2px; position: absolute; bottom: 4px; }
.cal-day .dots span { width: 4px; height: 4px; background: var(--brand); border-radius: var(--r-full); }
.cal-day.selected .dots span { background: #fff; }
.cal-day.today .dots span { background: var(--brand-darker); }

/* 宠物图例（吸收原型：多宠日历色点对照） */
.cal-legend {
  display: flex; flex-wrap: wrap; gap: 10px 16px;
  margin-top: var(--s-3); padding: 0 var(--s-1);
}
.cal-leg {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-sm); color: var(--ink-2);
}
.cal-leg i {
  width: 10px; height: 10px; border-radius: var(--r-full);
  flex-shrink: 0; box-shadow: 0 0 0 2px rgba(255,255,255,.6) inset;
}

/* =====================================================================
   15. 弹层
   ===================================================================== */
.scrim {
  position: fixed; inset: 0;
  background: rgba(43, 31, 20, 0.45);
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.scrim.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 100%);
  width: 100%; max-width: 480px;
  background: var(--surface);
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  box-shadow: 0 -8px 32px rgba(43, 31, 20, 0.16);
  z-index: 201;
  max-height: min(720px, 88vh);
  display: flex; flex-direction: column;
  transition: transform .25s cubic-bezier(0.4, 0, 0.2, 1);
}
.sheet.open { transform: translate(-50%, 0); }
.sheet-handle {
  width: 40px; height: 4px; background: var(--ink-4);
  border-radius: var(--r-full); margin: 8px auto;
  flex-shrink: 0;
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--s-4) var(--s-3);
  border-bottom: 1px solid var(--line-soft);
  flex-shrink: 0;
}
.sheet-head h2 { font-size: var(--fs-xl); font-weight: 700; }
.sheet-head .icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r-full); color: var(--ink-3); }
.sheet-head .icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.sheet-head .icon-btn svg { width: 20px; height: 20px; }
.sheet-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  padding: var(--s-4);
  display: flex; flex-direction: column; gap: var(--s-4);
  -webkit-overflow-scrolling: touch;
}
.sheet-body::-webkit-scrollbar { width: 0; }
.sheet-foot {
  padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-soft);
  background: var(--bg-2);
  display: flex; gap: var(--s-2);
  flex-shrink: 0;
}
.sheet-foot .btn { flex: 1; }
.sheet-foot .btn-text { flex: 0 0 auto; padding: 0 16px; }
.sheet-foot .btn-ghost { flex: 0 0 auto; min-width: 96px; }

@container app (min-width: 600px) {
  /* 中等及以上宽度：弹层改为居中 dialog，并强制限定最大高度，
     避免内容多时撑开超过手机可视区。 */
  .sheet {
    border-radius: var(--r-2xl);
    left: 50%; top: 50%; bottom: auto;
    transform: translate(-50%, -50%) scale(0.96);
    opacity: 0;
    max-height: min(640px, 80vh);
    width: calc(100% - 32px);
    transition: transform .25s, opacity .2s;
  }
  .sheet.open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  .sheet-handle { display: none; }
}

/* =====================================================================
   16. Toast
   ===================================================================== */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  background: var(--ink); color: #fff;
  padding: 10px 20px; border-radius: var(--r-full);
  font-size: var(--fs-md); font-weight: 500;
  box-shadow: var(--sh-lg);
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 300;
  display: flex; align-items: center; gap: 8px;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 16px; height: 16px; color: var(--success); }

/* =====================================================================
   17. 响应式
   ===================================================================== */
@container app (min-width: 600px) {
  .stats { gap: var(--s-3); }
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
  .cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
}
@container app (min-width: 960px) {
  .app-main { padding: var(--s-7) var(--s-7) var(--s-7); gap: var(--s-5); }
  .app-shell { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; position: relative; }
  .cols-2 { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .hero { margin: 0 0 var(--s-4); border-radius: var(--r-2xl); }
}

/* =====================================================================
   17.5 首页：今日喂食打卡 + 首日引导
   ===================================================================== */
.feed-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: var(--s-4);
  box-shadow: var(--sh);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
.feed-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent-feed);
}
.feed-card.done::before { background: var(--success); }
.feed-card-top { display: flex; align-items: center; gap: var(--s-3); }
.feed-card-ill {
  width: 52px; height: 52px; flex: 0 0 52px;
  border-radius: var(--r-lg);
  background: #DCFCE7; display: grid; place-items: center;
  box-shadow: var(--sh-xs);
}
.feed-card-ill svg { width: 44px; height: 44px; display: block; }
.feed-card-txt { flex: 1; min-width: 0; }
.feed-card-title { font-size: var(--fs-lg); font-weight: 700; color: var(--ink); }
.feed-card-sub { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 2px; }
.feed-checkin {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 16px; border-radius: var(--r-full);
  background: var(--brand-grad); color: #fff; font-weight: 600; font-size: var(--fs-md);
  box-shadow: 0 4px 12px rgba(255, 122, 69, 0.3); transition: transform .15s, box-shadow .15s;
}
.feed-checkin svg { width: 16px; height: 16px; flex: 0 0 16px; }
.feed-checkin:hover { box-shadow: 0 6px 16px rgba(255, 122, 69, 0.4); }
.feed-checkin:active { transform: scale(.95); }
.feed-progress { display: flex; gap: 6px; margin-top: var(--s-3); }
.feed-dot {
  flex: 1; height: 8px; border-radius: var(--r-full);
  background: var(--line-warm); transition: background .3s;
}
.feed-dot.fill {
  background: linear-gradient(90deg, #7CE0A0, #16A34A);
  animation: dotFill .4s cubic-bezier(.34, 1.56, .64, 1) both;
}
@keyframes dotFill { from { transform: scaleX(.3); opacity: .5; } to { transform: scaleX(1); opacity: 1; } }
.feed-card.done .feed-progress { opacity: .6; }
.feed-done-line {
  display: flex; align-items: center; gap: 6px; margin-top: var(--s-2);
  font-size: var(--fs-sm); color: var(--success); font-weight: 600;
}
.feed-done-line svg { width: 14px; height: 14px; flex: 0 0 14px; }

.onboard {
  position: relative;
  background: linear-gradient(135deg, #FFF6EC 0%, #FFF0E0 100%);
  border: 1px solid var(--brand-100);
  border-radius: var(--r-xl);
  padding: var(--s-4);
  box-shadow: var(--sh);
  overflow: hidden;
}
.onboard::after {
  content: ''; position: absolute; right: -30px; bottom: -30px; width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(255, 200, 150, 0.32), transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.onboard-close {
  position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: var(--r-full);
  display: grid; place-items: center; color: var(--ink-3); z-index: 2; transition: background .15s;
}
.onboard-close:hover { background: rgba(255, 255, 255, 0.6); }
.onboard-close svg { width: 16px; height: 16px; }
.onboard-head { display: flex; align-items: center; gap: var(--s-3); position: relative; z-index: 1; margin-bottom: var(--s-3); }
.onboard-ill { width: 60px; height: 60px; flex: 0 0 60px; display: grid; place-items: center; }
.onboard-ill svg { width: 60px; height: 60px; display: block; }
.onboard-txt { flex: 1; min-width: 0; }
.onboard-title { font-size: var(--fs-lg); font-weight: 700; color: var(--brand-darker); }
.onboard-sub { font-size: var(--fs-sm); color: var(--ink-2); margin-top: 2px; }
.onboard-steps { display: flex; flex-direction: column; gap: var(--s-2); position: relative; z-index: 1; }
.onboard-step {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.onboard-step:hover { transform: translateY(-1px); box-shadow: var(--sh-sm); border-color: var(--brand-200); }
.onboard-step:active { transform: translateY(0); }
.onboard-step.done { background: #F4FCF6; border-color: #C9EFD3; }
.onboard-step-ic {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: var(--r-full);
  display: grid; place-items: center; background: var(--brand-50); color: var(--brand);
}
.onboard-step-ic svg { width: 18px; height: 18px; }
.onboard-step.done .onboard-step-ic { background: var(--success); color: #fff; }
.onboard-step-body { flex: 1; min-width: 0; }
.onboard-step-label { font-size: var(--fs-base); font-weight: 600; color: var(--ink); }
.onboard-step.done .onboard-step-label { color: var(--ink-2); }
.onboard-step-hint { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 1px; }
.onboard-step-tag {
  flex: 0 0 auto; font-size: var(--fs-xs); font-weight: 600; color: var(--success);
  background: var(--success-bg); padding: 2px 8px; border-radius: var(--r-full);
}
.onboard-step-go { flex: 0 0 auto; color: var(--ink-3); display: grid; place-items: center; }
.onboard-step-go svg { width: 14px; height: 14px; }

/* =====================================================================
   18. 暗黑模式令牌（浅/暗/跟随系统，作用于 <html data-theme>）
   ===================================================================== */
:root[data-theme="dark"] {
  --bg: #16110C;
  --bg-2: #1F1812;
  --bg-warm: linear-gradient(180deg, #241A12 0%, #16110C 60%);
  --surface: #241C14;
  --surface-2: #1F1812;

  --brand: #FF9156;
  --brand-deep: #FF7A45;
  --brand-darker: #FFB98C;
  --brand-50:  #3A2417;
  --brand-100: #4A2E1C;
  --brand-200: #5E3A23;
  --brand-300: #7A4A2C;
  --brand-400: #A65E34;
  --brand-500: #C2703C;
  --brand-600: #FF9156;
  --brand-700: #FF7A45;
  --brand-grad: linear-gradient(135deg, #FFA06B 0%, #FF7A45 55%, #FF6B6B 100%);
  --brand-grad-soft: linear-gradient(135deg, #3A2417 0%, #4A2E1C 100%);

  --accent-feed:    #4ADE80;
  --accent-walk:    #FF9156;
  --accent-weight:  #C4B5FD;
  --accent-sleep:   #A5B4FC;
  --accent-vaccine: #22D3EE;
  --accent-deworm:  #FBBF24;
  --accent-medicine:#F472B6;
  --accent-checkup: #60A5FA;
  --accent-bath:    #38BDF8;
  --accent-note:    #94A3B8;

  --ink:   #F6EDE3;
  --ink-2: #DCC9B6;
  --ink-3: #A98E78;
  --ink-4: #6E5848;

  --line:      #3A2C1F;
  --line-warm: #4A3826;
  --line-soft: #2E2319;

  --success: #4ADE80; --success-bg: rgba(74,222,128,.16);
  --warning: #FBBF24; --warning-bg: rgba(251,191,36,.16);
  --danger:  #F87171; --danger-bg: rgba(248,113,113,.16);
  --info:    #60A5FA; --info-bg: rgba(96,165,250,.16);

  --sh-xs: 0 1px 2px rgba(0,0,0,0.3);
  --sh-sm: 0 2px 8px rgba(0,0,0,0.32), 0 1px 2px rgba(0,0,0,0.24);
  --sh:    0 4px 16px rgba(0,0,0,0.36), 0 1px 3px rgba(0,0,0,0.24);
  --sh-lg: 0 12px 32px rgba(0,0,0,0.42), 0 2px 6px rgba(0,0,0,0.28);
  --sh-xl: 0 24px 48px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.32);
  --sh-fab: 0 8px 24px rgba(255,122,69,0.5), 0 2px 6px rgba(255,122,69,0.3);
}

/* 暗色下舞台与设备壳 */
:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 10% 0%, #3A2417 0%, transparent 42%),
    radial-gradient(circle at 100% 100%, #2E2014 0%, transparent 42%),
    var(--bg);
  color: var(--ink);
}
:root[data-theme="dark"] .stage-bar {
  background: rgba(22,17,12,0.85);
  border-bottom-color: var(--line);
}
:root[data-theme="dark"] .tool-group { background: var(--surface); border-color: var(--line); }
:root[data-theme="dark"] .side { background: var(--surface); border-left-color: var(--line); }
:root[data-theme="dark"] .side code { background: var(--bg-2); color: var(--brand-darker); }
:root[data-theme="dark"] .device { background: var(--surface); }
:root[data-theme="dark"] .app { background: var(--bg); }

/* 暗色组件适配 */
:root[data-theme="dark"] .tabbar { background: rgba(36,28,20,0.96); border-top-color: var(--line); }
:root[data-theme="dark"] .appbar { background: rgba(22,17,12,0.92); }
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .stat,
:root[data-theme="dark"] .quick-item,
:root[data-theme="dark"] .list-item,
:root[data-theme="dark"] .reminder,
:root[data-theme="dark"] .pet-card,
:root[data-theme="dark"] .cat-tab,
:root[data-theme="dark"] .calendar,
:root[data-theme="dark"] .chart,
:root[data-theme="dark"] .feed-card,
:root[data-theme="dark"] .onboard { background: var(--surface); border-color: var(--line-soft); }
:root[data-theme="dark"] .input, :root[data-theme="dark"] .textarea, :root[data-theme="dark"] .select { background: var(--bg-2); border-color: var(--line); }
:root[data-theme="dark"] .sheet, :root[data-theme="dark"] .sheet-foot { background: var(--surface); }
:root[data-theme="dark"] .sheet-foot { background: var(--bg-2); border-top-color: var(--line-soft); }
:root[data-theme="dark"] .btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
:root[data-theme="dark"] .chip { background: var(--surface); border-color: var(--line); }
:root[data-theme="dark"] .chip.brand { background: var(--brand-50); color: var(--brand-darker); }
:root[data-theme="dark"] .tag.brand { background: var(--brand-100); color: var(--brand-darker); }
:root[data-theme="dark"] .reminder.due-today { background: linear-gradient(90deg, rgba(251,191,36,.18) 0%, var(--surface) 55%); }
:root[data-theme="dark"] .reminder.overdue  { background: linear-gradient(90deg, rgba(248,113,113,.18) 0%, var(--surface) 62%); }
:root[data-theme="dark"] .feed-card-ill { background: rgba(74, 222, 128, 0.16); }
:root[data-theme="dark"] .feed-dot { background: var(--line); }
:root[data-theme="dark"] .onboard { background: linear-gradient(135deg, #2A1E14 0%, #241A12 100%); border-color: var(--brand-100); }
:root[data-theme="dark"] .onboard-step { background: var(--surface); border-color: var(--line-soft); }
:root[data-theme="dark"] .onboard-step.done { background: rgba(74, 222, 128, 0.12); border-color: rgba(74, 222, 128, 0.3); }
:root[data-theme="dark"] .onboard-close:hover { background: rgba(255, 255, 255, 0.08); }
:root[data-theme="dark"] .scrim { background: rgba(0,0,0,0.6); }

/* =====================================================================
   19. 动效系统
   ===================================================================== */
/* 页面进场：错峰上浮 */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(16px) scale(.99); }
  to   { opacity: 1; transform: none; }
}
.app-main > * { animation: pageIn .42s cubic-bezier(.22,1,.36,1) both; }
.app-main > *:nth-child(1) { animation-delay: .02s; }
.app-main > *:nth-child(2) { animation-delay: .07s; }
.app-main > *:nth-child(3) { animation-delay: .12s; }
.app-main > *:nth-child(4) { animation-delay: .17s; }
.app-main > *:nth-child(5) { animation-delay: .22s; }
.app-main > *:nth-child(6) { animation-delay: .27s; }
@media (prefers-reduced-motion: reduce) {
  .app-main > * { animation: none; }
}

/* 插画漂浮 */
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.hero-art { animation: floatY 4.5s ease-in-out infinite; }
.deco-paw { animation: floatY 6s ease-in-out infinite; }
.deco-paw.b { animation-duration: 7.5s; animation-delay: -2s; }
.deco-paw.c { animation-duration: 5.5s; animation-delay: -1s; }

/* Tab 弹性选择 */
.tabbar-item[aria-selected="true"] svg { transform: scale(1.12) translateY(-2px); transition: transform .28s cubic-bezier(.34,1.56,.64,1); }
.tabbar-fab { animation: fabIn .5s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes fabIn { from { transform: scale(.4) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
.tabbar-fab:active { transform: scale(.92); }

/* Toast 弹出 */
@keyframes toastPop {
  0% { opacity: 0; transform: translate(-50%, 18px) scale(.92); }
  60% { opacity: 1; transform: translate(-50%, 0) scale(1.04); }
  100% { transform: translate(-50%, 0) scale(1); }
}
.toast.show { animation: toastPop .36s cubic-bezier(.34,1.56,.64,1) both; }

/* 数字滚动 */
.count { font-variant-numeric: tabular-nums; }

/* 保存成功彩屑 */
.confetti {
  position: fixed; left: 0; top: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 400; overflow: hidden;
}
.confetti i {
  position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px;
  animation: confettiFall var(--d, 1.1s) cubic-bezier(.2,.6,.4,1) forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(105vh) rotate(540deg); opacity: 0; }
}

/* 骨架屏微光 */
@keyframes shimmer { 0% { background-position: -160px 0; } 100% { background-position: 160px 0; } }
.skeleton {
  background: linear-gradient(90deg, var(--line-soft) 25%, var(--line-warm) 50%, var(--line-soft) 75%);
  background-size: 320px 100%;
  animation: shimmer 1.2s infinite;
  border-radius: var(--r);
}

/* 通用淡入（弹层内容） */
@keyframes softIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sheet-body > * { animation: softIn .3s ease both; }
.sheet-body > *:nth-child(2) { animation-delay: .04s; }
.sheet-body > *:nth-child(3) { animation-delay: .08s; }
.sheet-body > *:nth-child(4) { animation-delay: .12s; }
.sheet-body > *:nth-child(5) { animation-delay: .16s; }

/* ---- 个人中心角色头像 ---- */
.profile-avatar { width: 92px; height: 92px; margin: 0 auto; border-radius: var(--r-full); display: grid; place-items: center; overflow: hidden; box-shadow: var(--sh-lg); }
.profile-avatar svg { width: 92px; height: 92px; display: block; }
:root[data-theme="dark"] .profile-avatar { box-shadow: 0 8px 24px rgba(0,0,0,.5); }

/* =====================================================================
   20. V1.1 模块：首页连击 + 我的页 + 账号云同步 + 徽章墙
   ===================================================================== */

/* ---- 20.1 首页喂食连击条（feed-streak） ---- */
.feed-streak {
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px dashed var(--line-warm);
  display: flex; flex-direction: column; gap: var(--s-2);
}
.fs-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); flex-wrap: wrap; }
.fs-txt {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2);
}
.fs-txt b { color: var(--brand-deep); font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.fs-txt.warn { color: var(--danger); }
.fs-txt.warn b { color: var(--danger); }
.fs-flame { color: var(--brand); display: inline-flex; }
.fs-flame svg { width: 13px; height: 13px; }
.fs-txt.warn .fs-flame { color: var(--danger); }
.fs-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-xs); font-weight: 600;
  padding: 3px 10px; border-radius: var(--r-full);
}
.fs-tag svg { width: 11px; height: 11px; }
.fs-tag.ok { background: var(--success-bg); color: var(--success); }
.fs-tag.alert { background: var(--danger-bg); color: var(--danger); animation: fsPulse 1.6s ease-in-out infinite; }
@keyframes fsPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,.16); } 50% { box-shadow: 0 0 0 5px rgba(220,38,38,0); } }
.fs-week {
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
  padding: 0 2px;
}
.wk-dot {
  flex: 1; height: 10px; border-radius: var(--r-full);
  background: var(--line-warm);
  position: relative;
}
.wk-dot.fill { background: linear-gradient(90deg, #7CE0A0, #16A34A); }
.wk-dot.today { box-shadow: inset 0 0 0 1.5px var(--brand); }
.wk-dot.fill.today { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.65); }
.wk-dot.today::after {
  content: ''; position: absolute; top: -3px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--brand);
}
.fs-week[aria-label] { position: relative; }
.fs-week:hover::before {
  content: attr(aria-label);
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 10px; padding: 3px 8px; border-radius: var(--r-xs);
  white-space: nowrap; z-index: 5; pointer-events: none;
}

/* ---- 20.2 我的页 hero + 分区 ---- */
.me-hero {
  text-align: center;
  padding: var(--s-6) var(--s-4) var(--s-5);
  background:
    radial-gradient(circle at 50% -20%, var(--brand-100) 0%, transparent 60%),
    var(--surface);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.me-avatar {
  width: 104px; height: 104px; margin-bottom: var(--s-2);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #FFFFFF 0%, var(--brand-50) 80%);
  display: grid; place-items: center;
  box-shadow: var(--sh-lg), inset 0 0 0 2px rgba(255,255,255,.6);
}
.me-avatar svg { width: 88px; height: 88px; display: block; }
.me-name { font-size: var(--fs-2xl); font-weight: 800; color: var(--ink); }
.me-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center;
  font-size: var(--fs-sm); color: var(--ink-3); margin-top: 2px;
}
.me-meta svg { width: 12px; height: 12px; color: var(--brand); }
.me-meta .pip { width: 3px; height: 3px; background: var(--ink-4); border-radius: 50%; }
.me-label {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-md); font-weight: 700; color: var(--ink-2);
  padding: 0 6px; margin: 2px 0 2px;
}
.me-label::before {
  content: ''; width: 4px; height: 14px; border-radius: var(--r-full);
  background: var(--brand-grad);
}
.me-foot {
  font-size: var(--fs-xs); color: var(--ink-4); text-align: center;
  padding: var(--s-3) var(--s-4) 2px; line-height: 1.6;
}
.me-hero + .me-label { margin-top: var(--s-2); }

/* ---- 20.3 账号卡（V1.0 系统托管 / V1.1 游客 / 已登录 / 同步中） ---- */
.ac-card {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  margin: 0 0 var(--s-2);
  position: relative; overflow: hidden;
}
.ac-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--accent-weight), var(--brand));
}
.ac-ic {
  position: relative; flex: 0 0 auto;
  width: 46px; height: 46px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, #F3E8FF, #EDE9FE);
  color: var(--accent-weight);
  display: grid; place-items: center;
  box-shadow: var(--sh-xs);
}
.ac-ic svg { width: 22px; height: 22px; }
.ac-ic .mini {
  position: absolute; right: -4px; top: -4px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--success); color: #fff;
  display: grid; place-items: center;
  border: 2px solid var(--surface);
}
.ac-ic .mini svg { width: 9px; height: 9px; }
.ac-ic.spin svg { animation: acSpin 1.1s linear infinite; }
@keyframes acSpin { to { transform: rotate(360deg); } }
.ac-av {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, #2BD96E, #07C160);
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(7,193,96,.35);
}
.ac-av svg { width: 22px; height: 22px; }
.ac-main { flex: 1; min-width: 0; }
.ac-t {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: var(--fs-base); font-weight: 700; color: var(--ink);
}
.ac-d { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 2px; line-height: 1.5; }
.ac-btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: var(--r-full);
  font-size: var(--fs-sm); font-weight: 600; white-space: nowrap;
  transition: transform .15s, box-shadow .15s;
}
.ac-btn svg { width: 15px; height: 15px; }
.ac-btn:active { transform: scale(.95); }
.ac-card.guest .ac-btn {
  background: linear-gradient(135deg, #2BD96E, #07C160); color: #fff;
  box-shadow: 0 4px 12px rgba(7,193,96,.3);
}
.ac-card.user .ac-btn {
  background: var(--brand-50); color: var(--brand-deep);
  box-shadow: inset 0 0 0 1px var(--brand-100);
}
.ac-card.user .ac-btn:hover { background: var(--brand-100); }
.ac-out {
  flex: 0 0 auto; font-size: var(--fs-xs); color: var(--ink-4);
  padding: 6px 4px; border-radius: var(--r-xs); text-decoration: none;
  transition: color .15s;
}
.ac-out:hover { color: var(--danger); }
.ac-card.user .ac-out { position: absolute; right: 8px; top: 6px; }
.ac-card.user { padding: var(--s-4) var(--s-4) var(--s-5); }
.ac-card.user .ac-main { padding-right: 116px; }
.ac-card.user .ac-btn { position: absolute; right: 8px; bottom: 8px; }
.ac-card.error::before { background: linear-gradient(180deg, var(--danger), var(--brand)); }
.ac-card.error .ac-ic { background: var(--danger-bg); color: var(--danger); }
.ac-card.error .ac-btn { background: var(--danger-bg); color: var(--danger); box-shadow: inset 0 0 0 1px rgba(220,38,38,.15); }
.ac-card.error .ac-btn:hover { background: rgba(220,38,38,.12); }
.v-badge {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 700; letter-spacing: .02em;
  padding: 2px 7px; border-radius: var(--r-full);
  background: #F3E8FF; color: #7C3AED;
  border: 1px solid #DDD0F5;
  transform: translateY(-1px);
}
.v-badge.gray { background: var(--bg-2); color: var(--ink-3); border-color: var(--line); }

/* ---- 20.4 微信授权弹层 ---- */
.wx-auth {
  display: flex; flex-direction: column; align-items: center;
  padding: var(--s-3) var(--s-2) var(--s-2);
}
.wx-logo {
  width: 76px; height: 76px; border-radius: 22px;
  background: linear-gradient(135deg, #2BD96E, #07C160);
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(7,193,96,.35);
  margin-bottom: var(--s-4);
}
.wx-logo svg { width: 40px; height: 40px; }
.wx-app { font-size: var(--fs-xl); font-weight: 800; color: var(--ink); }
.wx-scope { font-size: var(--fs-md); color: var(--ink-3); margin-top: 4px; }
.wx-tags { display: flex; gap: var(--s-2); margin-top: var(--s-4); }
.wx-tags span {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2);
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 6px 14px; border-radius: var(--r-full);
}
.wx-tags span svg { width: 13px; height: 13px; color: var(--brand); }
.wx-note {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  font-size: var(--fs-xs); color: var(--ink-3); margin-top: var(--s-4);
}
.wx-note svg { width: 12px; height: 12px; }
.wx-sec {
  margin-top: var(--s-3);
  font-size: var(--fs-xs); color: var(--ink-3);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  background: var(--bg-2);
  border: 1px dashed var(--line);
  border-radius: var(--r-sm);
  padding: 8px 14px; line-height: 1.6; max-width: 300px;
}
.btn-wx {
  background: linear-gradient(135deg, #2BD96E, #07C160);
  color: #fff; box-shadow: 0 6px 16px rgba(7,193,96,.35);
}
.btn-wx:hover { box-shadow: 0 8px 20px rgba(7,193,96,.45); }

/* ---- 20.5 隐私政策弹层 ---- */
.privacy-lead {
  font-size: var(--fs-base); color: var(--ink); line-height: 1.7;
  background: linear-gradient(135deg, var(--brand-50), transparent);
  border: 1px solid var(--line-soft);
  border-radius: var(--r); padding: var(--s-4);
  margin-bottom: var(--s-3);
}
.privacy-lead b { color: var(--brand-deep); }
.privacy-row {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-3) 0;
  border-bottom: 1px dashed var(--line-soft);
}
.privacy-row:last-of-type { border-bottom: 0; }
.pr-ic {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: var(--r);
  background: var(--bg-2); display: grid; place-items: center;
}
.pr-ic svg { width: 18px; height: 18px; }
.pr-t { font-size: var(--fs-base); font-weight: 700; color: var(--ink); }
.pr-d { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 2px; line-height: 1.6; }
.privacy-note {
  font-size: var(--fs-xs); color: var(--ink-4); text-align: center;
  margin-top: var(--s-2); padding-top: var(--s-3);
  border-top: 1px dashed var(--line-soft);
}

/* =====================================================================
   21. 徽章墙（S / A / B 三档 · 派生计算不落库）
   ===================================================================== */
.bw-summary {
  display: flex; align-items: center; gap: var(--s-5);
  padding: var(--s-5);
  background:
    radial-gradient(circle at 12% 0%, var(--brand-100) 0%, transparent 55%),
    var(--surface);
  overflow: hidden; position: relative;
}
.bw-ring {
  flex: 0 0 auto; width: 108px; height: 108px; border-radius: 50%;
  background: conic-gradient(var(--brand) calc(var(--p, 0) * 1%), var(--line-warm) 0);
  display: grid; place-items: center;
  box-shadow: var(--sh-sm);
}
.bw-ring-in {
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.bw-ring-in .count { font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.bw-ring-in em { font-style: normal; font-size: var(--fs-sm); color: var(--ink-3); font-weight: 600; }
.bw-sum-txt { flex: 1; min-width: 0; }
.bw-sum-title { font-size: var(--fs-lg); font-weight: 800; color: var(--ink); }
.bw-sum-sub { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 4px; line-height: 1.6; }

.bw-group { margin-top: var(--s-5); }
.bw-group-head {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 0 2px; margin-bottom: var(--s-3);
}
.bw-gtag {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: var(--r);
  display: grid; place-items: center;
  font-size: var(--fs-md); font-weight: 800; color: #fff;
}
.bw-gtag.t-s { background: linear-gradient(135deg, #FBBF24, #F59E0B); box-shadow: 0 3px 8px rgba(245,158,11,.35); }
.bw-gtag.t-a { background: linear-gradient(135deg, #A78BFA, #8B5CF6); box-shadow: 0 3px 8px rgba(139,92,246,.35); }
.bw-gtag.t-b { background: linear-gradient(135deg, #38BDF8, #0EA5E9); box-shadow: 0 3px 8px rgba(14,165,233,.35); }
.bw-gt { flex: 1; min-width: 0; }
.bw-group-name { font-size: var(--fs-base); font-weight: 700; color: var(--ink); }
.bw-group-sub { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 1px; }
.bw-group-count { flex: 0 0 auto; font-size: var(--fs-md); font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bw-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }

.bw-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: var(--s-4) var(--s-3) var(--s-3);
  box-shadow: var(--sh-xs);
  transition: transform .15s, box-shadow .15s;
}
.bw-card:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.bw-card.on { border-color: var(--brand-100); }
.bw-card.off { background: linear-gradient(180deg, var(--bg-2), var(--surface)); }
.bw-tier {
  position: absolute; top: 8px; left: 8px;
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800; color: #fff;
  box-shadow: var(--sh-xs);
}
.bw-tier.t-s { background: linear-gradient(135deg, #FBBF24, #F59E0B); }
.bw-tier.t-a { background: linear-gradient(135deg, #A78BFA, #8B5CF6); }
.bw-tier.t-b { background: linear-gradient(135deg, #38BDF8, #0EA5E9); }
.bw-medal {
  position: relative; overflow: hidden;
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  margin: 4px 0 var(--s-2);
  box-shadow: 0 6px 14px rgba(0,0,0,.1);
}
.bw-medal.on {
  background: radial-gradient(circle at 32% 26%, rgba(255,255,255,.45), transparent 46%),
              linear-gradient(135deg, #FFD08A 0%, #FF9A5C 55%, #FF7A45 100%);
  box-shadow: 0 8px 18px rgba(255,122,69,.32);
}
.bw-card.off .bw-medal.off {
  background: linear-gradient(135deg, #E9DFD3, #D8CCBD);
  color: #fff;
  box-shadow: inset 0 2px 6px rgba(120,90,60,.18);
}
.bw-medal.t-s.on { background: radial-gradient(circle at 32% 26%, rgba(255,255,255,.5), transparent 46%), linear-gradient(135deg, #FFE29A, #FBBF24 60%, #F59E0B); box-shadow: 0 8px 18px rgba(245,158,11,.34); }
.bw-medal.t-a.on { background: radial-gradient(circle at 32% 26%, rgba(255,255,255,.5), transparent 46%), linear-gradient(135deg, #C4B5FD, #8B5CF6); box-shadow: 0 8px 18px rgba(139,92,246,.32); }
.bw-medal.t-b.on { background: radial-gradient(circle at 32% 26%, rgba(255,255,255,.5), transparent 46%), linear-gradient(135deg, #7DD3FC, #0EA5E9); box-shadow: 0 8px 18px rgba(14,165,233,.32); }
.bw-medal.t-s { color: #fff; }
.bw-ic svg { width: 28px; height: 28px; }
.bw-medal.off { color: #F7F1E8; }
.bw-lock {
  position: absolute; right: -1px; bottom: -1px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface); color: var(--ink-3);
  display: grid; place-items: center;
  box-shadow: var(--sh-xs); border: 1px solid var(--line);
}
.bw-lock svg { width: 10px; height: 10px; }
.bw-shine {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 48%, transparent 62%);
  animation: bwShine 3.2s ease-in-out infinite;
}
@keyframes bwShine { 0%, 60% { transform: translateX(-110%); } 100% { transform: translateX(110%); } }
.bw-name { font-size: var(--fs-md); font-weight: 700; color: var(--ink); line-height: 1.35; }
.bw-desc { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 2px; line-height: 1.5; min-height: 2.9em; }
.bw-state { margin-top: auto; padding-top: var(--s-2); width: 100%; }
.bw-state.off { min-height: 40px; display: flex; flex-direction: column; justify-content: flex-end; gap: 5px; }
.bw-got {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-xs); font-weight: 700; color: var(--success);
  background: var(--success-bg); border-radius: var(--r-full);
  padding: 3px 10px;
}
.bw-got svg { width: 10px; height: 10px; }
.bw-prog { font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bw-track {
  width: 100%; height: 5px; border-radius: var(--r-full);
  background: var(--line-warm); overflow: hidden;
}
.bw-track i { display: block; height: 100%; border-radius: var(--r-full); background: linear-gradient(90deg, #FFC08A, #FF7A45); transition: width .5s cubic-bezier(.22,1,.36,1); }
.bw-foot {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: var(--fs-xs); color: var(--ink-4);
  padding: var(--s-4) 0 var(--s-2); text-align: center; line-height: 1.6;
}
.bw-foot svg { width: 12px; height: 12px; color: var(--brand); }

/* ---- 徽章墙响应式：宽容器 3~4 列 ---- */
@container app (min-width: 480px) { .bw-grid { grid-template-columns: repeat(3, 1fr); } }
@container app (min-width: 760px) { .bw-grid { grid-template-columns: repeat(4, 1fr); } .bw-card { padding: var(--s-4); } }

/* =====================================================================
   22. 暗色适配（V1.1 新增模块）
   ===================================================================== */
:root[data-theme="dark"] .fs-txt.warn { color: #FCA5A5; }
:root[data-theme="dark"] .fs-txt.warn b { color: #FCA5A5; }
:root[data-theme="dark"] .fs-txt.warn .fs-flame { color: #FCA5A5; }
:root[data-theme="dark"] .wk-dot { background: var(--line); }
:root[data-theme="dark"] .wk-dot.fill { background: linear-gradient(90deg, #4ADE80, #22C55E); }
:root[data-theme="dark"] .wk-dot.today { box-shadow: inset 0 0 0 1.5px var(--brand); }
:root[data-theme="dark"] .feed-streak { border-top-color: var(--line); }
:root[data-theme="dark"] .me-hero { background: radial-gradient(circle at 50% -20%, var(--brand-100) 0%, transparent 60%), var(--surface); }
:root[data-theme="dark"] .me-avatar { box-shadow: 0 10px 26px rgba(0,0,0,.5); background: radial-gradient(circle at 30% 25%, #3A2A1C 0%, var(--brand-50) 80%); }
:root[data-theme="dark"] .ac-card::before { background: linear-gradient(180deg, #C4B5FD, #FF9156); }
:root[data-theme="dark"] .ac-card .ac-ic { background: linear-gradient(135deg, #3A2A4D, #2E2140); }
:root[data-theme="dark"] .ac-ic .mini { border-color: var(--surface); }
:root[data-theme="dark"] .ac-card.guest .ac-btn { background: linear-gradient(135deg, #2BD96E, #07C160); color: #fff; }
:root[data-theme="dark"] .ac-card.user .ac-btn { background: var(--brand-50); color: var(--brand-darker); }
:root[data-theme="dark"] .ac-card.user .ac-btn:hover { background: var(--brand-100); }
:root[data-theme="dark"] .ac-card.user .ac-out { color: var(--ink-4); }
:root[data-theme="dark"] .ac-card.error .ac-ic { background: rgba(248,113,113,.18); color: #FCA5A5; }
:root[data-theme="dark"] .ac-card.error .ac-btn { background: rgba(248,113,113,.16); color: #FCA5A5; box-shadow: inset 0 0 0 1px rgba(248,113,113,.25); }
:root[data-theme="dark"] .ac-card.error .ac-btn:hover { background: rgba(248,113,113,.22); }
:root[data-theme="dark"] .v-badge { background: rgba(167,139,250,.18); color: #C4B5FD; border-color: rgba(167,139,250,.3); }
:root[data-theme="dark"] .v-badge.gray { background: var(--bg-2); color: var(--ink-3); border-color: var(--line); }
:root[data-theme="dark"] .wx-tags span { background: var(--bg-2); border-color: var(--line); }
:root[data-theme="dark"] .wx-sec { background: var(--bg-2); border-color: var(--line); }
:root[data-theme="dark"] .privacy-lead { background: linear-gradient(135deg, var(--brand-50), transparent); border-color: var(--line-soft); }
:root[data-theme="dark"] .privacy-row { border-bottom-color: var(--line); }
:root[data-theme="dark"] .privacy-note { border-top-color: var(--line); }
:root[data-theme="dark"] .bw-summary { background: radial-gradient(circle at 12% 0%, var(--brand-100) 0%, transparent 55%), var(--surface); }
:root[data-theme="dark"] .bw-ring { background: conic-gradient(var(--brand) calc(var(--p, 0) * 1%), var(--line) 0); }
:root[data-theme="dark"] .bw-ring-in { background: var(--surface); }
:root[data-theme="dark"] .bw-card.on { border-color: var(--brand-200); }
:root[data-theme="dark"] .bw-card.off { background: linear-gradient(180deg, var(--bg-2), var(--surface)); }
:root[data-theme="dark"] .bw-medal.off { background: linear-gradient(135deg, #4A3B2E, #3A2C20); color: #8A7560; }
:root[data-theme="dark"] .bw-lock { background: var(--surface); border-color: var(--line); color: var(--ink-3); }
:root[data-theme="dark"] .bw-shine { background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.14) 48%, transparent 62%); }
:root[data-theme="dark"] .bw-track { background: var(--line); }
