/* Chat-first layout across desktop, tablet and phone. */
body {
  background:
    radial-gradient(ellipse at 0 70%, #102136 0, transparent 40%), #080d17;
}

header,
footer {
  max-width: 1600px;
  padding: 20px 32px;
}

main {
  max-width: 1600px;
  margin: 8px auto 24px;
  padding: 0 32px;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
}

aside {
  padding: 34px 4px;
  border-right: 1px solid #213047;
  padding-right: 24px;
}

.eyebrow {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #a2caff;
}

h1 {
  font-size: 30px;
  letter-spacing: -1px;
  line-height: 1.25;
  margin: 22px 0;
}

.intro {
  font-size: 14px;
  color: #b5c2d3;
  line-height: 1.8;
}

.sidebar-note {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 50px;
  color: #aac2df;
  font-size: 12px;
}
.sidebar-note > span {
  font-size: 25px;
  color: #63a7fa;
}

.aside-foot {
  margin-top: 60px;
  font-size: 8px;
  letter-spacing: 1px;
  color: #8299b7;
}

.chat {
  height: calc(100dvh - 160px);
  min-height: 490px;
  max-height: none;
  border-radius: 18px;
  background: #111c2c;
  border-color: #35465e;
  box-shadow: 0 20px 60px #0003;
  min-width: 0;
}

.chat-head {
  padding: 18px 26px;
  background: #152236;
}
.chat-head h2 {
  font-size: 16px;
}
.chat-head p {
  font-size: 12px;
  color: #b4c6df;
}

#messages {
  min-height: 0;
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.welcome {
  margin: auto;
  text-align: center;
  padding: 22px 8px;
}
.welcome-icon {
  font-size: 45px;
}
h3 {
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.3;
  letter-spacing: -1px;
  margin: 22px 0 12px;
}
.welcome p {
  font-size: 15px;
  color: #b5c6de;
}

.compose {
  padding: 0 26px 20px;
}
form {
  background: #0b1422;
  border-color: #4c6482;
  padding: 10px;
  border-radius: 16px;
}
textarea {
  font-size: 16px;
  line-height: 1.5;
  padding: 10px;
  min-height: 46px;
}
textarea::placeholder {
  color: #a2b4cc;
}
form button {
  height: 44px;
  min-width: 44px;
}
#mic {
  font-size: 21px;
}
.quiet {
  min-width: 44px;
  min-height: 44px;
}

.compose-foot {
  font-size: 12px;
  color: #afc0d7;
  gap: 12px;
}
.compose-foot label {
  min-height: 32px;
}
.compose-foot input {
  width: 16px;
  height: 16px;
}
.privacy {
  font-size: 11px;
  color: #9bafca;
}
#notice {
  font-size: 12px;
  color: #bfd4f2;
  line-height: 1.5;
}
.message {
  font-size: 15px;
  max-width: 85%;
  flex-shrink: 0;
}
.message small {
  font-size: 10px;
}
.message.user {
  align-self: flex-end;
}
.message:not(.user) {
  align-self: flex-start;
}
.message.error {
  border-color: #967859;
}
footer {
  font-size: 11px;
  padding-top: 16px;
}

@media (min-width: 801px) and (max-width: 1100px) {
  main {
    grid-template-columns: 175px minmax(0, 1fr);
    gap: 22px;
    padding: 0 24px;
  }
  aside {
    padding-right: 16px;
  }
  h1 {
    font-size: 26px;
  }
  .intro {
    font-size: 13px;
  }
  .chat {
    min-height: 530px;
  }
  .compose {
    padding: 0 18px 16px;
  }
}

@media (max-width: 800px) {
  header {
    padding: 14px 20px;
  }
  .mark {
    font-size: 34px;
  }
  .brand {
    font-size: 16px;
  }
  main {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0 16px 16px;
    gap: 14px;
  }
  aside {
    padding: 8px 4px 4px;
    border: 0;
  }
  .eyebrow,
  .intro,
  .sidebar-note,
  .aside-foot {
    display: none;
  }
  h1 {
    font-size: 20px;
    margin: 0;
    line-height: 1.4;
    letter-spacing: -0.5px;
  }
  h1 br {
    display: none;
  }
  h1 span {
    margin-left: 5px;
  }
  .chat {
    height: calc(100dvh - 155px);
    min-height: 470px;
    max-height: none;
    width: 100%;
    border-radius: 16px;
  }
  .chat-head {
    padding: 14px 18px;
  }
  #messages {
    padding: 20px;
  }
  .welcome {
    padding: 20px 0;
  }
  h3 {
    font-size: 30px;
  }
  .compose {
    padding: 0 18px 16px;
  }
  .privacy {
    font-size: 10px;
  }
  footer {
    display: none;
  }
}

@media (max-width: 480px) {
  header {
    padding: 12px 14px;
  }
  .back {
    font-size: 10px;
  }
  .brand-small {
    font-size: 8px;
  }
  main {
    padding: 0 8px 8px;
    gap: 10px;
  }
  aside {
    padding-left: 8px;
  }
  h1 {
    font-size: 17px;
  }
  .chat {
    height: calc(100dvh - 132px);
    min-height: 420px;
    border-radius: 14px;
  }
  .chat-head {
    padding: 12px 14px;
  }
  .avatar {
    width: 34px;
    height: 34px;
    font-size: 24px;
  }
  .chat-head h2 {
    font-size: 14px;
  }
  .chat-head p {
    font-size: 10px;
  }
  #messages {
    padding: 18px 14px;
  }
  h3 {
    font-size: 27px;
  }
  .welcome p {
    font-size: 13px;
  }
  .compose {
    padding: 0 12px max(12px, env(safe-area-inset-bottom));
  }
  form {
    padding: 6px;
    gap: 3px;
  }
  textarea {
    padding: 8px;
    font-size: 16px;
  }
  .compose-foot {
    font-size: 11px;
    gap: 5px;
  }
  .privacy {
    font-size: 10px;
    line-height: 1.5;
  }
  .message {
    max-width: 94%;
    font-size: 14px;
  }
}

