:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #f5f4f8;
  background: #101116;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --muted: #9695a2;
  --line: rgba(255, 255, 255, .09);
  --panel: #191a22;
  --accent: #b19aff;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 50% 34%, rgba(132, 103, 226, .12), transparent 38rem),
    #101116;
}

button, textarea { font: inherit; }
button { color: inherit; }

.shell {
  display: flex;
  flex-direction: column;
  width: min(100%, 1050px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 32px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  font: 800 19px "Segoe UI", system-ui, sans-serif;
  letter-spacing: -.7px;
  text-decoration: none;
}

.brand-light { color: #bab7c7; font-weight: 500; }

.brand-mark, .welcome-mark {
  display: grid;
  place-items: center;
  border: 1px solid rgba(208, 192, 255, .36);
  background: linear-gradient(145deg, #a98dff, #6548c7 58%, #302254);
  box-shadow: 0 0 24px rgba(145, 113, 255, .3);
}

.brand-mark { width: 31px; height: 31px; border-radius: 11px; }
.brand-mark span, .welcome-mark span {
  width: 11px;
  height: 15px;
  border: 2px solid #fff;
  border-radius: 60% 40% 60% 40%;
  transform: rotate(35deg);
}

.connection {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c9c7d2;
  font-size: 12px;
}

.connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a58af8;
  box-shadow: 0 0 10px rgba(165, 138, 248, .7);
}

.conversation {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: min(100%, 760px);
  margin: 0 auto;
}

.welcome {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 410px;
  padding: 52px 0 32px;
  text-align: center;
}

.welcome-mark { width: 54px; height: 54px; margin-bottom: 27px; border-radius: 19px; }
.welcome-mark span { width: 18px; height: 24px; border-width: 3px; }

.eyebrow {
  margin: 0 0 12px;
  color: #b5a2f5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
}

h1 {
  margin: 0;
  font: 700 clamp(38px, 7vw, 56px)/1.08 "Segoe UI", system-ui, sans-serif;
  letter-spacing: -2.7px;
}

.welcome-copy { margin: 16px 0 24px; color: #a5a3b0; font-size: 14px; }

.suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.suggestion {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: #d3d0dd;
  cursor: pointer;
  font-size: 12px;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.suggestion:hover { transform: translateY(-1px); border-color: rgba(177, 154, 255, .5); background: rgba(177, 154, 255, .1); }

.messages { display: flex; flex-direction: column; gap: 22px; padding: 26px 0; }
.message { display: flex; gap: 12px; align-items: flex-start; animation: appear .24s ease both; }
.message.user { justify-content: flex-end; }
.message-body {
  max-width: min(80%, 620px);
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  color: #eeedf3;
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.message.user .message-body {
  border-color: rgba(177, 154, 255, .2);
  border-bottom-right-radius: 5px;
  background: linear-gradient(135deg, rgba(125, 99, 202, .32), rgba(75, 63, 112, .35));
}
.message.assistant .message-body { border-bottom-left-radius: 5px; }
.assistant-avatar {
  display: grid;
  flex: 0 0 29px;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid rgba(208, 192, 255, .3);
  border-radius: 10px;
  background: linear-gradient(145deg, #9a7ce8, #44316d);
  font-size: 14px;
}
.typing { color: #b7a4f3; }

.composer {
  width: min(100%, 760px);
  margin: 14px auto 0;
  padding: 13px 14px 10px 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 20px;
  background: rgba(27, 27, 36, .92);
  box-shadow: 0 16px 50px rgba(0, 0, 0, .22), 0 0 28px rgba(147, 119, 234, .06);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.composer:focus-within { border-color: rgba(177, 154, 255, .55); box-shadow: 0 16px 50px rgba(0, 0, 0, .22), 0 0 26px rgba(147, 119, 234, .14); }
.composer textarea {
  display: block;
  width: 100%;
  max-height: 190px;
  padding: 4px 0 10px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f5f4f8;
  font-size: 14px;
  line-height: 1.55;
}
.composer textarea::placeholder { color: #8d8b99; }
.composer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.privacy-note { color: #858391; font-size: 10px; }
.send-button {
  display: grid;
  flex: 0 0 35px;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, #b29bff, #8164df);
  color: #171320;
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease;
}
.send-button:hover { transform: translateY(-1px); }
.send-button:disabled { cursor: wait; opacity: .48; }
.send-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.status { min-height: 21px; margin: 9px auto 0; color: #e5a5a8; font-size: 12px; text-align: center; }
footer { padding: 0 0 18px; color: #777582; font-size: 10px; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) {
  .shell { padding: 0 17px; }
  .topbar { height: 64px; }
  .welcome { min-height: 390px; padding-top: 40px; }
  h1 { letter-spacing: -1.8px; }
  .welcome-copy { max-width: 290px; line-height: 1.6; }
  .suggestions { max-width: 340px; }
  .suggestion { padding: 9px 11px; }
  .message-body { max-width: 88%; }
  .composer { border-radius: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
