:root {
  color-scheme: light;
  --canvas: oklch(97.8% 0.008 82);
  --surface: oklch(99.4% 0.006 82);
  --surface-raised: oklch(100% 0 0);
  --surface-muted: oklch(95.2% 0.012 76);
  --surface-hover: oklch(93.5% 0.018 70);
  --ink: oklch(24% 0.026 51);
  --ink-soft: oklch(43% 0.024 57);
  --ink-muted: oklch(53% 0.018 61);
  --line: oklch(89% 0.015 72);
  --line-strong: oklch(82% 0.025 68);
  --accent: oklch(61% 0.18 42);
  --accent-hover: oklch(53% 0.18 39);
  --accent-soft: oklch(94% 0.045 55);
  --accent-ink: oklch(38% 0.12 38);
  --danger: oklch(53% 0.18 25);
  --danger-soft: oklch(95% 0.035 25);
  --focus: oklch(56% 0.19 254);
  --shadow-drawer: 0 24px 70px oklch(24% 0.03 51 / 0.2);
  --shadow-composer: 0 12px 40px oklch(35% 0.035 55 / 0.1), 0 2px 8px oklch(35% 0.035 55 / 0.06);
  --font-sans: "Avenir Next", Avenir, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-height: 4rem;
  --stream-width: 48rem;
}

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

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

html {
  background: var(--canvas);
  font-family: var(--font-sans);
  font-size: 100%;
  font-kerning: normal;
  -webkit-text-size-adjust: 100%;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -20%, oklch(98% 0.04 73), transparent 38rem),
    var(--canvas);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
textarea,
input {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

button,
summary,
label {
  -webkit-tap-highlight-color: transparent;
}

button:not(:disabled),
summary,
label:has(input) {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
}

svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible {
  outline: 0.15rem solid var(--focus);
  outline-offset: 0.15rem;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  z-index: 500;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.5rem;
  color: var(--surface-raised);
  background: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 180ms var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  display: grid;
  grid-template-rows: var(--header-height) minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  height: 100dvh;
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.app-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  padding: 0 0.75rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklch, var(--canvas) 92%, transparent);
  backdrop-filter: blur(18px);
}

.header-side {
  display: flex;
  min-width: 0;
}

.header-side-start {
  justify-content: flex-start;
}

.header-side-end {
  justify-content: flex-end;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 0.65rem;
  color: var(--ink-soft);
  background: transparent;
  transition: color 120ms var(--ease-out), background-color 120ms var(--ease-out), transform 120ms var(--ease-out);
}

.icon-button:active,
.new-chat-button:active,
.send-button:active,
.stop-button:active,
.drawer-new-chat:active,
.suggestion-button:active {
  transform: scale(0.96);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark,
.empty-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: inset -0.1rem -0.15rem 0 oklch(45% 0.18 36 / 0.25);
}

.brand-mark {
  width: 1.75rem;
  height: 1.75rem;
  flex: 0 0 auto;
}

.brand-mark span,
.empty-mark span {
  position: absolute;
  border-radius: 50%;
  background: var(--surface-raised);
}

.brand-mark span {
  width: 1.1rem;
  height: 1.1rem;
  transform: translate(0.32rem, -0.17rem);
}

.brand-name {
  overflow: hidden;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-chip {
  display: none;
  flex: 0 0 auto;
  padding: 0.18rem 0.48rem;
  border: 1px solid oklch(85% 0.045 58);
  border-radius: 999px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  white-space: nowrap;
}

.new-chat-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 0.7rem;
  color: var(--ink);
  background: var(--surface-raised);
  font-weight: 700;
  transition: border-color 120ms var(--ease-out), background-color 120ms var(--ease-out), transform 120ms var(--ease-out);
}

.new-chat-button span {
  display: none;
}

.chat-main {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.chat-scroll {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: clamp(1.25rem, 4vw, 2.5rem) max(1rem, env(safe-area-inset-right)) calc(11.5rem + env(safe-area-inset-bottom));
  scroll-behavior: smooth;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100%, 39rem);
  min-height: calc(100% - 1rem);
  margin: 0 auto;
  padding: 2rem 0 4rem;
  text-align: center;
  animation: reveal 440ms var(--ease-out) both;
}

.empty-mark {
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.25rem;
}

.empty-mark span {
  width: 2.2rem;
  height: 2.2rem;
  transform: translate(0.65rem, -0.34rem);
}

.empty-state h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.7rem, 6vw, 2.45rem);
  font-weight: 760;
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.empty-state > p {
  max-width: 35rem;
  margin: 0.65rem 0 1.8rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.suggestions {
  display: grid;
  width: min(100%, 34rem);
  gap: 0.5rem;
}

.suggestion-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.7rem 0.9rem 0.7rem 1rem;
  border-radius: 0.75rem;
  color: var(--ink-soft);
  background: transparent;
  text-align: left;
  transition: color 120ms var(--ease-out), background-color 120ms var(--ease-out), transform 120ms var(--ease-out);
}

.suggestion-arrow {
  color: var(--accent);
  font-size: 0.95rem;
}

.message-list {
  display: flex;
  flex-direction: column;
  width: min(100%, var(--stream-width));
  margin: 0 auto;
  gap: 2rem;
}

.message {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  gap: 0.45rem;
  animation: reveal 260ms var(--ease-out) both;
}

.message-role {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink-muted);
  font-size: 0.75rem;
  font-weight: 720;
  letter-spacing: 0.015em;
}

.role-mark {
  display: inline-grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  color: var(--surface-raised);
  background: var(--ink);
  font-size: 0.62rem;
  font-weight: 800;
}

.message-assistant .role-mark {
  background: var(--accent);
}

.message-user {
  align-items: flex-end;
}

.message-user .message-role {
  padding-right: 0.25rem;
}

.message-user .message-content {
  width: fit-content;
  max-width: min(88%, 42rem);
  padding: 0.78rem 1rem;
  border-radius: 1.05rem 0.3rem 1.05rem 1.05rem;
  color: var(--ink);
  background: var(--surface-muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-assistant .message-content {
  width: 100%;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.68;
  overflow-wrap: anywhere;
}

.message-content > :first-child {
  margin-top: 0;
}

.message-content > :last-child {
  margin-bottom: 0;
}

.message-content p,
.message-content ul,
.message-content ol,
.message-content blockquote,
.message-content pre,
.message-content .table-wrap {
  margin: 0 0 0.9rem;
}

.message-content h1,
.message-content h2,
.message-content h3 {
  margin: 1.35rem 0 0.65rem;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.message-content h1 { font-size: 1.45rem; }
.message-content h2 { font-size: 1.25rem; }
.message-content h3 { font-size: 1.08rem; }

.message-content ul,
.message-content ol {
  padding-left: 1.35rem;
}

.message-content li + li {
  margin-top: 0.28rem;
}

.message-content blockquote {
  padding-left: 0.9rem;
  border-left: 0.2rem solid var(--line-strong);
  color: var(--ink-soft);
}

.message-content a {
  color: var(--accent-ink);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.message-content code {
  padding: 0.12em 0.35em;
  border-radius: 0.3rem;
  color: oklch(33% 0.09 31);
  background: var(--surface-muted);
  font-family: var(--font-mono);
  font-size: 0.88em;
  font-variant-ligatures: none;
}

.code-block {
  overflow: hidden;
  border: 1px solid oklch(29% 0.025 51);
  border-radius: 0.75rem;
  color: oklch(93% 0.012 76);
  background: oklch(22% 0.025 51);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.4rem;
  padding: 0.35rem 0.55rem 0.35rem 0.85rem;
  color: oklch(72% 0.018 70);
  background: oklch(26% 0.028 51);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.copy-code {
  min-height: 2rem;
  padding: 0.25rem 0.55rem;
  border-radius: 0.4rem;
  color: inherit;
  background: transparent;
  font-size: 0.72rem;
}

.code-block pre {
  max-width: 100%;
  margin: 0;
  overflow-x: auto;
  padding: 1rem;
}

.code-block code {
  padding: 0;
  color: inherit;
  background: transparent;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.message-content table {
  width: 100%;
  min-width: 30rem;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.message-content th,
.message-content td {
  padding: 0.58rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.message-content th {
  color: var(--ink-soft);
  background: var(--surface-muted);
  font-weight: 720;
}

.generation-caret {
  display: inline-block;
  width: 0.18rem;
  height: 1.05em;
  margin-left: 0.18rem;
  border-radius: 999px;
  vertical-align: -0.13em;
  background: var(--accent);
  animation: blink 900ms steps(1, end) infinite;
}

.message-state {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 1.75rem;
  color: var(--ink-muted);
  font-size: 0.76rem;
}

.message-state-error {
  width: min(100%, 36rem);
  padding: 0.7rem 0.8rem;
  border-radius: 0.65rem;
  color: var(--danger);
  background: var(--danger-soft);
}

.retry-button {
  min-height: 2rem;
  margin-left: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 0.45rem;
  color: var(--surface-raised);
  background: var(--danger);
  font-size: 0.76rem;
  font-weight: 720;
}

.composer-region {
  position: absolute;
  z-index: 15;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.4rem max(0.75rem, env(safe-area-inset-right)) max(0.6rem, env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, transparent, color-mix(in oklch, var(--canvas) 94%, transparent) 2.2rem, var(--canvas) 55%);
  pointer-events: none;
}

.composer {
  width: min(100%, var(--stream-width));
  padding: 0.75rem 0.75rem 0.65rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 1rem;
  background: var(--surface-raised);
  box-shadow: var(--shadow-composer);
  pointer-events: auto;
  transition: border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}

.composer:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 0.18rem color-mix(in oklch, var(--focus) 25%, transparent), var(--shadow-composer);
}

#composer-input {
  display: block;
  width: 100%;
  min-height: 2.4rem;
  max-height: 10.5rem;
  padding: 0.25rem 0.25rem 0.4rem 0;
  resize: none;
  overflow-y: auto;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 1rem;
  line-height: 1.5;
}

#composer-input::placeholder {
  color: var(--ink-muted);
  opacity: 1;
}

.composer-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.6rem;
  min-height: 2.75rem;
}

.composer-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.65rem;
  margin: 0 0 0.2rem;
  color: var(--ink-muted);
  font-size: 0.7rem;
}

.character-count {
  color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
}

.composer-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.45rem;
}

.send-button,
.stop-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  transition: color 120ms var(--ease-out), background-color 120ms var(--ease-out), opacity 120ms var(--ease-out), transform 120ms var(--ease-out);
}

.send-button {
  padding: 0;
  color: var(--surface-raised);
  background: var(--accent);
}

.send-button:disabled {
  color: oklch(64% 0.01 62);
  background: var(--surface-muted);
  opacity: 0.72;
}

.stop-button {
  gap: 0.45rem;
  padding: 0 0.8rem;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 0.82rem;
  font-weight: 720;
}

.stop-square {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 0.12rem;
  background: currentColor;
}

.model-note {
  margin: 0.45rem 0 0;
  color: var(--ink-muted);
  font-size: 0.66rem;
  text-align: center;
  pointer-events: auto;
}

.drawer-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  background: oklch(24% 0.026 51 / 0.28);
  opacity: 0;
  transition: opacity 200ms var(--ease-out);
}

.drawer-backdrop.visible {
  opacity: 1;
}

.drawer {
  position: fixed;
  z-index: 100;
  top: 0;
  bottom: 0;
  display: flex;
  width: min(22.5rem, 92vw);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  flex-direction: column;
  background: var(--surface);
  box-shadow: var(--shadow-drawer);
  visibility: hidden;
  transition: transform 280ms var(--ease-out), visibility 0s linear 280ms;
}

.history-drawer {
  left: 0;
  padding-left: env(safe-area-inset-left);
  transform: translateX(-104%);
}

.settings-drawer {
  right: 0;
  padding-right: env(safe-area-inset-right);
  transform: translateX(104%);
}

.drawer.open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 280ms var(--ease-out), visibility 0s linear 0s;
}

.drawer-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.8rem;
  padding: 0.85rem 1rem;
}

.settings-drawer .drawer-header {
  grid-template-columns: auto 1fr auto;
}

.drawer-header h2 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 760;
  letter-spacing: -0.03em;
}

.settings-drawer .drawer-header h2 {
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.12rem;
  color: var(--ink-muted);
  font-size: 0.67rem;
  font-weight: 720;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.drawer-primary-action {
  padding: 0 0.75rem 0.8rem;
}

.drawer-new-chat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.85rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.7rem;
  color: var(--surface-raised);
  background: var(--ink);
  font-size: 0.86rem;
  font-weight: 720;
  transition: background-color 120ms var(--ease-out), transform 120ms var(--ease-out);
}

.drawer-new-chat svg {
  width: 1.05rem;
  height: 1.05rem;
}

.history-list {
  display: flex;
  min-height: 0;
  padding: 0.25rem 0.65rem 1rem;
  flex: 1;
  flex-direction: column;
  gap: 0.18rem;
  overflow-y: auto;
}

.history-empty {
  margin: 2rem 0.75rem;
  color: var(--ink-muted);
  font-size: 0.84rem;
  text-align: center;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 3.25rem;
  border-radius: 0.68rem;
  color: var(--ink-soft);
}

.history-item.active {
  color: var(--accent-ink);
  background: var(--accent-soft);
}

.history-select {
  display: block;
  min-width: 0;
  min-height: 3.25rem;
  padding: 0.65rem 0.35rem 0.65rem 0.8rem;
  overflow: hidden;
  color: inherit;
  background: transparent;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-actions {
  display: flex;
  align-items: center;
  padding-right: 0.25rem;
  opacity: 1;
}

.history-action {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border-radius: 0.55rem;
  color: var(--ink-muted);
  background: transparent;
}

.history-action svg {
  width: 1rem;
  height: 1rem;
}

.history-action.delete:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.history-rename-input {
  width: calc(100% - 0.45rem);
  min-height: 2.4rem;
  margin-left: 0.45rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--focus);
  border-radius: 0.45rem;
  background: var(--surface-raised);
  outline: 0;
}

.drawer-footer {
  padding: 0.65rem 0.75rem;
  border-top: 1px solid var(--line);
}

.drawer-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.65rem;
  color: var(--ink-soft);
  background: transparent;
  text-align: left;
}

.drawer-link-arrow {
  width: 1rem;
  height: 1rem;
}

.settings-content {
  min-height: 0;
  padding: 0.75rem 1rem 2rem;
  overflow-y: auto;
}

.settings-group {
  margin: 0;
  padding: 0;
  border: 0;
}

.settings-group legend {
  width: 100%;
  margin-bottom: 0.65rem;
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.radio-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
  padding: 0.6rem 0.3rem;
  border-bottom: 1px solid var(--line);
}

.radio-row span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.radio-row strong {
  font-size: 0.9rem;
}

.radio-row small {
  margin-top: 0.08rem;
  color: var(--ink-muted);
  font-size: 0.74rem;
}

.radio-row input {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--accent);
}

.about-details {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.about-details summary {
  min-height: 3.5rem;
  padding: 1rem 0.25rem;
  font-size: 0.9rem;
  font-weight: 720;
}

.about-content {
  padding: 0 0.25rem 1.15rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.about-content p {
  margin: 0 0 0.75rem;
}

.toast {
  position: fixed;
  z-index: 200;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  max-width: min(24rem, calc(100vw - 2rem));
  padding: 0.72rem 0.9rem;
  border-radius: 0.65rem;
  color: var(--surface-raised);
  background: var(--ink);
  box-shadow: 0 8px 30px oklch(24% 0.03 51 / 0.2);
  font-size: 0.82rem;
  animation: toast-in 220ms var(--ease-out) both;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(0.45rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(0.6rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes blink {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

@media (min-width: 32rem) {
  .model-chip {
    display: inline-flex;
  }
}

@media (min-width: 40rem) {
  .app-header {
    padding-inline: 1rem;
  }

  .new-chat-button {
    width: auto;
    padding: 0 0.85rem;
    gap: 0.4rem;
  }

  .new-chat-button span {
    display: inline;
    font-size: 0.82rem;
  }

  .suggestions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .suggestion-button {
    grid-template-columns: 1fr;
    align-content: space-between;
    min-height: 6.4rem;
    padding: 0.9rem;
    border-top: 1px solid var(--line);
    border-radius: 0;
  }

  .suggestion-arrow {
    justify-self: end;
  }

  .composer-region {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }

  .history-actions {
    opacity: 0;
    transition: opacity 120ms var(--ease-out);
  }

  .history-item:hover .history-actions,
  .history-item:focus-within .history-actions,
  .history-item.active .history-actions {
    opacity: 1;
  }
}

@media (hover: hover) {
  .icon-button:hover,
  .history-action:hover,
  .drawer-link:hover,
  .copy-code:hover {
    color: var(--ink);
    background: var(--surface-hover);
  }

  .new-chat-button:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
  }

  .suggestion-button:hover {
    color: var(--ink);
    background: var(--surface-muted);
  }

  .send-button:not(:disabled):hover {
    background: var(--accent-hover);
  }

  .drawer-new-chat:hover {
    background: var(--accent-hover);
  }

  .history-item:not(.active):hover {
    background: var(--surface-muted);
  }
}

@media (pointer: coarse) {
  .history-action {
    width: 2.75rem;
    height: 2.75rem;
  }
}

@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;
  }
}

@media (forced-colors: active) {
  .brand-mark,
  .empty-mark,
  .role-mark,
  .stop-square {
    forced-color-adjust: none;
  }
}
