/* ============================================================
 * 时光流年 · 样式 —— 苹果毛玻璃（Glassmorphism）
 * 要点：毛玻璃要「看得见」，卡片背后必须有颜色 ——
 *       壁纸式多彩渐变 + 两个固定浮动色块，卡片全部半透明 + backdrop-filter
 * PC 三栏 / 平板两栏 / 移动单栏
 * ============================================================ */

:root {
  --bg: #EEF1F6;
  --bg2: rgba(0,0,0,0.045);
  --card: rgba(255,255,255,0.55);
  --ink: #1D1D1F;
  --ink2: #6E6E73;
  --ink3: #A1A1A6;
  --line: rgba(0,0,0,0.08);
  --line2: rgba(0,0,0,0.05);
  --accent: #5F9486;
  --accent-soft: rgba(95,148,134,0.15);
  --accent-deep: #41705F;
  --warn: #C4705A;
  --warn-soft: rgba(196,112,90,0.13);
  --amber: #C2924A;
  --amber-soft: rgba(194,146,74,0.14);
  --blue: #5B7FB0;
  --blue-soft: rgba(91,127,176,0.14);
  --med: #6274B5;
  --med-soft: rgba(126,143,199,0.16);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(31,45,61,.05), 0 12px 34px rgba(31,45,61,.10);
  --shadow-lg: 0 4px 12px rgba(31,45,61,.07), 0 24px 56px rgba(31,45,61,.14);
  --glass: blur(26px) saturate(170%);
  --glass-lite: blur(16px) saturate(160%);
  --glass-border: rgba(255,255,255,0.65);
  --topbar-h: 58px;
}

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

html, body { margin: 0; padding: 0; height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(1200px 780px at 10% -10%, rgba(255,163,185,.62) 0%, transparent 62%),
    radial-gradient(1100px 700px at 98% 2%, rgba(148,192,255,.58) 0%, transparent 62%),
    radial-gradient(1000px 760px at -6% 55%, rgba(160,232,200,.52) 0%, transparent 60%),
    radial-gradient(1150px 820px at 102% 92%, rgba(196,170,245,.58) 0%, transparent 62%),
    radial-gradient(900px 640px at 45% 42%, rgba(255,214,170,.45) 0%, transparent 65%),
    linear-gradient(180deg, #F1EEE8 0%, #E9EDF6 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* 浮动色块：给玻璃提供「可糊」的颜色层——必须铺在内容区正后方，
   缩在角落里卡片底下是白的，玻璃效果等于没有（真实教训） */
body::before, body::after {
  content: ""; position: fixed; z-index: -1; border-radius: 50%;
  pointer-events: none; filter: blur(46px);
}
body::before {
  width: 640px; height: 640px; left: -60px; top: 24vh;
  background: radial-gradient(circle at 40% 40%, rgba(255,176,132,.62), rgba(255,140,162,.34) 55%, transparent 74%);
}
body::after {
  width: 760px; height: 760px; right: -60px; bottom: -40px;
  background: radial-gradient(circle at 55% 45%, rgba(150,172,255,.58), rgba(110,188,224,.34) 55%, transparent 74%);
}

button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
input, textarea, select {
  width: 100%; background: rgba(255,255,255,0.50); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 12px; outline: none;
  transition: border-color .15s, background .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); background: rgba(255,255,255,0.92); }
textarea { resize: vertical; min-height: 68px; line-height: 1.6; }
[hidden] { display: none !important; }

/* ================= 布局骨架 ================= */
.app { height: 100vh; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h); flex: 0 0 auto;
  display: flex; align-items: center; gap: 24px;
  padding: 0 24px;
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.6);
  z-index: 30;
}
.brand { display: flex; align-items: baseline; gap: 8px; flex: 0 0 auto; }
.brand b { font-size: 17px; font-weight: 600; letter-spacing: .5px; }
.brand span { font-size: 10px; color: var(--ink3); letter-spacing: 2px; }

.nav { display: flex; gap: 4px; flex: 1; }
.nav button {
  padding: 7px 16px; border-radius: 9px; color: var(--ink2);
  font-size: 14px; transition: background .15s, color .15s;
}
.nav button:hover { background: rgba(255,255,255,0.45); color: var(--ink); }
.nav button.on { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }

.who {
  flex: 0 0 auto; font-size: 12px; color: var(--ink2);
  background: rgba(255,255,255,0.55); border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-lite); -webkit-backdrop-filter: var(--glass-lite);
  padding: 5px 12px; border-radius: 999px;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.main {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 344px;
  gap: 18px;
  padding: 18px 24px 20px;
}

.panel { min-height: 0; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; padding-right: 3px; }
.panel::-webkit-scrollbar { width: 8px; }
.panel::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 8px; }
.panel::-webkit-scrollbar-track { background: transparent; }
.content { min-height: 0; overflow-y: auto; padding-right: 4px; }
.content::-webkit-scrollbar { width: 8px; }
.content::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15); border-radius: 8px;
}
.content::-webkit-scrollbar-track { background: transparent; }

/* ================= 通用组件 ================= */
.card {
  background: linear-gradient(158deg, rgba(255,255,255,0.60) 0%, rgba(255,255,255,0.30) 100%);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid rgba(255,255,255,0.78);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75), var(--shadow);
}
.pad { padding: 16px; }
.pad-lg { padding: 20px; }

.sec-h {
  display: flex; align-items: center; justify-content: space-between;
  margin: 22px 0 10px;
}
.sec-h:first-child { margin-top: 0; }
.sec-h h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink2); letter-spacing: .6px; }
.sec-h .hint { font-size: 12px; color: var(--ink3); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: var(--radius-sm); padding: 9px 16px;
  font-size: 13.5px; font-weight: 600; background: var(--accent); color: #fff;
  transition: transform .1s, opacity .15s, background .15s;
  white-space: nowrap;
}
.btn:hover { background: #558A7C; }
.btn:active { transform: scale(.98); }
.btn[disabled], .btn.disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: var(--accent-soft); color: var(--accent-deep); }
.btn.ghost:hover { background: rgba(95,148,134,0.26); }
.btn.line { background: rgba(255,255,255,0.42); color: var(--ink2); border: 1px solid var(--line); }
.btn.line:hover { background: rgba(255,255,255,0.75); color: var(--ink); }
.btn.danger { background: rgba(255,255,255,0.42); color: var(--warn); border: 1px solid var(--line); }
.btn.danger:hover { background: var(--warn-soft); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.btn.block { width: 100%; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.55); color: var(--ink2);
  padding: 6px 13px; border-radius: 999px; font-size: 12.5px;
  cursor: pointer; transition: all .14s; white-space: nowrap;
}
.chip:hover { border-color: #CFDAD5; background: rgba(255,255,255,0.8); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.chip .n { font-size: 11px; opacity: .75; }

.tag {
  display: inline-block; font-size: 11px; padding: 2px 8px;
  border-radius: 999px; background: var(--bg2); color: var(--ink2);
}
.tag.mine { background: var(--blue-soft); color: var(--blue); }
.tag.hi { background: var(--warn-soft); color: var(--warn); }
.tag.mid { background: var(--amber-soft); color: var(--amber); }
.tag.ok { background: var(--accent-soft); color: var(--accent-deep); }
.tag.med { background: var(--med-soft); color: var(--med); }

.msg { font-size: 12.5px; border-radius: var(--radius-sm); padding: 9px 12px; line-height: 1.55; margin: 10px 0; }
.msg.err { background: var(--warn-soft); color: #A8503A; }
.msg.ok { background: var(--accent-soft); color: var(--accent-deep); }

.empty { text-align: center; padding: 56px 20px; color: var(--ink3); line-height: 2.1; font-size: 13.5px; }
.empty .btn { margin-top: 18px; }

.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================= 任务列表 ================= */
/* 新增行三件套：输入框（回车即存）+ 右侧选择列表 + 添加。
   ⚠ 输入框绝不能删——2026-10-07 用户原话「输入框保留」，
     上一版为了"整合"把它换成单个按钮，方向做反了，已回退。 */
.add-bar { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; }
.add-bar input { flex: 1 1 auto; min-width: 0; padding: 11px 14px; font-size: 14.5px; border-radius: 12px; }
.add-bar .btn { flex: 0 0 auto; padding: 0 20px; border-radius: 12px; height: 40px; }
.add-bar .tag-dd-btn { height: 40px; }
/* 右侧「选择列表」按钮：窄屏只留图标 + 一个短标签，别把输入框挤没了 */
.add-bar .add-tag-btn { max-width: 96px; flex: 0 0 auto; }
/* 设了东西就点亮，不点开也知道这条带了选项 */
.add-bar .add-tag-btn.on {
  background: var(--accent-soft); border-color: rgba(95,148,134,.38);
  color: var(--accent-deep); font-weight: 600;
}
/* 窄屏（≤360px）三件套会挤：允许换行，输入框独占一行 */
@media (max-width: 360px) {
  .add-bar { flex-wrap: wrap; }
  .add-bar input { flex: 1 1 100%; }
}

/* ================= 任务页筛选行（视图切换 / 时间+标签筛选） =================
   标签下拉与时间筛选 chips 同排；控件统一 38px 高，
   否则 seg 的内边距和 select 的行高不同，视觉上不在一条水平线上 */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.filter-bar:last-of-type { margin-bottom: 14px; }
.view-seg { margin: 0; flex: 0 0 auto; height: 38px; padding: 3px; }
.view-seg button {
  font-size: 13px; padding: 0 16px; height: 32px;
  display: flex; align-items: center; justify-content: center;
}
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
/* 收紧一档，为标签按钮腾出同行的空间（360px 窄屏实测刚好排下 4 个 chips + 标签） */
.filter-chips .chip { font-size: 13px; padding: 7px 11px; }
/* 图表区的天数切换也放大一档，跟筛选行保持一致的手感 */
.chart-tools .chip { font-size: 12.5px; padding: 6px 13px; }

/* ---------- 标签下拉（自定义紧凑按钮，替掉最小宽度省不出来的原生 select） ---------- */
.tag-dd { position: relative; flex: 0 0 auto; }
.tag-dd-btn {
  height: 38px; padding: 0 9px; border-radius: 10px; max-width: 128px;
  border: 1px solid var(--line); background: rgba(255,255,255,.55);
  color: var(--ink); font-size: 12.5px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
}
.tag-dd-btn .tg-tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-dd-btn .caret { font-size: 9px; color: var(--ink3); }
.tag-dd-btn.on {
  background: var(--accent-soft); border-color: rgba(95,148,134,.38);
  color: var(--accent-deep); font-weight: 600;
}
.tag-dd-menu {
  position: absolute; top: 42px; left: 0; z-index: 80;
  min-width: 156px; max-height: 248px; overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 26px rgba(40,60,55,.16); padding: 5px;
}

/* ---------- 浮层下拉（挂在 body 上，脱离任何 overflow 裁剪） ----------
   ⛔ 原来 .tag-dd-menu 用 position:absolute，父级 .content 有
   `overflow-y: auto` → 下拉超出卡片就被裁掉（用户截图：最近 N 天的菜单
   只显示一半，下面被卡片切了）。absolute 元素的包含块受父级 overflow 影响，
   改成"挂到 body + fixed 定位 + JS 算坐标"才彻底摆脱裁剪链。
   类名沿用 .tag-dd-menu（复用全部样式），只是多一个 .float-menu 标记。 */
.float-menu {
  position: fixed;      /* 视口定位，不受任何祖先 overflow 影响 */
  z-index: 9999;        /* 高于底栏(40)/提醒横幅(320)；⚠ 低于模态弹窗遮罩(10000)：日期时间弹窗必须盖住本浮层 */
  margin: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.tag-dd-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 8px 10px; border-radius: 9px;
  font-size: 13.5px; color: var(--ink); text-align: left;
}
.tag-dd-menu button:hover { background: var(--hover); }
.tag-dd-menu button.on { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
.tag-dd-menu button .ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-dd-menu button .n { font-size: 11.5px; color: var(--ink3); flex: 0 0 auto; }
.tag-dd-menu .dd-empty { padding: 10px; font-size: 12.5px; color: var(--ink3); line-height: 1.7; text-align: center; }

/* ---------- 常驻面板：新增行右侧那个"选择列表"里的一整屏表单 ----------
   内容跟编辑任务弹窗完全一样（共用 taskFields 渲染），
   所以这里只管"它挂在外面"该有的样子：自己能滚、按钮能分三份、别被压扁。 */
.float-panel { padding: 12px; border-radius: 14px; }
.float-panel .fld { margin-bottom: 11px; }
.float-panel textarea { min-height: 56px; }
.float-panel .acts { display: flex; gap: 8px; margin-top: 14px; }
.float-panel .acts .btn { flex: 1; }
.qopt-h { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.qopt-note { font-size: 11.5px; color: var(--ink3); line-height: 1.6; margin-bottom: 12px; }
.qopt-full {
  display: block; width: 100%; margin-top: 10px; padding: 7px;
  font-size: 12.5px; color: var(--accent-deep); text-align: center;
  border-radius: 9px;
}
.qopt-full:hover { background: var(--hover); }

/* 播放按钮给它一个明确的身份，否则只是行里一个裸字符 */
.tact .play {
  background: var(--accent-soft) !important; color: var(--accent-deep) !important;
  width: 34px; height: 34px; border-radius: 50% !important; font-size: 15px;
}
.tact .play:hover { background: var(--accent) !important; color: #fff !important; }

/* ================= 音景轮播开关 ================= */
.mix-auto {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 10px;
  background: rgba(255,255,255,.5); border: 1px solid var(--line);
  border-radius: var(--radius, 12px);
}
.mix-auto.on { background: rgba(95,148,134,.10); border-color: rgba(95,148,134,.35); }
.mix-auto-l { flex: 1; min-width: 0; }
.mix-auto .mix-name { font-weight: 500; }
.mix-auto .mix-dsc { font-size: 11.5px; color: var(--ink3); margin-top: 2px; }
.mix-auto .mix-sw { flex: 0 0 auto; }

/* ================= 标签快捷选择（新建/编辑任务里） ================= */
.tag-pick {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 8px; padding-top: 9px; border-top: 1px dashed var(--line);
}
.tag-pick-lb {
  font-size: 11.5px; color: var(--ink3); padding: 0 2px;
  border-left: 2px solid var(--line); margin-left: 2px;
}
.tag-pick-lb:first-child { border-left: 0; margin-left: 0; }
.tag-pick .chip b { font-weight: 400; opacity: .6; margin-left: 2px; }

/* ================= 屏幕常亮状态标识 ================= */
.wake-tag {
  display: inline-flex; align-items: center; align-self: center;
  margin-left: 2px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; color: #8a6d2f; background: rgba(224,178,88,.16);
  border: 1px solid rgba(224,178,88,.34);
}

.tgroup { margin-bottom: 6px; }
.tdate {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink3); font-weight: 600; letter-spacing: .5px;
  margin: 18px 0 8px;
}
.tdate .cnt { font-weight: 400; }

.task {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 13px; border-radius: 12px; margin-bottom: 6px;
  background: rgba(255,255,255,0.46); border: 1px solid rgba(255,255,255,0.72);
  backdrop-filter: var(--glass-lite); -webkit-backdrop-filter: var(--glass-lite);
  box-shadow: 0 2px 8px rgba(31,45,61,.06);
  transition: border-color .15s, box-shadow .15s;
  position: relative;
}
.task:hover { border-color: rgba(95,148,134,0.35); box-shadow: var(--shadow); }
.task.done { opacity: .58; }
.task.running { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }

.tick {
  width: 20px; height: 20px; flex: 0 0 20px; margin-top: 1px;
  border: 1.6px solid #C9D4CF; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; cursor: pointer;
}
.tick:hover { border-color: var(--accent); background: var(--accent-soft); }
.tick svg { width: 11px; height: 11px; stroke: #fff; fill: none; stroke-width: 2.6; opacity: 0; }
.task.done .tick { background: var(--accent); border-color: var(--accent); }
.task.done .tick svg { opacity: 1; }

.tbody { flex: 1; min-width: 0; }
.ttitle { font-size: 14.5px; line-height: 1.5; word-break: break-word; }
.task.done .ttitle { text-decoration: line-through; color: var(--ink3); }
.tmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 5px; font-size: 11.5px; color: var(--ink3); }
.tnote { font-size: 12.5px; color: var(--ink2); margin-top: 5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }

.tact { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; opacity: 0; transition: opacity .15s; }
.task:hover .tact { opacity: 1; }
.tact button {
  width: 32px; height: 32px; border-radius: 10px; color: var(--ink3);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.tact button:hover { background: rgba(255,255,255,0.6); color: var(--ink); }
.tact button.del:hover { background: var(--warn-soft); color: var(--warn); }
.tact button.play:hover { background: var(--accent-soft); color: var(--accent-deep); }

.sub-list { margin: 6px 0 0 31px; }
.sub-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; color: var(--ink2); }
.sub-item.done { text-decoration: line-through; opacity: .55; }
.sub-item .tick { width: 16px; height: 16px; flex: 0 0 16px; }
.sub-item .tick svg { width: 9px; height: 9px; }
.sub-add { display: flex; gap: 6px; margin: 6px 0 0 31px; }
.sub-add input { padding: 5px 9px; font-size: 12.5px; }

/* ================= 看板 ================= */
.board { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.bcol {
  background: rgba(255,255,255,0.36); border: 1px solid rgba(255,255,255,0.5);
  backdrop-filter: var(--glass-lite); -webkit-backdrop-filter: var(--glass-lite);
  border-radius: var(--radius); padding: 12px; min-height: 200px;
}
.bcol-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 12.5px; font-weight: 600; color: var(--ink2); }
.bcol .task { margin-bottom: 8px; }
.bcol .tact { opacity: 1; }

/* ================= 今日聚焦 ================= */
.focus-card {
  border-color: rgba(95,148,134,0.28);
  background: linear-gradient(160deg, rgba(203,236,222,.55) 0%, rgba(255,255,255,.32) 62%);
}
.fc-h {
  font-size: 13px; font-weight: 600; color: var(--accent-deep);
  letter-spacing: .6px; display: flex; align-items: center;
}
.fc-n { font-size: 12px; color: var(--ink2); font-weight: 500; margin-left: auto; }
.fc-empty { font-size: 13px; color: var(--ink2); line-height: 1.9; margin-top: 8px; }
.fc-empty b { color: var(--accent-deep); }
.fc-tip { display: block; font-size: 11.5px; color: var(--ink3); margin-top: 6px; }
.fc-bar { height: 4px; background: rgba(95,148,134,0.18); border-radius: 4px; margin: 10px 0 2px; overflow: hidden; }
.fc-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .4s ease; }
.fc-list { margin-top: 4px; }
.fc-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13.5px; }
.fc-item.done { color: var(--ink3); text-decoration: line-through; }
.fc-item .tick { width: 18px; height: 18px; flex: 0 0 18px; }
.fc-item .tick svg { width: 10px; height: 10px; }
.fc-play {
  border: none; background: var(--accent-soft); color: var(--accent-deep);
  width: 25px; height: 25px; border-radius: 8px; font-size: 10px;
  cursor: pointer; flex: 0 0 25px;
}
.fc-play:hover { background: var(--accent); color: #fff; }

.tact .star-btn { color: #C9D4CF; font-size: 19px; }
.tact .star-btn.on { color: #DFA63C; }
.tact .star-btn:hover { background: var(--amber-soft); color: #DFA63C; }

/* ================= 计时器面板 ================= */
.timer-card { padding: 20px 18px; text-align: center; }
.timer-ring { position: relative; width: 236px; height: 236px; margin: 4px auto 0; }
.timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring circle { fill: none; stroke-linecap: round; }
.timer-ring .bg { stroke: rgba(31,45,61,0.10); stroke-width: 10; }
.timer-ring .fg { stroke: url(#tgrad); stroke-width: 10; transition: stroke-dashoffset .3s linear; }
.timer-core {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
}
.timer-clock { font-size: 42px; font-weight: 300; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.timer-sub { font-size: 11.5px; color: var(--ink3); letter-spacing: .5px; max-width: 180px; }
.timer-modes { display: flex; gap: 6px; justify-content: center; margin: 16px 0 4px; }
.timer-acts { display: flex; gap: 8px; margin-top: 14px; }
.timer-acts .btn { flex: 1; padding: 11px; font-size: 14.5px; border-radius: 12px; }
.timer-task { font-size: 12px; color: var(--ink2); margin-top: 12px; padding: 7px 10px; background: rgba(255,255,255,0.5); border-radius: 9px; }
.timer-task b { color: var(--accent-deep); font-weight: 600; }

.presets { display: flex; gap: 5px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.presets .chip { padding: 5px 11px; font-size: 12px; }

.scenes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.scene {
  background: rgba(255,255,255,0.45); border: 1px solid transparent; border-radius: 11px;
  padding: 10px 4px 9px; text-align: center; cursor: pointer; transition: all .15s;
}
.scene:hover { background: rgba(255,255,255,0.75); }
.scene.on { background: var(--accent-soft); border-color: var(--accent); }
.scene .nm { display: block; font-size: 12px; font-weight: 600; color: var(--ink2); }
.scene.on .nm { color: var(--accent-deep); }
.scene .dsc { display: block; font-size: 9.5px; color: var(--ink3); margin-top: 2px; }

.vol { display: flex; align-items: center; gap: 9px; margin-top: 12px; }
.vol span { font-size: 11.5px; color: var(--ink3); }
input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; border: none; padding: 0; height: 18px; flex: 1; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: rgba(31,45,61,0.14); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); margin-top: -5.5px; box-shadow: 0 1px 4px rgba(65,112,95,.35);
}
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(31,45,61,0.14); }
input[type=range]::-moz-range-thumb { width: 15px; height: 15px; border: none; border-radius: 50%; background: var(--accent); }

.panel-note { font-size: 11.5px; color: var(--ink3); line-height: 1.7; }

/* ================= 复盘 ================= */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.kpi { padding: 15px 14px; }
.kpi .v { font-size: 25px; font-weight: 600; letter-spacing: .3px; line-height: 1.2; }
.kpi .v small { font-size: 12px; font-weight: 400; color: var(--ink2); margin-left: 2px; }
.kpi .k { font-size: 11.5px; color: var(--ink3); margin-top: 5px; }

.chart { display: flex; align-items: flex-end; gap: 8px; height: 148px; padding: 18px 16px 12px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.chart .cv { font-size: 10px; color: var(--ink3); height: 12px; }
.chart .cb { width: 100%; max-width: 30px; background: linear-gradient(180deg,#7FB3A2,#5F9486); border-radius: 6px 6px 3px 3px; min-height: 4px; transition: height .45s cubic-bezier(.22,1,.36,1); }
.chart .cb.empty { background: rgba(31,45,61,0.08); }
.chart .cl { font-size: 10.5px; color: var(--ink3); }

/* ================= 音景混音台 ================= */
.mixer { display: flex; flex-direction: column; gap: 9px; }
.mix {
  background: rgba(255,255,255,0.42);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 13px;
  padding: 10px 12px 7px;
  transition: background .2s ease, border-color .2s ease;
}
.mix.on { background: var(--accent-soft); border-color: rgba(95,148,134,.35); }
.mix-top { display: flex; align-items: center; gap: 7px; }
.mix-dot { width: 7px; height: 7px; border-radius: 50%; background: #C7C7CC; flex: 0 0 7px; transition: all .22s; }
.mix.on .mix-dot { background: var(--accent); box-shadow: 0 0 0 3px rgba(95,148,134,.18); }
.mix-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.mix-dsc { font-size: 10.5px; color: var(--ink3); }
.mix-n { margin-left: auto; font-size: 11.5px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.mix-sl { width: 100%; margin: 7px 0 3px; }
.mix-sw {
  display: block; text-align: center; font-size: 11.5px; padding: 5px 0; border-radius: 8px;
  background: rgba(0,0,0,0.05); color: var(--ink2); cursor: pointer; transition: all .15s; user-select: none;
}
.mix-sw:hover { background: rgba(0,0,0,0.09); }
.mix.on .mix-sw { background: var(--accent); color: #fff; font-weight: 600; }

/* ================= 冥想统计 / 开始冥想（独立一块） ================= */
/* ⚠ 2026-10-07 清理：原 .mrow/.mc/.mv/.mk（冥想页 KPI 区）与 .med-start/.ms-h/.ms-d
   （开始冥想卡片）随冥想页那四块内容一起删除，js 里已无引用 → 一并清掉，
   免得以后改同名类踩到旧样式。.med-card / .mfoot 记录页仍在用，保留。 */
.mfoot {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(0,0,0,.06);
  font-size: 12px; color: var(--ink2);
}
.mfoot b { color: var(--med); font-weight: 600; }

/* ================= 记录页图表 · 柱状图（悬浮动画 + 点击展开明细） ================= */
/* 注意：类名一律 bar* 前缀——之前用 .bcol 与任务看板的看板列撞车，
   看板列的 min-height:200px 把柱子撑成 200px，整排柱子错位（真实事故） */
.chart-card { padding: 16px; }
.chart-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.seg.mini { display: inline-flex; width: auto; margin: 0; padding: 2px; border-radius: 9px; }
.seg.mini button { flex: 0 0 auto; padding: 5px 11px; font-size: 12px; border-radius: 7px; }
/* 天数档从 3 个加到 4 个（补了「近 3 天」）后，360px 窄屏放不下会挤爆。
   收紧内边距与字号，四个按钮 + 图例一行排下；仍挤不下时让图例换行。 */
.seg.mini button { padding: 5px 8px; font-size: 11.5px; }
.chart-tools .legend { flex: 0 0 auto; }
.legend { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink3); }
.legend .lg { display: inline-block; width: 8px; height: 8px; border-radius: 3px; }
.legend i + i { margin-left: 6px; }
.lg-foc { background: linear-gradient(180deg,#8FC0B0,#4E8574); }
.lg-med { background: linear-gradient(180deg,#AAB7E3,#7E8FC7); }

/* 柱区高度写死像素：不用 %、不用 stretch——窄屏 / 毛玻璃容器下 % 高度解析不稳，柱子会整根消失 */
.bars { display: flex; align-items: flex-end; gap: 5px; height: 140px; }
.barcol {
  flex: 1; min-width: 0; height: 140px; position: relative; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  border-radius: 10px; transition: background .18s;
}
.barcol:hover { background: rgba(255,255,255,.5); }
.barstack {
  width: 100%; max-width: 30px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  border-radius: 6px;
  transform-origin: bottom center;
  transition: transform .24s cubic-bezier(.22,1,.36,1), filter .24s, box-shadow .24s;
}
.barcol:hover .barstack,
.barcol.on .barstack { transform: translateY(-4px) scaleX(1.1); filter: saturate(1.2) brightness(1.04); box-shadow: 0 8px 18px rgba(31,45,61,.16); }
.barcol.on .barstack { box-shadow: 0 0 0 2px var(--accent), 0 8px 18px rgba(31,45,61,.14); }
.barseg { display: block; width: 100%; border-radius: 5px; }
.barseg.bf { background: linear-gradient(180deg,#8FC0B0,#4E8574); }
.barseg.bm { background: linear-gradient(180deg,#AAB7E3,#7E8FC7); }
.barseg.bz { height: 3px; background: rgba(31,45,61,.10); }
.barlb { font-size: 10px; color: var(--ink3); margin-top: 7px; white-space: nowrap; }
.barlb.hide { visibility: hidden; }

.bartip {
  position: absolute; left: 50%; bottom: calc(100% + 8px);
  display: flex; flex-direction: column; gap: 1px;
  background: rgba(28,40,36,.92); color: #fff; font-size: 11px; line-height: 1.6;
  padding: 7px 11px; border-radius: 10px; white-space: nowrap;
  opacity: 0; pointer-events: none; z-index: 6;
  transform: translate(-50%, 6px);
  transition: opacity .18s ease, transform .18s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 10px 24px rgba(20,30,27,.28);
}
.bartip b { font-size: 11.5px; font-weight: 600; }
.bartip .lg { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 4px; }
.barcol:hover .bartip { opacity: 1; transform: translate(-50%, 0); }
.barcol:first-child .bartip { left: 0; transform: translate(0, 6px); }
.barcol:first-child:hover .bartip { transform: translate(0, 0); }
.barcol:last-child .bartip { left: auto; right: 0; transform: translate(0, 6px); }
.barcol:last-child:hover .bartip { transform: translate(0, 0); }

/* ================= 记录页图表 · 饼图 ================= */
.pie-card { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.pie-wrap { position: relative; width: 200px; height: 200px; flex: 0 0 200px; margin: 0 auto; }
.pie { width: 100%; height: 100%; display: block; }
.pseg {
  cursor: pointer;
  transform-box: view-box; transform-origin: 100px 100px;
  transition: transform .26s cubic-bezier(.22,1,.36,1), filter .26s, opacity .26s;
}
.pseg:hover, .pseg.hv, .pseg.on { transform: scale(1.055); filter: brightness(1.1) saturate(1.12); }
.pseg.dim { opacity: .42; }
.pie-center {
  position: absolute; inset: 0; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.pie-cv { font-size: 21px; font-weight: 600; letter-spacing: .3px; font-variant-numeric: tabular-nums; }
.pie-cn { font-size: 11px; color: var(--ink3); max-width: 100px; text-align: center; line-height: 1.35; }

.plegend { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 1px; }
.plegend-item {
  display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 9px;
  cursor: pointer; font-size: 12.5px; color: var(--ink2);
  transition: background .15s, transform .15s;
}
.plegend-item:hover { background: rgba(255,255,255,.62); transform: translateX(2px); }
.plegend-item.hv { background: rgba(255,255,255,.62); }
.plegend-item.on { background: var(--accent-soft); color: var(--accent-deep); }
.pl-dot { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 9px; transition: transform .2s; }
.plegend-item:hover .pl-dot, .plegend-item.hv .pl-dot { transform: scale(1.35); }
.pl-name { flex: 1; min-width: 0; }
.pl-val { font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums; }
.pl-pct { width: 36px; text-align: right; font-size: 11.5px; color: var(--ink3); font-variant-numeric: tabular-nums; }

/* ================= 记录明细（点图表展开） ================= */
.rec-panel { margin-top: 12px; animation: recIn .3s cubic-bezier(.22,1,.36,1); }
@keyframes recIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.rec-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.rec-h b { font-size: 13px; }
.rec-h .hint { font-size: 12px; color: var(--ink3); margin-right: auto; }
.rec-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 6px;
  border-radius: 9px; border-bottom: 1px solid var(--line2); font-size: 13px;
  transition: background .16s, transform .16s;
}
.rec-item:last-child { border-bottom: none; }
.rec-item:hover { background: rgba(255,255,255,.55); transform: translateX(3px); }
.rec-t { flex: 1; min-width: 0; }
.rec-d { font-size: 11.5px; color: var(--ink3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.empty-note { font-size: 13px; color: #9AA8A5; line-height: 1.9; }

/* ================= 近 7 天堆叠柱（旧样式，保留兼容） ================= */
.cstack {
  width: 100%; max-width: 30px; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
}
.cb-foc, .cb-med { display: block; width: 100%; border-radius: 4px; }
.cb-foc { background: linear-gradient(180deg,#8FC0B0,#5F9486); }
.cb-med { background: linear-gradient(180deg,#AAB7E3,#7E8FC7); }
.cb-foc.z, .cb-med.z { background: rgba(31,45,61,0.08); }

.heat { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.heat i { aspect-ratio: 1; border-radius: 4px; background: rgba(31,45,61,0.06); display: block; }
.heat i.l1 { background: #D6E8E2; }
.heat i.l2 { background: #AFD2C7; }
.heat i.l3 { background: #7FB3A2; }
.heat i.l4 { background: #4E8574; }

.review-form .row { margin-bottom: 12px; }
.stars { display: flex; gap: 6px; }
.star {
  width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,0.55);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--ink3); cursor: pointer; transition: all .14s;
}
.star:hover { background: var(--amber-soft); }
.star.on { background: var(--amber); color: #fff; font-weight: 600; }

.log-list .log-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 0;
  border-bottom: 1px solid var(--line2); font-size: 13px;
}
.log-list .log-item:last-child { border-bottom: none; }
.log-list .lt { flex: 1; min-width: 0; }
.log-list .ld { font-size: 11.5px; color: var(--ink3); }

/* ================= 「已完成」页签 ================= */
/* 时间范围选择器那一行：标题在左、下拉在右 */
.done-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 2px;
}
.done-bar .fc-h { flex: 1; min-width: 0; }
.done-bar .tag-dd { flex: 0 0 auto; }
.done-bar .tag-dd-btn { height: 32px; max-width: 148px; font-size: 12.5px; }
/* 完成清单里复用 .tick 做勾选框：已完成态要显示对勾并填充 */
.log-list .log-item .tick.done { background: var(--accent); border-color: var(--accent); }
.log-list .log-item .tick.done svg { opacity: 1; }

/* ================= 账号 ================= */
.seg { display: flex; background: rgba(0,0,0,0.055); border-radius: 11px; padding: 3px; margin-bottom: 14px; }
.seg button { flex: 1; padding: 8px; border-radius: 9px; font-size: 13px; color: var(--ink2); }
.seg button.on { background: rgba(255,255,255,0.82); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(36,51,48,.10); }

.fld { margin-bottom: 14px; }
.fld > label { display: block; font-size: 12px; color: var(--ink2); margin-bottom: 6px; }

/* ================= 日期时间选择弹窗 =================
   用户 2026-10-07 要求：点输入框弹窗直接选，不打字。
   弹窗分三段：常用（今天/明天/后天/下周）→ 未来 14 天 → 时段（粗粒度）。
   自己做而不用原生 datetime-local：原生的外观各手机不同、样式不可控，
   且只能精确到分钟，不能"选一个常用值"。 */
.tap-dt {
  cursor: pointer;
  background: rgba(255,255,255,.62);
  border: 1px solid var(--line);
}
.tap-dt:hover { background: rgba(255,255,255,.9); border-color: #CFDAD5; }
.tap-dt:read-only { cursor: pointer; }
.dt-hint {
  display: block; margin-top: 4px;
  font-size: 11px; color: var(--ink3);
}
.dt-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.dt-quick .chip { padding: 7px 13px; font-size: 13px; }
/* 未来 14 天：横向可滚，一屏放不下就滑动而不是挤成两行 */
.dt-days {
  display: flex; gap: 6px; overflow-x: auto;
  padding: 2px 0 6px;
  -webkit-overflow-scrolling: touch;
}
.dt-day {
  flex: 0 0 auto; min-width: 50px; padding: 7px 6px;
  border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255,255,255,.5);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 12.5px; color: var(--ink); cursor: pointer;
  transition: background .14s, border-color .14s;
}
.dt-day i { font-style: normal; font-size: 10px; color: var(--ink3); }
.dt-day:hover { background: rgba(255,255,255,.85); }
.dt-day.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.dt-day.on i { color: rgba(255,255,255,.85); }
#dtExact { margin-top: 2px; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.link { color: var(--accent-deep); font-size: 12.5px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sdk-warn { font-size: 12px; color: var(--warn); line-height: 1.7; margin-top: 12px; }

/* ================= 记录页分栏（任务 / 冥想） ================= */
.rec-seg { margin-bottom: 12px; }
.rec-seg button { font-size: 13.5px; padding: 9px 0; }
.task-card {
  background: linear-gradient(140deg, rgba(203,236,222,.55) 0%, rgba(255,255,255,.32) 60%);
  border-color: rgba(95,148,134,.26);
}
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(74px, 1fr)); gap: 8px; }
.stat { text-align: center; min-width: 0; }
.stat-v {
  display: block; font-size: 20px; font-weight: 600; color: var(--ink);
  line-height: 1.25; font-variant-numeric: tabular-nums;
}
.stat-v i { font-style: normal; font-size: 11px; font-weight: 400; color: var(--ink2); margin-left: 2px; }
.stat-k { display: block; font-size: 11px; color: var(--ink3); margin-top: 3px; }
.sub-h { font-size: 12px; color: var(--ink3); font-weight: 600; letter-spacing: .5px; margin: 14px 0 8px; }

/* ================= 任务提醒横幅（不依赖通知权限） ================= */
.alert-bar {
  position: fixed; left: 0; right: 0; top: 0; z-index: 320;
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, #CE7A62, #B8614A);
  color: #fff; padding: 10px 12px;
  box-shadow: 0 4px 18px rgba(60,30,20,.28);
  animation: alertIn .26s cubic-bezier(.22,1,.36,1);
}
@keyframes alertIn { from { transform: translateY(-100%); } to { transform: none; } }
.alert-bar .ab-ico { font-size: 19px; flex: 0 0 auto; }
.alert-bar .ab-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.35; }
.alert-bar .ab-txt b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-bar .ab-txt span { font-size: 11.5px; opacity: .9; }
.alert-bar button {
  flex: 0 0 auto; border-radius: 9px; padding: 7px 12px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  background: rgba(255,255,255,.22); color: #fff; transition: background .15s;
}
.alert-bar button:hover { background: rgba(255,255,255,.34); }
.alert-bar .ab-go { background: #fff; color: #A8503A; }
.alert-bar .ab-go:hover { background: #FFF3EF; }
@media (prefers-reduced-motion: reduce) { .alert-bar { animation: none; } }

/* ================= 快捷时间 chips + 标签管理 ================= */
.quick-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.qchip {
  font-size: 11.5px; padding: 4px 10px; border-radius: 999px;
  background: rgba(95,148,134,.10); color: var(--accent-deep);
  border: 1px solid rgba(95,148,134,.22); cursor: pointer;
  transition: background .14s, transform .1s; user-select: none;
}
/* 快速选择日期下拉（用户 2026-10-07 要求：昨天/今天/明天/未来 7 天）。
   做成下拉而非一排 chip：日期选项会随"最近完成的任务"动态变长，
   chip 放不下，且窄屏会挤爆时间输入框。 */
.quick-day { margin-top: 7px; }
.quick-day .tag-dd-btn { height: 32px; max-width: 148px; font-size: 12.5px; }
.quick-day .tag-dd-menu { min-width: 132px; }
.qchip:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.qchip:active { transform: scale(.96); }

.tag-input-row { display: flex; gap: 8px; align-items: center; }
.tag-input-row input { flex: 1; min-width: 0; }
.tag-input-row .btn { flex: 0 0 auto; }

.tag-select {
  width: auto; min-width: 104px; max-width: 190px; height: 38px;
  padding: 0 10px; font-size: 13.5px; border-radius: 10px;
  background: rgba(255,255,255,.55); border: 1px solid var(--line);
  color: var(--ink); cursor: pointer;
}
.tag-select:focus { border-color: var(--accent); }

.tag-row {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 0; border-bottom: 1px solid var(--line2);
}
.tag-row:last-of-type { border-bottom: none; }
.tag-row .tg-name { flex: 1; min-width: 0; font-size: 13.5px; }
.tag-row .tg-n { font-size: 11.5px; color: var(--ink3); white-space: nowrap; }
.tag-row .tag-inp { flex: 1; padding: 7px 10px; font-size: 13px; }
.tag-row .tg-btn {
  width: 28px; height: 28px; border-radius: 8px; flex: 0 0 28px;
  color: var(--ink3); font-size: 14px; transition: background .14s, color .14s;
}
.tag-row .tg-btn:hover { background: rgba(255,255,255,.7); color: var(--ink); }
.tag-row .tg-btn.del:hover { background: var(--warn-soft); color: var(--warn); }

/* ================= 记住密码 · 自动登录 ================= */
.auth-remember {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink2); cursor: pointer;
  margin: 2px 0 8px; user-select: none;
}
.auth-remember input {
  width: 16px; height: 16px; flex: 0 0 16px; padding: 0;
  accent-color: var(--accent); cursor: pointer;
}

/* ================= 登录态体检 ================= */
.sess-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 7px 0; font-size: 13px; border-bottom: 1px solid var(--line2);
}
.sess-row:last-of-type { border-bottom: none; }
.sess-row .sk { flex: 0 0 72px; color: var(--ink3); font-size: 12.5px; line-height: 1.7; }
.sess-row .sv { flex: 1; min-width: 0; color: var(--ink); line-height: 1.7; word-break: break-all; }
.sess-row .sv.ok { color: var(--accent-deep); font-weight: 600; }
.sess-row .sv.bad { color: var(--warn); font-weight: 600; }
.sess-row .sv.mono { font: 11.5px/1.6 ui-monospace, Menlo, Consolas, monospace; color: var(--ink2); }

/* ================= 运行日志 ================= */
/* ================= 运行日志 =================
   ⚠ 2026-10-07 起界面不再展示运行日志（用户：「不用给我展示，你这边能看就行」）。
   **日志仍在采集、仍在自动上云**，只是不在界面上显示。
   这两个类目前是孤儿，但**故意保留**：app.js 里 log-copy / log-upload /
   log-clear / log-export 四个事件都还在（万一将来要手动上传给我，
   接回界面即可），CSS 留着不用重写。 */
.log-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.log-view {
  margin: 8px 0 0; max-height: 300px; overflow: auto;
  font: 11px/1.8 ui-monospace, Menlo, Consolas, monospace;
  background: rgba(0,0,0,0.045); border-radius: 10px;
  padding: 10px 12px; white-space: pre-wrap; word-break: break-all;
  color: var(--ink2);
}
.log-view::-webkit-scrollbar { width: 8px; }
.log-view::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 8px; }

/* ================= 弹层 ================= */
.mask {
  position: fixed; inset: 0; background: rgba(28,40,36,.32);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 10000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  width: 100%; max-width: 520px; max-height: 86vh; overflow-y: auto;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(32px) saturate(180%); -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 18px; box-shadow: var(--shadow-lg);
  padding: 22px;
  animation: pop .22s cubic-bezier(.22,1,.36,1);
}
@keyframes pop { from { transform: translateY(10px) scale(.985); opacity: .5; } to { transform: none; opacity: 1; } }
.modal h3 { margin: 0 0 16px; font-size: 16.5px; }
.modal .acts { display: flex; gap: 10px; margin-top: 18px; }
.modal .acts .btn { flex: 1; }

/* ================= Toast ================= */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  background: rgba(30,42,38,.86); color: #fff; font-size: 13px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 10px 18px; border-radius: 999px; z-index: 200;
  animation: toastIn .2s ease; pointer-events: none;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ================= 完成任务 · 爆米花特效 ================= */
.popcorn { position: fixed; left: 0; top: 0; z-index: 250; pointer-events: none; }
.popcorn i {
  position: absolute; left: 0; top: 0;
  width: var(--sz); height: var(--sz);
  border-radius: 52% 48% 55% 45% / 55% 46% 54% 45%;   /* 不规则圆形 = 爆米花感 */
  box-shadow: inset -1px -2px 2px rgba(0,0,0,.08);
  animation: popcornPop .68s cubic-bezier(.15,.82,.3,1) forwards;
}
@keyframes popcornPop {
  0%   { transform: translate(0, 0) scale(.35) rotate(0deg); opacity: 1; }
  55%  { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1.08) rotate(160deg); opacity: 0; }
}
.tick.pop { animation: tickPop .32s cubic-bezier(.3,1.6,.5,1); }
@keyframes tickPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.4); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .popcorn i { animation-duration: .01s; }
}

/* ================= 移动端悬浮计时条 ================= */
.mini-timer { display: none; }

/* ================= 冥想页主区（2026-10-08 重建） =================
   PC 端此前主区只剩一行灰字（计时器/混音台在右侧边栏），
   页签形同虚设。现在主区 = 引导卡 + 音景快捷网格，两端一致。 */
.med-hero { text-align: center; padding: 26px 18px; }
.med-h { font-size: 19px; font-weight: 700; color: var(--ink); }
.med-dsc { font-size: 13px; color: var(--ink2); line-height: 1.8; margin: 8px 0 16px; }
.med-start-btn { font-size: 16px; padding: 12px 42px; border-radius: 999px; }
/* 计时中：主区显示状态条，操作引导到面板 */
.med-state { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 6px 0; }
.med-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: mtPulse 1.6s ease-in-out infinite; }
.med-st-tx { font-weight: 600; color: var(--ink); }
/* 音景网格：自适应卡片，点一下即播 */
.med-scenes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.med-scene {
  position: relative; text-align: left; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: rgba(255,255,255,.72); padding: 11px 12px;
  display: flex; flex-direction: column; gap: 3px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.med-scene:hover { border-color: var(--accent); transform: translateY(-1px); }
.med-scene.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(95,148,134,.14); background: rgba(95,148,134,.08); }
.ms-nm { font-size: 14px; font-weight: 600; color: var(--ink); }
.ms-dsc { font-size: 11.5px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-on { position: absolute; top: 9px; right: 10px; font-size: 11px; color: var(--accent-deep); font-weight: 600; }
/* 窄屏：网格单列起步也不挤，卡片自动加宽 */
@media (max-width: 560px) {
  .med-scenes { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
.mt-dot { width: 8px; height: 8px; border-radius: 50%; background: #C7C7CC; flex: 0 0 8px; }
.mt-dot.run {
  background: var(--accent);
  animation: mtPulse 1.6s ease-in-out infinite;
}
@keyframes mtPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(95,148,134,.22); }
  50% { box-shadow: 0 0 0 6px rgba(95,148,134,.08); }
}
.mini-timer b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mt-label { flex: 1; min-width: 0; color: var(--ink2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-go { color: var(--accent-deep); font-weight: 600; font-size: 12.5px; }

/* ================= 移动端底栏 ================= */
.tabbar { display: none; }

/* ============================================================
 * 响应式
 * ============================================================ */
@media (max-width: 1180px) {
  .main { grid-template-columns: minmax(0,1fr) 312px; gap: 14px; padding: 16px 18px 18px; }
  .timer-ring { width: 210px; height: 210px; }
}

@media (max-width: 999px) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100vh; }


  .topbar { display: none; }   /* 移动端去掉「时光流年」顶栏，导航由底栏承担 */
  .nav { display: none; }

  .main {
    display: block; padding: 14px 16px 84px;
  }
  .content { overflow: visible; padding: 0; }

  /* 计时器面板：移动端只在「冥想」页签显示，置于内容上方；记录排在下面。
     其他页签计时中由悬浮计时条提示（.mini-timer） */
  .panel { display: none; }
  body[data-tab="meditate"] .main { display: flex; flex-direction: column; }
  body[data-tab="meditate"] .panel { display: flex; order: -1; }
  body[data-tab="meditate"] .mini-timer { display: none; }

  .timer-ring { width: 250px; height: 250px; }
  .timer-clock { font-size: 46px; }

  .board { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .heat { grid-template-columns: repeat(7, 1fr); }

  .task .tact { opacity: 1; }
  /* 手指能点准：按钮 34→40px、播放 44px 圆形、星号 20→25px、勾选圈 24px */
  .task .tact { gap: 5px; }
  .task .tact button { width: 40px; height: 40px; border-radius: 12px; font-size: 18px; }
  .task .tact .star-btn { font-size: 25px; }
  .task .tact .play { width: 44px; height: 44px; font-size: 19px; }
  .tick { width: 24px; height: 24px; flex: 0 0 24px; border-width: 1.8px; }
  .task .tick svg { width: 13px; height: 13px; }
  .filter-chips .chip { font-size: 13px; padding: 7px 11px; }
  .fc-play { width: 32px; height: 32px; flex: 0 0 32px; font-size: 13px; border-radius: 10px; }
  /* 移动端减少大面积实时模糊，保证滚动流畅 */
  .task, .bcol { backdrop-filter: none; -webkit-backdrop-filter: none; }

  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(255,255,255,0.66);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-top: 1px solid rgba(255,255,255,0.6);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mini-timer {
    display: flex; align-items: center; gap: 9px;
    position: fixed; left: 12px; right: 12px;
    bottom: calc(66px + env(safe-area-inset-bottom));
    z-index: 45; padding: 10px 14px; border-radius: 14px;
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.78);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
  }
  .tabbar button {
    flex: 1; min-width: 0; padding: 9px 0 8px; display: flex; flex-direction: column;
    align-items: center; gap: 3px; color: var(--ink3); font-size: 10px;
  }
  .tabbar button.on { color: var(--accent-deep); font-weight: 600; }
  .tabbar button i { display: block; width: 18px; height: 18px; }
  .tabbar button i svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
}

@media (max-width: 560px) {
  /* KPI 改 2×2：4 列挤在一行时数字只剩 15px、标签 9.5px，基本读不清 */
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .kpi { padding: 12px 12px; text-align: left; }
  .kpi .v { font-size: 21px; }
  .kpi .k { font-size: 11px; margin-top: 4px; }
  .heat { grid-template-columns: repeat(7, 1fr); gap: 4px; }
  .timer-ring { width: 214px; height: 214px; }
  .timer-clock { font-size: 40px; }
  .modal { padding: 18px; }
  body::before { width: 380px; height: 380px; }
  body::after { width: 440px; height: 440px; }
}
