:root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, sans-serif; background: #05080d; color: #f5f8fb; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 50% 0%, #173044 0, #09111a 36%, #030609 78%); }
button, input, textarea, select { font: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid rgba(145,215,255,.45); outline-offset: 3px; }
.app-shell { width: min(980px, calc(100% - 40px)); min-height: 100vh; margin: 0 auto; padding: clamp(24px, 5vw, 56px) 0; }
.app-header { display: flex; justify-content: space-between; align-items: end; gap: 32px; padding: 0 8px 28px; }
.app-header > div { max-width: 620px; }
.app-header .intro { max-width: 360px; padding-bottom: 4px; font-size: 14px; }
.app-tabs { position: sticky; top: 12px; z-index: 20; display: flex; gap: 6px; width: fit-content; margin: 0 0 16px; padding: 6px; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; background: rgba(8,16,24,.86); box-shadow: 0 12px 40px rgba(0,0,0,.28); backdrop-filter: blur(22px); }
.app-tab { min-height: 40px; padding: 0 20px; color: #9fb2c0; background: transparent; font-size: 13px; }
.app-tab:hover:not(:disabled) { color: #eaf6ff; background: rgba(255,255,255,.07); transform: none; }
.app-tab[aria-selected="true"] { color: #07131b; background: #bceaff; }
.setup-required-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 16px; padding: 14px 16px; border: 1px solid rgba(233,199,147,.3); border-radius: 18px; background: rgba(187,129,41,.11); }
.setup-required-banner[hidden] { display: none; }
.setup-required-banner > div { display: grid; gap: 3px; }
.setup-required-banner strong { color: #f5dfbd; font-size: 14px; }
.setup-required-banner span { color: #bda98c; font-size: 12px; line-height: 1.4; }
.setup-required-banner button { min-height: 38px; flex: 0 0 auto; padding: 0 16px; font-size: 12px; }
.tab-panel { min-height: 520px; padding: clamp(18px, 4vw, 36px); border: 1px solid rgba(255,255,255,.14); border-radius: 28px; background: linear-gradient(145deg, rgba(19,30,42,.9), rgba(10,17,25,.82)); box-shadow: 0 32px 100px rgba(0,0,0,.45), inset 0 1px rgba(255,255,255,.04); backdrop-filter: blur(32px); }
.tab-panel[hidden] { display: none; }
.eyebrow { margin: 0; color: #8fd7fa; letter-spacing: .13em; text-transform: uppercase; font-size: 11px; font-weight: 700; }
h1 { margin: 12px 0 14px; font-size: clamp(42px, 8vw, 70px); line-height: .98; font-weight: 560; letter-spacing: -.055em; }
h2 { margin: 5px 0 0; font-size: 22px; letter-spacing: -.025em; }
.intro { max-width: 650px; margin: 0; color: #aebdca; font-size: 17px; line-height: 1.6; }
form { display: grid; gap: 16px; margin-top: 28px; }
label { display: grid; gap: 8px; color: #dce8f1; font-size: 13px; font-weight: 560; }
.field-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 20px; }
.field-status { color: #9dafbd; font-size: 12px; font-weight: 650; }
.field-status[data-state="valid"] { color: #8ee4bd; }
.field-status[data-state="invalid"] { color: #ffaaa3; }
input, textarea, select { width: 100%; border: 1px solid rgba(255,255,255,.13); border-radius: 15px; padding: 14px 16px; color: white; background: rgba(22,34,46,.92); outline: none; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
input:hover, textarea:hover, select:hover { border-color: rgba(255,255,255,.22); }
input:focus, textarea:focus, select:focus { border-color: rgba(126,211,255,.72); background: #172634; box-shadow: 0 0 0 4px rgba(72,177,230,.11); }
input[aria-invalid="true"] { border-color: rgba(255,130,121,.65); }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.connection-form { gap: 14px; padding: 22px; border: 1px solid rgba(145,215,255,.18); border-radius: 22px; background: rgba(8,16,24,.42); }
.gemini-setup-guide { display: grid; gap: 9px; padding: 18px; border: 1px solid rgba(145,215,255,.3); border-radius: 17px; background: rgba(55,142,186,.09); }
.gemini-setup-guide[hidden] { display: none; }
.gemini-setup-guide h3 { margin: 0; color: #edf8ff; font-size: 19px; }
.gemini-setup-guide p:not(.eyebrow) { margin: 0; color: #b7c9d5; font-size: 13px; line-height: 1.55; }
.gemini-setup-guide a { width: fit-content; color: #9edfff; font-size: 13px; font-weight: 700; text-underline-offset: 3px; }
.connection-state { display: flex; align-items: center; gap: 12px; min-height: 38px; }
.connection-hint { color: #8699a8; font-size: 12px; }
button { min-height: 48px; border: 0; border-radius: 999px; padding: 0 22px; color: #06121a; background: #bceaff; font-weight: 720; cursor: pointer; transition: transform .18s ease, background .18s ease, opacity .18s ease; }
button:hover:not(:disabled) { transform: translateY(-1px); background: #d2f1ff; }
button:active:not(:disabled) { transform: translateY(0); }
button.secondary { color: #eaf6ff; background: rgba(255,255,255,.075); border: 1px solid rgba(255,255,255,.15); }
button.secondary:hover:not(:disabled) { background: rgba(255,255,255,.13); }
button:disabled { opacity: .42; cursor: not-allowed; }
.microphone-control { position: relative; min-height: 38px; padding: 0 14px 0 34px; font-size: 12px; }
.microphone-control::before { content: ''; position: absolute; left: 14px; width: 9px; height: 9px; border-radius: 50%; background: #91a6b7; box-shadow: 0 0 0 4px rgba(145,166,183,.12); }
.microphone-control[data-state="ready"] { width: auto; min-width: 0; padding-right: 14px; color: #a9e8cc; border-color: rgba(93,218,158,.26); background: rgba(51,157,108,.11); opacity: 1; }
.microphone-control[data-state="ready"]::before { background: #65d69d; box-shadow: 0 0 0 4px rgba(101,214,157,.12); }
.microphone-control[data-state="denied"] { color: #ffc0ba; border-color: rgba(255,130,121,.3); }
.microphone-control[data-state="denied"]::before { background: #ff8279; }
.enter-button { width: 100%; min-height: 58px; margin-top: 3px; font-size: 16px; box-shadow: 0 12px 30px rgba(82,181,227,.13); }
.setup-status { margin: 0; padding: 10px 12px; border-radius: 12px; color: #b6c5d0; background: rgba(255,255,255,.045); font-size: 13px; line-height: 1.45; }
.setup-status:empty { display: none; }
.setup-status[data-tone="error"] { color: #ffc0ba; background: rgba(190,69,60,.12); }
.setup-status[data-tone="success"] { color: #a9e8cc; background: rgba(51,157,108,.1); }
.assistant-form { margin: 0; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.plan-state { padding: 5px 9px; border-radius: 999px; color: #96a9b8; background: rgba(255,255,255,.06); font-size: 11px; font-weight: 650; }
.plan-state[data-state="planning"], .plan-state[data-state="preparing_draft"] { color: #9ad9f7; background: rgba(72,177,230,.1); }
.plan-state[data-state="awaiting_choice"], .plan-state[data-state="review"] { color: #e9c793; background: rgba(187,129,41,.11); }
.plan-state[data-state="complete"] { color: #a9e8cc; background: rgba(51,157,108,.1); }
.chat-thread { display: grid; align-content: start; gap: 9px; min-height: 280px; max-height: 52vh; overflow-y: auto; padding: 18px 2px; scroll-behavior: smooth; }
.chat-thread:empty::before { content: 'Ask a question, plan recurring work, or enter XR to continue by voice.'; align-self: center; justify-self: center; max-width: 420px; padding: 70px 20px; color: #718897; text-align: center; font-size: 13px; line-height: 1.6; }
.chat-message { width: fit-content; max-width: 84%; margin: 0; padding: 10px 13px; border-radius: 15px 15px 15px 5px; color: #c3d1db; background: rgba(255,255,255,.065); font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message.user { justify-self: end; border-radius: 15px 15px 5px 15px; color: #07131b; background: #aadaf1; }
.chat-message.status { color: #8fa5b5; background: transparent; padding: 3px 2px; font-size: 12px; }
.chat-message.error { color: #ffc0ba; background: rgba(190,69,60,.12); }
.chat-message.pending { min-width: 48px; color: transparent; }
.chat-message.pending::after { content: '•••'; color: #8fa5b5; letter-spacing: .18em; animation: pulse 1.2s ease-in-out infinite; }
.chat-message.boundary { justify-self: center; max-width: 100%; color: #8196a5; background: transparent; font-size: 11px; text-align: center; }
.use-case-question { display: grid; gap: 14px; padding: 17px; border: 1px solid rgba(145,215,255,.25); border-radius: 17px; background: rgba(55,142,186,.08); }
.use-case-question[hidden] { display: none; }
.memory-proposal { display: grid; gap: 12px; padding: 18px; border: 1px solid rgba(145,215,255,.3); border-radius: 18px; background: rgba(55,142,186,.09); }
.memory-proposal[hidden] { display: none; }
.memory-proposal h2 { margin: 0; }
.memory-proposal textarea { min-height: 86px; }
.use-case-question h3 { margin: 0; color: #edf8ff; font-size: 16px; line-height: 1.4; }
.choice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.choice-option { display: flex; min-height: 48px; height: auto; align-items: flex-start; justify-content: center; flex-direction: column; gap: 3px; border-radius: 13px; padding: 10px 13px; text-align: left; }
.choice-option small, .choice-check small { color: #8fd7fa; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.choice-list.multiple { grid-template-columns: 1fr; }
.choice-check { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 11px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.035); cursor: pointer; }
.choice-check input { width: 18px; height: 18px; flex: 0 0 auto; }
.choice-check span { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.custom-choice { display: flex; gap: 9px; }
.custom-choice button { min-height: 40px; }
.custom-choice input { min-height: 44px; }
.question-actions { margin-top: 0; }
.inline-draft { margin-top: 0; }
.use-case-draft[data-status="collecting"] .actions { display: none; }
.assistant-form textarea { min-height: 96px; }
.assistant-form textarea:disabled { border-color: rgba(255,255,255,.08); color: #718391; background: rgba(15,25,34,.72); opacity: .58; cursor: not-allowed; }
.assistant-actions { display: flex; align-items: center; gap: 10px; }
#send-natural-input, #enter-xr { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 9px; }
#enter-xr { margin-left: auto; }
.ask-action-icon, .view-space-logo { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ask-action-icon { fill: currentColor; stroke: none; }
.plan-state[data-state="listening"], .plan-state[data-state="standby"] { color: #8ee4bd; background: rgba(51,157,108,.1); }
.plan-state[data-state="thinking"], .plan-state[data-state="speaking"], .plan-state[data-state="connecting"], .plan-state[data-state="greeting"] { color: #8fd7fa; background: rgba(72,177,230,.1); }
.actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
fieldset { min-width: 0; margin: 0; padding: 18px; border: 1px solid rgba(255,255,255,.1); border-radius: 17px; background: rgba(0,0,0,.08); }
legend { padding: 0 8px; color: #8fd7fa; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.schedule-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.schedule-fields .check-label { grid-column: 1 / -1; }
.check-label { display: flex; align-items: center; gap: 10px; }
.check-label input { width: 20px; height: 20px; flex: 0 0 auto; }
.agent-studio { padding: 0; }
.agent-studio > summary { display: flex; flex-direction: column; gap: 4px; margin: 0 -22px; padding: 20px 22px; cursor: pointer; color: #eaf6ff; font-weight: 680; list-style-position: inside; }
.agent-studio > summary small { margin-left: 22px; color: #8296a5; font-size: 12px; font-weight: 450; }
.agent-studio[open] > summary { border-bottom: 1px solid rgba(255,255,255,.08); }
.use-case-draft { margin-top: 18px; padding: 20px; border: 1px solid rgba(145,215,255,.3); border-radius: 18px; background: rgba(55,142,186,.09); }
.use-case-draft[hidden] { display: none; }
.use-case-draft h2 { margin: 5px 0 8px; font-size: 24px; }
.use-case-draft > p { white-space: pre-wrap; line-height: 1.5; }
.draft-facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 16px 0; font-size: 13px; }
.draft-facts dt { color: #91a6b7; }
.draft-facts dd { margin: 0; color: #edf8ff; }
.automation-toolbar { display: flex; align-items: end; gap: 12px; margin-top: 16px; }
.automation-toolbar label { flex: 1; }
.automation-toolbar button { flex: 0 0 auto; }
.provider-settings { display: grid; gap: 12px; }
.knowledge-folder-setting { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid rgba(255,255,255,.1); border-radius: 17px; background: rgba(0,0,0,.08); }
.knowledge-folder-setting > div { display: grid; min-width: 0; gap: 5px; }
.knowledge-folder-setting strong { color: #edf8ff; font-size: 14px; line-height: 1.3; }
.knowledge-folder-setting span { color: #8296a5; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.knowledge-folder-setting span[data-state="ready"] { color: #a9c3d4; }
.knowledge-folder-setting button { min-height: 40px; padding: 0 17px; white-space: nowrap; }
.memory-settings { display: grid; gap: 12px; }
.memory-settings[hidden] { display: none; }
.memory-settings > p { margin: 0; }
.memory-list { display: grid; gap: 10px; }
.memory-item { display: grid; gap: 9px; padding: 13px; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: rgba(5,11,17,.34); }
.memory-item textarea { min-height: 72px; }
.memory-meta { display: flex; flex-wrap: wrap; gap: 8px; color: #8296a5; font-size: 11px; }
.warning { margin: 18px 0 0; padding: 12px 14px; border-radius: 12px; color: #e9c793; background: rgba(187,129,41,.09); font-size: 12px; line-height: 1.45; }
#studio-status { color: #aebdca; font-size: 13px; }
#studio-status:empty { display: none; }
.use-case-list { display: grid; gap: 10px; margin-top: 16px; }
.use-case-item { display: grid; gap: 7px; padding: 17px; border: 1px solid rgba(255,255,255,.075); border-radius: 16px; background: rgba(5,11,17,.38); color: #bcd0df; font-size: 13px; }
.use-case-item strong { color: white; font-size: 15px; }
.item-meta { color: #91a6b7; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.status-badge { justify-self: start; padding: 4px 8px; border-radius: 999px; color: #a9e8cc; background: rgba(51,157,108,.12); }
.status-badge[data-tone="warning"] { color: #e9c793; background: rgba(187,129,41,.12); }
.actions.compact { flex-wrap: wrap; gap: 8px; margin-top: 7px; }
.actions.compact button, .run-item > button { min-height: 34px; padding: 0 13px; font-size: 11px; }
.studio-section { margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.085); }
.studio-section h2 { margin: 0 0 13px; font-size: 16px; font-weight: 680; }
.run-list, .artifact-list { display: grid; gap: 10px; }
.run-item, .artifact-item { display: grid; gap: 8px; padding: 17px; border: 1px solid rgba(255,255,255,.075); border-radius: 16px; background: rgba(4,9,15,.38); }
.run-item.status-failed { border-color: rgba(255,118,118,.3); }
.artifact-item.status-awaiting_review { border-color: rgba(145,215,255,.3); }
.artifact-item textarea { min-height: 180px; line-height: 1.5; }
.artifact-sources { display: flex; flex-wrap: wrap; gap: 7px; }
.artifact-sources a { max-width: 100%; padding: 5px 9px; border-radius: 999px; color: #bceaff; background: rgba(93,186,233,.1); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-state { margin: 0; padding: 20px; border: 1px dashed rgba(255,255,255,.11); border-radius: 15px; color: #7f94a4; text-align: center; font-size: 12px; line-height: 1.5; }
.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; }
@media (max-width: 600px) {
  .automation-toolbar { align-items: stretch; flex-direction: column; }
  .app-shell { width: min(100% - 20px, 980px); padding: 20px 0; }
  .app-header { display: block; padding: 0 6px 22px; }
  .app-header .intro { margin-top: 14px; }
  .app-tabs { top: 8px; width: 100%; overflow-x: auto; }
  .app-tab { flex: 1; padding: 0 14px; }
  .setup-required-banner { align-items: stretch; flex-direction: column; }
  .setup-required-banner button { width: 100%; }
  .tab-panel { min-height: 0; padding: 22px 16px; border-radius: 22px; }
  .connection-form { padding: 17px; }
  .knowledge-folder-setting { grid-template-columns: 1fr; align-items: stretch; }
  .knowledge-folder-setting button { width: 100%; }
  .schedule-fields { grid-template-columns: 1fr; }
  .schedule-fields .check-label { grid-column: auto; }
  .actions { flex-wrap: wrap; }
  .actions:not(.compact) button { width: 100%; }
  .connection-state { align-items: flex-start; flex-direction: column; gap: 8px; }
  .choice-list { grid-template-columns: 1fr; }
  .chat-message { max-width: 94%; }
  .custom-choice { align-items: stretch; flex-direction: column; }
  .draft-facts { grid-template-columns: 1fr; gap: 3px; }
  .draft-facts dd { margin-bottom: 7px; }
  .assistant-actions { align-items: stretch; flex-direction: column; }
  .assistant-actions button { width: 100%; }
}
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* AI-native companion shell */
:root { background: #090d10; color: #f8f5ec; }
body {
  background:
    radial-gradient(circle at 18% 4%, rgba(115,191,207,.13), transparent 31%),
    radial-gradient(circle at 86% 16%, rgba(231,181,101,.1), transparent 28%),
    linear-gradient(160deg, #10171b 0%, #080c0f 52%, #050708 100%);
  background-attachment: fixed;
}
.app-shell { width: min(1180px, calc(100% - 44px)); padding: clamp(26px, 5vw, 64px) 0 80px; }
.app-header { align-items: center; padding: 0 4px 34px; }
.brand-lockup { display: flex; align-items: center; gap: 22px; }
.brand-lockup > div { max-width: 680px; }
.web-orb, .presence-orb {
  position: relative; display: block; flex: 0 0 auto; border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #fffbed 0 8%, #a6eef0 28%, #4c9cae 54%, rgba(35,88,101,.25) 70%);
  box-shadow: 0 0 16px rgba(174,244,243,.8), 0 0 52px rgba(89,191,202,.3), 0 0 82px rgba(234,186,106,.1);
  animation: living-breath 4.8s ease-in-out infinite;
}
.web-orb { width: 68px; height: 68px; }
.web-orb::before, .presence-orb::before {
  content: ''; position: absolute; inset: -12px; border: 1px solid rgba(182,241,239,.22); border-radius: inherit;
  box-shadow: inset 0 0 18px rgba(167,235,235,.08);
}
.app-header h1 { margin: 8px 0 0; font-size: clamp(42px, 6vw, 72px); color: #fbf8ef; }
.app-header .intro { color: #abb9b8; }
.eyebrow { color: #9bdedd; }
.experience-layout { display: grid; grid-template-columns: 228px minmax(0, 1fr); gap: 22px; align-items: start; }
.companion-rail {
  position: sticky; top: 20px; display: grid; gap: 14px; padding: 16px;
  border: 1px solid rgba(235,241,232,.1); border-radius: 26px;
  background: linear-gradient(160deg, rgba(24,34,37,.8), rgba(11,17,19,.7));
  box-shadow: 0 22px 70px rgba(0,0,0,.3); backdrop-filter: blur(28px);
}
.presence-card { display: flex; align-items: center; gap: 13px; padding: 12px; border-radius: 18px; background: rgba(255,255,255,.045); }
.presence-orb { width: 34px; height: 34px; }
.presence-orb::before { inset: -6px; }
.presence-card > div { display: grid; min-width: 0; gap: 3px; }
.presence-card small, .rail-label { color: #7e9697; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.presence-card strong { color: #eaf3ee; font-size: 12px; line-height: 1.35; }
.presence-card[data-state="listening"] .presence-orb { filter: hue-rotate(4deg) saturate(1.25); box-shadow: 0 0 22px rgba(113,239,232,.9), 0 0 58px rgba(58,186,194,.45); }
.presence-card[data-state="thinking"] .presence-orb { filter: hue-rotate(22deg); }
.presence-card[data-state="speaking"] .presence-orb { filter: sepia(.35) saturate(1.4); box-shadow: 0 0 22px rgba(255,207,125,.8), 0 0 58px rgba(219,152,60,.3); }
.rail-label { margin: 9px 10px 0; }
.app-tabs { position: static; display: grid; width: 100%; gap: 5px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.app-tab { width: 100%; min-height: 45px; padding: 0 13px; border-radius: 14px; color: #94a5a5; text-align: left; }
.app-tab:hover:not(:disabled) { color: #f7f5ed; background: rgba(255,255,255,.055); }
.app-tab[aria-selected="true"] { color: #172022; background: linear-gradient(135deg, #eef5e9, #bfe7e2); box-shadow: 0 8px 24px rgba(99,183,182,.16); }
.hand-hint { margin: 10px 8px 2px; color: #718887; font-size: 11px; line-height: 1.55; }
.hand-hint span { display: inline-grid; width: 21px; height: 21px; margin-right: 4px; place-items: center; border: 1px solid rgba(157,221,217,.22); border-radius: 50%; color: #9bdedd; }
.experience-stage { min-width: 0; }
.tab-panel {
  min-height: 650px; border-color: rgba(240,244,233,.11); border-radius: 30px;
  background: linear-gradient(155deg, rgba(23,32,35,.88), rgba(10,15,17,.83));
  box-shadow: 0 34px 110px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.035);
}
#panel-ask { padding: clamp(22px, 4vw, 40px); }
#panel-ask h2 { max-width: 620px; margin-top: 8px; font-size: clamp(25px, 4vw, 39px); font-weight: 540; letter-spacing: -.035em; }
.plan-state { color: #9fb1ae; background: rgba(255,255,255,.055); }
.chat-thread { min-height: 320px; max-height: 48vh; padding: 24px 3px; }
.chat-thread:empty::before { content: 'Your conversation becomes a living activity stream. Ask once, then continue naturally in web or XR.'; color: #6f8585; }
.chat-message { padding: 12px 15px; border-radius: 18px 18px 18px 7px; color: #d2ddda; background: rgba(255,255,255,.055); }
.chat-message.user { border-radius: 18px 18px 7px 18px; color: #172022; background: linear-gradient(135deg, #eef2df, #b9e2de); }
.active-run {
  display: grid; gap: 12px; margin: 0 0 20px; padding: 16px; border: 1px solid rgba(155,222,221,.2);
  border-radius: 20px; background: linear-gradient(145deg, rgba(30,48,50,.62), rgba(10,17,19,.72));
}
.active-run[hidden] { display: none; }
.run-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.run-heading h3 { margin: 3px 0 0; color: #edf4ef; font-size: 15px; font-weight: 580; }
.run-status { padding: 5px 9px; border-radius: 999px; color: #b8ceca; background: rgba(255,255,255,.06); font-size: 10px; text-transform: capitalize; }
.run-status[data-status="completed"] { color: #bce9d5; background: rgba(91,190,144,.12); }
.run-status[data-status="failed"], .run-status[data-status="cancelled"] { color: #f2c0b5; background: rgba(210,96,75,.12); }
.run-status[data-status="waiting_user"] { color: #f1d49f; background: rgba(221,167,70,.12); }
.run-timeline { display: grid; gap: 7px; max-height: 230px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.run-event { display: flex; justify-content: space-between; gap: 12px; padding: 7px 9px; border-left: 2px solid rgba(137,211,207,.28); color: #b7c7c4; background: rgba(255,255,255,.025); font-size: 11px; }
.run-event time { flex: 0 0 auto; color: #657b7c; }
.event-tool-failed, .event-run-failed { border-left-color: #d87666; color: #efb7ad; }
.event-permission-requested { border-left-color: #d9ad66; color: #edd2a5; }
.diagnostics-section .section-heading { align-items: center; }
.diagnostics-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 16px; margin: 0; }
.diagnostics-grid dt { color: #789092; font-size: 11px; }
.diagnostics-grid dd { margin: 0; color: #d4dfdb; font-size: 11px; }
.natural-composer {
  display: grid; gap: 11px; padding: 12px; border: 1px solid rgba(174,232,226,.2); border-radius: 24px;
  background: linear-gradient(145deg, rgba(39,58,61,.78), rgba(17,26,28,.84));
  box-shadow: 0 18px 52px rgba(0,0,0,.26), 0 0 50px rgba(81,177,180,.06);
}
.assistant-form .natural-composer textarea { min-height: 78px; padding: 13px 14px; border: 0; border-radius: 15px; background: rgba(4,9,10,.22); box-shadow: none; }
.assistant-form .natural-composer textarea:focus { background: rgba(4,9,10,.36); box-shadow: 0 0 0 2px rgba(148,224,219,.2); }
.natural-composer button { min-height: 44px; }
button { color: #172022; background: linear-gradient(135deg, #f0f1dc, #b7e5df); }
button:hover:not(:disabled) { background: linear-gradient(135deg, #fffdf2, #cef2ed); }
button.secondary { color: #e9f0ec; background: rgba(255,255,255,.055); border-color: rgba(255,255,255,.12); }
input, textarea, select { border-color: rgba(240,245,234,.11); background: rgba(22,31,33,.9); }
input:focus, textarea:focus, select:focus { border-color: rgba(149,224,219,.68); background: #19292a; box-shadow: 0 0 0 4px rgba(91,184,182,.1); }
.connection-form { border-color: rgba(235,241,232,.1); background: rgba(8,13,14,.28); }
body[data-transcript="hidden"] .chat-thread { min-height: 110px; max-height: 110px; overflow: hidden; }
body[data-transcript="hidden"] .chat-thread > * { display: none; }
body[data-transcript="hidden"] .chat-thread::before { content: 'Transcript hidden. 0OS remains available through the composer and voice.'; display: block; padding: 30px 12px; color: #718887; text-align: center; font-size: 12px; }
body[data-reduced-motion="true"] .web-orb, body[data-reduced-motion="true"] .presence-orb { animation: none; }

@keyframes living-breath {
  0%, 100% { transform: scale(.96); filter: brightness(.92); }
  50% { transform: scale(1.04); filter: brightness(1.12); }
}

@media (max-width: 820px) {
  .app-shell { width: min(100% - 22px, 760px); }
  .app-header { display: grid; gap: 18px; }
  .experience-layout { grid-template-columns: 1fr; }
  .companion-rail { position: static; grid-template-columns: minmax(150px, 1fr) minmax(260px, 2fr); align-items: center; }
  .companion-rail .rail-label, .hand-hint { display: none; }
  .app-tabs { display: flex; overflow-x: auto; }
  .app-tab { width: auto; flex: 1 0 max-content; text-align: center; }
}

@media (max-width: 600px) {
  .app-shell { width: min(100% - 18px, 560px); padding-top: 22px; }
  .brand-lockup { align-items: flex-start; gap: 16px; }
  .web-orb { width: 48px; height: 48px; margin-top: 5px; }
  .app-header h1 { font-size: 43px; }
  .companion-rail { grid-template-columns: 1fr; padding: 10px; border-radius: 21px; }
  .presence-card { display: none; }
  .app-tabs { position: static; width: 100%; }
  .tab-panel { border-radius: 24px; }
  .natural-composer { border-radius: 19px; }
}

