/* The message window has its own desktop/mobile geometry, separate from the main conversation. */
#am-open[hidden], #am-count[hidden], #am-dialog [hidden] { display:none !important; }
#am-open { position:absolute; top:12px; right:90px; z-index:60; display:grid; place-items:center; width:32px; height:32px; padding:0; border:0; border-radius:8px; color:var(--text-2); background:transparent; cursor:pointer; }
#am-open:hover { color:var(--text); background:var(--ap-hover,var(--surface)); }
#am-count,.am-unread { min-width:16px; height:16px; padding:0 4px; text-align:center; border-radius:12px; background:#df534f; color:white; font:600 10px/16px system-ui,sans-serif; font-variant-numeric:tabular-nums; }
#am-count { position:absolute; right:-2px; top:-2px; }
#am-dialog {
  --am-window:#fafbf8; --am-list:#fafbf9; --am-chat:#eff1ed; --am-card:#fff; --am-box:#ebeeea; --am-line:#dce1da;
  --am-selected:#e1e9de; --am-hover:#eaf0e8; --am-text:#202923; --am-sub:#637167; --am-quiet:#657166;
  --am-green:#156d42; --am-greenwash:#dceee0; --am-bubble:#b1e990; --am-bubble-ink:#193321;
  --am-rail:#303b35; --am-rail-text:#c3cec6; --am-rail-active:#71de94; --am-rail-selected:#3a4a3e;
  --am-alert:#8e5b21; --am-alert-bg:#f3eacb;
  margin:auto; padding:0; width:min(1160px,calc(100vw - 64px)); height:min(746px,calc(100dvh - 64px));
  max-width:none; max-height:none; border:0; border-radius:14px; overflow:hidden;
  color:var(--am-text); background:var(--am-window); box-shadow:0 20px 90px #10231b40;
  font:14px/1.55 system-ui,-apple-system,"Segoe UI","Microsoft YaHei UI","PingFang SC",sans-serif;
  text-align:start; letter-spacing:normal; color-scheme:light;
}
html[data-appearance-tone=dark] #am-dialog, body.private-active #am-dialog {
  --am-window:#202823; --am-list:#232b25; --am-chat:#1c231e; --am-card:#303a32; --am-box:#303931; --am-line:#3b453c;
  --am-selected:#354739; --am-hover:#2d3830; --am-text:#edf1ec; --am-sub:#b0bcb1; --am-quiet:#a0aea1;
  --am-green:#90daa4; --am-greenwash:#344d3a; --am-bubble:#84bd73; --am-bubble-ink:#142819;
  --am-rail:#171e19; --am-rail-text:#bbc6bc; --am-rail-active:#78dd92; --am-rail-selected:#2e3e32;
  --am-alert:#e2bb76; --am-alert-bg:#443d2b; color-scheme:dark;
}
#am-dialog::backdrop { background:#131e1738; }
#am-dialog[open] { display:flex; flex-direction:column; }
#am-dialog :where(button,input,textarea,select) { font:inherit; color:inherit; }
#am-dialog :where(button) { cursor:pointer; touch-action:manipulation; border:0; border-radius:6px; background:transparent; }
#am-dialog :where(button:disabled) { opacity:.53; cursor:default; }
#am-dialog :where(button:not(:disabled):hover) { background:var(--am-hover); }
#am-dialog :is(button,select,input,textarea,summary):focus-visible, #am-open:focus-visible { outline:2px solid var(--am-green,#286f4b); outline-offset:-2px; }
#am-dialog svg { display:block; width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; }
#am-dialog :is(h2,h3,h4,h5) { color:var(--am-text); }
.am-layout { position:relative; display:flex; flex:1; min-height:0; }
.am-rail { flex:0 0 65px; display:flex; flex-direction:column; align-items:center; padding:22px 0 14px; background:var(--am-rail); color:var(--am-rail-text); }
#am-me { width:37px; height:37px; margin-bottom:29px; }
.am-rail-tabs { display:flex; flex-direction:column; gap:9px; }
#am-dialog .am-rail button { width:49px; min-height:52px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; color:var(--am-rail-text); border-radius:9px; font-size:10px; }
#am-dialog .am-rail button svg { width:23px; height:23px; }
#am-dialog .am-rail button[aria-pressed=true] { background:var(--am-rail-selected); color:var(--am-rail-active); }
#am-dialog .am-rail button:hover { background:var(--am-rail-selected); color:#fcfffb; }
#am-dialog #am-close { position:absolute; top:16px; right:12px; z-index:5; display:grid; place-items:center; min-height:36px; width:36px; padding:0; border-radius:7px; color:var(--am-sub); }
#am-close svg { width:18px !important; height:18px !important; }
.am-sidebar { display:flex; flex-direction:column; flex:0 0 252px; min-width:0; background:var(--am-list); border-inline-end:1px solid var(--am-line); }
.am-list-head { height:67px; display:flex; align-items:center; gap:8px; padding:4px 20px 0; }
#am-heading { font-size:20px; font-weight:650; letter-spacing:-.35px; }
#am-tally { font-size:11px; color:var(--am-quiet); }
.am-list-tools { margin:0 14px 15px; display:flex; gap:7px; }
.am-search { flex:1; min-width:0; display:flex; align-items:center; gap:7px; padding:0 9px; height:31px; border-radius:6px; background:var(--am-box); color:var(--am-sub); }
#am-dialog .am-search svg { width:15px; height:15px; flex:none; }
#am-query { flex:1; min-width:0; width:100%; height:29px; padding:0; background:transparent; border:0; outline:0; font-size:12px; }
#am-query::placeholder,#am-body::placeholder { color:var(--am-quiet); opacity:.92; }
#am-query:focus-visible { outline:0; }
.am-search:focus-within { box-shadow:inset 0 0 0 1px var(--am-green); }
#am-new { width:31px; height:31px; display:grid; place-items:center; background:var(--am-box); color:var(--am-sub); }
#am-new svg { width:16px; height:16px; }
.am-list,#am-history,#am-task-scroll { overflow-y:auto; overscroll-behavior:contain; min-height:0; scrollbar-width:thin; scrollbar-color:var(--am-line) transparent; }
.am-list { flex:1; padding:0 5px 14px; }
#am-dialog .am-item { display:grid; grid-template-columns:41px minmax(0,1fr) auto; gap:10px; align-items:center; height:65px; margin:1px 0; padding:8px 9px; border:0; border-radius:7px; width:100%; color:var(--am-text); text-align:start; }
#am-dialog .am-item:hover { background:var(--am-hover); }
#am-dialog .am-item[aria-current=true] { background:var(--am-selected); }
.am-item-copy { min-width:0; display:flex; flex-direction:column; gap:3px; }
.am-item-copy strong,.am-item-copy small { display:block; min-width:0; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.am-item-copy strong { font-size:14px; font-weight:600; line-height:1.45; } .am-item-copy small { font-size:12px; color:var(--am-sub); }
.am-item.am-pinned { background:color-mix(in srgb,var(--am-box) 70%,var(--am-list)); }
.am-pin { display:inline-flex; align-items:center; gap:3px; color:var(--am-green); font-size:10px; font-weight:600; line-height:1.4; }
#am-dialog .am-pin svg { width:11px; height:11px; }
.am-trailing { display:flex; flex-direction:column; align-self:stretch; align-items:flex-end; justify-content:space-between; padding:4px 0; }
.am-trailing time { color:var(--am-quiet); font-size:10px; font-variant-numeric:tabular-nums; font-weight:400; }
.am-portrait { flex:none; position:relative; isolation:isolate; display:grid; place-items:center; overflow:visible; width:40px; height:40px; border-radius:7px; background:#e6ddcd; color:#604e35; font-weight:650; line-height:1; user-select:none; }
.am-portrait[data-tint="1"] { background:#dce6e6; color:#355564; }
.am-portrait[data-tint="2"] { background:#e6dee7; color:#5c4861; }
.am-portrait[data-tint="3"] { background:#dfe8d9; color:#466444; }
.am-portrait img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; border-radius:inherit; z-index:1; }
.am-initial { font-size:16px; text-transform:uppercase; }
.am-finance-face { color:#f5fff2; background:#568866; }
#am-dialog .am-finance-face svg { width:73%; height:73%; stroke-width:1.7; }
.am-sher-face { background:#426b59; color:#e8f5e8; }
.am-sher-mark { position:absolute; right:-2px; bottom:-2px; z-index:2; width:14px; height:14px; display:grid; place-items:center; border-radius:5px; background:#2d614e; color:white; border:1px solid var(--am-list); font:700 9px/1 system-ui; }
.am-account-face { width:37px; height:37px; }
.am-empty,.am-note,.am-time { font-size:12px; color:var(--am-sub); }
.am-empty,.am-note { padding:14px 10px; }.am-empty .am-action { margin-top:10px; }
#am-dialog .am-action,#am-more-ops { padding:5px 8px; color:var(--am-green); }
#am-dialog .am-task-choice { display:block; width:100%; padding:10px; text-align:start; }
.am-task-choice :is(strong,small) { display:block; overflow-wrap:anywhere; }
.am-task-choice small { margin-top:2px; color:var(--am-sub); }
.am-chat { flex:1; min-width:0; min-height:0; display:flex; flex-direction:column; position:relative; background:var(--am-chat); }
.am-no-selection { margin:auto; text-align:center; color:var(--am-sub); display:grid; justify-items:center; gap:8px; }
#am-dialog .am-no-selection > svg { width:53px; height:53px; margin-bottom:8px; color:var(--am-quiet); opacity:.65; stroke-width:1.5; }
.am-no-selection strong { font-weight:550; font-size:16px; }
#am-dialog #am-find { font-size:13px; color:var(--am-green); padding:5px 10px; }
.am-chat-head { display:flex; align-items:center; gap:12px; padding:14px 59px 14px 21px; min-height:73px; border-bottom:1px solid var(--am-line); background:var(--am-window); flex:none; }
#am-dialog[data-view=task] .am-chat-head { padding-right:17px; }
.am-topic { min-width:0; flex:1; }
#am-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:17px; font-weight:620; line-height:1.45; }
.am-subtitle { display:flex; align-items:center; flex-wrap:wrap; gap:4px 9px; margin-top:2px; }
#am-context { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; color:var(--am-sub); }
#am-task-status { display:inline-flex; align-items:center; gap:4px; color:var(--am-green); font-size:11px; }
#am-task-status::before,.am-state::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; flex:none; }
#am-task-status:is([data-state=waiting_info],[data-state=waiting_reply],[data-state=failed]) { color:var(--am-alert); }
#am-dialog #am-task-open { display:inline-flex; align-items:center; justify-content:center; min-height:32px; padding:4px 7px; gap:4px; color:var(--am-sub); font-size:12px; }
#am-task-open svg { width:19px; height:19px; } #am-task-open[aria-expanded=true] { background:var(--am-box); }
#am-dialog #am-back { display:none; }
#am-history { flex:1; padding:14px clamp(18px,2vw,29px) 12px; }
#am-dialog #am-older { display:block; margin:0 auto 10px; padding:5px 12px; font-size:12px; color:var(--am-green); }
.am-date-break,.am-context-break { display:block; text-align:center; color:var(--am-quiet); font-size:11px; line-height:19px; margin:4px 0 18px; overflow-wrap:anywhere; }
.am-context-break { margin:12px 0 15px; font-size:12px; font-weight:550; }
.am-message { position:relative; display:flex; flex-direction:column; align-items:flex-start; min-height:43px; padding-inline-start:48px; margin:0 0 15px; }
.am-message.am-own { align-items:flex-end; padding-inline:0 48px; }
.am-face { position:absolute; left:0; top:1px; width:35px; height:35px; border-radius:6px; }
.am-own .am-face { left:auto; right:0; }
.am-sender { margin-bottom:3px; font-size:12px; font-weight:500; color:var(--am-sub); line-height:17px; }
.am-bubble { position:relative; background:var(--am-card); color:var(--am-text); padding:9px 12px; font-size:15px; line-height:1.62; max-width:min(85%,480px); border-radius:6px; overflow-wrap:anywhere; white-space:pre-wrap; }
.am-bubble::before { content:""; position:absolute; top:12px; left:-4px; width:9px; height:9px; transform:rotate(45deg); border-radius:1px; background:inherit; }
.am-own .am-bubble { background:var(--am-bubble); color:var(--am-bubble-ink); }
.am-own .am-bubble::before { left:auto; right:-4px; }
.am-bubble.am-markdown { white-space:normal; min-width:0; line-height:1.7; }
.am-bubble.am-has-table { max-width:min(95%,640px); }
.am-markdown > :first-child { margin-top:0; }
.am-markdown > :last-child { margin-bottom:0; }
.am-markdown :is(p,ul,ol,blockquote,pre) { margin:0 0 .8em; }
.am-markdown :is(h3,h4,h5,h6) { margin:1.2em 0 .4em; line-height:1.45; font-size:1em; font-weight:650; }
.am-markdown :is(ul,ol) { padding-inline-start:1.5em; }
.am-markdown li + li { margin-top:.25em; }
.am-markdown li > :last-child { margin-bottom:0; }
.am-markdown blockquote { padding-inline-start:.7em; border-inline-start:2px solid var(--am-green); }
.am-markdown pre,.am-md-table { overflow-x:auto; max-width:100%; scrollbar-width:thin; scrollbar-color:var(--am-sub) transparent; }
.am-md-table { margin:.7em 0 1em; overscroll-behavior-x:contain; overflow-wrap:normal; word-break:normal; }
.am-md-table:focus-visible { outline:2px solid var(--am-green); outline-offset:2px; }
.am-markdown pre { white-space:pre; padding:6px 8px; }
.am-markdown code { font-size:.92em; background:var(--am-greenwash); border-radius:3px; padding:0 2px; }
.am-markdown table { border-collapse:collapse; min-width:100%; font-size:14px; line-height:1.55; font-variant-numeric:tabular-nums; }
.am-markdown :is(th,td) { text-align:start; vertical-align:top; border:1px solid var(--am-line); padding:8px 10px; min-width:7em; }
.am-markdown table:has(th:nth-child(3)) { min-width:max(100%,480px); }
.am-markdown th { background:var(--am-box); font-weight:600; }
.am-markdown a { color:var(--am-green); text-decoration:underline; text-underline-offset:3px; }
.am-reply-reference { display:flex; flex-direction:column; gap:2px; max-width:min(85%,480px); min-width:0; margin:2px 0 7px; padding:7px 10px; border-radius:5px; background:var(--am-box); color:var(--am-sub); font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.am-reply-label { font-weight:600; }
.am-reply-excerpt { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.am-message-foot { color:var(--am-sub); font-size:11px; min-height:16px; display:flex; align-items:center; gap:7px; margin-top:2px; }
#am-dialog .am-quote { font-size:11px; padding:0 3px; color:var(--am-sub); }
@media(hover:hover) and (pointer:fine) {
  #am-dialog .am-quote { opacity:0; }
  #am-dialog .am-message:hover .am-quote,#am-dialog .am-message:focus-within .am-quote { opacity:1; }
}
#am-dialog #am-latest { position:absolute; right:14px; bottom:105px; z-index:1; font-size:12px; padding:5px 11px; color:var(--am-green); background:var(--am-card); box-shadow:0 2px 8px #17241a19; }
#am-form { flex:none; padding:13px 20px 12px; background:var(--am-window); border-top:1px solid var(--am-line); }
#am-body { display:block; width:100%; min-height:47px; resize:none; padding:0 1px; background:transparent; color:var(--am-text); border:0; font-size:14px; outline:none; }
#am-body:focus-visible { outline:0; }
.am-send-row { display:flex; align-items:center; gap:10px; min-height:30px; }
#am-feedback { flex:1; font-size:12px; color:var(--am-sub); }
.am-key-hint { font-size:10px; color:var(--am-quiet); }
#am-dialog #am-send { border-radius:6px; padding:5px 17px; min-height:30px; color:#fff; background:#29804a; font-weight:600; font-size:13px; }
#am-dialog #am-send:hover:not(:disabled) { background:#1c6e3c; }
#am-dialog #am-send:disabled { background:var(--am-box); color:var(--am-quiet); opacity:1; }
#am-citation,#am-readonly { display:flex; align-items:center; gap:9px; color:var(--am-sub); font-size:12px; }
#am-citation { margin-bottom:6px; border-radius:5px; padding:4px 8px; background:var(--am-box); }
#am-citation span { flex:1; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
#am-citation .am-citation-copy { display:flex; flex-direction:column; gap:2px; padding:3px 0; }
#am-citation .am-citation-label { overflow:hidden; text-overflow:ellipsis; font-weight:600; }
#am-citation .am-citation-excerpt { display:block; line-height:1.5; }
#am-clear-citation,#am-to-sher { flex:none; color:var(--am-green); font-size:12px; padding:4px; }
#am-readonly { padding:13px 16px; justify-content:space-between; background:var(--am-window); border-top:1px solid var(--am-line); }
#am-task { width:245px; min-width:0; flex:none; display:flex; flex-direction:column; border-left:1px solid var(--am-line); background:var(--am-window); }
#am-task header { display:flex; align-items:center; gap:5px; padding-right:36px; margin:0 17px; min-height:63px; border-bottom:1px solid var(--am-line); }
#am-task-heading { font-size:15px; font-weight:620; }
#am-task-close { display:grid; place-items:center; width:30px; height:30px; color:var(--am-sub); }
#am-task-close svg { width:16px; height:16px; }
#am-task-scroll { flex:1; min-height:0; }
#am-task-content { padding:15px 17px 0; overflow-wrap:anywhere; }
#am-task-content h4 { font-size:16px; font-weight:610; line-height:1.5; }
#am-task-content .am-state { display:inline-flex; align-items:center; gap:5px; margin:7px 0 2px; color:var(--am-green); font-size:12px; }
#am-task-content p { margin:8px 0; font-size:13px; line-height:1.65; white-space:pre-wrap; }
#am-task-content h5 { margin:19px 0 7px; font-size:12px; font-weight:600; color:var(--am-sub); }
#am-task-content ol,#am-ops-list { list-style:none; }
#am-task-content li { padding:6px 0; font-size:13px; white-space:pre-wrap; }
#am-task-content li time,#am-ops-list small { display:block; font-size:11px; color:var(--am-quiet); margin-bottom:3px; }
#am-operations { margin:15px 17px 20px; padding-top:9px; border-top:1px solid var(--am-line); font-size:12px; }
#am-operations summary { cursor:pointer; padding:6px 0; font-weight:600; color:var(--am-green); }
#am-ops-controls label { display:block; margin:8px 0 4px; color:var(--am-sub); }
#am-run { max-width:100%; padding:4px; color:var(--am-text); background:var(--am-card); border:1px solid var(--am-line); border-radius:5px; }
#am-ops-summary { margin:7px 0; color:var(--am-sub); } #am-ops-list li { padding:7px 0; border-bottom:1px solid var(--am-line); overflow-wrap:anywhere; }
#am-error { display:flex; align-items:center; gap:12px; justify-content:space-between; padding:6px 14px; font-size:13px; color:var(--am-alert); background:var(--am-alert-bg); }
#am-retry { padding:5px 10px; color:inherit; font-weight:600; }
#am-notice[hidden] { display:none !important; }
#am-notice { position:fixed; z-index:3000; right:15px; top:55px; display:flex; align-items:center; gap:10px; max-width:calc(100vw - 24px);
  padding:10px 10px 10px 14px; color:var(--am-text,var(--text)); background:var(--am-card,var(--ap-panel,#fff)); border:1px solid var(--am-line,var(--border)); border-radius:10px; box-shadow:0 5px 23px #15281b24; font:13px/1.5 system-ui,"Microsoft YaHei UI",sans-serif; }
#am-dialog #am-notice { position:absolute; top:59px; z-index:6; }
body.private-active > #am-notice { --am-card:#303a32; --am-text:#edf1ec; --am-sub:#b0bcb1; --am-line:#3b453c; --am-green:#90daa4; --am-greenwash:#344d3a; }
.am-notice-text { min-width:0; display:grid; }
.am-notice-text strong { font-size:13px; } #am-notice-from { max-width:210px; color:var(--am-sub,var(--text-2)); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:12px; }
#am-notice button { border:0; border-radius:6px; cursor:pointer; min-height:30px; font:inherit; }
#am-notice-view { padding:2px 10px; color:var(--am-green,#21623a); background:var(--am-greenwash,#e4f0e6); }
#am-notice-dismiss { padding:2px 5px; color:var(--am-sub,var(--text-2)); background:transparent; }
@media(max-width:1000px) { .am-sidebar { flex-basis:220px; } #am-task { width:215px; } }
@media(min-width:641px) and (max-width:880px) { #am-dialog[data-view=task] .am-sidebar { display:none; } }
@media(max-width:640px) {
  #am-dialog { width:100%; height:100dvh; max-width:100%; border-radius:0; box-shadow:none; }
  .am-rail { display:contents; } #am-me { display:none; }
  .am-rail-tabs { display:none; }
  #am-dialog[data-view=list] .am-rail-tabs { display:flex; position:absolute; z-index:2; bottom:0; width:100%; flex-direction:row; justify-content:center; gap:0; padding:4px 0 max(5px,env(safe-area-inset-bottom)); background:var(--am-window); border-top:1px solid var(--am-line); }
  #am-dialog .am-rail-tabs button { flex:1; height:44px; min-height:44px; width:auto; border-radius:0; color:var(--am-sub); }
  #am-dialog .am-rail-tabs button[aria-pressed=true] { color:var(--am-green); background:transparent; }
  #am-dialog .am-rail-tabs button svg { width:22px; height:22px; }
  #am-dialog #am-close { position:absolute; right:8px; top:10px; z-index:2; width:32px; min-height:32px; margin:0; color:var(--am-sub); background:transparent; }
  #am-dialog[data-view=task] #am-close { display:grid; }
  #am-dialog .am-layout > :where(.am-sidebar,.am-chat,#am-task) { display:none; width:100%; flex:1; border:0; }
  #am-dialog[data-view=list] .am-sidebar { display:flex; padding-bottom:calc(55px + env(safe-area-inset-bottom)); }
  #am-dialog[data-view=chat] .am-chat,#am-dialog[data-view=task] #am-task { display:flex; }
  .am-list-head { padding:0 18px; height:57px; }
  .am-list-tools { margin:1px 13px 10px; } .am-search,#am-new { height:34px; }
  #am-query { font-size:16px; } .am-list { padding:0 6px; }
  #am-dialog .am-item { height:65px; padding-inline:12px; } .am-item-copy strong { font-size:15px; } .am-trailing time { font-size:11px; }
  .am-chat-head { position:relative; justify-content:center; min-height:58px; padding:6px 69px; }
  .am-topic { text-align:center; } .am-subtitle { justify-content:center; }
  #am-dialog #am-back { position:absolute; left:5px; top:9px; display:grid; place-items:center; width:32px; min-width:32px; height:38px; color:var(--am-text); }
  #am-title { font-size:16px; } #am-context { font-size:11px; } #am-task-status { font-size:10px; }
  #am-dialog #am-task-open { position:absolute; right:40px; top:10px; padding:4px; min-width:28px; min-height:36px; } #am-task-open span { display:none; }
  #am-history { padding:12px 13px 5px; } .am-message { padding-inline-start:45px; margin-bottom:12px; } .am-message.am-own { padding-inline:0 45px; }
  .am-face { width:34px; height:34px; } .am-sender { font-size:11px; margin-bottom:3px; }
  .am-bubble { max-width:calc(100% - 26px); font-size:15px; padding:7px 10px; }
  .am-bubble.am-has-table { max-width:calc(100% - 10px); }
  .am-reply-reference { max-width:calc(100% - 26px); }
  #am-form { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:5px 8px; padding:8px 10px max(8px,env(safe-area-inset-bottom)); background:var(--am-list); }
  #am-citation { grid-column:1/-1; margin:0; }
  #am-body { min-height:38px; height:38px; max-height:100px; border-radius:6px; background:var(--am-card); font-size:16px; line-height:22px; padding:8px 10px; }
  .am-send-row { display:contents; } .am-key-hint { display:none; }
  #am-feedback { grid-column:1/-1; grid-row:2; font-size:11px; } #am-feedback:empty { display:none; }
  #am-dialog #am-send { align-self:end; grid-column:2; grid-row:1; min-height:38px; padding-inline:12px; }
  #am-form:has(#am-citation:not([hidden])) #am-send { grid-row:2; }
  #am-form:has(#am-citation:not([hidden])) #am-feedback { grid-row:3; }
  #am-dialog #am-latest { bottom:65px; }
  #am-task header { min-height:54px; } #am-task-content { padding-inline:19px; } #am-operations { margin-inline:19px; }
  #am-error { z-index:4; }
}
@media(max-width:400px) { #main #private-banner { left:calc(50% - 18px) !important; } }


/* Conversation actions share the same palette as the list and chat. */
#am-dialog .am-row-menu {
  position:fixed; z-index:12; display:grid; gap:1px; box-sizing:border-box;
  width:max-content; min-width:170px; max-width:calc(100vw - 16px); max-height:calc(100% - 18px);
  overflow-y:auto; padding:5px; border:1px solid var(--am-line); border-radius:9px;
  background:var(--am-card); color:var(--am-text); box-shadow:0 5px 20px #10231b24;
}
#am-dialog .am-row-menu button {
  min-height:34px; padding:5px 11px; border-radius:6px; text-align:start; font-size:14px;
}
#am-dialog .am-menu-rule { height:1px; margin:4px 8px; background:var(--am-line); }
#am-dialog .am-destructive { color:#bc3439; }
html[data-appearance-tone=dark] #am-dialog .am-row-menu .am-destructive, body.private-active #am-dialog .am-row-menu .am-destructive { color:#ffa1a3; }
#am-dialog .am-row-menu button:hover,#am-dialog .am-row-menu button:focus-visible { color:white; background:#087441; outline:0; }
#am-dialog .am-row-menu .am-destructive:hover,#am-dialog .am-row-menu .am-destructive:focus-visible { color:white; background:#aa2e35; }
#am-dialog .am-item[aria-haspopup=menu] { -webkit-touch-callout:none; -webkit-tap-highlight-color:transparent; user-select:none; }
#am-dialog .am-unread-dot { width:8px; height:8px; border-radius:50%; background:#ba4446; }
#am-dialog .am-muted-icon { width:13px; height:13px; color:var(--am-sub); }
#am-dialog .am-fold-entry { width:100%; min-height:45px; padding:9px 13px; display:flex; align-items:center; gap:11px; text-align:start; }
.am-fold-entry svg { color:var(--am-sub); }
.am-fold-entry small { margin-inline-start:auto; font-size:11px; color:var(--am-sub); }
#am-dialog .am-confirm {
  width:min(332px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); overflow:auto;
  box-sizing:border-box; margin:auto; padding:22px; border:0; border-radius:13px;
  color:var(--am-text); background:var(--am-window); font:inherit; box-shadow:0 10px 40px #10231b30;
}
.am-confirm::backdrop { background:#15221965; }
.am-confirm h3 { margin:0 0 9px; font-size:17px; overflow-wrap:anywhere; }
.am-confirm p { margin:0; line-height:1.65; }
.am-confirm-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; }
#am-dialog .am-confirm-actions button { min-width:62px; min-height:38px; padding:6px 15px; background:var(--am-box); }
#am-dialog .am-confirm-actions .am-destructive { color:white; background:#a82e35; }
#am-dialog[data-standalone=true] { width:100%; height:100dvh; max-width:none; max-height:none; margin:0; border-radius:0; }
#am-dialog[data-standalone=true] :is(.am-rail,.am-sidebar,#am-back,#am-find) { display:none; }
#am-dialog[data-standalone=true][data-view=list] .am-chat { display:flex; }
#am-form { display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:6px 9px; }
#am-form #am-citation,#am-file-queue,#am-form .am-send-row {grid-column:1/-1;}
#am-form .am-send-row {display:flex;align-items:center;}
#am-dialog #am-attach {width:34px;height:34px;padding:6px;color:var(--am-sub);border-radius:6px;}
#am-attach svg {width:22px;height:22px;display:block;}
#am-file-queue {display:flex;flex-wrap:wrap;gap:6px;}
.am-file-chip {display:flex;align-items:center;gap:8px;min-width:0;}
.am-file-chip {max-width:100%;padding:4px 7px;border:1px solid var(--am-line);border-radius:6px;}
.am-file-chip small {color:var(--am-sub);white-space:nowrap;font-size:11px;}
.am-file-chip button {color:var(--am-green);font-size:12px;}
.am-file-name {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;}
.am-file-card {width:288px;max-width:calc(100% - 14px);margin-top:7px;border:1px solid var(--am-line);border-radius:8px;background:var(--am-card);color:var(--am-text);overflow:hidden;}
#am-dialog .am-file-main {display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:7px 15px;width:100%;padding:14px 15px 10px;text-align:start;border-radius:0;color:var(--am-text);}
#am-dialog .am-file-main:disabled {opacity:1;cursor:progress;}
#am-dialog .am-file-main:disabled .am-file-action {color:var(--am-sub);}
.am-file-copy {min-width:0;align-self:center;}
.am-file-title {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;font-size:14px;font-weight:550;line-height:1.5;}
.am-file-meta {display:block;margin-top:7px;color:var(--am-sub);font-size:11px;line-height:1.5;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;}
.am-file-icon {position:relative;display:grid;place-items:center;width:44px;height:52px;align-self:start;color:#176b43;}
#am-dialog .am-file-icon svg {width:44px;height:52px;stroke-width:1.5;}
.am-file-icon > span {position:absolute;inset:23px 0 auto;text-align:center;font-size:10px;font-weight:700;line-height:15px;}
.am-file-card[data-kind=word] .am-file-icon {color:#285fa2;}
.am-file-card[data-kind=slides] .am-file-icon {color:#b05021;}
.am-file-card[data-kind=pdf] .am-file-icon {color:#b44343;}
.am-file-card[data-kind=archive] .am-file-icon {color:#856224;}
.am-file-card:is([data-kind=text],[data-kind=file],[data-kind=image]) .am-file-icon {color:var(--am-sub);}
.am-file-action {grid-column:1/-1;justify-self:end;color:var(--am-green);font-size:12px;line-height:18px;}
.am-file-details {border-top:1px solid var(--am-line);font-size:11px;color:var(--am-sub);}
.am-file-details summary {padding:6px 15px;min-height:30px;cursor:pointer;user-select:none;}
.am-file-details summary:hover {background:var(--am-hover);}
.am-file-full-name {margin:0;padding:3px 15px 12px;overflow-wrap:anywhere;font-size:12px;line-height:1.6;user-select:text;color:var(--am-text);}
.am-file-status {margin:0;padding:0 15px 10px;color:var(--am-alert);font-size:12px;line-height:1.5;overflow-wrap:anywhere;}
#am-dialog .am-picture {position:relative;display:grid;place-items:center;width:100%;height:180px;min-width:0;padding:0;border-radius:0;border-bottom:1px solid var(--am-line);background:var(--am-box);color:var(--am-sub);overflow:hidden;}
#am-dialog .am-picture:disabled {opacity:1;}
.am-picture img {display:block;width:100%;height:180px;object-fit:contain;}
.am-picture-placeholder {display:grid;justify-items:center;gap:10px;padding:18px;font-size:12px;line-height:1.5;}
#am-dialog .am-picture-placeholder svg {width:28px;height:28px;}
.am-picture[data-state=ready] .am-picture-placeholder {display:none;}
.am-picture:not([data-state=ready]) img {display:none;}
html[data-appearance-tone=dark] .am-file-card[data-kind=excel] .am-file-icon,body.private-active .am-file-card[data-kind=excel] .am-file-icon {color:#90daa4;}
html[data-appearance-tone=dark] .am-file-card[data-kind=word] .am-file-icon,body.private-active .am-file-card[data-kind=word] .am-file-icon {color:#9bbfec;}
html[data-appearance-tone=dark] .am-file-card[data-kind=slides] .am-file-icon,body.private-active .am-file-card[data-kind=slides] .am-file-icon {color:#f0b281;}
html[data-appearance-tone=dark] .am-file-card[data-kind=pdf] .am-file-icon,body.private-active .am-file-card[data-kind=pdf] .am-file-icon {color:#f3a5a5;}
html[data-appearance-tone=dark] .am-file-card[data-kind=archive] .am-file-icon,body.private-active .am-file-card[data-kind=archive] .am-file-icon {color:#dfc18a;}
.am-image-dialog {position:fixed;max-width:92vw;max-height:90dvh;padding:12px;border-radius:8px;border:0;background:var(--am-card);color:var(--am-text);}
.am-image-dialog img {display:block;max-width:84vw;max-height:72dvh;object-fit:contain;}
.am-image-dialog::backdrop {background:rgba(0,0,0,.58);}
.am-image-dialog p {margin:5px 0 0;font-size:12px;overflow-wrap:anywhere;}
#am-dialog .am-bubble:empty {display:none;}
@media(max-width:640px) {
  #am-dialog #am-form {display:grid;grid-template-columns:34px minmax(0,1fr);gap:4px 6px;}
  #am-form .am-send-row {display:flex;justify-content:flex-end;width:100%;}
  #am-dialog #am-form #am-feedback {margin-inline-end:auto;}
  #am-dialog #am-form #am-send {min-height:32px;}
  .am-file-card {max-width:calc(100% - 14px);}
}
@media (pointer:coarse) {
  #am-dialog .am-row-menu button { min-height:42px; }
  .am-file-details summary { min-height:40px; padding-block:10px; }
}
@media(max-width:640px) {
  #am-dialog[data-standalone=true] .am-chat { padding-bottom:env(safe-area-inset-bottom); }
}

.am-audience {
  margin: 0;
  padding: 8px 20px;
  background: var(--am-list, #f4f6f3);
  color: var(--am-muted, #556057);
  font-size: 13px;
  line-height: 1.5;
}
#am-visits-open, #am-archive-open {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--am-accent, #356653);
  cursor: pointer;
  white-space: nowrap;
  padding: 8px;
}
