/* Console-specific layout on top of the shared design system. */
[hidden] { display: none !important; }
#pair-computer { appearance: none; border: 1px solid var(--hairline); color: var(--accent-text); font: inherit; cursor: pointer; white-space: nowrap; }
#execution-device { max-width: 220px; }
@media (max-width: 760px) {
  #execution-device { max-width: 110px; }
  .topbar .c-mnav { min-width: 0; overflow-x: auto; flex-shrink: 1; }
}
.pair-steps { margin: 0; padding-left: 22px; line-height: 1.7; }
.pair-steps li + li { margin-top: 8px; }
.app { height: 100vh; height: 100dvh; }
.main { grid-template-rows: 56px minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); min-height: 0; overflow: hidden; }
.topbar { min-width: 0; }
/* content scrolls under the glass toolbar edge and the glass composer */
.c-body { position: relative; min-height: 0; grid-row: 1 / -1; grid-column: 1; }
.c-scroll { position: absolute; inset: 0; overflow-y: auto; padding: 64px 24px var(--dock-h, 150px); scroll-behavior: smooth; }
.c-body > .scroll-edge { z-index: 5; }
.c-body > .scroll-edge--bottom { top: auto; bottom: 0; height: calc(var(--dock-h, 150px) * .7);
  background: linear-gradient(transparent, var(--edge-tint));
  -webkit-mask-image: linear-gradient(transparent, #000 60%); mask-image: linear-gradient(transparent, #000 60%); }
.c-col { width: min(720px, 100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.c-col + .c-col { margin-top: 18px; }
.c-pad { height: 24px; }
.c-dock { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; padding: 8px 24px 20px; }
.c-composer { width: min(720px, 100%); margin: 0 auto; }
.c-composer textarea { width: 100%; border: 0; outline: 0; resize: none; background: transparent; font-size: 15px; line-height: 1.5; color: var(--text); max-height: 180px; }
.c-composer textarea::placeholder { color: var(--text-3); }
.c-hint { font-size: 11.5px; color: var(--text-3); margin-left: 4px; }
.msg-line { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 8px; padding-left: 2px; }
.msg-line .ic { width: 14px; height: 14px; }
.c-card[data-busy] .confirm__actions { opacity: .55; pointer-events: none; }
/* side panels = thick glass, floating */
.drawer { position: absolute; top: 60px; right: 12px; bottom: 12px; width: 420px; border-radius: 26px; overflow: hidden;
          background-color: var(--mat-thick); background-image: var(--sheen); -webkit-backdrop-filter: var(--mat-blur-thick); backdrop-filter: var(--mat-blur-thick);
          box-shadow: var(--shadow-float), var(--inner-hi);
          display: grid; grid-template-rows: auto 1fr; z-index: 8; animation: drawerIn 380ms var(--ease-spring); }
.drawer::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; background: var(--rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
@keyframes drawerIn { from { transform: translateX(18px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer[hidden] { display: none; }
@media (min-width: 1180px) {
  .main:has(> .drawer:not([hidden])) .c-col,
  .main:has(> .drawer:not([hidden])) .c-composer { margin-left: max(0px, calc((100% - 420px - 720px) / 2)); transition: margin var(--t-slow) var(--ease-out); }
}
.drawer__head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px 18px; border-bottom: .5px solid var(--line); }
.drawer__head .title { font-size: 15px; font-weight: 640; }
.drawer .log { overflow-y: auto; padding: 0 8px 16px; }
.hist { list-style: none; margin: 0; padding: 0 8px 16px; overflow-y: auto; }
.hist li { padding: 10px 12px; border-radius: 14px; cursor: pointer; display: grid; gap: 2px; }
.hist li:hover { background: var(--surface-3); }
.hist li.on { background: var(--accent-soft); box-shadow: inset 0 0 0 .5px var(--accent-soft-2); }
.hist li b { font-weight: 600; font-size: 14px; }
.hist li span { font-size: 12px; color: var(--text-3); }
.hist li .hist__sum { font-size: 12.5px; color: var(--text-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.toast { position: absolute; left: 50%; bottom: calc(var(--dock-h, 150px) + 12px); transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 520; z-index: 20;
         background: var(--hud-bg); color: var(--hud-text); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
         box-shadow: var(--shadow-float), inset 0 1px 0 rgba(255,255,255,.14), inset 0 0 0 .5px rgba(255,255,255,.10); }
.prose code { font-family: var(--font-mono); font-size: 13px; }
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .topbar { padding: 0 14px; }
  .c-scroll { padding: 60px 12px var(--dock-h, 140px); }
  .c-dock { padding: 8px 10px 14px; }
  .msg-ai { grid-template-columns: minmax(0, 1fr); }
  .msg-ai__mark { display: none; }
  .drawer { width: auto; left: 8px; right: 8px; top: 56px; bottom: 8px; }
  .c-hint { display: none; }
  #model-pill { display: none; }
}

/* Empty state */
.c-empty { min-height: 100%; margin-top: -32px; display: grid; place-content: center; justify-items: center; text-align: center; gap: 10px; padding: 0 16px 8vh; animation: fadeUp var(--t-slow) var(--ease-out); }
.c-empty__mark { width: 52px; height: 52px; border-radius: 15px; overflow: hidden; display: block; box-shadow: 0 10px 26px -10px rgba(0,60,180,.55), 0 0 0 .5px rgba(0,0,0,.06); margin-bottom: 8px; }
.c-empty__mark svg { width: 100%; height: 100%; display: block; }
.c-empty__hi { margin: 0; font-size: 30px; font-weight: 680; letter-spacing: -0.022em; }
.c-empty__sub { margin: 0 0 14px; font-size: 14px; color: var(--text-2); max-width: 420px; line-height: 1.6; }
.c-empty__sugg { justify-content: center; width: min(600px, 92vw); }
.c-scroll:has(> .c-empty:not([hidden])) { display: grid; grid-template-rows: 1fr; }
.c-scroll:has(> .c-empty:not([hidden])) > .c-col, .c-scroll:has(> .c-empty:not([hidden])) > .c-pad { display: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ================= M2: views (历史 / 记忆), notifications, search, memory ================= */
.view { grid-row: 1 / -1; grid-column: 1; position: relative; min-height: 0; z-index: 2; animation: fadeUp var(--t-slow) var(--ease-out); }
.view > .scroll-edge { z-index: 5; }
.v-scroll { position: absolute; inset: 0; overflow-y: auto; padding: 72px 24px 48px; }
.v-col { width: min(760px, 100%); margin: 0 auto; display: grid; gap: 14px; align-content: start; }
.v-head { padding: 6px 4px 4px; }
.v-title { margin: 0; font-size: 28px; font-weight: 680; letter-spacing: -0.022em; }
.v-sub { margin: 6px 0 0; font-size: 14px; color: var(--text-2); line-height: 1.6; max-width: 600px; }
.v-label { margin: 14px 4px -2px; font-size: var(--fs-micro); font-weight: 650; color: var(--text-3); letter-spacing: .06em; }
/* search / add field = thick glass pill, like the composer */
.v-field { position: relative; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 18px; border-radius: 26px;
  background-color: var(--mat-thick); background-image: var(--sheen); -webkit-backdrop-filter: var(--mat-blur-thick); backdrop-filter: var(--mat-blur-thick);
  box-shadow: var(--shadow-card), var(--inner-hi); }
.v-field::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; background: var(--rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.v-field:focus-within { box-shadow: var(--shadow-card), var(--inner-hi), 0 0 0 3px var(--accent-soft-2); }
.v-field__ic { color: var(--text-3); display: grid; }
.v-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--text); }
.v-field input::placeholder { color: var(--text-3); }
.v-field input::-webkit-search-cancel-button { display: none; }
.v-quick { margin-top: -2px; }
.v-quick .suggest { height: 30px; font-size: 13px; }
/* conversation list */
.v-convs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.v-conv { padding: 14px 18px; border-radius: 20px; cursor: pointer; display: grid; gap: 4px; transition: transform var(--t-fast) var(--ease-out); }
.v-conv:hover { transform: translateY(-1px); }
.hist-bar { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; min-height: 30px; font-size: 13px; }
.hist-bar__n { font-weight: 600; color: var(--text-2); margin-left: 4px; }
.hist-bar .hist-del:not([disabled]) { color: var(--danger, #d23b3b); }
#hist-list.is-selecting .v-conv { grid-template-columns: auto 1fr; column-gap: 12px; }
#hist-list.is-selecting .v-conv > :not(.v-conv__chk) { grid-column: 2; }
#hist-list.is-selecting .v-conv:hover { transform: none; }
.v-conv__chk { grid-row: 1 / span 3; align-self: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--text-3); display: grid; place-items: center; color: #fff; }
.v-conv__chk.on { background: var(--accent); border-color: var(--accent); }
.v-conv.sel { box-shadow: var(--shadow-card), var(--inner-hi), 0 0 0 1.5px var(--accent); }
.v-conv.on { box-shadow: var(--shadow-card), var(--inner-hi), 0 0 0 1.5px var(--accent-soft-2); }
.v-conv__top { display: flex; align-items: baseline; gap: 10px; }
.v-conv__title { font-weight: 630; font-size: 15px; letter-spacing: -0.005em; }
.v-conv__time { margin-left: auto; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.v-conv__sum { font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
.v-conv__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.v-conv__tags .pill { height: 20px; font-size: 11.5px; }
/* search results */
.sr-head { display: flex; align-items: center; gap: 8px; margin: 4px 4px 0; font-size: 13px; color: var(--text-2); }
.sr-list { padding: 6px; }
.sr { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 12px; border-radius: 14px; cursor: pointer; }
.sr:hover { background: var(--surface-3); }
.sr + .sr { box-shadow: 0 -.5px 0 var(--line); }
.sr__ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--inset-fill); color: var(--text-2); box-shadow: inset 0 0 0 .5px var(--line); }
.sr__ic.log { color: var(--warn); } .sr__ic.user { color: var(--accent-text); } .sr__ic.sum { color: var(--ok); }
.sr__ic .ic { width: 15px; height: 15px; }
.sr__meta { font-size: 12px; color: var(--text-3); display: flex; gap: 6px; align-items: center; }
.sr__meta b { color: var(--text-2); font-weight: 600; }
.sr__text { margin-top: 2px; font-size: 14px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.sr__text mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 4px; padding: 0 2px; }
.sr-empty { padding: 26px 18px; text-align: center; color: var(--text-3); font-size: 13.5px; }
/* flash the message a search result points to */
@keyframes hitFlash { 0%, 60% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.is-hit .bubble, .is-hit .prose, .is-hit .card { animation: hitFlash 2.2s var(--ease-out); border-radius: 16px; }
/* digest */
.v-digest .card { width: 100%; }
.v-digest .sum__list li > .ic { color: var(--ok); }
.digest-headline { font-weight: 600; color: var(--text); }
/* memory page */
.mem-group { padding: 6px 6px 8px; }
.mem-group__head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.mem-group__head .num { color: var(--text-3); font-weight: 500; }
.mem { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; padding: 12px; border-radius: 16px; }
.mem + .mem { box-shadow: 0 -.5px 0 var(--line); }
.mem:hover { background: var(--surface-3); }
.mem > .ic { margin-top: 3px; color: var(--accent-text); width: 16px; height: 16px; }
.mem__text { font-size: 14.5px; line-height: 1.55; font-weight: 560; color: var(--text); overflow-wrap: anywhere; }
.mem__meta { margin-top: 3px; font-size: 12.5px; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.mem__meta a { color: var(--accent-text); cursor: pointer; }
.mem__acts { display: flex; gap: 2px; opacity: .55; transition: opacity var(--t-fast); }
.mem:hover .mem__acts, .mem.is-editing .mem__acts { opacity: 1; }
.mem__acts .composer__btn { width: 30px; height: 30px; }
.mem__edit { width: 100%; border: 0; outline: 0; font: inherit; font-size: 14.5px; padding: 8px 10px; border-radius: 10px; color: var(--text);
  background: var(--field-fill); box-shadow: inset 0 0 0 1px var(--accent-soft-2); }
.mem__ask { font-size: 12.5px; color: var(--danger); display: flex; gap: 6px; align-items: center; }
.mem-empty { padding: 30px 18px; text-align: center; color: var(--text-3); font-size: 13.5px; line-height: 1.7; }
/* floating glass notifications (top-right, stack) */
.notify-stack { position: absolute; top: 64px; right: 18px; z-index: 30; display: grid; gap: 10px; justify-items: end; pointer-events: none; }
.notify-stack .notify { pointer-events: auto; width: 380px; }
.notify-stack .notify.is-leaving { animation: notifyOut 260ms var(--ease-out) both; }
@keyframes notifyOut { to { opacity: 0; transform: translateX(14px) scale(.98); } }
.notify__x { position: absolute; top: -7px; left: -7px; width: 22px; height: 22px; border-radius: 50%; display: none; place-items: center; z-index: 4;
  background: var(--mat-thick); color: var(--text-2); box-shadow: var(--shadow-btn), 0 0 0 .5px var(--line-strong); border: 0; cursor: pointer; }
.notify:hover .notify__x { display: grid; }
.notify__x .ic { width: 12px; height: 12px; }
.remind-done { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 8px; padding-left: 2px; }
.remind-done .ic { width: 14px; height: 14px; color: var(--accent-text); }
.remind-done b { color: var(--text-2); font-weight: 600; }
/* step timing in live tasks */
.step__t { margin-left: auto; font-size: 11.5px; color: var(--text-3); }
/* mobile nav in the topbar (rail is hidden on phones) */
.c-mnav { display: none; gap: 6px; }
.c-mnav .composer__btn.on { color: var(--accent); background: var(--sel-fill); }
@media (max-width: 760px) {
  .c-mnav { display: flex; gap: 2px; }
  .c-mnav .composer__btn { width: 34px; height: 34px; }
  .topbar #new-conv { display: none; }
  #conn-pill > span:not(.dot) { display: none; }
  #conn-pill { padding: 0 8px; }
  .topbar__title { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .v-scroll { padding: 64px 12px 32px; }
  .v-title { font-size: 24px; }
  .notify-stack { left: 10px; right: 10px; top: 60px; }
  .notify-stack .notify { width: 100%; }
  .mem__acts { opacity: 1; }
  .card { --r-card: 18px; }
  .bubble { max-width: 86%; }
  .confirm__row { grid-template-columns: 48px minmax(0, 1fr); }
  .stats { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .stats__big { border-right: 0; padding-right: 0; }
  .bars { padding-left: 0; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .bar__day { flex-direction: column; align-items: center; gap: 0; font-size: 11px; }
  .c-empty { max-width: 100%; box-sizing: border-box; padding-left: 8px; padding-right: 8px; }
  .c-card, .msg-ai__body > * { min-width: 0; max-width: 100%; }
  .sr { padding: 10px 8px; }
}

/* ---------------- M3: voice (glass mic, hands-free, captions, waveform, voice-confirm chip) ---------------- */
.v-mic { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  color: var(--text-2); background: var(--ctl-fill); box-shadow: inset 0 0 0 .5px var(--hairline), var(--shadow-btn);
  transition: transform .15s ease, background .2s, color .2s; touch-action: none; -webkit-user-select: none; user-select: none; }
.v-mic:hover { color: var(--text); }
.v-mic::before { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; transform: scale(.85); transition: opacity .2s, transform .2s; pointer-events: none; }
.v-mic.is-hold { color: #fff; background: var(--accent-grad); box-shadow: var(--accent-glow); transform: scale(1.08); }
.v-mic.is-hold::before { opacity: .55; transform: scale(1); animation: v-pulse 1.2s ease-out infinite; }
.v-mic.is-hands { color: #fff; background: linear-gradient(180deg, #3BD16F 0%, #22B556 60%, #1EA64E 100%); box-shadow: 0 6px 16px -6px rgba(48, 199, 89, .6); }
.v-mic.is-hands::before { border-color: var(--ok-fill); opacity: .5; transform: scale(1); animation: v-pulse 1.6s ease-out infinite; }
@keyframes v-pulse { 0% { transform: scale(.92); opacity: .6; } 100% { transform: scale(1.35); opacity: 0; } }
.v-hands { height: 30px; padding: 0 11px; border-radius: 999px; border: 0; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  color: var(--text-2); background: var(--ctl-fill); box-shadow: inset 0 0 0 .5px var(--hairline); transition: background .2s, color .2s; }
.v-slow.on { color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-soft-2); }
.v-hands.on { color: var(--ok); background: var(--ok-soft); box-shadow: inset 0 0 0 1px rgba(52, 199, 89, .45); }
.v-silent { position: relative; }
.v-silent.is-off { color: var(--text-3); }
.v-silent.is-off::after { content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 2px; border-radius: 2px; background: currentColor;
  transform: translate(-50%, -50%) rotate(-45deg); box-shadow: 0 0 0 1.5px var(--mat-regular, #fff); }

.v-bar { width: min(720px, 100%); margin: 0 auto 8px; padding: 10px 12px 10px 14px; border-radius: var(--r-card, 22px); display: grid; gap: 6px; }
.v-bar[hidden] { display: none; }
.v-bar__top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.v-wave { width: 96px; height: 26px; flex: none; }
.v-state { font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.v-bar[data-state="listen"] .v-state { color: var(--ok); }
.v-bar[data-state="speak"] .v-state { color: var(--accent-text); }
.v-cap { font-size: 14px; line-height: 1.45; color: var(--text); min-height: 20px; overflow-wrap: anywhere; }
.v-cap--ai { color: var(--text-2); }
.v-cap--ai:empty { display: none; }
.v-who { display: inline-block; font-size: 11px; font-weight: 700; color: var(--text-3); margin-right: 8px; padding: 1px 6px; border-radius: 6px; background: var(--ctl-fill); vertical-align: 1px; }
.v-who--ai { color: var(--accent-text); background: var(--accent-soft); }
.v-caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--ok-fill); animation: v-blink 1s steps(1) infinite; }
@keyframes v-blink { 50% { opacity: 0; } }
.v-undo { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border: 0; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; color: var(--accent-text); background: var(--accent-soft); }
.v-undo[hidden] { display: none; }
.v-fake { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border-radius: 12px; background: var(--field-fill, rgba(0,0,0,.03)); color: var(--text-3); }
.v-fake[hidden] { display: none; }
.v-fake input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--text); }

.v-chip { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; color: var(--text); }
.v-chip b { color: var(--accent-text); font-weight: 700; }
.v-chip__mic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--accent-grad); flex: none; animation: v-breathe 2s ease-in-out infinite; }
@keyframes v-breathe { 50% { box-shadow: 0 0 0 5px var(--accent-soft); } }
.v-chip__t { flex: 1; min-width: 0; }
.v-chip__ring { --p: 1; flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--text-2);
  background: radial-gradient(closest-side, var(--mat-regular, #fff) 76%, transparent 78% 100%), conic-gradient(var(--accent) calc(var(--p) * 360deg), var(--ctl-fill) 0); }
.v-chip.is-stale { opacity: .6; }
.v-chip.is-stale .v-chip__mic { animation: none; background: var(--text-3); }
.v-bar > .v-chip { margin-top: 0; }

@media (max-width: 760px) {
  .v-bar { padding: 9px 10px; margin-bottom: 6px; }
  .v-wave { width: 64px; }
  .v-bar__top #v-backend { display: none; }
  .v-mic { width: 42px; height: 42px; }
  .v-hands { height: 32px; }
  .v-slow { padding: 0 8px; font-size: 12px; }
  .c-composer .c-hint { display: none; }
  .v-chip { font-size: 13px; }
}
body.voice-on .c-pad { height: 170px; }   /* keep the last card clear of the voice bar */

/* simulated tool on demo data → visible badge on the card (P1 honesty, 2026-10-09) */
.demo-badge { flex: none; display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; white-space: nowrap;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; line-height: 1; color: #B8621F; vertical-align: middle;
  background: color-mix(in srgb, #E0803A 14%, rgba(255,255,255,.55)); border: .5px solid color-mix(in srgb, #E0803A 38%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(1.6); backdrop-filter: blur(12px) saturate(1.6);
  box-shadow: inset 0 .5px 0 rgba(255,255,255,.6); }
[data-theme="dark"] .demo-badge { color: #F2A766; background: color-mix(in srgb, #E0803A 22%, rgba(30,30,32,.5)); box-shadow: none; }
.remind__eyebrow .demo-badge, .receipt__title .demo-badge { margin-left: 8px; }
.demo-row { display: flex; justify-content: flex-end; padding: 0 4px 4px; }
/* card header rows: clean flex row with gap; wrap instead of overlapping on narrow screens */
.card__head, .task__head, .card__foot { flex-wrap: wrap; row-gap: 6px; }
.card__head > .title, .card__head > span:not(.spacer):not(.pill):not(.demo-badge) { min-width: 0; overflow-wrap: anywhere; }
.card__head .pill, .card__foot .pill { flex: none; white-space: nowrap; }
.result__name .pill { white-space: nowrap; vertical-align: 1px; }
.result-section { list-style: none; padding: 12px 10px 4px; font-size: 12.5px; color: var(--text-3); }
.result-section + .result { box-shadow: none; }

/* sheet_make receipt preview */
.sheet-prev{margin:-4px 0 8px;border:1px solid var(--line,#e5e5e5);border-radius:12px;padding:8px 10px;font-size:12px;background:var(--surface,#fff)}
.sheet-prev__path{color:var(--text-3,#888);margin-bottom:6px;word-break:break-all}
.sheet-prev__scroll{overflow-x:auto}.sheet-prev table{border-collapse:collapse;min-width:100%}
.sheet-prev th{background:#2F5D8A;color:#fff;font-weight:600;text-align:left;padding:3px 8px;white-space:nowrap}
.sheet-prev td{border-top:1px solid var(--line,#eee);padding:3px 8px;white-space:nowrap}

.brain-pill{cursor:pointer;border:0;font:inherit}
.brain-pill--ds{background:#E8F0FE;color:#1A56DB}
.brain-pill--gpt{background:#E6F6EF;color:#0F7B55}
.brain-pill--grok{background:#ECECF1;color:#111}
.brain-menu{position:fixed;z-index:9999;display:flex;flex-direction:column;gap:2px;padding:6px;border-radius:12px;background:var(--surface,#fff);box-shadow:0 8px 28px rgba(0,0,0,.18);min-width:150px}
.brain-menu button{border:0;background:transparent;text-align:left;padding:8px 10px;border-radius:8px;font:inherit;cursor:pointer;color:inherit}
.brain-menu button:hover{background:rgba(0,0,0,.06)}
.brain-menu button.is-on{font-weight:700}
.brain-menu button.is-on::after{content:' ✓'}

/* always-on wake word indicator + mute */
.wake-pill{cursor:pointer;border:0;font:inherit;display:inline-flex;align-items:center;gap:6px;background:#F1F1F3;color:#666}
.wake-pill .dot{width:8px;height:8px;border-radius:50%;background:#B0B0B5;display:inline-block}
.wake-pill[data-state="listening"]{background:#E6F6EF;color:#0F7B55}
.wake-pill[data-state="listening"] .dot{background:#14A06F;animation:wakepulse 1.6s ease-in-out infinite}
.wake-pill[data-state="awake"]{background:#FFF1E0;color:#B25E00}.wake-pill[data-state="awake"] .dot{background:#F08A00}
.wake-pill[data-state="muted"],.wake-pill[data-state="na"]{background:#FDECEC;color:#B42318}.wake-pill[data-state="muted"] .dot,.wake-pill[data-state="na"] .dot{background:#D92D20}
.wake-pill[data-state="tap"]{background:#FFF8DB;color:#8A6D00}
@keyframes wakepulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.45;transform:scale(.8)}}
.wake-mute{cursor:pointer;border:0;font:inherit;display:inline-flex;align-items:center;gap:4px;background:#F1F1F3;color:#555}
.wake-mute.is-muted{background:#D92D20;color:#fff}

/* phone: the topbar keeps every status visible but compact (brain short name, wake = pulsing dot, mute = icon) */
@media (max-width: 760px) {
  .topbar { gap: 6px; }
  .topbar #model-pill { display: none; }
  .topbar__title { max-width: 22vw; }
  #brain-pill { font-size: 0; padding: 0 8px; }
  #brain-pill::after { content: attr(data-short); font-size: 12px; font-weight: 600; }
  #wake-pill { padding: 0 8px; } #wake-pill > span:last-child { display: none; }
  #wake-mute { padding: 0 7px; } #wake-mute .wake-mute__t { display: none; }
  .c-mnav .composer__btn { width: 30px; height: 30px; }
}

/* card viewer (打开草稿 / 查看…): glass sheet over a dimmed backdrop; side sheet on desktop, bottom sheet on phone */
.viewer { position: fixed; inset: 0; z-index: 40; display: flex; justify-content: flex-end; align-items: stretch; padding: 12px;
  background: rgba(10,10,14,.22); animation: vwFade 200ms ease-out; }   /* no backdrop-filter here: it would cancel the sheet's own glass blur */
.viewer[hidden] { display: none; }
.viewer__sheet { position: relative; width: min(520px, 100%); display: grid; grid-template-rows: auto auto 1fr auto; border-radius: 26px; overflow: hidden;
  background-color: var(--mat-thick); background-image: var(--sheen); -webkit-backdrop-filter: var(--mat-blur-thick); backdrop-filter: var(--mat-blur-thick);
  box-shadow: var(--shadow-float), var(--inner-hi); animation: drawerIn 380ms var(--ease-spring); }
.viewer__sheet::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; background: var(--rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.viewer__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 16px 4px 20px; }
.viewer__head .title { font-weight: 600; font-size: 15px; }
.viewer__status { padding: 0 20px 10px; font-size: 12.5px; color: var(--text-3); }
.viewer__body { overflow: auto; padding: 4px 20px 12px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.viewer__f { display: grid; gap: 4px; align-content: start; }
.viewer__f--grow { flex: 1; grid-template-rows: auto 1fr; }
.viewer__f input, .viewer__f textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; color: var(--text); border-radius: 12px;
  padding: 9px 12px; border: .5px solid var(--hairline, rgba(0,0,0,.12)); background: color-mix(in srgb, var(--surface, #fff) 92%, transparent); outline: none; }
.viewer__f textarea { min-height: 260px; resize: vertical; line-height: 1.6; }
.viewer__f input:focus, .viewer__f textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.viewer__f [readonly] { background: color-mix(in srgb, var(--surface, #fff) 55%, transparent); }
.viewer__note { font-size: 12.5px; line-height: 1.5; padding: 8px 12px; border-radius: 12px; color: #B8621F;
  background: color-mix(in srgb, #E0803A 12%, transparent); border: .5px solid color-mix(in srgb, #E0803A 30%, transparent); }
.viewer__note--danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, transparent); border-color: color-mix(in srgb, var(--danger) 26%, transparent); }
.viewer__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.viewer__dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
.viewer__dl dt { color: var(--text-3); } .viewer__dl dd { margin: 0; overflow-wrap: anywhere; }
.viewer__foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px 16px 20px; border-top: .5px solid var(--hairline, rgba(0,0,0,.08)); }
.viewer__hint { font-size: 12px; color: var(--text-3); }
@keyframes vwFade { from { opacity: 0; } to { opacity: 1; } }
.c-card.is-flash { animation: cardFlash 1.4s ease-out; border-radius: 22px; }
@keyframes cardFlash { 0%, 40% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (max-width: 760px) {
  .viewer { align-items: flex-end; padding: 0; }
  .viewer__sheet { width: 100%; max-height: 88vh; border-radius: 26px 26px 0 0; }
  .viewer__f textarea { min-height: 180px; }
}

/* ===================== 技能 + 知识库 (Apple-glass: thick material, hairline rims, soft depth) ===================== */
.v-empty { padding: 30px 18px; text-align: center; color: var(--text-3); font-size: 13.5px; line-height: 1.7; }
.v-empty .ic { width: 22px; height: 22px; color: var(--text-4); }
/* drop zone */
.drop { position: relative; padding: 18px 18px 14px; display: grid; gap: 12px; transition: box-shadow var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out); }
.drop::before { content: ""; position: absolute; inset: 6px; border-radius: calc(var(--r-card) - 6px); pointer-events: none;
  border: 1.5px dashed color-mix(in srgb, var(--text-3) 32%, transparent); transition: border-color var(--t-fast); }
.drop.is-over { transform: scale(1.006); box-shadow: var(--shadow-card), var(--inner-hi), 0 0 0 3px var(--accent-soft-2); }
.drop.is-over::before { border-color: var(--accent); }
.drop.is-busy { pointer-events: none; }
.drop.is-busy .drop__ic { animation: dropPulse 1s ease-in-out infinite; }
@keyframes dropPulse { 50% { transform: scale(.9); opacity: .6; } }
.drop__main { display: flex; align-items: center; gap: 14px; padding: 4px 6px 0; }
.drop__ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff;
  background: var(--accent-grad); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 60%, transparent), inset 0 1px 0 rgba(255,255,255,.35); }
.drop__ic .ic { width: 20px; height: 20px; }
.drop__txt { display: grid; gap: 3px; min-width: 0; }
.drop__txt b { font-size: 15px; font-weight: 640; letter-spacing: -0.01em; }
.drop__txt span { font-size: 13px; color: var(--text-2); }
.drop__txt a { color: var(--accent-text); cursor: pointer; font-weight: 560; }
.drop__txt a:hover { text-decoration: underline; }
.drop__gh { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 5px 0 14px; border-radius: 21px; background: var(--field-fill, var(--surface-3));
  box-shadow: inset 0 0 0 .5px var(--line); color: var(--text-3); }
.drop__gh input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13.5px; color: var(--text); }
.drop__gh:focus-within { box-shadow: inset 0 0 0 .5px var(--line), 0 0 0 3px var(--accent-soft-2); }
.drop__note { display: flex; align-items: center; gap: 6px; padding: 0 6px; font-size: 12px; color: var(--text-3); }
/* skill rows */
.sk-list { display: grid; gap: 10px; }
.sk { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: start; padding: 16px 16px 14px; transition: opacity var(--t-fast), transform var(--t-fast) var(--ease-out); }
.sk:hover { transform: translateY(-1px); }
.sk.is-off { opacity: .62; }
.sk__tile { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 21px; font-weight: 650; color: #fff;
  background: linear-gradient(145deg, hsl(var(--h) 72% 62%), hsl(calc(var(--h) + 34) 70% 48%));
  box-shadow: 0 8px 18px -8px hsl(var(--h) 70% 45% / .7), inset 0 1px 0 rgba(255,255,255,.4), inset 0 -1px 0 rgba(0,0,0,.08); }
.sk__main { min-width: 0; display: grid; gap: 5px; }
.sk__top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sk__title { font-size: 15.5px; font-weight: 650; letter-spacing: -0.01em; }
.sk__name { font: 500 11.5px/1 ui-monospace, "SF Mono", Menlo, monospace; color: var(--text-3); padding: 3px 6px; border-radius: 6px; background: var(--surface-3); }
.sk__desc { font-size: 13.5px; color: var(--text-2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sk__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.sk__meta .pill { height: 20px; font-size: 11.5px; }
.sk__acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sk__ask { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.sk > .toggle { margin-top: 4px; cursor: pointer; border: 0; }
/* viewer extras */
.viewer__sheet--wide { width: min(720px, 100%); }
.sk-fm { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-3); font: 12px/1.6 ui-monospace, "SF Mono", Menlo, monospace; color: var(--text-2); white-space: pre-wrap; }
.sk-md { font-size: 14px; line-height: 1.7; color: var(--text); }
.sk-md h2, .sk-md h3, .sk-md h4, .sk-md h5 { margin: 16px 0 6px; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.sk-md h2 { font-size: 17px; }
.sk-md p { margin: 6px 0; } .sk-md ul { margin: 4px 0 8px; padding-left: 20px; } .sk-md li { margin: 3px 0; }
.sk-md code { font: 12.5px ui-monospace, "SF Mono", Menlo, monospace; padding: 1px 5px; border-radius: 5px; background: var(--surface-3); }
.sk-md pre { padding: 10px 12px; border-radius: 12px; background: var(--surface-3); overflow: auto; }
.sk-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.sk-files li { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.sk-files em { font-style: normal; font-size: 11.5px; color: var(--warn); }
/* knowledge base */
.kb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.kb-stat { display: grid; gap: 2px; padding: 12px 14px; border-radius: 18px; background-color: var(--mat-regular); background-image: var(--sheen);
  -webkit-backdrop-filter: var(--mat-blur); backdrop-filter: var(--mat-blur); box-shadow: var(--shadow-card), var(--inner-hi), inset 0 0 0 .5px var(--line); }
.kb-stat b { font-size: 22px; font-weight: 680; letter-spacing: -0.02em; }
.kb-stat span { font-size: 12px; color: var(--text-3); }
.kb-stat--mode, .kb-stat--warn { display: flex; align-items: center; gap: 8px; grid-column: span 2; }
.kb-stat--mode span:last-child { display: grid; gap: 1px; font-size: 13px; color: var(--text); font-weight: 560; }
.kb-stat--mode em { font-style: normal; font-size: 11.5px; color: var(--text-3); font-weight: 400; }
.kb-stat--mode .dot { width: 8px; height: 8px; color: var(--text-4); }
.kb-stat--mode .dot--ok { color: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }
.kb-stat--warn { color: var(--danger); } .kb-stat--warn span { color: var(--danger); font-size: 13px; }
.kb-tabs { display: flex; justify-content: flex-start; margin: 2px 2px 0; }
.kb-pane { display: grid; gap: 12px; }
.kb-pane[hidden] { display: none; }
.kb-colls { display: flex; flex-wrap: wrap; gap: 6px; }
.kb-colls .chip { padding: 0 12px; cursor: pointer; border: 0; font: inherit; font-size: 13px; color: var(--text-2); }
.kb-colls .chip .num { color: var(--text-3); font-size: 12px; }
.kb-colls .chip.on { color: var(--text); box-shadow: 0 0 0 1.5px var(--accent-soft-2), var(--inner-hi); }
.kb-colls .chip--add { color: var(--accent-text); }
.chip--form { padding: 0 3px 0 12px; gap: 6px; }
.chip--form input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px; width: 140px; color: var(--text); }
.chip--form .btn { height: 22px; padding: 0 10px; font-size: 12px; }
.kb-docs { padding: 6px; }
.kb-doc { display: grid; grid-template-columns: 40px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 10px; border-radius: 16px; }
.kb-doc + .kb-doc { box-shadow: 0 -.5px 0 var(--line); }
.kb-doc:hover { background: var(--surface-3); }
.kb-doc__ext { width: 40px; height: 46px; border-radius: 9px; display: grid; place-items: end center; padding-bottom: 7px; box-sizing: border-box;
  font: 700 9.5px/1 -apple-system, system-ui, sans-serif; letter-spacing: .04em; color: #fff; position: relative;
  background: linear-gradient(160deg, #8E9AAF, #5E6A80); box-shadow: 0 4px 10px -5px rgba(20,30,60,.45), inset 0 1px 0 rgba(255,255,255,.3); }
.kb-doc__ext::before { content: ""; position: absolute; top: 0; right: 0; width: 11px; height: 11px; border-bottom-left-radius: 4px;
  background: linear-gradient(225deg, var(--surface, #fff) 50%, rgba(255,255,255,.55) 50%); opacity: .9; }
.kb-doc__ext[data-ext=".pdf"] { background: linear-gradient(160deg, #F2685E, #D23B33); }
.kb-doc__ext[data-ext=".docx"] { background: linear-gradient(160deg, #5B8DEF, #2F5FC9); }
.kb-doc__ext[data-ext=".xlsx"], .kb-doc__ext[data-ext=".csv"], .kb-doc__ext[data-ext=".tsv"] { background: linear-gradient(160deg, #3FBF7F, #1F9459); }
.kb-doc__ext[data-ext=".pptx"] { background: linear-gradient(160deg, #F39A4B, #D9702A); }
.kb-doc__ext[data-ext=".md"], .kb-doc__ext[data-ext=".markdown"], .kb-doc__ext[data-ext=".txt"] { background: linear-gradient(160deg, #9B8CF2, #6E5BD8); }
.kb-doc__main { min-width: 0; display: grid; gap: 3px; }
.kb-doc__name { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-doc__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--text-3); }
.kb-doc__err { color: var(--danger); }
.kb-doc__state { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.kb-doc__state .pill { height: 22px; font-size: 11.5px; white-space: nowrap; }
.spinner--xs { width: 9px; height: 9px; border-width: 1.5px; }
.kb-doc__acts { display: flex; gap: 2px; opacity: .55; transition: opacity var(--t-fast); }
.kb-doc:hover .kb-doc__acts, .kb-doc__acts:focus-within { opacity: 1; }
.kb-doc__acts .composer__btn { width: 30px; height: 30px; }
.kb-via { margin-left: auto; font-size: 11px; color: var(--text-4); }
.kb-ctx { font-size: 14px; line-height: 1.75; white-space: pre-wrap; padding: 12px 14px; border-radius: 14px; }
.kb-ctx--dim { color: var(--text-3); font-size: 13px; }
.kb-ctx--hit { background: color-mix(in srgb, var(--accent) 7%, var(--surface, #fff)); box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 .5px var(--line); }
/* customers */
.kb-cbar { display: flex; gap: 10px; align-items: center; }
.kb-cbar .v-field { flex: 1; height: 46px; }
.kb-cbar .btn { height: 46px; border-radius: 23px; padding: 0 16px; white-space: nowrap; }
.cu-card { padding: 4px 6px; overflow-x: auto; }
.cu-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.cu-table th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: var(--text-3); padding: 12px 10px 8px; white-space: nowrap; }
.cu-table td { padding: 11px 10px; border-top: .5px solid var(--line); vertical-align: top; color: var(--text-2); }
.cu-table tr:hover td { background: var(--surface-3); }
.cu-table tr:hover td:first-child { border-radius: 12px 0 0 12px; } .cu-table tr:hover td:last-child { border-radius: 0 12px 12px 0; }
.cu-name b { color: var(--text); font-weight: 620; display: block; }
.cu-name .pill { margin-top: 5px; height: 20px; font-size: 11px; }
.cu-table tr.is-flag td { background: color-mix(in srgb, var(--danger) 5%, transparent); }
.cu-contact { font-size: 12.5px; word-break: break-all; }
.cu-notes { max-width: 220px; }
.cu-act { width: 30px; text-align: right; }
.cu-act .composer__btn { width: 28px; height: 28px; opacity: .5; } .cu-table tr:hover .cu-act .composer__btn { opacity: 1; }
.cu-foot { font-size: 12px; color: var(--text-3); padding: 0 6px; }
/* knowledge-base card in the chat */
.kb-card .card__head .ic { color: var(--accent-text); }
.kb-hits { list-style: none; margin: 0; padding: 0 8px 4px; display: grid; }
.kb-hit { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 10px 10px; border-radius: 14px; cursor: pointer; }
.kb-hit + .kb-hit { box-shadow: 0 -.5px 0 var(--line); }
.kb-hit:hover { background: var(--surface-3); }
.kb-hit--cust { cursor: default; }
.kb-hit__ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.kb-hit__ic .ic { width: 14px; height: 14px; }
.kb-hit__src { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 13px; }
.kb-hit__src b { font-weight: 620; color: var(--text); }
.kb-hit__src span:not(.pill) { color: var(--text-3); font-size: 12px; }
.kb-hit__src .pill { height: 19px; font-size: 11px; }
.kb-hit__snip { font-size: 13px; color: var(--text-2); line-height: 1.55; margin-top: 2px; }
@media (max-width: 760px) {
  .sk { grid-template-columns: 40px 1fr auto; gap: 12px; padding: 14px; }
  .sk__tile { width: 40px; height: 40px; border-radius: 12px; font-size: 18px; }
  .kb-stat--mode, .kb-stat--warn { grid-column: 1 / -1; }
  .kb-stats { grid-template-columns: repeat(3, 1fr); }
  .kb-doc { grid-template-columns: 34px 1fr auto; gap: 10px; }
  .kb-doc__ext { width: 34px; height: 40px; }
  .kb-doc__state { grid-column: 2; justify-content: flex-start; }
  .kb-doc__acts { grid-column: 3; grid-row: 1 / span 2; flex-direction: column; opacity: 1; }
  .kb-cbar { flex-wrap: wrap; }
  .kb-cbar .btn { width: 100%; justify-content: center; }
  .cu-card { padding: 6px; overflow: visible; }
  .cu-table, .cu-table tbody, .cu-table tr, .cu-table td { display: block; }
  .cu-table thead { display: none; }
  .cu-table tr { position: relative; padding: 10px 8px; border-radius: 14px; }
  .cu-table tr + tr { box-shadow: 0 -.5px 0 var(--line); }
  .cu-table td { border: 0; padding: 2px 4px; background: none !important; }
  .cu-table td[data-l]:not(:empty)::before { content: attr(data-l) "  "; color: var(--text-4); font-size: 11.5px; }
  .cu-table td[data-l]:empty { display: none; }
  .cu-act { position: absolute; top: 8px; right: 6px; }
  .cu-notes { max-width: none; }
  .drop__gh input { font-size: 13px; }
}
@media (max-width: 760px) { body[data-view]:not([data-view="chat"]) .topbar__title { display: none; } }
/* sheet layout independent of which optional rows exist (status row may be absent) */
.viewer__sheet { display: flex; flex-direction: column; }
.viewer__head, .viewer__status, .viewer__foot { flex: none; }
.viewer__body { flex: 1 1 auto; }
.kb-stat--warn { grid-column: 1 / -1; }
.cu-contact { word-break: normal; overflow-wrap: anywhere; }
@media (max-width: 760px) { .viewer__sheet { background-color: color-mix(in srgb, var(--surface, #fff) 97%, transparent); } }

/* ===================== phone / PWA: safe areas (notch, home indicator), standalone, compact topbar ===================== */
:root { --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px); }
html { background: var(--bg, #EEF1F7); }
body { overscroll-behavior-y: none; }
.main { grid-template-rows: calc(56px + var(--sat)) minmax(0, 1fr); }
.topbar { padding-top: var(--sat); }
.c-scroll { padding-top: calc(64px + var(--sat)); }
.v-scroll { padding-top: calc(72px + var(--sat)); }
.notify-stack { top: calc(64px + var(--sat)); }
.drawer { top: calc(60px + var(--sat)); }
.c-dock { padding-bottom: calc(20px + var(--sab)); padding-left: max(24px, var(--sal)); padding-right: max(24px, var(--sar)); }
@media (max-width: 760px) {
  .topbar { padding-left: max(12px, var(--sal)); padding-right: max(12px, var(--sar)); }
  .topbar__title { display: none; }                 /* each page has its own big title; keeps the nav + status readable at 390 px */
  .c-scroll { padding-top: calc(60px + var(--sat)); }
  .v-scroll { padding-top: calc(64px + var(--sat)); padding-bottom: calc(32px + var(--sab)); }
  .c-dock { padding: 8px max(10px, var(--sal)) calc(10px + max(4px, var(--sab))) max(10px, var(--sar)); }
  .drawer { top: calc(56px + var(--sat)); bottom: calc(8px + var(--sab)); }
  .notify-stack { top: calc(60px + var(--sat)); }
  .viewer__foot { padding-bottom: calc(16px + var(--sab)); }
  .viewer__sheet { max-height: calc(100dvh - var(--sat) - 24px); }
  .topbar .spacer { min-width: 0; }
  .c-mnav { margin-left: auto; }
}
/* Home-screen app: no browser chrome → a little more air at the top, no text selection on controls, no tap flash */
.is-pwa body { -webkit-tap-highlight-color: transparent; }
.is-pwa .topbar button, .is-pwa .c-mnav, .is-pwa .v-mic, .is-pwa .v-hands { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html[data-device="phone"] textarea, html[data-device="phone"] input { font-size: 16px; }   /* iOS: no zoom-on-focus */

/* ===================== voice handoff bubble (「手机已接管对话」) ===================== */
.handoff { position: absolute; z-index: 35; left: 50%; top: calc(66px + var(--sat)); transform: translateX(-50%); width: min(460px, calc(100% - 24px));
  display: grid; grid-template-columns: 40px 1fr auto auto; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 22px; box-sizing: border-box;
  background-color: var(--mat-thick); background-image: var(--sheen); -webkit-backdrop-filter: var(--mat-blur-thick); backdrop-filter: var(--mat-blur-thick);
  box-shadow: var(--shadow-float), var(--inner-hi), 0 0 0 .5px var(--line); }
.handoff[hidden] { display: none; }
.handoff.is-in { animation: handoffIn 420ms var(--ease-spring) both; }
.handoff.is-out { animation: handoffOut 200ms var(--ease-out) both; }
@keyframes handoffIn { from { opacity: 0; transform: translate(-50%, -14px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes handoffOut { to { opacity: 0; transform: translate(-50%, -10px) scale(.97); } }
.handoff__ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--accent-grad);
  box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--accent) 60%, transparent), inset 0 1px 0 rgba(255,255,255,.35); }
.handoff__ic .ic { width: 19px; height: 19px; }
.handoff__txt { display: grid; gap: 2px; min-width: 0; }
.handoff__txt b { font-size: 14.5px; font-weight: 650; letter-spacing: -0.01em; }
.handoff__txt span { font-size: 12px; color: var(--text-3); line-height: 1.35; }
.handoff__take { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 13px; border-radius: 17px; border: 0; cursor: pointer; white-space: nowrap;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); box-shadow: inset 0 0 0 .5px var(--accent-soft-2); }
.handoff__take:hover { background: var(--accent-soft-2); }
.handoff__x { width: 26px; height: 26px; border-radius: 13px; border: 0; display: grid; place-items: center; cursor: pointer; color: var(--text-3); background: transparent; }
.handoff__x:hover { background: var(--surface-3); }
@media (max-width: 760px) {
  .handoff { top: calc(58px + var(--sat)); grid-template-columns: 36px 1fr auto; gap: 10px; }
  .handoff__ic { width: 36px; height: 36px; border-radius: 12px; }
  .handoff__x { display: none; }
}
/* the device that gave voice away: hands-free button invites taking it back */
body.lease-away .v-hands { box-shadow: 0 0 0 1.5px var(--accent-soft-2); }

/* ===================== mic permission sheet ===================== */
.mic-hero { width: 64px; height: 64px; margin: 6px auto 4px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: var(--accent-grad);
  box-shadow: 0 12px 24px -10px color-mix(in srgb, var(--accent) 65%, transparent), inset 0 1px 0 rgba(255,255,255,.35); }
.mic-hero .ic { width: 28px; height: 28px; }
.mic-p { margin: 4px 0; font-size: 14.5px; line-height: 1.6; color: var(--text); }
.mic-p code { font: 12.5px ui-monospace, "SF Mono", Menlo, monospace; padding: 1px 5px; border-radius: 5px; background: var(--surface-3); }
.mic-pts, .mic-steps { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
/* the top fade must also cover the status-bar safe area, so text never shows under the clock / nav */
.c-body > .scroll-edge:not(.scroll-edge--bottom), .view > .scroll-edge { height: calc(96px + var(--sat)); }
@media (max-width: 760px) { .c-body > .scroll-edge:not(.scroll-edge--bottom), .view > .scroll-edge { height: calc(84px + var(--sat)); } }
/* phone: wake word starts muted by default (battery) → show it as a calm state, not a red alarm */
html[data-device="phone"] .wake-mute.is-muted { background: var(--ctl-fill); color: var(--text-3); }
/* phone: frosted band behind the status bar + topbar so scrolled text never reads through the nav */
@media (max-width: 760px) {
  .topbar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(100% + 18px); z-index: -1; pointer-events: none;
    background: color-mix(in srgb, var(--bg, #EEF1F7) 62%, transparent); -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
    -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); }
}

/* ---------- web building blocks: GitHub repos · downloads · sites · deploy receipt ---------- */
.repo-meta { font-size: 11.5px; opacity: .85; }
.result__name a { color: inherit; text-decoration: none; }
.result__name a:hover { text-decoration: underline; }
.dl-rows { margin: 2px 14px 10px; padding: 10px 14px; display: grid; gap: 7px; }
.dl-row { display: grid; grid-template-columns: 64px 1fr; gap: 10px; font-size: 13px; align-items: baseline; }
.dl-row .label { color: var(--text-3); font-size: 12px; }
.dl-path { word-break: break-all; }
.dl-sha { font: 11.5px/1.4 ui-monospace, "SF Mono", Menlo, monospace; word-break: break-all; color: var(--text-2); user-select: all; }
.site-shots { position: relative; margin: 4px 14px 8px; display: flex; align-items: flex-end; gap: 10px; }
.site-shot { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line, rgba(0,0,0,.08));
  box-shadow: 0 6px 22px rgba(20,30,60,.10); background: #fff; transition: transform .2s ease; }
.site-shot:hover { transform: translateY(-2px); }
.site-shot img { display: block; width: 100%; height: auto; }
.site-shot--desk { flex: 1 1 auto; max-height: 300px; }
.site-shot--desk img { object-fit: cover; object-position: top; max-height: 300px; }
.site-shot--phone { flex: 0 0 23%; max-width: 128px; border-radius: 16px; max-height: 270px; }
.site-shot--phone img { object-fit: cover; object-position: top; max-height: 270px; }
.site-noshot { margin: 4px 18px 8px; font-size: 12.5px; color: var(--text-3); }
.site-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 0 18px 6px; font-size: 12.5px; color: var(--text-2); word-break: break-all; }
.rc-link { display: flex; gap: 6px; align-items: center; margin: 6px 0 0 4px; font-size: 13px; word-break: break-all; }
.rc-link a { color: var(--accent, #0A84FF); text-decoration: none; }
html[data-device="phone"] .site-shot--desk { max-height: 200px; }
html[data-device="phone"] .site-shot--desk img { max-height: 200px; }
html[data-device="phone"] .dl-row { grid-template-columns: 54px 1fr; }
.site-card .card__head .title { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
html[data-device="phone"] .site-card .card__head .title { font-size: 15px; }

/* ===================== attachments (composer tray, picker menu, message chips) ===================== */
.att-tray { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 2px 8px; max-height: 168px; overflow: auto; }
.att { position: relative; display: inline-flex; align-items: center; gap: 9px; height: 48px; max-width: 240px; padding: 0 30px 0 5px; border-radius: 14px;
  background: var(--surface-2); box-shadow: inset 0 0 0 .5px var(--line-strong), var(--inner-hi); overflow: hidden; }
.att__pic { width: 38px; height: 38px; border-radius: 10px; background: center / cover no-repeat var(--surface-3); flex: none; }
.att__ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.att--folder > .ic { width: 22px; height: 22px; margin-left: 8px; color: var(--accent-text); flex: none; }
.att__txt { display: grid; gap: 1px; min-width: 0; }
.att__txt b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att__txt span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att.is-err { box-shadow: inset 0 0 0 1px var(--danger-fill); }
.att.is-err .att__txt span { color: var(--danger); }
.att__bar { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--p); background: var(--accent); transition: width .15s linear; }
.att__x { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 11px; border: 0; display: grid; place-items: center;
  background: var(--surface-3); color: var(--text-2); cursor: pointer; }
.att-menu { position: fixed; z-index: 60; display: grid; gap: 2px; padding: 6px; border-radius: 18px; min-width: 250px; }
.att-menu[hidden] { display: none; }
.att-menu button { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.att-menu button:hover { background: var(--surface-3); }
.att-menu button[hidden] { display: none; }
.att-menu .ic { width: 20px; height: 20px; color: var(--accent-text); }
.att-menu span { display: grid; gap: 1px; } .att-menu b { font-size: 14px; font-weight: 600; } .att-menu em { font-style: normal; font-size: 12px; color: var(--text-3); }
#c-body.is-drop::after { content: "松手就加到消息里（图片、文件、整个文件夹）"; position: absolute; inset: 10px; z-index: 40; border-radius: 26px; display: grid; place-items: center;
  border: 2px dashed var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent-text); font-weight: 600; font-size: 15px; pointer-events: none; }
.m-att { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin: 0 0 6px auto; max-width: min(460px, 86%); }
.m-att__pics { display: grid; gap: 4px; border-radius: 18px; overflow: hidden; width: 100%; max-width: 340px; }
.m-att__pics.n1 { grid-template-columns: 1fr; } .m-att__pics.n2 { grid-template-columns: 1fr 1fr; } .m-att__pics.n3, .m-att__pics.n4 { grid-template-columns: 1fr 1fr; }
.m-att__pic { padding: 0; border: 0; cursor: zoom-in; background: var(--surface-3); aspect-ratio: 4 / 3; overflow: hidden; }
.m-att__pics.n1 .m-att__pic { aspect-ratio: auto; max-height: 300px; }
.m-att__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-att__vid { position: relative; display: block; width: 240px; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #111; }
.m-att__vid img { width: 100%; height: 100%; object-fit: cover; }
.m-att__play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; } .m-att__play .ic { width: 34px; height: 34px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.m-att__dur { position: absolute; right: 8px; bottom: 6px; color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; background: rgba(0,0,0,.45); padding: 1px 6px; border-radius: 8px; }
.m-att__doc, .m-att__folder { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 16px; background: var(--surface-2);
  box-shadow: inset 0 0 0 .5px var(--line-strong), var(--inner-hi); color: var(--text); text-decoration: none; max-width: 100%; }
.m-att__doc span, .m-att__folder span { display: grid; min-width: 0; } .m-att__doc b, .m-att__folder b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-att__doc em, .m-att__folder em { font-style: normal; font-size: 11.5px; color: var(--text-3); }
.m-att__folder > .ic { width: 26px; height: 26px; color: var(--accent-text); }

/* ===================== lightbox =====================
   Image area = viewport minus the glass info bar below it; the image is centred in that area, keeps its aspect ratio for any
   shape (9:16, 16:9, square: object-fit contain + exact fitted size from media.js), never stretched, never under the bar.
   Backdrop: 50% frosted glass. (Bug before: the img sat in an auto-height grid row, so max-height:100% never resolved — a
   940×1672 poster rendered 1672 px tall, started mid-screen and ran under the info panel.) */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(20, 20, 25, .5);
  -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4); --lb-bar: 150px; --lb-gap: 16px; }
.lightbox[hidden] { display: none; }
.lightbox__stage { position: absolute; inset: 0; box-sizing: border-box; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; overflow: hidden;
  padding: calc(var(--sat, 0px) + 60px) 24px calc(var(--sab, 0px) + 20px + var(--lb-bar) + var(--lb-gap)); }
.lightbox__stage img { flex: none; display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.45); -webkit-user-drag: none; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; width: 44px; height: 44px; border-radius: 22px; border: 0; font-size: 28px; line-height: 1;
  color: #fff; background: rgba(255,255,255,.14); cursor: pointer; } .lightbox__nav.prev { left: 6px; } .lightbox__nav.next { right: 6px; }
.lightbox__info { position: absolute; z-index: 1; left: 50%; transform: translateX(-50%); bottom: calc(var(--sab, 0px) + 20px); width: min(760px, calc(100% - 32px));
  box-sizing: border-box; border-radius: 22px; padding: 12px 16px; display: grid; gap: 5px; min-width: 0; font-size: 14px; transition: opacity .2s; }
.lightbox__title { font-weight: 640; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox__note { font-size: 14px; line-height: 1.5; color: var(--text-2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; cursor: pointer; }
.lightbox__info.is-open .lightbox__title { white-space: normal; }
.lightbox__info.is-open .lightbox__note { -webkit-line-clamp: unset; max-height: 30vh; overflow: auto; }
.lightbox__meta { font-size: 14px; color: var(--text-3); }
.lightbox__acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.lightbox__acts .btn, .lightbox__acts .num { font-size: 14px; }
.lightbox__x { position: absolute; top: calc(var(--sat, 0px) + 12px); right: 12px; z-index: 2; color: #fff; background: rgba(255,255,255,.14); }
@media (max-height: 460px) { .lightbox__note { -webkit-line-clamp: 1; } .lightbox__stage { padding-top: calc(var(--sat, 0px) + 16px); } }
.lb-del, .lib-del { color: var(--danger); }

/* ===================== 会议模式 ===================== */
.meet-bar { display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 14px; margin-bottom: 8px; border-radius: 20px; min-width: 0;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--danger-fill) 45%, transparent), var(--shadow-card); }
.meet-bar[hidden] { display: none; }
.rec-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--danger-fill); flex: none; box-shadow: 0 0 0 0 rgba(255, 59, 48, .55); animation: recPulse 1.6s ease-out infinite; }
@keyframes recPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, .55); } 70% { box-shadow: 0 0 0 9px rgba(255, 59, 48, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); } }
.meet-bar__t { display: flex; gap: 5px; align-items: baseline; font-size: 13px; color: var(--text-2); white-space: nowrap; flex: none; }
.meet-bar__t b { color: var(--danger); font-weight: 650; }
.meet-bar__live { flex: 1; min-width: 0; font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meet-stop { background: var(--danger-fill); color: #fff; border: 0; } .meet-stop:hover { filter: brightness(1.06); }
.meet-btn.is-on { color: var(--danger-fill); background: var(--danger-soft); }
body.meeting-on .v-mic, body.meeting-on .v-hands { opacity: .4; pointer-events: none; }
html[data-device="phone"] .meet-bar { flex-wrap: wrap; } html[data-device="phone"] .meet-bar__live { order: 5; flex-basis: 100%; }
.mt-card .card__head .rec-dot { margin-right: 2px; }
.mt-body { padding: 2px 18px 10px; }
.mt-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.5; }
.mt-lines li { display: grid; grid-template-columns: 48px 1fr; gap: 8px; } .mt-lines li .num { color: var(--text-3); font-size: 12px; padding-top: 1px; }
.mt-lines--full { max-height: 60vh; overflow: auto; }
.mt-more { font-size: 12px; margin-top: 6px; } .mt-err { color: var(--danger); font-size: 13px; margin-top: 6px; }
.mt-min { display: grid; gap: 10px; font-size: 13.5px; line-height: 1.55; } .mt-sum { margin: 0; }
.mt-sec > b { font-size: 12px; color: var(--text-3); font-weight: 600; letter-spacing: .02em; } .mt-sec ul { margin: 4px 0 0; padding-left: 18px; }
.mt-todos { list-style: none; padding: 0 !important; display: grid; gap: 6px; }
.mt-todos li { display: grid; grid-template-columns: 1fr auto auto auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 12px; background: var(--surface-3); }
.mt-todo__who, .mt-todo__due { font-size: 12px; color: var(--text-2); white-space: nowrap; }
html[data-device="phone"] .mt-todos li { grid-template-columns: 1fr auto; } html[data-device="phone"] .mt-todo__due { grid-column: 1; }

/* ===================== result cards ===================== */
.img-card { display: grid; grid-template-columns: 220px 1fr; overflow: hidden; }
.img-card__pic { padding: 0; border: 0; cursor: zoom-in; background: var(--surface-3); min-height: 140px; }
.img-card__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-card__info { padding: 14px 16px; display: grid; gap: 6px; align-content: start; }
.img-card__top { display: flex; align-items: center; gap: 6px; font-size: 13px; } .img-card__top .faint { margin-left: auto; font-size: 12px; }
.img-card__title { font-size: 14px; font-weight: 560; } .img-card__acts { display: flex; gap: 8px; margin-top: 4px; }
html[data-device="phone"] .img-card { grid-template-columns: 1fr; } html[data-device="phone"] .img-card__pic { max-height: 260px; }
.file-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.file-card__ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.file-card__ic.t-PPT { background: rgba(245, 106, 0, .14); color: #C2510A; } .file-card__ic.t-表格 { background: var(--ok-soft); color: var(--ok); }
.file-card__main { flex: 1; min-width: 0; display: grid; gap: 2px; } .file-card__main b { font-size: 14px; } .file-card__main span { font-size: 12px; }

/* ===================== 图片库 / 文件柜 ===================== */
.v-col--wide { width: min(1080px, 100%); }
.lib-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; position: sticky; top: 0; z-index: 3; padding: 6px 0; }
.lib-count { font-size: 13px; color: var(--text-2); } .lib-sel { font-size: 13px; color: var(--text-2); }
.lib-day { display: grid; gap: 10px; margin-bottom: 18px; }
.lib-day__h { display: flex; align-items: baseline; gap: 8px; font-size: 15px; font-weight: 650; letter-spacing: -.01em; padding: 0 2px; }
.lib-day__h .num { font-size: 12px; color: var(--text-3); font-weight: 500; }
/* 图片库: tidy ~150 px square thumbnails (5–7 per row on desktop, 3 on phone); click opens the full-ratio lightbox */
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, 150px); justify-content: start; gap: 12px; }
@media (max-width: 1100px) { .gal-grid { grid-template-columns: repeat(auto-fill, 140px); gap: 10px; } }
@media (max-width: 560px) { .gal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } }
.gal-tile { position: relative; padding: 0; border: 0; border-radius: 14px; overflow: hidden; aspect-ratio: 1; background: var(--surface-3); cursor: zoom-in;
  box-shadow: var(--shadow-card); transition: transform var(--t-fast) var(--ease-out); }
.gal-tile:hover { transform: translateY(-1px); } .gal-tile.is-selecting { cursor: pointer; }
.gal-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-miss { display: grid; place-items: center; height: 100%; font-size: 12px; color: var(--text-3); }
.gal-tile__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; display: grid; gap: 1px; text-align: left; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .62)); }
.gal-tile__cap b { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .gal-tile__cap em { font-style: normal; font-size: 10.5px; opacity: .85; }
.gal-tile__chk { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 11px; display: none; place-items: center;
  background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1.5px #fff; color: transparent; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.gal-tile.is-selecting .gal-tile__chk { display: grid; }
.gal-tile.is-sel { box-shadow: 0 0 0 3px var(--accent), var(--shadow-card); } .gal-tile.is-sel .gal-tile__chk { background: var(--accent); color: #fff; }
.lib-search { flex: 1 1 260px; min-width: 200px; }
.lib-types { display: flex; gap: 6px; flex-wrap: wrap; flex: 1 1 100%; order: 3; }
.lib-types .chip { padding: 0 12px; cursor: pointer; border: 0; font: inherit; font-size: 13px; color: var(--text-2); }
.lib-types .chip.on { background: var(--accent); color: #fff; } .lib-types .chip .num { opacity: .7; margin-left: 2px; }
.lib-acts { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.cab-list { padding: 4px 0; }
.cab-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; border-top: .5px solid var(--line); }
.cab-row:first-child { border-top: 0; } .cab-row:hover { background: var(--surface-3); } .cab-row.is-sel { background: var(--accent-soft); }
.cab-row.is-gone { opacity: .55; }
.cab-badge { min-width: 42px; justify-content: center; background: rgba(0,122,255,.12); color: #0A66D8; } .cab-badge.t-PPT, .cab-badge.t-表格, .cab-badge.t-网站, .cab-badge.t-会议纪要, .cab-badge.t-PDF { color: #fff; } .cab-badge.t-PPT { background: #F56A00; } .cab-badge.t-表格 { background: #1F9D55; } .cab-badge.t-网站 { background: #5E5CE6; } .cab-badge.t-会议纪要 { background: #FF3B30; } .cab-badge.t-PDF { background: #D93025; }
.cab-main { flex: 1; min-width: 0; display: grid; gap: 2px; } .cab-main b { font-size: 14px; font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cab-main span { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cab-main a { color: var(--accent-text); cursor: pointer; }
@media (max-width: 640px) { .cab-main span { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; } }   /* phone: the 来自「对话」 link wraps instead of being clipped off-screen */
.cab-acts { display: flex; align-items: center; gap: 2px; flex: none; }
.cab-chk { width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line-strong); color: transparent; flex: none; }
.cab-row.is-sel .cab-chk { background: var(--accent); color: #fff; box-shadow: none; }
html[data-device="phone"] .cab-acts .btn:first-child { display: none; }
.del-list { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.6; } .del-list em { font-style: normal; color: var(--text-3); font-size: 12px; }
.del-yes { background: var(--danger-fill); color: #fff; border: 0; }
.pv-pdf { width: 100%; height: 70vh; border: 0; border-radius: 12px; background: #fff; }
.pv-text { white-space: pre-wrap; font-size: 12.5px; max-height: 65vh; overflow: auto; }
.pv-md { max-height: 65vh; overflow: auto; }
.pv-scroll { max-height: 62vh; overflow: auto; border-radius: 12px; box-shadow: inset 0 0 0 .5px var(--line-strong); }
.pv-table { border-collapse: collapse; font-size: 12.5px; width: max-content; min-width: 100%; }
.pv-table th, .pv-table td { padding: 6px 10px; border-bottom: .5px solid var(--line); text-align: left; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.pv-table th { position: sticky; top: 0; background: var(--surface-1, var(--surface-2)); font-weight: 600; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.pv-tabs { display: flex; gap: 6px; margin-bottom: 8px; } .pv-tabs .chip { border: 0; cursor: pointer; padding: 0 12px; font: inherit; font-size: 12.5px; } .pv-tabs .chip.on { background: var(--accent); color: #fff; }
.pv-slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; max-height: 65vh; overflow: auto; }
.pv-slide { aspect-ratio: 16 / 9; border-radius: 12px; padding: 12px 14px; background: #fff; color: #1d1d1f; box-shadow: 0 0 0 .5px var(--line-strong), 0 4px 14px rgba(0,0,0,.06);
  overflow: hidden; display: grid; align-content: start; gap: 4px; font-size: 11px; }
.pv-slide .num { color: #86868b; font-size: 10px; } .pv-slide b { font-size: 13px; } .pv-slide ul { margin: 0; padding-left: 14px; }
.pv-site { width: 100%; border-radius: 12px; box-shadow: 0 0 0 .5px var(--line-strong); }

/* 服务器 (SSH) settings */
.srv-form { display: grid; gap: 10px; padding: 14px; }
.srv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.srv-grid label, .srv-key label, .srv-root { display: grid; gap: 4px; font-size: 13px; color: var(--fg-2, inherit); }
.srv-key, .srv-root { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; }
.srv-key label, .srv-root { display: inline-flex; gap: 6px; align-items: center; }
.srv-wide { grid-column: 1 / -1; }
.srv-form input:not([type]), .srv-form input[name], .srv-form textarea { font: inherit; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line, #ccc); background: transparent; color: inherit; }
.srv-form input[type=radio], .srv-form input[type=checkbox] { padding: 0; }
.srv__pub code { display: block; word-break: break-all; font-size: 11px; margin-top: 4px; user-select: all; }
