/* Original NQ companions + public chat. All selectors stay inside the widget. */
.nq-companions {
  --nq-right: 30px; --nq-bottom: 130px; --nq-ink: #eef5fc; --nq-muted: #b8ccdc;
  --nq-blue: #91d9fb; --nq-orange: #ffbc73; --nq-panel: #102638; --nq-line: #355064;
  position: fixed; z-index: 65; right: max(var(--nq-right), env(safe-area-inset-right)); bottom: calc(var(--nq-bottom) + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: stretch; gap: 11px; width: 76px; margin: 0; padding: 0;
  box-sizing: border-box; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--nq-ink); -webkit-tap-highlight-color: transparent; isolation: isolate;
}
/* The host's ambient-scene stylesheet positions direct body children relatively. */
html body > #nq-companions.nq-companions {
  position: fixed !important; top: auto !important; left: auto !important;
  right: max(var(--nq-right), env(safe-area-inset-right)) !important; bottom: calc(var(--nq-bottom) + env(safe-area-inset-bottom)) !important; z-index: 65;
}
.nq-companions *, .nq-companions *::before, .nq-companions *::after { box-sizing: border-box; }
.nq-companions [hidden] { display: none !important; }
.nq-companions ::selection { background: #91d9fb; color: #102638; }
.nq-companions button, .nq-companions textarea { font: inherit; }
.nq-companions button { cursor: pointer; touch-action: manipulation; }
.nq-companions button:disabled { cursor: default; }
.nq-companions :focus-visible { outline: 2px solid var(--nq-blue); outline-offset: 3px; }
.nq-companions .nq-companions__link {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0; width: 76px; min-height: 83px; padding: 0 4px 5px; margin: 0; border: 0; border-radius: 16px;
  background: transparent; color: var(--nq-ink); text-decoration: none; outline-offset: 4px; transition: background-color 160ms ease-out;
}
.nq-companions .nq-companions__link:hover, .nq-companions .nq-companions__link:focus-visible { background: #121e2bef; }
.nq-companions .nq-companions__link--robot { --nq-accent: var(--nq-blue); }
.nq-companions .nq-companions__link--bird { --nq-accent: var(--nq-orange); }
.nq-companions .nq-companions__drawing { display: block; line-height: 0; }
.nq-companions .nq-companions__art { display: block; width: 62px; height: 62px; flex: 0 0 62px; overflow: visible; filter: drop-shadow(0 5px 4px #02050a66); }
.nq-companions .nq-companions__art--robot { width: 70px; height: 70px; }
.nq-companions .nq-companions__name { padding: 3px 7px 4px; border-radius: 6px; background: #0d1624ee; color: #eef5fc; font-size: 11px; line-height: 1.3; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.nq-companions .nq-companions__hint { position: absolute; right: calc(100% + 9px); top: 21px; width: max-content; max-width: min(210px, calc(100vw - 112px)); padding: 10px 13px; border-radius: 10px; background: #142132; color: #eef5fc; box-shadow: 0 6px 22px #03081366; font-size: 12px; font-weight: 500; line-height: 1.55; pointer-events: none; opacity: 0; visibility: hidden; transform: translateX(5px); transition: opacity 150ms ease-out, transform 180ms ease-out, visibility 150ms; }
.nq-companions .nq-companions__hint b { display: block; color: var(--nq-accent); font-size: 12px; font-weight: 600; }
.nq-companions .nq-companions__link:hover .nq-companions__hint, .nq-companions .nq-companions__link:focus-visible .nq-companions__hint { opacity: 1; visibility: visible; transform: translateX(0); }
.nq-companions[data-chat="open"] .nq-companions__hint { display: none; }
.nq-companions .nq-companions__gaze { transform: translate(var(--nq-gaze-x, 0px), var(--nq-gaze-y, 0px)); }
.nq-companions .nq-robot__head { transform-origin: 40px 51px; transition: transform 280ms cubic-bezier(.16, 1, .3, 1); }
.nq-companions .nq-robot__antenna { transform-origin: 40px 18px; transition: transform 260ms ease-out; }
.nq-companions .nq-robot__arm--left { transform-origin: 29px 53px; transition: transform 250ms ease-out; }
.nq-companions .nq-robot__arm--right { transform-origin: 51px 53px; transition: transform 250ms ease-out; }
.nq-companions .nq-robot__face { display: none; }
.nq-companions[data-expression="idle"] .nq-robot__face--idle, .nq-companions[data-expression="blink"] .nq-robot__face--blink,
.nq-companions[data-expression="curious"] .nq-robot__face--curious, .nq-companions[data-expression="happy"] .nq-robot__face--happy,
.nq-companions[data-expression="thinking"] .nq-robot__face--thinking, .nq-companions[data-expression="speaking"] .nq-robot__face--speaking,
.nq-companions[data-expression="error"] .nq-robot__face--error, .nq-companions[data-expression="sleep"] .nq-robot__face--sleep { display: inline; }
.nq-companions[data-expression="curious"] .nq-robot__head { transform: rotate(8deg) translateY(-1px); }
.nq-companions[data-expression="curious"] .nq-robot__antenna { transform: rotate(-14deg); }
.nq-companions[data-expression="happy"] .nq-robot__arm--right { animation: nq-robot-wave 720ms ease-out 1; }
.nq-companions[data-expression="happy"] .nq-robot__head { transform: rotate(-4deg) translateY(-2px); }
.nq-companions[data-expression="thinking"] .nq-robot__head { transform: rotate(-7deg); }
.nq-companions[data-expression="thinking"] .nq-robot__arm--left { transform: rotate(95deg); }
.nq-companions[data-expression="thinking"] .nq-robot__thought { animation: nq-robot-thought 1100ms ease-in-out 5; }
.nq-companions[data-expression="speaking"] .nq-robot__mouth { transform-box: fill-box; transform-origin: center; animation: nq-robot-talk 260ms ease-in-out 5; }
.nq-companions[data-expression="speaking"] .nq-robot__arm--right { transform: rotate(-28deg); }
.nq-companions[data-expression="error"] .nq-robot__head { transform: rotate(5deg) translateY(2px); }
.nq-companions[data-expression="sleep"] .nq-robot__head { transform: rotate(9deg) translateY(2px); }
.nq-companions .nq-companions__wing { transform-origin: 34px 34px; transition: transform 330ms cubic-bezier(.16, 1, .3, 1); }
.nq-companions .nq-companions__link--bird:hover .nq-companions__wing, .nq-companions .nq-companions__link--bird:focus-visible .nq-companions__wing { transform: rotate(-13deg) translateY(-1px); }
.nq-companions .nq-chat {
  position: fixed; right: calc(max(var(--nq-right), env(safe-area-inset-right)) + 90px); bottom: max(24px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; width: 380px; height: min(610px, calc(var(--nq-viewport-height, 100dvh) - 32px));
  max-width: calc(100vw - 32px); margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: 16px;
  background: var(--nq-panel); color: var(--nq-ink); box-shadow: 0 16px 54px #020b17a8;
  font-size: 14px; line-height: 1.6; text-align: left; isolation: isolate;
}
.nq-companions .nq-chat__header { display: flex; align-items: center; flex: 0 0 auto; gap: 8px; padding: 12px 14px 11px 12px; border-bottom: 1px solid var(--nq-line); background: #152f43; }
.nq-companions .nq-chat__avatar { display: block; width: 46px; height: 46px; flex: 0 0 46px; }
.nq-companions .nq-chat__avatar .nq-companions__art { width: 46px; height: 46px; filter: none; }
.nq-companions .nq-chat__heading { flex: 1; min-width: 0; }
.nq-companions .nq-chat__title { margin: 0; padding: 0; color: #f1f8ff; font: 650 17px/1.4 "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: .02em; }
.nq-companions .nq-chat__title:focus { outline: none; }
.nq-companions .nq-chat__connection { margin: 2px 0 0; color: #b9d1e2; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.nq-companions .nq-chat__plain, .nq-companions .nq-chat__icon-button { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-width: 38px; min-height: 38px; margin: 0; padding: 7px; border: 0; border-radius: 8px; color: #d5e7f4; background: transparent; font-size: 12px; }
.nq-companions .nq-chat__plain:hover, .nq-companions .nq-chat__icon-button:hover { background: #29475d; color: #fff; }
.nq-companions .nq-chat__icon { display: inline-flex; width: 20px; height: 20px; line-height: 0; }
.nq-companions .nq-chat__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nq-companions .nq-chat__body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.nq-companions .nq-chat__identity { display: flex; align-items: center; flex: 0 0 auto; gap: 7px; min-height: 34px; padding: 3px 16px; border-bottom: 1px solid #294356; color: #c5d9e8; font-size: 11px; }
.nq-companions .nq-chat__identity-name { max-width: 95px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e6f4fd; }
.nq-companions .nq-chat__quota { min-height: 28px; margin: 0 auto 0 0; padding: 3px 0; border: 0; background: none; color: #b4cbdc; font-size: 10px; font-variant-numeric: tabular-nums; text-align: left; }
.nq-companions .nq-chat__quota:hover { color: #e2f4ff; }
.nq-companions .nq-chat__account-link { flex: 0 0 auto; min-height: 28px; padding: 3px 0 3px 6px; border: 0; background: none; color: #9addf8; font-size: 11px; text-underline-offset: 3px; }
.nq-companions .nq-chat__account-link:hover { color: #d8f3ff; text-decoration: underline; }
.nq-companions .nq-chat__account-link:disabled { color: #829daf; }
.nq-companions .nq-chat__auth { flex: 1 1 auto; min-height: 0; padding: 15px 22px 20px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #55768d #102638; }
.nq-companions .nq-chat__auth-back { min-height: 32px; padding: 3px 0; border: 0; background: none; color: #b4d8eb; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.nq-companions .nq-chat__auth-title { margin: 14px 0 7px; color: #eaf6ff; font-size: 23px; line-height: 1.5; font-weight: 600; letter-spacing: -.02em; }
.nq-companions .nq-chat__auth-title:focus { outline: none; }
.nq-companions .nq-chat__auth-intro { margin: 0; color: #bfd2e1; font-size: 12px; line-height: 1.7; }
.nq-companions .nq-chat__auth-tabs { display: flex; gap: 8px; margin-top: 18px; padding-bottom: 13px; }
.nq-companions .nq-chat__auth-tab { min-width: 65px; min-height: 36px; padding: 6px 14px; border: 1px solid #4e7088; border-radius: 8px; background: transparent; color: #d2e7f5; font-size: 13px; }
.nq-companions .nq-chat__auth-tab[aria-pressed="true"] { border-color: #91d9fb; background: #91d9fb; color: #102638; font-weight: 600; }
.nq-companions .nq-chat__auth-tab:hover { border-color: #b7e9ff; }
.nq-companions .nq-chat__auth-form { margin: 0; padding: 0; }
.nq-companions .nq-chat__auth-label { display: block; margin: 9px 0 5px; color: #e0eff9; font-size: 12px; font-weight: 600; }
.nq-companions .nq-chat__auth-input { display: block; width: 100%; min-height: 42px; margin: 0; padding: 8px 11px; border: 1px solid #53748b; border-radius: 8px; background: #0b1e2d; color: #f0f7fc; caret-color: #91d9fb; font-size: 14px; line-height: 1.6; }
.nq-companions .nq-chat__auth-input:focus { border-color: #91d9fb; outline: 2px solid #91d9fb; outline-offset: 2px; }
.nq-companions .nq-chat__auth-help { margin: 4px 0 12px; color: #a9c2d4; font-size: 10px; line-height: 1.6; }
.nq-companions .nq-chat__auth-error { margin: 12px 0; padding: 9px 11px; border-radius: 8px; background: #453438; color: #ffdbcf; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.nq-companions .nq-chat__auth-submit { width: 100%; min-height: 42px; margin: 2px 0 0; padding: 8px 15px; border: 0; border-radius: 8px; background: #91d9fb; color: #102638; font-size: 13px; font-weight: 650; }
.nq-companions .nq-chat__auth-submit:hover { background: #b7e9ff; }
.nq-companions .nq-chat__auth-submit:disabled { background: #2b4559; color: #adc5d6; }
.nq-companions .nq-chat__auth-limits { margin: 14px 0 0; color: #adc6d7; font-size: 11px; line-height: 1.7; }
.nq-companions .nq-chat__log { flex: 1 1 auto; min-height: 80px; overflow: auto; overscroll-behavior: contain; padding: 22px 18px 10px; scrollbar-width: thin; scrollbar-color: #55768d #102638; }
.nq-companions .nq-chat__log::-webkit-scrollbar { width: 6px; }
.nq-companions .nq-chat__log::-webkit-scrollbar-thumb { border-radius: 6px; background: #55768d; }
.nq-companions .nq-chat__welcome { padding: 12px 2px 18px; }
.nq-companions .nq-chat__welcome h3 { margin: 0 0 9px; color: #eaf6ff; font-size: 23px; line-height: 1.5; font-weight: 600; letter-spacing: -.02em; }
.nq-companions .nq-chat__welcome p { margin: 0; max-width: 27ch; color: #bbcfde; font-size: 14px; line-height: 1.8; }
.nq-companions .nq-chat__suggestions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 25px; }
.nq-companions .nq-chat__suggestion { min-height: 38px; padding: 7px 11px; border: 1px solid #4c6f89; border-radius: 8px; background: transparent; color: #d6ecfa; font-size: 12px; text-align: left; }
.nq-companions .nq-chat__suggestion:hover { background: #203d53; border-color: #8ac7e5; }
.nq-companions .nq-chat__message { margin: 0 0 22px; padding: 0; border: 0; background: none; box-shadow: none; }
.nq-companions .nq-chat__speaker { display: block; margin: 0 0 6px; color: #9bdcf6; font-size: 11px; font-weight: 600; }
.nq-companions .nq-chat__text { margin: 0; padding: 0; font-size: 14px; line-height: 1.85; color: #ecf5fc; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; }
.nq-companions .nq-chat__message--user { margin-left: 26px; }
.nq-companions .nq-chat__message--user .nq-chat__speaker { color: #b6c9d9; text-align: right; }
.nq-companions .nq-chat__message--user .nq-chat__text { padding: 10px 13px; border-radius: 12px 3px 12px 12px; background: #24465d; }
.nq-companions .nq-chat__message[data-failed="true"] .nq-chat__speaker::after { content: " · 未收到回复"; font-weight: 400; }
.nq-companions .nq-chat__waiting { flex: 0 0 auto; margin: 0; padding: 0 20px 10px; color: #a9d9ed; font-size: 12px; }
.nq-companions .nq-chat__notice { flex: 0 0 auto; margin: 0 16px 10px; padding: 10px 12px; border-radius: 8px; background: #284055; color: #d9eaf6; }
.nq-companions .nq-chat__notice[data-kind="error"] { background: #453438; color: #ffdbcf; }
.nq-companions .nq-chat__notice-text { margin: 0; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.nq-companions .nq-chat__retry { min-height: 32px; margin: 5px 0 0; padding: 3px 0; border: 0; color: inherit; background: transparent; text-decoration: underline; text-underline-offset: 3px; font-size: 12px; font-weight: 600; }
.nq-companions .nq-chat__retry:hover { color: #fff; }
.nq-companions .nq-chat__connection-tools { flex: 0 0 auto; padding: 0 20px; }
.nq-companions .nq-chat__connection-tools:has(button:not([hidden])) { padding-bottom: 10px; }
.nq-companions .nq-chat__composer { flex: 0 0 auto; margin: 0 14px; padding: 9px 11px 7px; border: 1px solid #53748b; border-radius: 12px; background: #0b1e2d; }
.nq-companions .nq-chat__composer:focus-within { border-color: #91d9fb; }
.nq-companions .nq-chat__input { display: block; width: 100%; min-height: 48px; max-height: 112px; resize: none; overflow-y: auto; margin: 0; padding: 3px 0; border: 0; border-radius: 0; outline: none; box-shadow: none; background: transparent; color: #f0f7fc; caret-color: #91d9fb; font-size: 14px; line-height: 1.65; scrollbar-width: thin; scrollbar-color: #55768d #0b1e2d; }
.nq-companions .nq-chat__input::placeholder { color: #9cb3c5; opacity: 1; }
.nq-companions .nq-chat__composer-controls { display: flex; align-items: center; gap: 8px; }
.nq-companions .nq-chat__counter { margin-right: auto; color: #acc1d2; font-size: 10px; font-variant-numeric: tabular-nums; }
.nq-companions .nq-chat__counter[data-over="true"] { color: #ffb8a6; }
.nq-companions .nq-chat__send, .nq-companions .nq-chat__stop { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 36px; margin: 0; padding: 5px 10px; border: 0; border-radius: 8px; color: #102638; background: #91d9fb; font-size: 12px; font-weight: 650; }
.nq-companions .nq-chat__send:hover { background: #b9eaff; }
.nq-companions .nq-chat__send:disabled { color: #a4b9ca; background: #2b4559; }
.nq-companions .nq-chat__stop { color: #d4e9f6; background: #304d62; }
.nq-companions .nq-chat__stop:hover { background: #41647c; }
.nq-companions .nq-chat__keyboard-hint { display: block; margin-top: 3px; color: #9bb2c4; font-size: 10px; line-height: 1.4; }
.nq-companions .nq-chat__footer { flex: 0 0 auto; padding: 8px 18px 10px; color: #abc0d0; font-size: 10px; line-height: 1.55; }
.nq-companions .nq-chat__footnote { margin: 0; padding: 0; color: inherit; font-size: inherit; line-height: inherit; }
.nq-companions .nq-chat__privacy { margin: 3px 0 0; padding: 0; border: 0; background: none; }
.nq-companions .nq-chat__privacy summary { width: fit-content; cursor: pointer; text-underline-offset: 3px; }
.nq-companions .nq-chat__privacy summary:hover { color: #eaf5ff; text-decoration: underline; }
.nq-companions .nq-chat__privacy p { margin: 6px 0 0; max-height: 80px; overflow-y: auto; overflow-wrap: anywhere; color: #c0d4e3; font-size: 11px; line-height: 1.65; }
.nq-companions .nq-chat__sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.nq-companions[data-motion="paused"] *, .nq-companions[data-motion="paused"] *::before, .nq-companions[data-motion="paused"] *::after { animation: none !important; transition: none !important; }
.nq-companions[data-motion="paused"] .nq-companions__gaze, .nq-companions[data-motion="paused"] .nq-companions__wing, .nq-companions[data-motion="paused"] .nq-robot__head, .nq-companions[data-motion="paused"] .nq-robot__antenna, .nq-companions[data-motion="paused"] .nq-robot__arm { transform: none !important; }
body:has(.home-pet-ui .pet-launcher[aria-expanded="true"]) .nq-companions { display: none; pointer-events: none; }
@keyframes nq-robot-wave { 0%, 100% { transform: rotate(0); } 25%, 70% { transform: rotate(-75deg); } 48% { transform: rotate(-42deg); } }
@keyframes nq-robot-thought { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
@keyframes nq-robot-talk { 0%, 100% { transform: scaleY(.6); } 50% { transform: scaleY(1); } }
@media (max-width: 600px) {
  .nq-companions { --nq-right: 22px; --nq-bottom: 118px; width: 64px; gap: 5px; }
  .nq-companions .nq-companions__link { width: 64px; min-height: 73px; padding: 0 3px 3px; border-radius: 14px; }
  .nq-companions .nq-companions__art { width: 54px; height: 54px; flex-basis: 54px; }
  .nq-companions .nq-companions__art--robot { width: 62px; height: 62px; }
  .nq-companions .nq-companions__name { font-size: 10px; }
  .nq-companions .nq-companions__hint { right: calc(100% + 5px); }
  .nq-companions .nq-chat { top: calc(var(--nq-viewport-top, 0px) + max(10px, env(safe-area-inset-top))); bottom: auto; right: max(10px, env(safe-area-inset-right)); left: max(10px, env(safe-area-inset-left)); width: auto; max-width: none; height: min(640px, calc(var(--nq-viewport-height, 100dvh) - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom))); border-radius: 14px; }
  .nq-companions .nq-chat__header { padding: 9px 10px; }
  .nq-companions .nq-chat__plain, .nq-companions .nq-chat__icon-button { min-width: 44px; min-height: 44px; }
  .nq-companions .nq-chat__input { font-size: 16px; min-height: 44px; }
  .nq-companions .nq-chat__auth-input { font-size: 16px; min-height: 44px; }
  .nq-companions .nq-chat__identity { min-height: 38px; padding-inline: 14px; }
  .nq-companions .nq-chat__quota, .nq-companions .nq-chat__account-link { min-height: 32px; }
  .nq-companions .nq-chat__send, .nq-companions .nq-chat__stop { min-height: 40px; padding-inline: 12px; }
  .nq-companions .nq-chat__keyboard-hint { display: none; }
  .nq-companions .nq-chat__log { padding: 17px 17px 8px; }
  .nq-companions .nq-chat__footer { padding: 8px 16px 10px; }
}
.nq-companions[data-compact="true"] .nq-chat__header { padding-block: 4px; }
.nq-companions[data-compact="true"] .nq-chat__identity { min-height: 30px; padding-block: 0; }
.nq-companions[data-compact="true"] .nq-chat__auth { padding-top: 6px; }
.nq-companions[data-compact="true"] .nq-chat__auth-title { margin-top: 8px; font-size: 20px; }
.nq-companions[data-compact="true"] .nq-chat__avatar, .nq-companions[data-compact="true"] .nq-chat__avatar .nq-companions__art { width: 32px; height: 32px; }
.nq-companions[data-compact="true"] .nq-chat__avatar { flex-basis: 32px; }
.nq-companions[data-compact="true"] .nq-chat__log { min-height: 20px; padding-top: 8px; }
.nq-companions[data-compact="true"] .nq-chat__composer { padding-block: 4px; }
.nq-companions[data-compact="true"] .nq-chat__input { min-height: 32px; max-height: 40px; }
.nq-companions[data-compact="true"] .nq-chat__send, .nq-companions[data-compact="true"] .nq-chat__stop { min-height: 32px; }
.nq-companions[data-compact="true"] .nq-chat__notice { max-height: 70px; overflow-y: auto; margin-bottom: 6px; padding-block: 6px; }
.nq-companions[data-compact="true"] .nq-chat__footer { padding-block: 4px; }
.nq-companions[data-compact="true"] .nq-chat__keyboard-hint { display: none; }
@media (max-height: 460px) {
  .nq-companions .nq-chat { top: calc(var(--nq-viewport-top, 0px) + 6px); bottom: auto; height: calc(var(--nq-viewport-height, 100dvh) - 12px); }
  .nq-companions .nq-chat__header { padding-block: 5px; }
  .nq-companions .nq-chat__avatar, .nq-companions .nq-chat__avatar .nq-companions__art { width: 36px; height: 36px; }
  .nq-companions .nq-chat__avatar { flex-basis: 36px; }
  .nq-companions .nq-chat__log { min-height: 35px; padding-top: 12px; }
  .nq-companions .nq-chat__welcome { padding-top: 0; }
  .nq-companions .nq-chat__suggestions { margin-top: 14px; }
  .nq-companions .nq-chat__footer { padding-block: 5px; }
  .nq-companions .nq-chat__input { max-height: 62px; min-height: 35px; }
  .nq-companions .nq-chat__keyboard-hint { display: none; }
}
@media (max-height: 460px) and (orientation: landscape) {
  .nq-companions { flex-direction: row; width: 139px; gap: 3px; }
  .nq-companions .nq-companions__link { width: 68px; }
  .nq-companions .nq-companions__hint { top: auto; bottom: calc(100% + 5px); right: 0; }
  .nq-companions .nq-chat { right: max(10px, env(safe-area-inset-right)); }
}
@media (prefers-reduced-motion: reduce) {
  .nq-companions *, .nq-companions *::before, .nq-companions *::after { animation: none !important; transition: none !important; }
  .nq-companions .nq-companions__gaze, .nq-companions .nq-companions__wing, .nq-companions .nq-robot__head, .nq-companions .nq-robot__antenna, .nq-companions .nq-robot__arm { transform: none !important; }
}

/* Emotion Ball: SVG body, transparent surroundings; no bitmap or canvas loop. */
.nq-emotion-orb {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  background: transparent;
  pointer-events: none;
}
.nq-emotion-orb > svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.nq-emotion-orb[hidden] { display: none !important; }

/* Companion controls share the homepage settings' glass, orbit and spring feedback. */
.nq-companions {
  --nq-right: 30px; --nq-bottom: 178px; --nq-dock-size: 70px;
  gap: 28px;
}
.nq-companions .nq-companions__robot-group { position: relative; }
.nq-companions .nq-companions__link {
  gap: 9px; min-height: 0; padding: 0; overflow: visible; border-radius: 50%;
  background: transparent; transition: none;
}
.nq-companions .nq-companions__link:hover,
.nq-companions .nq-companions__link:focus-visible { background: transparent; }
.nq-companions .nq-companions__link--robot { --nq-accent: #568bcc; --nq-second: #bd7fca; --nq-caption-ink: #284578; }
.nq-companions .nq-companions__link--bird { --nq-accent: #ca8145; --nq-second: #e18eb1; --nq-caption-ink: #79401d; }
.nq-companions .nq-companions__drawing {
  position: relative; display: grid; place-items: center; isolation: isolate;
  width: var(--nq-dock-size); height: var(--nq-dock-size); border-radius: 50%;
  background: linear-gradient(135deg, #ffffffad, #edf5ff63 58%, #eecfff4d);
  box-shadow: inset 0 1px 2px #fff, 0 5px 16px #54668c1f;
  transform: scale(1) rotate(0deg);
  transition: transform 440ms cubic-bezier(.2,.8,.2,1), background-color 200ms ease-out;
}
.nq-companions .nq-companions__art { position: relative; z-index: 2; width: 58px; height: 58px; filter: drop-shadow(0 3px 3px #26385830); }
.nq-companions .nq-companions__art--robot { width: 64px; height: 64px; }
.nq-companions .nq-companions__drawing > .nq-companions__orb { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); z-index: 2; }
.nq-companions .nq-chat__avatar { position: relative; }
.nq-companions .nq-chat__orb { position: absolute; inset: 0; }
.nq-companions .nq-chat { z-index: 10; }
.nq-companions .nq-companions__halo {
  position: absolute; inset: -18px; z-index: -1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--nq-accent) 34%, transparent), color-mix(in srgb, var(--nq-second) 22%, transparent) 45%, transparent 72%);
  opacity: .14; transform: scale(.88); transition: opacity 300ms ease-out, transform 440ms ease-out;
}
.nq-companions .nq-companions__orbit { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; color: var(--nq-accent); pointer-events: none; }
.nq-companions .nq-companions__orbit-track { fill: none; stroke: currentColor; stroke-width: 1; opacity: .16; }
.nq-companions .nq-companions__orbit-arc { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 88 32 23 133; transform-origin: 50px 50px; transform: rotate(-65deg); opacity: .6; transition: opacity 200ms; }
.nq-companions .nq-companions__orbit-dash { fill: none; stroke: var(--nq-second); stroke-width: 1.2; stroke-dasharray: 2 7; transform-origin: 50px 50px; opacity: 0; transition: opacity 200ms; }
.nq-companions .nq-companions__spark { position: absolute; z-index: 3; width: 11px; height: 11px; color: var(--nq-accent); fill: currentColor; pointer-events: none; opacity: 0; transform: scale(.25); transition: opacity 200ms, transform 420ms cubic-bezier(.2,.8,.2,1); }
.nq-companions .nq-companions__spark:nth-of-type(2) { left: -9px; top: 6px; }
.nq-companions .nq-companions__spark:nth-of-type(3) { right: -9px; top: 0; width: 14px; height: 14px; color: var(--nq-second); }
.nq-companions .nq-companions__spark:nth-of-type(4) { left: -8px; bottom: 8px; width: 8px; height: 8px; color: var(--nq-second); }
.nq-companions .nq-companions__spark:nth-of-type(5) { right: -9px; bottom: 9px; }
.nq-companions .nq-companions__link:is(:hover,:focus-visible,[aria-expanded="true"]) .nq-companions__drawing { transform: scale(1.12) rotate(4deg); }
.nq-companions .nq-companions__link:is(:hover,:focus-visible,[aria-expanded="true"]) .nq-companions__halo { opacity: 1; transform: scale(1.1); }
.nq-companions .nq-companions__link:is(:hover,:focus-visible,[aria-expanded="true"]) .nq-companions__orbit-arc { opacity: 1; animation: nq-dock-orbit 8s linear infinite; }
.nq-companions .nq-companions__link:is(:hover,:focus-visible,[aria-expanded="true"]) .nq-companions__orbit-dash { opacity: .85; animation: nq-dock-orbit 15s linear reverse infinite; }
.nq-companions .nq-companions__link:is(:hover,:focus-visible,[aria-expanded="true"]) .nq-companions__spark { opacity: .9; transform: scale(1) rotate(12deg); }
.nq-companions .nq-companions__link:active .nq-companions__drawing { transform: scale(.95); transition-duration: 120ms; }
.nq-companions .nq-companions__name {
  position: relative; padding: 5px 12px; border-radius: 999px; border: 1px solid #ffffffa8;
  background: linear-gradient(115deg, #ffffffc7, color-mix(in srgb, var(--nq-accent) 20%, #ffffffa8), color-mix(in srgb, var(--nq-second) 17%, #ffffffb8));
  color: var(--nq-caption-ink); box-shadow: 0 3px 11px #263c6420, inset 0 1px 0 #ffffffb8;
  backdrop-filter: blur(8px) saturate(1.25); -webkit-backdrop-filter: blur(8px) saturate(1.25);
  font-size: 11px; line-height: 1.4; font-weight: 650; letter-spacing: .02em;
  transition: transform 260ms ease-out, border-color 180ms ease-out;
}
.nq-companions .nq-companions__link:is(:hover,:focus-visible,[aria-expanded="true"]) .nq-companions__name { transform: translateY(2px); border-color: var(--nq-accent); }
.nq-companions .nq-companions__hint {
  top: auto; bottom: calc(100% + 16px); right: 0; max-width: min(200px, calc(100vw - 104px));
  padding: 8px 12px; border: 1px solid #ffffffa8; border-radius: 12px;
  background: linear-gradient(125deg, #f6faffee, #ede9f7e3); color: #354c70;
  box-shadow: 0 6px 20px #2b395322; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transform: translateY(5px) scale(.96); transform-origin: bottom right; font-size: 11px;
}
.nq-companions .nq-companions__hint b { color: var(--nq-caption-ink); }
.nq-companions .nq-companions__link:hover .nq-companions__hint,
.nq-companions .nq-companions__link:focus-visible .nq-companions__hint { transform: translateY(0) scale(1); }
.nq-companions .nq-companions__form-toggle {
  position: absolute; left: -43px; top: 7px; z-index: 5;
  display: grid; place-items: center; width: 44px; height: 44px; padding: 9px; border: 0; border-radius: 50%;
  color: #42699c; background: #f2f7ffb3; box-shadow: inset 0 1px 0 #fff, 0 4px 12px #344f731c;
  backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); transition: background-color 180ms, transform 240ms ease-out;
}
.nq-companions .nq-companions__form-icon { display: block; width: 22px; height: 22px; }
.nq-companions .nq-companions__form-icon > svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nq-companions .nq-companions__form-toggle:hover { background: #e8e4ffdd; transform: rotate(-8deg); }
.nq-companions .nq-companions__form-toggle:active { transform: scale(.9); }
.nq-companions .nq-companions__form-label { position: absolute; top: 50%; right: calc(100% + 5px); width: max-content; padding: 6px 10px; border-radius: 10px; background: #f4f5ffee; color: #354c70; font: 600 11px/1.6 "PingFang SC", "Microsoft YaHei", sans-serif; pointer-events: none; opacity: 0; transform: translate(5px,-50%); transition: opacity 150ms, transform 180ms; }
.nq-companions .nq-companions__form-toggle:is(:hover,:focus-visible) .nq-companions__form-label { opacity: 1; transform: translate(0,-50%); }
.nq-companions .nq-companions__form-toggle:focus-visible { outline-color: #5077bc; }
[data-theme="dark"] .nq-companions .nq-companions__link--robot { --nq-accent: #8fc5ff; --nq-second: #dc9de9; --nq-caption-ink: #cce5ff; }
[data-theme="dark"] .nq-companions .nq-companions__link--bird { --nq-accent: #efb177; --nq-second: #eaa7c6; --nq-caption-ink: #ffdbb6; }
[data-theme="dark"] .nq-companions .nq-companions__drawing { background: linear-gradient(135deg,#23395394,#17283d66,#42324d6b); box-shadow: inset 0 1px 1px #dae8ff33, 0 5px 16px #02081140; }
[data-theme="dark"] .nq-companions .nq-companions__name { background: linear-gradient(115deg,#152b42c9,#283953bd,#44334fba); border-color: #bdd8ff4a; box-shadow: inset 0 1px 0 #d0e3ff26, 0 3px 12px #0003; }
[data-theme="dark"] .nq-companions .nq-companions__hint { background: linear-gradient(125deg,#172d43ef,#30273fe8); border-color: #bdd8ff33; color: #e1efff; }
[data-theme="dark"] .nq-companions .nq-companions__form-toggle { color: #b7d8ff; background: #263b55c2; box-shadow: inset 0 1px 0 #d0e3ff33, 0 4px 12px #0003; }
[data-theme="dark"] .nq-companions .nq-companions__form-label { color: #e1efff; background: #20354bec; }
.nq-companions[data-motion="paused"] .nq-companions__drawing { transform: none !important; }
.nq-companions[data-motion="paused"] .nq-companions__orbit { animation: none !important; }
@keyframes nq-dock-orbit { to { transform: rotate(295deg); } }
@media (max-width: 600px) {
  .nq-companions { --nq-right: 8px; --nq-bottom: 138px; --nq-dock-size: 54px; gap: 21px; }
  .nq-companions .nq-companions__link { min-height: 0; gap: 8px; padding: 0; }
  .nq-companions .nq-companions__art { width: 46px; height: 46px; }
  .nq-companions .nq-companions__art--robot { width: 51px; height: 51px; }
  .nq-companions .nq-companions__name { font-size: 10px; padding: 4px 10px; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nq-companions .nq-companions__form-toggle { top: 2px; left: -41px; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nq-companions .nq-companions__hint { bottom: calc(100% + 12px); right: 0; }
}
@media (hover: none) {
  .nq-companions .nq-companions__link:hover .nq-companions__hint,
  .nq-companions .nq-companions__form-toggle:hover .nq-companions__form-label { opacity: 0; visibility: hidden; }
  .nq-companions .nq-companions__link:not([aria-expanded="true"]):hover .nq-companions__drawing { transform: none; }
}
@media (max-height: 460px) and (orientation: landscape) {
  .nq-companions { gap: 16px; width: 152px; }
  .nq-companions .nq-companions__form-toggle { top: 1px; }
}
@media (prefers-reduced-motion: reduce) {
  .nq-companions .nq-companions__drawing { transform: none !important; }
}
@media (forced-colors: active) {
  .nq-companions .nq-companions__drawing,
  .nq-companions .nq-companions__name,
  .nq-companions .nq-companions__form-toggle { border: 1px solid ButtonText; background: Canvas; color: ButtonText; box-shadow: none; }
  .nq-companions .nq-companions__halo, .nq-companions .nq-companions__orbit { display: none; }
}

/* Xiaoxun's single-launcher menu. Scoped independently from the chat surface. */
.nq-companions .nq-companions__menu {
  --nq-menu-ink: #233b5a;
  --nq-menu-muted: #405875;
  --nq-menu-line: #718fbc40;
  --nq-menu-focus: #3467ad;
  --nq-menu-right: calc(max(var(--nq-right), env(safe-area-inset-right)) + 90px);
  --nq-menu-bottom: max(20px, calc(var(--nq-bottom) + env(safe-area-inset-bottom)));
  position: fixed;
  z-index: 11;
  right: var(--nq-menu-right);
  bottom: var(--nq-menu-bottom);
  display: block;
  width: 304px;
  max-width: calc(100vw - var(--nq-menu-right) - max(16px, env(safe-area-inset-left)));
  max-height: calc(var(--nq-viewport-height, 100dvh) - var(--nq-menu-bottom) - max(16px, env(safe-area-inset-top)));
  margin: 0;
  padding: 14px 16px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #ffffffb8;
  border-radius: 20px;
  background: linear-gradient(135deg, #f7fbffe6, #eaf2ffdd 58%, #f7eaf3e3);
  color: var(--nq-menu-ink);
  box-shadow: 0 14px 40px #23344d2b, inset 0 1px 0 #ffffffd9;
  backdrop-filter: blur(16px) saturate(1.18);
  -webkit-backdrop-filter: blur(16px) saturate(1.18);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  scrollbar-width: thin;
  scrollbar-color: #7798bcb0 transparent;
  transform-origin: right center;
}
.nq-companions .nq-companions__menu:not([hidden]) {
  animation: nq-companion-menu-enter 240ms cubic-bezier(.16, 1, .3, 1) both;
}
.nq-companions .nq-companions__menu::selection,
.nq-companions .nq-companions__menu *::selection { background: #accaf3; color: #173b68; }
.nq-companions .nq-companions__menu::-webkit-scrollbar { width: 5px; }
.nq-companions .nq-companions__menu::-webkit-scrollbar-thumb { background: #7798bcb0; border-radius: 5px; }
.nq-companions .nq-companions__menu :focus-visible {
  outline: 2px solid var(--nq-menu-focus);
  outline-offset: 3px;
}
.nq-companions .nq-companions__menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin: 0 0 4px;
}
.nq-companions .nq-companions__menu-title {
  margin: 0;
  padding: 0;
  color: var(--nq-menu-ink);
  font: 650 18px/1.4 "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .01em;
}
.nq-companions .nq-companions__menu-close {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0 -5px 0 0;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  color: var(--nq-menu-muted);
  background: transparent;
  transition: background-color 180ms ease-out, color 180ms ease-out;
}
.nq-companions .nq-companions__menu-chat {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid #ffffffbd;
  border-radius: 12px;
  color: #234372;
  background: linear-gradient(115deg, #bdddffc9, #d8c8f3ba 72%, #edd1e7bb);
  box-shadow: inset 0 1px 0 #ffffff91;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  transition: transform 180ms ease-out, border-color 180ms ease-out, background-color 180ms ease-out;
}
.nq-companions .nq-companions__menu-label {
  margin: 14px 0 6px;
  padding: 0;
  color: var(--nq-menu-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}
.nq-companions .nq-companions__menu-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  padding: 0;
}
.nq-companions .nq-companions__menu-options--color { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nq-companions .nq-companions__menu-option {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 9px 8px;
  border: 1px solid var(--nq-menu-line);
  border-radius: 11px;
  background: #ffffff38;
  color: var(--nq-menu-ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  transition: background-color 180ms ease-out, border-color 180ms ease-out, color 180ms ease-out, transform 180ms ease-out;
}
.nq-companions .nq-companions__menu-option[aria-pressed="true"] {
  border-color: #7196ca;
  background: #d6e6ffcc;
  color: #244e87;
  box-shadow: inset 0 1px 0 #ffffff80;
  font-weight: 650;
}
.nq-companions .nq-companions__color-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin: 12px 0 0;
  padding: 0;
  color: var(--nq-menu-ink);
  font-size: 13px;
}
.nq-companions .nq-companions__color-input {
  display: block;
  flex: 0 0 52px;
  width: 52px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 4px;
  overflow: hidden;
  border: 1px solid var(--nq-menu-line);
  border-radius: 10px;
  background: #ffffff70;
  color: var(--nq-menu-ink);
  cursor: pointer;
  touch-action: manipulation;
}
.nq-companions .nq-companions__color-input::-webkit-color-swatch-wrapper { padding: 0; }
.nq-companions .nq-companions__color-input::-webkit-color-swatch { border: 0; border-radius: 6px; }
.nq-companions .nq-companions__color-input::-moz-color-swatch { border: 0; border-radius: 6px; }
.nq-companions .nq-companions__menu-status {
  min-height: 18px;
  margin: 12px 0 0;
  padding: 0;
  color: var(--nq-menu-muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* Keep menu selection and an open conversation distinct from transient hover. */
.nq-companions:is([data-menu="open"], [data-chat="open"]) .nq-companions__link--robot .nq-companions__drawing {
  transform: scale(1.12) rotate(4deg);
}
.nq-companions:is([data-menu="open"], [data-chat="open"]) .nq-companions__link--robot .nq-companions__halo { opacity: 1; transform: scale(1.1); }
.nq-companions:is([data-menu="open"], [data-chat="open"]) .nq-companions__link--robot .nq-companions__orbit-arc { opacity: 1; animation: nq-dock-orbit 8s linear infinite; }
.nq-companions:is([data-menu="open"], [data-chat="open"]) .nq-companions__link--robot .nq-companions__orbit-dash { opacity: .85; animation: nq-dock-orbit 15s linear reverse infinite; }
.nq-companions:is([data-menu="open"], [data-chat="open"]) .nq-companions__link--robot .nq-companions__spark { opacity: .9; transform: scale(1) rotate(12deg); }
.nq-companions:is([data-menu="open"], [data-chat="open"]) .nq-companions__link--robot .nq-companions__name { transform: translateY(2px); border-color: var(--nq-accent); }
.nq-companions:is([data-menu="open"], [data-chat="open"]) .nq-companions__hint { opacity: 0 !important; visibility: hidden !important; }

/* Interpolate palette changes on SVG paint; never filter the eyes or expression. */
.nq-companions .nq-companions__art--robot :is([fill^="var(--nq-robot-"], [stroke^="var(--nq-robot-"]) {
  transition: fill 900ms ease-in-out, stroke 900ms ease-in-out;
}
.nq-companions .nq-emotion-orb > svg > defs > radialGradient > stop { transition: stop-color 900ms ease-in-out; }

[data-theme="dark"] .nq-companions .nq-companions__menu {
  --nq-menu-ink: #e2edfc;
  --nq-menu-muted: #b9cce5;
  --nq-menu-line: #a4c5ec38;
  --nq-menu-focus: #a9d5ff;
  border-color: #bed5f23b;
  background: linear-gradient(135deg, #172a40ed, #1a2943e6 58%, #31263ee8);
  box-shadow: 0 16px 44px #020a1a70, inset 0 1px 0 #c6e2ff26;
  scrollbar-color: #7c9cc1a6 transparent;
  color-scheme: dark;
}
[data-theme="dark"] .nq-companions .nq-companions__menu-chat {
  border-color: #a9c9f263;
  background: linear-gradient(115deg, #315b89d9, #4b4676d1 72%, #61496cd4);
  color: #f0f6ff;
  box-shadow: inset 0 1px 0 #d3eaff26;
}
[data-theme="dark"] .nq-companions .nq-companions__menu-option { background: #c1d7f20c; }
[data-theme="dark"] .nq-companions .nq-companions__menu-option[aria-pressed="true"] {
  border-color: #9bbfe3ad;
  background: #395c89bd;
  color: #edf5ff;
  box-shadow: inset 0 1px 0 #d3eaff26;
}
[data-theme="dark"] .nq-companions .nq-companions__color-input { background: #14253a; }

@keyframes nq-companion-menu-enter {
  from { opacity: .75; transform: translateX(8px) scale(.97); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@media (hover: hover) {
  .nq-companions .nq-companions__menu-close:hover { background: #709ad51a; color: var(--nq-menu-ink); }
  .nq-companions .nq-companions__menu-chat:hover { transform: translateY(-1px); border-color: #7196ca; }
  .nq-companions .nq-companions__menu-option:hover { border-color: #7196ca; background: #b5d1f33b; }
  [data-theme="dark"] .nq-companions .nq-companions__menu-chat:hover,
  [data-theme="dark"] .nq-companions .nq-companions__menu-option:hover { border-color: #b4d4f5; }
}
.nq-companions .nq-companions__menu-chat:active,
.nq-companions .nq-companions__menu-option:active { transform: scale(.97); }
@media (max-width: 600px) {
  .nq-companions .nq-companions__menu {
    --nq-menu-right: calc(max(var(--nq-right), env(safe-area-inset-right)) + 78px);
    padding: 12px 14px 14px;
    border-radius: 18px;
    backdrop-filter: blur(10px) saturate(1.12);
    -webkit-backdrop-filter: blur(10px) saturate(1.12);
  }
  .nq-companions .nq-companions__menu-options { gap: 6px; }
  .nq-companions .nq-companions__menu-option { padding-inline: 5px; }
}
@media (max-height: 460px) {
  .nq-companions .nq-companions__menu {
    --nq-menu-bottom: max(12px, env(safe-area-inset-bottom));
    max-height: calc(var(--nq-viewport-height, 100dvh) - var(--nq-menu-bottom) - max(12px, env(safe-area-inset-top)));
  }
}
@media (max-height: 460px) and (orientation: landscape) {
  .nq-companions .nq-companions__menu { --nq-menu-right: calc(max(var(--nq-right), env(safe-area-inset-right)) + 166px); }
}
@media (prefers-reduced-transparency: reduce) {
  .nq-companions .nq-companions__menu { background: #edf3fc; backdrop-filter: none; -webkit-backdrop-filter: none; }
  [data-theme="dark"] .nq-companions .nq-companions__menu { background: #1b2b43; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nq-companions .nq-companions__menu { background: #edf3fc; }
  [data-theme="dark"] .nq-companions .nq-companions__menu { background: #1b2b43; }
}
.nq-companions[data-motion="paused"] .nq-companions__menu,
.nq-companions[data-motion="paused"] .nq-companions__art--robot *,
.nq-companions[data-motion="paused"] .nq-emotion-orb stop { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .nq-companions .nq-companions__menu,
  .nq-companions .nq-companions__art--robot *,
  .nq-companions .nq-emotion-orb stop { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .nq-companions .nq-companions__menu,
  .nq-companions .nq-companions__menu-chat,
  .nq-companions .nq-companions__menu-option,
  .nq-companions .nq-companions__color-input { background: Canvas; color: CanvasText; border: 1px solid ButtonText; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nq-companions .nq-companions__menu { --nq-menu-ink: CanvasText; --nq-menu-muted: CanvasText; --nq-menu-focus: Highlight; }
  .nq-companions .nq-companions__menu-option[aria-pressed="true"] { background: Highlight; color: HighlightText; border-color: Highlight; }
}

/* Contact accounts and email recovery, scoped to the existing companion dialog. */
.nq-chat .nq-chat__reset-group[hidden],.nq-chat .nq-chat__reset-notice[hidden],.nq-chat .nq-chat__forgot[hidden]{display:none!important}
.nq-chat__reset-group{display:grid;gap:8px;min-width:0}
.nq-chat__reset-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.nq-chat__reset-row .nq-chat__auth-input{min-width:0;letter-spacing:.12em}
.nq-chat__reset-send{min-height:44px;border:1px solid #b7d3ff42;border-radius:12px;padding:8px 12px;font-family:inherit;font-size:13px;font-weight:600;line-height:1.4;color:#d3e4ff;background:#324f68;cursor:pointer}
.nq-chat__reset-send:disabled{cursor:default;opacity:.55}
.nq-chat__reset-send:focus-visible{outline:2px solid #637dc3;outline-offset:2px}
.nq-chat__reset-notice{margin:0;padding:11px 12px;border-radius:12px;background:#2b61594d;color:#c9f3e5;font-size:13px;line-height:1.6;overflow-wrap:anywhere}
.nq-chat__auth[data-mode="reset"] :is(.nq-chat__auth-tabs,.nq-chat__auth-limits){display:none}
.nq-chat .nq-chat__forgot{justify-self:center;min-height:44px;margin:0}
[data-theme="dark"] .nq-chat__reset-send{color:#cbe0ff;background:#243a53b3;border-color:#b7d3ff42}
[data-theme="dark"] .nq-chat__reset-notice{color:#b9e4d5;background:#3b6b643a}
@media(max-width:600px){.nq-chat .nq-chat__auth-input{font-size:16px}.nq-chat__reset-send{padding-inline:10px}}

/* Owner mode adds no independent account or API credential input. */
.nq-chat .nq-chat__owner-tools{flex:none;padding:0 18px 10px}
.nq-chat .nq-chat__owner-model{display:flex;align-items:center;gap:10px;font-size:12px;color:inherit}
.nq-chat .nq-chat__owner-select{min-width:0;flex:1;min-height:44px;padding:8px 12px;border:1px solid rgba(121,160,198,.26);border-radius:12px;background:rgba(239,248,255,.45);color:inherit;font:inherit}
.nq-chat .nq-chat__owner-select option{background:#f4f8fc;color:#213b55}
.nq-chat[data-account-mode="owner"] .nq-chat__identity-name{color:#b9f3ec;background:rgba(65,139,147,.2);border:1px solid rgba(136,219,219,.34);border-radius:9px;padding:4px 7px}
.nq-chat .nq-chat__owner-login,.nq-chat .nq-chat__public-mode{display:inline-flex;align-items:center;justify-content:center;min-height:44px;max-width:100%;padding:9px 11px;border:1px solid rgba(121,160,198,.25);border-radius:12px;font:inherit;font-size:12px;line-height:1.4;text-decoration:none;color:inherit;background:rgba(223,240,254,.3);cursor:pointer}
.nq-chat .nq-chat__connection-tools{display:flex;flex-wrap:wrap;gap:8px}
.nq-chat .nq-chat__owner-login:focus-visible,.nq-chat .nq-chat__public-mode:focus-visible,.nq-chat .nq-chat__owner-select:focus-visible{outline:2px solid #6b99d3;outline-offset:3px}
[data-theme="dark"] .nq-chat .nq-chat__owner-select,[data-theme="dark"] .nq-chat .nq-chat__owner-login,[data-theme="dark"] .nq-chat .nq-chat__public-mode{background:rgba(39,71,100,.3)}
[data-theme="dark"] .nq-chat .nq-chat__owner-select option{background:#182636;color:#e4edf8}
.nq-chat .nq-chat__owner-tools[hidden],.nq-chat .nq-chat__owner-model[hidden],.nq-chat .nq-chat__owner-login[hidden],.nq-chat .nq-chat__public-mode[hidden]{display:none!important}
@media(max-width:440px){.nq-chat .nq-chat__owner-tools{padding:0 12px 8px}.nq-chat .nq-chat__owner-model{gap:8px}.nq-chat .nq-chat__owner-select{font-size:12px}.nq-chat .nq-chat__connection-tools{gap:6px}}
