/* Remember · 信号蓝主题。只改颜色、字形、动效，不改布局。回退：删掉 index.html 里对本文件和 js/fx.js 的引用。
   一个记忆点：助理（AI）是唯一带蓝紫流光的元素，其余保持安静。 */
:root {
  --desk: #F3F5F8;
  --sheet: #FFFFFF;
  --ink: #0E1726;
  --pencil: #7B8798;
  --rule: #E6EAF0;
  --mark: #E4EBFF;          /* 今天、选中：浅信号蓝，代替原来的荧光黄 */
  --done: #12A37F;
  --blue: #2B59FF;
  --blue-soft: #EAEFFF;
  --warn: #E5683C;
  --ai-a: #2B59FF;
  --ai-b: #8B5CF6;
  --ease: cubic-bezier(.22, .8, .24, 1);      /* 先快后慢，落点干脆 */
  --spring: cubic-bezier(.34, 1.4, .5, 1);    /* 轻微回弹，只用在点选反馈 */
  --sans: "SF Pro Text", "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}
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: #C5CCD8; background: #FAFBFD; }
.btn.primary { background: var(--ink); border-color: var(--ink); }
.btn.primary:hover { background: #1B2740; box-shadow: 0 4px 14px rgba(14,23,38,.22); transform: translateY(-1px); }
.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), 0 24px 60px -20px rgba(20,40,120,.22); 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: 9px; 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); }
.topbar, .ctxbar { border-bottom-color: var(--rule); background: rgba(255,255,255,.86); backdrop-filter: saturate(1.4) blur(10px); }
.topbar { position: relative; z-index: 2; }

/* 顶部 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: 6px; 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: 9px; }

/* 视图切换：轻微淡入上移 */
.view.on { animation: viewIn .32s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.side-ctx.on { animation: viewIn .28s var(--ease) both; }

/* ---------- 日期条、小日历 ---------- */
.wk-nav:hover { background: var(--desk); color: var(--ink); }
.week button { border-radius: 10px; }
.week button:hover { background: var(--desk); }
.week button.seen { background: var(--desk); }
.week button.today .d { background: var(--blue); color: #fff; border-radius: 6px; padding: 0 5px; box-shadow: 0 2px 8px rgba(43,89,255,.35); }
.week button.has::after { background: #B6BFCC; }
.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; box-shadow: 0 2px 8px rgba(43,89,255,.35); }
.cal-grid button.out { color: #C5CCD8; }
.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; box-shadow: 0 3px 10px rgba(43,89,255,.3); 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: #F7F9FC; }
.ln.editing { background: #F7F9FC; box-shadow: inset 2px 0 0 var(--blue); }
.ln .tm { color: var(--ink); }
.ln .ck { border-color: #BAC3D0; 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: #D9DFE8; 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: #46526A; }
.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, .chip.page { background: #F1F4F8; color: #56627A; }
.chip.note { background: #EEEBFF; color: #5B3FD6; }
.chip.clash { background: #FFECE6; color: #C2410C; }
.ln .ok { background: var(--blue); border-radius: 6px; }
.carry { border-left-color: var(--blue); background: var(--blue-soft); border-radius: 0 10px 10px 0; }
.carry .ci button { color: var(--blue); }
.sample-bar { background: var(--blue-soft); }

/* ---------- 列表（笔记/人物/地点/文件） ---------- */
.pp-list .pi, .nlist .ni { border-radius: 10px; }
.pp-list .pi:hover, .pp-list .pi.on { background: #EAEEF5; }
.nlist .ni:hover { background: #EAEEF5; }
.nlist .ni.on { background: var(--mark); box-shadow: inset 2px 0 0 var(--blue); }
.nlist .grp, .nlist .fold-head { background: #E9EDF3; border-radius: 8px; }
.profile { background: var(--desk); border-radius: 12px; }
.tl .tli:hover { background: #F7F9FC; }
.tl .tli.future .d { color: var(--blue); }
.fcard { border-radius: 14px; }
.fcard:hover { border-color: #C5CCD8; transform: translateY(-3px); box-shadow: 0 12px 28px -12px rgba(14,23,38,.2); }
.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: #C2410C; }
.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), 0 8px 24px -8px rgba(14,23,38,.18); }
body.searching .gsearch { border-color: var(--blue); }
.search-pane { animation: viewIn .22s var(--ease) both; }

/* ---------- 助理：整套里唯一的“发光”元素 ---------- */
.assist { background: linear-gradient(180deg, #FBFCFF 0%, #FFFFFF 40%); }
.msg { border-radius: 14px; animation: msgIn .34s var(--ease) both; }
.msg.user { background: linear-gradient(135deg, var(--ai-a), #5B4CF5); color: #fff; border-bottom-right-radius: 5px; box-shadow: 0 6px 16px -8px rgba(43,89,255,.55); }
.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), 0 8px 28px -10px rgba(91,76,245,.45); }
.assist.drop { outline-color: var(--blue); }
.try { border-radius: 99px; }
.try:hover { background: var(--blue-soft); }

/* ---------- 抽屉、浮层、提示 ---------- */
.drawer { box-shadow: -20px 0 50px -24px rgba(14,23,38,.22); 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: #C5CCD8; box-shadow: 0 6px 18px -10px rgba(14,23,38,.18); }
.dr-add button { border-radius: 8px; }
.dr-add button:hover { border-color: var(--blue); color: var(--blue); }
.kid .kck { border-color: #BAC3D0; }
.kid.done .kck { background: var(--done); border-color: var(--done); }
.note-title:focus { border-color: var(--blue); }

.pop { border-radius: 14px; box-shadow: 0 20px 50px -16px rgba(14,23,38,.3), 0 0 0 1px var(--rule); 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: 0 24px 60px -16px rgba(14,23,38,.35); }
dialog[open] { animation: popIn .24s var(--ease) both; transform-origin: center; }
.jump::backdrop { background: rgba(14,23,38,.28); backdrop-filter: blur(3px); }
.toast { border-radius: 12px; background: rgba(14,23,38,.94); backdrop-filter: blur(8px); box-shadow: 0 12px 30px -10px rgba(14,23,38,.5); animation: toastIn .34s var(--spring) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.toast button { color: #9DB4FF; }

.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: 0 30px 70px -20px rgba(14,23,38,.4); }
.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(--blue); }
  .m-tabs button i { transition: background-color .25s var(--ease), transform .3s var(--spring); }
  .m-tabs button.on i { background: var(--blue-soft); transform: translateY(-1px) scale(1.06); }
  .m-dock { border: 0; background: var(--sheet); box-shadow: 0 0 0 1.5px rgba(43,89,255,.55), 0 10px 30px -10px rgba(91,76,245,.5); 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); }
  .m-fab { background: var(--ink); box-shadow: 0 8px 22px -8px rgba(14,23,38,.55); animation: toastIn .3s var(--spring) both; }
  .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 rgba(43,89,255,.6), 0 0 32px rgba(91,76,245,.28), 0 20px 50px -16px rgba(14,23,38,.3); }
.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: 0; gap: 12px; }
.side .brand { height: 47px; display: flex; align-items: center; padding: 0 4px; font-size: 19px; line-height: 1; }

/* 日期列：数字一行、星期一行，今天不再换行挤压；空日子保持单行紧凑 */
.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; }
.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 #DDE3EC; }
.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: 14px; 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: #A3ADBC; }
.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; }
#aiState { line-height: 20px; padding-bottom: 4px; }

/* 日期条 */
.ctxbar { min-height: 44px; padding: 0 20px; }
.week button { padding: 4px 0 5px; }
.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 { height: 24px; line-height: 24px; padding: 0 8px; }

/* =====================================================================================================
   动效
   ===================================================================================================== */
/* 行被改期、排序时滑动：更长更柔的减速曲线 */
.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; }
/* 列表项出现：只在首次进入视图时错落 */
.view.on .fgrid > .fcard { animation: lnIn .42s var(--ease) both; }
.view.on .fgrid > .fcard:nth-child(2) { animation-delay: .03s; } .view.on .fgrid > .fcard:nth-child(3) { animation-delay: .06s; }
.view.on .fgrid > .fcard:nth-child(4) { animation-delay: .09s; } .view.on .fgrid > .fcard:nth-child(5) { animation-delay: .12s; }
.view.on .fgrid > .fcard:nth-child(n+6) { animation-delay: .15s; }
/* 抽屉关闭 */
.drawer.closing { animation: drawerOut .22s var(--ease) both; }
@keyframes drawerOut { to { opacity: 0; transform: translateX(28px); } }
/* 日期条选中、小日历选中：平滑过渡 */
.week button, .cal-grid button { transition: background-color .22s var(--ease), color .22s var(--ease), transform .2s var(--spring), box-shadow .22s var(--ease); }
.week button:active { transform: scale(.94); }
