:root {
  --ink: #171914;
  --ink-soft: #23261f;
  --paper: #f2f0e8;
  --paper-deep: #e8e4d8;
  --line: #cbc6b8;
  --line-dark: #3b3e35;
  --muted: #74736b;
  --muted-dark: #9c9d91;
  --signal: #ef542f;
  --success: #a9d8b3;
  --danger: #d74a31;
  --display-font: "Bodoni 72", Didot, "Songti SC", "STSong", serif;
  --body-font: "Avenir Next", Avenir, "PingFang SC", "Hiragino Sans GB", sans-serif;
  --mono-font: "SFMono-Regular", "Cascadia Mono", "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body-font);
  -webkit-font-smoothing: antialiased;
}

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

button {
  border: 0;
}

button,
select {
  cursor: pointer;
}

button:disabled,
select:disabled {
  cursor: not-allowed;
}

button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 348px minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.settings-panel {
  position: relative;
  z-index: 30;
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  color: var(--paper);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 100%
      52px,
    var(--ink);
  border-right: 1px solid #050605;
  animation: enter-panel 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.settings-panel::after {
  position: absolute;
  inset: 0 0 0 auto;
  width: 1px;
  content: "";
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.brand {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 112px;
  padding: 22px 26px 20px;
  border-bottom: 1px solid var(--line-dark);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 54px;
  place-items: center;
  color: var(--ink);
  background: var(--signal);
  font-family: var(--display-font);
  font-size: 31px;
  font-style: italic;
  line-height: 1;
}

.micro-label {
  margin: 0 0 5px;
  color: var(--muted-dark);
  font-family: var(--mono-font);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.2;
}

.brand h1 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 31px;
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  padding: 8px;
  place-items: center;
  color: currentColor;
  background: transparent;
}

.icon-button svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-width: 1.5;
}

.close-settings {
  display: none;
  color: var(--paper);
}

.connection-state {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 49px;
  padding: 0 27px;
  color: var(--muted-dark);
  font-family: var(--mono-font);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line-dark);
}

.state-light {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: #75776b;
  box-shadow: 0 0 0 3px rgba(117, 119, 107, 0.12);
  transition:
    background 180ms ease,
    box-shadow 180ms ease;
}

.state-rule {
  height: 1px;
  flex: 1;
  background: var(--line-dark);
}

.connection-state[data-state="loading"] .state-light {
  background: var(--signal);
  box-shadow: 0 0 0 3px rgba(239, 84, 47, 0.18);
  animation: state-blink 900ms steps(2, end) infinite;
}

.connection-state[data-state="online"] {
  color: var(--success);
}

.connection-state[data-state="online"] .state-light {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(169, 216, 179, 0.14);
}

.connection-state[data-state="error"] {
  color: #ff8a70;
}

.connection-state[data-state="error"] .state-light {
  background: #ff6c4a;
  box-shadow: 0 0 0 3px rgba(255, 108, 74, 0.17);
}

.config-form {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 31px 27px 24px;
  scrollbar-color: #4b4e44 transparent;
  scrollbar-width: thin;
}

.config-form::-webkit-scrollbar {
  width: 4px;
}

.config-form::-webkit-scrollbar-thumb {
  background: #4b4e44;
}

.field {
  display: block;
  flex: 0 0 auto;
  margin-bottom: 28px;
}

.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--muted-dark);
  font-family: var(--mono-font);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
}

.field-index {
  color: #66685f;
  font-size: 8px;
}

.field input,
.field select {
  width: 100%;
  height: 44px;
  padding: 0 0 8px;
  color: var(--paper);
  background: transparent;
  border: 0;
  border-bottom: 1px solid #55584d;
  border-radius: 0;
  font-size: 13px;
  outline: 0;
  transition:
    border-color 160ms ease,
    color 160ms ease;
}

.field input::placeholder {
  color: #62645b;
}

.field input:focus,
.field select:focus {
  border-bottom-color: var(--signal);
}

.field input:disabled,
.field select:disabled {
  color: #72746b;
  opacity: 0.7;
}

.secret-field,
.select-wrap {
  position: relative;
  display: block;
}

.secret-field input {
  padding-right: 54px;
  font-family: var(--mono-font);
  letter-spacing: 0.02em;
}

.secret-toggle {
  position: absolute;
  top: 0;
  right: 0;
  height: 36px;
  padding: 0;
  color: var(--muted-dark);
  background: transparent;
  font-family: var(--mono-font);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.secret-toggle:hover {
  color: var(--paper);
}

.load-models-button {
  position: relative;
  display: flex;
  width: 100%;
  height: 52px;
  align-items: center;
  flex: 0 0 auto;
  justify-content: space-between;
  margin: 1px 0 34px;
  padding: 0 17px;
  overflow: hidden;
  color: #11130f;
  background: var(--signal);
  font-family: var(--mono-font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.load-models-button::before {
  position: absolute;
  inset: 0;
  content: "";
  background: var(--paper);
  transform: translateX(-102%);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.load-models-button > span {
  position: relative;
  z-index: 1;
}

.load-models-button:hover:not(:disabled) {
  color: var(--ink);
  transform: translateY(-1px);
}

.load-models-button:hover:not(:disabled)::before {
  transform: translateX(0);
}

.load-models-button:active:not(:disabled) {
  transform: translateY(0);
}

.load-models-button:disabled {
  color: #8e8d85;
  background: #34372f;
}

.load-models-button[data-loading="true"] .button-glyph {
  width: 13px;
  height: 13px;
  color: transparent;
  border: 1px solid rgba(17, 19, 15, 0.35);
  border-top-color: var(--ink);
  animation: spin 700ms linear infinite;
}

.model-field {
  margin-bottom: 24px;
}

.effort-field {
  margin-bottom: 28px;
}

.field select {
  padding-right: 32px;
  appearance: none;
  text-overflow: ellipsis;
}

.field select option {
  color: var(--ink);
  background: var(--paper);
}

.select-wrap svg {
  position: absolute;
  top: 11px;
  right: 1px;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--muted-dark);
  stroke-width: 1.5;
  pointer-events: none;
}

.keepalive-panel {
  flex: 0 0 auto;
  margin-top: 2px;
  padding-top: 22px;
  border-top: 1px solid var(--line-dark);
}

.keepalive-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
}

.keepalive-switch > span:first-child {
  display: grid;
  gap: 4px;
}

.keepalive-switch strong {
  color: var(--paper);
  font-family: var(--body-font);
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0.03em;
}

.keepalive-switch small {
  color: #66685f;
  font-family: var(--mono-font);
  font-size: 7px;
  letter-spacing: 0.16em;
}

.keepalive-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 42px;
  height: 22px;
  flex: 0 0 auto;
  background: #34372f;
  border: 1px solid #5a5d52;
  transition:
    background 180ms ease,
    border-color 180ms ease;
}

.switch-track span {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 12px;
  height: 12px;
  background: #8b8d82;
  transition:
    background 180ms ease,
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.keepalive-switch input:focus-visible + .switch-track {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.keepalive-switch input:checked + .switch-track {
  background: var(--signal);
  border-color: var(--signal);
}

.keepalive-switch input:checked + .switch-track span {
  background: var(--ink);
  transform: translateX(20px);
}

.keepalive-options {
  margin-top: 23px;
  padding-left: 14px;
  border-left: 2px solid var(--signal);
  animation: enter-content 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.keepalive-options[hidden] {
  display: none;
}

.keepalive-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 19px 16px;
}

.keepalive-field {
  display: grid;
  min-width: 0;
  gap: 9px;
  color: var(--muted-dark);
  font-family: var(--mono-font);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.keepalive-field input {
  width: 100%;
  height: 34px;
  min-width: 0;
  padding: 0 0 6px;
  color: var(--paper);
  background: transparent;
  border: 0;
  border-bottom: 1px solid #55584d;
  border-radius: 0;
  outline: 0;
  font-family: var(--body-font);
  font-size: 12px;
}

.keepalive-field input:focus {
  border-bottom-color: var(--signal);
}

.keepalive-content-field {
  grid-column: 1 / -1;
}

.unit-input {
  position: relative;
  display: block;
}

.unit-input input {
  padding-right: 24px;
}

.unit-input small {
  position: absolute;
  top: 8px;
  right: 0;
  color: #71736a;
  font-size: 8px;
}

.keepalive-runtime {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  color: #888a80;
  font-family: var(--mono-font);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.keepalive-light {
  width: 6px;
  height: 6px;
  background: #66685f;
}

.keepalive-runtime output {
  color: #77796f;
  font-size: 7px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.keepalive-runtime[data-state="running"] {
  color: var(--success);
}

.keepalive-runtime[data-state="running"] .keepalive-light {
  background: var(--success);
  animation: state-blink 1.2s steps(2, end) infinite;
}

.keepalive-runtime[data-state="reconnecting"] {
  color: #ff8a70;
}

.keepalive-runtime[data-state="reconnecting"] .keepalive-light {
  background: var(--signal);
  animation: state-blink 700ms steps(2, end) infinite;
}

.settings-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  min-height: 104px;
  padding: 20px 27px 23px;
  border-top: 1px solid var(--line-dark);
}

.clear-cache-button {
  padding: 0 0 3px;
  color: #777a70;
  background: transparent;
  border-bottom: 1px solid #4a4c44;
  font-family: var(--mono-font);
  font-size: 8px;
  letter-spacing: 0.09em;
}

.clear-cache-button:hover {
  color: var(--paper);
  border-bottom-color: var(--paper);
}

.protocol-stamp {
  display: grid;
  justify-items: end;
  color: #6f7168;
  font-family: var(--mono-font);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.protocol-stamp strong {
  margin-top: 2px;
  color: var(--paper);
  font-size: 10px;
  letter-spacing: 0.18em;
}

.settings-scrim {
  display: none;
}

.chat-panel {
  position: relative;
  display: grid;
  min-width: 0;
  height: 100%;
  min-height: 0;
  grid-template-rows: 74px minmax(0, 1fr) auto;
  overflow: hidden;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(23, 25, 20, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 25, 20, 0.025) 1px, transparent 1px);
  background-position: -1px -1px;
  background-size: 100% 48px, 48px 100%;
}

.chat-panel::before {
  position: absolute;
  z-index: 0;
  top: 74px;
  bottom: 0;
  left: clamp(38px, 6vw, 92px);
  width: 1px;
  content: "";
  background: rgba(23, 25, 20, 0.08);
  pointer-events: none;
}

.chat-header {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 30px;
  padding: 0 clamp(28px, 4.5vw, 68px);
  background: rgba(242, 240, 232, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.open-settings {
  display: none;
}

.active-model {
  min-width: 0;
}

.active-model .micro-label {
  margin-bottom: 4px;
  color: var(--muted);
}

.active-model strong {
  display: block;
  overflow: hidden;
  font-family: var(--mono-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-mode {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.mode-pulse {
  width: 5px;
  height: 5px;
  background: var(--signal);
}

.clear-chat-button {
  height: 34px;
  padding: 0 0 2px;
  color: var(--ink);
  background: transparent;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono-font);
  font-size: 9px;
  letter-spacing: 0.1em;
  transition:
    color 150ms ease,
    border-color 150ms ease;
}

.clear-chat-button:hover {
  color: var(--signal);
  border-color: var(--signal);
}

.conversation {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 38px clamp(38px, 7vw, 104px) 56px;
  scroll-behavior: smooth;
  scrollbar-color: var(--line) transparent;
  scrollbar-width: thin;
}

.conversation::-webkit-scrollbar {
  width: 6px;
}

.conversation::-webkit-scrollbar-thumb {
  background: var(--line);
}

.empty-state {
  position: relative;
  display: grid;
  min-height: 100%;
  flex: 1;
  place-content: center;
  justify-items: center;
  color: var(--muted);
  animation: enter-content 640ms 90ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.empty-state[hidden] {
  display: none;
}

.empty-cross {
  position: relative;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
}

.empty-cross::before,
.empty-cross::after {
  position: absolute;
  top: 50%;
  left: 50%;
  content: "";
  background: var(--signal);
  transform: translate(-50%, -50%);
}

.empty-cross::before {
  width: 44px;
  height: 1px;
}

.empty-cross::after {
  width: 1px;
  height: 44px;
}

.empty-index {
  color: var(--ink);
  font-family: var(--display-font);
  font-size: clamp(72px, 9vw, 120px);
  font-style: italic;
  letter-spacing: -0.08em;
  line-height: 0.8;
}

.empty-state p {
  margin: 25px 0 0;
  font-family: var(--mono-font);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.message {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: clamp(18px, 3vw, 42px);
  width: min(900px, 100%);
  padding: 31px 0 38px;
  border-top: 1px solid var(--line);
  animation: enter-message 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.message:first-child {
  border-top-color: var(--ink);
}

.message-user {
  width: min(730px, 84%);
  align-self: flex-end;
}

.message-assistant {
  align-self: flex-start;
}

.message-meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 4px;
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.message-role {
  color: var(--ink);
  font-weight: 700;
}

.message-assistant .message-role {
  color: var(--signal);
}

.message-body {
  min-width: 0;
  color: var(--ink);
  font-size: clamp(15px, 1.45vw, 18px);
  font-weight: 450;
  line-height: 1.78;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message-user .message-body {
  font-family: var(--display-font);
  font-size: clamp(18px, 1.8vw, 23px);
  line-height: 1.55;
}

.message-assistant .message-body {
  padding-left: 18px;
  border-left: 2px solid var(--signal);
}

.message[data-state="streaming"] .message-body::after {
  display: inline-block;
  width: 7px;
  height: 1.05em;
  margin-left: 4px;
  vertical-align: -0.14em;
  content: "";
  background: var(--signal);
  animation: cursor-blink 750ms steps(2, end) infinite;
}

.message[data-state="error"] .message-body {
  color: var(--danger);
  border-left-color: var(--danger);
  font-family: var(--mono-font);
  font-size: 12px;
  line-height: 1.65;
}

.composer-area {
  position: relative;
  z-index: 8;
  padding: 0 clamp(38px, 7vw, 104px) clamp(24px, 4vh, 42px);
  background: linear-gradient(to bottom, rgba(242, 240, 232, 0), var(--paper) 26%);
}

.composer {
  width: min(900px, 100%);
  margin: 0 auto;
  background: #faf8f0;
  border: 1px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(23, 25, 20, 0.12);
  transition:
    box-shadow 180ms ease,
    transform 180ms ease;
}

.composer:focus-within {
  box-shadow: 12px 12px 0 rgba(239, 84, 47, 0.16);
  transform: translate(-2px, -2px);
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 72px;
  max-height: 210px;
  resize: none;
  padding: 21px 23px 12px;
  overflow-y: auto;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-family: var(--body-font);
  font-size: 15px;
  line-height: 1.6;
  outline: 0;
}

.composer textarea::placeholder {
  color: #918f87;
}

.composer-footer {
  display: flex;
  min-height: 49px;
  align-items: center;
  justify-content: space-between;
  padding-left: 23px;
  border-top: 1px solid var(--line);
}

.key-hint {
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.send-button {
  display: flex;
  align-self: stretch;
  align-items: center;
  gap: 16px;
  min-width: 126px;
  justify-content: center;
  padding: 0 18px;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--mono-font);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.send-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 1.4;
}

.send-button:hover {
  color: var(--ink);
  background: var(--signal);
}

.send-button[data-state="stop"] {
  color: var(--paper);
  background: var(--danger);
}

.send-button[data-state="stop"] svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
  stroke: none;
}

.send-button:disabled {
  color: #a3a198;
  background: #d3cfc3;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 26px;
  bottom: 26px;
  max-width: min(410px, calc(100vw - 40px));
  padding: 14px 17px;
  color: var(--paper);
  background: var(--ink);
  border-left: 3px solid var(--signal);
  box-shadow: 7px 7px 0 rgba(23, 25, 20, 0.16);
  font-family: var(--mono-font);
  font-size: 10px;
  line-height: 1.55;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
}

@keyframes enter-panel {
  from {
    opacity: 0;
    transform: translateX(-26px);
  }
}

@keyframes enter-content {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

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

@keyframes state-blink {
  50% {
    opacity: 0.25;
  }
}

@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 920px) {
  .app-shell {
    display: block;
  }

  .settings-panel {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(360px, calc(100vw - 34px));
    transform: translateX(-102%);
    transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
    animation: none;
  }

  body[data-settings-open="true"] .settings-panel {
    transform: translateX(0);
  }

  .close-settings {
    display: inline-grid;
  }

  .settings-scrim {
    position: fixed;
    z-index: 20;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    background: rgba(11, 12, 10, 0.56);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
    backdrop-filter: blur(3px);
  }

  body[data-settings-open="true"] .settings-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .chat-panel {
    width: 100vw;
  }

  .chat-header {
    grid-template-columns: 42px minmax(0, 1fr) auto auto;
    gap: 18px;
    padding-inline: 22px;
  }

  .open-settings {
    display: inline-grid;
    margin-left: -8px;
  }
}

@media (max-width: 620px) {
  .chat-panel {
    grid-template-rows: 66px minmax(0, 1fr) auto;
  }

  .chat-panel::before {
    top: 66px;
    left: 22px;
  }

  .chat-header {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 13px;
    padding-inline: 14px;
  }

  .open-settings {
    width: 34px;
    height: 34px;
    margin-left: -3px;
  }

  .api-mode {
    display: none;
  }

  .clear-chat-button {
    font-size: 8px;
  }

  .conversation {
    padding: 26px 22px 42px 34px;
  }

  .message,
  .message-user {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 11px;
    width: 100%;
    padding: 25px 0 30px;
  }

  .message-meta {
    font-size: 7px;
  }

  .message-body {
    font-size: 14px;
    line-height: 1.72;
  }

  .message-user .message-body {
    font-size: 18px;
  }

  .message-assistant .message-body {
    padding-left: 12px;
  }

  .composer-area {
    padding: 0 14px 16px 20px;
  }

  .composer {
    box-shadow: 5px 5px 0 rgba(23, 25, 20, 0.12);
  }

  .composer:focus-within {
    box-shadow: 7px 7px 0 rgba(239, 84, 47, 0.16);
  }

  .composer textarea {
    min-height: 61px;
    padding: 16px 17px 9px;
    font-size: 14px;
  }

  .composer-footer {
    min-height: 45px;
    padding-left: 17px;
  }

  .key-hint {
    max-width: 130px;
    font-size: 7px;
    line-height: 1.4;
  }

  .send-button {
    min-width: 96px;
    gap: 9px;
    padding-inline: 13px;
  }

  .toast {
    right: 14px;
    bottom: 14px;
  }
}

@media (max-height: 700px) and (min-width: 921px) {
  .brand {
    min-height: 92px;
  }

  .config-form {
    padding-top: 22px;
  }

  .field {
    margin-bottom: 21px;
  }

  .load-models-button {
    height: 47px;
    margin-bottom: 25px;
  }

  .settings-footer {
    min-height: 78px;
  }
}

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