:root {
  color-scheme: dark;
  --shell: #100f16;
  --sidebar: #17151e;
  --panel: #1d1a26;
  --panel-raised: #242031;
  --line: #312b3f;
  --soft: #a5a0b7;
  --muted: #878199;
  --text: #f4f0ff;
  --violet: #bfabff;
  --accent: #a98bef;
  --radius: 1.15rem;
  font:
    16px/1.5 "Segoe UI Variable",
    "Segoe UI",
    system-ui,
    sans-serif;
  background: var(--shell);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
[hidden] {
  display: none !important;
}
button,
input,
textarea {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
button,
a,
input,
textarea {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.check-row:has(:focus-visible) {
  outline: 2px solid #d0bdff;
  outline-offset: 3px;
}
button,
a {
  transition:
    background-color 0.17s,
    border-color 0.17s,
    color 0.17s,
    opacity 0.17s,
    transform 0.17s;
}
button:not(:disabled):active {
  transform: scale(0.97);
}
a {
  color: #d0bbff;
  text-underline-offset: 0.2em;
}
svg {
  width: 1.15rem;
  height: 1.15rem;
  vertical-align: middle;
  flex: none;
}
[data-icon] {
  display: inline-grid;
  place-items: center;
  flex: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.layout {
  isolation: isolate;
  display: grid;
  grid-template-columns: 16.5rem minmax(0, 1fr);
  height: 100vh;
  height: var(--app-height, 100dvh);
  overflow: hidden;
}
.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1.5rem;
  padding: 1.25rem 1rem 1rem;
  background: var(--sidebar);
  border-inline-end: 1px solid #252130;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.15rem;
  font-weight: 680;
  letter-spacing: -0.04em;
  padding-inline: 0.35rem;
  white-space: nowrap;
}
.brand div:last-child span {
  color: #a7a0bb;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.gem,
.welcome-icon {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #b99eff, #8762d8);
  border: 1px solid #ddcaff66;
  border-radius: 0.72rem;
  color: #191125;
  box-shadow: inset 0 1px 0 #f3e8ff80;
}
.gem {
  width: 2.05rem;
  height: 2.05rem;
}
.gem svg {
  width: 1.26rem;
  height: 1.26rem;
}
.new-chat,
.account,
.login-link,
.model-button,
.menu-row,
.suggestion,
.icon-button,
.send,
.mode-chip,
.history-item {
  border: 1px solid transparent;
  background: transparent;
}
.new-chat {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.75rem;
  padding: 0 0.8rem;
  border-color: #463a5e;
  border-radius: 0.8rem;
  background: #272032;
  color: #e3d6ff;
  font-size: 0.925rem;
  font-weight: 620;
  text-align: start;
}
.new-chat:hover {
  background: #382b4d;
  border-color: #685584;
}
.history-section {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.history-section h2 {
  color: #a09ab0;
  font-size: 0.78rem;
  font-weight: 650;
  margin: 0 0.55rem 0.65rem;
}
.history-search {
  width: 100%;
  margin-bottom: 0.55rem;
  padding: 0.52rem 0.65rem;
  border: 1px solid #42384f;
  border-radius: 0.65rem;
  background: #211b2b;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
}
.history-sync {
  color: #bfb1d9;
  margin: 0.55rem 0.45rem 0;
  font-size: 0.78rem;
}
.history {
  overflow: auto;
  scrollbar-width: thin;
  padding: 0.1rem 0.2rem;
}
.history-empty {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0.5rem 0.55rem;
}
.history-row {
  display: flex;
  border-radius: 0.64rem;
  align-items: center;
  gap: 0.12rem;
}
.history-row:hover,
.history-row.active {
  background: #262131;
}
.history-item {
  display: flex;
  align-items: center;
  gap: 0.57rem;
  min-width: 0;
  flex: 1;
  padding: 0.55rem 0.42rem;
  font-size: 0.875rem;
  text-align: start;
  color: #c5bed4;
  border-radius: 0.64rem;
}
.history-item span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-item svg {
  width: 0.96rem;
  height: 0.96rem;
  color: #9890ac;
}
.history-row .history-delete,
.history-row .history-pin {
  opacity: 0;
  width: 2rem;
  height: 2rem;
}
.history-row:hover .history-delete,
.history-row:focus-within .history-delete,
.history-row:hover .history-pin,
.history-row:focus-within .history-pin,
.history-pin[aria-pressed="true"] {
  opacity: 1;
}
.history-pin[aria-pressed="true"] {
  color: #dec7ff;
}
.account {
  display: flex;
  align-items: center;
  gap: 0.68rem;
  min-height: 3.3rem;
  padding: 0.3rem 0.44rem;
  border-radius: 0.8rem;
  text-align: start;
  width: 100%;
}
.account:hover {
  background: #24202e;
}
.account-icon {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.7rem;
  background: #29233b;
  color: #ccb7ff;
  overflow: hidden;
}
.account-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.account-copy {
  display: grid;
  flex: 1;
  min-width: 0;
}
.account-copy strong,
.account-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-copy strong {
  font-size: 0.875rem;
  font-weight: 630;
}
.account-copy small {
  font-size: 0.78rem;
  color: var(--muted);
}
.account-chevron {
  color: var(--muted);
}
.main {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  background: var(--shell);
}
.topbar,
.scroll,
.compose-area {
  position: relative;
}
.topbar {
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.45rem;
  min-height: 4.15rem;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  min-width: 0;
}
.model-button {
  display: flex;
  isolation: isolate;
  align-items: center;
  gap: 0.52rem;
  min-height: 2.65rem;
  white-space: nowrap;
  border-radius: 0.75rem;
  padding: 0.35rem 0.65rem;
  background: #191522;
  border-color: #3a3149;
  font-size: 0.94rem;
}
.model-button:hover,
.model-button[aria-expanded="true"] {
  background: #30253e;
  border-color: #705788;
}
.model-button strong {
  font-weight: 650;
}
.model-symbol {
  color: #c8afff;
}
.model-symbol.sapphire {
  color: #94baff;
}
.model-button [data-icon="chevron"] svg {
  width: 0.87rem;
  height: 0.87rem;
  color: var(--muted);
}
.effort-tag {
  font-size: 0.78rem;
  color: #b5a7c7;
  padding: 0.12rem 0.45rem;
  border: 1px solid #3b3249;
  border-radius: 0.45rem;
  background: #1f192b;
}
.login-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.65rem;
  padding: 0 0.75rem;
  border-radius: 0.72rem;
  background: #262035;
  border-color: #3b314c;
  color: #e0d1ff;
  font-size: 0.875rem;
  font-weight: 630;
}
.login-link:hover {
  background: #37274c;
  border-color: #634f7a;
}
.scroll {
  min-height: 0;
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #514665 transparent;
}
.scroll:focus:not(:focus-visible) {
  outline: none;
}
.welcome {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.45rem 1.15rem 2rem;
  text-align: center;
  animation: appear 0.38s ease-out both;
}
.welcome-icon {
  width: 4.15rem;
  height: 4.15rem;
  border-radius: 1.3rem;
  transform: rotate(-8deg);
  box-shadow:
    0 0.65rem 2.8rem #a477ee60,
    inset 0 1px 0 #f3e8ff80;
  background: linear-gradient(145deg, #d9bcff, #9d77ee 65%, #8d6bea);
  margin-bottom: 1.15rem;
}
.welcome-icon svg {
  width: 2.3rem;
  height: 2.3rem;
  transform: rotate(8deg);
}
.welcome h1 {
  font-size: clamp(2.15rem, 6vw, 4.8rem);
  line-height: 1.07;
  letter-spacing: -0.076em;
  margin: 0;
  text-wrap: balance;
  color: #faf7ff;
  text-shadow: 0 3px 24px #110c21a6;
  font-weight: 690;
}
.welcome p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: #cbc5db;
  margin: 0.82rem 0 0;
}
.access-screen h1 {
  max-width: 22ch;
  font-size: clamp(2rem, 5vw, 3.75rem);
}
.access-screen .access-button {
  width: auto;
  min-height: 2.85rem;
  margin-top: 1.15rem;
  padding-inline: 1rem;
}
.sidebar > .account {
  margin-top: auto;
}
.thread,
.compose-area {
  width: min(100%, 52rem);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.thread {
  padding-top: 1.5rem;
  padding-bottom: 1.35rem;
  display: grid;
  gap: 1.75rem;
  align-content: start;
}
.compose-area {
  padding-bottom: max(0.45rem, env(safe-area-inset-bottom));
  z-index: 2;
}
.suggestions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  animation: appear 0.4s ease-out both;
}
.suggestion {
  background: #211b2b;
  border-color: #3b3149;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  min-height: 4.25rem;
  text-align: start;
  border-radius: 0.8rem;
  padding: 0.6rem 0.65rem;
  color: #efebfa;
}
.suggestion:hover {
  background: #302339;
  border-color: #665275;
  transform: translateY(-2px);
}
.suggestion strong,
.suggestion small {
  display: block;
  line-height: 1.35;
}
.suggestion strong {
  font-size: 0.875rem;
  font-weight: 650;
}
.suggestion small {
  color: #aca3be;
  font-size: 0.76rem;
  margin-top: 0.17rem;
}
.suggestion-icon {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 0.55rem;
  background: #302749;
  color: #cbb6ff;
}
.suggestion-icon.blue {
  color: #b8c8ff;
  background: #262e4b;
}
.suggestion-icon.pink {
  color: #e7b6ff;
  background: #3e294c;
}
.suggestion-icon.mint {
  color: #a8ddcc;
  background: #253b3a;
}
.suggestion-icon svg {
  width: 1rem;
  height: 1rem;
}
.composer {
  display: grid;
  gap: 0.28rem;
  background: linear-gradient(135deg, #242031, #1d1a27);
  border: 1px solid #49405b;
  border-radius: var(--radius);
  padding: 0.6rem 0.63rem;
  box-shadow: 0 10px 38px #0e0a1a66;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.composer:focus-within {
  border-color: #7a609a;
  box-shadow:
    0 10px 40px #0e0a1a66,
    0 0 0 2px #8560b322;
}
.composer textarea {
  display: block;
  width: 100%;
  min-height: 2.55rem;
  max-height: min(28dvh, 11rem);
  resize: none;
  field-sizing: content;
  overflow: auto;
  scrollbar-width: thin;
  color: var(--text);
  background: transparent;
  border: 0;
  padding: 0.48rem 0.5rem;
  line-height: 1.45;
  outline: none !important;
}
.composer textarea::placeholder {
  color: #a8a0b7;
}
.composer-bar,
.composer-controls,
.composer-foot {
  display: flex;
  align-items: center;
  gap: 0.42rem;
}
.composer-bar {
  justify-content: space-between;
}
.composer-controls {
  min-width: 0;
  flex-wrap: wrap;
}
.composer-foot {
  justify-content: space-between;
  padding: 0.45rem 0.22rem;
  color: #9a91aa;
  font-size: 0.75rem;
}
kbd {
  font: inherit;
  font-weight: 650;
  color: #bdb2ce;
}
.icon-button,
.send {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 0.75rem;
  padding: 0;
}
.icon-button {
  color: #c4bad7;
}
.icon-button:hover,
.icon-button[aria-expanded="true"] {
  background: #393045;
  color: #fff;
}
.plus {
  background: #2b2538;
  border-color: #42384e;
}
.send {
  border-color: #d4beff80;
  background: #c6a9ff;
  color: #241733;
  box-shadow: inset 0 1px 0 #eee2ff90;
}
.send:hover {
  background: #decaff;
}
.send:disabled {
  background: #383044;
  color: #8f839f;
  border-color: #4a4058;
  box-shadow: none;
}
.send svg {
  width: 1.15rem;
  height: 1.15rem;
  stroke-width: 2;
}
.popover-anchor {
  position: relative;
}
.popover {
  position: absolute;
  z-index: 10;
  min-width: 15rem;
  padding: 0.45rem;
  background: #24202e;
  border: 1px solid #43394f;
  border-radius: 0.9rem;
  box-shadow: 0 14px 36px #08060ebb;
  animation: appear 0.17s ease-out both;
}
.model-menu {
  inset-block-start: calc(100% + 0.5rem);
  inset-inline-start: 0;
  width: 17rem;
}
.plus-menu {
  inset-block-end: calc(100% + 0.55rem);
  inset-inline-start: 0;
  width: 16.7rem;
}
.popover h2 {
  margin: 0.33rem 0.45rem;
  font-size: 0.78rem;
  color: #b4a9c5;
  font-weight: 600;
}
.menu-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 2.65rem;
  padding: 0.38rem 0.5rem;
  border-radius: 0.55rem;
  text-align: start;
  color: #eee8fa;
  font-size: 0.9rem;
  white-space: nowrap;
}
.menu-row:hover,
.check-row:has(:focus-visible) {
  background: #362d44;
}
.menu-row:disabled {
  opacity: 0.55;
}
.menu-row[aria-pressed="true"] {
  color: #e2cdff;
  background: #342742;
}
.menu-row span:nth-child(2) {
  flex: 1;
}
.menu-row small {
  color: #beb1cf;
  font-size: 0.77rem;
}
.check-row {
  cursor: pointer;
  position: relative;
}
.check-row input {
  position: absolute;
  opacity: 0;
  inset-inline-end: 0.6rem;
  width: 1rem;
  height: 1rem;
}
.checkbox {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 0.3rem;
  border: 1px solid #837697;
  display: grid;
  place-items: center;
  flex: none;
}
.check-row input:checked + .checkbox {
  background: #c9aaff;
  border-color: #c9aaff;
}
.check-row input:checked + .checkbox::after {
  content: "";
  width: 0.55rem;
  height: 0.33rem;
  border: solid #271935;
  border-width: 0 0 2px 2px;
  transform: translateY(-1px) rotate(-45deg);
}
.check-row:has(input:disabled) {
  opacity: 0.55;
  cursor: default;
}
.efforts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.18rem;
  padding: 0.1rem;
}
.efforts button {
  min-height: 2.5rem;
  border: 1px solid #3b3248;
  background: #2c2538;
  border-radius: 0.45rem;
  font-size: 0.79rem;
  padding: 0.15rem;
}
.efforts button:hover,
.efforts button[aria-pressed="true"] {
  background: #4b3865;
  border-color: #7d61a0;
  color: #f1ddff;
}
.mode-chip,
.file-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.28rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.62rem;
  border: 1px solid #57537d;
  background: #2b2944;
  color: #d9d5ff;
  font-size: 0.8rem;
}
.mode-chip:hover,
.file-chip:hover {
  background: #3d3657;
}
.mode-chip svg,
.file-chip svg {
  width: 0.9rem;
  height: 0.9rem;
}
.prism-chip {
  background: #3a294c;
  color: #eed1ff;
  border-color: #64477b;
}
.attachments {
  display: flex;
  gap: 0.38rem;
  flex-wrap: wrap;
  padding: 0.1rem 0.18rem;
}
.file-chip {
  min-width: 0;
  max-width: min(100%, 18rem);
  background: #292334;
  border-color: #4a3e57;
  color: #e7dbee;
}
.file-chip span:nth-child(2) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-chip img {
  width: 1.45rem;
  height: 1.45rem;
  object-fit: cover;
  border-radius: 0.25rem;
}
.message {
  min-width: 0;
  animation: appear 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.message.user {
  justify-self: end;
  width: fit-content;
  max-width: min(88%, 39rem);
  padding: 0.66rem 0.92rem;
  background: #2c223c;
  border: 1px solid #453450;
  border-radius: 1rem 1rem 0.28rem 1rem;
}
.message.assistant {
  padding-inline: 0.25rem;
}
.message-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #cbb9f2;
  font-size: 0.85rem;
  font-weight: 660;
  margin-bottom: 0.57rem;
}
.message-head svg {
  width: 1rem;
  height: 1rem;
}
.message-text {
  overflow-wrap: anywhere;
  line-height: 1.65;
}
.message.user .message-text {
  white-space: pre-wrap;
}
.message-text > * {
  margin: 0 0 0.58rem;
}
.message-text > *:last-child {
  margin-bottom: 0;
}
.message-text h2,
.message-text h3,
.message-text h4 {
  line-height: 1.25;
  margin-top: 1rem;
}
.message-text li + li {
  margin-top: 0.25rem;
}
.message-text code {
  background: #272131;
  color: #ead6ff;
  padding: 0.12rem 0.25rem;
  border-radius: 0.24rem;
  font-size: 0.9em;
}
.message-text pre {
  background: #1b1723;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  overflow: auto;
  padding: 0.75rem;
  font-size: 0.92rem;
}
.message-text pre code {
  background: none;
  padding: 0;
  color: #eee6ff;
}
.message-text table {
  display: block;
  max-width: 100%;
  overflow: auto;
  border-collapse: collapse;
}
.message-text td,
.message-text th {
  border: 1px solid var(--line);
  padding: 0.35rem 0.6rem;
  min-width: 3rem;
  text-align: start;
}
.message-text blockquote {
  padding-inline-start: 0.85rem;
  border-inline-start: 2px solid #6f5592;
  color: #c9bad9;
}
.code-block {
  max-width: 100%;
  overflow: hidden;
  background: #1b1723;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
}
.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.25rem 0.6rem;
  color: #c8b7df;
  background: #251e31;
  font-size: 0.78rem;
}
.code-block pre {
  margin: 0;
  border: 0;
  border-radius: 0;
}
.copy-code,
.message-button {
  min-height: 2.2rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid #49395c;
  border-radius: 0.48rem;
  background: #2a2136;
  color: #e2d4f4;
  font-size: 0.8rem;
  white-space: nowrap;
}
.copy-code:hover,
.message-button:hover {
  background: #3a2a4b;
}
.citation {
  display: inline-block;
  margin-inline: 0.12em;
  padding-inline: 0.25em;
  border-radius: 0.3em;
  color: #ddc4ff;
  background: #342544;
  font-size: 0.82em;
  text-decoration: none;
}
.sources {
  width: fit-content;
  max-width: 100%;
  margin-top: 0.65rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid #473856;
  border-radius: 0.6rem;
  color: #dbd0e7;
  background: #211a2b;
  font-size: 0.85rem;
}
.sources summary {
  padding: 0.15rem 0;
  cursor: pointer;
}
.sources ol {
  margin: 0.3rem 0;
  padding-inline-start: 1.2rem;
}
.sources li {
  padding-block: 0.15rem;
  overflow-wrap: anywhere;
}
.message-text.streaming > :is(p, h1, h2, h3, h4, h5, h6):last-child::after,
.message-text.streaming > :is(ul, ol):last-child li:last-child::after {
  content: "";
  display: inline-block;
  width: 0.43em;
  height: 0.77em;
  border-radius: 0.14em;
  background: #bc9cff;
  margin-inline-start: 0.14em;
  animation: pulse 1.35s infinite alternate;
}
.message-attachments {
  display: flex;
  gap: 0.32rem;
  flex-wrap: wrap;
  margin-top: 0.45rem;
  color: #cec2de;
  font-size: 0.78rem;
}
.message-attachments span {
  border: 1px solid #5b486d;
  padding: 0.15rem 0.4rem;
  border-radius: 0.35rem;
}
.stage {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  margin-top: 0.42rem;
  padding: 0.28rem 0.62rem;
  color: #d7c6ec;
  background: #271f32;
  border: 1px solid #42324f;
  border-radius: 0.65rem;
  font-size: 0.86rem;
}
.stage-content {
  display: inline-flex;
  align-items: center;
  gap: 0.44rem;
  animation: appear 230ms ease-out both;
}
.stage-content svg {
  width: 0.93rem;
  height: 0.93rem;
}
.stage-pulse {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: #c8a9ff;
  animation: pulse 0.9s infinite alternate;
}
.image-pending {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.42rem;
  width: min(23rem, 100%);
  aspect-ratio: 4/3;
  margin: 0.45rem 0 0.55rem;
  border: 1px solid #5b4379;
  border-radius: 1rem;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #44295c, #21192b 70%);
  text-align: center;
  color: #e7d1ff;
}
.image-pending::before {
  content: "";
  position: absolute;
  inset: -55%;
  background: conic-gradient(transparent 62%, #bd86ff3b 80%, transparent 99%);
  animation: orbit 7s linear infinite;
}
.image-pending > * {
  position: relative;
}
.image-pending [data-icon] svg {
  width: 2rem;
  height: 2rem;
  animation: pulse 1.5s infinite alternate;
}
.image-pending small {
  color: #bbacd1;
  font-size: 0.8rem;
}
.image-result {
  width: fit-content;
  max-width: min(31rem, 100%);
  margin: 0.55rem 0 0.7rem;
  animation: appear 0.3s ease-out both;
}
.image-result img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 70dvh;
  border: 1px solid #463856;
  border-radius: 0.86rem;
  background: #272031;
}
.image-result a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
}
.image-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  margin-top: 0.45rem;
}
.message-error {
  color: #ffb1b8;
  font-size: 0.9rem;
  margin: 0.5rem 0 0;
}
.message-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.18rem 0.35rem;
  margin-top: 0.42rem;
}
.message-actions .icon-button {
  width: 2.2rem;
  height: 2.2rem;
}
.message-time {
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.user-actions {
  justify-content: flex-end;
  margin-top: 0.2rem;
}
.user-actions .icon-button {
  width: 1.75rem;
  height: 1.75rem;
}
.user-actions svg {
  width: 0.85rem;
  height: 0.85rem;
}
.compose-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 0.6rem 0.2rem;
  min-height: 2.1rem;
  border-radius: 0.55rem;
  background: #342742;
  color: #e3cfff;
  font-size: 0.84rem;
}
.compose-context .icon-button {
  width: 2rem;
  height: 2rem;
}
.mobile-only,
.scrim {
  display: none;
}
.toast {
  position: fixed;
  z-index: 12;
  inset: auto 1rem max(1.3rem, env(safe-area-inset-bottom));
  width: max-content;
  max-width: calc(100% - 2rem);
  margin-inline: auto;
  background: #342a42;
  border: 1px solid #685376;
  color: #fff0ff;
  padding: 0.65rem 0.82rem;
  border-radius: 0.65rem;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px #08051399;
  animation: appear 0.18s ease-out both;
}
dialog {
  width: min(25rem, calc(100% - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  overflow: auto;
  border: 1px solid #524461;
  border-radius: 1.2rem;
  background: #211b2a;
  color: var(--text);
  padding: 1.55rem;
  text-align: center;
  box-shadow: 0 25px 85px #050409b5;
}
dialog[open] {
  animation: appear 0.2s ease-out;
}
dialog::backdrop {
  background: #0b0813bb;
}
dialog .dialog-close {
  position: absolute;
  top: 0.48rem;
  right: 0.48rem;
}
.dialog-icon {
  margin: 0 auto 0.65rem;
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 0.84rem;
  background: #3d3053;
  color: #ddc8ff;
}
dialog h2 {
  margin: 0.3rem 0;
  letter-spacing: -0.04em;
  font-size: 1.45rem;
}
dialog p {
  margin: 0.35rem 0 0.9rem;
  color: #bbb1cb;
  font-size: 0.94rem;
}
.login-verification {
  display: grid;
  gap: 0.16rem;
  padding: 0.55rem;
  background: #2d233b;
  border: 1px solid #4f3d63;
  border-radius: 0.72rem;
  margin: 0.75rem 0;
  color: #d4c6e8;
  font-size: 0.85rem;
}
.login-verification strong {
  font-size: 1.62rem;
  letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
  color: #f6eeff;
}
.primary {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 2.8rem;
  border: 1px solid #d5bcf985;
  border-radius: 0.65rem;
  background: #c7a9ff;
  color: #241631;
  text-decoration: none;
  font-weight: 660;
}
.primary:hover {
  background: #e2cfff;
}
.primary:disabled {
  opacity: 0.6;
}
.primary.secondary {
  background: #332642;
  color: #eddbff;
  border-color: #684c80;
}
.primary.secondary:hover {
  background: #453355;
}
dialog .login-status {
  font-size: 0.85rem;
  margin: 0.55rem 0 0;
  min-height: 1.25rem;
}
.limits {
  display: grid;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}
.limits div {
  display: grid;
  gap: 0.15rem;
  text-align: start;
  color: #dfcfee;
  background: #2d243b;
  border-radius: 0.55rem;
  padding: 0.46rem 0.58rem;
  font-size: 0.85rem;
}
.limits progress {
  width: 100%;
  height: 0.5rem;
  accent-color: #c7a9ff;
}
@keyframes appear {
  from {
    opacity: 0;
    translate: 0 6px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
@keyframes pulse {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 1;
  }
}
@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 850px) {
  .layout {
    grid-template-columns: 13.6rem minmax(0, 1fr);
  }
  .suggestion small {
    display: none;
  }
  .suggestion {
    min-height: 3.42rem;
  }
}
@media (max-width: 680px) {
  .layout {
    display: block;
  }
  .main {
    height: 100%;
  }
  .mobile-only {
    display: grid;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(19rem, 88vw);
    transform: translateX(-104%);
    visibility: hidden;
    transition:
      transform 0.23s ease,
      visibility 0.23s;
    padding-top: max(1rem, env(safe-area-inset-top));
    padding-bottom: max(0.8rem, env(safe-area-inset-bottom));
  }
  .sidebar.open {
    visibility: visible;
    transform: translateX(0);
  }
  .scrim:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 4;
    border: 0;
    background: #090610af;
  }
  .topbar {
    padding: max(0.55rem, env(safe-area-inset-top)) 0.62rem 0.45rem;
    min-height: 3.52rem;
  }
  .topbar-left {
    gap: 0.28rem;
  }
  .topbar .icon-button {
    width: 2.45rem;
  }
  .topbar .popover {
    margin-inline-start: -0.3rem;
  }
  .welcome {
    padding-bottom: 1rem;
  }
  .welcome-icon {
    width: 3.4rem;
    height: 3.4rem;
    margin-bottom: 0.86rem;
    border-radius: 1.05rem;
  }
  .welcome-icon svg {
    width: 1.9rem;
    height: 1.9rem;
  }
  .thread,
  .compose-area {
    padding-inline: 0.72rem;
  }
  .thread {
    gap: 1.35rem;
    padding-top: 1rem;
  }
  .suggestions {
    gap: 0.35rem;
    margin-bottom: 0.52rem;
  }
  .suggestion {
    display: grid;
    gap: 0.3rem;
    align-content: center;
    min-height: 4.7rem;
    padding: 0.42rem 0.45rem;
  }
  .suggestion strong {
    font-size: 0.78rem;
  }
  .suggestion-icon {
    width: 1.54rem;
    height: 1.54rem;
  }
  .suggestion-icon svg {
    width: 0.88rem;
    height: 0.88rem;
  }
  .composer {
    padding: 0.49rem;
  }
  .composer textarea {
    padding: 0.42rem 0.36rem;
  }
  .composer-foot {
    justify-content: center;
  }
  .keyboard-hint {
    display: none;
  }
  .history-delete,
  .history-pin {
    opacity: 1;
  }
  .message.user {
    max-width: 92%;
  }
  .image-result {
    max-width: 100%;
  }
}
@media (max-height: 515px) and (max-width: 680px) {
  .welcome-icon {
    display: none;
  }
  .welcome h1 {
    font-size: 1.85rem;
  }
  .welcome p {
    font-size: 0.86rem;
    margin-top: 0.22rem;
  }
  .welcome {
    padding-block: 0.24rem;
  }
  .suggestion {
    display: flex;
    min-height: 2.6rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
