:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f2f2f2;
  --composer: #f1f1f1;
  --border: #e7e7e7;
  --text: #050505;
  --muted: #8d8d8d;
  --blue: #2f80ed;
  --danger: #b3261e;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

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

:focus-visible {
  outline: 3px solid rgba(47, 128, 237, 0.28);
  outline-offset: 3px;
}

.login-view {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: var(--bg);
}

.login-form {
  width: min(360px, 100%);
  display: grid;
  gap: 12px;
}

.login-title {
  font-size: 34px;
  line-height: 1;
  font-weight: 750;
}

.login-form p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.35;
}

.field-label {
  margin: 2px 0 -6px;
  color: #555555;
  font-size: 13px;
  font-weight: 650;
}

.login-form input {
  min-height: 48px;
  border: 0;
  border-radius: 18px;
  padding: 0 18px;
  color: var(--text);
  background: var(--surface-alt);
}

.login-form button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: #ffffff;
  font-weight: 700;
}

.login-form .secondary-button {
  background: var(--surface-alt);
  color: var(--text);
}

.login-form .text-button {
  min-height: 34px;
  border-radius: 0;
  padding: 0 8px;
  background: transparent;
  color: var(--text);
  font-weight: 650;
}

.login-form .text-button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-error {
  min-height: 22px;
  color: var(--danger);
}

.login-error.success {
  color: var(--muted);
}

.app-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100dvh;
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 40px auto minmax(0, 1fr) 40px;
  align-items: center;
  gap: 4px;
  min-height: 54px;
  padding: max(6px, env(safe-area-inset-top)) 10px 5px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 0;
  display: grid;
  place-items: center;
}

.icon-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-button {
  gap: 5px;
}

.menu-button span {
  width: 21px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mode-control {
  position: relative;
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  width: max-content;
  min-width: 0;
}

#modeSelect {
  appearance: none;
  width: auto;
  max-width: 104px;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 18px;
  font-weight: 560;
  padding: 0 17px 0 0;
}

.mode-chevron {
  position: absolute;
  right: 0;
  color: #8b8b8b;
  font-size: 25px;
  line-height: 1;
  pointer-events: none;
}

.thread-title {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.messages {
  overflow-y: auto;
  padding: 6px 14px 88px;
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.notification-prompt {
  position: fixed;
  left: 50%;
  bottom: max(70px, calc(env(safe-area-inset-bottom) + 58px));
  z-index: 9;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 16px;
  transform: translateX(-50%);
  background: #000000;
  color: #ffffff;
  font-size: 14px;
  font-weight: 650;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.quota-prompt {
  position: fixed;
  left: 50%;
  bottom: max(70px, calc(env(safe-area-inset-bottom) + 58px));
  z-index: 9;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0 17px;
  transform: translateX(-50%);
  background: #000000;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.empty-state {
  max-width: 280px;
  margin: 24vh auto 0;
  color: var(--muted);
  text-align: center;
  line-height: 1.35;
  font-size: 15px;
}

.message-row {
  display: flex;
  margin: 0 0 14px;
}

.message-row.user {
  justify-content: flex-end;
}

.message {
  width: fit-content;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-size: 17px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-row.user .message {
  max-width: 86%;
  padding: 7px 11px;
  border-radius: 16px;
  background: var(--surface-alt);
  line-height: 1.35;
}

.message-row.status .message {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.markdown-message {
  display: grid;
  gap: 10px;
  white-space: normal;
}

.markdown-message > * {
  margin: 0;
}

.markdown-message h2,
.markdown-message h3,
.markdown-message h4 {
  margin: 10px 0 0;
  line-height: 1.18;
  font-weight: 760;
}

.markdown-message h2:first-child,
.markdown-message h3:first-child,
.markdown-message h4:first-child {
  margin-top: 0;
}

.markdown-message h2 {
  font-size: 20px;
}

.markdown-message h3 {
  font-size: 18px;
}

.markdown-message h4 {
  font-size: 17px;
}

.markdown-message p {
  margin: 0;
}

.markdown-message ul,
.markdown-message ol {
  padding-left: 22px;
  display: grid;
  gap: 6px;
}

.markdown-message li {
  padding-left: 2px;
}

.markdown-message strong {
  font-weight: 760;
}

.markdown-message a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.markdown-message code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-alt);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
}

.markdown-message pre {
  overflow-x: auto;
  max-width: 100%;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--surface-alt);
  font-size: 13px;
  line-height: 1.45;
  -webkit-overflow-scrolling: touch;
}

.markdown-message pre code {
  display: block;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: inherit;
  white-space: pre;
}

.markdown-message blockquote {
  padding-left: 12px;
  border-left: 2px solid var(--border);
  color: #505050;
}

.markdown-message blockquote p + p {
  margin-top: 8px;
}

.live-plan {
  max-width: 100%;
  padding: 1px 0 1px 10px;
  border-left: 2px solid var(--border);
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.live-plan-title {
  margin: 0 0 5px;
  color: var(--muted);
}

.live-thinking-motion {
  width: fit-content;
  max-width: 100%;
  margin: 0 0 7px;
  color: var(--muted);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .live-thinking-motion {
    color: var(--muted);
    background: linear-gradient(100deg, var(--muted) 0%, #c7c7c7 42%, var(--muted) 72%);
    background-size: 260% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: thinkingTextSweep 3.8s linear infinite;
  }
}

.live-plan ol {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.live-plan li {
  padding-left: 2px;
}

@keyframes thinkingTextSweep {
  from {
    background-position: 180% 0;
  }
  to {
    background-position: -80% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-thinking-motion {
    animation: none;
    background: none;
    -webkit-text-fill-color: currentColor;
  }
}

.composer {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 8;
  width: min(760px, 100%);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: end;
  gap: 6px;
  padding: 7px 12px max(11px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, #ffffff 78%, rgba(255, 255, 255, 0));
}

.composer.pending {
  filter: grayscale(0.1);
}

.composer-plus,
#sendButton {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  display: grid;
  place-items: center;
}

.composer-plus {
  background: var(--surface-alt);
  color: #555555;
  font-size: 31px;
  font-weight: 300;
  line-height: 1;
}

.composer-field {
  min-height: 44px;
  display: grid;
  grid-template-columns: 1fr 34px;
  align-items: end;
  gap: 4px;
  border-radius: 999px;
  background: var(--composer);
  padding: 0 6px 0 14px;
}

#messageInput {
  min-height: 44px;
  max-height: 120px;
  resize: none;
  border: 0;
  padding: 10px 0 9px;
  color: var(--text);
  background: transparent;
  font-size: 16px;
  line-height: 1.25;
}

#messageInput::placeholder {
  color: #8c8c8c;
}

.mic-button {
  width: 34px;
  height: 44px;
  min-width: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #7e7e7e;
  padding: 0;
  display: grid;
  place-items: center;
}

.mic-button.listening {
  color: var(--blue);
}

.mic-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#sendButton {
  background: #000000;
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.send-arrow {
  transform: translateY(-2px);
}

.sheet-backdrop {
  display: none;
}

.thread-sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr auto;
  gap: 9px;
  padding: max(54px, calc(env(safe-area-inset-top) + 40px)) 10px max(18px, env(safe-area-inset-bottom));
  background: var(--surface);
  transform: translateX(-100%);
  transition: transform 190ms ease;
}

.account-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  margin: 0 12px;
  padding: 8px 10px;
  border-radius: 14px;
  background: var(--surface-alt);
}

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

.account-plan {
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 750;
}

.account-quota {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-action {
  min-width: 76px;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: #000000;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.account-row.menu-open .account-action {
  visibility: hidden;
}

.thread-sheet.open {
  transform: translateX(0);
}

.sheet-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px;
  padding: 0 12px;
}

.sheet-kicker {
  height: 15px;
  color: rgba(0, 0, 0, 0.06);
  font-size: 15px;
  line-height: 1;
}

.sheet-title {
  color: var(--text);
  font-size: 28px;
  line-height: 1.05;
  font-weight: 800;
}

.sheet-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 2px;
}

.home-search {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 0;
}

.home-search.active {
  background: var(--surface-alt);
}

.home-search svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.avatar-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #eda734;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
}

.account-menu {
  position: absolute;
  top: 48px;
  right: 0;
  z-index: 3;
  display: grid;
  min-width: 118px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.account-menu button {
  min-height: 44px;
  border: 0;
  background: var(--surface);
  color: var(--text);
  padding: 0 15px;
  text-align: left;
  font-size: 15px;
}

.account-menu button:last-child {
  color: var(--danger);
}

.thread-search {
  padding: 0 12px;
}

.thread-search input {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  padding: 0 13px;
  background: var(--surface-alt);
  color: var(--text);
  font-size: 16px;
}

.thread-search input::placeholder {
  color: var(--muted);
}

.recents-title {
  padding: 0 12px;
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
}

.thread-list {
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 4px 12px 84px;
  -webkit-overflow-scrolling: touch;
}

.thread-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px;
}

.thread-item {
  min-width: 0;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  padding: 0 12px;
  text-align: left;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
}

.thread-item.active {
  background: var(--surface-alt);
}

.thread-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 19px;
  line-height: 1.15;
  font-weight: 400;
}

.thread-count {
  display: none;
}

.thread-menu-button {
  width: 40px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #777777;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.thread-empty {
  padding: 18px 12px;
  color: var(--muted);
  font-size: 15px;
}

.thread-menu {
  position: absolute;
  top: 44px;
  right: 4px;
  z-index: 2;
  display: grid;
  min-width: 150px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

.thread-menu button {
  min-height: 46px;
  border: 0;
  background: var(--surface);
  color: var(--text);
  padding: 0 14px;
  text-align: left;
}

.thread-menu button.danger {
  color: var(--danger);
}

.new-thread-button {
  position: fixed;
  right: 20px;
  bottom: max(22px, calc(env(safe-area-inset-bottom) + 12px));
  min-width: 116px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: #000000;
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
  font-size: 18px;
  font-weight: 800;
}

.new-thread-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.plan-backdrop,
.settings-backdrop {
  position: fixed;
  inset: 0;
  z-index: 24;
  background: rgba(0, 0, 0, 0.16);
}

.plan-sheet,
.settings-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 25;
  width: min(430px, 100%);
  padding: 14px 14px max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  border-radius: 22px 22px 0 0;
  background: var(--surface);
  box-shadow: 0 -18px 42px rgba(0, 0, 0, 0.18);
}

.plan-sheet-header,
.settings-header {
  display: grid;
  grid-template-columns: 1fr 42px;
  align-items: start;
  gap: 10px;
  margin-bottom: 10px;
}

.plan-sheet-title,
.settings-title {
  font-size: 21px;
  line-height: 1.1;
  font-weight: 800;
}

.plan-sheet-copy,
.settings-copy {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.plan-close,
.settings-close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.plan-list,
.settings-list {
  display: grid;
  gap: 8px;
}

.settings-card {
  display: grid;
  gap: 6px;
  min-height: 58px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 13px;
  background: var(--surface);
}

.settings-label {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
}

.settings-value {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 17px;
  line-height: 1.25;
  font-weight: 760;
}

.settings-subvalue {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.settings-input {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  padding: 0 14px;
  background: var(--surface-alt);
  color: var(--text);
  font-size: 16px;
}

.settings-action {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: #000000;
  color: #ffffff;
  font-size: 15px;
  font-weight: 750;
}

.settings-action.secondary {
  background: var(--surface-alt);
  color: var(--text);
}

.settings-action.danger {
  background: #fff0f0;
  color: var(--danger);
}

.danger-zone {
  gap: 8px;
}

.plan-card {
  width: 100%;
  min-height: 68px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 11px 13px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.plan-card:disabled {
  opacity: 0.5;
}

.plan-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 17px;
  font-weight: 760;
}

.plan-card-top strong {
  font-size: 16px;
}

.plan-card-details {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.plan-restore {
  width: 100%;
  margin-top: 8px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
}

@media (min-width: 760px) {
  .app-shell,
  .composer {
    max-width: 760px;
    border-inline: 1px solid var(--border);
  }

  .thread-sheet {
    width: 760px;
    left: 50%;
    right: auto;
    transform: translateX(calc(-50% - 100%));
    border-inline: 1px solid var(--border);
  }

  .thread-sheet.open {
    transform: translateX(-50%);
  }
}

@media (min-width: 900px) {
  :root {
    --desktop-sidebar: 304px;
    --desktop-chat-max: 820px;
  }

  body.desktop-layout {
    overflow: hidden;
    background: #f7f7f5;
  }

  body.desktop-layout .app-shell {
    width: calc(100vw - var(--desktop-sidebar));
    max-width: none;
    margin: 0 0 0 var(--desktop-sidebar);
    border-inline: 0;
    background: var(--surface);
  }

  body.desktop-layout .top-bar {
    grid-template-columns: auto minmax(160px, 1fr);
    min-height: 64px;
    padding-block: 12px;
    padding-inline: 28px;
    background: rgba(255, 255, 255, 0.985);
  }

  body.desktop-layout .menu-button {
    display: none;
  }

  body.desktop-layout #newChatTopButton {
    display: none;
  }

  body.desktop-layout #modeSelect {
    max-width: 118px;
    min-height: 40px;
    font-size: 17px;
  }

  body.desktop-layout .thread-title {
    color: #535353;
    font-size: 14px;
  }

  body.desktop-layout .messages {
    width: min(var(--desktop-chat-max), 100%);
    margin: 0 auto;
    padding: 26px 34px 128px;
  }

  body.desktop-layout .message-row {
    margin-bottom: 16px;
  }

  body.desktop-layout .message {
    font-size: 16px;
    line-height: 1.55;
  }

  body.desktop-layout .message-row.user .message {
    max-width: min(70%, 620px);
    padding: 8px 12px;
    border-radius: 14px;
  }

  body.desktop-layout .markdown-message {
    gap: 11px;
  }

  body.desktop-layout .empty-state {
    margin-top: 28vh;
  }

  body.desktop-layout .composer {
    left: calc(var(--desktop-sidebar) + ((100vw - var(--desktop-sidebar)) / 2));
    width: min(var(--desktop-chat-max), calc(100vw - var(--desktop-sidebar) - 64px));
    max-width: var(--desktop-chat-max);
    padding: 12px 0 22px;
    border-inline: 0;
    background: linear-gradient(to top, #ffffff 82%, rgba(255, 255, 255, 0));
  }

  body.desktop-layout .composer-field {
    border-radius: 20px;
  }

  body.desktop-layout .thread-sheet {
    inset: 0 auto 0 0;
    z-index: 10;
    width: var(--desktop-sidebar);
    height: 100dvh;
    padding: 18px 12px;
    gap: 8px;
    transform: none;
    transition: none;
    border-right: 1px solid var(--border);
    border-inline: 0;
    background: #fbfbfa;
  }

  body.desktop-layout .thread-sheet.open {
    transform: none;
  }

  body.desktop-layout .sheet-header {
    padding: 0 8px;
    align-items: center;
  }

  body.desktop-layout .sheet-kicker {
    display: none;
  }

  body.desktop-layout .sheet-title {
    font-size: 23px;
  }

  body.desktop-layout .sheet-actions {
    gap: 5px;
  }

  body.desktop-layout .home-search,
  body.desktop-layout .avatar-button {
    width: 36px;
    height: 36px;
  }

  body.desktop-layout .home-search svg {
    width: 24px;
    height: 24px;
  }

  body.desktop-layout .avatar-button {
    font-size: 13px;
  }

  body.desktop-layout .thread-search {
    padding: 0 8px;
  }

  body.desktop-layout .thread-search input {
    min-height: 38px;
    border-radius: 10px;
    font-size: 14px;
  }

  body.desktop-layout .account-row {
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin: 0 8px;
    padding: 9px;
    border-radius: 10px;
  }

  body.desktop-layout .account-copy {
    grid-column: 1 / -1;
  }

  body.desktop-layout .account-plan {
    font-size: 14px;
  }

  body.desktop-layout .account-quota {
    white-space: normal;
  }

  body.desktop-layout .account-action {
    min-width: 0;
    min-height: 34px;
    border-radius: 9px;
    padding: 0 12px;
    font-size: 13px;
  }

  body.desktop-layout .recents-title {
    padding: 5px 8px 0;
    font-size: 17px;
  }

  body.desktop-layout .thread-list {
    gap: 2px;
    padding: 0 6px 8px;
  }

  body.desktop-layout .thread-row {
    gap: 0;
  }

  body.desktop-layout .thread-item {
    min-height: 38px;
    border-radius: 9px;
    padding: 0 10px;
  }

  body.desktop-layout .thread-name {
    font-size: 14px;
    line-height: 1.2;
  }

  body.desktop-layout .thread-menu-button {
    width: 34px;
    height: 38px;
    font-size: 16px;
  }

  body.desktop-layout .thread-menu {
    top: 36px;
    right: 0;
    border-radius: 10px;
  }

  body.desktop-layout .new-thread-button {
    position: static;
    width: auto;
    min-width: 0;
    height: 42px;
    margin: 0 8px;
    border-radius: 11px;
    box-shadow: none;
    font-size: 15px;
  }

  body.desktop-layout .new-thread-button svg {
    width: 19px;
    height: 19px;
  }

  body.desktop-layout .notification-prompt,
  body.desktop-layout .quota-prompt {
    left: calc(var(--desktop-sidebar) + ((100vw - var(--desktop-sidebar)) / 2));
  }

  body.desktop-layout .plan-sheet,
  body.desktop-layout .settings-sheet {
    top: 50%;
    bottom: auto;
    width: min(520px, calc(100vw - var(--desktop-sidebar) - 48px));
    padding: 18px;
    transform: translate(-50%, -50%);
    border-radius: 16px;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
  }

  body.desktop-layout .plan-card {
    border-radius: 11px;
  }

  body.desktop-layout .settings-card {
    border-radius: 11px;
  }
}
