:root{
  --qaly-chat-primary:#6c63ff;
  --qaly-chat-primary-dark:#4d42eb;
  --qaly-chat-accent:#9be7d8;
  --qaly-chat-ink:#171522;
  --qaly-chat-muted:#6d6886;
  --qaly-chat-border:rgba(108,99,255,.14);
  --qaly-chat-surface:rgba(255,255,255,.82);
  --qaly-chat-surface-strong:rgba(255,255,255,.92);
  --qaly-chat-shadow:0 18px 40px rgba(87,76,201,.14);
}

.assistant-panel{
  overflow:visible;
}

.qaly-chat{
  color:var(--qaly-chat-ink);
  box-sizing:border-box;
  max-width:100%;
  overflow-x:hidden;
}

.qaly-chat__version-notice{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  width:min(100%,1120px);
  margin:0 auto 16px;
  padding:14px 16px;
  border:1px solid rgba(108,99,255,.22);
  border-radius:18px;
  background:rgba(255,255,255,.92);
  color:var(--qaly-chat-ink);
  box-shadow:0 14px 28px rgba(87,76,201,.12);
}

.qaly-chat__version-notice div{
  display:grid;
  gap:3px;
}

.qaly-chat__version-notice strong{
  font-size:14px;
  color:var(--qaly-chat-primary-dark);
}

.qaly-chat__version-notice span{
  font-size:13px;
  color:var(--qaly-chat-muted);
}

.qaly-chat__version-notice button{
  border:none;
  border-radius:999px;
  padding:10px 14px;
  background:var(--qaly-chat-primary);
  color:#fff;
  font-weight:800;
  cursor:pointer;
  white-space:nowrap;
}

.qaly-chat *,
.qaly-chat *::before,
.qaly-chat *::after{
  box-sizing:border-box;
}

.qaly-chat__eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--qaly-chat-primary);
  font-weight:700;
  margin-bottom:10px;
}

.qaly-chat__title,
.qaly-chat__hero-title{
  margin:0;
  line-height:1.1;
}

.qaly-chat__title{
  font-size:28px;
}

.qaly-chat__hero-title{
  font-size:clamp(34px,4vw,52px);
}

.qaly-chat__description{
  margin:12px 0 0;
  color:var(--qaly-chat-muted);
  line-height:1.6;
}

.qaly-chat__badge,
.qaly-chat__window-pill,
.qaly-chat__subtle,
.qaly-chat__micro-meta span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}

.qaly-chat__badge{
  min-width:102px;
  padding:10px 14px;
  background:rgba(108,99,255,.12);
  color:var(--qaly-chat-primary-dark);
  border:1px solid rgba(108,99,255,.18);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6);
}

.qaly-chat__badge[data-tone="typing"]{
  background:rgba(255,186,71,.18);
  color:#915d00;
  border-color:rgba(255,186,71,.35);
}

.qaly-chat__badge[data-tone="error"]{
  background:rgba(255,98,110,.16);
  color:#a02c36;
  border-color:rgba(255,98,110,.28);
}

.qaly-chat__badge[data-tone="warning"]{
  background:rgba(255,186,71,.14);
  color:#915d00;
  border-color:rgba(255,186,71,.22);
}

.qaly-chat__quick-head,
.qaly-chat__panel-head,
.qaly-chat__window-header,
.qaly-chat__hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}

.qaly-chat__quick-tools,
.qaly-chat__panel-tools{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.qaly-chat__prompt-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}

.qaly-chat__mode-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}

.qaly-chat__mode-list--stack{
  margin-bottom:14px;
}

.qaly-chat__mode{
  border:none;
  border-radius:999px;
  padding:9px 12px;
  background:rgba(23,21,34,.05);
  color:var(--qaly-chat-muted);
  font-weight:800;
  font-size:12px;
  cursor:pointer;
  transition:background .2s ease,color .2s ease,transform .2s ease;
}

.qaly-chat__mode:hover,
.qaly-chat__mode.is-active{
  transform:translateY(-1px);
  background:rgba(108,99,255,.14);
  color:var(--qaly-chat-primary-dark);
}

.qaly-chat__prompt-list--stack{
  flex-direction:column;
}

.qaly-chat__prompt{
  border:none;
  border-radius:16px;
  padding:11px 14px;
  background:linear-gradient(135deg,rgba(108,99,255,.12),rgba(155,231,216,.22));
  color:var(--qaly-chat-ink);
  font-size:13px;
  line-height:1.35;
  cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.qaly-chat__prompt:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 22px rgba(108,99,255,.14);
  background:linear-gradient(135deg,rgba(108,99,255,.18),rgba(155,231,216,.28));
}

.qaly-chat__micro-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}

.qaly-chat__micro-meta span,
.qaly-chat__window-pill,
.qaly-chat__subtle{
  padding:8px 12px;
  background:rgba(23,21,34,.04);
  color:var(--qaly-chat-muted);
}

.qaly-chat__messages{
  margin-top:18px;
  padding-right:4px;
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-width:thin;
  scroll-behavior:smooth;
  max-width:100%;
  overscroll-behavior:contain;
}

.qaly-chat__messages--quick{
  height:340px;
  min-height:260px;
  max-height:min(46vh,420px);
}

.qaly-chat__messages--full{
  flex:1 1 auto;
  min-height:0;
  height:auto;
  max-height:none;
  overflow-y:auto;
  overflow-x:hidden;
}

.qaly-chat__message{
  width:auto;
  max-width:100%;
  margin-bottom:12px;
  padding:14px 16px;
  border-radius:20px;
  box-shadow:0 10px 24px rgba(33,27,83,.08);
  background:var(--qaly-chat-surface-strong);
  border:1px solid rgba(255,255,255,.75);
  animation:qalyMessageIn .22s ease both;
  overflow:visible;
  box-sizing:border-box;
}

.qaly-chat__message--assistant{
  width:100%;
  min-width:0;
  max-width:100%;
  margin-right:auto;
  border-top-left-radius:10px;
}

.qaly-chat__message--assistant.qaly-chat__message--long{
  padding:18px 22px;
}

.qaly-chat__message--user{
  margin-left:auto;
  max-width:min(940px,100%);
  border-top-right-radius:10px;
  background:linear-gradient(135deg,var(--qaly-chat-primary),#8c84ff);
  color:#fff;
}

.qaly-chat__message.is-streaming{
  position:relative;
}

.qaly-chat__message.is-speaking{
  border-color:rgba(108,99,255,.28);
  box-shadow:0 16px 34px rgba(108,99,255,.16);
}

.qaly-chat__message.is-streaming::after{
  content:"";
  position:absolute;
  right:14px;
  bottom:12px;
  width:10px;
  height:10px;
  border-radius:50%;
  background:currentColor;
  opacity:.35;
  animation:qalyPulse 1s infinite;
}

@keyframes qalyMessageIn{
  0%{transform:translateY(8px); opacity:0;}
  100%{transform:translateY(0); opacity:1;}
}

@keyframes qalyPulse{
  0%{transform:scale(.82); opacity:.2;}
  50%{transform:scale(1.2); opacity:.45;}
  100%{transform:scale(.82); opacity:.2;}
}

.qaly-chat__message-author{
  display:block;
  font-size:12px;
  margin-bottom:8px;
  opacity:.75;
}

.qaly-chat__message-body{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin:0;
  line-height:1.55;
  overflow-wrap:anywhere;
  word-break:break-word;
  max-height:none;
  overflow:visible;
}

.qaly-chat__message--long .qaly-chat__message-body{
  line-height:1.62;
}

.qaly-chat__message-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}

.qaly-chat__message-action{
  border:none;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(23,21,34,.06);
  color:var(--qaly-chat-muted);
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  transition:transform .2s ease, background .2s ease, color .2s ease;
}

.qaly-chat__message-action:hover{
  transform:translateY(-1px);
  background:rgba(108,99,255,.12);
  color:var(--qaly-chat-primary-dark);
}

.qaly-chat__message-action--download{
  padding:10px 16px;
  background:var(--qaly-chat-primary);
  color:#fff;
  box-shadow:0 8px 18px rgba(108,99,255,.2);
}

.qaly-chat__message-action--download:hover{
  background:var(--qaly-chat-primary-dark);
  color:#fff;
}

.qaly-chat__message-action--download:disabled{
  cursor:wait;
  opacity:.7;
  transform:none;
}

.qaly-chat__typing{
  display:inline-flex;
  align-items:center;
  gap:8px;
  width:fit-content;
  margin-top:2px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(108,99,255,.08);
  color:var(--qaly-chat-primary-dark);
  font-size:12px;
  font-weight:800;
}

.qaly-chat__speaking{
  display:inline-flex;
  align-items:center;
  gap:8px;
  width:fit-content;
  margin-top:12px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(108,99,255,.1);
  color:var(--qaly-chat-primary-dark);
  font-size:12px;
  font-weight:800;
}

.qaly-chat__typing-dots{
  display:inline-flex;
  align-items:center;
  gap:4px;
}

.qaly-chat__typing-dot{
  width:6px;
  height:6px;
  border-radius:50%;
  background:currentColor;
  animation:qalyTypingDot 1.05s infinite ease-in-out;
}

.qaly-chat__typing-dot:nth-child(2){
  animation-delay:.14s;
}

.qaly-chat__typing-dot:nth-child(3){
  animation-delay:.28s;
}

@keyframes qalyTypingDot{
  0%,80%,100%{transform:translateY(0); opacity:.35;}
  40%{transform:translateY(-4px); opacity:1;}
}

.qaly-chat__file-status-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:14px;
}

.qaly-chat__file-status{
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(108,99,255,.16);
  background:rgba(108,99,255,.08);
  color:var(--qaly-chat-muted);
  font-size:12px;
  line-height:1.35;
}

.qaly-chat__file-status strong{
  color:var(--qaly-chat-primary-dark);
  font-size:12px;
}

.qaly-chat__file-status[data-status="requires_ocr"]{
  border-color:rgba(255,186,71,.34);
  background:rgba(255,186,71,.14);
  color:#725000;
}

.qaly-chat__file-status[data-status="requires_ocr"] strong{
  color:#915d00;
}

.qaly-chat__message-paragraph{
  margin:0;
  white-space:normal;
  max-width:76ch;
  line-height:1.7;
}

.qaly-chat__message-heading{
  margin:6px 0 0;
  color:var(--qaly-chat-text);
  font-size:1.05em;
  line-height:1.35;
}

.qaly-chat__message-heading:first-child{
  margin-top:0;
}

.qaly-chat__message-rule{
  width:100%;
  height:1px;
  margin:4px 0;
  border:0;
  background:linear-gradient(90deg,rgba(108,99,255,.08),rgba(108,99,255,.34),rgba(108,99,255,.08));
}

.qaly-chat__message-quote{
  margin:0;
  padding:10px 14px;
  border-left:4px solid var(--qaly-chat-primary);
  border-radius:0 12px 12px 0;
  background:rgba(108,99,255,.07);
  color:var(--qaly-chat-muted);
}

.qaly-chat__message-list{
  margin:0;
  padding-left:24px;
  max-width:76ch;
  line-height:1.65;
}

.qaly-chat__message-link{
  color:var(--qaly-chat-primary-dark);
  font-weight:700;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}

.qaly-chat__math{
  display:inline-block;
  max-width:100%;
  padding:0 .12em;
  vertical-align:-.08em;
  overflow-x:auto;
  overflow-y:hidden;
  font-family:"STIX Two Math","Cambria Math",Georgia,serif;
  overflow-wrap:normal !important;
  word-break:normal !important;
}

.qaly-chat__math *{
  overflow-wrap:normal !important;
  word-break:normal !important;
}

.qaly-chat__math--display{
  display:block;
  width:fit-content;
  min-width:min(100%,220px);
  margin:2px auto;
  padding:14px 18px;
  border-radius:14px;
  background:rgba(108,99,255,.07);
  text-align:center;
  font-size:1.08em;
}

.qaly-chat__math .katex{
  white-space:nowrap;
}

.qaly-chat__math-fraction{
  display:inline-grid;
  grid-template-rows:auto auto;
  margin:0 .16em;
  vertical-align:-.48em;
  text-align:center;
  line-height:1.08;
}

.qaly-chat__math-numerator{
  padding:0 .2em .08em;
  border-bottom:1px solid currentColor;
}

.qaly-chat__math-denominator{
  padding:.08em .2em 0;
}

.qaly-chat__math-root{
  display:inline-flex;
  align-items:flex-start;
}

.qaly-chat__math-radicand{
  padding:0 .12em;
  border-top:1px solid currentColor;
}

.qaly-chat__math sup,
.qaly-chat__math sub{
  font-size:.72em;
  line-height:0;
}

.qaly-chat__message-list li + li{
  margin-top:8px;
}

.qaly-chat__inline-code{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  background:rgba(23,21,34,.08);
  font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;
  font-size:.92em;
}

.qaly-chat__code{
  margin:0;
  padding:16px 18px;
  border-radius:18px;
  background:#171522;
  color:#f7f7ff;
  overflow:auto;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);
}

.qaly-chat__code code{
  display:block;
  font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;
  font-size:13px;
  line-height:1.65;
  white-space:pre;
}

.qaly-chat__composer{
  margin-top:16px;
}

.qaly-chat__attachments{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin-top:10px;
}

.qaly-chat__attachments-label{
  font-size:12px;
  font-weight:900;
  color:var(--qaly-chat-muted);
}

.qaly-chat__attachment-chip{
  border:none;
  border-radius:999px;
  padding:8px 11px;
  background:rgba(155,231,216,.22);
  color:#276b62;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}

.qaly-chat__attachment-hint{
  flex-basis:100%;
  margin-top:-2px;
  color:#8a6400;
  font-size:12px;
  line-height:1.35;
}

.qaly-chat__file-action{
  position:relative;
  overflow:hidden;
}

.qaly-chat__file-action input{
  position:absolute;
  inset:0;
  opacity:0;
  cursor:pointer;
}

.qaly-chat__textarea,
.qaly-chat__field input,
.qaly-chat__field select{
  width:100%;
  box-sizing:border-box;
  border:none;
  outline:none;
  border-radius:18px;
  background:rgba(255,255,255,.9);
  color:var(--qaly-chat-ink);
  box-shadow:inset 0 0 0 1px rgba(108,99,255,.14);
}

.qaly-chat__textarea{
  min-height:88px;
  max-height:240px;
  padding:16px 18px;
  resize:none;
  overflow-y:auto;
  font:inherit;
  line-height:1.55;
}

.qaly-chat__textarea:focus,
.qaly-chat__field input:focus,
.qaly-chat__field select:focus{
  box-shadow:inset 0 0 0 2px rgba(108,99,255,.25),0 0 0 6px rgba(108,99,255,.08);
}

.qaly-chat__textarea--full{
  min-height:126px;
  max-height:360px;
}

.qaly-chat__composer-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:12px;
}

.qaly-chat__composer-actions--full{
  justify-content:flex-end;
}

.qaly-chat__primary,
.qaly-chat__link,
.qaly-chat__ghost{
  border:none;
  text-decoration:none;
  cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease, opacity .2s ease;
  font-weight:700;
}

.qaly-chat__primary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 18px;
  border-radius:16px;
  color:#fff;
  background:linear-gradient(135deg,var(--qaly-chat-primary),#8277ff);
  box-shadow:0 12px 24px rgba(108,99,255,.26);
}

.qaly-chat__primary--soft{
  background:linear-gradient(135deg,#3b325e,#1d1933);
  box-shadow:0 12px 24px rgba(29,25,51,.2);
}

.qaly-chat__primary:hover,
.qaly-chat__link:hover,
.qaly-chat__ghost:hover{
  transform:translateY(-2px);
}

.qaly-chat__primary:disabled,
.qaly-chat__ghost:disabled{
  opacity:.6;
  cursor:not-allowed;
  transform:none;
}

.qaly-chat__link,
.qaly-chat__ghost{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 16px;
  border-radius:16px;
}

.qaly-chat__link{
  color:var(--qaly-chat-primary-dark);
  background:rgba(108,99,255,.12);
}

.qaly-chat__ghost{
  color:var(--qaly-chat-ink);
  background:rgba(255,255,255,.72);
  box-shadow:inset 0 0 0 1px rgba(108,99,255,.12);
}

.qaly-chat__voice-toggle{
  border:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:132px;
  padding:10px 14px;
  border-radius:999px;
  background:rgba(23,21,34,.06);
  color:var(--qaly-chat-muted);
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  transition:transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

.qaly-chat__voice-panel{
  margin-top:14px;
  padding:14px;
  border-radius:18px;
  background:rgba(108,99,255,.07);
  border:1px solid rgba(108,99,255,.12);
}

.qaly-chat__voice-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.qaly-chat__voice-head strong{
  font-size:13px;
  color:var(--qaly-chat-primary-dark);
}

.qaly-chat__voice-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}

.qaly-chat__voice-field{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:0;
}

.qaly-chat__voice-field span{
  font-size:12px;
  font-weight:700;
  color:var(--qaly-chat-muted);
}

.qaly-chat__voice-field select,
.qaly-chat__voice-field input[type="range"]{
  width:100%;
}

.qaly-chat__voice-field strong{
  font-size:12px;
  color:var(--qaly-chat-ink);
}

.qaly-chat__voice-toggle:hover{
  transform:translateY(-1px);
}

.qaly-chat__voice-toggle[data-enabled="true"],
.qaly-chat__ghost--button[data-enabled="true"]{
  background:rgba(108,99,255,.14);
  color:var(--qaly-chat-primary-dark);
  box-shadow:inset 0 0 0 1px rgba(108,99,255,.14);
}

.qaly-chat__ghost--button{
  font:inherit;
}

.qaly-chat__status,
.qaly-chat__support-copy,
.qaly-chat__history-note{
  margin:14px 0 0;
  font-size:13px;
  line-height:1.5;
  color:var(--qaly-chat-muted);
}

.qaly-chat__support-copy--voice{
  margin-top:12px;
  font-weight:700;
}

.qaly-chat__status[data-tone="error"],
.qaly-chat__support-copy[data-tone="error"]{
  color:#a02c36;
}

.qaly-chat__status[data-tone="warning"],
.qaly-chat__support-copy[data-tone="warning"]{
  color:#915d00;
}

.qaly-chat__status[data-tone="typing"],
.qaly-chat__support-copy[data-tone="typing"]{
  color:#915d00;
}

.qaly-chat--full{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:22px;
}

.qaly-chat__hero,
.qaly-chat__panel,
.qaly-chat__window,
.qaly-chat__stat-card{
  background:var(--qaly-chat-surface);
  backdrop-filter:blur(18px);
  border:1px solid rgba(255,255,255,.7);
  box-shadow:var(--qaly-chat-shadow);
}

.qaly-chat__hero{
  border-radius:28px;
  padding:28px;
}

.qaly-chat__hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.qaly-chat__hero-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.qaly-chat__stat-card{
  border-radius:22px;
  padding:20px;
}

.qaly-chat__stat-card span,
.qaly-chat__stat-card small{
  display:block;
  color:var(--qaly-chat-muted);
}

.qaly-chat__stat-card strong{
  display:block;
  font-size:24px;
  margin:8px 0 10px;
}

.qaly-chat__layout{
  display:grid;
  grid-template-columns:minmax(290px,340px) minmax(0,1fr);
  gap:18px;
  align-items:start;
}

.qaly-chat__sidebar{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.qaly-chat__panel,
.qaly-chat__window{
  border-radius:28px;
  padding:24px;
}

.qaly-chat__window{
  display:flex;
  flex-direction:column;
  width:100%;
  min-width:0;
  min-height:0;
  height:min(78vh,920px);
  max-height:min(78vh,920px);
  overflow:hidden;
}

.qaly-chat__composer--full{
  margin-top:16px;
}

.qaly-chat__field{
  display:block;
  margin-top:16px;
}

.qaly-chat__field span{
  display:block;
  margin-bottom:8px;
  font-size:13px;
  font-weight:700;
  color:var(--qaly-chat-muted);
}

.qaly-chat__field input,
.qaly-chat__field select{
  padding:14px 16px;
  font:inherit;
}

.qaly-chat__window-header{
  margin-bottom:12px;
}

.qaly-chat__window-header p{
  margin:6px 0 0;
  color:var(--qaly-chat-muted);
}

@media (max-width:1180px){
  .qaly-chat__hero-grid{
    grid-template-columns:1fr;
  }

  .qaly-chat__layout{
    grid-template-columns:1fr;
  }
}

@media (max-width:760px){
  .assistant-panel{
    padding:16px;
  }

  .qaly-chat__quick-head,
  .qaly-chat__panel-head,
  .qaly-chat__window-header,
  .qaly-chat__hero{
    flex-direction:column;
  }

  .qaly-chat__quick-head > div,
  .qaly-chat__panel-head > div,
  .qaly-chat__window-header > div{
    width:100%;
  }

  .qaly-chat__quick-tools,
  .qaly-chat__panel-tools{
    width:100%;
  }

  .qaly-chat__voice-grid{
    grid-template-columns:1fr;
  }

  .qaly-chat__badge{
    align-self:flex-start;
  }

  .qaly-chat__title{
    font-size:24px;
  }

  .qaly-chat__messages--quick{
    height:300px;
    min-height:260px;
    max-height:min(45vh,360px);
  }

  .qaly-chat__composer-actions{
    flex-direction:column;
    align-items:stretch;
  }

  .qaly-chat__primary,
  .qaly-chat__link,
  .qaly-chat__ghost{
    width:100%;
  }

  .qaly-chat__messages--full{
    min-height:300px;
  }

  .qaly-chat__textarea{
    min-height:84px;
  }

  .qaly-chat__textarea--full{
    min-height:120px;
  }
}

@media (max-width:480px){
  .assistant-panel{
    padding:14px;
  }

  .qaly-chat__title{
    font-size:22px;
  }

  .qaly-chat__description,
  .qaly-chat__status,
  .qaly-chat__history-note{
    font-size:12px;
  }

  .qaly-chat__messages--quick{
    height:280px;
    min-height:240px;
    max-height:min(44vh,320px);
  }

  .qaly-chat__message{
    max-width:100%;
    padding:13px 14px;
  }

  .qaly-chat__message--assistant,
  .qaly-chat__message--user,
  .qaly-chat__message--assistant.qaly-chat__message--long{
    width:100%;
    max-width:100%;
  }

  .qaly-chat__textarea{
    min-height:80px;
  }

  .qaly-chat__textarea--full{
    min-height:112px;
  }
}

.qaly-chat__voice-panel{
  margin-top:14px;
  padding:18px 20px;
  border-radius:24px;
  background:rgba(108,99,255,.08);
  border:1px solid rgba(108,99,255,.16);
  overflow:hidden;
}

.qaly-chat__voice-grid{
  display:grid;
  grid-template-columns:1.2fr 1fr 1fr;
  gap:22px;
  align-items:end;
}

.qaly-chat__voice-field{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
}

.qaly-chat__voice-field span{
  font-size:15px;
  font-weight:900;
  color:var(--qaly-chat-muted);
}

.qaly-chat__voice-field strong{
  display:block;
  text-align:center;
  margin-top:4px;
  font-size:16px;
  color:var(--qaly-chat-ink);
}

.qaly-chat__voice-field select{
  height:40px;
  width:100%;
  max-width:100%;
  padding:8px 10px;
  border-radius:10px;
  background:#fff;
  color:var(--qaly-chat-ink);
  font-size:14px;
  line-height:1.2;
  box-shadow:inset 0 0 0 1px rgba(108,99,255,.18);
}

.qaly-chat__voice-field input[type="range"]{
  height:28px;
  accent-color:#ef3f46;
  cursor:pointer;
}

.qaly-chat--full .qaly-chat__layout{
  grid-template-columns:minmax(220px,280px) minmax(0,1fr);
  gap:12px;
}

.qaly-chat--full .qaly-chat__sidebar{
  gap:12px;
}

.qaly-chat--full .qaly-chat__panel{
  border-radius:20px;
  padding:14px;
}

.qaly-chat--full .qaly-chat__panel-head{
  gap:10px;
  align-items:center;
}

.qaly-chat--full .qaly-chat__panel-head h2{
  font-size:20px;
  line-height:1.05;
}

.qaly-chat--full .qaly-chat__field{
  margin-top:10px;
}

.qaly-chat--full .qaly-chat__field span{
  margin-bottom:5px;
  font-size:12px;
}

.qaly-chat--full .qaly-chat__field input,
.qaly-chat--full .qaly-chat__field select{
  min-height:40px;
  padding:8px 11px;
  border-radius:14px;
  font-size:14px;
}

.qaly-chat--full .qaly-chat__voice-panel{
  margin-top:12px;
  padding:12px;
  border-radius:16px;
}

.qaly-chat--full .qaly-chat__voice-head{
  margin-bottom:8px;
}

.qaly-chat--full .qaly-chat__voice-grid{
  grid-template-columns:1fr .9fr .9fr;
  gap:10px;
  align-items:end;
}

.qaly-chat--full .qaly-chat__voice-field{
  gap:6px;
}

.qaly-chat--full .qaly-chat__voice-field span{
  font-size:11px;
}

.qaly-chat--full .qaly-chat__voice-field select{
  height:34px;
  padding:6px 8px;
  border-radius:9px;
  font-size:12px;
}

.qaly-chat--full .qaly-chat__voice-field input[type="range"]{
  height:20px;
}

.qaly-chat--full .qaly-chat__voice-field strong{
  margin-top:0;
  font-size:12px;
}

.qaly-chat--full .qaly-chat__support-copy{
  margin-top:8px;
  font-size:11px;
  line-height:1.35;
}

.qaly-chat--full .qaly-chat__mode-list{
  gap:6px;
  margin-top:10px;
}

.qaly-chat--full .qaly-chat__mode{
  padding:7px 10px;
  font-size:11px;
}

.qaly-chat__layout > *,
.qaly-chat__sidebar,
.qaly-chat__panel,
.qaly-chat__window,
.qaly-chat__message{
  min-width:0;
}

.qaly-chat--full .qaly-chat__prompt-list{
  gap:8px;
  margin-top:12px;
}

.qaly-chat--full .qaly-chat__prompt{
  padding:9px 10px;
  border-radius:13px;
  font-size:12px;
  line-height:1.25;
}

.qaly-chat--full .qaly-chat__subtle{
  padding:7px 10px;
  font-size:11px;
}

@media (max-width:760px){
  .qaly-chat__voice-grid{
    grid-template-columns:1fr;
    gap:16px;
  }

  .qaly-chat__voice-field strong{
    text-align:left;
  }
}
