:root {
  color-scheme: light;
  --bg: #f5f7f6;
  --surface: #fff;
  --ink: #17212c;
  --muted: #566574;
  --line: #e4e9e7;
  --green: #087c70;
  --green-dark: #06695f;
  --green-light: #def3ea;
  --green-ink: #076d60;
  --amber: #936b20;
  --radius: 20px;
  --reading-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --reading-size: 15px;
  --reading-line-height: 1.75;
  --reading-paragraph-gap: .8em;
  --reading-message-gap: 20px;
  --reading-width: 90%;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  background: var(--bg);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); overflow-wrap: anywhere; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .47; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #78bcae; outline-offset: 3px; }
button { border: 0; }
h1, h2, h3, p { margin: 0; }
.icon { width: 23px; height: 23px; flex: 0 0 auto; vertical-align: middle; }
.app-shell { width: 100%; max-width: 600px; min-height: 100dvh; margin: 0 auto; background: var(--bg); }
.topbar { min-height: 78px; padding: calc(22px + env(safe-area-inset-top)) 22px 19px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.wordmark { font-size: 23px; letter-spacing: -.8px; font-weight: 750; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.connection { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 550; white-space: nowrap; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #a4adb6; }
.connection.online .status-dot { background: #12ac69; }
.connection.offline { color: var(--muted); }
.icon-button { display: grid; place-items: center; min-width: 34px; min-height: 36px; color: #7c8892; }
.icon-button .icon { width: 20px; height: 20px; }
.main-page { padding: 10px 20px calc(107px + env(safe-area-inset-bottom)); }
.page-heading { margin-bottom: 24px; }
.page-heading h1 { font-size: 32px; line-height: 1.3; letter-spacing: -1.2px; font-weight: 750; display: flex; align-items: center; gap: 12px; }
.page-heading p { color: var(--muted); line-height: 1.6; margin-top: 6px; font-size: 15px; }
.heading-count { background: #e5e9e9; font-size: 17px; font-weight: 600; border-radius: 18px; padding: 3px 13px; letter-spacing: 0; }
.project-filters { display: flex; overflow-x: auto; gap: 8px; margin: 0 -20px 19px; padding: 0 20px 4px; scrollbar-width: none; }
.project-filters::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; max-width: 180px; min-height: 44px; padding: 8px 17px; border-radius: 24px; border: 1px solid #dce3e0; color: #687583; background: transparent; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.active { color: white; border-color: var(--green); background: var(--green); font-weight: 600; }
.attention-filters { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 12px; }
.attention-filters .chip { min-height: 44px; padding: 8px 13px; }
.attention-filters .chip span { margin-left: 4px; font-variant-numeric: tabular-nums; }
.attention-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.attention-card .issue-card { border: 0; border-radius: 0; }
.assistant-overview { padding: 18px; margin-bottom: 18px; border: 1px solid #cfe3db; border-radius: var(--radius); background: #eaf5ef; }
.assistant-overview-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.assistant-overview-heading h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; line-height: 1.5; color: var(--green-ink); }
.assistant-overview-heading .icon, .attention-assistant-label .icon { width: 18px; height: 18px; }
.assistant-overview-heading .badge { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.assistant-summary { font-size: 15px; line-height: 1.7; }
.assistant-next { display: grid; gap: 5px; margin-top: 12px; font-size: 14px; line-height: 1.65; color: #405d53; }
.assistant-next strong { font-weight: 650; }
.assistant-reason { color: #56685e; font-size: 13px; line-height: 1.6; margin-top: 9px; }
.assistant-overview-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 12px; }
.assistant-overview-footer > span { color: #617467; font-size: 12px; line-height: 1.5; }
.assistant-overview-footer .text-button, .assistant-overview-footer .text-link { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.assistant-overview-footer .icon { width: 17px; height: 17px; }
.attention-assistant { margin: 0 16px 16px; padding: 14px; border: 1px solid #dae7e0; border-radius: 13px; background: #f4f8f5; }
.attention-assistant-label { display: flex; align-items: center; gap: 6px; color: var(--green-ink); font-size: 13px; font-weight: 650; margin-bottom: 8px; }
.assistant-facts, .assistant-decision { font-size: 14px; line-height: 1.65; color: #53635d; }
.assistant-decision { color: var(--ink); margin-top: 5px; }
.assistant-reply-preview { white-space: pre-wrap; margin-top: 10px; padding: 10px; background: var(--surface); border-radius: 9px; font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.attention-assistant .secondary-button { min-height: 44px; font-size: 14px; margin-top: 12px; padding: 10px 12px; }
.assistant-confirm-note { margin-top: 8px; font-size: 12px; color: #5e7166; line-height: 1.55; }
.text-button.dismiss-attention { display: flex; align-items: center; justify-content: flex-end; gap: 6px; width: 100%; min-height: 44px; padding: 8px 17px; border-top: 1px solid var(--line); color: var(--muted); }
.dismiss-attention .icon { width: 15px; height: 15px; }
.dismiss-attention:focus-visible, .dismiss-detail:focus-visible { outline: 2px solid var(--green); outline-offset: -3px; }
.dismiss-dialog { width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: 0 18px 64px #17212c30; }
.dismiss-dialog::backdrop { background: #17212c80; }
.dismiss-dialog h2 { font-size: 21px; line-height: 1.4; }
.dismiss-dialog-chat { margin: 12px 0 8px; font-size: 15px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
#dismiss-dialog-description { color: #586574; font-size: 15px; line-height: 1.7; }
.dismiss-dialog-actions { display: flex; gap: 12px; margin-top: 24px; }
.dismiss-dialog-actions > button { flex: 1; min-width: 0; min-height: 48px; }
.issue-actions { display: flex; align-items: center; gap: 12px; }
.text-button.dismiss-detail { min-height: 44px; padding: 8px; }
.result-seen-sentinel { display: block; height: 1px; width: 100%; }
.result-composer { display: flex; gap: 10px; align-items: center; }
.result-composer > * { flex: 1; min-height: 44px; text-align: center; }
.issue-list, .thread-list { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 13px; }
.global-overview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:0 0 18px; }
.global-overview > div { display:flex; flex-direction:column; gap:6px; padding:14px 8px; border:1px solid var(--line); border-radius:14px; background:var(--surface); text-align:center; }
.global-overview strong { font-size:26px; line-height:1.2; font-variant-numeric:tabular-nums; }
.global-overview span { font-size:12px; line-height:1.5; color:var(--muted); }
.request-count { margin-top:9px; color:var(--muted); font-size:13px; line-height:1.6; }
.grouped-requests { margin:0 16px 12px; padding:0; border-top:1px solid var(--line); }
.grouped-requests summary, .change-events summary, .previous-changes summary { cursor:pointer; min-height:44px; padding:12px 0; color:var(--green); font-size:14px; line-height:1.5; }
.grouped-requests a, .change-event { position:relative; display:grid; padding:12px 28px 12px 0; gap:5px; min-height:44px; border-top:1px solid var(--line); }
.grouped-requests a > span, .change-event > span { font-size:14px; line-height:1.6; }
.grouped-requests small, .change-event small { color:var(--muted); font-size:12px; line-height:1.5; }
.grouped-requests .icon, .change-event .icon { position:absolute; right:0; top:16px; width:18px; height:18px; }
.changes-overview { padding:18px; margin:0 0 18px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); }
.changes-overview h2 { font-size:17px; line-height:1.4; margin-bottom:10px; }
.changes-window > p { font-size:14px; line-height:1.7; }
.changes-window .change-range { font-size:12px; color:var(--muted); margin-bottom:6px; }
.changes-window .secondary-button { min-height:44px; margin-top:10px; }
.changes-overview > .fine-print { margin-top:10px; }
.previous-changes { margin-top:10px; border-top:1px solid var(--line); }
.detail-status-line { color:var(--muted); font-size:12px; line-height:1.7; margin:-10px 0 18px; }
.context-changes { display:grid; gap:16px; margin-bottom:14px; }
.context-changes article { padding:14px; border-radius:12px; background:var(--surface); border:1px solid var(--line); }
.context-changes article > strong { display:block; font-size:13px; margin-bottom:8px; }
.snooze-presets { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:16px 0; }
.snooze-dialog .field-label { margin-top:12px; }
.snooze-dialog input { max-width:100%; min-width:0; }
.toast-undo { color:#fff; padding:8px 12px; margin-left:10px; min-height:44px; font-size:14px; background:transparent; text-decoration:underline; }
.issue-card { display: block; min-width: 0; width: 100%; padding: 18px 17px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: background .15s, transform .15s; }
.issue-card:active { background: #f0f7f4; transform: scale(.99); }
.card-meta { display: flex; gap: 10px; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; margin-bottom: 13px; }
.card-meta > span { display: flex; flex: 1; align-items: center; gap: 7px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta .icon { width: 18px; height: 18px; }
.card-meta time { white-space: nowrap; flex: 0 0 auto; }
.issue-card h2 { font-size: 17px; font-weight: 600; line-height: 1.65; letter-spacing: -.15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 15px; }
.card-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.card-bottom > .icon { width: 18px; height: 18px; color: #788694; }
.badge { border-radius: 7px; padding: 5px 10px; font-size: 12px; font-weight: 600; display: inline-block; }
.badge.green { background: var(--green-light); color: var(--green-ink); }
.badge.muted { background: #eef1f3; color: #64707e; }
.badge.amber { background: #fff1d6; color: var(--amber); }
.badge.running { display: inline-flex; align-items: center; gap: 6px; background: var(--green-light); color: var(--green-ink); white-space: nowrap; }
.badge.running::before { content: ''; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.snoozed { opacity: .72; }
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 600px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); background: rgba(255, 255, 255, .97); padding: 11px 18px calc(11px + env(safe-area-inset-bottom)); z-index: 10; backdrop-filter: blur(16px); }
.nav-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 44px; color: #7b8594; font-size: 12px; font-weight: 550; }
.nav-item.selected { color: var(--green); }
.nav-item .icon { width: 23px; height: 23px; }
.nav-badge { position: absolute; top: -4px; left: calc(50% + 5px); background: var(--green); color: white; border: 2px solid white; min-width: 19px; height: 19px; border-radius: 20px; display: grid; place-items: center; font-size: 10px; padding: 0 4px; }
.status-banner { border-radius: 14px; padding: 13px 15px; margin: 0 0 19px; line-height: 1.6; font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; }
.status-banner small { width: 100%; font-size: 12px; opacity: .8; }
.status-banner.warning { background: #fff3da; color: #785b25; }
.status-banner.neutral { background: #edf1ef; color: #61736b; }
.status-banner .text-button { font-size: 13px; padding: 2px 0; }
.text-button { background: none; color: var(--green); min-height: 32px; padding: 5px 0; font-size: 14px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--green); font-size: 14px; font-weight: 600; min-height: 36px; }
.text-link .icon { width: 17px; height: 17px; }
.snooze-toggle { display: block; margin: 20px auto 0; color: var(--muted); }
.sync-caption { text-align: center; color: #919a9f; font-size: 11px; margin: 22px 0 3px; }
.empty-state { padding: 55px 17px; text-align: center; color: var(--muted); }
.empty-state > .icon { width: 40px; height: 40px; color: #7bb0a4; margin-bottom: 16px; }
.empty-state h2 { font-size: 17px; color: var(--ink); margin-bottom: 8px; }
.empty-state p { line-height: 1.7; font-size: 14px; }
.empty-state .text-link { margin-top: 18px; }
.detail-topbar { padding: calc(19px + env(safe-area-inset-top)) 18px 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 5; background: rgba(245, 247, 246, .96); backdrop-filter: blur(15px); }
.back-link { display: flex; gap: 4px; align-items: center; color: var(--green); font-size: 15px; min-height: 32px; font-weight: 550; }
.back-link .icon { width: 22px; height: 22px; }
.detail-page { padding: 5px 18px calc(252px + env(safe-area-inset-bottom)); }
.detail-heading { margin: 5px 0 21px; }
.detail-heading h1 { font-size: 28px; letter-spacing: -.8px; line-height: 1.4; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.detail-heading p { margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.question-card, .suggestion-card, .approval-card { padding: 18px; border-radius: 18px; margin-bottom: 17px; border: 1px solid var(--line); background: white; }
.question-card h2, .suggestion-card h2, .approval-card h2 { font-size: 14px; font-weight: 650; margin-bottom: 12px; }
.question-card > .prose { font-size: calc(var(--reading-size) + 2px); font-weight: 550; }
.question-card .text-link { margin-top: 10px; }
.context-excerpt { margin-top: 13px; background: #f1f3f4; color: #687480; border-radius: 10px; padding: 11px 13px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.prose { min-width: 0; white-space: normal; overflow-wrap: anywhere; font-family: var(--reading-font); font-size: var(--reading-size); line-height: var(--reading-line-height); }
.prose:empty { display: none; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 var(--reading-paragraph-gap); }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { margin: 1.1em 0 .5em; font-weight: 700; line-height: 1.4; }
.prose h1 { font-size: 1.4em; }
.prose h2 { font-size: 1.25em; }
.prose h3 { font-size: 1.1em; }
.prose h4, .prose h5, .prose h6 { font-size: 1em; }
.prose ul, .prose ol { margin: .6em 0 var(--reading-paragraph-gap); padding-left: 1.5em; }
.prose li { margin: .35em 0; }
.prose li > ul, .prose li > ol { margin: .25em 0; }
.prose li > p { margin-bottom: .4em; }
.prose blockquote { margin: .8em 0; padding: .5em .9em; border-left: 3px solid #7bb0a4; background: #edf4f0; color: #4e635a; border-radius: 0 8px 8px 0; }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.2em 0; }
.prose a { color: var(--green-ink); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.markdown-table { max-width: 100%; overflow-x: auto; margin: .9em 0; border: 1px solid var(--line); border-radius: 10px; overscroll-behavior-x: contain; }
.markdown-table table { width: 100%; border-collapse: collapse; font-size: .9em; line-height: 1.55; }
.markdown-table th, .markdown-table td { min-width: 100px; padding: 9px 11px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.markdown-table th { background: #edf4f0; font-weight: 650; }
.markdown-table tr:last-child td { border-bottom: 0; }
.prose .task-list-item { list-style: none; }
.task-checkbox { width: 15px; height: 15px; margin: 0 5px 0 -1.4em; vertical-align: -2px; accent-color: var(--green); }
.prose code { background: rgba(112, 129, 136, .1); border-radius: 4px; padding: 1px 4px; font-size: .9em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.markdown-preview { min-width:0; font-family:var(--reading-font); font-size:var(--reading-size); line-height:var(--reading-line-height); white-space:normal; overflow-wrap:anywhere; }
.markdown-preview code { background:rgba(112,129,136,.1); border-radius:4px; padding:1px 4px; font-size:.9em; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; white-space:normal; overflow-wrap:anywhere; }
.assistant-full-summary,.assistant-next,.assistant-reason,.assistant-decision,.suggestion-reason,.context-excerpt { min-width:0; }
.assistant-next > .prose,.assistant-reason > .prose,.suggestion-reason > .prose,.context-excerpt > .prose { color:inherit; }
.suggestion-card { background: #e5f4ee; border-color: #d0eae0; }
.suggestion-card h2 { color: var(--green-ink); display: flex; align-items: center; gap: 8px; }
.suggestion-card h2 .icon { width: 19px; height: 19px; fill: var(--green); stroke-width: 1; }
.suggestion-card > .prose { font-size: calc(var(--reading-size) + 3px); font-weight: 600; }
.suggestion-reason { color: #6a7a7d; margin: 10px 0 15px; line-height: 1.6; font-size: 14px; }
.suggestion-card .primary-button { margin-top: 13px; min-height: 43px; }
.suggestion-card.expired { background: #f1f2f0; border-color: #e0e2de; }
.suggestion-placeholder { display: flex; align-items: flex-start; gap: 11px; padding: 18px; background: #eef3f0; border-radius: 16px; margin: 17px 0; color: var(--green-ink); }
.suggestion-placeholder strong { font-size: 14px; }
.suggestion-placeholder p { font-size: 13px; margin-top: 6px; color: var(--muted); line-height: 1.6; }
.primary-button, .secondary-button { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 12px; font-size: 16px; font-weight: 650; text-align: center; }
.primary-button { color: white; background: var(--green); }
.primary-button:not(:disabled):active { background: var(--green-dark); }
.secondary-button { color: var(--green); background: #ecf5f0; }
.reply-composer { position: fixed; z-index: 15; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 600px); padding: 13px 18px calc(15px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .98); border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; backdrop-filter: blur(16px); }
.reply-composer textarea { width: 100%; min-height: 76px; max-height: 150px; resize: vertical; padding: 12px 14px; border: 1px solid #dce4e0; border-radius: 13px; outline: none; line-height: 1.55; background: #fff; color: var(--ink); font-size: 16px; }
.reply-composer textarea:focus { border-color: #52a895; box-shadow: 0 0 0 2px #e7f5ee; }
.reply-composer textarea::placeholder { color: #9aa2ad; }
.composer-meta { display: flex; gap: 8px; justify-content: space-between; align-items: center; font-size: 11px; color: #87929d; margin: 8px 1px 12px; }
.target-label { max-width: 65%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: right; }
.send-button { min-height: 48px; }
.send-button .icon { width: 18px; height: 18px; }
.compose-alert { display: flex; justify-content: space-between; gap: 8px; align-items: center; color: #886420; font-size: 12px; line-height: 1.5; margin-bottom: 9px; }
.compose-alert:empty { display: none; }
.compose-alert .text-button { font-size: 12px; flex: 0 0 auto; }
.approval-card { background: #fff8e9; border-color: #efe5cb; line-height: 1.65; }
.approval-card code { display: block; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; margin: 8px 0; }
.approval-footer { color: #886420; font-size: 13px; text-align: center; }
.snooze-action { display: block; margin: 10px auto 17px; color: #83908b; font-size: 13px; }
.delivery-banner { display: flex; gap: 10px; align-items: center; padding: 13px 14px; border-radius: 13px; margin: 0 0 20px; font-size: 14px; }
.delivery-banner.success { background: #dcf3e7; color: var(--green-ink); }
.delivery-banner.neutral { background: #e9eeeb; color: #566d63; }
.delivery-banner.warning { background: #fff0d5; color: #896020; }
.delivery-banner .icon { width: 21px; height: 21px; }
.delivery-banner p { font-size: 12px; line-height: 1.65; margin-top: 5px; }
.delivery-banner .text-button { font-size: 12px; }
.delivery-banner .open-desktop-button { margin-top: 11px; min-height: 41px; background: #fffaf0; font-size: 13px; color: #796126; }
.running-card { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 16px; padding: 17px; margin: 20px 0; font-size: 14px; }
.running-card p { margin-top: 5px; font-size: 13px; color: var(--muted); }
.message-list { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: var(--reading-message-gap); margin: 20px 0; }
.latest-context { margin: 22px 0; }
.latest-context > h2 { font-size: 16px; margin-bottom: 14px; }
.message { display: flex; min-width: 0; align-items: flex-start; gap: 9px; }
.message-avatar { margin-top: 6px; color: #475756; }
.message-avatar .icon { width: 23px; height: 23px; }
.message-content { min-width: 0; max-width: var(--reading-width); width: var(--reading-width); }
.message-bubble { border-radius: 16px; padding: 13px 14px; background: #fff; border: 1px solid var(--line); font-size: 15px; }
.message.assistant .message-bubble { border-top-left-radius: 6px; }
.message.user { justify-content: flex-end; }
.message.user .message-bubble { background: #dcf0e7; border-color: #d6e9df; border-top-right-radius: 6px; }
.message-content > time { display: block; color: #96a0aa; font-size: 11px; margin: 6px 4px 0; }
.message-speaker { margin-right: 8px; }
.message.user time { text-align: right; }
.code-block, .long-message { font-size: max(12px, calc(var(--reading-size) - 2px)); line-height: var(--reading-line-height); }
.code-block summary, .long-message summary { color: var(--green); cursor: pointer; padding: 5px 0; }
.code-block { min-width: 0; margin: .8em 0; }
.code-block pre { max-width: 100%; overflow-x: auto; white-space: pre; overflow-wrap: normal; background: #f0f3f2; border-radius: 8px; padding: 10px; margin: 7px 0; font-size: max(12px, calc(var(--reading-size) - 2px)); }
.code-block pre code { display: block; background: none; border-radius: 0; padding: 0; font-size: 1em; }
.search-box { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: white; border: 1px solid var(--line); border-radius: 13px; margin-bottom: 18px; color: var(--muted); }
.search-box > span { font-size: 27px; line-height: 1; }
.search-box input { min-width: 0; width: 100%; border: none; background: none; outline: none; font-size: 16px; padding: 3px 0; }
.thread-card { display: flex; gap: 11px; align-items: center; background: white; border: 1px solid var(--line); border-radius: 16px; padding: 16px 13px; }
.thread-avatar { width: 39px; height: 39px; flex: 0 0 auto; background: #edf5f0; border-radius: 12px; display: grid; place-items: center; color: var(--green); }
.thread-avatar .icon { width: 20px; height: 20px; }
.thread-description { min-width: 0; flex: 1; }
.thread-description h2 { font-size: 15px; font-weight: 600; margin-bottom: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-description p { font-size: 12px; line-height: 1.4; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-description .thread-preview { margin-top: 5px; }
.thread-state { color: var(--muted); white-space: nowrap; font-size: 11px; }
.thread-state.running { color: var(--green); }
.thread-status-info { flex: 0 0 auto; display: grid; gap: 5px; text-align: right; }
.thread-status-info > time { color: var(--muted); font-size: 11px; font-weight: 400; white-space: nowrap; }
.thread-card > .icon { width: 15px; height: 15px; color: #9fa8b0; }
.thread-preferences { border: 1px solid var(--line); border-radius: 14px; background: white; padding: 15px; margin-top: 25px; }
.thread-preferences summary { color: #677b70; font-size: 14px; cursor: pointer; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 17px 0; font-size: 14px; }
.toggle-row small { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; line-height: 1.5; }
.toggle-row input { accent-color: var(--green); width: 20px; height: 20px; }
.field-label { display: block; font-size: 13px; color: #5c6a75; margin: 15px 0; }
.field-label input { display: block; margin-top: 8px; width: 100%; border-radius: 11px; padding: 12px; border: 1px solid #dae3de; color: var(--ink); background: white; font-size: 16px; }
.settings-card { border: 1px solid var(--line); border-radius: 18px; background: white; padding: 19px; margin: 0 0 17px; }
.settings-card h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; margin-bottom: 16px; }
.settings-card h2 .icon { width: 20px; height: 20px; color: var(--green); }
.settings-card > p { color: #74828c; font-size: 14px; line-height: 1.7; }
.reading-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px 0 8px; }
.reading-heading h2 { margin: 0; }
.reading-heading button { min-height: 44px; padding: 8px 0 8px 10px; }
.reading-field { display: grid; gap: 8px; margin-top: 19px; color: #50615b; font-size: 14px; }
.reading-field select { width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid #d9e3de; border-radius: 11px; background: #fafcfb; color: var(--ink); font-size: 16px; }
.reading-inline-preview { margin-top: 14px; padding: 12px; border-radius: 10px; background: var(--bg); color: #3e514a; }
.reading-range { margin-top: 22px; }
.reading-range > div:first-child { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; color: #50615b; }
.reading-range output { color: var(--green-ink); font-variant-numeric: tabular-nums; }
.reading-range input { display: block; width: 100%; min-height: 44px; margin: 0; accent-color: var(--green); cursor: pointer; }
.range-limits { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.reading-preview { min-width: 0; margin: 24px -6px 17px; border-radius: 14px; padding: 15px 12px; background: var(--bg); border: 1px solid var(--line); }
.reading-preview-label { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.reading-preview-message { justify-content: center; }
.reading-preview-message .message-bubble { padding: 12px; }
.setup-step { display: flex; gap: 11px; margin: 16px 0; }
.setup-step > span { width: 24px; height: 24px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: #e5f3eb; color: var(--green); font-size: 13px; font-weight: 650; }
.setup-step > span .icon { width: 14px; height: 14px; }
.setup-step strong { font-size: 14px; }
.setup-step p { margin-top: 6px; font-size: 13px; color: #74828c; line-height: 1.7; }
.fine-print { margin-top: 12px !important; color: #859189; font-size: 12px !important; line-height: 1.7; }
.device-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-top: 1px solid var(--line); padding: 13px 0; }
.device-row:last-child { padding-bottom: 0; }
.device-row strong { font-size: 14px; }
.device-row p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.danger { color: #ad5745; }
.pair-page { padding: calc(36px + env(safe-area-inset-top)) 28px; max-width: 450px; margin: 0 auto; min-height: 100dvh; }
.pair-illustration { display: grid; place-items: center; width: 80px; height: 80px; margin: 54px 0 28px; background: #dbf1e7; border-radius: 25px; color: var(--green); }
.pair-illustration .icon { width: 43px; height: 43px; }
.pair-page h1 { font-size: 29px; letter-spacing: -.5px; margin-bottom: 15px; }
.pair-page > p { color: #74828c; font-size: 15px; line-height: 1.8; margin-bottom: 25px; }
.pair-page .primary-button { margin: 25px 0; }
.boot { min-height: 75dvh; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 17px; color: var(--muted); font-size: 14px; }
.spinner { display: inline-block; width: 27px; height: 27px; border: 2.5px solid #d6e6df; border-top-color: var(--green); border-right-color: var(--green); border-radius: 50%; animation: spin 1s linear infinite; flex: 0 0 auto; }
.spinner.small { width: 17px; height: 17px; border-width: 2px; }
.toast { position: fixed; z-index: 40; top: calc(14px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); max-width: calc(100% - 30px); width: max-content; background: #123d34; color: white; padding: 13px 17px; border-radius: 13px; box-shadow: 0 6px 28px #123d3429; font-size: 14px; line-height: 1.5; }
.toast[hidden] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 650px) { .app-shell { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
@media (max-width: 350px) {
  .topbar { padding-left: 16px; padding-right: 16px; }
  .topbar-right { gap: 5px; }
  .connection { font-size: 11px; }
  .main-page { padding-left: 14px; padding-right: 14px; }
  .card-meta { font-size: 11px; }
  .page-heading h1 { font-size: 29px; }
  .wordmark { font-size: 21px; }
  .detail-page { padding-left: 14px; padding-right: 14px; }
}
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } .issue-card { transition: none; } }

.search-modes { display: flex; gap: 8px; margin: 0 0 14px; }
.search-row { display: flex; gap: 9px; align-items: stretch; margin-bottom: 17px; }
.search-row .search-box { flex: 1; min-width: 0; margin: 0; }
.search-row .search-box input { min-width: 0; }
.search-row .secondary-button { width: auto; flex: 0 0 auto; margin: 0; padding: 10px 15px; }
.history-heading { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 15px 0; }
.history-heading p { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.history-heading .text-button { display: flex; gap: 6px; align-items: center; }
.history-result { position: relative; display: block; border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.history-result .card-meta { align-items: flex-start; }
.history-result .card-meta span { overflow-wrap: anywhere; white-space: normal; }
.history-result p { margin: 12px 0; font-size: 14px; line-height: 1.7; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.history-result time { font-size: 11px; color: var(--muted); }
.history-result > .icon { position: absolute; bottom: 15px; right: 13px; width: 15px; }
.history-match .message-bubble { outline: 2px solid #66ab89; outline-offset: 3px; }
.resolve-action { margin: 18px 0 0; }
.structured-composer { max-height: 48dvh; overflow-y: auto; }
.question-answer-label { display: block; font-size: 13px; color: var(--ink); line-height: 1.6; margin: 14px 0 7px; }
.question-options { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; }
.question-options .chip { white-space: normal; text-align: left; }
.structured-composer textarea { margin-bottom: 5px; }

.review-toggle { margin: 0 0 17px; font-size: 13px; }

/* iPhone product layout: compact overview, explicit actions, readable sheets. */
:root { --keyboard-inset:0px; --available-height:100dvh; --soft-green:#eaf5ef; --soft-muted:#edf1ef; --soft-amber:#fff3da; }
.icon-button,.text-button,.text-link,.back-link { min-height:44px; }
.icon-button { min-width:44px; }
.topbar { min-height:70px; padding:calc(14px + env(safe-area-inset-top)) 18px 12px; }
.main-page { padding-top:5px; }
.page-heading { margin-bottom:16px; }
.page-heading h1 { font-size:29px; }
.page-heading > p { font-size:14px; }
.global-overview { margin-bottom:14px; }
.assistant-analysis > summary,.changes-overview > summary { cursor:pointer; list-style:none; }
.assistant-analysis > summary::-webkit-details-marker,.changes-overview > summary::-webkit-details-marker { display:none; }
.assistant-analysis > summary::after,.changes-overview > summary::after { content:'展开'; display:block; color:var(--green); font-size:12px; margin-top:8px; }
.assistant-analysis[open] > summary::after,.changes-overview[open] > summary::after { content:'收起'; }
.assistant-overview { padding:14px 16px; margin-bottom:14px; background:var(--soft-green); }
.assistant-overview-heading { margin-bottom:7px; }
.assistant-summary { font-size:14px; line-height:1.65; }
.assistant-analysis:not([open]) .assistant-summary { display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
.inbox-page .page-heading > p { display:none; }
.inbox-page .page-heading { margin-bottom:14px; }
.inbox-page .voice-entry { margin:0 0 10px;gap:6px 10px; }
.inbox-page .voice-entry-button { min-height:44px;padding:8px 12px;font-size:14px; }
.inbox-page .voice-entry > span { font-size:12px; }
.inbox-page .changes-overview:not([open]) { padding:12px 14px; }
.inbox-page .changes-overview:not([open]) > summary { display:grid;grid-template-columns:auto 1fr;column-gap:10px; }
.inbox-page .changes-overview:not([open]) h2 { font-size:14px;margin:0; }
.inbox-page .changes-overview:not([open]) .changes-brief { font-size:12px; }
.inbox-page .changes-overview:not([open]) .changes-brief small { font-size:12px; }
.inbox-page .changes-overview:not([open]) > summary::after { display:none; }
.inbox-page .review-toggle { float:right;margin:0 0 8px;font-size:12px; }
.inbox-page .project-filters { clear:both; }
.changes-overview { padding:14px 16px; margin-bottom:14px; }
.changes-overview h2 { margin-bottom:6px; }
.changes-brief { font-size:14px; line-height:1.6; }
.changes-brief small { display:block; color:var(--muted); font-size:12px; margin-top:5px; }
.changes-window { margin-top:14px; padding-top:12px; border-top:1px solid var(--line); }
.inbox-section { margin:18px 0 24px; }
.section-title { display:flex; align-items:center; gap:8px; font-size:18px; font-weight:650; margin-bottom:12px; }
.section-title > span { color:var(--muted); font-size:14px; font-weight:500; }
.attention-card { touch-action:pan-y; }
.attention-card .issue-card { padding-bottom:12px; }
.card-visible-actions { display:flex; align-items:center; padding:0 14px; border-top:1px solid var(--line); gap:12px; }
.card-visible-actions .dismiss-attention { border:0; width:auto; flex:1; justify-content:flex-start; padding-left:0; }
.card-visible-actions > .text-button:last-child { min-width:52px; }
.card-gesture-actions { display:grid; gap:8px; padding:12px 14px; border-top:1px solid var(--line); background:var(--soft-green); }
.card-gesture-actions[hidden] { display:none; }
.attention-assistant { margin:0 16px 10px; padding:0; background:transparent; border:0; }
.attention-assistant .assistant-decision { display:flex; align-items:flex-start; gap:7px; margin:0; font-size:14px; color:var(--muted); }
.attention-assistant .assistant-decision .icon { width:17px; height:17px; margin-top:3px; color:var(--green); }
.attention-assistant .text-button { display:flex; align-items:center; gap:6px; width:100%; text-align:left; }
.attention-assistant .text-button .icon { width:17px; height:17px; }
.project-list { display:grid; gap:14px; }
.project-card { display:block; padding:18px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); }
.project-card-heading { display:flex; align-items:center; gap:10px; }
.project-card-heading h2 { flex:1; font-size:19px; line-height:1.5; min-width:0; }
.project-card-heading .icon { width:20px; height:20px; color:var(--green); }
.project-summary { margin-top:12px; color:var(--green-ink); font-size:14px; line-height:1.6; }
.project-latest { margin:10px 0 8px; color:var(--muted); font-size:14px; line-height:1.6; display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
.project-card time { color:var(--muted);font-size:12px; }
.all-conversations { margin-top:16px; }
.reply-composer { bottom:var(--keyboard-inset); background:var(--surface); max-height:calc(var(--available-height) - 64px); display:flex; flex-direction:column; padding-bottom:max(12px,env(safe-area-inset-bottom)); }
.decision-panel-heading { display:flex; align-items:center; justify-content:space-between; flex:0 0 auto; margin:-6px -4px 4px 0; }
.decision-panel-heading h2 { font-size:16px; line-height:1.5; }
.decision-fields { min-height:0; flex:1 1 auto; overflow-y:auto; overscroll-behavior-y:contain; scrollbar-width:thin; scroll-padding-block:10px; }
.decision-panel .decision-fields { max-height:calc(var(--available-height) * .45); }
.decision-panel .suggestion-card,.decision-panel .suggestion-placeholder { padding:12px; margin:0 0 12px; border-radius:12px; }
.decision-panel .suggestion-card > .prose { font-size:var(--reading-size); font-weight:500; }
.decision-panel .suggestion-card > .primary-button { font-size:14px; min-height:44px; margin-top:9px; }
.decision-panel .suggestion-reason { font-size:13px; margin:8px 0; }
.decision-panel .question-answer-label { margin-top:10px; }
.decision-panel.collapsed { gap:10px; }
.structured-composer { max-height:calc(var(--available-height) - 64px); }
.composer-meta { display:flex; flex-direction:column; align-items:flex-start; gap:4px; margin:8px 0 10px; color:var(--muted); font-size:12px; flex:0 0 auto; }
.target-label { max-width:100%; white-space:normal; overflow:visible; text-align:left; font-size:13px; font-weight:600; color:var(--ink); line-height:1.5; }
.target-label { display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
.assistant-full-summary { font-size:14px;line-height:1.7;margin-top:12px; }
.send-button,.compose-alert { flex:0 0 auto; }
.compose-alert { flex-wrap:wrap; }
.compose-alert > span { flex:1 1 180px; min-width:0; overflow-wrap:anywhere; }
.compose-alert .text-button { min-height:44px; flex:0 0 auto; max-width:100%; white-space:normal; text-align:left; }
.running-question-links { display:grid; gap:6px; width:100%; min-width:0; flex:1 0 100%; }
.running-question-links a { display:block; min-height:44px; width:100%; min-width:0; padding:10px 12px; font-size:var(--reading-size); text-align:left; white-space:normal; overflow-wrap:anywhere; }
.assistant-decision > .markdown-preview { flex:1; min-width:0; }
.reply-composer textarea { resize:none; min-height:70px; max-height:130px; font-size:16px; }
.result-composer { flex-direction:row; }
.latest-messages-link { position:sticky;top:72px;z-index:4;width:max-content;max-width:100%;margin:0 auto 12px;padding:8px 16px;min-height:44px;font-size:14px;box-shadow:0 2px 8px #17212c12; }
.more-action-list { display:grid;gap:12px;margin-top:20px; }
.home-screen-check { padding:12px;margin:12px 0;background:var(--soft-muted);border-radius:12px;font-size:14px;line-height:1.6; }
.home-screen-check .secondary-button { margin:10px 0;font-size:14px; }
.home-screen-check small { display:block;color:var(--muted);font-size:12px; }
.notification-preferences { margin-top:20px;border-top:1px solid var(--line); }
.fine-print,.sync-caption,.settings-card > p,.setup-step p,.pair-page > p,.composer-meta,.thread-preferences summary,.field-label,.reading-field,.reading-range > div:first-child,.assistant-overview-footer > span { color:var(--muted); }
.global-overview-caption { margin:0 0 7px;color:var(--muted);font-size:12px; }
.legacy-result-review { margin-top:14px;color:var(--muted);font-size:13px; }
.legacy-result-review > summary { padding:12px 0; }
.legacy-result-review > .text-link { display:flex;min-height:44px;align-items:center; }
.sync-caption,.range-limits,.toggle-row small,.history-result time { font-size:12px; }
.thread-preview,.thread-description > p { color:var(--muted); }
.issue-card:active { transform:none; }
button:not(:disabled):active,a:active { filter:brightness(.97); }
textarea:focus-visible { outline:3px solid var(--green);outline-offset:2px; }
html { scroll-padding-top:80px;scroll-padding-bottom:240px; }
@media (prefers-color-scheme:dark) {
  :root { color-scheme:dark;--bg:#111b1c;--surface:#1b292a;--ink:#ecf2ef;--muted:#b2c4c0;--line:#354746;--green:#7ad4ba;--green-dark:#a0e1cd;--green-light:#203e36;--green-ink:#a0e1cd;--amber:#ffda96;--soft-green:#1d3530;--soft-muted:#283a39;--soft-amber:#40361e; }
  .primary-button,.chip.active { color:#10241f;background:var(--green); }
  .primary-button:not(:disabled):active { background:var(--green-dark); }
  .question-card,.approval-card,.settings-card,.history-result,.message-bubble,.field-label input,.reply-composer textarea,.reading-field select { background:var(--surface);color:var(--ink);border-color:var(--line); }
  .suggestion-card,.secondary-button,.reading-inline-preview,.assistant-overview,.attention-assistant,.setup-step > span,.pair-illustration { background:var(--soft-green);color:var(--green-ink);border-color:var(--line); }
  .suggestion-card.expired,.suggestion-placeholder,.context-excerpt,.prose blockquote,.markdown-table th,.status-banner.neutral,.thread-preferences { background:var(--soft-muted);color:var(--muted);border-color:var(--line); }
  .status-banner.warning,.badge.amber { background:var(--soft-amber);color:var(--amber); }
  .badge.muted,.heading-count { background:var(--soft-muted);color:var(--muted); }
  .topbar,.detail-topbar,.bottom-nav { background:var(--bg);color:var(--ink); }
  .chip { border-color:var(--line);color:var(--muted); }
  .icon-button,.nav-item,.card-bottom > .icon,.assistant-next,.assistant-reason,.suggestion-reason,.reading-inline-preview,#dismiss-dialog-description,.assistant-facts { color:var(--muted); }
  .message.user .message-bubble { background:var(--soft-green);color:var(--ink); }
  .message time { color:var(--muted); }
  .issue-card:active { background:var(--soft-green); }
  .danger { color:#f4b5a5; }
  .nav-badge { background:var(--green);color:#10241f;border-color:var(--bg); }
  .reply-composer textarea:focus { box-shadow:0 0 0 2px var(--soft-green); }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important;transition:none!important;animation-duration:0.01ms!important;animation-iteration-count:1!important; } }
.markdown-preview.markdown-preview { font-family:var(--reading-font); font-size:var(--reading-size); line-height:var(--reading-line-height); }

/* Reply suggestions belong to the conversation, never to the fixed editor. */
.compact-suggestion { margin:16px 0; padding:14px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.suggestion-title { display:flex; align-items:center; gap:7px; font-size:14px; }
.suggestion-title > span { margin-left:auto; font-size:12px; color:var(--muted); }
.suggestion-preview { margin:10px 0; font-size:var(--reading-size); line-height:1.6; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; white-space:pre-wrap; overflow-wrap:anywhere; }
.suggestion-details { margin:8px 0; }
.suggestion-details summary { cursor:pointer; min-height:44px; display:flex; align-items:center; font-size:13px; color:var(--muted); }
.suggestion-placeholder.compact-suggestion { display:flex; align-items:center; gap:10px; min-height:56px; font-size:13px; }
.suggestion-placeholder.compact-suggestion > div { flex:1; min-width:0; }
.suggestion-placeholder.compact-suggestion strong { font-size:13px; }
.suggestion-placeholder.compact-suggestion details { margin-top:6px; }
.reply-composer.decision-panel { position:relative; left:auto; bottom:auto; transform:none; margin:0 auto 24px; width:calc(100% - 36px); max-height:none; border:1px solid var(--line); border-radius:16px; scroll-margin-top:72px; }
.decision-panel .decision-fields { overflow:visible; max-height:none; flex:none; }
.decision-panel textarea { max-height:240px; resize:vertical; }
.reply-composer:not(.decision-panel):not(.result-composer):not(.approval-footer) { padding:8px 14px max(8px,env(safe-area-inset-bottom)); max-height:calc(var(--available-height) * .38); }
.reply-composer:not(.decision-panel) textarea { min-height:46px; max-height:80px; padding:9px 11px; }
.reply-composer:not(.decision-panel) .composer-meta { font-size:10px; margin:4px 0; }
.reply-composer:not(.decision-panel) .send-button { margin-top:4px; min-height:44px; padding:8px 12px; }
.reply-composer:not(.decision-panel) .compose-alert:empty { display:none; }
.thread-suggestion { margin-top:18px; }

/* Keep the editor and send control visible above the software keyboard. Alerts
   have their own bounded region rather than squeezing the textarea to zero. */
.reply-composer:not(.decision-panel):not(.result-composer):not(.approval-footer) { max-height:calc(var(--available-height) - 64px); }
.reply-composer:not(.decision-panel) .decision-fields { flex:1 1 auto; min-height:64px; }
.reply-composer:not(.decision-panel) textarea { min-height:60px; }
.reply-composer:not(.decision-panel) .compose-alert { max-height:min(96px,calc(var(--available-height) * .20)); overflow-y:auto; overscroll-behavior:contain; }
.keyboard-open .reply-composer:not(.decision-panel) .composer-meta { display:none; }
.keyboard-open .reply-composer:not(.decision-panel) { padding-bottom:8px; }
.reply-composer #send-button { touch-action:manipulation; }

.compact-viewport .reply-composer:not(.decision-panel):not(.result-composer):not(.approval-footer) { max-height:calc(var(--available-height) - 12px); }
.compact-viewport .reply-composer:not(.decision-panel) .composer-meta { display:none; }
.compact-viewport .reply-composer:not(.decision-panel) .compose-alert { max-height:calc(var(--available-height) * .14); }
.compact-viewport .reply-composer:not(.decision-panel) .decision-fields { min-height:48px; }
.compact-viewport .reply-composer:not(.decision-panel) textarea { min-height:46px; height:48px; }

/* Durable per-message sending feedback, separate from the editable composer. */
.outbox-list { margin-block: 16px; }
.outbox-list h2 { font-size: 1rem; }
.outbox-message { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px; margin-block: 12px; overflow-wrap: anywhere; }
.outbox-text { white-space: pre-wrap; }
.outbox-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.outbox-actions button { min-height: 44px; padding-inline: 12px; }

.reply-composer:not(.decision-panel) .compose-alert { color: var(--muted); }

/* Ordinary chat prioritizes the message and composer; decisions keep their full panel. */
.chat-composer .composer-meta .target-label { display:none; }
.chat-composer .composer-meta { margin:2px 0; }
.chat-composer .compose-tools > summary { cursor:pointer; min-height:44px; display:flex; align-items:center; width:max-content; font-size:13px; color:var(--green-ink); }
.chat-composer .compose-tools > summary::after { content:' ▾'; padding-left:6px; }
.chat-composer .compose-tools[open] > summary::after { content:' ▴'; }
.chat-composer .compose-tools .product-tools { margin:0 0 4px; }
.chat-composer #steer-control > .fine-print { margin:0 0 4px; font-size:12px; }
.chat-composer .compose-tools .fine-print { margin:0 0 6px; }
.detail-heading h1 { overflow-wrap:anywhere; }

.thread-question-card { scroll-margin-top: 90px; }
