/* Zeta: open answers, a quiet timeline, and actions beside the work. */
:root { --conversation-width: 720px; }
html, body { background: var(--bg); }
.device { width: 100%; max-width: 1280px; height: 100vh; height: 100svh; min-height: 0; margin: 0 auto; border: 0; border-radius: 0; box-shadow: none; }
.content { scroll-behavior: auto; }
.is-chat .content { height: calc(100% - var(--composer-height) - 96px - env(safe-area-inset-bottom)); padding-bottom: 12px; }
.page { max-width: var(--conversation-width); margin-inline: auto; }
.auth { background: var(--bg); }
.auth-brand, .auth > form, .auth > .auth-card { max-width: 400px; margin-inline: auto; }
.conversation-heading { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 12px; margin: 14px 0 30px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.conversation-glyph { width: 34px; height: 34px; color: var(--muted); }
.conversation-heading h1 { margin: 4px 0 0; font-size: 28px; line-height: 1.2; font-weight: 720; letter-spacing: 0; }
#chatModeEyebrow { color: var(--muted); font-size: 11px; }
.conversation-signature { color: var(--muted); font-size: 11px; line-height: 1.6; text-align: right; }
.messages { gap: 30px; padding-bottom: 30px; }
.message-wrap.assistant { width: 100%; max-width: 100%; grid-template-columns: 26px minmax(0,1fr); gap: 10px; align-items: start; }
.chat-avatar.ai { width: 26px; height: 26px; margin-top: 1px; }
.response-byline { display: flex; align-items: center; min-height: 28px; margin-bottom: 7px; font-size: 12px; font-weight: 750; }
.message-wrap.user { max-width: 88%; grid-template-columns: minmax(0,1fr); }
.message-wrap.user .chat-avatar { display: none; }
.message.user { padding: 12px 17px; border-radius: 18px 18px 4px 18px; font-size: 15px; line-height: 1.65; color: var(--ink); background: var(--solid); border: 1px solid var(--line); }
.message.assistant { width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 15px; line-height: 1.85; overflow-wrap: anywhere; }
.message.assistant code { font-size: 13px; background: var(--line); }
.message-heading { display: inline-block; margin-top: 4px; }
.message.process-live { width: 100%; min-height: 104px; padding: 12px 14px; border-left: 2px solid var(--accent); background: var(--solid); border-radius: 0 8px 8px 0; }
.message.process-live.process-failed { border-left-color: var(--danger); }
.process-head { gap: 12px; }
.process-head span { line-height: 1.5; }
.process-events:empty::after { content: "等待处理进度"; }
.process-head time { flex: 0 0 auto; }
.process-events li { line-height: 1.6; font-size: 12px; }
.process-record { width: 100%; max-width: 480px; margin: 0 0 10px; }
.process-record summary { min-height: 32px; padding: 0; font-size: 11px; }
.process-record ol { border-left: 1px solid var(--line); margin-left: 3px; padding: 6px 0 12px 12px; }
.process-record li { font-size: 12px; line-height: 1.6; }
.ui-icon { display: inline-block; width: 20px; height: 20px; flex: 0 0 auto; background: currentColor; -webkit-mask: var(--ui-icon) center / contain no-repeat; mask: var(--ui-icon) center / contain no-repeat; }
.icon-arrow-up { --ui-icon: url('/vendor/lucide/arrow-up.svg'); }
.icon-arrow-down { --ui-icon: url('/vendor/lucide/arrow-down.svg'); }
.icon-arrow-up-right { --ui-icon: url('/vendor/lucide/arrow-up-right.svg'); }
.icon-plus { --ui-icon: url('/vendor/lucide/plus.svg'); }
.icon-mic { --ui-icon: url('/vendor/lucide/mic.svg'); }
.icon-square { --ui-icon: url('/vendor/lucide/square.svg'); }
.icon-copy { --ui-icon: url('/vendor/lucide/copy.svg'); }
.icon-volume-2 { --ui-icon: url('/vendor/lucide/volume-2.svg'); }
.icon-thumbs-up { --ui-icon: url('/vendor/lucide/thumbs-up.svg'); }
.icon-thumbs-down { --ui-icon: url('/vendor/lucide/thumbs-down.svg'); }
.icon-book-open { --ui-icon: url('/vendor/lucide/book-open.svg'); }
.icon-chevron-down { --ui-icon: url('/vendor/lucide/chevron-down.svg'); }
.message-tools { display: flex; flex-wrap: wrap; gap: 3px; padding: 8px 0 0; }
.message-tools button { display: inline-grid; place-items: center; width: 40px; min-height: 40px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); }
.message-tools .ui-icon { width: 17px; height: 17px; }
.message-tools button:hover, .message-tools button:focus-visible { color: var(--ink); background: var(--line); }
.message-tools button.selected { color: var(--success); background: var(--mint); }
.message-tools button.negative { color: var(--danger); background: var(--coral); }
.message-sources { margin-top: 14px; padding: 0; border: 0; background: none; }
.message-sources summary { display: flex; width: fit-content; max-width: 100%; align-items: center; gap: 7px; min-height: 38px; color: var(--muted); font-size: 12px; cursor: pointer; list-style: none; }
.message-sources summary::-webkit-details-marker { display: none; }
.message-sources summary .ui-icon { width: 15px; height: 15px; }
.message-sources[open] .icon-chevron-down { transform: rotate(180deg); }
.message-sources > div { display: grid; gap: 7px; padding-bottom: 8px; }
.message-sources a { padding: 6px 0; line-height: 1.5; font-size: 12px; }
.conversation-start { padding: 18px 0; text-align: left; border: 0; background: none; }
.conversation-start > img { display: block; width: 54px; height: 54px; margin-bottom: 24px; border-radius: 50%; }
.conversation-start h2 { margin: 0 0 10px; color: var(--ink); font-size: 23px; line-height: 1.45; font-weight: 700; }
.conversation-start p { margin: 0; font-size: 14px; color: var(--muted); }
.conversation-starters { display: grid; margin-top: 30px; border-top: 1px solid var(--line); }
.conversation-starters button { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 58px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); font-size: 14px; text-align: left; }
.conversation-starters button:hover { color: var(--accent); }
.conversation-starters .ui-icon { width: 18px; height: 18px; color: var(--muted); }
.composer { width: min(calc(100% - 32px),var(--conversation-width)); bottom: calc(84px + env(safe-area-inset-bottom)); gap: 7px; padding: 10px; border-radius: 20px; box-shadow: 0 5px 24px rgba(20,20,24,.08); background: var(--solid); }
.composer textarea { font-size: 16px; line-height: 1.6; padding: 8px 6px; }
.composer textarea::placeholder { color: var(--muted); opacity: .85; }
.composer .composer-tool { width: 40px; height: 40px; background: transparent; }
.composer .route-mode { background: var(--bg); font-weight: 600; border-color: transparent; }
.composer .route-mode span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer #sendButton { width: 40px; height: 40px; }
.composer #sendButton.active .ui-icon { width: 15px; height: 15px; }
.composer:focus-within { border-color: color-mix(in srgb,var(--ink) 26%,transparent); }
.latest-message { position: fixed; z-index: 10; left: 50%; bottom: calc(var(--composer-height) + 96px + env(safe-area-inset-bottom)); display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--solid); box-shadow: var(--shadow); transform: translateX(-50%); }
.message-stack .support-controls { max-width: 100%; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (min-width: 900px) {
  .topbar { height: 82px; padding: 18px 30px; border-bottom: 1px solid var(--line); background: var(--bg); }
  .brand strong { font-size: 15px; }
  .brand span { font-size: 9px; }
  .brand img { width: 40px; height: 40px; }
  .content { width: calc(100% - 160px); margin-left: 160px; padding: 110px 36px 40px; }
  .is-chat .content { height: calc(100% - var(--composer-height) - 36px); padding-bottom: 18px; }
  .tabbar { inset: 82px auto 0 0; width: 160px; height: auto; display: flex; flex-direction: column; gap: 5px; padding: 22px 12px; border-top: 0; border-right: 1px solid var(--line); background: var(--bg); }
  .tabbar button { display: flex; align-items: center; justify-content: flex-start; gap: 14px; min-height: 48px; padding: 0 18px; border-radius: 8px; font-size: 13px; }
  .tabbar button.active { background: var(--solid); }
  .composer { left: calc(50% + 80px); width: min(calc(100% - 232px),var(--conversation-width)); bottom: 24px; }
  .latest-message { left: calc(50% + 80px); bottom: calc(var(--composer-height) + 36px); }
  .messages { gap: 36px; padding-bottom: 30px; }
  .conversation-heading { margin-top: 4px; margin-bottom: 38px; }
  .conversation-start { padding: 18px 0 40px; max-width: 520px; }
  .conversation-start h2 { font-size: 30px; }
  .message.assistant { font-size: 16px; }
  .message-wrap.user { max-width: 80%; }
  .sheet { left: calc(50% - 270px); right: auto; width: 540px; bottom: 18px; max-height: calc(100% - 36px); }
  .auth { padding-top: 96px; }
}
@media (max-width: 359px) {
  .conversation-signature { max-width: 92px; }
  .composer-bar { gap: 3px; }
  .composer .route-mode { padding-inline: 7px; font-size: 10px; }
  .conversation-start h2 { font-size: 21px; }
}

/* V85: chat is an immersive native page, not a floating web panel. */
.shell.is-chat .topbar,
.shell.is-chat .tabbar,
.shell.is-chat > .task-dock { display: none !important; }
.shell.is-chat .content { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; }
.shell.is-chat .chat-page.active { position: relative; display: grid; width: 100%; max-width: none; height: 100%; min-height: 0; grid-template-rows: auto minmax(0,1fr) auto; margin: 0; overflow: hidden; }
.shell.is-chat .conversation-heading { z-index: 2; display: grid; min-height: calc(64px + env(safe-area-inset-top)); grid-template-columns: 44px minmax(0,1fr) 44px; align-items: end; gap: 8px; margin: 0; padding: env(safe-area-inset-top) 12px 8px; border-bottom: 1px solid var(--line); background: color-mix(in srgb,var(--bg) 94%,transparent); -webkit-backdrop-filter: saturate(160%) blur(20px); backdrop-filter: saturate(160%) blur(20px); }
.conversation-person { display: flex; min-width: 0; align-self: center; align-items: center; justify-content: center; gap: 9px; text-align: left; }
.conversation-person > img { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; }
.conversation-person > span { display: block; min-width: 0; }
.conversation-person strong,.conversation-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-person strong { font-size: 14px; line-height: 1.25; }
.conversation-person small { margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 650; }
.shell.is-chat .messages { display: grid; width: min(100%,var(--conversation-width)); min-height: 0; align-content: start; gap: 28px; justify-self: center; overflow-x: hidden; overflow-y: auto; margin: 0; padding: 22px 18px 30px; scroll-padding-bottom: 24px; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; }
.shell.is-chat .messages > :last-child { scroll-margin-bottom: 24px; }
.shell.is-chat .composer { position: relative; z-index: 3; left: auto; bottom: auto; display: grid; width: 100%; max-width: none; gap: 5px; margin: 0; padding: 8px 14px max(10px,env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--line); border-radius: 0; background: color-mix(in srgb,var(--solid) 96%,transparent); box-shadow: 0 -8px 28px rgba(20,20,24,.06); transform: none; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.shell.is-chat .composer > * { width: min(100%,var(--conversation-width)); margin-inline: auto; }
.shell.is-chat .composer textarea { min-height: 38px; max-height: 116px; padding: 7px 5px 4px; }
.shell.is-chat .composer-bar { min-height: 44px; }
.shell.is-chat .composer .route-mode { height: 40px; border-radius: 8px; }
.shell.is-chat .composer .composer-tool,
.shell.is-chat .composer #sendButton { width: 42px; height: 42px; }
.shell.is-chat .latest-message { position: absolute; z-index: 5; left: auto; right: max(18px,calc((100% - var(--conversation-width))/2 + 18px)); bottom: calc(var(--composer-height) + 14px + env(safe-area-inset-bottom)); transform: none; }
.shell.is-chat .conversation-start { padding: 30px 0; }
.shell.is-chat .conversation-start > img { width: 48px; height: 48px; margin-bottom: 20px; }
.shell.is-chat .conversation-starters { margin-top: 24px; }
.shell.is-chat .message-wrap.user { max-width: 84%; }
.shell.is-chat .message.assistant { line-height: 1.8; }
.shell.is-chat .zs-turn-tools { min-height: 32px; border: 0; }
.shell.is-chat .composer .zs-turn-tools .zs-button { min-height: 30px; padding-block: 2px; }
html.keyboard-open .shell.is-chat .composer { position: relative; bottom: auto; padding-bottom: 8px; }
html.keyboard-open .shell.is-chat .conversation-heading { display: none; }
@media (min-width: 900px) {
  .shell.is-chat .content { width: 100%; margin: 0; }
  .shell.is-chat .composer { left: auto; bottom: auto; width: 100%; }
  .shell.is-chat .conversation-heading { padding-inline: max(18px,calc((100% - var(--conversation-width))/2)); }
}
