.conversation-first:not(.debug-open) :is(.bottom, .side-tools, .flight-state) { display: none; }
.conversation-first.debug-open .companion { display: none; }
.companion {
  position: absolute; bottom: calc(48px + env(safe-area-inset-bottom)); right: 20px;
  width: 380px; max-height: calc(100% - var(--header-height) - 64px - env(safe-area-inset-bottom)); z-index: 4;
  display: flex; flex-direction: column; overflow: hidden;
  color: #e9f2ee; background: #102125f5; border: 1px solid #c4e8da26;
  border-radius: 22px; box-shadow: 0 18px 60px #0004;
}
.companion-heading { display: flex; align-items: center; gap: 11px; min-height: 72px; padding: 12px 14px 12px 18px; flex-shrink: 0; border-bottom: 1px solid #ffffff0d; }
.companion .voice-orb { display: grid; place-items: center; width: 38px; height: 38px; min-width: 38px; border: 1px solid #94dcc43b; border-radius: 50%; background: #193a39; color: #9ce6d2; font-size: 26px; }
.companion .voice-orb.connected { box-shadow: 0 0 0 5px #9ce6d21a; }
.companion-identity { min-width: 0; flex: 1; }
.companion-heading strong { display: block; font-size: 14px; font-weight: 600; }
.companion .connection-status { margin: 4px 0 0; padding: 0; background: none; border: 0; color: #9bb8af; font-size: 11px; line-height: 1.4; display: block; }
.companion-heading button { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: #b1c9c2; font-size: 22px; flex-shrink: 0; }
.companion-heading button:hover { background: #ffffff08; }
.companion-body { display: flex; flex-direction: column; min-height: 0; overflow: auto; padding: 22px 18px; scrollbar-width: thin; overscroll-behavior: contain; }
.chat-eyebrow { color: #92b9a9; font-size: 10px; letter-spacing: .6px; }
.command-intro { font: 32px/1.15 Georgia, serif; margin: 12px 0; color: #edf4ec; }
.command-hint { font-size: 13px; line-height: 1.65; color: #a0b9b2; margin: 0 0 20px; }
.command-examples { display: grid; gap: 8px; }
.command-examples button { display: flex; align-items: center; gap: 12px; text-align: left; min-height: 58px; padding: 10px 12px; border: 1px solid #c5e4d718; border-radius: 12px; background: #ffffff03; color: #dce9e3; font-size: 12px; line-height: 1.4; }
.command-examples button > span:first-child { display: grid; place-items: center; width: 30px; height: 30px; color: #a4e4c9; background: #a4e4c90a; border-radius: 9px; font-size: 21px; }
.command-examples small { display: block; color: #91aea3; font-size: 11px; margin-top: 3px; }
.command-examples button:hover { border-color: #8ad8b76b; background: #9ce5c909; }
.companion .voice-transcript { display: flex; flex-direction: column; gap: 18px; flex: 1; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 0; margin: 0; }
.companion .voice-transcript:empty, .companion.has-conversation .chat-welcome { display: none; }
.companion.has-conversation .companion-body { height: 420px; overflow: hidden; padding: 18px; }
.chat-bubble { max-width: 94%; flex-shrink: 0; overflow-wrap: anywhere; font-size: 14px; line-height: 1.7; }
.chat-bubble.user { align-self: flex-end; padding: 12px 16px; background: #23473e; border: 1px solid #abe9d013; border-radius: 17px 17px 4px 17px; }
.chat-bubble.assistant { align-self: flex-start; padding: 0 4px; }
.chat-bubble b { display: block; margin-bottom: 6px; font-size: 10px; letter-spacing: .6px; font-weight: 600; color: #a1c7b8; }
.chat-bubble.user b { color: #bad8ca; }
.chat-bubble p { margin: 0 0 10px; white-space: pre-wrap; font-size: 14px; line-height: 1.7; }
.chat-bubble p:last-child { margin-bottom: 0; }
.chat-bubble h4 { font-size: 14px; margin: 12px 0 6px; }
.chat-bubble :is(ul, ol) { padding-left: 20px; }
.chat-bubble a { color: #a4ebd1; text-decoration: underline; }
.chat-latest { align-self: center; min-height: 36px; margin: 8px 0 0; padding: 7px 14px; border: 1px solid #9aceb738; border-radius: 20px; background: #224039; color: #ccedde; font-size: 12px; flex-shrink: 0; }
.companion-composer { flex-shrink: 0; padding: 0 14px 14px; }
.companion .voice-card { margin: 0; padding: 0; border: 0; background: none; }
.companion .voice-card:has(#voice-state[hidden]):has(#voice-controls[hidden]):has(#voice-error:empty) { display: none; }
.companion #voice-state { display: block; font-size: 12px; color: #a3dfc5; padding: 8px 2px; }
.companion #voice-controls { display: flex; gap: 8px; margin: 0 0 8px; }
.companion #voice-controls button { min-height: 44px; font-size: 12px; background: #193932; color: #c2e6d6; border-radius: 10px; }
.companion #voice-error { margin: 0 0 8px; color: #ffc49c; font-size: 12px; line-height: 1.5; }
.companion #voice-error:empty { display: none; }
.chat-form { margin: 0; display: flex; flex-direction: column; align-items: stretch; overflow: hidden; border: 1px solid #c4e5d830; border-radius: 16px; background: #09191c; }
.chat-form:focus-within { border-color: #a1dfc8; box-shadow: 0 0 0 3px #a1dfc810; }
.companion .chat-form textarea { display: block; width: 100%; min-height: 44px; max-height: 120px; resize: none; border: 0; border-radius: 0; background: none; color: #e1f0e6; font: 16px/1.5 system-ui; padding: 12px 14px 4px; outline: none; box-shadow: none; }
.chat-form textarea::placeholder { color: #86a69b; }
.composer-actions { display: flex; align-items: center; gap: 6px; padding: 0 5px 3px; }
.companion .chat-form button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; height: 44px; min-height: 44px; border: 6px solid transparent; border-radius: 50%; background-clip: padding-box; padding: 0; font-size: 12px; font-weight: 500; flex-shrink: 0; }
.companion .chat-form button svg { display: block; width: 16px; height: 16px; flex-shrink: 0; }
.companion #voice-toggle { padding: 0 5px; border-radius: 14px; color: #b5d4c7; background-color: transparent; }
.companion #voice-toggle:hover { background-color: #ffffff08; }
.composer-hint { flex: 1; color: #829e94; font-size: 10px; text-align: right; padding-right: 4px; }
.companion #chat-send { width: 44px; background-color: #a4e7cb; color: #103027; }
.companion #chat-send:disabled { background-color: #253e37; color: #76998a; opacity: 1; cursor: default; }
.companion #command-stop { margin: 0; width: 44px; background-color: #a4e7cb; color: #103027; font-size: 12px; }
.companion.busy #chat-send { display: none; }
.command-status { font-size: 12px; line-height: 1.5; color: #a7cdbb; margin: 0; padding: 10px 4px; max-height: 76px; overflow: auto; }
.command-status:empty { display: none; }
.command-status.error { color: #ffc49c; }
.companion.busy .command-status:not(:empty)::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border: 2px solid #a7cdbb44; border-top-color: #a7cdbb; border-radius: 50%; animation: chat-thinking 1s linear infinite; }
.command-result { width: 100%; min-height: 44px; font-size: 12px; margin: 8px 0; background: #245247; color: #b8ecd5; }
.chat-launcher, .voice-overlay { position: absolute; z-index: 4; right: 20px; bottom: calc(48px + env(safe-area-inset-bottom)); }
.chat-launcher { display: flex; align-items: center; padding: 4px; gap: 2px; border: 1px solid #c4e8da35; border-radius: 30px; background: #102125f5; box-shadow: 0 8px 28px #0003; }
.chat-launcher button { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 8px 14px; border-radius: 24px; background: transparent; color: #e0eee8; font-size: 13px; font-weight: 500; }
.chat-launcher #voice-launch { border-left: 1px solid #ffffff20; border-radius: 0 24px 24px 0; color: #a4e7cb; }
.chat-unread { font-size: 10px; color: #a4e7cb; }
.voice-overlay { width: min(460px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 12px; max-height: calc(100% - var(--header-height) - 64px - env(safe-area-inset-bottom)); pointer-events: none; }
.voice-captions { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: hidden; }
.voice-caption { margin: 0; padding: 12px 16px; border: 1px solid #e3fff01f; border-radius: 16px; background: #0d2027e8; color: #f0f6f2; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; box-shadow: 0 6px 24px #0002; }
.voice-caption.user { align-self: flex-end; max-width: 90%; background: #25483eeb; font-size: 13px; }
.voice-caption strong { display: block; font-size: 10px; color: #b1d4c5; margin-bottom: 3px; }
.voice-caption span { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.voice-toolbar { padding: 10px; border: 1px solid #c4e8da35; border-radius: 20px; background: #102125f5; box-shadow: 0 8px 28px #0003; pointer-events: auto; flex-shrink: 0; }
#voice-overlay-state { display: block; color: #bad9cd; font-size: 12px; padding: 0 6px 6px; }
.voice-overlay-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.voice-overlay-actions button { padding: 8px 12px; min-height: 44px; border-radius: 12px; font-size: 12px; background: #ffffff08; font-weight: 500; }
.voice-overlay-actions .voice-end { margin-left: auto; color: #ffd7ca; background: #6e37364d; }
.chat-launcher button:focus-visible, .voice-overlay button:focus-visible { outline: 2px solid #a4e7cb; outline-offset: -2px; }
.conversation-first.debug-open .chat-launcher { display: none; }
.companion :is(button, a):focus-visible { outline: 2px solid #a4e7cb; outline-offset: -3px; }
.companion [hidden] { display: none !important; }
.result-dialog { width: min(620px, calc(100% - 28px)); max-height: 90dvh; padding: 24px; overflow: auto; }
.result-dialog .dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.result-dialog h2 { font: 27px Georgia,serif; margin: 0 0 16px; }
.result-dialog #panel-plan, .result-dialog #panel-social { display: block; }
.result-dialog .traveller-card { padding: 0; background: none; border: 0; }
.result-dialog .traveller-card .fine-print { display: block; }
.result-dialog .input-action { margin: 10px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.conversation-first #scout-open { font-size: 10px !important; color: #8ca99d !important; background: none !important; border-color: #ffffff15 !important; }
.conversation-first.debug-open #scout-open { color: var(--accent) !important; }
.conversation-first .travel-transition { bottom: 35px; left: calc(50% + 120px); }
.conversation-first .result-dialog :is(input,textarea,select) { max-width: 100%; }
.explorer.conversation-first.long-flight .travel-transition { left: 50%; top: auto; bottom: max(48px, calc(env(safe-area-inset-bottom) + 32px)); width: min(720px, calc(100% - 40px)); z-index: 5; }
@keyframes chat-thinking { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .companion.busy .command-status:not(:empty)::before { animation: none; } }
@media (max-width: 760px) {
  .chat-launcher, .voice-overlay { right: 12px; }
  .voice-overlay { width: calc(100% - 24px); }
  .conversation-first .travel-transition, .explorer.conversation-first.long-flight .travel-transition { top: calc(var(--header-height) + 12px); bottom: auto; left: 50%; width: calc(100% - 24px); padding: 12px 16px; }
  .conversation-first .travel-transition > p { display: none; }
  .result-dialog { padding: 18px; }
}
