/* Live talk: shared workspace shell, comfortable reading, and a reachable composer. */
.chat-page main { width: min(920px, 100%); min-width: 0; margin: 0 auto; padding: 30px 40px 0; flex: 1; display: flex; flex-direction: column; }
.presence { text-align: center; padding: 18px 0 0; }
.agent-orb { position: relative; width: 112px; height: 112px; margin: 0 auto 18px; display: grid; place-items: center; }
.orb-core { width: 54%; height: 54%; border-radius: 50%; background: radial-gradient(circle at 32% 27%, #eee8ff, #b29bf0 32%, #504479 66%, #191b2b 90%); box-shadow: inset -9px -8px 14px #151126, 0 0 36px #ae91ff2b; animation: breathe 6s ease-in-out infinite; }
.orb-halo { position: absolute; inset: -25%; background: radial-gradient(circle, #9f83fc16, transparent 65%); border-radius: 50%; }
.orb-ring { position: absolute; width: 94%; height: 37%; border: 1px solid #c1a9ff70; border-radius: 50%; transform: rotate(-32deg); box-shadow: 0 0 9px #a88aff18; }
.orb-ring.second { width: 92%; height: 74%; border-color: #a797d82a; transform: rotate(48deg); }
.presence-label { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: #bcb1d3; }
#presence-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px #b7a5f655; }
.presence h1 { font-size: clamp(30px, 3vw, 40px); line-height: 1.25; font-weight: 450; letter-spacing: -1.3px; margin: 22px 0 14px; }
.presence h1 span { color: var(--muted); }
#welcome-copy { margin: 0 0 30px; color: var(--muted); font-size: 14px; }
.suggestions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 4px 0 32px; }
.suggestions button { position: relative; text-align: left; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(125deg, #ffffff04, transparent); color: var(--text); transition: border-color .2s, transform .2s; }
.suggestions button:hover { border-color: #c1b2ff50; transform: translateY(-2px); background: var(--accent-soft); }
.suggestions span { display: block; margin-bottom: 18px; font: 11px ui-monospace, monospace; color: var(--accent); }
.suggestions strong { display: block; font-size: 14px; font-weight: 550; }
.suggestions small { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.suggestions b { position: absolute; right: 16px; top: 14px; color: var(--muted); font-weight: 400; }
.conversation { margin-top: auto; min-width: 0; }
.history-controls { display: flex; align-items: center; gap: 14px; margin: 8px 0 18px; }
.history-rule { height: 1px; background: var(--border); flex: 1; }
.message { padding: 22px 0; min-width: 0; animation: appear .25s ease-out; }
.message-head { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.message-avatar { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.message-author { font-size: 13px; font-weight: 600; color: #ddd3ff; }
.message time { margin-left: auto; font-size: 11px; color: var(--muted); }
.message-body { color: #dbdce9; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; min-width: 0; }
.message-body p { margin: 0 0 14px; }
.message-body>:first-child { margin-top: 0; }
.message-body>:last-child { margin-bottom: 0; }
.message-body strong { font-weight: 650; color: #f1edff; }
.message-body em { color: #e0d5f3; }
.message-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.message-body a:hover { color: #e3d8ff; }
.message-body ul, .message-body ol { padding-left: 24px; margin: 12px 0 18px; }
.message-body li { padding-left: 3px; margin: 6px 0; }
.message-body li::marker { color: var(--accent); }
.message-body li>p { margin-bottom: 6px; }
.message-body li ul, .message-body li ol { margin-block: 6px; }
.message-body h2, .message-body h3, .message-body h4, .message-body h5, .message-body h6 { margin: 26px 0 12px; color: var(--text); line-height: 1.4; font-weight: 600; letter-spacing: -.25px; }
.message-body h2 { font-size: 22px; }
.message-body h3 { font-size: 19px; }
.message-body h4, .message-body h5, .message-body h6 { font-size: 16px; }
.message-body blockquote { margin: 18px 0; padding: 12px 18px; border-left: 3px solid #b4a0ff90; border-radius: 0 9px 9px 0; color: #bbb4cc; background: var(--accent-soft); }
.message-body blockquote>:last-child { margin-bottom: 0; }
.message-body hr { margin: 24px 0; border: 0; border-top: 1px solid var(--border); }
.message-body :not(pre)>code { padding: 3px 6px; border: 1px solid var(--border); border-radius: 5px; color: #ddd0ff; background: #b4a0ff0c; font: .88em ui-monospace, SFMono-Regular, Consolas, monospace; }
.code-block { margin: 18px 0; border: 1px solid #ffffff1a; border-radius: 12px; overflow: hidden; background: #080a11; }
.code-heading { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 0 14px; border-bottom: 1px solid var(--border); color: var(--muted); background: #ffffff03; font: 11px ui-monospace, SFMono-Regular, monospace; }
.code-heading .quiet-button { padding: 6px 8px; font-family: inherit; }
.message-body pre { margin: 0; padding: 16px; overflow-x: auto; white-space: pre; tab-size: 2; line-height: 1.65; }
.message-body pre code { font: 13px ui-monospace, SFMono-Regular, Consolas, monospace; color: #d9d8e9; }
.markdown-table { max-width: 100%; margin: 18px 0; overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.markdown-table table { border-collapse: collapse; min-width: 100%; font-size: 13px; }
.markdown-table th, .markdown-table td { min-width: 100px; padding: 10px 14px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: left; }
.markdown-table th { color: #e2d8ff; background: var(--accent-soft); font-weight: 550; }
.markdown-table tr:last-child td { border-bottom: 0; }
.markdown-table th:last-child, .markdown-table td:last-child { border-right: 0; }
.task-list-item { list-style: none; }
.task-check { display: inline-block; margin-left: -22px; width: 22px; color: var(--accent); }
.message.user { margin: 12px 0 10px 12%; padding: 18px 20px 10px; border: 1px solid var(--border); border-radius: 18px 18px 4px 18px; background: #ffffff04; }
.message.user .message-avatar { display: none; }
.message.user .message-author { color: #d0d1e0; }
.message.user p { white-space: pre-wrap; }
.message-actions { display: flex; gap: 10px; margin-top: 5px; }
.message-actions .quiet-button { padding-inline: 0; font-size: 11px; }
.message-failed { margin-top: 12px; font-size: 12px; color: var(--danger); }
.processing { display: flex; align-items: center; gap: 12px; padding: 20px 0; font-size: 13px; color: #c2b7d9; }
#elapsed { margin-left: auto; color: var(--muted); font: 11px ui-monospace, monospace; }
.wave { display: flex; align-items: center; gap: 4px; height: 24px; }
.wave i { width: 3px; height: 6px; border-radius: 3px; background: var(--accent); animation: wave 1.3s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: .15s; }
.wave i:nth-child(3) { animation-delay: .3s; }
.wave i:nth-child(4) { animation-delay: .45s; }
.wave i:nth-child(5) { animation-delay: .6s; }
.composer-area { position: sticky; bottom: 0; z-index: 2; margin-top: 18px; padding: 18px 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--background) 16px); }
.composer { border: 1px solid #c1b2ff3b; border-radius: 18px; background: #181b27; padding: 15px 16px 10px; box-shadow: 0 8px 32px #0003; transition: border-color .2s; }
.composer:focus-within { border-color: #c1b2ff90; }
#chat-input { display: block; width: 100%; min-height: 44px; max-height: 180px; resize: none; border: 0; border-radius: 0; padding: 2px 0 8px; background: transparent; color: var(--text); font-size: 16px; line-height: 1.6; }
#chat-input:focus-visible { outline: none; }
.composer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.composer-brand { font-size: 11px; color: var(--muted); }
.composer-brand>span { color: var(--accent); margin-right: 6px; }
#chat-send { width: 44px; height: 44px; flex-shrink: 0; border: 0; border-radius: 12px; color: #211b38; background: var(--accent); font-size: 25px; font-weight: 550; }
#chat-send:hover:not(:disabled) { background: #d6caff; }
.composer-footnote { display: flex; justify-content: space-between; gap: 12px; padding: 10px 4px 0; color: var(--muted); font-size: 10px; }
.has-messages .presence { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 4px 0 18px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.has-messages .agent-orb { width: 40px; height: 40px; margin: 0; }
.has-messages .presence h1, .has-messages #welcome-copy { display: none; }
.has-messages .presence-label { font-size: 10px; }
.has-messages .conversation { margin-top: 0; }
.has-messages .composer-area { margin-top: auto; }
.agent-orb[data-state=thinking] .orb-core, .agent-orb[data-state=processing] .orb-core { animation: breathe 1.5s ease-in-out infinite; }
.agent-orb[data-state=error] .orb-core { filter: hue-rotate(55deg); }
.focus-mode .rail { display: none; }
.focus-mode .app-shell { margin-left: 0; min-height: 100dvh; }
@keyframes breathe { 50% { transform: scale(1.08); box-shadow: inset -9px -8px 14px #151126, 0 0 42px #ae91ff40; } }
@keyframes wave { 50% { height: 20px; } }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 1050px) { .chat-page main { padding: 24px 28px 0; } .suggestions { gap: 10px; } .suggestions button { padding: 16px 13px; } }
@media (max-width: 760px) {
  .chat-page main { padding: 20px 16px 0; }
  .presence { padding-top: 8px; }
  .agent-orb { width: 86px; height: 86px; margin-bottom: 16px; }
  .presence h1 { font-size: 30px; margin-top: 18px; }
  #welcome-copy { font-size: 13px; margin-bottom: 24px; }
  .suggestions { grid-template-columns: 1fr; gap: 8px; margin-bottom: 16px; }
  .suggestions button { padding: 13px 36px 13px 44px; border-radius: 11px; }
  .suggestions span { position: absolute; left: 14px; top: 17px; margin: 0; }
  .suggestions strong { font-size: 13px; }
  .suggestions small { margin-top: 2px; font-size: 11px; }
  .suggestions b { top: 20px; }
  .message { padding: 18px 0; }
  .message-body { font-size: 15px; line-height: 1.8; }
  .message time { font-size: 10px; }
  .message.user { margin-left: 5%; padding: 16px 16px 8px; }
  .message-body h2 { font-size: 20px; }
  .message-body h3 { font-size: 18px; }
  .message-body pre { padding: 14px; }
  .composer-area { padding-top: 14px; }
  .composer { padding: 12px 13px 9px; border-radius: 15px; }
  .composer-brand { font-size: 10px; }
  .composer-footnote { font-size: 10px; }
  .has-messages .presence { padding-top: 0; }
  .chat-page .main-footer { display: none; }
}
