/* Console di prova Pelomatto - mobile first.
 *
 * Le regole base valgono per il telefono, che e' lo schermo su cui si prova
 * davvero una chat: si scrive con i pollici, con la tastiera aperta e con meno
 * di 400px di larghezza. Il desktop arriva dopo, in un solo blocco
 * `min-width`, e aggiunge cio' che lo spazio permette - non il contrario.
 *
 * Quattro accortezze che si vedono solo provando su un telefono vero:
 *   - `100dvh` e non `100vh`: su iOS la barra del browser compare e scompare, e
 *     `100vh` lascia il composer sotto il bordo dello schermo;
 *   - campi di testo a 16px: sotto quella soglia Safari zooma da solo al focus,
 *     e la pagina resta ingrandita;
 *   - `env(safe-area-inset-*)`: sui telefoni con la tacca il contenuto finisce
 *     sotto la barra di sistema. Valgono pero' solo con `viewport-fit=cover`
 *     nel meta viewport: senza, sono zero e il margine che sembra esserci non
 *     c'e';
 *   - niente `position: fixed`: su questo schermo un pannello sovrapposto
 *     copre sempre qualcos'altro. Console e chat stanno nella stessa colonna e
 *     si dividono l'altezza.
 *
 * Il verticale e' l'unica cosa contesa: quello che su desktop e' cornice
 * (titolo del prodotto, id conversazione, nota sull'ambiente) qui sparisce, e
 * la barra in alto resta un attrezzo di una riga - marchio, numero, nuova
 * conversazione.
 */

:root {
  --ink: #28231f;
  --muted: #746c65;
  --paper: #fffdfa;
  --canvas: #f2eee8;
  --line: #e5ded5;
  --brand: #bd4e2f;
  --brand-dark: #91371f;
  --brand-soft: #f7e5dc;
  --olive: #526650;
  --olive-soft: #e7eee5;
  --warning: #9a5a16;
  --warning-soft: #fff1d8;
  --danger: #8d3028;
  --danger-soft: #fbe4e1;
  --shadow: 0 24px 70px rgb(74 56 43 / 14%);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  /* Quanto puo' prendersi la console da aperta: la sua fetta, ma mai piu' di
     cio' che avanza dopo barra, intestazione, composer e una bolla. Senza il
     secondo termine, su uno schermo basso (o in orizzontale) la console
     spingerebbe il composer fuori dallo schermo. */
  --console-max: min(38dvh, max(0px, 100dvh - 20rem));
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

/* Una colonna sola: la console, quando c'e', e poi la chat. I margini di
   sicurezza stanno qui una volta sola, cosi' chi capita per primo in cima non
   deve saperne niente. */
body {
  display: flex;
  flex-direction: column;
  min-width: 320px;
  height: 100dvh;
  margin: 0;
  padding: var(--safe-top) var(--safe-right) 0 var(--safe-left);
  overflow: hidden;
  background: var(--paper);
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
  /* Senza `manipulation` il browser aspetta il secondo tap per escludere il
     doppio tap da zoom: ogni bottone risponde con un ritardo che si sente. */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Impianto ------------------------------------------------------------ */

.app-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--paper);
}

/* ---- Barra superiore (la sidebar del desktop) ---------------------------- */

/* Il numero prende tutta la riga: e' il campo che si rilegge di continuo per
   sapere con chi si sta parlando, e stretto fra marchio e bottone finiva
   troncato a meta'. Le due azioni scendono sotto, allineate al campo. */
.sidebar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px 10px;
  padding: 10px 14px;
  background: #ebe4dc;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 10px;
}

/* `contents`: il marchio non fa scatola e i suoi pezzi entrano nella griglia
   della barra. La regola e' legata alla barra e non a `.brand` perche' nella
   pagina di accesso quel blocco deve restare intero. */
.sidebar .brand {
  display: contents;
}

.sidebar .brand > div:not(.brand-mark) {
  display: none;
}

.sidebar .brand-mark {
  grid-row: 1;
  grid-column: 1;
}

.brand-mark,
.welcome-mark {
  display: grid;
  place-items: center;
  color: white;
  background: var(--brand);
  font-family: Georgia, serif;
  font-weight: 700;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px 12px 12px 4px;
  font-size: 19px;
  box-shadow: 0 8px 20px rgb(145 55 31 / 20%);
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand h1 {
  margin-bottom: 0;
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 600;
}

/* Su telefono il pannello sessione non fa cornice: i suoi campi salgono nella
   griglia della barra. Intestazione, id conversazione e nota restano nascosti,
   sono contesto da desktop. */
.panel {
  padding: 10px;
  background: rgb(255 253 250 / 62%);
  border: 1px solid rgb(128 107 91 / 14%);
  border-radius: 14px;
}

.session-panel {
  display: contents;
}

.session-panel input {
  grid-row: 1;
  grid-column: 2;
}

.session-panel .button-secondary {
  grid-row: 2;
  grid-column: 2;
  justify-self: end;
}

.panel-heading,
.conversation-meta,
.safety-note,
.session-panel label,
.field-row label {
  display: none;
}

.field-row {
  display: contents;
}

.link-button {
  grid-row: 2;
  /* Parte dal bordo, allineata alla riga di aiuto: a 320px, spartendo la riga
     con il bottone, i due si sfioravano. */
  grid-column: 1 / -1;
  justify-self: start;
  padding: 4px 0;
  cursor: pointer;
  color: var(--brand);
  background: none;
  border: 0;
  font-size: 12px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.field-help {
  grid-row: 3;
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.field-help-new {
  color: var(--olive);
  font-weight: 650;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-pill::before {
  width: 6px;
  height: 6px;
  content: "";
  border-radius: 50%;
  background: currentColor;
}

.status-checking {
  color: var(--warning);
  background: var(--warning-soft);
}

.status-online {
  color: var(--olive);
  background: var(--olive-soft);
}

.status-offline {
  color: #9f3529;
  background: #f9dfdc;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 750;
}

input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 11px 13px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  /* 16px: sotto questa soglia Safari zooma la pagina al focus. */
  font-size: 16px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(189 78 47 / 12%);
}

.conversation-meta {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.conversation-meta code {
  max-width: 120px;
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.button-secondary {
  min-height: 44px;
  padding: 10px 14px;
  cursor: pointer;
  background: transparent;
  border: 1px solid #cfc3b8;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease;
}

/* ---- Conversazione ------------------------------------------------------- */

.chat {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  background: var(--paper);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

/* Il marchio qui sopra dice gia' di chi e' questa chat: ripeterlo costa una
   riga di conversazione. */
.chat-header .eyebrow {
  display: none;
}

.chat-header h2 {
  margin-bottom: 0;
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: 600;
}

.agent-state {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.agent-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--olive);
  box-shadow: 0 0 0 4px var(--olive-soft);
}

/* `overflow-x: hidden` e' una rete: nessuna bolla deve poter far scorrere la
   conversazione di lato. Il testo va a capo da solo comunque. */
.messages {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 12px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.welcome {
  display: grid;
  place-items: center;
  max-width: 590px;
  margin: 18px auto 0;
  text-align: center;
}

.welcome-mark {
  width: 50px;
  height: 50px;
  margin-bottom: 16px;
  border-radius: 16px 16px 16px 5px;
  font-size: 25px;
}

.welcome h3 {
  margin-bottom: 9px;
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 600;
}

.welcome > p {
  max-width: 450px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.suggestions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
}

.suggestions button {
  min-height: 46px;
  padding: 11px 14px;
  cursor: pointer;
  background: #faf6f1;
  border: 1px solid var(--line);
  border-radius: 13px;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.message-row {
  display: flex;
  margin-bottom: 16px;
  animation: message-in 180ms ease-out;
}

.message-row.user {
  justify-content: flex-end;
}

.message-bubble {
  max-width: 88%;
  padding: 12px 14px 8px;
  background: #f2eee8;
  border: 1px solid #ebe4dc;
  border-radius: 5px 17px 17px 17px;
  box-shadow: 0 5px 16px rgb(66 51 39 / 5%);
}

.message-row.user .message-bubble {
  color: white;
  background: var(--brand);
  border-color: var(--brand);
  border-radius: 17px 5px 17px 17px;
}

.message-text {
  font-size: 14.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* La riga va a capo: orario, etichetta e costo insieme sono piu' larghi di una
   bolla su un telefono, e senza `wrap` era la bolla ad allargarsi oltre lo
   schermo. */
.message-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 9px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.message-row.user .message-meta {
  justify-content: flex-end;
  color: rgb(255 255 255 / 70%);
}

.handoff-label {
  padding: 3px 6px;
  white-space: nowrap;
  color: var(--warning);
  background: var(--warning-soft);
  border-radius: 999px;
}

/* Token e dollari del turno: si leggono quando li si cerca, non prima. Stanno
   in fondo alla riga perche' l'orario e' l'informazione che si guarda sempre. */
.message-usage {
  margin-left: auto;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.75;
  overflow-wrap: anywhere;
}

.message-row.pending .message-bubble {
  padding: 14px 18px;
}

.typing {
  display: flex;
  gap: 5px;
}

.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #948a82;
  animation: typing 1s infinite ease-in-out;
}

.typing span:nth-child(2) {
  animation-delay: 120ms;
}

.typing span:nth-child(3) {
  animation-delay: 240ms;
}

/* ---- Composer ------------------------------------------------------------ */

.composer-wrap {
  padding: 10px 12px calc(10px + var(--safe-bottom));
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 6px 6px 6px 13px;
  background: white;
  border: 1px solid #d9d0c8;
  border-radius: 17px;
  box-shadow: 0 8px 25px rgb(67 51 39 / 7%);
}

textarea {
  width: 100%;
  max-height: 120px;
  padding: 9px 0;
  resize: none;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: none;
  font-size: 16px;
  line-height: 1.45;
}

textarea:focus {
  box-shadow: none;
}

.send-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
  color: white;
  background: var(--brand);
  border: 0;
  border-radius: 12px;
  transition: background 150ms ease, transform 150ms ease;
}

.send-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.send-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.composer-help {
  display: none;
  margin: 7px 0 0;
  color: #948a82;
  font-size: 10px;
  text-align: center;
}

.form-error {
  margin-bottom: 9px;
  padding: 9px 12px;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 9px;
  font-size: 12.5px;
}

/* ---- Console dei tool ----------------------------------------------------
   Su telefono e' la prima riga della colonna: da chiusa una barra, da aperta
   una fetta che scorre al proprio interno. Fissa copriva il marchio e il
   numero del cliente, e prima ancora il composer: su questo schermo non esiste
   un angolo libero dove metterla. Da desktop, dove lo spazio avanza, torna a
   galleggiare. */

.console {
  display: flex;
  flex-direction: column;
  position: relative;
  order: -1;
  z-index: 40;
  flex: 0 0 auto;
  min-height: 0;
  overflow: hidden;
  background: var(--paper);
  border-bottom: 1px solid rgb(15 23 42 / 12%);
  box-shadow: 0 6px 18px rgb(15 23 42 / 7%);
  font-size: 0.82rem;
}

.console-toggle {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
}

.console-title {
  flex: 1;
  font-weight: 600;
}

.console-count {
  min-width: 1.6rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgb(15 23 42 / 8%);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.console-chevron {
  transition: transform 0.15s ease;
}

.console-toggle[aria-expanded="true"] .console-chevron {
  transform: rotate(180deg);
}

.console-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: var(--console-max);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0.9rem 0.9rem;
  border-top: 1px solid rgb(15 23 42 / 8%);
  overscroll-behavior: contain;
}

.console-hint {
  margin: 0.7rem 0;
  opacity: 0.7;
  line-height: 1.4;
}

.console-entries {
  margin: 0;
  padding: 0;
  list-style: none;
}

.console-turn {
  margin: 0.9rem 0 0.35rem;
  opacity: 0.55;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.console-entry {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.4rem 0;
  border-top: 1px solid rgb(15 23 42 / 6%);
}

.console-dot {
  align-self: center;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #16a34a;
}

.console-entry[data-ok="false"] .console-dot {
  background: #dc2626;
}

.console-tool {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}

.console-duration {
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
}

.console-outcome {
  grid-column: 2 / -1;
  opacity: 0.7;
  overflow-wrap: anywhere;
}

.console-args {
  grid-column: 2 / -1;
  margin: 0.2rem 0 0;
  padding: 0.4rem 0.55rem;
  overflow-x: auto;
  background: rgb(15 23 42 / 5%);
  border-radius: 0.45rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.console-empty {
  padding: 0.5rem 0;
  opacity: 0.6;
}

/* ---- Accesso ------------------------------------------------------------- */

/* `safe center`: con la tastiera aperta il riquadro e' piu' alto dello spazio
   rimasto, e un centraggio normale ne taglia la cima - proprio dove stanno i
   campi. La riga senza `safe` resta per i browser che non la conoscono. */
.login-body {
  display: grid;
  place-items: center;
  place-items: safe center;
  height: 100dvh;
  padding: calc(20px + var(--safe-top)) calc(16px + var(--safe-right))
    calc(20px + var(--safe-bottom)) calc(16px + var(--safe-left));
  overflow: auto;
  background: var(--canvas);
}

.login-card {
  width: min(24rem, 100%);
  padding: 26px 22px 24px;
  background: var(--paper);
  border: 1px solid rgb(118 99 84 / 15%);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.login-error {
  margin-bottom: 16px;
  padding: 10px 12px;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 10px;
  font-size: 12.5px;
}

.login-form label {
  display: block;
  margin-top: 14px;
  margin-bottom: 8px;
}

.login-form label:first-child {
  margin-top: 0;
}

.login-button {
  width: 100%;
  min-height: 46px;
  margin-top: 20px;
  padding: 12px 14px;
  cursor: pointer;
  color: white;
  background: var(--brand);
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 750;
  transition: background 150ms ease;
}

/* ---- Puntatore -----------------------------------------------------------
   Dopo un tap il `:hover` non si toglie: il bottone resta acceso finche' non se
   ne tocca un altro, e sembra selezionato. Gli effetti valgono dove un
   puntatore c'e' davvero; al dito risponde `:active`, che dura quanto il tocco. */

@media (hover: hover) {
  .button-secondary:hover {
    background: var(--paper);
    border-color: #b9a99b;
  }

  .suggestions button:hover {
    background: white;
    border-color: #ceb9aa;
    transform: translateY(-1px);
  }

  .send-button:hover:not(:disabled) {
    background: var(--brand-dark);
    transform: translateY(-1px);
  }

  .login-button:hover {
    background: var(--brand-dark);
  }
}

.suggestions button:active,
.button-secondary:active {
  background: white;
}

.send-button:active:not(:disabled),
.login-button:active {
  background: var(--brand-dark);
}

/* ---- Animazioni ---------------------------------------------------------- */

@keyframes typing {
  0%,
  60%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
}

/* ---- Da tablet in su -----------------------------------------------------
   Larghezza e altezza insieme: la scheda ne chiede 620 in verticale, e un
   telefono coricato e' largo come un desktop ma alto la meta'. */

@media (min-width: 761px) and (min-height: 660px) {
  body {
    display: block;
    height: 100vh;
    padding: 0;
    background:
      radial-gradient(circle at 12% 5%, rgb(255 255 255 / 76%), transparent 31rem),
      var(--canvas);
  }

  .app-shell {
    grid-template-columns: 310px minmax(0, 1fr);
    grid-template-rows: none;
    width: min(1180px, calc(100% - 40px));
    height: min(850px, calc(100vh - 40px));
    min-height: 620px;
    margin: 20px auto;
    border: 1px solid rgb(118 99 84 / 15%);
    border-radius: 26px;
    box-shadow: var(--shadow);
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
    min-height: 0;
    padding: 30px 26px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .sidebar .brand {
    display: flex;
    margin-bottom: 0;
  }

  .sidebar .brand > div:not(.brand-mark) {
    display: block;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px 14px 14px 5px;
    font-size: 24px;
  }

  .brand h1 {
    font-size: 24px;
  }

  .eyebrow {
    margin-bottom: 4px;
    font-size: 11px;
  }

  .panel {
    padding: 18px;
    border-radius: 18px;
  }

  .session-panel {
    display: block;
  }

  .panel-heading,
  .conversation-meta {
    display: flex;
  }

  .panel-heading {
    margin-bottom: 22px;
    font-size: 13px;
    font-weight: 750;
  }

  .safety-note {
    display: block;
    margin-top: auto;
    padding: 0 5px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
  }

  .field-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
  }

  .field-row label {
    display: block;
  }

  .link-button {
    margin-bottom: 8px;
    padding: 0;
    font-size: 11px;
  }

  .field-help {
    margin: 8px 0 20px;
  }

  input {
    font-size: 14px;
  }

  .button-secondary {
    width: 100%;
    margin-top: 15px;
  }

  .chat-header {
    min-height: 96px;
    padding: 23px 30px;
  }

  .chat-header .eyebrow {
    display: block;
  }

  .composer-help {
    display: block;
  }

  .chat-header h2 {
    font-size: clamp(20px, 2.2vw, 27px);
  }

  .agent-state {
    font-size: 12px;
  }

  .messages {
    padding: 32px 30px;
  }

  .welcome {
    margin-top: 50px;
  }

  .welcome-mark {
    width: 58px;
    height: 58px;
    margin-bottom: 20px;
    font-size: 29px;
  }

  .welcome h3 {
    font-size: 24px;
  }

  .welcome > p {
    font-size: 14px;
  }

  .suggestions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .message-bubble {
    max-width: min(76%, 650px);
  }

  .composer-wrap {
    padding: 16px 30px 20px;
  }

  textarea {
    max-height: 140px;
    font-size: 14px;
  }

  .console {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    left: auto;
    width: min(30rem, calc(100vw - 2.5rem));
    border: 1px solid rgb(15 23 42 / 12%);
    border-radius: 0.9rem;
    box-shadow: 0 12px 32px rgb(15 23 42 / 18%);
  }

  .console-body {
    max-height: 22rem;
  }

  .login-card {
    padding: 32px 30px 30px;
    border-radius: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
