:root {
  color-scheme: light;
  --canvas: #f7f6f2;
  --sidebar: #eeece6;
  --surface: #fffefa;
  --surface-strong: #ffffff;
  --ink: #24231f;
  --muted: #747168;
  --faint: #9b978d;
  --line: #dfdcd3;
  --line-soft: #eae7df;
  --accent: #d86443;
  --accent-dark: #b64d30;
  --accent-soft: #f6e6df;
  --danger: #b34539;
  --shadow: 0 18px 60px rgba(47, 42, 33, 0.1);
  --sidebar-width: 282px;
  --topbar-height: 72px;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--canvas);
  color: var(--ink);
  overflow: hidden;
}

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

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

button:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(216, 100, 67, 0.25);
  outline-offset: 2px;
}

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

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  height: 100dvh;
}

.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px 12px 12px;
  position: relative;
  z-index: 20;
}

.brand-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 2px 6px;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 20px;
  font-weight: 700;
  gap: 10px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark,
.dialog-mark {
  align-items: center;
  background: var(--accent);
  border-radius: 9px;
  color: #fff;
  display: inline-flex;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  font-weight: 700;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.new-chat-button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 1px 1px rgba(55, 48, 38, 0.03);
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 650;
  gap: 10px;
  padding: 10px 11px;
  text-align: left;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
  width: 100%;
}

.new-chat-button:hover {
  background: #fff;
  border-color: #cbc7bc;
  transform: translateY(-1px);
}

.new-chat-button svg {
  height: 18px;
  width: 18px;
}

.new-chat-button span {
  flex: 1;
}

kbd {
  background: #f3f1eb;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--faint);
  font-family: inherit;
  font-size: 10px;
  padding: 2px 5px;
}

.history-heading {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 11px;
  font-weight: 700;
  justify-content: space-between;
  letter-spacing: 0.08em;
  margin: 22px 8px 8px;
  text-transform: uppercase;
}

.history-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-color: #cac6bc transparent;
  scrollbar-width: thin;
}

.history-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  text-align: left;
  transition: background 120ms ease;
  width: 100%;
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.55);
}

.history-item.active {
  background: var(--surface);
  box-shadow: inset 3px 0 0 var(--accent);
}

.history-item svg {
  color: var(--faint);
  flex: 0 0 auto;
  height: 15px;
  width: 15px;
}

.history-item-copy {
  min-width: 0;
}

.history-item strong,
.history-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item strong {
  font-size: 13px;
  font-weight: 560;
}

.history-item small {
  color: var(--faint);
  font-size: 10px;
  margin-top: 2px;
}

.history-empty {
  color: var(--faint);
  font-size: 12px;
  line-height: 1.5;
  margin: 20px 10px;
}

.sidebar-footer {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 10px;
}

.profile-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  padding: 8px;
  text-align: left;
  width: 100%;
}

.profile-button:hover {
  background: rgba(255, 255, 255, 0.55);
}

.profile-button > svg {
  color: var(--faint);
  height: 15px;
  width: 15px;
}

.avatar {
  align-items: center;
  background: #30302d;
  border-radius: 50%;
  color: #fff;
  display: flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  height: 31px;
  justify-content: center;
  text-transform: uppercase;
  width: 31px;
}

.profile-copy {
  flex: 1;
  min-width: 0;
}

.profile-copy strong,
.profile-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy strong {
  font-size: 12px;
  font-weight: 650;
  text-transform: capitalize;
}

.profile-copy small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}

.workspace {
  display: grid;
  grid-template-rows: var(--topbar-height) minmax(0, 1fr) auto;
  height: 100dvh;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.topbar {
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(247, 246, 242, 0.91);
  border-bottom: 1px solid rgba(223, 220, 211, 0.8);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 9px 22px;
  position: relative;
  z-index: 10;
}

.topbar-left {
  align-items: center;
  display: flex;
  gap: 18px;
  min-width: 0;
}

.model-control label {
  color: var(--faint);
  display: block;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.1em;
  margin: 0 0 3px 2px;
  text-transform: uppercase;
}

.select-wrap {
  align-items: center;
  display: flex;
  position: relative;
}

.select-wrap select {
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 680;
  min-width: 190px;
  padding: 3px 28px 3px 20px;
}

.select-wrap svg {
  height: 15px;
  pointer-events: none;
  position: absolute;
  right: 5px;
  width: 15px;
}

.provider-dot {
  background: var(--accent);
  border-radius: 50%;
  height: 8px;
  left: 4px;
  position: absolute;
  width: 8px;
  z-index: 1;
}

.provider-dot.openai {
  background: #171716;
}

.provider-dot.anthropic {
  background: #d86443;
}

.provider-dot.xai {
  background: #5b6c86;
}

.model-summary {
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  margin: 0;
  max-width: 380px;
  overflow: hidden;
  padding-left: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-actions {
  align-items: center;
  display: flex;
  gap: 3px;
}

.conversation-actions[hidden] {
  display: none;
}

.icon-button,
.text-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  min-height: 34px;
  transition:
    background 120ms ease,
    color 120ms ease;
}

.icon-button {
  min-width: 34px;
  padding: 7px;
}

.icon-button.small {
  min-height: 28px;
  min-width: 28px;
  padding: 6px;
}

.icon-button svg {
  height: 18px;
  width: 18px;
}

.icon-button.small svg {
  height: 14px;
  width: 14px;
}

.text-button {
  font-size: 12px;
  font-weight: 600;
  padding: 7px 10px;
}

.icon-button:hover,
.text-button:hover {
  background: var(--surface);
  color: var(--ink);
}

.icon-button.danger:hover {
  background: #f8e7e4;
  color: var(--danger);
}

.chat-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.empty-state {
  align-items: center;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  max-width: 790px;
  min-height: 100%;
  padding: clamp(50px, 9vh, 120px) 24px 48px;
  text-align: center;
}

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

.empty-mark {
  align-items: center;
  background: var(--accent-soft);
  border: 1px solid #ebcdbf;
  border-radius: 19px;
  display: flex;
  height: 62px;
  justify-content: center;
  margin-bottom: 22px;
  transform: rotate(-3deg);
  width: 62px;
}

.empty-mark span {
  color: var(--accent-dark);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 34px;
  font-weight: 700;
  transform: rotate(3deg);
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.15em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.empty-state h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(32px, 4.2vw, 48px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0;
}

.empty-intro {
  color: var(--muted);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  line-height: 1.55;
  margin: 16px auto 34px;
  max-width: 560px;
}

.suggestion-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.suggestion {
  align-items: center;
  background: rgba(255, 254, 250, 0.72);
  border: 1px solid var(--line);
  border-radius: 13px;
  cursor: pointer;
  display: flex;
  gap: 13px;
  min-height: 74px;
  padding: 13px 15px;
  text-align: left;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.suggestion:hover {
  background: var(--surface-strong);
  border-color: #cec9bd;
  transform: translateY(-2px);
}

.suggestion-icon {
  align-items: center;
  background: #f1eee6;
  border-radius: 9px;
  color: var(--accent-dark);
  display: flex;
  flex: 0 0 auto;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 13px;
  font-weight: 700;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.suggestion strong,
.suggestion small {
  display: block;
}

.suggestion strong {
  font-size: 13px;
  font-weight: 650;
}

.suggestion small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}

.message-list {
  margin: 0 auto;
  max-width: 820px;
  padding: 34px 28px 54px;
  width: 100%;
}

.message {
  display: grid;
  gap: 10px;
  grid-template-columns: 34px minmax(0, 1fr);
  margin-bottom: 34px;
}

.message-avatar {
  align-items: center;
  background: #30302d;
  border-radius: 9px;
  color: #fff;
  display: flex;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px;
  font-weight: 700;
  height: 31px;
  justify-content: center;
  margin-top: 1px;
  width: 31px;
}

.message.user .message-avatar {
  background: #dad6cc;
  color: #57534b;
  font-family: inherit;
  font-size: 11px;
}

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

.message-header {
  align-items: center;
  display: flex;
  gap: 8px;
  min-height: 24px;
}

.message-header strong {
  font-size: 13px;
  font-weight: 700;
}

.message-header span {
  color: var(--faint);
  font-size: 10px;
}

.message-copy {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.message-copy p {
  margin: 6px 0 14px;
}

.message-copy p:last-child {
  margin-bottom: 0;
}

.message-copy pre {
  background: #292a28;
  border: 1px solid #3d3e3b;
  border-radius: 11px;
  color: #eeece5;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  margin: 14px 0;
  overflow-x: auto;
  padding: 16px;
  white-space: pre;
}

.message-copy code:not(pre code) {
  background: #ece9e1;
  border-radius: 4px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.86em;
  padding: 2px 5px;
}

.message-footer {
  align-items: center;
  color: var(--faint);
  display: flex;
  font-size: 10px;
  gap: 8px;
  margin-top: 9px;
  min-height: 24px;
}

.message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.message-attachments span {
  background: var(--sidebar);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 10px;
  padding: 6px 8px;
}

.comparison-section {
  margin: -6px 0 34px;
}

.comparison-heading {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  margin: 0 0 9px;
  text-transform: uppercase;
}

.comparison-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr));
}

.message.comparison-card {
  background: rgba(255, 254, 250, 0.8);
  border: 1px solid var(--line);
  border-radius: 13px;
  display: block;
  margin: 0;
  min-width: 0;
  padding: 14px;
}

.comparison-card .message-avatar {
  display: none;
}

.comparison-card .message-copy {
  font-size: 14px;
  line-height: 1.6;
}

.comparison-card .message-footer {
  align-items: flex-start;
  flex-wrap: wrap;
}

.copy-message {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
  padding: 4px 7px;
}

.copy-message:hover {
  background: var(--sidebar);
  color: var(--ink);
}

.thinking {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px;
  gap: 8px;
  margin-top: 7px;
}

.thinking-dots {
  display: inline-flex;
  gap: 3px;
}

.thinking-dots i {
  animation: pulse 1.25s infinite ease-in-out;
  background: var(--accent);
  border-radius: 50%;
  height: 5px;
  opacity: 0.35;
  width: 5px;
}

.thinking-dots i:nth-child(2) {
  animation-delay: 140ms;
}

.thinking-dots i:nth-child(3) {
  animation-delay: 280ms;
}

@keyframes pulse {
  0%,
  60%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.composer-area {
  background: linear-gradient(180deg, rgba(247, 246, 242, 0), var(--canvas) 22%);
  padding: 20px 24px 12px;
}

.composer {
  background: var(--surface-strong);
  border: 1px solid #d6d2c8;
  border-radius: 17px;
  box-shadow: 0 5px 24px rgba(54, 49, 40, 0.08);
  margin: 0 auto;
  max-width: 820px;
  padding: 10px 10px 9px 15px;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.attachment-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 1px 3px 9px;
}

.attachment-strip[hidden] {
  display: none;
}

.attachment-chip {
  align-items: center;
  background: var(--sidebar);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  flex: 0 0 auto;
  gap: 7px;
  grid-template-columns: 32px minmax(70px, 130px) 20px;
  max-width: 205px;
  padding: 5px;
}

.attachment-chip img,
.attachment-icon {
  align-items: center;
  background: #ddd9cf;
  border-radius: 6px;
  display: flex;
  font-size: 8px;
  font-weight: 750;
  height: 32px;
  justify-content: center;
  object-fit: cover;
  width: 32px;
}

.attachment-chip strong,
.attachment-chip small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip strong {
  font-size: 10px;
}

.attachment-chip small {
  color: var(--faint);
  font-size: 8px;
  margin-top: 2px;
}

.attachment-chip button {
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  cursor: pointer;
  font-size: 17px;
  height: 20px;
  line-height: 1;
  padding: 0;
  width: 20px;
}

.attachment-chip button:hover {
  background: #d9d5cb;
}

.composer:focus-within {
  border-color: #bcb6aa;
  box-shadow: 0 8px 32px rgba(54, 49, 40, 0.12);
}

.composer textarea {
  background: transparent;
  border: 0;
  display: block;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  line-height: 1.5;
  max-height: 190px;
  min-height: 30px;
  outline: 0;
  overflow-y: auto;
  padding: 4px 4px 2px;
  resize: none;
  width: 100%;
}

.composer textarea::placeholder {
  color: #aaa69e;
}

.composer-footer {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  min-height: 38px;
}

.composer-left {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px 10px;
  min-width: 0;
}

.composer-tool {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 10px;
  font-weight: 680;
  gap: 4px;
  height: 30px;
  justify-content: center;
  padding: 0 7px;
}

.composer-tool:hover,
.composer-tool.active {
  background: var(--sidebar);
  border-color: var(--line);
  color: var(--ink);
}

.composer-tool:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.composer-tool.active {
  color: var(--accent-dark);
}

.dictate-button.active {
  color: var(--danger);
}

.dictate-button[hidden] {
  display: none;
}

.dictate-button.active svg {
  animation: listening-pulse 1.2s ease-in-out infinite;
}

@keyframes listening-pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.composer-tool svg {
  height: 16px;
  width: 16px;
}

.response-control {
  align-items: center;
  background: var(--sidebar);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  gap: 5px;
  padding: 4px 7px;
}

.response-control span {
  color: var(--faint);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.response-control select {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 680;
  max-width: 145px;
  outline: 0;
}

.composer-meta {
  color: var(--faint);
  display: flex;
  font-size: 9px;
  gap: 6px;
  padding: 0 5px;
}

.send-button {
  align-items: center;
  background: var(--ink);
  border: 0;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  display: flex;
  height: 36px;
  justify-content: center;
  transition:
    background 120ms ease,
    transform 120ms ease;
  width: 36px;
}

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

.send-button:disabled {
  background: #d2cec4;
  cursor: default;
}

.send-button svg {
  height: 18px;
  width: 18px;
}

.disclaimer {
  color: var(--faint);
  font-size: 9px;
  margin: 7px 0 0;
  text-align: center;
}

.profile-dialog {
  background: transparent;
  border: 0;
  max-width: 430px;
  padding: 18px;
  width: calc(100% - 28px);
}

.action-dialog {
  background: transparent;
  border: 0;
  max-width: 430px;
  padding: 18px;
  width: calc(100% - 28px);
}

.action-dialog::backdrop {
  backdrop-filter: blur(5px);
  background: rgba(38, 36, 31, 0.42);
}

.action-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 25px;
}

.action-card h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
}

.action-card > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 8px 0 20px;
}

.compare-dialog {
  max-width: 510px;
}

.compare-primary {
  background: var(--accent-soft);
  border: 1px solid #ead1c7;
  border-radius: 9px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
  padding: 9px 10px;
}

.compare-options {
  display: grid;
  gap: 6px;
  max-height: min(360px, 48vh);
  overflow-y: auto;
}

.compare-option {
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  padding: 9px 10px;
}

.compare-option:hover {
  background: #faf8f3;
}

.compare-option input {
  accent-color: var(--accent);
}

.compare-option strong,
.compare-option small {
  display: block;
}

.compare-option strong {
  font-size: 12px;
}

.compare-option small {
  color: var(--faint);
  font-size: 9px;
  margin-top: 2px;
}

.action-card .compare-note {
  color: var(--faint);
  font-size: 9px;
  margin: 10px 0 0;
}

.action-input-wrap span {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.action-input-wrap input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  padding: 10px 11px;
  width: 100%;
}

.action-input-wrap[hidden] {
  display: none;
}

.action-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 22px;
}

.secondary-button,
.primary-button {
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  padding: 9px 14px;
}

.secondary-button {
  background: var(--surface);
}

.primary-button {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.primary-button.danger {
  background: var(--danger);
  border-color: var(--danger);
}

.profile-dialog::backdrop {
  backdrop-filter: blur(7px);
  background: rgba(38, 36, 31, 0.48);
}

.dialog-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 34px;
  position: relative;
  text-align: center;
}

.dialog-close-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  height: 36px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 36px;
}

.dialog-close-button[hidden] {
  display: none;
}

.dialog-close-button:hover {
  background: #f1eee7;
  color: var(--ink);
}

.dialog-close-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.dialog-close-button svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
  width: 18px;
}

.dialog-mark {
  height: 46px;
  margin: 0 auto 20px;
  width: 46px;
}

.dialog-card h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 0;
}

.dialog-card > p:not(.eyebrow):not(.dialog-note) {
  color: var(--muted);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px;
  line-height: 1.5;
  margin: 10px 0 23px;
}

.profile-options {
  display: grid;
  gap: 8px;
}

.profile-option {
  align-items: center;
  background: #f5f3ed;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 650;
  gap: 11px;
  padding: 10px 12px;
  text-align: left;
  text-transform: capitalize;
}

.profile-option:hover {
  background: #fff;
  border-color: #c9c4b8;
}

.profile-option .avatar {
  height: 30px;
  width: 30px;
}

.dialog-note {
  color: var(--faint);
  font-size: 9px;
  line-height: 1.5;
  margin: 20px 0 0;
}

.menu {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(45, 40, 31, 0.15);
  min-width: 175px;
  padding: 5px;
  position: fixed;
  right: 18px;
  top: 60px;
  z-index: 30;
}

.menu[hidden] {
  display: none;
}

.menu button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  display: block;
  font-size: 12px;
  padding: 9px 10px;
  text-align: left;
  width: 100%;
}

.menu button:hover {
  background: var(--sidebar);
}

.toast {
  background: #302f2b;
  border-radius: 9px;
  bottom: 22px;
  color: #fff;
  font-size: 12px;
  left: 50%;
  opacity: 0;
  padding: 10px 14px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 10px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  z-index: 50;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.error {
  background: var(--danger);
}

.sidebar-scrim,
.mobile-only {
  display: none;
}

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

  .sidebar {
    bottom: 0;
    box-shadow: 12px 0 44px rgba(39, 35, 29, 0.16);
    left: 0;
    position: fixed;
    top: 0;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    width: min(var(--sidebar-width), 88vw);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-scrim {
    background: rgba(41, 38, 32, 0.35);
    border: 0;
    bottom: 0;
    left: 0;
    opacity: 0;
    position: fixed;
    right: 0;
    top: 0;
    transition: opacity 180ms ease;
    z-index: 15;
  }

  .sidebar-scrim.visible {
    display: block;
    opacity: 1;
  }

  .mobile-only {
    display: inline-flex;
  }

  .workspace {
    height: 100dvh;
  }

  .topbar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .model-summary {
    display: none;
  }

  .select-wrap select {
    min-width: min(44vw, 210px);
  }
}

@media (max-width: 620px) {
  :root {
    --topbar-height: 62px;
  }

  .topbar {
    gap: 6px;
  }

  .topbar-left {
    gap: 4px;
  }

  .model-control label {
    display: none;
  }

  .select-wrap select {
    font-size: 13px;
    min-width: 0;
    width: 154px;
  }

  .text-button {
    display: none;
  }

  .empty-state {
    justify-content: center;
    padding: 30px 18px;
  }

  .empty-mark {
    height: 52px;
    margin-bottom: 17px;
    width: 52px;
  }

  .empty-mark span {
    font-size: 28px;
  }

  .empty-state h1 {
    font-size: 32px;
  }

  .empty-intro {
    font-size: 14px;
    margin: 12px 0 24px;
  }

  .suggestion-grid {
    grid-template-columns: 1fr;
  }

  .suggestion:nth-child(n + 3) {
    display: none;
  }

  .suggestion {
    min-height: 64px;
  }

  .message-list {
    padding: 24px 17px 38px;
  }

  .message {
    gap: 8px;
    grid-template-columns: 29px minmax(0, 1fr);
    margin-bottom: 28px;
  }

  .message-avatar {
    border-radius: 8px;
    height: 27px;
    width: 27px;
  }

  .message-copy {
    font-size: 15px;
  }

  .composer-area {
    padding: 16px 10px 8px;
  }

  .composer {
    border-radius: 15px;
  }

  .composer-meta {
    max-width: calc(100vw - 90px);
    overflow: hidden;
    white-space: nowrap;
  }

  #costIndicator,
  .composer-meta .meta-separator,
  #characterCount {
    display: none;
  }

  .response-control span {
    display: none;
  }

  .dialog-card {
    padding: 28px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .dictate-button.active svg {
    animation: none;
  }
}
