/* Remember · 信号蓝主题。只改颜色、字形、动效，不改布局。回退：删掉 index.html 里对本文件和 js/fx.js 的引用。
   一个记忆点：助理（AI）是唯一带蓝紫流光的元素，其余保持安静。 */
:root {
  /* ===== 颜色。规范：docs/设计规范/通用.md「令牌」。全站令牌只在这里定义；其他 CSS/JS 里不写十六进制。===== */
  --ink: #0E1726;
  --pencil: #5A6678;        /* 次要文字、占位符、图标默认色。原 #7B8798 对比度 3.65 不够，改为 5.82 */
  --faint: #98A3B3;         /* 只给禁用线、装饰分隔、空状态插图；不能写字（2.55） */
  --rule: #E6EAF0;
  --desk: #F3F5F8;
  --sheet: #FFFFFF;
  --blue: #2B59FF;
  --blue-soft: #EAEFFF;
  --mark: #E4EBFF;          /* 今天、选中的行底 */
  --done: #0A7B5E;          /* 原 #12A37F 对比度 3.2，改为 5.24 */
  --done-soft: #E4F6F0;
  --warn: #B4400F;          /* 原 #E5683C 对比度 3.29，改为 5.71 */
  --warn-soft: #FFF1EB;
  --danger: #C9302C;        /* 原 #E5484D 对比度 3.91，改为 5.33 */
  --accent-warm: #B2431B;   /* 登录页、官网的暖强调（对白底 5.66）；其他页面不用 */
  --ai-a: #2B59FF;          /* 渐变只给助理（AI）用 */
  --ai-b: #8B5CF6;
  --ai-c: #5B4CF5;          /* 用户气泡渐变第二色，品牌定稿（qm 10-29 定保留，不改紫） */
  --blue-pressed: #1733B8;  /* 按住说话时按钮的加深蓝（Watch 实心胶囊；白字 9.54）：同色相变深，不换成别的颜色（qm 10-31） */
  --warn-on-dark: #FF8A5C;  /* 黑底（Watch）上的警告亮橙：最后 10 秒的倒计时那一行；对黑底 9.04，只用在深底上 */
  --ai-glow: linear-gradient(100deg, rgba(43,89,255,.28), rgba(139,92,246,.28));   /* 「问 AI」胶囊外圈光晕，只给助理用（qm 真机实测 10-30：不能是单色） */
  /* PC 规范 v1 A1（10-29）：页面里写死的颜色收成令牌。先加令牌，Web 端再逐个替换 */
  --ink-2: #46526A;         /* 次级正文：详情行、引用、标签字、工具条按钮（对白底 7.9） */
  --hover: #F7F9FC;         /* 悬停底，比 --desk 浅一档：日程行、按钮、图标按钮 */
  --rule-strong: #C5CCD8;   /* 悬停时的描边 */
  --line: #BAC3D0;          /* 可点图形的描边：勾选圈、待办方框（1.8，只做描边不写字） */
  --ink-hover: #1B2740;     /* 主按钮悬停底 */
  --blue-on-ink: #9DB4FF;   /* 只用在深底上的蓝：提示条里的「撤销」 */
  --ai-tint: #FBFCFF;       /* 助理栏顶部渐变起点，只给助理 */
  --ink-3: #3A4558;         /* 登录页表单标签、勾选行文字（对白底 9.67）；比 --ink-2 深一档，保持登录页现在的样子 */
  /* 登录页收拢（10-30）：深底（--ink）上的三档浅色 + 蓝字深色 */
  --on-ink-2: #AEB8C8;      /* 深底上的副文案（对 --ink 8.97） */
  --on-ink-3: #7F8CA3;      /* 深底上的版权小字（对 --ink 5.29） */
  --on-ink-ai: #7C98FF;     /* 深底上的「AI」标志色（对 --ink 6.66） */
  --blue-deep: #1B3BB3;     /* --blue-soft 底上的蓝字、官网的 --blue 按下色（对 --blue-soft 7.87） */
  --hl-yellow: #FFF1B8; --hl-blue: #DCE6FF; --hl-green: #D5F2E6; --hl-red: #FFE0D9;   /* 只给文档里的文字高亮 */

  /* ===== 字号（七档，字号档位 v1：10-29 加 14）===== */
  --fs-xs: 12px; --fs-sm: 13px; --fs-ms: 14px; --fs-md: 15px; --fs-lg: 17px; --fs-xl: 22px; --fs-2xl: 28px;
  /* ===== 间距（4 的倍数）===== */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
  /* ===== 圆角（只有四档）===== */
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-full: 999px;
  /* 浮层三档（T39）：菜单、气泡、提示条 14；对话框 16；底部面板、大卡片 18 */
  --r-pop: 14px; --r-dialog: 16px; --r-sheet: 18px;
  /* ===== 阴影（只有四档；值取自页面里最终生效、效果好的那一个，出处见 docs/设计规范/盘点.md「阴影」）===== */
  --sh-float: 0 20px 50px -16px rgba(14,23,38,.30), 0 0 0 1px var(--rule);   /* 浮层：人物浮层 #pop、@ 列表、语音卡 */
  --sh-dialog: 0 24px 60px -16px rgba(14,23,38,.35);                            /* 对话框：跳转日期 .jump、看大图 .pic-dlg、登录卡 */
  --sh-drawer: -20px 0 50px -24px rgba(14,23,38,.22);                           /* 抽屉：详情页 .drawer */
  --sh-fab: 0 8px 22px -8px rgba(14,23,38,.55);                                 /* 悬浮控件：回到今天 .today-fab、提示条 .toast、AI 胶囊 */
  /* ===== 控件高度 ===== */
  --h-sm: 32px; --h-md: 38px; --h-lg: 44px;
  /* ===== 动效 ===== */
  --ease: cubic-bezier(.22, .8, .24, 1);      /* 先快后慢，落点干脆 */
  --spring: cubic-bezier(.34, 1.4, .5, 1);    /* 轻微回弹，只用在点选反馈 */
  --t-fast: 160ms; --t-base: 260ms; --t-slow: 380ms;
  /* ===== 字体 ===== */
  --sans: "SF Pro Text", "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;   /* 只给官网标题 */
  /* ===== 断点（写在这里是文档；CSS 里 @media 不能用变量）：手机 ≤760px，助理栏默认展开 ≥1100px ===== */
}
body { letter-spacing: .005em; -webkit-font-smoothing: antialiased; }
::selection { background: rgba(43,89,255,.18); }
code, kbd { background: var(--desk); border: 1px solid var(--rule); border-radius: 5px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

/* ---------- 通用手感：所有可点的东西都有统一的过渡和按下反馈 ---------- */
button, .btn, .chip, .pi, .ni, .fcard, .hit, .rp, .try { transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), box-shadow .22s var(--ease), transform .18s var(--ease), opacity .18s var(--ease); }
button:active:not(:disabled), .btn:active, .fcard:active, .ni:active { transform: scale(.97); }

.btn { border-radius: 8px; padding: 6px 14px; }
.btn:hover { border-color: var(--rule-strong); background: var(--hover); }
.btn.primary { background: var(--ink); border-color: var(--ink); }
.btn.primary:hover { background: var(--ink-hover); }
.btn.ghost:hover { background: var(--blue-soft); border-color: transparent; }
.link:hover { color: var(--ink); }

/* ---------- 登录 ---------- */
.login { background: radial-gradient(900px 500px at 50% -10%, #E6ECFF 0%, transparent 60%), var(--desk); }
.login-card { border-radius: 16px; box-shadow: 0 1px 0 var(--rule), var(--sh-dialog); animation: rise .5s var(--ease) both; }
.login-card .brand { font-weight: 700; letter-spacing: .02em; }
.login-card input, textarea, input[type=search], .row input[type=number], .fields input, .fields textarea { border-radius: var(--r-sm); transition: border-color .18s var(--ease), box-shadow .22s var(--ease), background-color .18s; }
.login-card input:focus, textarea:focus, input[type=search]:focus, .fields input:focus, .fields textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(43,89,255,.12); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 外壳 ---------- */
.shell { background: var(--desk); }
.brand { font-weight: 700; letter-spacing: .06em; }
.main { border-color: var(--rule); }
.ctxbar { border-bottom-color: var(--rule); background: rgba(255,255,255,.86); backdrop-filter: saturate(1.4) blur(10px); }

/* 顶部 tab：滑动的指示块（由 fx.js 摆位置） */
.nav, .seg { position: relative; }
.nav button, .seg button { position: relative; z-index: 1; }
.nav button.on, .seg button.on { background: transparent; box-shadow: none; }
.nav button { border-radius: 8px; }
.nav button:hover:not(.on) { background: transparent; color: var(--ink); }
.fx-pill { position: absolute; left: 0; top: 0; z-index: 0; border-radius: 8px; background: var(--desk); pointer-events: none; opacity: 0;
  transition: transform .34s var(--ease), width .34s var(--ease), height .34s var(--ease), opacity .2s; }
.seg .fx-pill { background: var(--sheet); border-radius: var(--r-sm); box-shadow: 0 1px 2px rgba(14,23,38,.08), 0 0 0 1px rgba(14,23,38,.04); }
.seg { background: var(--desk); border-radius: var(--r-sm); }

/* 视图切换：直接切，不放入场动画。以前每次点 tab 都放一遍 viewIn，再叠一遍 jump.js 的 jumpIn，
   看起来像整页又刷新了一次。「跳转」（去看看、点人物标签）才有一次淡入，见 doc.css 的 .view.jump-in。 */
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 日期条、小日历 ---------- */
.cal { border-radius: 12px; box-shadow: 0 0 0 1px var(--rule); }
.cal-grid button { border-radius: 8px; }
.cal-grid button.today { background: var(--blue); color: #fff; border: 1px solid var(--rule); }
.cal-grid button.out { color: var(--pencil); }   /* 非本月的日期：--pencil（规范 ㉔） */
.cal-grid button:active { transform: scale(.9); }

/* ---------- 日程主体 ---------- */
.day { border-top-color: var(--rule); }
.day .g .n { border-radius: 7px; transition: background-color .2s var(--ease), color .2s var(--ease); }
.day.today .g .n { background: var(--blue); color: #fff; border: 1px solid var(--rule); padding: 0 7px; }
.day .g .lb { color: var(--blue); }
.month { color: var(--pencil); letter-spacing: .04em; }
.ln { border-radius: 8px; transition: background-color .16s var(--ease), box-shadow .2s var(--ease); }
.ln:hover { background: var(--hover); }
.ln.editing { background: var(--hover); box-shadow: inset 2px 0 0 var(--blue); }
.ln .tm { color: var(--ink); }
.ln .ck { border-color: var(--line); transition: background-color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), transform .3s var(--spring); }
.ln .ck:hover { border-color: var(--done); transform: scale(1.12); }
.ln.done .ck { animation: tick .38s var(--spring); }
@keyframes tick { 0% { transform: scale(.8); } 60% { transform: scale(1.22); } 100% { transform: scale(1); } }
.ln .t { transition: color .25s var(--ease); }
.ln.sub { border-left-color: var(--rule); transition: border-color .2s var(--ease), background-color .16s; }
.ln.sub:hover, .ln.sub:focus-within { border-left-color: var(--blue); }
.ln.sub .t { color: var(--ink-2); }
.ln.enter { animation: lnIn .34s var(--ease); }
@keyframes lnIn { from { opacity: 0; transform: translateY(-8px) scale(.99); } to { opacity: 1; transform: none; } }
.ln.flash, .ln.flash:hover { background: var(--mark); }
@keyframes flash { 0% { background: rgba(43,89,255,.22); } 100% { background: transparent; } }
.ln .ops { transition: opacity .18s var(--ease); }
.ops button { border-radius: 6px; }
.chip { border-radius: 99px; padding: 0 9px; }
.chip:hover { filter: brightness(.96); }
.chip.place { background: var(--desk); color: var(--ink-2); }
.chip.clash { background: var(--warn-soft); color: var(--warn); }
.sample-bar { background: var(--blue-soft); }

/* ---------- 列表（笔记/人物/地点/文件） ---------- */
.pp-list .pi, .nlist .ni { border-radius: var(--r-sm); }   /* 列表行圆角统一 8（规范 ㉗）*/
.pp-list .pi:hover, .pp-list .pi.on { background: var(--desk); }
.nlist .ni:hover { background: var(--desk); }
.nlist .ni.on { background: var(--mark); box-shadow: inset 2px 0 0 var(--blue); }
.nlist .grp, .nlist .fold-head { background: var(--desk); border-radius: 8px; }
.profile { background: var(--desk); border-radius: 12px; }
.tl .tli:hover { background: var(--hover); }
.tl .tli.future .d { color: var(--blue); }
.fcard { border-radius: 14px; }
.fcard:hover { border-color: var(--rule-strong); transform: translateY(-3px); border: 1px solid var(--rule); }
.fcard .th img { transition: transform .5s var(--ease); }
.fcard:hover .th img { transform: scale(1.05); }
.pend, .conflict { border-radius: 12px; }
.conflict { background: #FFF5F1; border-color: #F6CFC2; }
.conflict .cm { color: var(--warn); }
.hit:hover, .search-pane .hit:hover, .search-pane .hit.on { background: var(--desk); }

/* ---------- 搜索 ---------- */
.gsearch { border-radius: 99px; background: var(--desk); border-color: transparent; padding: 4px 14px; transition: background-color .2s var(--ease), border-color .2s var(--ease), box-shadow .25s var(--ease); }
.gsearch:hover { background: #EBEFF5; }
.gsearch:focus { background: var(--sheet); border-color: var(--blue); box-shadow: 0 0 0 4px rgba(43,89,255,.12); }
body.searching .gsearch { border-color: var(--blue); }
.search-pane { animation: viewIn .22s var(--ease) both; }

/* ---------- 助理：整套里唯一的“发光”元素 ---------- */
.assist { background: linear-gradient(180deg, var(--ai-tint) 0%, var(--sheet) 40%); }
.msg { border-radius: 14px; animation: msgIn .34s var(--ease) both; }
.msg.user { background: linear-gradient(135deg, var(--ai-a), var(--ai-c)); color: #fff; border-bottom-right-radius: 5px; box-shadow: 0 0 0 1px var(--rule); }
.msg.assistant { background: var(--sheet); box-shadow: 0 0 0 1px var(--rule); border-bottom-left-radius: 5px; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.msg.wait.typing .txt::after { color: var(--blue); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.msg .act button { color: var(--blue); }
.chat-in { border-top-color: var(--rule); }
.chat-in textarea { border-radius: 14px; background: var(--sheet); }
.chat-in textarea:focus { border-color: transparent; box-shadow: 0 0 0 1.5px var(--ai-a), 0 0 0 5px rgba(79,70,229,.10); }
.assist.drop { outline-color: var(--blue); }
.try { border-radius: 99px; }
.try:hover { background: var(--blue-soft); }

/* ---------- 抽屉、浮层、提示 ---------- */
.drawer { box-shadow: var(--sh-drawer); border-left-color: var(--rule); }
.drawer:not([hidden]):not(.docked) { animation: drawerIn .36s var(--ease) both; }
@keyframes drawerIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
.blk { border-radius: 12px; transition: border-color .2s var(--ease), box-shadow .22s var(--ease); }
.blk:hover, .blk:focus-within { border-color: var(--rule-strong); }
.dr-add .btn:hover { border-color: var(--blue); color: var(--blue); }
.kid .kck { border-color: var(--line); }

.note-title:focus { border-color: var(--blue); }

.pop { border-radius: 14px; box-shadow: var(--sh-float); animation: popIn .22s var(--ease) both; transform-origin: top left; }
@keyframes popIn { from { opacity: 0; transform: scale(.96) translateY(-4px); } to { opacity: 1; transform: none; } }
.jump, .pic-dlg { border-radius: 16px; box-shadow: var(--sh-dialog); }
dialog[open] { animation: popIn .24s var(--ease) both; transform-origin: center; }
.jump::backdrop { background: rgba(14,23,38,.28); backdrop-filter: blur(3px); }
.toast { background: rgba(14,23,38,.94); backdrop-filter: blur(8px); box-shadow: var(--sh-fab); animation: toastIn .34s var(--spring) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.toast button { color: var(--blue-on-ink); }   /* 深色提示条上的动作，对比度 8.9；深底专用，不是白底文字色 */

.tour { background: rgba(14,23,38,.4); backdrop-filter: blur(4px); animation: fade .25s var(--ease) both; }
.tour-card { border-radius: 18px; animation: rise .4s var(--ease) both; box-shadow: var(--sh-dialog); }
.tour-demo { border-radius: 12px; }
.tour-dots span { transition: width .3s var(--ease), background-color .3s; }
.tour-dots span.on { width: 18px; border-radius: 3px; background: var(--blue); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 手机 ---------- */
@media (max-width: 760px) {
  .m-top { background: rgba(255,255,255,.88); backdrop-filter: saturate(1.5) blur(14px); border-bottom-color: var(--rule); }
  .m-tabs { background: rgba(255,255,255,.9); backdrop-filter: saturate(1.5) blur(14px); border-top-color: var(--rule); }
  .m-tabs button.on { color: var(--ink); }
  .m-tabs button i { transition: background-color .25s var(--ease), transform .3s var(--spring); }
  .m-tabs button.on i { background: transparent; }
  .m-dock { border: 0; background: var(--sheet); box-shadow: 0 0 0 1.5px rgba(43,89,255,.55), var(--sh-fab); transition: box-shadow .3s var(--ease), transform .2s var(--ease); }
  .m-dock:active { transform: scale(.985); }
  .m-dock-hold, .chat-in .hold-btn { background: var(--blue-soft); color: var(--blue); }
  .today-fab { background: var(--ink); box-shadow: var(--sh-fab); }
  .assist { transition: transform .38s var(--ease), visibility 0s linear .38s; }
  body.chat-open .assist { transition: transform .38s var(--ease); }
  .pp-detail { transition: transform .34s var(--ease); }
  .drawer:not(.docked) { transition: transform .34s var(--ease); animation: none; }
  .m-sheet { transition: transform .34s var(--ease); }
  .m-top-sheet { border-radius: 0 0 22px 22px; }
  .pop { border-radius: 22px 22px 0 0; animation: sheetUp .32s var(--ease) both; }
  .ops button { border-radius: 99px; }
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 语音面板：蓝紫流光 */
.voice-card { border-radius: 22px; box-shadow: 0 0 0 1.5px var(--blue), var(--sh-float); }
.voice-bars i { background: linear-gradient(180deg, var(--ai-a), var(--ai-b)); }
.voice-title span { background: var(--blue-soft); color: var(--blue); }

/* 滚动条细一点 */
* { scrollbar-width: thin; scrollbar-color: #D3DAE5 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #D3DAE5; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #B6C0D0; background-clip: content-box; border: 2px solid transparent; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* =====================================================================================================
   细节校准：对齐、高度、字号、间距。基线：一行 24px（15px / 1.6），所有行内元素按这条线居中。
   ===================================================================================================== */

/* 左栏品牌与中栏 tab 同一条水平线 */
.side { padding-top: 12px; gap: 12px; }

/* 日期列：数字一行、星期一行，今天不再换行挤压；空日子保持单行紧凑 */
.day .g { display: block; line-height: 1.25; }
.day .g .n { display: inline-block; height: 26px; line-height: 26px; padding: 0 4px; margin-left: -4px; font-variant-numeric: tabular-nums; }
.day.today .g .n { padding: 0 8px; margin-left: -4px; }
.day:not(.empty) .g .w { display: block; margin: 1px 0 0 0; font-size: 12px; line-height: 16px; white-space: nowrap; }
.day.empty .g .w { margin-left: 2px; white-space: nowrap; }   /* 空日子也是一行：「Mon tomorrow」「Di übermorgen」不再换到第二行 */
.day.today .g .w { color: var(--blue); font-weight: 600; }
.day .g .lb { margin: 2px 0 0 0; }

/* 勾选列：圆圈与第一行文字垂直居中，序号和圆圈之间留固定间距，去掉「1、」的顿号 */
.ln .k { height: 26px; padding-top: 0; align-items: center; gap: 5px; width: 50px; }
.ln .num { min-width: 12px; font-size: 12px; color: var(--pencil); text-align: left; letter-spacing: 0; }
.ln .ck { width: 16px; height: 16px; }
.ln .t { padding: 1px 2px; line-height: 24px; }
.ln .chips { padding-top: 3px; }
.ln .ops { padding-top: 0; align-items: center; height: 26px; }

/* 详情行：竖线对齐上一行的圆圈中心，序号占位去掉，圆圈不再飘出去 */
.ln.sub { margin-left: 57px; padding-left: 10px; border-left: 2px solid var(--rule); }
.ln.sub .k { width: 20px; justify-content: center; height: 26px; }
.ln.sub .num { display: none; }
.ln.sub .ck { width: 13px; height: 13px; }
.ln.sub .t { font-size: var(--fs-ms); line-height: 24px; }

/* 聊天输入区：输入框与按钮同高（44）、底边对齐、随内容长高；占位符不再折行 */
.chat-in { align-items: flex-end; gap: 8px; padding: 12px 16px 16px; }
.chat-in textarea { min-height: 44px; height: 44px; max-height: 196px; padding: 10px 14px; line-height: 24px; field-sizing: content; border-radius: 14px; }
.chat-in textarea::placeholder { color: var(--pencil); opacity: 1; }
.chat-in .btn { height: 44px; padding: 0 16px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
.chat-in .btn.primary { padding: 0 20px; }

/* 左栏底部：去掉下划线，行高统一，上方加一条分隔线 */
.side-foot { gap: 2px; border-top: 1px solid var(--rule); padding-top: 10px; }
.side-foot .link { text-decoration: none; height: 24px; display: inline-flex; align-items: center; font-size: 12px; }
.side-foot .link:hover { color: var(--blue); }
.side-foot .foot-row, .side-foot .foot-links { min-height: 24px; }
/* Whether what is on screen is on the server. Stays up while something failed (a toast would vanish). */
.save-state { display: block; text-align: left; border: 0; background: none; padding: 2px 0; font: inherit;
  font-size: 12px; color: var(--pencil); cursor: default; }
.save-state.ok { color: var(--done); }
.save-state.bad { color: var(--danger); cursor: pointer; text-decoration: underline dotted; }
#aiState { line-height: 20px; padding-bottom: 4px; }

/* 日期条 */
.ctxbar { min-height: 44px; padding: 0 20px; }
.small-btn { height: 28px; line-height: 1; }
.nb-title { font-size: 15px; }

/* 示例横条、今天还剩 */
.sample-bar { min-height: 44px; padding: 0 24px; }
.sample-bar .btn { height: 30px; padding: 0 12px; display: inline-flex; align-items: center; }
.tb-item { height: 28px; padding: 0 8px; display: flex; align-items: center; font-size: 13px; }
.today-box { gap: 0; }
.tb-sum { font-size: var(--fs-ms); min-height: 28px; line-height: 22px; padding: 4px 4px 6px; white-space: nowrap; flex-wrap: nowrap; }   /* 比下面列表(13px)大 1px;必须一行,放不下由 assist.js fitTodaySum 缩字号 */   /* 长语言会换行：高度跟着内容走，下面的事项被自然推下去 */

/* =====================================================================================================
   动效
   ===================================================================================================== */
/* 行被改期、排序时滑动：更长更柔的减速曲线 */
.ln { will-change: auto; }
/* 离开：向右滑出并淡出，再折叠高度 */
.ln.leaving { transition: opacity .22s var(--ease), transform .3s var(--ease), max-height .3s var(--ease) .12s; opacity: 0; transform: translateX(18px); max-height: 0 !important; overflow: hidden; }
/* 聊天：新消息平滑滚到底 */
.msgs { scroll-behavior: smooth; }
/* 日程里高亮落点：蓝色光晕扩散一下 */
.ln.flash { animation: landed 1.4s var(--ease) both; }
@keyframes landed { 0% { background: rgba(43,89,255,.20); box-shadow: 0 0 0 0 rgba(43,89,255,.35); } 40% { box-shadow: 0 0 0 6px rgba(43,89,255,0); } 100% { background: transparent; box-shadow: none; } }
/* 勾选：完成后文字平滑变灰，已完成的行轻微后退 */
.ln.done .t, .ln.sub.done .t { transition: color .3s var(--ease), opacity .3s; }
/* 列表项出现：只在首次进入视图时错落 */

/* 抽屉关闭 */
.drawer.closing, .drawer:not([hidden]):not(.docked).closing { animation: drawerOut .22s var(--ease) both; }   /* 第二个选择器和 drawerIn 那条一样重,写在后面才压得过:原来 drawerOut 从没播放过,关闭前整个抽屉原样停 220ms 再消失 = 闪一下(T122) */
@keyframes drawerOut { to { opacity: 0; transform: translateX(28px); } }
/* 日期条选中、小日历选中：平滑过渡 */

/* Remember AI 文字标志：Remember 深色，Ai 蓝色，衬线粗体（与官网一致） */
.brand { font-family: var(--serif); font-weight: 700; letter-spacing: .01em; color: var(--ink); }
.brand i { font-style: normal; color: var(--blue); }
.side .brand { font-size: 21px; letter-spacing: .01em; }
.login-card .brand { font-size: 30px; letter-spacing: .01em; }

/* =====================================================================================================
   手机：悬浮 AI 胶囊（取代整条输入栏）。平时浮在内容上，点一下进入输入，长按说话。
   ===================================================================================================== */
@media (max-width: 760px) {
  :root { --dock: 0px; }
  .main { bottom: calc(var(--tabbar) + var(--safe-b)); }
  .scroller { padding-bottom: 96px; }
  .pad { padding-bottom: 96px; }
  .toasts { bottom: calc(var(--tabbar) + var(--safe-b) + 14px + 44px + 12px); }   /* above the centred 「问 AI」 pill (14 + 44 + 12 gap), never on top of it (T144) */

  /* 「问 AI / 按住说话」胶囊:水平居中,在底栏上方(T144,与 iOS 原型一致)。容器铺满一行但不接收点击(pointer-events:none),只有胶囊自己接收;
     下边距 = 底栏 + 安全区 + 14px,所以不会被底部标签栏、刘海/手势条遮住 */
  .m-dock { left: 0; right: 0; justify-content: center; bottom: calc(var(--tabbar) + var(--safe-b) + 14px); height: auto; padding: 0; gap: 0;
            background: none; border: 0; box-shadow: none; pointer-events: none; z-index: 7; }
  .m-dock:active { transform: none; }
  .m-orb { pointer-events: auto; position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px 0 12px;
           border: 0; border-radius: 22px; background: rgba(255,255,255,.94); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
           color: var(--ink); font-size: 15px; font-weight: 600; letter-spacing: .01em; cursor: pointer;
           box-shadow: 0 0 0 1px rgba(43,89,255,.16), var(--sh-fab);
           touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
           animation: orbIn .5s var(--spring) both;
           transition: transform .26s var(--spring), box-shadow .3s var(--ease), opacity .22s var(--ease); }
  /* 呼吸光晕：一层很淡的蓝紫光，只改透明度，不旋转 */
  .m-orb::before { content: ""; position: absolute; inset: -6px; border-radius: 28px; z-index: -1; pointer-events: none;
                   background: var(--ai-glow); filter: blur(10px);
                   animation: orbBreath 3.6s ease-in-out infinite; }
  @media (prefers-reduced-motion: reduce) { .m-orb::before { animation: none; } }   /* 减少动态效果：只留静态渐变 */
  .orb-ic { width: 26px; height: 26px; border-radius: 50%; flex: none;
            background: radial-gradient(circle at 32% 28%, #fff 0 14%, transparent 15%), conic-gradient(from 210deg, var(--ai-a), var(--ai-b), #38BDF8, var(--ai-a));
            box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); }
  /* 按下：先缩一点，表示在等你是点还是长按；到时间后进入说话 */
  .m-orb.arming { transform: scale(.94); box-shadow: 0 0 0 1px rgba(43,89,255,.3), var(--sh-fab); }
  /* 说话时胶囊让位给语音卡 */
  body.voice-on .m-orb { opacity: 0; transform: scale(.8) translateY(10px); pointer-events: none; }
  body.chat-open .m-dock { visibility: hidden; }
}
@keyframes orbIn { from { opacity: 0; transform: translateY(18px) scale(.86); } to { opacity: 1; transform: none; } }
@keyframes orbBreath { 0%, 100% { opacity: .35; } 50% { opacity: .9; } }

/* 语音卡：贴近胶囊，从下方升起；波形用小圆点 */
@media (max-width: 760px) {
  .voice { bottom: calc(var(--tabbar, 54px) + var(--safe-b, 0px) + 10px); }
  .voice-card { min-height: 190px; background: linear-gradient(180deg, #FFFFFF, #F6F5FF); }
  .voice-msg { margin: 10px 0 18px; color: #6B7487; }
  .voice-bars i { width: 4px; border-radius: 50%; }
  .voice-bars { gap: 4px; height: 30px; }
}

/* =====================================================================================================
   从右到左（阿拉伯语）：<html dir="rtl"> 时整个界面镜像。三栏用 grid，会自己翻过来；这里只补那些写死了
   left / right 的地方。文字方向交给浏览器；数字、代码、地址仍按从左到右显示。
   ===================================================================================================== */
html[dir="rtl"] body { direction: rtl; }
html[dir="rtl"] input, html[dir="rtl"] textarea { text-align: start; }
html[dir="rtl"] .gbar { padding: 0 20px 0 16px; }
html[dir="rtl"] .gbar .gs-slot { margin: 0 8px 0 auto; }
html[dir="rtl"] #langMenu { right: auto; left: 62px; }
html[dir="rtl"] #acctMenu { right: auto; left: 12px; }
html[dir="rtl"] .gb-menu { transform-origin: top left; }
html[dir="rtl"] .gb-menu .on::after { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .gb-menu button, html[dir="rtl"] .gb-menu a { text-align: right; }
html[dir="rtl"] .main { border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); }
html[dir="rtl"] .assist-grip { left: auto; right: -4px; }
html[dir="rtl"] .search-pane { left: var(--assist-w); right: var(--side-w); }
html[dir="rtl"] .at-pop { direction: rtl; }
html[dir="rtl"] .chip-wrap .chip-x { right: auto; left: -4px; }
html[dir="rtl"] .blk.pic .bgrab { left: auto; right: 6px; }
html[dir="rtl"] .blk.pic .bzoom { left: auto; right: 36px; }
html[dir="rtl"] .blk.pic .bx { right: auto; left: 6px; }
html[dir="rtl"] .blk-row > .brs { right: auto; left: -4px; cursor: nesw-resize; }
html[dir="rtl"] .trash-head .btn:first-of-type { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .msg.user { align-self: flex-start; }
html[dir="rtl"] .msg.assistant { align-self: flex-end; }
html[dir="rtl"] .toasts { right: auto; left: calc(var(--assist-w) + 20px); }
html[dir="rtl"] code, html[dir="rtl"] .num, html[dir="rtl"] .tm, html[dir="rtl"] [data-ltr] { direction: ltr; unicode-bidi: embed; }
