/* NEWSON Q-Assist V54 | Robot 3D, contexto CAPA y análisis de adjuntos */
.qassist-v52 {
  --qa-navy: #071b33;
  --qa-navy-2: #0b2948;
  --qa-cyan: #10b8cf;
  --qa-cyan-2: #76e7f2;
  --qa-blue: #2b6ff2;
  --qa-green: #22bf91;
  --qa-bg: #f9fbfe;
  --qa-surface: #ffffff;
  --qa-soft: #f1f6fb;
  --qa-text: #142941;
  --qa-muted: #62758c;
  --qa-line: #dce7f1;
  --qa-shadow: 0 26px 90px rgba(4, 24, 48, .27), 0 8px 28px rgba(4, 24, 48, .12);
  position: relative;
  z-index: 2150;
  color: var(--qa-text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
}

html[data-theme="dark"] .qassist-v52 {
  --qa-bg: #071421;
  --qa-surface: #0c1d2e;
  --qa-soft: #10283d;
  --qa-text: #eaf7ff;
  --qa-muted: #9fb3c8;
  --qa-line: rgba(148, 196, 222, .18);
  --qa-shadow: 0 32px 100px rgba(0, 0, 0, .58), 0 8px 28px rgba(0, 0, 0, .32);
}

.qassist-v52[hidden],
.qassist-v52 [hidden] { display: none !important; }
.qassist-v52 *, .qassist-v52 *::before, .qassist-v52 *::after { box-sizing: border-box; }
.qassist-v52 button, .qassist-v52 textarea, .qassist-v52 input { font: inherit; }
.qassist-v52 button { cursor: pointer; }
.qassist-v52 button:disabled { cursor: not-allowed; opacity: .46; }
.qassist-v52 :focus-visible { outline: 3px solid rgba(31, 196, 222, .48); outline-offset: 3px; }
.qa-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

/* Lanzador 3D */
.qassist-v52 .qa-launcher {
  position: fixed;
  right: 18px;
  bottom: calc(13px + env(safe-area-inset-bottom));
  width: 174px;
  height: 174px;
  min-width: 174px;
  min-height: 174px;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: visible;
  isolation: isolate;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: transparent;
  box-shadow: none;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: transform .28s ease, filter .28s ease;
  transform-origin: 50% 72%;
}
.qassist-v52 .qa-launcher:hover {
  transform: translateY(-8px) scale(1.055);
  filter: brightness(1.04) saturate(1.06);
}
.qassist-v52.launcher-dragging .qa-launcher { cursor: grabbing; transition: none; transform: scale(1.045); }
.qassist-v52 .qa-launcher-halo {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: 142px;
  height: 142px;
  border: 1px solid rgba(111, 232, 244, .42);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 184, 207, .13), rgba(16, 184, 207, .025) 54%, transparent 72%);
  box-shadow: 0 0 34px rgba(29, 211, 229, .19), inset 0 0 30px rgba(43, 111, 242, .06);
  animation: qa-halo 3.6s ease-in-out infinite;
}
.qassist-v52 .qa-launcher > img {
  position: relative;
  z-index: 1;
  width: 176px;
  height: 176px;
  max-width: none;
  margin: 0;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 18px 15px rgba(0, 20, 48, .3));
  animation: qa-robot-float 4.8s ease-in-out infinite;
}
.qassist-v52.is-open .qa-launcher { visibility: hidden; pointer-events: none; }
.qassist-v52.qa-autoflight .qa-launcher { animation: qa-auto-flight 6.5s cubic-bezier(.36, 0, .2, 1); }

/* Saludo no invasivo */
.qassist-v52 .qa-greeting {
  position: fixed;
  right: 24px;
  bottom: calc(178px + env(safe-area-inset-bottom));
  width: min(330px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  padding: 8px 8px 8px 11px;
  border: 1px solid var(--qa-line);
  border-radius: 18px;
  color: var(--qa-text);
  background: color-mix(in srgb, var(--qa-surface) 94%, transparent);
  box-shadow: 0 18px 45px rgba(4, 25, 48, .17);
  backdrop-filter: blur(18px);
  animation: qa-enter .28s ease-out;
}
.qassist-v52 .qa-greeting > button { border: 0; color: inherit; background: transparent; }
.qassist-v52 .qa-greeting > button:first-child { min-width: 0; flex: 1; display: flex; align-items: center; gap: 11px; padding: 4px; text-align: left; }
.qassist-v52 .qa-greeting-orb { flex: 0 0 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(145deg, var(--qa-cyan), var(--qa-blue)); box-shadow: 0 9px 20px rgba(24, 138, 204, .23); }
.qassist-v52 .qa-greeting > button:first-child > span:last-child { min-width: 0; display: grid; }
.qassist-v52 .qa-greeting b { font-size: 13px; }
.qassist-v52 .qa-greeting small { color: var(--qa-muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qassist-v52 .qa-greeting > button:last-child { flex: 0 0 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--qa-muted); font-size: 22px; }
.qassist-v52 .qa-greeting > button:last-child:hover { color: var(--qa-text); background: var(--qa-soft); }

/* Panel */
.qassist-v52 .qa-panel {
  position: fixed;
  right: auto;
  bottom: auto;
  width: min(478px, calc(100vw - 24px));
  height: min(750px, calc(100dvh - 28px));
  max-height: calc(100dvh - 24px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--qa-line);
  border-radius: 28px;
  color: var(--qa-text);
  background: var(--qa-bg);
  box-shadow: var(--qa-shadow);
  animation: qa-panel-enter .24s cubic-bezier(.2, .72, .25, 1);
}
.qassist-v52 .qa-panel-glow {
  position: absolute;
  z-index: -1;
  top: -140px;
  left: -100px;
  width: 360px;
  height: 310px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(44, 201, 220, .14), transparent 68%);
}
.qassist-v52.expanded .qa-panel { width: min(820px, calc(100vw - 48px)); height: calc(100dvh - 48px); }
.qassist-v52.dragging .qa-panel { user-select: none; box-shadow: 0 35px 110px rgba(2, 22, 45, .4); }

.qassist-v52 .qa-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 91px;
  padding: 12px 13px 12px 16px;
  color: #eefbff;
  border-bottom: 1px solid rgba(132, 218, 233, .16);
  background:
    radial-gradient(circle at 7% 4%, rgba(47, 214, 226, .24), transparent 28%),
    linear-gradient(126deg, var(--qa-navy), var(--qa-navy-2));
}
.qassist-v52 .qa-drag { min-width: 0; flex: 1; display: flex; align-items: center; gap: 11px; cursor: grab; touch-action: none; }
.qassist-v52.dragging .qa-drag { cursor: grabbing; }
.qassist-v52 .qa-header-robot { position: relative; flex: 0 0 65px; width: 65px; height: 65px; display: grid; place-items: center; }
.qassist-v52 .qa-header-robot::before { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(116, 231, 242, .28); border-radius: 21px; transform: rotate(8deg); background: rgba(26, 126, 155, .12); }
.qassist-v52 .qa-header-robot img { position: relative; z-index: 1; width: 66px; height: 66px; object-fit: contain; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .25)); }
.qassist-v52 .qa-header-robot i { position: absolute; z-index: 2; right: 2px; bottom: 6px; width: 10px; height: 10px; border: 2px solid var(--qa-navy); border-radius: 50%; background: #31d49a; box-shadow: 0 0 10px rgba(49, 212, 154, .65); }
.qassist-v52 .qa-header-kicker { display: block; margin-bottom: 2px; color: #77ddea; font-size: 8px; font-weight: 750; letter-spacing: .16em; white-space: nowrap; }
.qassist-v52 .qa-header h2 { margin: 0; color: #fff; font-size: 19px; line-height: 1.15; letter-spacing: -.035em; }
.qassist-v52 .qa-header h2 small { display: inline-block; margin-left: 4px; padding: 2px 5px; border: 1px solid rgba(119, 221, 234, .3); border-radius: 6px; color: #77ddea; font-size: 8px; letter-spacing: .11em; vertical-align: 3px; }
.qassist-v52 .qa-header p { max-width: 210px; margin: 4px 0 0; overflow: hidden; color: #b9cfdf; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.qassist-v52 .qa-header > button { flex: 0 0 37px; width: 37px; height: 42px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 12px; color: #bcd3e2; background: transparent; font-size: 21px; transition: color .18s, background .18s; }
.qassist-v52 .qa-header > button:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.qassist-v52 .qa-header > [data-do="dock"], .qassist-v52 .qa-header > [data-do="expand"] { font-size: 17px; }

.qassist-v52 .qa-context {
  flex: 0 0 auto;
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 17px;
  border-bottom: 1px solid var(--qa-line);
  background: var(--qa-surface);
}
.qassist-v52 .qa-context > span { min-width: 0; overflow: hidden; color: var(--qa-muted); font-size: 10px; font-weight: 650; letter-spacing: .05em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.qassist-v52 .qa-context > span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--qa-green); box-shadow: 0 0 0 3px rgba(34, 191, 145, .12); }
.qassist-v52 .qa-context button { min-height: 32px; padding: 4px 7px; border: 0; border-radius: 8px; color: var(--qa-muted); background: transparent; font-size: 11px; }
.qassist-v52 .qa-context button:hover { color: var(--qa-blue); background: var(--qa-soft); }

.qassist-v52 .qa-messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 21px 19px; scrollbar-color: rgba(88, 133, 162, .32) transparent; scrollbar-width: thin; }
.qassist-v52 .qa-welcome { max-width: 520px; margin: 0 auto; padding: 0 1px 4px; }
.qassist-v52 .qa-welcome-visual { position: relative; width: 122px; height: 112px; display: grid; place-items: center; margin: -7px auto 4px; }
.qassist-v52 .qa-welcome-visual::after { content: ""; position: absolute; z-index: -1; left: 25%; right: 25%; bottom: 2px; height: 13px; border-radius: 50%; background: rgba(15, 92, 142, .23); filter: blur(8px); }
.qassist-v52 .qa-welcome-visual img { position: relative; z-index: 2; width: 125px; height: 125px; object-fit: contain; filter: drop-shadow(0 12px 10px rgba(2, 22, 44, .18)); animation: qa-robot-float 4.8s ease-in-out infinite; }
.qassist-v52 .qa-orbit { position: absolute; z-index: 1; left: 50%; top: 51%; border: 1px solid rgba(16, 184, 207, .25); border-radius: 50%; transform: translate(-50%, -50%) rotate(-12deg); }
.qassist-v52 .qa-orbit::after { content: ""; position: absolute; left: 4px; top: 49%; width: 6px; height: 6px; border-radius: 50%; background: var(--qa-cyan); box-shadow: 0 0 10px var(--qa-cyan); }
.qassist-v52 .qa-orbit-one { width: 136px; height: 65px; animation: qa-orbit 8s linear infinite; }
.qassist-v52 .qa-orbit-two { width: 84px; height: 119px; opacity: .62; animation: qa-orbit-reverse 10s linear infinite; }
.qassist-v52 .qa-eyebrow { display: block; margin-top: 5px; color: #078ca2; font-size: 9px; font-weight: 800; letter-spacing: .15em; text-align: center; }
html[data-theme="dark"] .qassist-v52 .qa-eyebrow { color: #66d9e8; }
.qassist-v52 .qa-welcome h3 { margin: 7px 0 9px; color: var(--qa-text); font-size: clamp(23px, 4.8vw, 28px); font-weight: 690; letter-spacing: -.048em; line-height: 1.12; text-align: center; }
.qassist-v52 .qa-welcome h3 em { color: #0a8da4; font-style: normal; }
html[data-theme="dark"] .qassist-v52 .qa-welcome h3 em { color: #67dcea; }
.qassist-v52 .qa-welcome > p { max-width: 390px; margin: 0 auto 16px; color: var(--qa-muted); font-size: 12px; line-height: 1.55; text-align: center; }
.qassist-v52 .qa-prompts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.qassist-v52 .qa-prompts button { min-width: 0; min-height: 70px; display: grid; grid-template-columns: 1fr 18px; gap: 4px 7px; padding: 10px 11px; border: 1px solid var(--qa-line); border-radius: 15px; color: var(--qa-text); background: var(--qa-surface); box-shadow: 0 5px 15px rgba(15, 56, 88, .035); text-align: left; transition: transform .18s, border-color .18s, box-shadow .18s; }
.qassist-v52 .qa-prompts button:hover { transform: translateY(-2px); border-color: rgba(16, 184, 207, .5); box-shadow: 0 10px 23px rgba(11, 96, 129, .09); }
.qassist-v52 .qa-prompts button small { grid-column: 1 / -1; color: #0b9fb5; font-size: 8px; font-weight: 800; letter-spacing: .11em; }
.qassist-v52 .qa-prompts button b { min-width: 0; font-size: 11.5px; line-height: 1.28; }
.qassist-v52 .qa-prompts button span { color: var(--qa-muted); text-align: right; }
.qassist-v52 .qa-welcome-note { display: flex !important; align-items: flex-start; gap: 7px; margin-top: 13px; color: var(--qa-muted); font-size: 9px; line-height: 1.45; }
.qassist-v52 .qa-welcome-note span { color: var(--qa-cyan); }

/* Conversación */
.qassist-v52 .qa-message { max-width: 100%; padding: 0 0 19px; overflow-wrap: anywhere; }
.qassist-v52 .qa-message-label { margin: 0 0 6px; color: var(--qa-muted); font-size: 9px; font-weight: 780; letter-spacing: .09em; text-transform: uppercase; }
.qassist-v52 .qa-message-body { font-size: 13px; line-height: 1.68; }
.qassist-v52 .qa-message.assistant .qa-message-body { padding: 12px 14px; border: 1px solid var(--qa-line); border-radius: 4px 17px 17px 17px; background: var(--qa-surface); }
.qassist-v52 .qa-message.assistant .qa-message-label::before { content: "✦"; margin-right: 6px; color: var(--qa-cyan); }
.qassist-v52 .qa-message.user { padding-left: 36px; }
.qassist-v52 .qa-message.user .qa-message-label { text-align: right; }
.qassist-v52 .qa-message.user .qa-message-body { padding: 12px 14px; border: 1px solid rgba(39, 112, 242, .17); border-radius: 17px 4px 17px 17px; background: linear-gradient(145deg, rgba(43, 111, 242, .1), rgba(16, 184, 207, .07)); }
.qassist-v52 .qa-message-files { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: 7px; }
.qassist-v52 .qa-message-files span { max-width: 100%; display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 6px; overflow: hidden; border: 1px solid var(--qa-line); border-radius: 9px; color: var(--qa-muted); background: var(--qa-surface); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.qassist-v52 .qa-message-files b { flex: 0 0 auto; padding: 2px 5px; border-radius: 5px; color: #067f96; background: rgba(16, 184, 207, .1); font-size: 7px; letter-spacing: .05em; }
html[data-theme="dark"] .qassist-v52 .qa-message-files b { color: #74dce9; }
.qassist-v52 .qa-message a { color: var(--qa-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.qassist-v52 .qa-response-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; }
.qassist-v52 .qa-response-footer small { color: var(--qa-muted); font-size: 9px; }
.qassist-v52 .qa-response-footer button { min-height: 32px; padding: 5px 9px; border: 0; border-radius: 8px; color: var(--qa-muted); background: transparent; font-size: 10px; }
.qassist-v52 .qa-response-footer button:hover { color: var(--qa-blue); background: var(--qa-soft); }
.qassist-v52 .qa-sources { display: grid; gap: 7px; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--qa-line); }
.qassist-v52 .qa-sources b { color: var(--qa-muted); font-size: 9px; text-transform: uppercase; letter-spacing: .07em; }
.qassist-v52 .qa-sources a { display: block; font-size: 11px; text-decoration: none; }
.qassist-v52 .qa-waiting { padding: 8px 0 15px; color: var(--qa-muted); font-size: 11px; }
.qassist-v52 .qa-waiting::before { content: ""; width: 8px; height: 8px; display: inline-block; margin-right: 9px; border-radius: 50%; background: var(--qa-cyan); box-shadow: 0 0 0 5px rgba(16, 184, 207, .08); animation: qa-pulse 1.25s ease-in-out infinite; }
.qassist-v52 .qa-notice { flex: 0 0 auto; max-height: 120px; overflow: auto; margin: 0 15px 9px; padding: 9px 11px; border: 1px solid rgba(223, 159, 40, .3); border-left: 3px solid #d49727; border-radius: 11px; color: var(--qa-text); background: color-mix(in srgb, var(--qa-soft) 94%, #fff5cf); font-size: 10.5px; }
.qassist-v52 .qa-notice button { display: block; padding: 6px 0 0; border: 0; color: var(--qa-blue); background: transparent; font-size: 10px; text-decoration: underline; }

/* Compositor */
.qassist-v52 .qa-composer { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 15px 13px; border-top: 1px solid var(--qa-line); background: var(--qa-surface); }
.qassist-v52 .qa-composer-tools { flex-basis: 100%; display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.qassist-v52 .qa-web { min-height: 29px; display: inline-flex; align-items: center; gap: 7px; color: var(--qa-text); font-size: 10.5px; cursor: pointer; }
.qassist-v52 .qa-web input { width: 17px; height: 17px; margin: 0; accent-color: var(--qa-blue); }
.qassist-v52 .qa-mode { color: var(--qa-muted); font-size: 9px; }
.qassist-v52 .qa-attachments { flex-basis: 100%; max-height: 132px; display: grid; gap: 6px; overflow-y: auto; padding: 1px; scrollbar-color: rgba(88, 133, 162, .32) transparent; scrollbar-width: thin; }
.qassist-v52 .qa-attachment { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr) 30px; align-items: center; gap: 8px; min-height: 46px; padding: 5px 5px 5px 6px; border: 1px solid var(--qa-line); border-radius: 13px; background: linear-gradient(135deg, var(--qa-soft), color-mix(in srgb, var(--qa-surface) 90%, transparent)); }
.qassist-v52 .qa-attachment > img, .qassist-v52 .qa-file-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; object-fit: cover; }
.qassist-v52 .qa-file-icon { overflow: hidden; color: #087f96; background: rgba(16, 184, 207, .11); font-size: 7.5px; font-weight: 850; letter-spacing: .03em; }
html[data-theme="dark"] .qassist-v52 .qa-file-icon { color: #7ce3ef; }
.qassist-v52 .qa-file-copy { min-width: 0; display: grid; gap: 1px; }
.qassist-v52 .qa-file-copy b { overflow: hidden; color: var(--qa-text); font-size: 10.5px; font-weight: 690; text-overflow: ellipsis; white-space: nowrap; }
.qassist-v52 .qa-file-copy small { color: var(--qa-muted); font-size: 8px; letter-spacing: .04em; }
.qassist-v52 .qa-attachment > button { width: 29px; height: 29px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px; color: var(--qa-muted); background: transparent; font-size: 18px; line-height: 1; }
.qassist-v52 .qa-attachment > button:hover { color: #d04d5a; background: rgba(208, 77, 90, .09); }
.qassist-v52.expanded .qa-attachments { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qassist-v52 .qa-input-wrap { position: relative; flex-basis: 100%; padding: 10px 54px 10px 53px; border: 1px solid var(--qa-line); border-radius: 16px; background: var(--qa-soft); transition: border-color .18s, box-shadow .18s, background .18s; }
.qassist-v52 .qa-input-wrap:focus-within { border-color: rgba(16, 184, 207, .62); background: var(--qa-surface); box-shadow: 0 0 0 4px rgba(16, 184, 207, .09); }
.qassist-v52 .qa-input-wrap.drop-active { border-color: var(--qa-cyan); border-style: dashed; background: color-mix(in srgb, var(--qa-soft) 72%, rgba(16, 184, 207, .15)); box-shadow: 0 0 0 5px rgba(16, 184, 207, .11); }
.qassist-v52 .qa-input-wrap textarea { width: 100%; min-height: 44px; max-height: 116px; display: block; resize: none; padding: 0 !important; border: 0 !important; outline: 0 !important; color: var(--qa-text); background: transparent !important; box-shadow: none !important; font-size: 13px !important; line-height: 1.52; }
.qassist-v52 .qa-input-wrap textarea::placeholder { color: var(--qa-muted); opacity: .86; }
.qassist-v52 .qa-attach { position: absolute; left: 8px; bottom: 8px; width: 38px; height: 39px; display: grid; place-items: center; padding: 0; border: 1px solid var(--qa-line); border-radius: 12px; color: var(--qa-muted); background: var(--qa-surface); transition: color .18s, border-color .18s, transform .18s, box-shadow .18s; }
.qassist-v52 .qa-attach svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qassist-v52 .qa-attach:not(:disabled):hover { transform: translateY(-2px); color: var(--qa-cyan); border-color: rgba(16, 184, 207, .55); box-shadow: 0 7px 16px rgba(11, 96, 129, .1); }
.qassist-v52 .qa-send { position: absolute; right: 8px; bottom: 8px; width: 39px; height: 39px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 13px; color: #fff; background: linear-gradient(145deg, var(--qa-cyan), var(--qa-blue)); box-shadow: 0 8px 18px rgba(24, 113, 212, .25); font-size: 24px !important; transition: transform .18s, box-shadow .18s; }
.qassist-v52 .qa-send:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(24, 113, 212, .33); }
.qassist-v52 .qa-send.busy { animation: qa-pulse 1s infinite; }
.qassist-v52 .qa-input-note { width: 100%; display: flex; justify-content: space-between; gap: 8px; color: var(--qa-muted); font-size: 8.5px; }
.qassist-v52 .qa-privacy { flex-basis: 100%; color: var(--qa-muted); font-size: 8.5px; line-height: 1.35; }

@keyframes qa-panel-enter { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes qa-enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes qa-robot-float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-6px) rotate(1.5deg); } }
@keyframes qa-halo { 0%, 100% { transform: scale(.92); opacity: .58; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes qa-orbit { from { transform: translate(-50%, -50%) rotate(-12deg); } to { transform: translate(-50%, -50%) rotate(348deg); } }
@keyframes qa-orbit-reverse { from { transform: translate(-50%, -50%) rotate(28deg); } to { transform: translate(-50%, -50%) rotate(-332deg); } }
@keyframes qa-pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes qa-auto-flight {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  16% { transform: translate(var(--qa-flight-x1, -45px), var(--qa-flight-y1, -35px)) rotate(-5deg) scale(1.03); }
  43% { transform: translate(var(--qa-flight-x2, -170px), var(--qa-flight-y2, -110px)) rotate(4deg) scale(1.07); }
  69% { transform: translate(var(--qa-flight-x3, -95px), var(--qa-flight-y3, -70px)) rotate(-3deg) scale(1.035); }
  86% { transform: translate(var(--qa-flight-x4, -12px), 8px) rotate(2deg); }
}

@media (max-width: 640px) {
  .qassist-v52 { z-index: 2600; }
  .qassist-v52 .qa-launcher { right: 7px; bottom: calc(7px + env(safe-area-inset-bottom)); width: 126px; height: 126px; min-width: 126px; min-height: 126px; padding: 0; }
  .qassist-v52 .qa-launcher-halo { width: 101px; height: 101px; }
  .qassist-v52 .qa-launcher > img { width: 132px; height: 132px; }
  .qassist-v52.qa-autoflight .qa-launcher { animation-name: qa-auto-flight-mobile; }
  .qassist-v52 .qa-greeting { right: 12px; bottom: calc(137px + env(safe-area-inset-bottom)); }
  .qassist-v52 .qa-panel, .qassist-v52.expanded .qa-panel {
    inset: var(--qa-top, 0px) 0 auto 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: var(--qa-height, 100dvh) !important;
    max-height: var(--qa-height, 100dvh) !important;
    border: 0;
    border-radius: 0;
  }
  .qassist-v52 .qa-header { min-height: 81px; padding: 9px 8px 9px 11px; }
  .qassist-v52 .qa-header-robot { flex-basis: 56px; width: 56px; height: 56px; }
  .qassist-v52 .qa-header-robot img { width: 59px; height: 59px; }
  .qassist-v52 .qa-header > button { width: 42px; height: 44px; flex-basis: 42px; }
  .qassist-v52 .qa-header > [data-do="dock"], .qassist-v52 .qa-header > [data-do="expand"] { display: none; }
  .qassist-v52 .qa-header p { max-width: min(45vw, 195px); }
  .qassist-v52 .qa-drag { cursor: default; touch-action: auto; }
  .qassist-v52 .qa-context { padding-inline: 13px; }
  .qassist-v52 .qa-messages { padding: 17px 14px; }
  .qassist-v52 .qa-welcome-visual { width: 102px; height: 92px; }
  .qassist-v52 .qa-welcome-visual img { width: 108px; height: 108px; }
  .qassist-v52 .qa-orbit-one { width: 116px; }
  .qassist-v52 .qa-welcome h3 { font-size: 23px; }
  .qassist-v52 .qa-prompts button { min-height: 65px; padding: 9px 10px; }
  .qassist-v52 .qa-message-body { font-size: 13.5px; }
  .qassist-v52 .qa-composer { padding: 9px 12px calc(10px + env(safe-area-inset-bottom)); }
  .qassist-v52.expanded .qa-attachments { grid-template-columns: 1fr; }
  .qassist-v52 .qa-input-wrap textarea { font-size: 16px !important; }
  .qassist-v52 .qa-input-note > span:first-child { display: none; }
}

@media (max-width: 370px) {
  .qassist-v52 .qa-header-kicker { display: none; }
  .qassist-v52 .qa-header h2 { font-size: 17px; }
  .qassist-v52 .qa-prompts { grid-template-columns: 1fr; }
  .qassist-v52 .qa-prompts button { min-height: 54px; }
  .qassist-v52 .qa-welcome > p { font-size: 11px; }
}

@keyframes qa-auto-flight-mobile {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  20% { transform: translate(var(--qa-flight-x1, -22px), var(--qa-flight-y1, -20px)) rotate(-5deg); }
  48% { transform: translate(var(--qa-flight-x2, -78px), var(--qa-flight-y2, -72px)) rotate(4deg) scale(1.045); }
  72% { transform: translate(var(--qa-flight-x3, -43px), var(--qa-flight-y3, -46px)) rotate(-3deg); }
  88% { transform: translate(-8px, 6px) rotate(2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .qassist-v52 *, .qassist-v52 *::before, .qassist-v52 *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}

@media print { .qassist-v52 { display: none !important; } }
