/* Note page as a document (rich.js), page-level loading, jump highlight, the phone half-height chat.
   Uses the theme's colours and easing (theme.css :root), nothing of its own. */

/* ---------- the page ---------- */
.drawer .dr-scroll { cursor: text; }
.dr-blocks.doc { display: block; padding-bottom: 40vh; }   /* room to click below the last line */
.dr-blocks.doc > * + * { margin-top: 6px; }
.dr-blocks.doc > .blk { margin: 12px 0; cursor: default; }
/* pictures sit in the text like in a document: a row holds one or more (up to 4), level and never wider than the page */
.dr-blocks.doc > .blk-row { position: relative; display: flex; gap: 8px; align-items: center; margin: 10px 0; max-width: 100%; }   /* 每张保持自己的宽高比,行内垂直居中(T160) */
.blk-row > .blk { position: relative; min-width: 0; margin: 0; }
.blk.pic { border-color: transparent; padding: 0; box-shadow: none; display: block; overflow: hidden; border-radius: 8px; }
.blk.pic > .bk { display: none; }
.blk.pic img.pv { display: block; width: 100%; height: auto; max-height: 460px; object-fit: contain; border-radius: 8px; cursor: grab; -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
.blk-row:not(.single) .blk.pic img.pv { max-height: none; }   /* 多张并排:宽度按张数等分,高度跟各自的宽高比走 */
.blk.pic { -webkit-user-select: none; user-select: none; }
/* 手机上按住图片拖动:图片区域不让浏览器接管成「滚动页面」——否则中途收到 pointercancel,拖到一半就断了(T160 线上取证:手机 390 宽 pointercancel)。
   代价:手指按在图片上不能滚页面,在图片之间的文字/空白处滚动不受影响 */
/* T174（H5 维护）：原来整张图 touch-action:none，手指按在图上就划不动页面（一篇笔记几乎全是图）。
   现在没选中的图 touch-action: pan-y，纵向滑动照常滚页面；选中的那张和拖拽把手才接管手势（长按 0.4 秒不动会选中并开始拖）。 */
@media (hover: none) { .blk.pic { touch-action: pan-y; } .blk.pic.on { touch-action: none; } }   /* 没选中：纵向滑动照常滚页面；长按 0.4 秒不动 = 选中并可拖（blocks.js armDrag）；选中后手势归图片 */
.blk.pic.on { box-shadow: 0 0 0 2px var(--blue); }
.blk.pic .bx { top: 6px; right: 6px; background: rgba(14,23,38,.6); color: #fff; border-radius: 50%; width: 22px; height: 22px; line-height: 20px; padding: 0; z-index: 2; }
.blk.pic .bgrab, .blk.pic .bzoom { position: absolute; top: 6px; width: 24px; height: 24px; border: 0; border-radius: 6px; padding: 0; z-index: 2;
  display: grid; place-items: center; background: rgba(14,23,38,.6); color: #fff; opacity: 0; cursor: pointer; }
.blk.pic .bgrab { left: 6px; cursor: grab; touch-action: none; }
.blk.pic .bzoom { left: 36px; }
.blk.pic:hover .bgrab, .blk.pic:hover .bzoom, .blk.pic.on .bgrab, .blk.pic.on .bzoom, .blk.pic:hover .bx, .blk.pic.on .bx { opacity: 1; }
@media (hover: none) { .blk.pic .bgrab, .blk.pic .bzoom, .blk.pic .bx { opacity: 1; } }
/* the handle at a row's bottom-right: drag to make the whole row bigger or smaller */
.blk-row > .brs { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; border: 0; padding: 0; border-radius: 50%;
  background: var(--blue); box-shadow: 0 0 0 2px #fff; cursor: nwse-resize; opacity: 0; touch-action: none; z-index: 3; }
.blk-row:hover > .brs, .blk-row:has(.blk.on) > .brs { opacity: 1; }
@media (hover: none) { .blk-row > .brs { opacity: 1; } }
/* dragging a picture */
.blk.dragging { opacity: .35; }
body.dragging-blk, body.dragging-blk * { cursor: grabbing !important; user-select: none !important; }
.blk-ghost { position: fixed; z-index: 90; pointer-events: none; opacity: .85; transform: scale(.35); transform-origin: top left; border: 1px solid var(--rule); }
.drop-mark { position: fixed; z-index: 89; display: none; background: var(--blue); border-radius: 2px; pointer-events: none; }
.drawer.docked .dr-scroll { padding: 8px 40px 0; }
.drawer.docked .dr-blocks.doc, .drawer.docked .dr-info, .drawer.docked .rt-bar-in { max-width: 760px; }

.rt { outline: none; font-size: 15px; line-height: 1.75; color: var(--ink); min-height: 1.75em; word-break: break-word; caret-color: var(--blue); }
.rt > :first-child { margin-top: 0; }
.rt p { margin: 0; min-height: 1.75em; }
.rt h1 { font-size: 24px; line-height: 1.4; margin: 18px 0 6px; font-weight: 700; }
.rt h2 { font-size: 20px; line-height: 1.45; margin: 14px 0 4px; font-weight: 700; }
.rt h3 { font-size: 17px; line-height: 1.5; margin: 10px 0 2px; font-weight: 700; }
.rt ul, .rt ol { margin: 2px 0; padding-left: 1.6em; }
.rt li { margin: 1px 0; padding-left: 2px; }
.rt li > ul, .rt li > ol { margin: 0; }
.rt ul[data-ck] { list-style: none; padding-left: 4px; }
.rt ul[data-ck] > li { position: relative; padding-left: 26px; }
.rt ul[data-ck] > li::before { content: ""; position: absolute; left: 2px; top: .42em; width: 14px; height: 14px; border: 1.5px solid var(--line);
                               border-radius: 4px; background: #fff; cursor: pointer; transition: background-color .18s var(--ease), border-color .18s var(--ease); }
.rt ul[data-ck] > li[data-ck="1"]::before { background: var(--blue); border-color: var(--blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.2l3 3 6-6.4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 12px; background-position: center; background-repeat: no-repeat; }
.rt ul[data-ck] > li[data-ck="1"] { color: var(--pencil); text-decoration: line-through; }
.rt blockquote { margin: 6px 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--rule); color: var(--ink-2); }
.rt code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; padding: 1px 4px; }
.rt pre { background: var(--desk); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; font-size: 13px; }
.rt hr { border: 0; border-top: 1px solid var(--rule); margin: 12px 0; }
.rt [data-in="1"] { padding-left: 2em; } .rt [data-in="2"] { padding-left: 4em; }
.rt [data-in="3"] { padding-left: 6em; } .rt [data-in="4"] { padding-left: 8em; }
.rt mark { border-radius: 3px; padding: 0 1px; color: inherit; }
.rt mark, .rt mark.hl-y { background: var(--hl-yellow); }
.rt mark.hl-b { background: var(--hl-blue); }
.rt mark.hl-g { background: var(--hl-green); }
.rt mark.hl-r { background: var(--hl-red); }
/* the hint lives on the editor (data-ph); the first paragraph shows it, so read it from the parent with a var */
.note-title:empty::before { content: attr(data-ph); color: var(--pencil); pointer-events: none; }
.rt.blank > p:first-child::before { content: var(--ph, ""); color: var(--pencil); pointer-events: none; }   /* 只有整页空白时才有引导字(--ph 由 ghostText 设置);有内容的笔记里,空行不显示任何灰字(T161),但保持一行高度、点得到 */
.rt.blank > p:first-child { position: relative; }
.rt.blank > p:first-child::before { position: absolute; left: 0; top: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rt.ghost:not(:focus):not(:only-child).blank > p:first-child::before { opacity: 0; transition: opacity .2s; }
.dr-blocks.doc:hover .rt.ghost.blank > p:first-child::before { opacity: 1; }

/* the title of a free note: one line, document-sized, no box */
.note-title { font-size: 26px; line-height: 1.35; font-weight: 700; padding: 10px 0 6px; outline: none; border: 0; min-height: 1.35em;
              word-break: break-word; caret-color: var(--blue); }
.note-title:focus { border: 0; }
.drawer.docked.free .dr-head { border-bottom: 0; padding-bottom: 0; }
.drawer.docked.free .dr-title:empty { display: none; }
.drawer.docked .dr-head { padding-left: 40px; padding-right: 40px; }

/* the toolbar: sticky over the page, quiet until the caret is in the text */
.rt-bar { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 6px 16px; border-bottom: 1px solid var(--rule);
          background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); position: relative; z-index: 3; transition: opacity .2s var(--ease); }
.drawer.docked .rt-bar { padding-left: 34px; padding-right: 34px; }
.rt-bar.idle { opacity: .55; }
.rt-bar.idle:hover { opacity: 1; }
.rb { border: 0; background: none; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 6px; cursor: pointer; color: var(--ink-2); font-size: var(--fs-ms);
      display: inline-flex; align-items: center; justify-content: center; }
.rb:hover { background: var(--desk); color: var(--ink); }
.rb.on { background: var(--blue-soft); color: var(--blue); }
.rb.b { font-weight: 700; } .rb.i { font-style: italic; } .rb.u { text-decoration: underline; } .rb.s { text-decoration: line-through; }
.rb.li { font-size: 13px; }
.rb-sel { border: 0; background: none; height: 28px; border-radius: 6px; padding: 0 4px; font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.rb-sel:hover { background: var(--desk); }
.rb-sep { width: 1px; height: 16px; background: var(--rule); margin: 0 4px; }
.rb-hl { position: relative; display: inline-flex; }
.rb.hl .hl-a { font-weight: 700; padding: 0 3px; border-radius: 3px; background: linear-gradient(transparent 55%, #FFE58A 55%); }
.rb-menu { position: absolute; top: 32px; left: 0; display: flex; gap: 6px; padding: 8px; background: #fff; border-radius: 10px; z-index: 5;
           box-shadow: 0 0 0 1px var(--rule); animation: popIn .18s var(--ease) both; }
.rb-menu[hidden] { display: none; }
.rb.sw { width: 24px; min-width: 24px; height: 24px; border-radius: 6px; padding: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.rb.sw.hl-y { background: var(--hl-yellow); } .rb.sw.hl-b { background: var(--hl-blue); } .rb.sw.hl-g { background: var(--hl-green); } .rb.sw.hl-r { background: var(--hl-red); }
.rb.sw.none { width: auto; padding: 0 8px; font-size: 12px; color: var(--pencil); background: #fff; }
.rb.sw:hover { transform: scale(1.1); }
/* the schedule's drawer is narrow: the toolbar scrolls sideways instead of wrapping into three rows */
.drawer:not(.docked) .rt-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.drawer:not(.docked) .rt-bar::-webkit-scrollbar { display: none; }

/* a picture / file card that just went in */
.blk.blk-in { animation: blkIn .36s var(--ease) both; }
@keyframes blkIn { from { opacity: 0; transform: translateY(6px) scale(.99); } to { opacity: 1; transform: none; } }

/* ---------- note list: the one just edited rises to the top ---------- */
.nlist .ni { will-change: auto; }
.nlist .ni.rose { animation: niRose 1.3s var(--ease) both; }
@keyframes niRose { 0% { background: rgba(43,89,255,.16); } 100% { background: transparent; } }
.nlist .ni.on.rose { animation: none; }
.nlist .ni .tt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nlist > .empty { margin: 18px 8px; line-height: 1.7; font-size: 13px; text-align: left; }
.nlist > .empty .btn { margin-top: 10px; }

/* the 笔记 page before anything is open */
.note-page > .empty, .note-page > .nb-empty { margin: auto; max-width: 360px; text-align: center; color: var(--pencil); line-height: 1.8; font-size: var(--fs-ms); padding: 40px 24px; }
.nb-empty .ico { width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 14px; background: var(--blue-soft); display: grid; place-items: center; color: var(--blue); font-size: 22px; }
.nb-empty h3 { margin: 0 0 6px; color: var(--ink); font-size: 16px; }
.nb-empty .btn { margin-top: 16px; }

/* ---------- loading: one look everywhere ---------- */
.ld-bar { position: fixed; z-index: 60; left: 0; top: 0; height: 1px; width: 100%; pointer-events: none; opacity: 0; transform-origin: 0 50%;
          background: var(--blue); transform: scaleX(0); transition: opacity .25s var(--ease); }   /* 细、单色、不抢眼；AI 的蓝紫渐变只给助理用 */
.ld-bar.on { opacity: .55; animation: ldGrow 8s cubic-bezier(.1,.7,.2,1) forwards; }
.ld-bar.done { opacity: 0; transform: scaleX(1); animation: none; transition: transform .2s var(--ease), opacity .35s var(--ease) .15s; }
@keyframes ldGrow { 0% { transform: scaleX(0); } 20% { transform: scaleX(.45); } 100% { transform: scaleX(.92); } }
.skel { display: grid; gap: 12px; padding: 16px 0; }
.skel i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #EEF1F5 0%, #F7F8FA 40%, #EEF1F5 80%); background-size: 300% 100%;
          animation: shimmer 1.3s linear infinite; }
.skel i.h { height: 22px; width: 46%; border-radius: 8px; margin-bottom: 6px; }
.skel i:nth-child(3n) { width: 82%; } .skel i:nth-child(3n+1) { width: 94%; } .skel i:nth-child(4n) { width: 64%; }
.skel.list { padding: 8px; gap: 10px; }
.skel.list i { height: 46px; border-radius: 10px; width: 100% !important; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -50% 0; } }
.boot { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: var(--desk); transition: opacity .3s var(--ease), visibility 0s linear .3s; }
.boot.gone { opacity: 0; visibility: hidden; }
.boot .brand { font-size: 26px; display: flex; align-items: center; gap: 12px; }
.boot .dots { display: flex; gap: 5px; justify-content: center; margin-top: 14px; }
.boot .dots i { width: 6px; height: 6px; border-radius: 50%; background: linear-gradient(180deg, var(--ai-a), var(--ai-b)); animation: dot 1s var(--ease) infinite; }
.boot .dots i:nth-child(2) { animation-delay: .15s; } .boot .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
/* opening a note: the bars only show if it takes a moment; then the content fades in where the bars were */
.dr-blocks > .skel { opacity: 0; transition: opacity .15s var(--ease); }
.dr-scroll.loading-shown .dr-blocks > .skel { opacity: 1; }
.dr-scroll.loading .dr-blocks, .dr-scroll.loading .dr-info .recog { opacity: 0; transition: none; }
.dr-blocks, .dr-info .recog { transition: opacity .22s var(--ease); }

/* ---------- jumping to something: it glows where it landed ---------- */
.hl-flash { animation: hlFlash 1.6s var(--ease) both; border-radius: 8px; }
@keyframes hlFlash {
  0% { box-shadow: 0 0 0 0 rgba(43,89,255,.45); background-color: rgba(43,89,255,.18); }
  25% { box-shadow: 0 0 0 6px rgba(43,89,255,0); background-color: rgba(43,89,255,.16); }
  45% { background-color: rgba(43,89,255,.07); }
  65% { background-color: rgba(43,89,255,.15); }
  100% { box-shadow: none; background-color: transparent; }
}
.view.jump-in { animation: jumpIn .32s var(--ease) both; }
@keyframes jumpIn { from { opacity: .4; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .hl-flash, .view.jump-in, .nlist .ni.rose, .blk.blk-in, .skel i, .boot .dots i, .ld-bar.on { animation: none !important; }
  .hl-flash { background-color: rgba(43,89,255,.12); }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .drawer.docked .dr-scroll { padding: 6px 16px 0; }
  .drawer.docked .dr-head { padding: 14px 16px 6px 64px; min-height: 44px; align-items: center; }   /* room for 返回 */
  .drawer.docked .rt-bar { padding-left: 10px; padding-right: 10px; }
  .rt-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .rt-bar::-webkit-scrollbar { display: none; }
  .rb { min-width: 34px; height: 34px; }
  .rt { font-size: 16px; }
  .note-title { font-size: 22px; }

  /* the assistant opens as a half-height sheet over the page; drag the handle up (or tap it) for full height */
  body.chat-open.chat-half .assist { top: auto !important; height: min(58dvh, calc(var(--vvh, 100dvh) - 60px)) !important; bottom: var(--kb, 0px);
    border-radius: 18px 18px 0 0; box-shadow: 0 0 0 1px var(--rule); padding-top: 0; }
  .chat-scrim { position: fixed; inset: 0; z-index: 29; background: rgba(14,23,38,.24); opacity: 0; visibility: hidden;
                transition: opacity .3s var(--ease), visibility 0s linear .3s; }
  body.chat-open .chat-scrim { opacity: 1; visibility: visible; transition: opacity .3s var(--ease); }
  .m-chat-head { position: relative; }
  .chat-grip { position: absolute; left: 50%; top: 5px; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: #D3D9E2; border: 0; padding: 0; cursor: grab; }
  .chat-grip::before { content: ""; position: absolute; inset: -12px -30px; }   /* a bigger target for the thumb */
  body.chat-open:not(.chat-half) .chat-grip { display: none; }
  .m-chat-head .m-expand { border: 0; background: none; color: var(--pencil); font-size: var(--fs-ms); padding: 4px 8px; margin-left: auto; margin-right: 4px; }
  body.chat-open:not(.chat-half) .m-expand { display: none; }
  body.chat-half .assist.dragging { transition: none !important; }
}
@media (min-width: 761px) { .chat-scrim, .chat-grip, .m-expand { display: none !important; } }

/* @ 标签：正文里的人物和地点是一个整体，退格时一起删掉 */
.rt span.at { display: inline-block; padding: 0 7px; margin: 0 1px; border-radius: 10px; background: var(--blue-soft); color: var(--blue);
  font-size: .94em; line-height: 1.5; cursor: pointer; user-select: all; white-space: nowrap; }
.rt span.at[data-l] { background: var(--desk); color: var(--pencil); }
.rt span.at:hover { filter: brightness(.96); }

/* @ 选择器（规范 PC规范v1/14-真机实测收口.md H11；方案 docs/设计规范/方案/@选择器-四端形态.html 第二版）
   三种形态同一套内容：pop = 大浮层（PC，宽 420，贴光标）；panel = 右侧面板（中栏窄于 520，宽 360，贴助理栏左边）；page = 手机满屏。
   顺序：[手机：关闭 × · 完成 N] → 标签 → 搜索框 → 已选条 → 列表 → 底部（已选 N 人 / 完成 · 用我的位置） */
.at-pop { position: fixed; z-index: 80; display: flex; flex-direction: column; background: var(--sheet); border-radius: var(--r-pop);
  box-shadow: var(--sh-float); padding: var(--sp-2); animation: popIn .14s var(--ease) both; }
.at-pop.at-pop { width: 420px; max-height: min(480px, calc(100vh - 24px)); }
.at-pop.at-panel { top: 56px; bottom: 12px; right: calc(var(--assist-w) + 12px); left: auto; width: 360px; max-height: none; border-radius: var(--r-pop); box-shadow: var(--sh-drawer); }
.at-pop.at-page { inset: 0; width: auto; max-height: none; border-radius: 0; box-shadow: none; padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); z-index: 90; animation: atRise .26s var(--ease) both; }
@keyframes atRise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
body.at-page-on { overflow: hidden; }
.at-top { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-2) var(--sp-3); flex: none; }
.at-x { width: var(--h-lg); height: var(--h-lg); border: 0; background: none; color: var(--ink); display: grid; place-items: center; border-radius: var(--r-md); cursor: pointer; }
.at-done { border: 0; background: none; color: var(--blue); font-size: var(--fs-md); font-weight: 600; padding: 0 var(--sp-3); height: var(--h-md); border-radius: var(--r-md); cursor: pointer; }
.at-done:disabled { color: var(--pencil); cursor: default; }
.at-foot .at-done { background: var(--ink); color: #fff; padding: 0 var(--sp-4); }
.at-foot .at-done:disabled { background: var(--desk); color: var(--pencil); }
.at-tabs { display: flex; gap: 2px; padding: 2px; margin: 0 0 var(--sp-2); background: var(--desk); border-radius: var(--r-md); flex: none; }
.at-tab { flex: 1; border: 0; background: none; height: 30px; border-radius: var(--r-sm); font-size: var(--fs-sm); color: var(--pencil); cursor: pointer; }
.at-tab.on { background: var(--sheet); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--rule); }
.at-qrow { flex: none; padding: 0 0 var(--sp-2); }
.at-q { width: 100%; box-sizing: border-box; height: var(--h-md); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 0 var(--sp-3); font-size: var(--fs-md); background: var(--sheet); color: var(--ink); }
.at-q:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
.at-chips { display: flex; flex-wrap: wrap; gap: var(--sp-1); padding: 0 0 var(--sp-2); flex: none; }
.at-chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 4px 0 10px; border-radius: var(--r-full); background: var(--blue-soft); color: var(--blue); font-size: var(--fs-sm); }
.at-chip-x { border: 0; background: none; color: inherit; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; cursor: pointer; padding: 0; }
.at-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.at-hint, .at-empty, .at-sep { padding: 6px 10px; font-size: var(--fs-xs); color: var(--pencil); }
.at-sep { padding-top: 8px; padding-bottom: 2px; }
.at-row { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; min-height: 44px; padding: 7px 10px; border-radius: var(--r-sm); text-align: left; cursor: pointer; }
.at-row.on { background: var(--blue-soft); }
.at-row.picked { background: var(--blue-soft); }
.at-ico { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--desk); display: grid; place-items: center; font-size: var(--fs-xs); color: var(--ink); }
.at-row.on .at-ico, .at-row.picked .at-ico { background: #fff; }
.at-ck { flex: none; margin-left: auto; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--rule-strong, var(--rule)); display: grid; place-items: center; color: #fff; }
.at-ck.on { background: var(--blue); border-color: var(--blue); }
.at-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex: none; padding: var(--sp-2) 6px 2px; border-top: 1px solid var(--rule); margin-top: var(--sp-1); }
.at-count { font-size: var(--fs-sm); color: var(--pencil); }
/* 地理位置：城市 + 位置，警示一行，换城市 */
.at-bar { display: flex; align-items: center; gap: var(--sp-2); padding: 0 0 var(--sp-2); flex: none; }
.at-city { height: var(--h-sm); border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--sheet); padding: 0 10px; font-size: var(--fs-sm); color: var(--ink); cursor: pointer; }
.at-busy { font-size: var(--fs-xs); color: var(--pencil); }
.at-warn { margin: 2px 6px 6px; padding: 6px 10px; font-size: var(--fs-xs); color: var(--warn); background: var(--warn-soft); border-radius: var(--r-sm); }
.at-act { flex: none; display: flex; align-items: center; gap: 6px; width: 100%; min-height: var(--h-md); border: 0; border-radius: var(--r-sm); background: none; padding: 6px 10px; margin: 0 0 var(--sp-1); font-size: var(--fs-sm); color: var(--blue); cursor: pointer; text-align: left; }   /* 搜索框下面、列表上面的一行动作：人物的「＋ 新建联系人」、地理位置的「用我的位置」，同位置同样式 */
.at-act:hover { background: var(--blue-soft); }
.at-cities { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 2px 6px 6px; }
.at-cityq { width: 100%; height: var(--h-md); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 0 12px; font-size: var(--fs-md); background: var(--sheet); }
.at-cityq:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
.at-citylist { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding: 8px 0 4px; }
.at-citychip { border: 1px solid var(--rule); border-radius: var(--r-full); background: var(--sheet); padding: 4px 12px; font-size: var(--fs-sm); color: var(--ink); cursor: pointer; min-height: var(--h-sm); }
.at-citychip:hover { background: var(--blue-soft); border-color: transparent; color: var(--blue); }
@media (max-width: 760px) {
  .at-row, .at-act, .at-city { min-height: 56px; }
  .at-pop.at-page .at-tabs { margin: 0 var(--sp-3) var(--sp-2); }
  .at-pop.at-page .at-tab { height: 36px; border-radius: var(--r-md); }   /* 手机：分段标签高 36、圆 12 */
  .at-pop.at-page .at-qrow, .at-pop.at-page .at-chips, .at-pop.at-page .at-bar { padding-left: var(--sp-3); padding-right: var(--sp-3); }
  .at-pop.at-page .at-act { margin-left: var(--sp-2); margin-right: var(--sp-2); width: auto; }
  .at-pop.at-page .at-list, .at-pop.at-page .at-cities { padding: 0 var(--sp-2); }
  .at-q { font-size: 16px; }   /* iOS 输入框字号 < 16 会触发页面放大 */
  .at-citychip { min-height: var(--h-lg); padding: 0 16px; }
}
.at-txt { display: flex; flex-direction: column; min-width: 0; }
.at-nm { font-size: var(--fs-ms); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-sub { font-size: var(--fs-xs); color: var(--pencil); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 行文字里的人名：就地显示成蓝色 @人名（只是显示，原文不变；T107）。编辑这一行时显示原文，没有这个装饰 */
.ln .t .at-name { color: var(--blue); cursor: pointer; }
.ln .t .at-name::before { content: '@'; }
.ln .t .at-name.has-at::before { content: none; }   /* 文字里已经有用户手写的 @：不再多画一个 */

/* 骨架：整格卡片（资料库）；数据到后内容淡入（减少动态效果时不动） */
.skel.cards { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; padding: 8px 0; }
.skel.cards i { height: 150px; border-radius: 12px; width: 100% !important; }
.fgrid > :not(.skel), #plist > :not(.skel), #pdetail > :not(.skel), .connect > :not(.skel), .trash > :not(.skel) { animation: skFade .18s var(--ease) both; }
@keyframes skFade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fgrid > *, #plist > *, #pdetail > *, .connect > *, .trash > * { animation: none !important; } }
