/* =========================================================
   健身助手 · 暗黑霓虹主题
   纯黑底 + 荧光绿 + 电光蓝，像健身房器械屏
   ========================================================= */

:root {
  /* —— 默认就是暗色 —— */
  --bg: #050506;
  --bg-2: #0a0b0d;
  --card: #0d0f12;
  --card-2: #13161a;
  --text: #f4f7f9;
  --text-2: #a3aebc;
  --muted: #5d6875;

  --line: #1b2129;
  --line-2: #262f3a;

  --neon: #c6ff3d;
  --neon-2: #9dff00;
  --neon-dim: rgba(198, 255, 61, .12);
  --cyan: #22d3ee;
  --cyan-dim: rgba(34, 211, 238, .12);
  --pink: #f472b6;

  --brand: var(--neon);
  --brand-text: var(--neon);
  --brand-soft: var(--neon-dim);

  --warn-bg: #2a2109;
  --warn-text: #fbbf24;
  --info-bg: #0a2230;
  --info-text: #67e8f9;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;

  --sh-1: 0 1px 2px rgba(0, 0, 0, .6);
  --sh-2: 0 8px 28px rgba(0, 0, 0, .55);
  --glow: 0 0 0 1px rgba(198, 255, 61, .35), 0 0 22px rgba(198, 255, 61, .18);
  --glow-strong: 0 0 0 1px rgba(198, 255, 61, .6), 0 0 30px rgba(198, 255, 61, .35);
}

/* —— 浅色模式（备用） —— */
[data-theme="light"] {
  --bg: #f4f6f8;
  --bg-2: #eef1f4;
  --card: #ffffff;
  --card-2: #f7f9fa;
  --text: #101418;
  --text-2: #48525e;
  --muted: #8b95a1;
  --line: #e3e8ed;
  --line-2: #d3dae1;
  --neon: #16a34a;
  --neon-2: #15803d;
  --neon-dim: rgba(22, 163, 74, .10);
  --cyan: #0891b2;
  --cyan-dim: rgba(8, 145, 178, .10);
  --brand: #16a34a;
  --brand-text: #15803d;
  --brand-soft: rgba(22, 163, 74, .10);
  --warn-bg: #fffbeb;
  --warn-text: #b45309;
  --info-bg: #eff6ff;
  --info-text: #1d4ed8;
  --sh-1: 0 1px 2px rgba(16, 24, 40, .05);
  --sh-2: 0 6px 22px rgba(16, 24, 40, .08);
  --glow: 0 0 0 1px rgba(22, 163, 74, .25);
  --glow-strong: 0 0 0 1px rgba(22, 163, 74, .45);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
/* 手机上不要横向滚动：Tab 栏和卡片都得留在屏幕内 */
html, body { overflow-x: hidden; max-width: 100%; }

/* 背景：纯黑 + 极淡网格，无照片 */
html {
  background: #050506;
}
[data-theme="light"] { background: #f4f6f8; }

body {
  margin: 0 auto;
  max-width: 520px;
  padding: 0 16px calc(108px + env(safe-area-inset-bottom));
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
               "Microsoft YaHei", "Helvetica Neue", sans-serif;
  color: var(--text);
  background-color: transparent;
  background-image:
    radial-gradient(70% 42% at 50% 0%, rgba(198, 255, 61, .08) 0%, transparent 70%),
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 100% 100%, 44px 44px, 44px 44px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum";
  transition: background-color .3s, color .3s;
}
[data-theme="light"] body {
  background-color: transparent;
  background-image:
    radial-gradient(70% 42% at 50% 0%, rgba(22, 163, 74, .06) 0%, transparent 70%);
  background-size: 100% 100%;
}

/* ================= 顶栏 ================= */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 24px 2px 16px; }
.topbar h1 {
  margin: 0; font-size: 25px; font-weight: 900; letter-spacing: -.2px;
  color: var(--text);
  text-shadow: 0 0 18px rgba(198, 255, 61, .25);
}
[data-theme="light"] .topbar h1 { text-shadow: none; }
.topbar .sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; letter-spacing: .3px; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--card); color: var(--neon); font-size: 17px; cursor: pointer;
  transition: all .2s;
}
.icon-btn:hover { border-color: var(--neon); box-shadow: var(--glow); }
.icon-btn:active { transform: scale(.9); }

/* ================= 卡片 ================= */
/* 「今天吃了什么」里输入框 + 添加按钮同一行：输入框吃掉剩余宽度，按钮不被挤出去 */
.row > input#manualFood { flex: 1 1 auto; width: auto; min-width: 0; }
.row > button#btnAddFood { flex: 0 0 auto; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 13px;
  box-shadow: var(--sh-1), inset 0 1px 0 rgba(255, 255, 255, .035);
  transition: border-color .2s, box-shadow .2s, background .25s;
}
.card.anim { animation: rise .42s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.card h2 {
  font-size: 14px; font-weight: 800; margin: 0 0 14px;
  display: flex; align-items: center; gap: 9px;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--text-2);
}
.card h2::before {
  content: ""; width: 3px; height: 13px; border-radius: 1px;
  background: var(--neon); box-shadow: 0 0 10px var(--neon);
}

.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ================= 主视觉 ================= */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 100% at 12% 0%, rgba(198, 255, 61, .14) 0%, transparent 55%),
    radial-gradient(100% 80% at 100% 100%, rgba(34, 211, 238, .12) 0%, transparent 60%),
    #0b0d10;
  border: 1px solid rgba(198, 255, 61, .28);
  border-radius: var(--r-xl);
  padding: 22px 20px;
  margin-bottom: 14px;
  box-shadow: 0 0 34px rgba(198, 255, 61, .10), inset 0 0 40px rgba(198, 255, 61, .03);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 60%, rgba(198, 255, 61, .04) 100%);
}
.hero .h-title {
  font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--neon); opacity: .85; font-weight: 700;
}
.hero .h-value {
  font-size: 46px; font-weight: 900; letter-spacing: -2px; margin: 6px 0 4px;
  color: var(--neon); line-height: 1;
  text-shadow: 0 0 26px rgba(198, 255, 61, .45);
}
.hero .h-value small {
  font-size: 13px; font-weight: 700; letter-spacing: 1px;
  margin-left: 6px; color: var(--text-2); text-shadow: none;
}
.hero .h-line { font-size: 12.5px; color: var(--text-2); line-height: 1.6; position: relative; z-index: 1; }
.hero .h-line b { color: var(--neon); }
.hero .row { position: relative; z-index: 1; margin-top: 16px; }
.hero .chip {
  background: rgba(255, 255, 255, .04); color: var(--text-2);
  border: 1px solid var(--line-2);
}
.hero .chip.on {
  background: var(--neon); color: #06070a; border-color: var(--neon);
  font-weight: 900; box-shadow: 0 0 16px rgba(198, 255, 61, .45);
}
.hero input[type=number] {
  background: rgba(255, 255, 255, .04); border-color: var(--line-2); color: var(--text);
}
[data-theme="light"] .hero {
  background: linear-gradient(135deg, #ecfdf5, #ffffff);
  border-color: rgba(22, 163, 74, .3);
  box-shadow: var(--sh-2);
}
[data-theme="light"] .hero .chip.on { background: #16a34a; color: #fff; }

/* ================= 表单 ================= */
.row { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
label.f { font-size: 11px; color: var(--muted); display: block; margin-bottom: 5px; letter-spacing: .5px; font-weight: 600; }

input[type=number], input[type=text], input[type=date], select {
  width: 100%; padding: 11px 13px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--card-2); color: var(--text);
  font-size: 14px; outline: none; font-family: inherit;
  transition: border-color .18s, box-shadow .18s;
}
input:focus, select:focus {
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(198, 255, 61, .12);
}

.chip {
  display: inline-block; font-size: 12px; padding: 7px 13px; border-radius: 999px;
  background: var(--card-2); color: var(--text-2);
  border: 1px solid var(--line-2); cursor: pointer;
  transition: all .16s; font-weight: 600;
}
.chip.on {
  background: var(--neon-dim); color: var(--neon);
  border-color: var(--neon); box-shadow: 0 0 14px rgba(198, 255, 61, .18);
}
.chipbtn {
  font-size: 12px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--card-2); color: var(--text);
  font-weight: 600; font-family: inherit; transition: all .16s;
}
.chipbtn:hover { border-color: var(--neon); color: var(--neon); }
.chipbtn:active { transform: scale(.95); }

.btn {
  padding: 13px 18px; border-radius: var(--r-md); border: none; cursor: pointer;
  font-size: 14px; font-weight: 800; font-family: inherit;
  letter-spacing: .4px; transition: transform .14s, box-shadow .2s, opacity .2s;
}
.btn.primary {
  background: var(--neon); color: #06070a;
  box-shadow: 0 0 0 1px rgba(198, 255, 61, .5), 0 6px 22px rgba(198, 255, 61, .25);
}
.btn.primary:active { transform: scale(.97); box-shadow: 0 0 0 1px rgba(198, 255, 61, .5); }
.btn.ghost {
  background: transparent; color: var(--neon);
  border: 1px solid rgba(198, 255, 61, .45);
}
.btn.ghost:hover { box-shadow: 0 0 18px rgba(198, 255, 61, .2); border-color: var(--neon); }
.btn.ghost:active { transform: scale(.97); background: var(--neon-dim); }
.btn:disabled { opacity: .3; cursor: not-allowed; box-shadow: none; transform: none; }
.btn.sm { padding: 9px 14px; font-size: 12.5px; border-radius: var(--r-sm); }

/* ================= 拍照区 ================= */
#camWrap { display: none; position: relative; margin-bottom: 12px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line-2); }
#video { width: 100%; display: block; background: #000; }
#previewWrap { position: relative; display: none; margin-top: 12px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line-2); }
#preview { width: 100%; display: block; }
.scan {
  position: absolute; left: 0; right: 0; height: 2px; top: 0;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 16px 3px rgba(34, 211, 238, .7);
  animation: scan 1.2s ease-in-out infinite;
}
@keyframes scan { 0% { top: 0 } 50% { top: calc(100% - 2px) } 100% { top: 0 } }

/* ================= 识别结果 ================= */
.dish { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.dish .name { font-size: 25px; font-weight: 900; letter-spacing: -.6px; color: var(--text); }
.dish .conf {
  font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px;
  background: var(--neon-dim); color: var(--neon); border: 1px solid rgba(198, 255, 61, .35);
  letter-spacing: .6px;
}
.en { font-size: 11.5px; color: var(--muted); margin-top: 7px; letter-spacing: .3px; }
.warn {
  margin-top: 12px; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--warn-bg); color: var(--warn-text); font-size: 12.5px; line-height: 1.55;
  border: 1px solid rgba(251, 191, 36, .2);
}
.tip {
  margin-top: 12px; padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--neon-dim); color: var(--neon);
  font-size: 13px; line-height: 1.65;
  border-left: 2px solid var(--neon);
}
.tip.blue { background: var(--cyan-dim); color: var(--info-text); border-left-color: var(--cyan); }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.cell {
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 12px 6px; text-align: center;
}
.cell .v {
  font-size: 20px; font-weight: 900; letter-spacing: -.5px; color: var(--neon);
  text-shadow: 0 0 14px rgba(198, 255, 61, .25);
}
.cell .k { font-size: 10px; color: var(--muted); margin-top: 3px; letter-spacing: .4px; }

.rings { display: flex; justify-content: space-around; margin-top: 18px; }
.ring-item { text-align: center; }
.ring-item .lab { font-size: 10px; color: var(--muted); margin-top: 5px; line-height: 1.45; letter-spacing: .3px; }
.ring-item svg { display: block; margin: 0 auto; filter: drop-shadow(0 0 6px currentColor); }

/* ================= 对话 ================= */
.ask { display: flex; gap: 8px; margin-top: 12px; }
.ask input { flex: 1; border-radius: 999px; }
.ask button {
  padding: 0 20px; border-radius: 999px; border: none; cursor: pointer;
  background: var(--neon); color: #06070a; font-weight: 900; font-size: 13px;
  font-family: inherit;
}
.quick { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.msg { margin-top: 12px; display: flex; animation: rise .3s ease both; }
.msg .bubble {
  max-width: 86%; padding: 11px 14px; border-radius: 16px;
  font-size: 13.5px; line-height: 1.65; white-space: pre-wrap;
}
.msg.me { justify-content: flex-end; }
.msg.me .bubble {
  background: var(--neon); color: #06070a; font-weight: 600;
  border-bottom-right-radius: 5px; box-shadow: 0 0 20px rgba(198, 255, 61, .25);
}
.msg.ai .bubble {
  background: var(--card-2); color: var(--text);
  border: 1px solid var(--line-2); border-bottom-left-radius: 5px;
}
.msg .mode { font-size: 9.5px; color: var(--muted); margin-top: 5px; text-align: right; letter-spacing: .5px; }
.loading { text-align: center; color: var(--muted); font-size: 12.5px; padding: 16px; letter-spacing: .5px; }

/* ================= 计划 ================= */
.plan-item {
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px; margin-bottom: 9px; cursor: pointer;
  background: var(--card-2); transition: all .18s;
}
.plan-item:hover { border-color: rgba(198, 255, 61, .45); box-shadow: 0 0 20px rgba(198, 255, 61, .08); }
.plan-item.on { border-color: var(--neon); background: var(--neon-dim); box-shadow: var(--glow); }
.plan-item .t { font-weight: 800; font-size: 14px; letter-spacing: .2px; }
.plan-item .d { font-size: 12px; color: var(--text-2); margin-top: 5px; line-height: 1.55; }
.session { margin-top: 14px; }
.session h3 {
  font-size: 11.5px; margin: 0 0 8px; color: var(--neon); font-weight: 800;
  letter-spacing: 1.2px; text-transform: uppercase;
  display: flex; align-items: center; gap: 6px;
}
.session h3::before { content: "▸"; }
.ex-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.ex-row:last-child { border-bottom: none; }
.ex-row .sets {
  color: var(--neon); font-size: 11.5px; font-weight: 700;
  background: var(--neon-dim); padding: 3px 9px; border-radius: 999px;
  border: 1px solid rgba(198, 255, 61, .2);
}

/* ================= 日历 ================= */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 8px; }
.cal .wd { text-align: center; font-size: 10px; color: var(--muted); padding: 5px 0; font-weight: 700; letter-spacing: .5px; }
.cal .d {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 9px; font-size: 12px; background: var(--card-2);
  color: var(--muted); border: 1px solid transparent;
}
.cal .d.on {
  background: var(--neon); color: #06070a; font-weight: 900;
  box-shadow: 0 0 16px rgba(198, 255, 61, .45);
}
.cal .d.today { border-color: var(--neon); color: var(--neon); font-weight: 800; }
.cal .d.empty { background: transparent; }

/* ================= 图表 ================= */
.chart-wrap { margin-top: 10px; }
.chart-wrap svg { width: 100%; height: auto; display: block; overflow: visible; }
.empty-hint { text-align: center; color: var(--muted); font-size: 12.5px; padding: 24px 0; letter-spacing: .3px; }
.empty-hint::before { content: "◌"; display: block; font-size: 22px; margin-bottom: 8px; color: var(--line-2); }

/* ================= 底部标签栏 ================= */
.tabbar {
  position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50;
  transform: translateX(-50%);
  width: min(488px, calc(100% - 24px));
  display: flex; gap: 4px;
  background: rgba(10, 11, 13, .88);
  border: 1px solid var(--line-2);
  border-radius: 20px;
  padding: 7px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .7);
  backdrop-filter: blur(16px);
}
[data-theme="light"] .tabbar { background: rgba(255, 255, 255, .9); }
.tabbar button {
  flex: 1; background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10px; color: var(--muted); padding: 8px 0;
  border-radius: 14px; transition: all .2s;
  font-family: inherit; font-weight: 700; letter-spacing: .5px;
}
.tabbar button svg { width: 21px; height: 21px; stroke-width: 1.8; }
.tabbar button.on {
  color: var(--neon); background: var(--neon-dim);
  box-shadow: inset 0 0 0 1px rgba(198, 255, 61, .25);
}
.tabbar button.on svg { filter: drop-shadow(0 0 6px rgba(198, 255, 61, .7)); }
.tabbar button:active { transform: scale(.94); }

.page { display: none; }
.page.on { display: block; }

/* ================= Toast ================= */
.toast {
  position: fixed; left: 50%; bottom: 104px;
  transform: translateX(-50%) translateY(16px);
  background: rgba(198, 255, 61, .95); color: #06070a;
  padding: 11px 20px; border-radius: 999px;
  font-size: 12.5px; font-weight: 800; letter-spacing: .3px;
  opacity: 0; pointer-events: none; transition: all .28s;
  z-index: 99; max-width: 80vw; text-align: center;
  box-shadow: 0 0 26px rgba(198, 255, 61, .45);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ================= 其他 ================= */
.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 0; font-size: 13px; border-bottom: 1px solid var(--line);
}
.stat-row:last-child { border-bottom: none; }
.stat-row b { color: var(--neon); font-weight: 800; }
footer {
  text-align: center; font-size: 10.5px; color: var(--muted);
  padding: 12px 0 16px; line-height: 1.7; letter-spacing: .3px;
}

/* ================= 健身版：主视觉进度 ================= */
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; position: relative; z-index: 1; }
.h-bars { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; position: relative; z-index: 1; }
.hbar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.hbar i {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, #9dff00, #c6ff3d);
  box-shadow: 0 0 12px rgba(198, 255, 61, .55);
  transition: width .65s cubic-bezier(.16, 1, .3, 1);
}
.h-bars .hbar:nth-child(2) i {
  background: linear-gradient(90deg, #22d3ee, #67e8f9);
  box-shadow: 0 0 12px rgba(34, 211, 238, .5);
}

/* ================= 连续打卡条 ================= */
.streak-bar {
  display: flex; align-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px 8px; margin-bottom: 13px;
  box-shadow: var(--sh-1), inset 0 1px 0 rgba(255, 255, 255, .035);
}
.streak-item { flex: 1; text-align: center; }
.streak-num {
  display: block; font-size: 26px; font-weight: 900; color: var(--neon); line-height: 1.1;
  text-shadow: 0 0 20px rgba(198, 255, 61, .45);
}
.streak-lab { font-size: 10px; color: var(--muted); letter-spacing: .8px; }
.streak-sep { width: 1px; height: 30px; background: var(--line-2); }

/* ================= 今日训练卡 ================= */
.w-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.w-title { font-size: 17px; font-weight: 900; letter-spacing: -.3px; }
.w-sub { font-size: 12px; color: var(--neon); margin-top: 5px; letter-spacing: .6px; font-weight: 700; }
.w-count { font-size: 26px; font-weight: 900; color: var(--neon); text-align: right; line-height: 1; }
.w-count small { display: block; font-size: 10px; color: var(--muted); font-weight: 600; margin-top: 4px; letter-spacing: .5px; }
.w-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.w-row:last-of-type { border-bottom: none; }
.w-idx { font-size: 11px; color: var(--muted); font-weight: 900; width: 22px; letter-spacing: .5px; }
.w-name { flex: 1; font-size: 14px; font-weight: 600; }
.w-sets {
  font-size: 12px; font-weight: 900; color: var(--neon);
  background: var(--neon-dim); padding: 4px 10px; border-radius: 8px;
  border: 1px solid rgba(198, 255, 61, .18);
}

/* ================= 动效与氛围 ================= */
/* 背景：两团很淡的霓虹光雾，慢慢漂，不抢内容 */
html { position: relative; }
html::before {
  content: "";
  position: fixed; inset: -10%;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(42% 32% at 18% 12%, rgba(198, 255, 61, .10), transparent 70%),
    radial-gradient(38% 30% at 86% 6%, rgba(34, 211, 238, .08), transparent 70%);
  animation: drift 22s ease-in-out infinite alternate;
}
body { position: relative; z-index: 1; }
[data-theme="light"] html::before { opacity: .45; }
@keyframes drift {
  from { transform: translate3d(-1.5%, 0, 0) scale(1); }
  to   { transform: translate3d(1.5%, -2%, 0) scale(1.05); }
}

/* 切页面时，卡片一张接一张浮上来 */
.page.enter .card { animation: rise .46s cubic-bezier(.16, 1, .3, 1) both; }
.page.enter .card:nth-child(1) { animation-delay: .02s; }
.page.enter .card:nth-child(2) { animation-delay: .07s; }
.page.enter .card:nth-child(3) { animation-delay: .12s; }
.page.enter .card:nth-child(4) { animation-delay: .17s; }
.page.enter .card:nth-child(5) { animation-delay: .22s; }

/* 今天那一格轻微呼吸 */
.cal .d.today { animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 1px rgba(198, 255, 61, .35), 0 0 0 rgba(198, 255, 61, 0); }
  50%      { box-shadow: 0 0 0 1px rgba(198, 255, 61, .75), 0 0 18px rgba(198, 255, 61, .28); }
}

/* 本周柱状图：渲染后从 0 长上去 */
.wk-bar { transition: height .55s cubic-bezier(.16, 1, .3, 1); }

/* 连续 3 天以上，火苗跳一跳 */
.streak-num.hot { display: inline-block; animation: hot 1.8s ease-in-out infinite; }
@keyframes hot {
  0%, 100% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 6px rgba(198, 255, 61, .35)); }
  50%      { transform: translateY(-2px) scale(1.1); filter: drop-shadow(0 0 16px rgba(198, 255, 61, .7)); }
}

/* ================= 组间休息计时器 ================= */
.rest-body { display: flex; gap: 18px; align-items: center; margin-top: 8px; }
.rest-ring { position: relative; width: 108px; height: 108px; flex: 0 0 auto; }
.rest-ring svg { width: 108px; height: 108px; transform: rotate(-90deg); }
.rest-ring circle { fill: none; stroke-width: 6; }
.rest-ring .bg { stroke: var(--line-2); }
.rest-ring .fg {
  stroke: var(--neon); stroke-linecap: round;
  stroke-dasharray: 326.7; stroke-dashoffset: 0;
  transition: stroke-dashoffset .25s linear;
  filter: drop-shadow(0 0 6px rgba(198, 255, 61, .55));
}
.rest-time {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 23px; font-weight: 900; letter-spacing: .5px;
  font-variant-numeric: tabular-nums;
}
.rest-card.running .rest-time { color: var(--neon); text-shadow: 0 0 18px rgba(198, 255, 61, .45); }
.rest-card.running .fg { animation: pulseRing 1.6s ease-in-out infinite; }
.rest-card.done { border-color: rgba(198, 255, 61, .65); box-shadow: var(--glow); }
.rest-card.done .rest-time { color: var(--neon); }
@keyframes pulseRing { 0%, 100% { opacity: 1 } 50% { opacity: .55 } }
.rest-side { flex: 1; min-width: 0; }
.rest-side .chip { flex: 1; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
