/* 面板 · 助手动态 的样式（pages/inbox.js，原来的「收件箱」）。归 M4 触达。只写这一页自己的类，类名带这一页的前缀 ibx-（ib- 被 app.css 的旧 .ib-panel、
   mb- 被 setup.css 占着）；共用的在 shell.css，一件事的经过（气泡、结果卡片）在 chat.css。需求见 docs/specs/assistant-feed.md。
   电脑上整屏高，顶上标题、说明和标签，下面左边一列卡片（宽 380，按天分组）、右边阅读区，各自滚动；手机上一次只看一边。 */
.ibx { display: flex; flex-direction: column; min-width: 0; height: 100vh; height: 100dvh; }
.ibx > * { animation: u-fade .36s var(--ease-out) backwards; }
.ibx-head { flex: none; display: grid; gap: 6px; padding: 40px max(32px, env(safe-area-inset-right, 0px)) 16px max(32px, env(safe-area-inset-left, 0px)); }
.ibx-head h1 { margin: 0; }

.ibx-empty { padding: 48px 24px; color: var(--muted); text-align: center; font-size: 13.5px; line-height: 1.6; }

/* 右边的阅读区：一件事（标题、来源和时间、经过、发出的信、去哪接着说）；一封信；等你点头的信（为什么要你点头、正文） */
.ibx-body { max-width: 62ch; padding: 18px 20px; border-radius: 12px; background: var(--soft); color: var(--text); font-size: 14px; line-height: 1.75;
  white-space: pre-wrap; overflow-wrap: anywhere; }
.ibx-why { max-width: 62ch; padding: 14px 16px; border: 1px solid var(--yellow-line); border-radius: 12px; background: var(--yellow-soft); font-size: 13.5px; line-height: 1.6; }
.ibx-why b { display: block; color: var(--ink); font-weight: 600; }
.ibx-why p { margin: 2px 0 0; color: var(--text); }
.ibx-why p.ibx-why-r { color: var(--muted); }
.ibx-why .ibx-body { margin-top: 12px; background: var(--panel); }
/* 经过里的一封信：谁、主题、她写的那句话；点开看正文、附件、她因此记下的事项 */
.ibx-mail { align-self: stretch; display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.ibx-mail.is-new { border-color: var(--tint); }
.ibx-mail.is-draft { border-color: var(--yellow-line); background: var(--yellow-soft); }
button.ibx-mail-h, div.ibx-mail-h { display: grid; grid-template-columns: 18px minmax(0, 1fr) 16px; gap: 10px; align-items: center; width: 100%; padding: 0; border: 0;
  background: none; color: inherit; font-weight: 400; text-align: left; }
div.ibx-mail-h { grid-template-columns: 18px minmax(0, 1fr); }
button.ibx-mail-h:hover, button.ibx-mail-h:active { background: none; transform: none; }
.ibx-mail-h .ic { width: 16px; height: 16px; color: var(--muted); }
.ibx-mail-h .ic.is-open { transform: rotate(90deg); }
.ibx-mail-w { display: grid; min-width: 0; }
.ibx-mail-w b { color: var(--ink); font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ibx-mail-w span { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.ibx-mail-did { display: flex; gap: 6px; margin: 0; color: var(--text); font-size: 13px; overflow-wrap: anywhere; }
.ibx-mail-did .ic { flex: none; width: 14px; height: 14px; margin-top: 3px; color: var(--tint); }
.ibx-mail .ibx-body { max-width: none; padding: 12px 14px; font-size: 13.5px; }
.ibx-did-items .up-row { margin-top: 6px; }
.ibx-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ibx-note { margin: 0; color: var(--muted); font-size: 13px; }
a.btn .ic, .ibx-next .btn .ic { width: 16px; height: 16px; }
/* 邮件（docs/specs/inbox-mail.md）：附件名；来信下面「小优做了什么」那一块（样式稿的 .mr-att、.mr-did） */
.ibx-atts { display: flex; flex-wrap: wrap; gap: 8px; }
.ibx-att { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; height: 34px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px;
  color: var(--ink); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ibx-att .ic { flex: none; width: 15px; height: 15px; color: var(--muted); }

/* 手机：一次只看一边。列表时只有卡片；点一张进阅读区，顶上「‹ 助手动态」回来。整块高度去掉顶上那一条（52px）和底部标签（64px） */
@media (max-width: 759.98px) {
  .ibx { height: calc(100vh - 116px - env(safe-area-inset-bottom, 0px)); height: calc(100dvh - 116px - env(safe-area-inset-bottom, 0px)); }
  .ibx-head { gap: 4px; padding: 18px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); }
  .ibx.is-reading .ibx-list, .ibx.is-reading .ibx-head { display: none; }   /* 看一件事时标题和标签也收起来，「‹ 助手动态」回去 */
}
@media (prefers-reduced-motion: reduce) { .ibx > * { animation-duration: .01ms; } }
.ibx-via { display: block; max-width: 100%; margin: 4px 0 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font: inherit; font-size: 13px; }   /* 等你点头的信：从哪个邮箱发 */

/* 对话页（pages/inbox.js，2026-11-11 起取代助手动态）：顶上选哪一天、展示得多详细、往来信件；下面整块对话，今天的带输入框 */
.talk-head { gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.talk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.talk-day { position: relative; display: flex; align-items: center; gap: 6px; }
.talk-date { min-width: 132px; justify-content: center; }
.talk-next .ic { transform: scaleX(-1); }
.talk-lead { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; }
.talk-seg button.on { font-weight: 600; }
.talk > .chat-th { flex: 1; min-height: 0; height: auto; }
.talk > .chat-th .chat-b, .talk > .chat-th .chat-in { width: 100%; max-width: 820px; margin: 0 auto; }
.talk-letters { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 32px 64px; }
.talk-letters > [data-sec] { max-width: 720px; margin: 0 auto; }
.talk-letters > [data-sec] > * + * { margin-top: 12px; }
.talk-cal { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 268px; padding: 12px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); }
.talk-cal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.talk-cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.talk-cal-w { color: var(--faint); font-size: 11.5px; margin-bottom: 4px; }
.talk-cal-m { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
button.talk-cal-t { padding: 4px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font-weight: 600; font-size: 14px; }
button.talk-cal-t:hover { background: var(--accent-soft); }
.talk-cal .ibtn:disabled { opacity: .35; cursor: default; }
button.talk-cal-d { height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--ink); font-size: 13px; }
button.talk-cal-d:hover:not(:disabled) { background: var(--accent-soft); }
button.talk-cal-d:disabled { color: var(--faint); opacity: .45; cursor: default; }
button.talk-cal-d.is-today { font-weight: 700; }
button.talk-cal-d.on { background: var(--ink); color: var(--on-dark); }
@media (max-width: 720px) {
  .talk-letters { padding: 14px 16px 48px; }
}
/* 等你点头的信钉在对话上面：高了自己滚，不把对话挤没 */
.talk-approvals { flex: none; max-height: 42vh; overflow-y: auto; }
.talk-approvals > [data-sec] { max-width: 820px; margin: 0 auto; padding: 0 28px; }
.talk-approvals > [data-sec] > * { margin: 14px 0; }
