:root {
  color-scheme: dark;
  --ink: #101518;
  --rail: #0c1012;
  --surface: #151b1e;
  --surface-raised: #1a2023;
  --surface-soft: #20282c;
  --paper: #f3efe7;
  --paper-soft: #d8d7d1;
  --muted: #9ba1a3;
  --quiet: #717a7d;
  --line: #2b3336;
  --line-strong: #414b4f;
  --accent: #d66f4b;
  --accent-bright: #ef8963;
  --sage: #95a98d;
  --danger: #d57567;
  --sidebar-width: 272px;
  --content-width: 880px;
  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
select {
  cursor: pointer;
}

button,
input,
textarea,
select {
  border: 0;
  border-radius: 3px;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.icon-library {
  position: fixed;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

::selection {
  background: var(--accent);
  color: #fff;
}

.auth-gate {
  display: grid;
  min-height: 100dvh;
  place-content: center;
  place-items: center;
  padding: 32px;
  background: var(--ink);
  text-align: center;
}

.auth-brand,
.chat-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  font-size: 13px;
  font-weight: 800;
}

.auth-brand > span {
  color: var(--accent-bright);
  font-size: 23px;
}

.auth-brand small,
.chat-brand small {
  margin-left: 9px;
  padding-left: 9px;
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.auth-gate-copy {
  display: grid;
  place-items: center;
  min-height: 100px;
  margin-top: 36px;
  color: var(--muted);
}

.auth-gate-copy p {
  margin: 14px 0 0;
}

.auth-loader {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-top-color: var(--accent-bright);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

.auth-gate-action {
  min-width: 148px;
  margin-top: 12px;
  padding: 14px 20px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: var(--accent);
  color: #fff;
  font-weight: 750;
}

.chat-app {
  position: relative;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--ink);
}

.chat-sidebar {
  position: relative;
  z-index: 30;
  display: flex;
  min-width: 0;
  height: 100dvh;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--rail);
}

.sidebar-head {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.chat-brand {
  min-width: 0;
}

.chat-brand-mark {
  position: relative;
  display: inline-flex;
  width: 24px;
  height: 25px;
  gap: 6px;
  transform: skew(-18deg);
}

.chat-brand-mark i {
  display: block;
  width: 4px;
  height: 24px;
  background: var(--paper);
}

.chat-brand-mark::after {
  position: absolute;
  right: -1px;
  bottom: 0;
  width: 5px;
  height: 5px;
  background: var(--accent-bright);
  content: "";
}

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
}

.icon-button:hover {
  border-color: var(--line);
  background: var(--surface);
  color: var(--paper);
}

.sidebar-close,
.mobile-menu {
  display: none;
}

.new-chat-button {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 11px;
  margin: 18px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.new-chat-button:hover {
  border-color: var(--accent);
  background: var(--surface-raised);
  transform: translateY(-1px);
}

.new-chat-button svg {
  width: 18px;
  height: 18px;
  color: var(--accent-bright);
}

.conversation-scroll {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 0 10px 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.conversation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 9px 10px;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.conversation-list {
  display: grid;
  gap: 3px;
}

.conversation-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 3px;
}

.conversation-item.active {
  border-color: var(--line);
  background: var(--surface-raised);
}

.conversation-select,
.conversation-delete {
  background: transparent;
}

.conversation-select {
  min-width: 0;
  padding: 11px 8px;
  color: var(--muted);
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-item:hover .conversation-select,
.conversation-item.active .conversation-select {
  color: var(--paper);
}

.conversation-delete {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--quiet);
  opacity: 0;
}

.conversation-item:hover .conversation-delete,
.conversation-item:focus-within .conversation-delete {
  opacity: 1;
}

.conversation-delete:hover {
  color: var(--danger);
}

.conversation-delete svg {
  width: 15px;
  height: 15px;
}

.conversation-empty {
  display: grid;
  place-items: center;
  padding: 34px 24px;
  color: var(--quiet);
  text-align: center;
}

.conversation-empty svg {
  width: 22px;
  height: 22px;
  margin-bottom: 7px;
}

.conversation-empty p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.sidebar-tools {
  display: grid;
  gap: 3px;
  padding: 12px 10px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.sidebar-tools button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  min-height: 43px;
  align-items: center;
  gap: 9px;
  padding: 0 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
}

.sidebar-tools button:hover {
  background: var(--surface);
  color: var(--paper);
}

.sidebar-tools svg {
  width: 18px;
  height: 18px;
}

.sidebar-tools strong {
  color: var(--sage);
  font-size: 11px;
  font-weight: 750;
}

.chat-main {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: 64px minmax(0, 1fr) auto auto;
  background: var(--ink);
}

.chat-toolbar {
  position: relative;
  z-index: 10;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 21, 24, 0.96);
}

.chat-toolbar::after {
  position: absolute;
  right: 24px;
  bottom: -1px;
  width: 86px;
  height: 1px;
  background: var(--accent-bright);
  content: "";
}

.model-control {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.model-control > span {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.model-control select {
  min-width: 158px;
  padding: 9px 32px 9px 11px;
  border: 1px solid var(--line);
  background-color: var(--surface);
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
}

.toolbar-spacer {
  flex: 1;
}

.privacy-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.privacy-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(149, 169, 141, 0.1);
}

.credit-button {
  min-width: 106px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--paper-soft);
  font-size: 12px;
  font-weight: 750;
}

.credit-button:hover {
  border-color: var(--accent);
  color: #fff;
}

.chat-viewport {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.welcome-state {
  position: relative;
  display: grid;
  min-height: 100%;
  align-items: center;
  overflow: hidden;
  padding: 64px max(32px, 7vw) 56px;
  isolation: isolate;
}

.welcome-state::before,
.welcome-state::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.welcome-state::before {
  top: 9%;
  right: 4%;
  width: 1px;
  height: 92px;
  background: var(--accent-bright);
}

.welcome-state::after {
  right: 5%;
  bottom: 12%;
  width: 29%;
  height: 1px;
  background: rgba(239, 137, 99, 0.42);
  transform: rotate(-3deg);
}

.welcome-state > img {
  position: absolute;
  z-index: -2;
  top: 0;
  right: -7%;
  width: 70%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
  filter: brightness(0.56) contrast(1.12) saturate(0.8);
  opacity: 0.6;
}

.welcome-content {
  width: min(100%, 760px);
  margin: auto;
}

.welcome-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--accent-bright);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.welcome-status span {
  width: 26px;
  height: 1px;
  background: currentColor;
}

.welcome-content h1 {
  max-width: 640px;
  margin: 0;
  color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(46px, 6.2vw, 78px);
  font-weight: 400;
  line-height: 0.99;
}

.welcome-content > p:not(.welcome-status) {
  max-width: 610px;
  margin: 24px 0 0;
  color: var(--paper-soft);
  font-size: 17px;
  line-height: 1.65;
}

.prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 38px;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
  background: rgba(16, 21, 24, 0.73);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.prompt-grid button {
  position: relative;
  display: grid;
  min-height: 104px;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-content: center;
  gap: 5px 12px;
  padding: 19px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  text-align: left;
  transition: background 180ms ease, color 180ms ease;
}

.prompt-grid button:hover {
  background: var(--surface-raised);
}

.prompt-grid button::before {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 0;
  height: 2px;
  background: var(--accent-bright);
  content: "";
  transition: width 220ms var(--ease);
}

.prompt-grid button:hover::before {
  width: 58px;
}

.prompt-grid strong {
  font-size: 14px;
}

.prompt-grid span {
  grid-column: 1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.prompt-grid svg {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  width: 17px;
  color: var(--accent-bright);
}

.message-list {
  display: grid;
  width: min(100%, calc(var(--content-width) + 48px));
  margin: 0 auto;
  padding: 34px 24px 72px;
}

.message {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 16px;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
  animation: messageIn 280ms var(--ease) both;
}

.message.user {
  margin: 14px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  background: var(--surface);
}

.message-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: var(--surface-raised);
  color: var(--paper);
  font-size: 11px;
  font-weight: 800;
}

.message.user .message-mark {
  border-color: var(--accent);
  color: var(--accent-bright);
}

.message-body {
  min-width: 0;
  color: var(--paper-soft);
  font-size: 15px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.message-body > :first-child {
  margin-top: 2px;
}

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

.message-body p,
.message-body ul,
.message-body ol,
.message-body pre,
.message-body h2,
.message-body h3 {
  margin: 0 0 15px;
}

.message-body h2,
.message-body h3 {
  color: var(--paper);
  font-size: 16px;
  line-height: 1.4;
}

.message-body ul,
.message-body ol {
  padding-left: 22px;
}

.message-body li + li {
  margin-top: 6px;
}

.message-body strong {
  color: var(--paper);
}

.message-body code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--rail);
  color: #f1b39c;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
}

.code-block {
  position: relative;
  margin: 18px 0;
  border: 1px solid var(--line-strong);
  background: var(--rail);
}

.code-block header {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 13px;
  border-bottom: 1px solid var(--line);
  color: var(--quiet);
  font-size: 11px;
  text-transform: uppercase;
}

.code-block button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  background: transparent;
  color: var(--muted);
}

.code-block button:hover {
  color: var(--paper);
}

.code-block svg {
  width: 15px;
  height: 15px;
}

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

.code-block pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--paper-soft);
  font-size: 13px;
  line-height: 1.65;
}

.typing-cursor::after {
  display: inline-block;
  width: 7px;
  height: 15px;
  margin-left: 3px;
  background: var(--accent-bright);
  content: "";
  vertical-align: -2px;
  animation: blink 850ms steps(1) infinite;
}

.chat-notice {
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto 10px;
  padding: 11px 14px;
  border-left: 2px solid var(--danger);
  background: rgba(213, 117, 103, 0.1);
  color: #efc0b9;
  font-size: 13px;
  line-height: 1.5;
}

.chat-notice a {
  color: var(--paper);
  font-weight: 750;
  text-decoration: underline;
}

.composer-zone {
  position: relative;
  z-index: 12;
  padding: 10px 24px max(15px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(43, 51, 54, 0.66);
  background: rgba(16, 21, 24, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.composer {
  display: grid;
  width: min(100%, var(--content-width));
  min-height: 58px;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: end;
  gap: 12px;
  margin: 0 auto;
  padding: 8px 8px 8px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface-raised);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.composer:focus-within {
  border-color: rgba(239, 137, 99, 0.72);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32);
}

.composer textarea {
  width: 100%;
  min-height: 40px;
  max-height: 180px;
  resize: none;
  padding: 9px 0;
  overflow-y: auto;
  background: transparent;
  color: var(--paper);
  line-height: 1.45;
  outline: 0;
}

.composer textarea::placeholder {
  color: var(--quiet);
}

.composer textarea:disabled {
  cursor: not-allowed;
}

.send-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--accent);
  color: #fff;
  transition: background 180ms ease, transform 180ms ease;
}

.send-button:hover:not(:disabled) {
  background: var(--accent-bright);
  transform: translateY(-1px);
}

.send-button:disabled {
  background: var(--surface-soft);
  color: var(--quiet);
  cursor: not-allowed;
}

.send-button .stop-icon,
.send-button.sending .send-icon {
  display: none;
}

.send-button.sending .stop-icon {
  display: block;
}

.composer-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 0;
  color: var(--quiet);
  font-size: 10px;
  text-align: center;
}

.composer-note i {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--quiet);
}

.utility-drawer {
  position: fixed;
  z-index: 70;
  top: 0;
  right: 0;
  width: min(420px, calc(100vw - 24px));
  height: 100dvh;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom);
  border-left: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: -28px 0 72px rgba(0, 0, 0, 0.44);
  transform: translateX(105%);
  transition: transform 300ms var(--ease);
}

.utility-drawer.open {
  transform: none;
}

.utility-drawer > header {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.utility-drawer > header > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.utility-drawer > header span {
  color: var(--accent-bright);
  font-size: 11px;
  font-weight: 800;
}

.utility-drawer h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 400;
}

.drawer-view {
  padding: 30px 24px 44px;
}

.drawer-lead,
.account-identity p,
.password-form > p {
  color: var(--muted);
  line-height: 1.65;
}

.drawer-lead {
  margin: 0 0 30px;
  color: var(--paper-soft);
  font-size: 17px;
}

.guide-steps {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.guide-steps li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.guide-steps li > span {
  color: var(--accent-bright);
  font-size: 11px;
  font-weight: 800;
}

.guide-steps strong,
.password-form h3 {
  color: var(--paper);
}

.guide-steps p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.guide-example {
  margin-top: 28px;
  padding: 19px;
  border-left: 2px solid var(--accent);
  background: var(--surface-raised);
}

.guide-example span {
  color: var(--accent-bright);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.guide-example p {
  margin: 10px 0 0;
  color: var(--paper-soft);
  font-size: 13px;
  line-height: 1.6;
}

.usage-balance {
  padding: 24px;
  border: 1px solid var(--line-strong);
  background: var(--rail);
}

.usage-balance span,
.account-identity span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.usage-balance strong {
  display: block;
  margin-top: 8px;
  color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  font-weight: 400;
}

.usage-balance p {
  margin: 8px 0 0;
  color: var(--sage);
  font-size: 12px;
}

.usage-ledger {
  margin: 25px 0 0;
  border-top: 1px solid var(--line);
}

.usage-ledger div {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.usage-ledger dt {
  color: var(--muted);
  font-size: 12px;
}

.usage-ledger dd {
  margin: 0;
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.usage-meter {
  height: 4px;
  margin-top: 26px;
  overflow: hidden;
  background: var(--line);
}

.usage-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent-bright);
  transition: width 500ms var(--ease);
}

.usage-caption {
  margin: 10px 0 24px;
  color: var(--quiet);
  font-size: 11px;
}

.drawer-action {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
}

.drawer-action:hover {
  background: var(--accent-bright);
}

.drawer-action svg {
  width: 16px;
}

.account-identity {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.account-identity strong {
  display: block;
  margin-top: 9px;
  color: var(--paper);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.account-identity p {
  margin: 12px 0 0;
  font-size: 13px;
}

.password-form {
  display: grid;
  gap: 15px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.password-form h3 {
  margin: 0;
  font-size: 15px;
}

.password-form > p {
  margin: -7px 0 3px;
  font-size: 13px;
}

.password-form label {
  display: grid;
  gap: 7px;
}

.password-form label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.password-form input {
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  background: var(--rail);
  outline: 0;
}

.password-form input:focus {
  border-color: var(--accent);
}

.password-form button[type="submit"] {
  min-height: 46px;
  margin-top: 3px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
}

.password-form button[type="submit"]:hover {
  background: #fff;
}

.form-status {
  min-height: 19px;
  margin: -4px 0 0 !important;
  color: var(--sage) !important;
  font-size: 12px !important;
}

.form-status.error {
  color: var(--danger) !important;
}

.logout-button {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
}

.logout-button:hover {
  background: var(--surface-raised);
  color: var(--paper);
}

.logout-button svg {
  width: 18px;
}

.toast {
  position: fixed;
  z-index: 90;
  top: 82px;
  right: 22px;
  display: grid;
  width: min(360px, calc(100vw - 32px));
  min-height: 74px;
  grid-template-columns: 34px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 11px;
  padding: 13px 12px 13px 14px;
  border: 1px solid var(--line-strong);
  border-left: 2px solid var(--sage);
  border-radius: 3px;
  background: var(--surface-raised);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
  animation: toastIn 340ms var(--ease) both;
}

.toast > svg {
  width: 21px;
  color: var(--sage);
}

.toast div {
  display: grid;
  gap: 4px;
}

.toast strong {
  font-size: 13px;
}

.toast span {
  color: var(--muted);
  font-size: 12px;
}

.toast button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  background: transparent;
  color: var(--muted);
}

.toast button:hover {
  color: var(--paper);
}

.toast button svg {
  width: 15px;
}

.sidebar-scrim {
  position: fixed;
  z-index: 20;
  inset: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.62);
}

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

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

@keyframes messageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .chat-app {
    grid-template-columns: 238px minmax(0, 1fr);
  }

  .welcome-state {
    padding-right: 38px;
    padding-left: 38px;
  }

  .welcome-state > img {
    right: -18%;
    width: 88%;
  }

  .privacy-status {
    display: none;
  }
}

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

  .chat-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(292px, calc(100vw - 48px));
    transform: translateX(-105%);
    transition: transform 280ms var(--ease);
  }

  .chat-app.sidebar-open .chat-sidebar {
    transform: none;
  }

  .sidebar-close,
  .mobile-menu {
    display: inline-grid;
  }

  .chat-main {
    width: 100%;
    height: 100dvh;
    grid-template-rows: 58px minmax(0, 1fr) auto auto;
  }

  .chat-toolbar {
    gap: 10px;
    min-height: 58px;
    padding: 0 12px;
  }

  .chat-toolbar::after {
    right: 12px;
    width: 54px;
  }

  .model-control > span {
    display: none;
  }

  .model-control select {
    width: min(44vw, 165px);
    min-width: 0;
    padding-left: 9px;
  }

  .credit-button {
    min-width: 0;
    max-width: 108px;
    overflow: hidden;
    padding: 0 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .welcome-state {
    align-items: start;
    padding: 50px 20px 40px;
  }

  .welcome-state::before {
    top: 28px;
    right: 20px;
    height: 48px;
  }

  .welcome-state::after {
    display: none;
  }

  .welcome-state > img {
    top: auto;
    right: -34%;
    bottom: -5%;
    width: 125%;
    height: 58%;
    object-position: center;
    opacity: 0.36;
  }

  .welcome-content {
    margin: 0 auto;
  }

  .welcome-content h1 {
    max-width: 350px;
    font-size: clamp(43px, 14vw, 58px);
  }

  .welcome-content > p:not(.welcome-status) {
    margin-top: 18px;
    font-size: 15px;
  }

  .prompt-grid {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }

  .prompt-grid button {
    min-height: 79px;
    padding: 14px;
  }

  .prompt-grid button:nth-child(n + 3) {
    display: none;
  }

  .message-list {
    padding: 15px 14px 42px;
  }

  .message {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 11px;
    padding: 20px 0;
  }

  .message.user {
    margin: 10px 0;
    padding: 15px 13px;
  }

  .message-mark {
    width: 27px;
    height: 27px;
    font-size: 10px;
  }

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

  .composer-zone {
    padding: 8px 10px max(10px, env(safe-area-inset-bottom));
  }

  .composer {
    min-height: 54px;
    grid-template-columns: minmax(0, 1fr) 40px;
    padding-left: 13px;
  }

  .send-button {
    width: 40px;
    height: 40px;
  }

  .composer-note {
    max-width: 330px;
    margin-right: auto;
    margin-left: auto;
    font-size: 9px;
  }

  .toast {
    top: 70px;
    right: 16px;
  }
}

@media (max-width: 390px) {
  .credit-button {
    width: 39px;
    color: transparent;
    font-size: 0;
  }

  .credit-button::before {
    color: var(--paper-soft);
    font-size: 12px;
    content: "EUR";
  }

  .welcome-state {
    padding-top: 38px;
  }

  .welcome-status {
    margin-bottom: 17px;
  }

  .welcome-content h1 {
    font-size: 42px;
  }

  .prompt-grid {
    margin-top: 22px;
  }
}

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

/* Workspace V2: explicit model identity and denser product-level controls. */
.chat-main {
  grid-template-rows: 72px minmax(0, 1fr) auto auto;
}

.chat-toolbar {
  min-height: 72px;
  gap: 14px;
  padding: 0 20px;
  background: rgba(12, 16, 18, 0.97);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
}

.chat-toolbar::before {
  position: absolute;
  bottom: -1px;
  left: 20px;
  width: 38px;
  height: 1px;
  background: var(--accent-bright);
  content: "";
}

.model-picker {
  position: relative;
  z-index: 25;
  flex: 0 0 auto;
}

.model-trigger {
  display: grid;
  width: 286px;
  min-height: 52px;
  grid-template-columns: 36px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 7px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--paper);
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.model-trigger:hover,
.model-picker.open .model-trigger {
  border-color: rgba(239, 137, 99, 0.7);
  background: var(--surface-raised);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.model-trigger > svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
  transform: rotate(90deg);
  transition: transform 180ms ease;
}

.model-picker.open .model-trigger > svg {
  transform: rotate(-90deg);
}

.model-monogram {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(239, 137, 99, 0.62);
  background: var(--rail);
  color: var(--accent-bright);
  font-size: 10px;
  font-weight: 850;
}

.model-trigger-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.model-trigger-copy small {
  color: var(--quiet);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.model-trigger-copy strong {
  overflow: hidden;
  color: var(--paper);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-speed {
  padding: 4px 6px;
  border: 1px solid rgba(149, 169, 141, 0.35);
  border-radius: 2px;
  color: var(--sage);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.model-menu {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  width: min(430px, calc(100vw - 40px));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--accent);
  border-radius: 3px;
  background: #111719;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.56);
  animation: modelMenuIn 180ms var(--ease) both;
}

.model-menu > header {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.model-menu > header div {
  display: grid;
  gap: 3px;
}

.model-menu > header span,
.model-menu > header small {
  color: var(--accent-bright);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.model-menu > header strong {
  color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 400;
}

.model-menu > header small {
  color: var(--sage);
}

.model-options {
  display: grid;
}

.model-option {
  display: grid;
  min-height: 98px;
  grid-template-columns: 31px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  text-align: left;
}

.model-option:hover,
.model-option.selected {
  background: var(--surface-raised);
}

.model-option.selected {
  box-shadow: inset 2px 0 var(--accent-bright);
}

.model-option-index {
  align-self: start;
  padding-top: 4px;
  color: var(--accent-bright);
  font-size: 10px;
  font-weight: 850;
}

.model-option-copy {
  display: grid;
  gap: 7px;
}

.model-option-copy strong {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
}

.model-option-copy strong i {
  padding: 3px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--sage);
  font-size: 8px;
  font-style: normal;
  text-transform: uppercase;
}

.model-option-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.model-option > svg {
  width: 17px;
  height: 17px;
  color: var(--accent-bright);
  opacity: 0;
}

.model-option.selected > svg {
  opacity: 1;
}

.model-menu > footer {
  padding: 13px 17px;
  color: var(--quiet);
  font-size: 10px;
  line-height: 1.45;
}

.conversation-context {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding-left: 4px;
}

.conversation-context span {
  color: var(--quiet);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.conversation-context strong {
  max-width: 220px;
  overflow: hidden;
  color: var(--paper-soft);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-item {
  grid-template-columns: minmax(0, 1fr) 34px;
  min-height: 58px;
}

.conversation-select {
  display: grid;
  gap: 4px;
  padding: 10px 8px;
}

.conversation-select strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-select span {
  overflow: hidden;
  color: var(--quiet);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.welcome-state {
  min-height: 100%;
  align-items: center;
  padding: 34px 42px 28px;
}

.welcome-state::before {
  top: 26px;
  right: 32px;
  height: 58px;
}

.welcome-state > img {
  right: -3%;
  width: 62%;
  filter: brightness(0.5) contrast(1.16) saturate(0.74);
  opacity: 0.48;
}

.welcome-content {
  width: min(100%, 940px);
}

.welcome-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  align-items: center;
  gap: 44px;
}

.welcome-copy {
  min-width: 0;
}

.welcome-content h1 {
  max-width: 560px;
  font-size: 60px;
  line-height: 0.98;
}

.welcome-copy > p:not(.welcome-status) {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--paper-soft);
  font-size: 15px;
  line-height: 1.55;
}

.active-model-panel {
  position: relative;
  min-height: 252px;
  padding: 17px;
  border: 1px solid var(--line-strong);
  background: rgba(13, 18, 20, 0.9);
  box-shadow: 18px 18px 0 rgba(6, 8, 9, 0.35), 0 24px 56px rgba(0, 0, 0, 0.28);
}

.active-model-panel::before {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 58px;
  height: 2px;
  background: var(--accent-bright);
  content: "";
}

.active-model-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.active-model-panel > header > span,
.active-model-panel > header strong {
  color: var(--quiet);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.active-model-panel > header strong {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--sage);
}

.active-model-panel > header i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(149, 169, 141, 0.08);
}

.model-panel-identity {
  display: grid;
  gap: 5px;
  padding-top: 15px;
}

.model-panel-identity span {
  color: var(--accent-bright);
  font-size: 9px;
  font-weight: 850;
}

.model-panel-identity strong {
  color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 400;
}

.active-model-panel > p {
  margin: 9px 0 13px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.active-model-panel dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.active-model-panel dl div {
  display: grid;
  gap: 4px;
  padding: 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.active-model-panel dt {
  color: var(--quiet);
  font-size: 8px;
  text-transform: uppercase;
}

.active-model-panel dd {
  margin: 0;
  color: var(--paper-soft);
  font-size: 10px;
  font-weight: 700;
}

.active-model-panel > button {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface-raised);
  color: var(--paper-soft);
  font-size: 10px;
  font-weight: 750;
}

.active-model-panel > button:hover {
  border-color: var(--accent);
  color: var(--paper);
}

.active-model-panel > button svg {
  width: 14px;
  height: 14px;
  color: var(--accent-bright);
}

.prompt-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  color: var(--paper-soft);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.prompt-heading i {
  height: 1px;
  flex: 1;
  background: var(--line-strong);
}

.prompt-heading small {
  color: var(--quiet);
  font-size: 9px;
  font-weight: 650;
  text-transform: none;
}

.prompt-grid {
  margin-top: 12px;
}

.prompt-grid button {
  min-height: 82px;
  padding: 14px 16px;
}

.message {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 17px;
  padding: 28px 0;
}

.message.user {
  margin: 16px 0;
  padding: 19px 20px;
  box-shadow: 10px 10px 0 rgba(7, 10, 11, 0.2);
}

.message-content {
  min-width: 0;
}

.message-meta {
  display: flex;
  min-height: 25px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.message-meta strong {
  color: var(--paper);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.message-meta span,
.message-meta i {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--accent-bright);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.message-meta i {
  color: var(--sage);
}

@keyframes modelMenuIn {
  from { opacity: 0; transform: translateY(-7px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1120px) {
  .conversation-context { display: none; }
  .welcome-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 28px; }
  .welcome-content h1 { font-size: 54px; }
}

@media (max-height: 760px) and (min-width: 721px) {
  .welcome-state { align-items: start; padding-top: 24px; padding-bottom: 20px; }
  .welcome-content h1 { font-size: 50px; }
  .welcome-status { margin-bottom: 14px; }
  .welcome-copy > p:not(.welcome-status) { margin-top: 13px; font-size: 13px; }
  .active-model-panel { min-height: 214px; padding: 14px; }
  .active-model-panel > p { margin: 7px 0 10px; }
  .active-model-panel dl div { padding: 7px; }
  .active-model-panel > button { margin-top: 9px; }
  .prompt-heading { margin-top: 18px; }
  .prompt-grid button { min-height: 72px; padding: 11px 14px; }
}

@media (max-width: 900px) and (min-width: 721px) {
  .model-trigger { width: 238px; }
  .model-speed { display: none; }
  .welcome-layout { grid-template-columns: 1fr; }
  .active-model-panel { display: none; }
}

@media (max-width: 720px) {
  .chat-main { grid-template-rows: 64px minmax(0, 1fr) auto auto; }
  .chat-toolbar { min-height: 64px; gap: 8px; padding: 0 10px; }
  .chat-toolbar::before { left: 10px; }
  .model-trigger { width: 190px; min-height: 46px; grid-template-columns: 32px minmax(0, 1fr) 15px; gap: 8px; padding: 5px 8px 5px 5px; }
  .model-monogram { width: 32px; height: 32px; }
  .model-trigger-copy small, .model-speed { display: none; }
  .model-trigger-copy strong { font-size: 12px; }
  .model-menu { position: fixed; top: 62px; right: 10px; left: 10px; width: auto; }
  .model-menu > header { min-height: 62px; padding: 0 14px; }
  .model-option { min-height: 88px; padding: 12px 14px; }
  .model-menu > footer { padding: 11px 14px; }
  .welcome-state { align-items: start; padding: 32px 20px 30px; }
  .welcome-content { margin: 0; }
  .welcome-layout { grid-template-columns: 1fr; gap: 22px; }
  .welcome-content h1 { font-size: 44px; line-height: 0.98; }
  .welcome-copy > p:not(.welcome-status) { margin-top: 16px; font-size: 14px; }
  .active-model-panel { min-height: 0; padding: 14px; box-shadow: 10px 10px 0 rgba(6, 8, 9, 0.28); }
  .active-model-panel > header { padding-bottom: 10px; }
  .model-panel-identity { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 10px; padding-top: 11px; }
  .model-panel-identity strong { font-size: 21px; }
  .active-model-panel > p { margin: 7px 0 0; font-size: 10px; }
  .active-model-panel dl { display: none; }
  .active-model-panel > button { min-height: 32px; margin-top: 11px; }
  .prompt-heading { margin-top: 25px; }
  .prompt-heading small { display: none; }
  .prompt-grid { margin-top: 10px; }
  .prompt-grid button { min-height: 75px; }
  .message { grid-template-columns: 29px minmax(0, 1fr); gap: 11px; }
  .message-meta { flex-wrap: wrap; }
  .message-meta i { display: none; }
}

@media (max-width: 390px) {
  .model-trigger { width: 198px; }
  .credit-button { width: 66px; max-width: 66px; color: var(--paper-soft); font-size: 9px; }
  .credit-button::before { display: none; content: none; }
  .welcome-content h1 { font-size: 40px; }
}

/* International workspace controls and explicit account/model context. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.toolbar-language-select select,
.sidebar-language-select select {
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
  color: var(--paper-soft);
  font-size: 10px;
  font-weight: 800;
}

.toolbar-language-select {
  display: inline-flex;
  flex: 0 0 auto;
}

.toolbar-language-select select {
  width: 64px;
  min-height: 42px;
  padding: 0 8px;
}

.toolbar-language-select select:hover,
.sidebar-language-select select:hover {
  border-color: var(--accent);
  color: var(--paper);
}

.sidebar-language-select {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  margin-top: 5px;
  padding: 6px 9px 0;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar-language-select select {
  width: 116px;
  min-height: 34px;
  padding: 0 7px;
  text-transform: none;
}

.toolbar-account-status {
  position: relative;
  display: grid;
  width: 178px;
  min-height: 42px;
  flex: 0 0 auto;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid rgba(149, 169, 141, 0.34);
  background: rgba(149, 169, 141, 0.08);
  color: var(--paper-soft);
  text-align: left;
}

.toolbar-account-status:hover {
  border-color: rgba(149, 169, 141, 0.62);
  background: rgba(149, 169, 141, 0.13);
}

.toolbar-account-status > svg { width: 18px; height: 18px; color: var(--sage); }
.toolbar-account-status > span:not(.toolbar-account-live) { display: grid; min-width: 0; gap: 2px; }
.toolbar-account-status small { color: var(--sage); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.toolbar-account-status strong { overflow: hidden; color: var(--paper-soft); font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.toolbar-account-live { position: absolute; top: 6px; left: 27px; width: 5px; height: 5px; border: 1px solid var(--rail); border-radius: 50%; background: var(--sage); }

.model-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: -3px 0 12px;
  padding: 0;
  list-style: none;
}

.model-capabilities li {
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 4px 6px;
  color: var(--paper-soft);
  font-size: 8px;
  font-weight: 750;
  line-height: 1.2;
}

[dir="rtl"] .model-menu { right: 0; left: auto; }
[dir="rtl"] .model-trigger,
[dir="rtl"] .toolbar-account-status,
[dir="rtl"] .sidebar-tools button { text-align: right; }
[dir="rtl"] .toolbar-account-live { right: 27px; left: auto; }
[dir="rtl"] .model-trigger > svg,
[dir="rtl"] .prompt-grid button > svg,
[dir="rtl"] .drawer-action svg { transform: scaleX(-1); }
[dir="rtl"] .code-block,
[dir="rtl"] pre,
[dir="rtl"] code { direction: ltr; text-align: left; }

@media (max-width: 1300px) {
  .toolbar-account-status { width: 96px; }
  .toolbar-account-status strong { display: none; }
}

@media (max-width: 1120px) {
  .privacy-status { display: none; }
  .toolbar-account-status { width: 90px; }
}

@media (max-width: 900px) {
  .toolbar-language-select { display: inline-flex; }
  .toolbar-language-select select {
    width: 52px;
    min-width: 52px;
    padding-right: 6px;
    padding-left: 6px;
  }
  .toolbar-account-status { width: 42px; grid-template-columns: 1fr; place-items: center; padding: 0; }
  .toolbar-account-status > span:not(.toolbar-account-live) { display: none; }
  .toolbar-account-live { top: 7px; left: 25px; }
  [dir="rtl"] .toolbar-account-live { right: 25px; left: auto; }
}

@media (max-width: 720px) {
  .chat-toolbar { gap: 7px; }
  .model-trigger { width: clamp(150px, 45vw, 184px); }
  .toolbar-language-select select { width: 46px; min-width: 46px; padding-right: 4px; padding-left: 4px; }
  .toolbar-account-status { width: 38px; min-height: 42px; }
  .toolbar-account-status > svg { width: 17px; height: 17px; }
  .toolbar-account-live { left: 22px; }
  [dir="rtl"] .toolbar-account-live { right: 22px; left: auto; }
  .active-model-panel { min-height: 0; }
  .model-capabilities { margin-top: 10px; margin-bottom: 0; }
  .model-capabilities li { padding: 4px 5px; font-size: 7px; }
}

@media (max-width: 390px) {
  .chat-toolbar { gap: 6px; padding-right: 8px; padding-left: 8px; }
  .model-trigger { width: 128px; grid-template-columns: minmax(0, 1fr) 15px; gap: 6px; padding-right: 7px; padding-left: 7px; }
  .model-monogram { display: none; }
  .toolbar-language-select select { width: 42px; min-width: 42px; padding-right: 3px; padding-left: 3px; }
  .toolbar-account-status { width: 34px; }
  .credit-button { width: 48px; max-width: 48px; padding-right: 4px; padding-left: 4px; }
  .welcome-content h1 { font-size: 38px; }
}
