:root {
  --bg: #202123;
  --bg2: #151515;
  --panel: #171717;
  --panel2: #1f1f1f;
  --modal-surface: #1e1e1e;
  --card: #2a2a2a;
  --card2: #303030;
  --border: rgba(255, 255, 255, 0.08);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.62);
  --muted2: rgba(255, 255, 255, 0.42);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  --ui-skeleton-base: rgba(255, 255, 255, 0.08);
  --ui-skeleton-highlight: rgba(255, 255, 255, 0.18);
  --chat-thread-padding-top: 8px;
  --chat-thread-padding-x: 22px;
  --chat-thread-padding-bottom: 18px;
  --chat-thread-gap: 14px;
  --chat-message-row-width: 860px;
  --chat-message-body-gap: 10px;
  --chat-message-stack-gap: 10px;
  --chat-avatar-size: 32px;
  --chat-avatar-radius: 10px;
  --chat-avatar-font-size: 11px;
  --chat-bubble-padding-y: 12px;
  --chat-bubble-padding-x: 14px;
  --chat-bubble-font-size: 14px;
  --chat-bubble-line-height: 1.45;
  --chat-user-bubble-padding-y: 10px;
  --chat-user-bubble-padding-x: 16px;
  --chat-composer-width: 860px;
  --chat-composer-gap: 10px;
  --chat-composer-shell-padding-y: 12px;
  --chat-composer-shell-padding-x: 14px;
  --chat-composer-radius: 24px;
  --chat-composer-input-font-size: 15px;
  --chat-composer-input-line-height: 1.45;
  --chat-composer-input-min-height: 24px;
}

:root[data-appearance-theme="light"] {
  color-scheme: light;
  --bg: #f0ece4;
  --bg2: #e4dfd5;
  --panel: #f4f0e8;
  --panel2: #e9e4da;
  --modal-surface: #f3efe7;
  --card: #e6e0d5;
  --card2: #ddd6cb;
  --border: rgba(15, 23, 42, 0.1);
  --text: rgba(15, 23, 42, 0.94);
  --muted: rgba(15, 23, 42, 0.66);
  --muted2: rgba(15, 23, 42, 0.46);
  --shadow: 0 20px 56px rgba(15, 23, 42, 0.12);
  --ui-skeleton-base: rgba(92, 74, 48, 0.13);
  --ui-skeleton-highlight: rgba(255, 248, 237, 0.62);
}

:root[data-message-scale="-2"] {
  --chat-thread-padding-top: 6px;
  --chat-thread-padding-x: 18px;
  --chat-thread-padding-bottom: 14px;
  --chat-thread-gap: 10px;
  --chat-message-body-gap: 8px;
  --chat-message-stack-gap: 8px;
  --chat-avatar-size: 28px;
  --chat-avatar-radius: 9px;
  --chat-avatar-font-size: 10px;
  --chat-bubble-padding-y: 10px;
  --chat-bubble-padding-x: 12px;
  --chat-bubble-font-size: 13px;
  --chat-bubble-line-height: 1.38;
  --chat-user-bubble-padding-y: 8px;
  --chat-user-bubble-padding-x: 14px;
  --chat-composer-gap: 8px;
  --chat-composer-shell-padding-y: 10px;
  --chat-composer-shell-padding-x: 12px;
  --chat-composer-radius: 22px;
  --chat-composer-input-font-size: 14px;
  --chat-composer-input-line-height: 1.38;
  --chat-composer-input-min-height: 22px;
}

:root[data-message-scale="-1"] {
  --chat-thread-padding-top: 7px;
  --chat-thread-padding-x: 20px;
  --chat-thread-padding-bottom: 16px;
  --chat-thread-gap: 12px;
  --chat-message-body-gap: 9px;
  --chat-message-stack-gap: 9px;
  --chat-avatar-size: 30px;
  --chat-avatar-radius: 9px;
  --chat-avatar-font-size: 10.5px;
  --chat-bubble-padding-y: 11px;
  --chat-bubble-padding-x: 13px;
  --chat-bubble-font-size: 13.5px;
  --chat-bubble-line-height: 1.42;
  --chat-user-bubble-padding-y: 9px;
  --chat-user-bubble-padding-x: 15px;
  --chat-composer-gap: 9px;
  --chat-composer-shell-padding-y: 11px;
  --chat-composer-shell-padding-x: 13px;
  --chat-composer-radius: 23px;
  --chat-composer-input-font-size: 14.5px;
  --chat-composer-input-line-height: 1.42;
  --chat-composer-input-min-height: 23px;
}

:root[data-message-scale="1"] {
  --chat-thread-padding-top: 9px;
  --chat-thread-padding-x: 24px;
  --chat-thread-padding-bottom: 20px;
  --chat-thread-gap: 16px;
  --chat-message-body-gap: 11px;
  --chat-message-stack-gap: 11px;
  --chat-avatar-size: 34px;
  --chat-avatar-radius: 11px;
  --chat-avatar-font-size: 11.5px;
  --chat-bubble-padding-y: 13px;
  --chat-bubble-padding-x: 15px;
  --chat-bubble-font-size: 15px;
  --chat-bubble-line-height: 1.5;
  --chat-user-bubble-padding-y: 11px;
  --chat-user-bubble-padding-x: 17px;
  --chat-composer-gap: 11px;
  --chat-composer-shell-padding-y: 13px;
  --chat-composer-shell-padding-x: 15px;
  --chat-composer-radius: 25px;
  --chat-composer-input-font-size: 16px;
  --chat-composer-input-line-height: 1.5;
  --chat-composer-input-min-height: 26px;
}

:root[data-message-scale="2"] {
  --chat-thread-padding-top: 10px;
  --chat-thread-padding-x: 26px;
  --chat-thread-padding-bottom: 22px;
  --chat-thread-gap: 18px;
  --chat-message-body-gap: 12px;
  --chat-message-stack-gap: 12px;
  --chat-avatar-size: 36px;
  --chat-avatar-radius: 12px;
  --chat-avatar-font-size: 12px;
  --chat-bubble-padding-y: 14px;
  --chat-bubble-padding-x: 16px;
  --chat-bubble-font-size: 16px;
  --chat-bubble-line-height: 1.56;
  --chat-user-bubble-padding-y: 12px;
  --chat-user-bubble-padding-x: 18px;
  --chat-composer-gap: 12px;
  --chat-composer-shell-padding-y: 14px;
  --chat-composer-shell-padding-x: 16px;
  --chat-composer-radius: 26px;
  --chat-composer-input-font-size: 16.5px;
  --chat-composer-input-line-height: 1.56;
  --chat-composer-input-min-height: 28px;
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI Variable", "Segoe UI", "Noto Sans", sans-serif;
  letter-spacing: -0.01em;
  overflow: hidden;
}

/* Scrollbar (Chromium) */
*::-webkit-scrollbar {
  width: 12px;
}

*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

:root[data-appearance-theme="light"] *::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.18);
  border: 3px solid transparent;
  background-clip: content-box;
}

.ui-skeleton {
  position: relative;
  overflow: hidden;
  background: var(--ui-skeleton-base);
  pointer-events: none;
}

.ui-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      transparent 0%,
      var(--ui-skeleton-highlight) 48%,
      transparent 100%);
  transform: translateX(-100%);
  animation: ui-skeleton-shimmer 1.35s linear infinite;
}

.ui-skeleton--pill,
.ui-skeleton--line {
  border-radius: 999px;
}

.ui-skeleton--avatar {
  border-radius: 999px;
}

@keyframes ui-skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}

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

.app {
  --sidebar-open-width: 240px;
  --sidebar-collapsed-width: 52px;
  --sidebar-width: var(--sidebar-open-width);
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  overflow: hidden;
  transition: grid-template-columns 340ms cubic-bezier(0.25, 0.78, 0.25, 1);
}

.app.is-sidebar-collapsed {
  --sidebar-width: var(--sidebar-collapsed-width);
}

.sidebar {
  background: linear-gradient(180deg, #0d0f12 0%, #0b0d10 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  transition: border-color 260ms ease;
}

.app.is-sidebar-collapsed .sidebar {
  overflow: visible;
}

.sidebar__top {
  padding: 12px 10px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar__top> :not(.history) {
  flex: 0 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  color: rgba(255, 255, 255, 0.9);
  user-select: none;
  position: relative;
}

.brand__mark {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 180ms ease, background 180ms ease, border-color 180ms ease;
  flex-shrink: 0;
}

.brand__logo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Brand logo protection (global): can't be dragged out (e.g. into a new tab),
   can't be selected, and no right-click "save image" / long-press callout.
   pointer-events:none keeps drag & the context menu off the image while the
   clickable parent (brand mark, header link) still receives taps. */
.brand__logo-img,
.shared-page__brand-logo,
.share-modal__preview-brand-logo {
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

:root[data-appearance-theme="light"] .library-author__icon[data-author="Anthropic"] {
  content: url("/assets/blackanthropic.svg");
}

:root[data-appearance-theme="light"] .library-author__icon[data-author="OpenAI"] {
  content: url("/assets/blackopenai.svg");
}

:root[data-appearance-theme="light"] .library-author__icon[data-author="xAI"] {
  content: url("/assets/blackxai.svg");
}

:root[data-appearance-theme="light"] .library-author__icon[data-author="Z.ai"] {
  content: url("/assets/blackz.svg");
}

:root[data-appearance-theme="light"] .library-author__icon[data-author="Moonshot AI"] {
  content: url("/assets/blackmoonshot.svg");
}

.brand__toggle-svg {
  display: none;
  width: 20px;
  height: 20px;
}

/* When sidebar is collapsed, hovering ANYWHERE on the sidebar shows the toggle icon on the brand mark */
.app.is-sidebar-collapsed .sidebar:hover .brand__mark {
  background: transparent;
  border-color: transparent;
}

.app.is-sidebar-collapsed .sidebar:hover .brand__logo-img {
  display: none;
}

.app.is-sidebar-collapsed .sidebar:hover .brand__toggle-svg {
  display: block;
}

.brand__text {
  font-weight: 620;
  font-size: 14px;
  opacity: 0.95;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 200ms ease, width 300ms ease;
}

/* Sidebar toggle button in brand area */
.sidebar-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  flex-shrink: 0;
  transition: background 150ms ease, color 150ms ease;
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.sidebar-toggle-btn svg {
  width: 20px;
  height: 20px;
}

/* Mobile-only sidebar open button (topbar, left of model switcher).
   Hidden on desktop; shown only inside the <=900px media query. */
.mobile-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 150ms ease, color 150ms ease;
}

.mobile-sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.95);
}

.mobile-sidebar-toggle svg {
  width: 22px;
  height: 22px;
}

/* Menu button inside the Model Library header (its own view hides the topbar,
   so it needs a local sidebar-open button on mobile). Visibility is handled by
   the shared .mobile-sidebar-toggle rules. */
.library-header__menu {
  margin-left: -8px;
  margin-bottom: 4px;
}

/* Backdrop shown behind the off-canvas sidebar drawer on mobile.
   Inert on desktop. */
.sidebar-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  z-index: 60;
  transition: opacity 260ms ease;
  pointer-events: none;
}

/* Hide toggle button when collapsed (use brand mark hover instead) */
.app.is-sidebar-collapsed .sidebar-toggle-btn {
  display: none;
}

/* Collapsed sidebar: hide text, shrink to icons */
.app.is-sidebar-collapsed .brand__text {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.app.is-sidebar-collapsed .brand {
  justify-content: center;
  padding: 10px 0;
  margin-top: -2px;
  gap: 0;
}

.app.is-sidebar-collapsed .navbtn span:not(.navbtn__icon) {
  display: none;
}

.app.is-sidebar-collapsed .navbtn {
  justify-content: center;
  padding: 10px 0;
  gap: 0;
}

.app.is-sidebar-collapsed .navbtn--primary span:not(.navbtn__icon) {
  display: none;
}

.app.is-sidebar-collapsed .history {
  display: none;
}

.app.is-sidebar-collapsed .sidebar__bottom .usercard__meta {
  display: none;
}

.app.is-sidebar-collapsed .sidebar__bottom .usercard {
  justify-content: center;
  padding: 10px 4px;
}

.app.is-sidebar-collapsed .sidebar__bottom .sidebar-promo {
  display: none;
}

.app.is-sidebar-collapsed .sidebar__bottom .sidebar-collapsed-profile {
  display: none;
}

.app.is-sidebar-collapsed .sidebar__top {
  padding: 12px 4px;
}

.app.is-sidebar-collapsed .sidebar__bottom {
  padding: 6px 4px;
}

.navlist {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.history {
  margin-top: 40px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.history__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  padding: 8px 4px;
  font-weight: 560;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
}

.history__toggle:hover {
  color: rgba(255, 255, 255, 0.95);
}

.history__chevron {
  font-size: 12px;
  opacity: 0.88;
  transition: transform 200ms ease;
}

.history.is-collapsed .history__chevron {
  transform: rotate(-90deg);
}

.history__list {
  margin-top: 8px;
  min-height: 0;
  flex: 1 1 auto;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  display: grid;
  align-content: start;
  gap: 2px;
  margin-right: -10px;
  padding-right: 10px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
  transition:
    max-height 250ms ease,
    opacity 180ms ease,
    margin-top 220ms ease;
}

.history__list--loading {
  pointer-events: none;
}

.history.is-collapsed .history__list {
  margin-top: 0;
  max-height: 0;
  flex: 0 0 auto;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.history-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  border-radius: 10px;
  transition: background-color 160ms ease;
}

.history-skeleton {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 12px;
  padding: 9px 2px 9px 8px;
}

.history-skeleton__icon {
  width: 24px;
  height: 24px;
}

.history-skeleton__line {
  width: min(100%, 166px);
  height: 11px;
}

.history-skeleton__line--short {
  width: 96px;
}

.history-skeleton__line--long {
  width: min(100%, 192px);
}

.history-skeleton__chevron {
  width: 10px;
  height: 10px;
  justify-self: end;
  border-radius: 4px;
  transform: rotate(45deg);
  opacity: 0.72;
}

.history-entry:hover {
  background: rgba(255, 255, 255, 0.07);
}

.history-entry--guest {
  grid-template-columns: minmax(0, 1fr);
}

.history-entry--guest:hover {
  background: transparent;
}

.history-item {
  width: 100%;
  min-width: 0;
  border: none;
  border-left: 2px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  text-align: left;
  padding: 8px 2px 8px 8px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition:
    color 160ms ease,
    border-left-color 160ms ease;
}

.history-item:hover,
.history-entry:hover .history-item {
  color: rgba(255, 255, 255, 1);
}

.history-item--guest {
  cursor: default;
  padding-right: 8px;
}

.history-item--guest:hover,
.history-entry--guest:hover .history-item--guest {
  color: rgba(255, 255, 255, 0.9);
}

.history-item.is-active {
  color: rgba(255, 255, 255, 1);
  border-left-color: rgba(130, 255, 214, 0.85);
}

.history-item__title {
  min-width: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item__actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-right: 2px;
}

.history-item__scan-indicator {
  width: 12px;
  height: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 12px;
  opacity: 0.62;
  pointer-events: none;
}

.history-item__scan-indicator[hidden] {
  display: none;
}

.history-item__scan-indicator::before {
  content: "";
  box-sizing: border-box;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-top-color: rgba(255, 255, 255, 0.62);
  animation: steeringStatusSpin 0.9s linear infinite;
}

.history-item__guide-indicator {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.62);
  flex-shrink: 0;
}

.history-item__guide-indicator svg {
  width: 16px;
  height: 16px;
}

.history-item__menu-trigger {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition:
    width 160ms ease,
    opacity 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

@media (min-width: 901px) {
  .history-entry.has-active-scan:not(:hover):not(.is-active) .history-item__menu-trigger:not([aria-expanded="true"]) {
    width: 0;
  }
}

.history-entry.is-active .history-item__menu-trigger,
.history-entry:hover .history-item__menu-trigger {
  opacity: 1;
  pointer-events: auto;
}

.history-item__menu-trigger:hover,
.history-item__menu-trigger[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 1);
}

.history-action-menu {
  position: fixed;
  min-width: 164px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: var(--modal-surface);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.56);
  display: grid;
  gap: 2px;
  z-index: 60;
}

.history-action-menu[hidden] {
  display: none;
}

.history-action-menu__item {
  width: 100%;
  min-height: 34px;
  padding: 0 6px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.history-action-menu__item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.history-action-menu__item:disabled {
  opacity: 0.44;
  cursor: not-allowed;
}

.history-action-menu__item:disabled:hover {
  background: transparent;
}

.history-action-menu__icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  flex: 0 0 auto;
}

.history-action-menu__icon svg {
  width: 100%;
  height: 100%;
}

.history-action-menu__label {
  font-size: 12.5px;
  min-width: 0;
  white-space: nowrap;
}

.history-action-menu__item--danger {
  color: rgba(255, 98, 98, 0.96);
}

.history-action-menu__item--danger:hover {
  background: rgba(255, 98, 98, 0.08);
  color: rgba(255, 116, 116, 1);
}

.history-dialog {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
}

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

.history-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  transition: opacity 220ms ease;
}

.history-dialog__panel {
  position: relative;
  width: min(468px, calc(100vw - 36px));
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--modal-surface);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.46);
  padding: 22px;
  opacity: 0;
  transform: translateY(14px);
  transition:
    transform 240ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 220ms ease;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.history-dialog.is-open .history-dialog__backdrop {
  opacity: 1;
}

.history-dialog.is-open .history-dialog__panel {
  opacity: 1;
  transform: translateY(0);
}

.history-dialog.is-closing .history-dialog__backdrop {
  opacity: 0;
}

.history-dialog.is-closing .history-dialog__panel {
  opacity: 0;
  transform: translateY(10px);
}

.history-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.history-dialog__headings {
  min-width: 0;
}

.history-dialog__title {
  margin: 0;
  font-size: 15px;
  font-weight: 680;
  color: rgba(255, 255, 255, 0.97);
}

.history-dialog__description {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.68);
}

.history-dialog__close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.history-dialog__close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.96);
}

.history-dialog__form {
  margin-top: 18px;
}

.history-dialog__input-row {
  margin-top: 2px;
}

.history-dialog__input {
  width: 100%;
  height: 46px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.96);
  padding: 0 14px;
  font: inherit;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.history-dialog__input::placeholder {
  color: rgba(255, 255, 255, 0.38);
  font-weight: 400;
}

.history-dialog__input:focus {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
  background: rgba(255, 255, 255, 0.055);
}

.history-dialog__message {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
}

.history-dialog__message[data-variant="warn"] {
  color: rgba(255, 215, 130, 0.95);
}

.history-dialog__message[data-variant="danger"] {
  color: rgba(255, 150, 150, 0.95);
}

.history-dialog--delete-account .history-dialog__input {
  letter-spacing: 0.45em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 18px;
}

.history-dialog__footer {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.history-dialog__button {
  min-width: 84px;
  height: 36px;
  border-radius: 9999px;
  border: none;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 6px 14px;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

.history-dialog__button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.history-dialog__button[hidden] {
  display: none;
}

.history-dialog__button--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.history-dialog__button--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.history-dialog__button--accent,
.history-dialog__button[data-variant="accent"] {
  background: rgba(108, 255, 199, 0.12);
  color: rgba(220, 255, 245, 0.95);
}

.history-dialog__button--accent:hover,
.history-dialog__button[data-variant="accent"]:hover {
  background: rgba(108, 255, 199, 0.16);
}

.history-dialog__button[data-variant="danger"] {
  background-color: #8c2b2b;
  color: #ffffff;
}

.history-dialog__button[data-variant="danger"]:hover {
  background-color: #bd3a3a;
}

.out-of-credits-modal {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: grid;
  place-items: center;
  padding: 18px;
}

.out-of-credits-modal[hidden] {
  display: none;
}

.out-of-credits-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.out-of-credits-modal__panel {
  position: relative;
  width: min(440px, calc(100vw - 36px));
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: var(--modal-surface);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.48);
  padding: 22px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.out-of-credits-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 720;
  color: rgba(255, 255, 255, 0.97);
}

.out-of-credits-modal__description {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.68);
}

.out-of-credits-modal__actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.out-of-credits-modal__btn {
  min-width: 96px;
  height: 38px;
  border-radius: 9999px;
  border: none;
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 6px 16px;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.out-of-credits-modal__btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.out-of-credits-modal__btn--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.out-of-credits-modal__btn--primary {
  background: rgba(108, 255, 199, 0.12);
  color: rgba(220, 255, 245, 0.95);
}

.out-of-credits-modal__btn--primary:hover {
  background: rgba(108, 255, 199, 0.16);
}

@media (prefers-reduced-motion: reduce) {

  .ui-skeleton::after,
  .modelbtn.is-loading .modelbtn__name::after,
  .composer__shell.is-loading::before,
  .composer__shell.is-loading::after {
    animation: none;
  }

  .history-dialog__backdrop,
  .history-dialog__panel,
  .conversation-search__backdrop,
  .conversation-search__panel,
  .guest-upsell-popover {
    transition: none;
  }

  .history-dialog__panel,
  .conversation-search__panel,
  .guest-upsell-popover {
    transform: none;
  }
}

.conversation-search {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 28px;
}

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

.conversation-search__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  transition: opacity 220ms ease;
}

.conversation-search__panel {
  position: relative;
  width: min(560px, calc(100vw - 88px));
  height: min(62vh, 430px);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--modal-surface);
  box-shadow: 0 30px 72px rgba(0, 0, 0, 0.52);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  opacity: 0;
  transform: translateY(14px);
  transition:
    transform 240ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 220ms ease;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.conversation-search.is-open .conversation-search__backdrop {
  opacity: 1;
}

.conversation-search.is-open .conversation-search__panel {
  opacity: 1;
  transform: translateY(0);
}

.conversation-search.is-closing .conversation-search__backdrop {
  opacity: 0;
}

.conversation-search.is-closing .conversation-search__panel {
  opacity: 0;
  transform: translateY(10px);
}

.conversation-search__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.conversation-search__input-shell {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.conversation-search__search-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.conversation-search__input {
  width: 100%;
  min-width: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.96);
  font: inherit;
  font-size: 19px;
  line-height: 1.2;
  outline: none;
}

.conversation-search__input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.conversation-search__close {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.64);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.conversation-search__close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
}

.conversation-search__body {
  min-height: 0;
  height: 100%;
}

.conversation-search__scroll {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 6px 12px 10px;
  scrollbar-gutter: stable;
}

.conversation-search__content {
  display: grid;
  gap: 2px;
}

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

.conversation-search__skeleton {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 2px;
}

.conversation-search__skeleton-icon {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  animation: conversation-search-pulse 1.2s ease-in-out infinite;
}

.conversation-search__skeleton-body {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.conversation-search__skeleton-line {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  animation: conversation-search-pulse 1.2s ease-in-out infinite;
}

.conversation-search__skeleton-line--title {
  width: 170px;
}

.conversation-search__skeleton-line--preview {
  width: min(340px, 100%);
}

@keyframes conversation-search-pulse {

  0%,
  100% {
    opacity: 0.55;
  }

  50% {
    opacity: 1;
  }
}

.conversation-search__section {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.conversation-search__section-title {
  margin: 0;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 560;
  color: rgba(255, 255, 255, 0.56);
}

.conversation-search__section-list,
.conversation-search__results {
  display: grid;
  gap: 2px;
}

.conversation-search__item {
  width: 100%;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: rgba(255, 255, 255, 0.95);
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.conversation-search__item:hover,
.conversation-search__item.is-active {
  background: rgba(255, 255, 255, 0.06);
}

.conversation-search__item-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.92);
}

.conversation-search__item-body {
  min-width: 0;
  display: grid;
  gap: 6px;
  align-content: center;
}

.conversation-search__item-title {
  min-width: 0;
  font-size: 14px;
  font-weight: 540;
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-search__item-preview {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.62);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.conversation-search__highlight {
  background: transparent;
  color: rgba(255, 255, 255, 0.96);
  font-weight: 700;
}

.conversation-search__message {
  padding: 18px 12px 12px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.56);
}

.conversation-search__message[data-tone="danger"] {
  color: rgba(255, 132, 132, 0.92);
}

@media (max-width: 720px) {
  .conversation-search {
    padding: 12px;
  }

  .conversation-search__panel {
    width: min(100vw - 24px, 560px);
    height: min(74vh, 460px);
    border-radius: 16px;
  }

  .conversation-search__header {
    padding: 14px 14px 12px;
  }

  .conversation-search__input {
    font-size: 18px;
  }

  .conversation-search__scroll {
    padding: 10px 8px 14px 10px;
  }

  .conversation-search__item {
    padding: 11px 10px;
  }

  .model-library-view {
    padding: 24px 10px 14px;
  }

  .library-shell {
    width: 100%;
    gap: 12px;
  }

  .library-controls {
    gap: 10px;
  }

  .library-search {
    width: 100%;
  }

  .library-select {
    width: 100%;
  }

  .library-toggle {
    width: 100%;
    justify-content: space-between;
  }

  /* Mobile: a phone can't fit 4 legible columns, so each model becomes a
     compact 2-line row that shows everything (name, credits, capabilities,
     author) with no horizontal scroll. Scoped under #modelLibraryView so it
     reliably overrides the desktop table rules that appear later in this file
     (equal specificity + later source order would otherwise win). */
  #modelLibraryView .library-panel {
    background: #121417;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
  }

  #modelLibraryView .library-table-head {
    display: none;
  }

  #modelLibraryView .library-list {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  #modelLibraryView .library-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name cost"
      "caps author";
    align-items: center;
    gap: 10px 12px;
    min-height: 0;
    padding: 13px 14px;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    background: #121417;
  }

  #modelLibraryView .library-row:first-child {
    border-top: 0;
  }

  #modelLibraryView .library-row:hover {
    background: #14181c;
  }

  /* Keep the mobile selection indicator straight and independent of the
     surrounding list border. */
  #modelLibraryView .library-row.is-active {
    background: #171c20;
    box-shadow: none;
  }

  #modelLibraryView .library-row.is-active::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background: rgba(108, 255, 199, 0.72);
  }

  /* Light theme: keep the rows light (the id-scoped rules above outrank the
     generic light-theme row colors). */
  :root[data-appearance-theme="light"] #modelLibraryView .library-panel,
  :root[data-appearance-theme="light"] #modelLibraryView .library-row,
  :root[data-appearance-theme="light"] #modelLibraryView .library-row:hover {
    background: #ddd6c7;
    border-color: rgba(15, 23, 42, 0.12);
  }

  :root[data-appearance-theme="light"] #modelLibraryView .library-row.is-active {
    background: #c5bda9;
  }

  :root[data-appearance-theme="light"] #modelLibraryView .library-row.is-active::before {
    background: rgba(66, 50, 32, 0.85);
  }

  /* Author name is muted white on the dark rows; make it dark in light theme
     (the id-scoped author color below would otherwise stay white). */
  :root[data-appearance-theme="light"] #modelLibraryView .library-cell--author {
    color: rgba(15, 23, 42, 0.62);
  }

  #modelLibraryView .library-cell {
    padding: 0;
    min-width: 0;
  }

  /* Line 1: model name (left) + avg-credits chip (right). */
  #modelLibraryView .library-cell--name {
    grid-area: name;
    font-size: 15px;
    font-weight: 600;
  }

  #modelLibraryView .library-model-name {
    gap: 6px;
    min-width: 0;
    overflow: hidden;
  }

  #modelLibraryView .library-model-name > span:first-child {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
  }

  #modelLibraryView .library-cell--cost {
    grid-area: cost;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
  }

  /* Tappable info button next to each price (opens the avg-credits modal). */
  #modelLibraryView .library-credit-info {
    display: inline-flex;
  }

  /* Swap the note's second sentence for the mobile pricing hint. */
  .library-note__variant--desktop {
    display: none;
  }

  .library-note__variant--mobile {
    display: inline;
  }

  /* Line 2: capability badges (left) + author (right). */
  #modelLibraryView .library-cell--capabilities {
    grid-area: caps;
  }

  #modelLibraryView .library-cell--capabilities .library-model-badges {
    margin: 0;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  #modelLibraryView .library-cell--author {
    grid-area: author;
    justify-self: end;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.62);
  }

  #modelLibraryView .library-author {
    gap: 6px;
    min-width: 0;
    max-width: 100%;
  }

  #modelLibraryView .library-author > span:last-child {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
  }

  #modelLibraryView .library-meta-label {
    display: none;
  }
}

.history-item__meta {
  display: none;
}

.history-empty {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  padding: 8px 4px;
}

.navbtn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 9px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition:
    background-color 170ms ease,
    border-color 170ms ease;
}

.navbtn:hover {
  background: rgba(255, 255, 255, 0.07);
}

.navbtn.is-active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.98);
}

.navbtn.is-active .navbtn__icon {
  color: rgba(255, 255, 255, 0.94);
}

#modelLibraryBtn.is-active,
#modelLibraryBtn.is-active:hover,
#modelLibraryBtn.is-active:active {
  background: transparent;
  border-color: transparent;
  color: rgba(255, 255, 255, 0.9);
}

#modelLibraryBtn.is-active .navbtn__icon,
#modelLibraryBtn.is-active:hover .navbtn__icon,
#modelLibraryBtn.is-active:active .navbtn__icon {
  color: rgba(255, 255, 255, 0.78);
}

#modelLibraryBtn:focus,
#modelLibraryBtn:focus-visible {
  outline: none;
  box-shadow: none;
}

.navbtn:active {
  transform: none;
}

.navbtn--primary {
  margin-top: 6px;
  background: transparent;
  border-color: transparent;
}

.navbtn__icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.78);
}

.sidebar__bottom {
  position: relative;
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.14);
}

.app.is-auth-loading .sidebar__bottom>*:not(.sidebar-session-skeleton) {
  opacity: 0;
  pointer-events: none;
}

.sidebar-session-skeleton {
  display: none;
  gap: 14px;
  padding: 6px 2px 2px;
}

.sidebar-session-skeleton[hidden] {
  display: none;
}

.app.is-auth-loading .sidebar-session-skeleton {
  display: grid;
}

.sidebar-session-skeleton__title {
  width: 126px;
  height: 13px;
}

.sidebar-session-skeleton__profile {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.sidebar-session-skeleton__avatar {
  width: 28px;
  height: 28px;
}

.sidebar-session-skeleton__meta {
  display: grid;
  gap: 10px;
}

.sidebar-session-skeleton__line {
  height: 10px;
}

.sidebar-session-skeleton__line--name {
  width: 112px;
}

.sidebar-session-skeleton__line--tier {
  width: 52px;
  height: 8px;
}

.app.is-guest-session .sidebar__bottom {
  padding: 16px 14px 18px;
}

.app.is-guest-session.app.is-sidebar-collapsed .sidebar__bottom {
  display: flex;
  justify-content: center;
  padding: 10px 0 14px;
  border-top: none;
  background: transparent;
}

.app.is-guest-session .sidebar__bottom .usercard {
  display: none;
}

.app.is-sidebar-collapsed.is-auth-loading .sidebar-session-skeleton {
  justify-items: center;
  padding: 0;
}

.app.is-sidebar-collapsed.is-auth-loading .sidebar-session-skeleton__title,
.app.is-sidebar-collapsed.is-auth-loading .sidebar-session-skeleton__meta {
  display: none;
}

.app.is-sidebar-collapsed.is-auth-loading .sidebar-session-skeleton__profile {
  grid-template-columns: 28px;
}

.app.is-authenticated-session .sidebar__bottom .sidebar-promo,
.app:not(.is-guest-session) .sidebar__bottom .sidebar-promo,
.app.is-authenticated-session .sidebar__bottom .sidebar-collapsed-profile,
.app:not(.is-guest-session) .sidebar__bottom .sidebar-collapsed-profile {
  display: none;
}

.account-menu {
  position: absolute;
  left: 10px;
  bottom: calc(100% + 8px);
  width: calc(100% - 20px);
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--modal-surface);
  box-shadow: none;
  display: grid;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 30;
}

.sidebar__bottom.is-account-menu-open .account-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.app.is-guest-session .account-menu {
  display: none;
}

.account-menu__usage {
  padding: 2px 8px 4px;
  display: grid;
  gap: 2px;
}

.account-menu__usage[hidden],
.account-menu__divider[hidden] {
  display: none !important;
}

.account-menu__usage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-menu__usage-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12.5px;
  font-weight: 560;
  line-height: 1;
  transform: translateY(-1px);
}

.account-menu__usage-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.84);
  flex: 0 0 auto;
}

.account-menu__usage-percent {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  min-height: 14px;
  white-space: nowrap;
  transform: translateY(-1px);
}

.account-menu__usage-bar {
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.account-menu__usage-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.75);
}

.account-menu__item {
  width: 100%;
  min-height: 34px;
  padding: 0 6px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: left;
}

.account-menu__item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.account-menu__icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.86);
  flex: 0 0 auto;
}

.account-menu__icon svg {
  width: 100%;
  height: 100%;
}

.account-menu__label {
  font-size: 12.5px;
  font-weight: 520;
  line-height: 1.2;
}

.account-menu__item--danger {
  color: rgba(255, 255, 255, 0.95);
}

.account-menu__upgrade {
  color: rgba(232, 226, 255, 0.96);
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  column-gap: 8px;
}

.account-menu__upgrade .account-menu__icon {
  color: rgba(232, 226, 255, 0.96);
}

.account-menu__upgrade .account-menu__icon svg {
  width: 43px;
  height: 43px;
  transform: translate(0, 0);
}

.account-menu__divider {
  height: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 4px 6px;
}

.account-menu__divider--full {
  width: calc(100% + 16px);
  margin-left: -8px;
  margin-right: -8px;
}

.sidebar__bottom.is-account-menu-open .usercard {
  background: transparent;
  border-color: transparent;
}

.usercard {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    background-color 170ms ease,
    border-color 170ms ease;
}

.usercard:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: transparent;
}

.usercard:focus,
.usercard:focus-visible {
  outline: none;
  box-shadow: none;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #5d6168;
  border: none;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.92);
  flex: 0 0 auto;
}

.avatar svg {
  width: 15px;
  height: 15px;
  display: block;
}

.avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.usercard__meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.usercard__name {
  font-size: 13px;
  font-weight: 640;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.sidebar-promo {
  display: grid;
  gap: 14px;
}

.sidebar-promo__title {
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
}

.sidebar-promo__copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.55;
}

.sidebar-promo__cta {
  display: inline-flex;
  align-items: center;
  width: 100%;
  justify-self: stretch;
  justify-content: center;
}

.sidebar-collapsed-profile {
  display: none;
  width: 28px;
  height: 28px;
  margin-inline: auto;
  border-radius: 999px;
  border: none;
  background: #5d6168;
  color: rgba(255, 255, 255, 0.92);
  align-items: center;
  justify-content: center;
}

.sidebar-collapsed-profile svg {
  width: 15px;
  height: 15px;
}

.sidebar-collapsed-profile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.app.is-guest-session.app.is-sidebar-collapsed .sidebar__bottom .sidebar-collapsed-profile {
  display: inline-flex;
}

.app.is-sidebar-collapsed .account-menu {
  left: 8px;
  width: 216px;
}

.main {
  --tool-inspector-width: min(420px, 38vw);
  min-width: 0;
  min-height: 0;
  height: 100%;
  position: relative;
  display: block;
  overflow: hidden;
}

.main.is-tool-inspector-open .stage {
  padding-right: var(--tool-inspector-width, min(420px, 38vw));
}

.topbar {
  min-height: 56px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px 14px;
  pointer-events: none;
}

.topbar.is-hidden {
  display: none;
}

.topbar__left {
  position: relative;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  gap: 10px;
  pointer-events: auto;
}

.topbar__center {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  gap: 10px;
  color: rgba(255, 255, 255, 0.85);
}

.topbar__title {
  font-size: 14px;
  font-weight: 650;
}

.topbar__pill {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
}

.topbar__right {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  gap: 10px;
  pointer-events: auto;
}

.topbar__guest-actions {
  display: none;
}

.topbar__chat-share-slot[hidden] {
  display: none;
}

.topbar__temporary-chat-slot[hidden] {
  display: none;
}

.topbar__session-skeleton {
  display: none;
  align-items: center;
  gap: 10px;
}

.topbar__session-skeleton[hidden] {
  display: none;
}

.app.is-auth-loading .topbar__guest-actions,
.app.is-auth-loading .topbar__chat-share-slot,
.app.is-auth-loading .topbar__upgrade-btn,
.app.is-auth-loading .topbar__temporary-chat-slot {
  display: none !important;
}

.app.is-auth-loading .topbar__session-skeleton {
  display: inline-flex;
}

.topbar__session-skeleton-pill {
  height: 36px;
}

.topbar__session-skeleton-pill--primary {
  width: 142px;
}

.topbar__session-skeleton-pill--secondary {
  width: 86px;
}

.topbar__guest-signup {
  justify-self: auto;
  min-height: 36px;
  padding: 0 16px;
  white-space: nowrap;
}

.topbar__auth-btn {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.topbar__auth-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 1);
}

.temporary-chat-toggle {
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease;
}

.temporary-chat-toggle:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.08);
}

.temporary-chat-toggle:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.1);
}

.temporary-chat-toggle__frame {
  position: relative;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.temporary-chat-toggle__icon {
  width: 100%;
  height: 100%;
  transition: transform 180ms ease, color 180ms ease;
}

.temporary-chat-toggle__icon path {
  stroke-dasharray: 4.5 4.5;
  stroke-width: 2;
  transition: stroke-dasharray 180ms ease;
}

.temporary-chat-toggle.is-active,
.temporary-chat-toggle[aria-pressed="true"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.temporary-chat-toggle.is-active .temporary-chat-toggle__icon path,
.temporary-chat-toggle[aria-pressed="true"] .temporary-chat-toggle__icon path {
  stroke-dasharray: none;
}

.topbar__chat-action-btn {
  position: relative;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.95);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease;
  white-space: nowrap;
}

.topbar__chat-action-btn:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.08);
}

.topbar__chat-action-btn:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.1);
}

.topbar__chat-action-btn svg {
  display: block;
  flex: 0 0 auto;
}

.topbar__chat-action-label {
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
}

.model-switcher {
  position: relative;
}

.modelbtn {
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.95);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: none;
}

/* .modelbtn sets display:inline-flex, which overrides the hidden attribute's
   default display:none — restore it so buttons can be toggled by [hidden]. */
.modelbtn[hidden] {
  display: none;
}

.modelbtn__gear {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.72);
}

.modelbtn--swarm-settings:hover .modelbtn__gear {
  color: rgba(255, 255, 255, 0.95);
}

.modelbtn.is-loading {
  pointer-events: none;
  cursor: default;
}

.modelbtn.is-loading:hover {
  background: transparent;
}

.modelbtn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.modelbtn__name {
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
}

.modelbtn.is-loading .modelbtn__name {
  min-width: 132px;
  height: 14px;
  display: inline-block;
  border-radius: 999px;
  color: transparent;
  background: var(--ui-skeleton-base);
  position: relative;
  overflow: hidden;
}

.modelbtn.is-loading .modelbtn__name::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      transparent 0%,
      var(--ui-skeleton-highlight) 48%,
      transparent 100%);
  transform: translateX(-100%);
  animation: ui-skeleton-shimmer 1.35s linear infinite;
}

.modelbtn__chevron {
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, 0.65);
  display: inline-flex;
  place-items: center;
}

.modelbtn.is-loading .modelbtn__chevron {
  opacity: 0;
}

.model-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 210px;
  padding: 4px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1e1e1e;
  box-shadow: none;
  display: grid;
  gap: 3px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  max-height: 0;
  transition:
    max-height 260ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 220ms ease,
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 35;
}

.model-switcher.is-open .model-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  max-height: min(calc(100vh - 96px), 720px);
}

.model-menu--guest,
.guest-upsell-popover {
  width: min(292px, calc(100vw - 24px));
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.model-menu--guest {
  background: #1e1e1e;
}

.guest-upsell-popover {
  position: fixed;
  z-index: 70;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--modal-surface);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 220ms ease,
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.guest-upsell-popover.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.guest-upsell-popover.is-closing {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
}

.guest-model-sheet {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.guest-model-sheet__copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  line-height: 1.5;
}

.guest-model-sheet__inline-cta {
  border: none;
  padding: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.98);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.guest-model-sheet__inline-cta:hover {
  color: rgba(255, 255, 255, 0.98);
}

.guest-model-sheet__cta {
  justify-self: start;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(108, 255, 199, 0.12);
  color: rgba(218, 255, 243, 0.96);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.guest-model-sheet__cta:hover {
  background: rgba(108, 255, 199, 0.16);
  border-color: transparent;
  transform: none;
}

.model-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  padding: 6px 8px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}

.model-menu .model-item:nth-child(n + 7) {
  display: none;
}

.model-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: transparent;
}

.model-item__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-item.is-active {
  background: rgba(108, 255, 199, 0.12);
  border-color: transparent;
  color: rgba(218, 255, 243, 0.96);
}

.model-item__check {
  display: none;
}

.model-item.is-active .model-item__check {
  display: none;
}

.model-item--library-link {
  justify-content: flex-start;
  gap: 9px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 9px 9px;
  color: rgba(255, 255, 255, 0.72);
}

.model-item--library-link:hover {
  background: rgba(255, 255, 255, 0.05);
}

.model-item__library-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.68);
  flex-shrink: 0;
}

.model-item__library-text {
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.35;
}

.mode-switcher {
  position: relative;
  flex-shrink: 0;
}

.modebtn {
  height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
  box-shadow: none;
}

.modebtn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.mode-switcher[data-mode="agent"] .modebtn {
  padding: 0 8px;
  background: rgba(108, 255, 199, 0.12);
  border-color: transparent;
  color: rgba(218, 255, 243, 0.96);
}

.mode-switcher[data-mode="agent"] .modebtn:hover {
  background: rgba(108, 255, 199, 0.16);
}

.mode-switcher[data-mode="swarm"] .modebtn {
  padding: 0 8px;
  background: rgba(108, 255, 199, 0.12);
  border-color: transparent;
  color: rgba(218, 255, 243, 0.96);
}

.mode-switcher[data-mode="swarm"] .modebtn:hover {
  background: rgba(108, 255, 199, 0.16);
}


.modebtn__icons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modebtn__icon {
  display: none;
}

.mode-switcher[data-mode="assistant"] .modebtn__icon--ask {
  display: block;
}

.mode-switcher[data-mode="agent"] .modebtn__icon--agent {
  display: block;
}

.mode-switcher[data-mode="swarm"] .modebtn__icon--swarm {
  display: block;
}


.modebtn__label {
  font-size: 13px;
  font-weight: 500;
}

.modebtn__chevron {
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
}

.modebtn__chevron svg {
  width: 12px;
  height: 12px;
}

.mode-menu {
  position: absolute;
  top: calc(100% + 12px);
  bottom: auto;
  left: 0;
  width: min(224px, calc(100vw - 44px));
  padding: 4px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1e1e1e;
  box-shadow: none;
  display: grid;
  gap: 2px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  max-height: 0;
  transition:
    max-height 260ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 220ms ease,
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 35;
}

.mode-switcher.is-open .mode-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  max-height: 240px;
}

.stage.is-chatting .mode-menu {
  top: auto;
  bottom: calc(100% + 12px);
  transform: translateY(4px);
}

.stage.is-chatting .mode-switcher.is-open .mode-menu {
  transform: translateY(0);
}

.reasoning-menu {
  width: 170px;
  left: 0;
  right: auto;
  transform: translateY(-4px);
  transition:
    max-height 260ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 220ms ease,
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reasoning-menu.model-menu--guest {
  width: min(292px, calc(100vw - 24px));
  box-shadow: none;
}

.reasoning-switcher.is-open .reasoning-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  max-height: 240px;
}

.stage.is-chatting .reasoning-menu {
  top: auto;
  bottom: calc(100% + 12px);
  transform: translateY(4px);
}

.stage.is-chatting .reasoning-switcher.is-open .reasoning-menu {
  transform: translateY(0);
}

.mode-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  padding: 5px 6px;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  cursor: pointer;
  text-align: left;
}

.mode-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.mode-item.is-active {
  background: rgba(108, 255, 199, 0.12);
  border-color: transparent;
  color: rgba(218, 255, 243, 0.96);
}

.mode-item.is-disabled {
  opacity: 0.38;
  cursor: default;
}

.mode-item.is-disabled:hover {
  background: transparent;
  border-color: transparent;
}

.mode-item__meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.mode-item__top {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex-wrap: wrap;
}

.mode-item__icon {
  width: 16px;
  height: 16px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.mode-item__icon svg {
  display: block;
  transform: scale(0.9);
}

.mode-item__desc {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.35;
}

.mode-item.is-active .mode-item__desc {
  color: rgba(218, 255, 243, 0.78);
}

.mode-item__plan-badge {
  margin-left: 2px;
  flex: 0 0 auto;
  min-height: 20px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(108, 255, 199, 0.12);
  color: rgba(218, 255, 243, 0.96);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.app.is-guest-session .mode-item__plan-badge,
.app.is-authenticated-session:not([data-auth-plan="free"]) .mode-item__plan-badge {
  display: none;
}

.mode-item__check {
  display: none;
}

.mode-item.is-active .mode-item__check {
  display: none;
}

#modeMenuPanel .mode-item.is-active {
  background: transparent;
  border-color: transparent;
  color: rgba(255, 255, 255, 0.86);
}

#modeMenuPanel {
  width: min(194px, calc(100vw - 44px));
}

#modeMenuPanel,
#reasoningMenuPanel {
  background: #212121;
}

:root[data-appearance-theme="light"] #modeMenuPanel,
:root[data-appearance-theme="light"] #reasoningMenuPanel {
  background: linear-gradient(180deg, #e3ddd2 0%, #d7d0c4 100%);
}

#modeMenuPanel .mode-item {
  padding-top: 4px;
  padding-bottom: 4px;
}

#modeMenuPanel .mode-item__meta {
  gap: 0;
}

#modeMenuPanel .mode-item__top {
  gap: 10px;
  align-items: center;
  min-height: 22px;
}

#modeMenuPanel .mode-item__icon {
  width: 22px;
  height: 22px;
}

#modeMenuPanel .mode-item__icon svg {
  transform: scale(1.12);
}

#modeMenuPanel .mode-item[data-mode="agent"] .mode-item__icon svg {
  transform: scale(1.3);
}

#modeMenuPanel .mode-item[data-mode="swarm"] .mode-item__icon svg {
  transform: scale(1.18);
}

#modeMenuPanel .mode-item__name {
  display: block;
  color: rgba(245, 245, 245, 0.94);
  font-size: 13.5px;
  font-weight: 450;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-shadow: none;
  transform: translateY(-2px);
  transition: color 140ms ease;
}

#modeMenuPanel .mode-item:hover .mode-item__name {
  color: rgba(255, 255, 255, 1);
}

#modeMenuPanel .mode-item__desc {
  display: block;
  padding-left: 32px;
  margin-top: -5px;
  font-size: 8.5px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}

#modeMenuPanel .mode-item__plan-badge {
  display: none;
}

#modeMenuPanel .mode-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: transparent;
}

#modeMenuPanel .mode-item.is-active:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: transparent;
}

#reasoningMenuPanel .mode-item:hover,
#reasoningMenuPanel .mode-item.is-active:hover {
  border-color: transparent;
}

.reasoning-switcher {
  position: relative;
  flex-shrink: 0;
}

.reasoning-switcher.is-hidden {
  display: none;
}

.reasoningbtn {
  height: 30px;
  padding: 0 8px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  position: relative;
  box-shadow: none;
  transition: color 150ms ease, background 150ms ease;
}

.reasoningbtn:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.06);
}

.reasoningbtn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.reasoningbtn__chevron {
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
}

.reasoning-menu__title {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  padding: 6px 10px 8px;
}

/* For mode-item__icon without background (like ghost) */
.mode-item__icon--ghost {
  background: transparent;
  border: none;
  width: auto;
  height: auto;
  color: rgba(255, 255, 255, 0.65);
}

.mode-item.is-active .mode-item__icon--ghost {
  color: rgba(218, 255, 243, 0.96);
}

.iconbtn {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.iconbtn svg {
  width: 16px;
  height: 16px;
}

.iconbtn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.iconbtn--ghost {
  background: transparent;
  border-color: transparent;
}

.iconbtn--ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.06);
}

#attachBtn {
  border-radius: 8px;
}

#micBtn {
  border-radius: 8px;
}

#micBtn.is-recording {
  background: rgba(255, 88, 88, 0.16);
  border-color: rgba(255, 88, 88, 0.34);
  color: #ff8d8d;
  box-shadow: 0 0 0 1px rgba(255, 88, 88, 0.18), 0 0 0 8px rgba(255, 88, 88, 0.08);
}

#micBtn.is-recording svg {
  animation: mic-pulse 1.2s ease-in-out infinite;
}

#micBtn.is-busy {
  opacity: 0.72;
}

#attachBtn:hover,
#attachBtn:focus-visible,
#micBtn:hover,
#micBtn:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: transparent;
}

@keyframes mic-pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }
}



.iconbtn--soft {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.stage {
  position: relative;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 22px 18px;
  gap: 12px;
  overflow: hidden;
}

.stage:not(.is-chatting) {
  justify-content: center;
}

.stage.is-chatting {
  justify-content: flex-start;
  gap: 0;
}

.stage.is-hidden {
  display: none;
}

.app.is-guest-session .stage:not(.is-chatting) {
  justify-content: flex-start;
  padding-top: clamp(136px, 22vh, 220px);
  padding-bottom: 88px;
}

.app.is-authenticated-session .stage:not(.is-chatting) {
  gap: 18px;
}

.model-library-view {
  display: none;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 72px 16px 18px;
  background: linear-gradient(180deg, #0d0f12 0%, #0b0d10 100%);
}

.model-library-view.is-visible {
  display: block;
}

.library-shell {
  width: min(1520px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.library-header {
  display: block;
}

.library-title {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
  font-weight: 690;
  color: rgba(255, 255, 255, 0.97);
}

.library-note {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  line-height: 1.5;
}

.library-note__icon {
  display: inline-flex;
  color: #66a6ff;
  flex-shrink: 0;
}

.library-note__text {
  color: rgba(255, 255, 255, 0.86);
}

.library-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.library-search,
.library-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.library-search {
  width: min(274px, 100%);
}

.library-search__input,
.library-select__input {
  appearance: none;
  width: 100%;
  height: 40px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(13, 15, 18, 0.7);
  color: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-size: 12px;
  outline: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.library-search__input {
  padding: 0 60px 0 14px;
}

.library-search__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.library-select__input {
  min-width: 124px;
  padding: 0 34px 0 14px;
  cursor: pointer;
}

.library-search__input::placeholder {
  color: rgba(255, 255, 255, 0.48);
}

.library-search__input:focus,
.library-select__input:focus {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(17, 20, 24, 0.84);
}

.library-search__icon,
.library-select__icon {
  position: absolute;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

/* "Recommended only" filter — a pill toggle matching the selects, with a
   compact switch on the right. Active state ties to the shield accent. */
.library-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(13, 15, 18, 0.7);
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.library-toggle__icon {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.5);
  transition: color 160ms ease;
}

.library-toggle__label {
  line-height: 1;
}

.library-toggle__switch {
  position: relative;
  flex: 0 0 auto;
  width: 30px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  transition: background-color 160ms ease;
}

.library-toggle__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 160ms ease;
}

/* Active = only the switch fills with our mint accent; the pill, border, label
   and icon keep their neutral resting colors. */
.library-toggle.is-active .library-toggle__switch {
  background: rgba(108, 255, 199, 0.9);
}

.library-toggle.is-active .library-toggle__thumb {
  transform: translateX(12px);
}

.library-search__clear {
  position: absolute;
  right: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background-color 140ms ease;
}

.library-search__clear[hidden] {
  display: none;
}

.library-search__clear:hover {
  background: rgba(255, 255, 255, 0.12);
}

.library-search__clear:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.4);
  outline-offset: 1px;
}

.library-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  background: #121417;
  box-shadow: none;
}

.library-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(13, 15, 18, 0.4);
}

.library-pagination[hidden] {
  display: none;
}

.library-pagination__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, opacity 140ms ease;
}

.library-pagination__btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.library-pagination__btn:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.4);
  outline-offset: 1px;
}

.library-pagination__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.library-pagination__info {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  min-width: 80px;
  text-align: center;
}

.library-table-head {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(120px, 0.9fr) minmax(180px, 0.9fr) minmax(140px, 0.8fr);
  gap: 18px;
  align-items: center;
  padding: 0 20px;
  min-height: 44px;
  background: #121417;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 520;
}

.library-list {
  display: block;
  margin-top: 0;
}

.library-table-head .library-cell {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.library-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.library-sort-button:hover,
.library-sort-button:focus-visible {
  color: rgba(255, 255, 255, 0.96);
}

.library-sort-button:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.34);
  outline-offset: 3px;
}

.library-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(120px, 0.9fr) minmax(180px, 0.9fr) minmax(140px, 0.8fr);
  gap: 18px;
  align-items: center;
  min-height: 54px;
  padding: 0 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #121417;
  transition:
    background-color 160ms ease,
    box-shadow 160ms ease;
  cursor: pointer;
}

.library-row:first-child {
  border-top: none;
}

.library-row:hover {
  background: #14181c;
}

.library-row.is-active {
  background: #171c20;
  box-shadow: inset 2px 0 0 rgba(108, 255, 199, 0.52);
}

.library-cell {
  min-width: 0;
  padding: 12px 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 12px;
  line-height: 1.5;
}

.library-row .library-cell--name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
}

.library-model-name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.library-model-name>span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-model-new-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 22px;
  padding: 2px 9px;
  border: none;
  border-radius: 8px;
  background: rgba(108, 255, 199, 0.12);
  color: rgba(157, 246, 196, 0.98);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
}

.library-model-badges {
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.45);
}

.library-model-badges--with-leading-fast {
  position: relative;
}

.library-model-fast-leading {
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  display: inline-flex;
  align-items: center;
  transform: translateY(-50%);
}

.library-model-badge {
  display: flex;
  align-items: center;
  justify-content: center;
}

.library-model-badge--ghost {
  visibility: hidden;
  pointer-events: none;
}

/* Touch devices: give each emblem a larger, invisible tap target so it is easy
   to hit (and hard to miss into the row). Ghost spacers keep no hit area. */
@media (hover: none) {
  #modelLibraryView .library-model-badge:not(.library-model-badge--ghost) {
    position: relative;
  }
  #modelLibraryView .library-model-badge:not(.library-model-badge--ghost)::before {
    content: "";
    position: absolute;
    inset: -11px -9px;
    z-index: 1;
  }
}

.library-shield-keyword {
  color: #66a6ff;
  font-weight: 500;
}

.library-row .library-cell--author,
.library-row .library-cell--cost {
  color: rgba(255, 255, 255, 0.9);
}

.library-author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.library-author__icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
}

.library-author__icon-badge--light {
  background: #ffffff;
}

.library-author__icon {
  width: 14px;
  height: 14px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.library-row .library-cell--cost {
  justify-self: start;
}

#modelLibraryView[data-free-plan="true"] .library-table-head .library-cell--cost,
#modelLibraryView[data-free-plan="true"] .library-row .library-cell--cost {
  display: none;
}

#modelLibraryView[data-free-plan="true"] .library-table-head .library-cell--capabilities,
#modelLibraryView[data-free-plan="true"] .library-row .library-cell--capabilities {
  grid-column: 3;
}

#modelLibraryView[data-free-plan="true"] .library-table-head .library-cell--author,
#modelLibraryView[data-free-plan="true"] .library-row .library-cell--author {
  grid-column: 4;
}

@media (max-width: 720px) {
  /* Free plan has no credits column, but still uses the same mobile card
     layout. Re-assert the card grid areas so the desktop free-plan column
     pinning (grid-column: 3/4) doesn't break card placement. */
  #modelLibraryView[data-free-plan="true"] .library-row .library-cell--capabilities {
    grid-area: caps;
  }

  #modelLibraryView[data-free-plan="true"] .library-row .library-cell--author {
    grid-area: author;
  }

  /* Free plan shows no prices, so keep the original note (not the pricing hint). */
  #modelLibraryView[data-free-plan="true"] .library-note__variant--desktop {
    display: inline;
  }

  #modelLibraryView[data-free-plan="true"] .library-note__variant--mobile {
    display: none;
  }
}

.library-credit-value {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1.4;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.library-credit-amount {
  color: rgba(255, 255, 255, 0.92);
}

/* Per-price info button — only rendered on mobile (see media query); the
   desktop table exposes the same explanation via the column-header tooltip. */
.library-credit-info {
  display: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  flex-shrink: 0;
}

.library-credit-info svg {
  width: 15px;
  height: 15px;
}

/* Note text has two variants: the model-availability line on desktop, the
   pricing hint on mobile. */
.library-note__variant--mobile {
  display: none;
}

/* Avg-credits info modal (opened by the per-price info button on mobile). */
.credit-info-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.credit-info-modal[hidden] {
  display: none;
}

.credit-info-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.credit-info-modal__panel {
  position: relative;
  width: min(360px, 100%);
  padding: 22px 20px 20px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--modal-surface);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.56);
}

.credit-info-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.credit-info-modal__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.95);
}

.credit-info-modal__title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.97);
}

.credit-info-modal__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.75);
}

:root[data-appearance-theme="light"] .credit-info-modal__panel {
  border-color: rgba(15, 23, 42, 0.12);
}

:root[data-appearance-theme="light"] .credit-info-modal__title {
  color: rgba(15, 23, 42, 0.95);
}

:root[data-appearance-theme="light"] .credit-info-modal__text {
  color: rgba(15, 23, 42, 0.7);
}

:root[data-appearance-theme="light"] .credit-info-modal__close {
  color: rgba(15, 23, 42, 0.6);
}

:root[data-appearance-theme="light"] .credit-info-modal__close:hover {
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.95);
}

.library-head-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.library-info-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.library-info-tooltip.is-portal-active .library-info-tooltip__content {
  opacity: 0 !important;
}

.library-info-tooltip__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  color: #66a6ff;
  cursor: pointer;
}

.library-info-tooltip__trigger svg {
  display: block;
  width: 13px;
  height: 13px;
}

.library-info-tooltip__content {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(280px, calc(100vw - 40px));
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: var(--modal-surface);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  z-index: 15;
}

.library-info-tooltip__content--portal {
  position: fixed !important;
  top: 0;
  left: 0;
  right: auto !important;
  bottom: auto !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(-4px) !important;
  z-index: 2000 !important;
}

.library-info-tooltip__content--portal.is-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.library-info-tooltip:hover .library-info-tooltip__content,
.library-info-tooltip:focus-within .library-info-tooltip__content {
  opacity: 1;
  transform: translateY(0);
}

/* Touch devices get a tap-to-open modal instead of the hover tooltip, so keep
   the library capability tooltip hidden even while a tap emulates :hover. */
@media (hover: none) {
  #modelLibraryView .library-info-tooltip:hover .library-info-tooltip__content,
  #modelLibraryView .library-info-tooltip:focus-within .library-info-tooltip__content {
    opacity: 0;
    pointer-events: none;
  }
}

.library-sort {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1;
}

.library-sort-button.is-active .library-sort {
  color: #ff7d4e;
}

.library-sort--accent {
  color: #ff7d4e;
}

.library-empty {
  padding: 18px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.library-meta-label {
  display: none;
}

.hero {
  width: min(860px, 100%);
  display: grid;
  gap: 12px;
  text-align: center;
  margin-bottom: 16px;
}

.hero__title {
  margin: 0;
  font-size: 44px;
  line-height: 1.1;
  font-weight: 680;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.93);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

.app.is-authenticated-session .hero:not(.is-temporary-chat) .hero__title,
.app:not(.is-guest-session) .hero:not(.is-temporary-chat) .hero__title {
  font-size: 40px;
}

.hero__subtitle {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.62);
}

.app.is-authenticated-session .hero__subtitle,
.app:not(.is-guest-session) .hero__subtitle {
  display: none;
}

.app.is-authenticated-session .hero.is-temporary-chat .hero__subtitle,
.app:not(.is-guest-session) .hero.is-temporary-chat .hero__subtitle {
  display: block;
}

.hero.is-temporary-chat {
  gap: 10px;
}

.hero.is-temporary-chat .hero__title {
  font-size: clamp(42px, 5vw, 54px);
  letter-spacing: -0.04em;
}

.hero.is-temporary-chat .hero__subtitle {
  width: min(640px, 100%);
  margin-inline: auto;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.56);
  font-weight: 430;
}

.app.is-guest-session .stage:not(.is-chatting) .hero {
  width: min(980px, 100%);
  margin-bottom: 18px;
}

.app.is-guest-session .hero__title {
  font-size: clamp(44px, 5.4vw, 62px);
  line-height: 1.04;
  font-weight: 760;
  letter-spacing: -0.05em;
}

.thread {
  width: 100%;
  max-width: 100%;
  min-height: 0;
  flex: 1;
  display: none;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: var(--chat-thread-padding-top) var(--chat-thread-padding-x) var(--chat-thread-padding-bottom);
  scrollbar-gutter: stable;
}

.stage.is-chatting .hero {
  display: none;
}

.stage.is-chatting .thread {
  width: calc(100% + (var(--chat-thread-padding-x) * 2));
  max-width: none;
  margin-left: calc(var(--chat-thread-padding-x) * -1);
  margin-right: calc(var(--chat-thread-padding-x) * -1);
  padding-left: calc(var(--chat-thread-padding-x) * 2);
  padding-right: calc(var(--chat-thread-padding-x) * 2);
  display: flex;
  flex-direction: column;
  gap: var(--chat-thread-gap);
}

.msg {
  width: min(var(--chat-message-row-width), 100%);
  margin-inline: auto;
  display: flex;
}

.msg--ai {
  justify-content: flex-start;
}

.msg--user {
  justify-content: flex-end;
}

.msg__body {
  width: fit-content;
  max-width: min(82%, 720px);
  display: flex;
  align-items: flex-end;
  gap: var(--chat-message-body-gap);
  min-width: 0;
}

.msg__content {
  display: flex;
  flex-direction: column;
  gap: var(--chat-message-stack-gap);
  align-items: flex-start;
  min-width: 0;
  max-width: 100%;
}

.msg--user .msg__body {
  gap: 0;
}

.msg--user .msg__content {
  align-items: flex-end;
}

.msg__avatar {
  width: var(--chat-avatar-size);
  height: var(--chat-avatar-size);
  border-radius: var(--chat-avatar-radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  font-size: var(--chat-avatar-font-size);
  font-weight: 720;
  flex-shrink: 0;
  user-select: none;
  overflow: hidden;
}

.msg__avatar--ai {
  background: linear-gradient(180deg, rgba(98, 255, 197, 0.18), rgba(60, 174, 147, 0.12));
  color: rgba(219, 255, 245, 0.94);
}

.msg__avatar-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transform: scale(1.6);
  transform-origin: center;
  filter: saturate(1.2) brightness(1.2);
}

.msg__avatar--subagent {
  overflow: visible;
}

.msg__badge {
  position: absolute;
  top: -8px;
  right: -12px;
  background: #ff5e5e;
  color: white;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 10;
}

.msg__avatar--user {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  color: rgba(255, 255, 255, 0.9);
}

.msg__bubble {
  padding: var(--chat-bubble-padding-y) var(--chat-bubble-padding-x);
  border-radius: 16px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--chat-bubble-font-size);
  line-height: var(--chat-bubble-line-height);
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: none;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.msg__meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.msg__meta.has-tool-duration {
  gap: 0;
}

.msg__tool-duration {
  width: min(520px, calc(100vw - 64px));
  margin: 6px 0 8px;
  color: rgba(255, 255, 255, 0.43);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.msg__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
  margin-top: -6px;
  padding-left: var(--chat-bubble-padding-x);
}

.msg--typing .msg__actions {
  display: none;
}

.msg__action-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.48);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 150ms ease, background 150ms ease, opacity 150ms ease;
}

.msg__action-btn:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
}

.msg__action-btn:focus-visible {
  outline: 2px solid rgba(130, 255, 214, 0.62);
  outline-offset: 2px;
}

.msg__action-btn svg {
  width: 15px;
  height: 15px;
  display: block;
}

.msg__action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.msg__tool-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  width: min(520px, calc(100vw - 64px));
  margin-top: 6px;
  padding-top: 12px;
  padding-left: var(--chat-bubble-padding-x);
  border-top: none;
}

.msg__meta.has-tool-duration .msg__tool-rail {
  margin-top: 0;
}

.msg__tool-rail::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.msg__tool-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(8, 10, 14, 0.96), rgba(13, 16, 22, 0.96));
  color: rgba(244, 251, 255, 0.9);
  text-align: left;
  overflow: hidden;
  transition: border-color 180ms ease;
}

.msg__tool-card.is-entering {
  animation: terminal-card-enter 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.msg__tool-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.msg__tool-card.is-active {
  border-color: rgba(255, 255, 255, 0.18);
}

@keyframes terminal-card-enter {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.msg__tool-card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.msg__tool-card-shell {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.msg__tool-card-shell:focus-visible {
  outline: none;
}

.msg__tool-card-dots {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.msg__tool-card-dots .mac-dot {
  width: 8px;
  height: 8px;
}

.msg__tool-card-screen {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 11px 4px;
  min-width: 0;
  transform: translateY(-5px);
}

.msg__tool-card-approval {
  padding: 9px 11px 0;
}

.msg__tool-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: transparent;
  color: rgba(229, 240, 247, 0.88);
  flex-shrink: 0;
}

.msg__tool-card-icon svg {
  width: 22px;
  height: 22px;
}

.msg__tool-card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.msg__tool-card-target {
  min-width: 0;
  font-family: "Consolas", "Cascadia Mono", "Courier New", monospace;
  font-size: 11.5px;
  line-height: 1.22;
  color: rgba(241, 247, 251, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg__tool-card-caption {
  min-width: 0;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
  color: rgba(173, 191, 203, 0.56);
}

.msg__tool-card-caption[data-case="sentence"] {
  letter-spacing: 0.01em;
  text-transform: none;
}

.msg__tool-card-status {
  justify-self: end;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 238, 247, 0.7);
}

.msg__tool-card-status[data-case="literal"] {
  text-transform: none;
}

.msg__tool-card[data-state="running"] .msg__tool-card-status {
  background: rgba(90, 177, 122, 0.18);
  border-color: transparent;
  color: rgba(180, 243, 204, 0.9);
}

.msg__tool-card[data-state="review"] .msg__tool-card-status {
  background: rgba(255, 255, 255, 0.08);
  border-color: transparent;
  color: rgba(235, 242, 247, 0.84);
}

.msg__tool-card[data-state="error"] .msg__tool-card-status {
  background: rgba(148, 46, 46, 0.2);
  border-color: rgba(255, 148, 148, 0.12);
  color: rgba(255, 188, 188, 0.9);
}

.msg__tool-card[data-state="done"] .msg__tool-card-status {
  background: rgba(255, 255, 255, 0.07);
  border-color: transparent;
  color: rgba(232, 241, 247, 0.74);
}

/* Minimal terminal & browser cards: just an inline glyph + faded caption. */
.msg__tool-card--terminal,
.msg__tool-card--browser {
  width: auto;
  align-self: flex-start;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  color: rgba(200, 212, 222, 0.55);
  overflow: visible;
}

.msg__tool-card--terminal:hover,
.msg__tool-card--terminal.is-active,
.msg__tool-card--browser:hover,
.msg__tool-card--browser.is-active {
  border-color: transparent;
  color: rgba(220, 232, 242, 0.78);
}

.msg__tool-card--terminal .msg__tool-card-shell,
.msg__tool-card--browser .msg__tool-card-shell {
  width: auto;
  display: inline-flex;
}

.msg__tool-card--terminal .msg__tool-card-screen,
.msg__tool-card--browser .msg__tool-card-screen {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  transform: none;
}

.msg__tool-card--terminal .msg__tool-card-icon,
.msg__tool-card--browser .msg__tool-card-icon {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: inherit;
}

.msg__tool-card--terminal .msg__tool-card-icon svg,
.msg__tool-card--browser .msg__tool-card-icon svg {
  width: 20px;
  height: 20px;
  opacity: 0.8;
}

.msg__tool-card--terminal .msg__tool-card-text,
.msg__tool-card--browser .msg__tool-card-text {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
}

.msg__tool-card--terminal .msg__tool-card-caption,
.msg__tool-card--browser .msg__tool-card-caption {
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.25;
  color: inherit;
  font-weight: 400;
}

.msg__tool-card--terminal .msg__tool-card-caption::after,
.msg__tool-card--browser .msg__tool-card-caption::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-top: 1.25px solid rgba(200, 212, 222, 0.46);
  border-right: 1.25px solid rgba(200, 212, 222, 0.46);
  transform: translateY(-1px) rotate(45deg);
}

.msg__tool-card--terminal .msg__tool-card-hint,
.msg__tool-card--browser .msg__tool-card-hint {
  font-size: 10px;
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: rgba(200, 212, 222, 0.4);
}

.msg__tool-card--terminal .msg__tool-card-approval {
  padding: 6px 0 0;
}

.msg__tool-card--terminal[data-state="running"] .msg__tool-card-caption,
.msg__tool-card--browser[data-state="running"] .msg__tool-card-caption {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.4) 30%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0.4) 70%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: typingShimmer 2s linear infinite;
  font-weight: 500;
}

.tool-inspector {
  position: absolute;
  inset: 0;
  z-index: 70;
  pointer-events: none;
}

.tool-inspector__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.38);
  opacity: 0;
  transition: opacity 280ms ease;
  pointer-events: auto;
}

.tool-inspector__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: var(--tool-inspector-width, min(420px, 38vw));
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: linear-gradient(180deg, rgba(12, 14, 18, 0.985), rgba(10, 12, 16, 0.985));
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  transform: translateX(100%);
  opacity: 0.72;
  transition:
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease;
  pointer-events: auto;
  will-change: transform, opacity;
}

.tool-inspector__resize-handle {
  position: absolute;
  top: 0;
  left: -6px;
  width: 12px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
  z-index: 2;
}

.tool-inspector__resize-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 5px;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
  opacity: 0;
  transition: opacity 160ms ease, background-color 160ms ease;
}

.tool-inspector__resize-handle:hover::before,
.main.is-tool-inspector-resizing .tool-inspector__resize-handle::before {
  opacity: 1;
  background: rgba(255, 255, 255, 0.18);
}

.main.is-tool-inspector-resizing,
.main.is-tool-inspector-resizing * {
  cursor: col-resize !important;
  user-select: none;
}

.main.is-tool-inspector-open .tool-inspector__backdrop {
  opacity: 1;
}

.main.is-tool-inspector-open .tool-inspector__panel {
  transform: translateX(0);
  opacity: 1;
}

.tool-inspector__chrome,
.tool-inspector__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tool-inspector__chrome {
  padding: 8px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.028));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.02);
}

.tool-inspector__chrome-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.tool-inspector__dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.tool-inspector__dots .mac-dot {
  width: 9px;
  height: 9px;
}

.tool-inspector__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 18px 16px;
  overflow: hidden;
}

.tool-inspector__summary,
.tool-inspector__statusbar,
.tool-inspector__approval,
.tool-inspector__footer {
  flex-shrink: 0;
}

.tool-inspector__nav {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.82);
  border-radius: 10px;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.tool-inspector__close {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
  flex-shrink: 0;
}

.tool-inspector__close svg {
  width: 18px;
  height: 18px;
}

.tool-inspector__nav {
  min-width: 84px;
  height: 36px;
  padding: 6px 14px;
  border: none;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

.tool-inspector__close:hover {
  color: rgba(255, 255, 255, 0.96);
}

.tool-inspector__nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

.tool-inspector__nav:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.tool-inspector__summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tool-inspector__summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tool-inspector__summary-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.tool-inspector__statusbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.tool-inspector__title {
  font-size: 20px;
  font-weight: 730;
  color: rgba(250, 252, 255, 0.96);
}

.tool-inspector__skip,
.tool-inspector__settings,
.tool-inspector__reset {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(214, 229, 239, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 160ms ease, opacity 160ms ease;
}

.tool-inspector__skip:hover:not(:disabled) {
  color: rgba(255, 190, 120, 0.98);
}

.tool-inspector__settings:hover,
.tool-inspector__reset:hover {
  color: rgba(255, 255, 255, 0.96);
}

.tool-inspector__skip:disabled,
.tool-inspector__settings:disabled,
.tool-inspector__reset:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.tool-inspector__skip svg,
.tool-inspector__settings svg,
.tool-inspector__reset svg {
  width: 18px;
  height: 18px;
}

.tool-inspector__subtitle {
  font-size: 12.5px;
  color: rgba(214, 229, 239, 0.66);
}

.tool-inspector__subtitle-prefix {
  color: rgba(214, 229, 239, 0.66);
}

.tool-inspector__subtitle-emphasis[data-tone="success"] {
  color: #10a37f;
}

.tool-inspector__subtitle-emphasis[data-tone="error"] {
  color: #ff7d7d;
}

.tool-inspector__counter {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tool-inspector__counter {
  color: rgba(175, 194, 206, 0.62);
}

.tool-inspector__approval {
  margin-top: -2px;
}

.tool-inspector__command,
.tool-inspector__command-prompt,
.tool-inspector__meta {
  font-family: "Consolas", "Cascadia Mono", "Courier New", monospace;
}

.tool-inspector__command-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(176, 196, 210, 0.6);
  margin-bottom: -6px;
  flex-shrink: 0;
}

.tool-inspector__console {
  flex: 1 1 0;
  min-height: 180px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(7, 9, 13, 0.97), rgba(10, 12, 16, 0.99));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.015);
}

.tool-inspector__command-wrap {
  flex: 0 1 auto;
  min-height: 42px;
  max-height: min(30vh, 240px);
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  overflow: auto;
  scrollbar-gutter: stable;
}

.tool-inspector__command-prompt {
  flex-shrink: 0;
  color: #29c58b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  user-select: none;
}

.tool-inspector__command {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: rgba(236, 247, 255, 0.88);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}

.tool-inspector__console[data-kind="browser"] .tool-inspector__command-prompt {
  color: #29c58b;
}

.tool-inspector__console-divider {
  position: relative;
  height: 2px;
  margin: 0;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.075);
  outline: none;
  transition: background-color 150ms ease;
  z-index: 3;
}

.tool-inspector__console-divider[data-resizable="true"] {
  cursor: row-resize;
  touch-action: none;
}

.tool-inspector__console-divider[data-resizable="true"]::before {
  content: "";
  position: absolute;
  inset: -7px 0;
}

.tool-inspector__console-divider[data-resizable="true"]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transform: translate(-50%, -50%);
  transition: background-color 150ms ease;
}

.tool-inspector__console-divider[data-resizable="true"]:hover,
.tool-inspector__console-divider[data-resizable="true"]:focus-visible,
.is-tool-inspector-console-resizing .tool-inspector__console-divider[data-resizable="true"] {
  background: rgba(255, 255, 255, 0.14);
}

.tool-inspector__console-divider[data-resizable="true"]:hover::after,
.tool-inspector__console-divider[data-resizable="true"]:focus-visible::after,
.is-tool-inspector-console-resizing .tool-inspector__console-divider[data-resizable="true"]::after {
  background: rgba(255, 255, 255, 0.38);
}

.tool-inspector__console.is-console-split-custom .tool-inspector__command-wrap {
  flex: 0 0 var(--tool-inspector-command-height);
  height: var(--tool-inspector-command-height);
  max-height: none;
}

.is-tool-inspector-console-resizing,
.is-tool-inspector-console-resizing * {
  cursor: row-resize !important;
  user-select: none !important;
}

.tool-inspector__meta {
  flex-shrink: 0;
  padding: 8px 14px 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  color: rgba(176, 196, 210, 0.6);
  font-size: 11px;
  line-height: 1.35;
  min-height: 15px;
}

.tool-inspector__meta[hidden] {
  display: none;
}

.tool-inspector__output-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 96px;
  display: flex;
}

.tool-inspector__output {
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 42px 15px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(230, 242, 251, 0.9);
  font-family: "Consolas", "Cascadia Mono", "Courier New", monospace;
  font-size: var(--tool-output-font-size, 12px);
  line-height: 1.55;
  overflow-y: auto;
  overflow-x: hidden;
  white-space: pre;
  word-break: normal;
  overflow-anchor: none;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  contain: layout paint style;
}

.tool-inspector__output.is-virtualized {
  white-space: pre;
  word-break: normal;
}

.tool-inspector__output::-webkit-scrollbar-corner {
  background: transparent;
}

.tool-inspector__output-spacer,
.tool-inspector__output-window {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

.tool-inspector__output-spacer {
  width: 1px;
  min-width: 1px;
  pointer-events: none;
}

.tool-inspector__output-window {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.tool-inspector__output-tools {
  position: absolute;
  top: 8px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 0;
  z-index: 2;
  padding: 2px 4px;
  border-radius: 6px;
  background: #0a0c10;
}

.tool-inspector__output-copy,
.tool-inspector__output-zoom {
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: color 150ms ease;
}

.tool-inspector__output-copy:hover {
  color: rgba(255, 255, 255, 0.95);
}

.tool-inspector__output-zoom {
  font: 18px/1 "Consolas", monospace;
}

.tool-inspector__output-zoom:hover:not(:disabled) {
  color: rgba(255, 255, 255, 0.95);
}

.tool-inspector__output-zoom:disabled {
  opacity: 0.35;
  cursor: default;
}

.tool-inspector__output-zoom-value {
  min-width: 32px;
  text-align: center;
  color: rgba(255, 255, 255, 0.62);
  font: 11px/1 "Consolas", monospace;
  font-variant-numeric: tabular-nums;
}

:root[data-appearance-theme="light"] .tool-inspector__output-tools {
  background: #f7f9fc;
}

:root[data-appearance-theme="light"] .tool-inspector__output-zoom,
:root[data-appearance-theme="light"] .tool-inspector__output-zoom-value {
  color: rgba(15, 23, 42, 0.62);
}

:root[data-appearance-theme="light"] .tool-inspector__output-zoom:hover:not(:disabled) {
  color: rgba(15, 23, 42, 0.92);
}

.tool-inspector__output-copy[hidden] {
  display: none;
}

.tool-inspector__output-jump {
  position: absolute;
  right: 22px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: #0a0c10;
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  z-index: 2;
  transition: color 150ms ease, border-color 150ms ease;
}

.tool-inspector__output-jump[hidden] {
  display: none;
}

.tool-inspector__output-jump svg {
  width: 18px;
  height: 18px;
}

.tool-inspector__output-jump:hover {
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.24);
}

.tool-inspector__output-jump:focus-visible,
.tool-inspector__output:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: -2px;
}

:root[data-appearance-theme="light"] .tool-inspector__output-jump {
  background: #f7f9fc;
  color: rgba(15, 23, 42, 0.62);
  border-color: rgba(15, 23, 42, 0.12);
}

:root[data-appearance-theme="light"] .tool-inspector__output-jump:hover {
  color: rgba(15, 23, 42, 0.92);
  border-color: rgba(15, 23, 42, 0.3);
}

.tool-inspector__output.is-empty::before {
  content: attr(data-empty-label);
  color: rgba(176, 196, 210, 0.42);
  font-style: italic;
}

.tool-inspector__artifacts {
  flex: 0 1 auto;
  min-height: 0;
  max-height: min(24vh, 190px);
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
  padding: 2px 4px 2px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.tool-inspector__artifacts[hidden] {
  display: none;
}

.tool-inspector__artifacts-label {
  flex-basis: 100%;
  margin-bottom: 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(201, 225, 239, 0.6);
}

.tool-inspector__artifact {
  flex: 1 1 calc(50% - 5px);
  min-width: 0;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: "Consolas", "Cascadia Mono", "Courier New", monospace;
  font-size: 11px;
  color: rgba(201, 225, 239, 0.78);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-inspector__artifact--toggle {
  flex: 0 0 auto;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.09);
  color: rgba(201, 214, 224, 0.62);
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tool-inspector__artifact--toggle:hover {
  background: rgba(255, 255, 255, 0.085);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(218, 228, 236, 0.78);
}

.tool-inspector__artifact--toggle:focus-visible {
  outline: 2px solid rgba(202, 216, 226, 0.42);
  outline-offset: 1px;
}

.msg__tool-card-approval,
.tool-inspector__approval {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.terminal-approval__prompt {
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(230, 239, 246, 0.84);
}

.terminal-approval__actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.terminal-approval__btn {
  min-width: 42px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(238, 245, 249, 0.84);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

.terminal-approval__btn:hover:not(:disabled) {
  opacity: 0.96;
}

.terminal-approval__btn--yes {
  background: rgba(16, 163, 127, 0.18);
  color: rgba(186, 243, 225, 0.96);
}

.terminal-approval__btn--yes:hover:not(:disabled) {
  background: rgba(16, 163, 127, 0.24);
}

.terminal-approval__btn[data-active="true"] {
  opacity: 0.72;
}

.terminal-approval__btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

@media (min-width: 901px) {
  .tool-inspector__backdrop {
    background: transparent;
    pointer-events: none;
  }
}

.msg__attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
}

.msg__attachment {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  flex: 0 1 auto;
  min-width: 180px;
  max-width: min(300px, 100%);
  padding: 6px 32px 6px 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.92);
}

.msg__attachment:hover {
  background: rgba(255, 255, 255, 0.06);
}

.msg__attachment-preview {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.msg__attachment-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.msg__attachment-preview[data-file-ext=".pdf"] {
  background: #ef4444;
}

.msg__attachment-preview[data-file-ext=".txt"],
.msg__attachment-preview[data-file-ext=".md"],
.msg__attachment-preview[data-file-ext=".csv"] {
  background: #0ea5e9;
}

.msg__attachment-preview[data-file-ext=".pdf"] .msg__attachment-icon,
.msg__attachment-preview[data-file-ext=".txt"] .msg__attachment-icon,
.msg__attachment-preview[data-file-ext=".md"] .msg__attachment-icon,
.msg__attachment-preview[data-file-ext=".csv"] .msg__attachment-icon {
  color: #ffffff;
  opacity: 1;
}

.msg__attachment-icon {
  font-size: 16px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.msg__attachment-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.msg__attachment-name {
  font-size: 12px;
  font-weight: 640;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg__attachment-info {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
}

.msg__todo-card,
.msg__finish-note {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 12px;
}

.msg__todo-card {
  background: linear-gradient(180deg, rgba(12, 26, 34, 0.92), rgba(11, 19, 26, 0.88));
}

.msg__todo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.msg__todo-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(182, 232, 255, 0.88);
}

.msg__todo-summary {
  font-size: 12px;
  color: rgba(232, 245, 255, 0.82);
}

.msg__todo-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.msg__todo-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  font-size: 12.5px;
  color: rgba(244, 250, 255, 0.88);
}

.msg__todo-status {
  min-width: 74px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(167, 219, 245, 0.62);
}

.msg__todo-item[data-status="completed"] .msg__todo-status {
  color: rgba(130, 247, 188, 0.86);
}

.msg__todo-item[data-status="in_progress"] .msg__todo-status {
  color: rgba(255, 214, 125, 0.92);
}

.msg__todo-item[data-status="cancelled"] .msg__todo-status {
  color: rgba(255, 158, 158, 0.84);
}

.msg__finish-note {
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(238, 244, 248, 0.76);
}

.msg__finish-note[data-state="continuing"] {
  border-color: rgba(115, 215, 255, 0.24);
  color: rgba(214, 244, 255, 0.88);
}

.msg__finish-note[data-state="paused"] {
  border-color: rgba(255, 215, 126, 0.22);
}

.msg__markdown {
  white-space: normal;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.msg__inline-capability-icon {
  display: inline-flex;
  width: 1.08em;
  height: 1.08em;
  margin: 0 0.12em;
  color: rgba(255, 255, 255, 0.45);
  vertical-align: -0.16em;
}

.msg__inline-capability-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.msg__markdown>*:first-child {
  margin-top: 0;
}

.msg__markdown>*:last-child {
  margin-bottom: 0;
}

.msg__markdown h1,
.msg__markdown h2,
.msg__markdown h3,
.msg__markdown h4,
.msg__markdown h5,
.msg__markdown h6 {
  margin: 1.1em 0 0.45em;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.96);
}

.msg__markdown h1 {
  font-size: 1.55rem;
}

.msg__markdown h2 {
  font-size: 1.35rem;
}

.msg__markdown h3 {
  font-size: 1.15rem;
}

.msg__markdown h4,
.msg__markdown h5,
.msg__markdown h6 {
  font-size: 1rem;
}

.msg__markdown p,
.msg__markdown ul,
.msg__markdown ol,
.msg__markdown blockquote,
.msg__markdown hr,
.msg__markdown .msg__codeblock {
  margin: 0.85em 0;
}

.msg__markdown ul,
.msg__markdown ol {
  padding-left: 1.3rem;
}

.msg__markdown li+li {
  margin-top: 0.4em;
}

.msg__markdown li>p {
  margin: 0.45em 0;
}

.msg__markdown blockquote {
  padding: 0.1rem 0 0.1rem 0.9rem;
  border-left: 3px solid rgba(108, 255, 199, 0.45);
  color: rgba(255, 255, 255, 0.72);
}

.msg__markdown hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.msg__inline-code {
  display: inline-block;
  padding: 0.01rem 0.3rem;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(227, 255, 247, 0.98);
  font-family: "Consolas", "Cascadia Mono", "Courier New", monospace;
  font-size: 0.92em;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.msg__codeblock {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(8, 10, 14, 0.95), rgba(16, 18, 24, 0.95));
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}

.msg__codeblock-label {
  padding: 0.25rem 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.msg__codeblock-label-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.msg__codeblock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.msg__codeblock-label-text {
  min-width: 0;
}

.msg__codeblock-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 2px;
}

.mac-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  opacity: 0.9;
}

.mac-dot--red {
  background: #ed594a;
}

.mac-dot--yellow {
  background: #fdd800;
}

.mac-dot--green {
  background: #5ac05a;
}

.msg__codeblock-copy {
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 150ms ease, opacity 150ms ease;
}

.msg__codeblock-copy:hover {
  color: rgba(255, 255, 255, 0.9);
}

.msg__markdown pre {
  margin: 0;
  padding: 0.95rem 1rem 1.05rem;
  overflow-x: auto;
  white-space: pre;
  max-width: 100%;
}

.msg__markdown pre::-webkit-scrollbar {
  height: 12px;
}

.msg__markdown pre::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.25);
}

.msg__markdown pre::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

.msg__markdown pre::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
  border: 3px solid transparent;
  background-clip: padding-box;
}

.msg__markdown pre::-webkit-scrollbar-button:single-button:horizontal {
  display: block;
  height: 12px;
  width: 16px;
  background-size: 8px;
  background-repeat: no-repeat;
  background-position: center;
}

.msg__markdown pre::-webkit-scrollbar-button:single-button:horizontal:decrement {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666666'%3e%3cpath d='M15 19l-7-7 7-7z'/%3e%3c/svg%3e");
}

.msg__markdown pre::-webkit-scrollbar-button:single-button:horizontal:decrement:hover {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23aaaaaa'%3e%3cpath d='M15 19l-7-7 7-7z'/%3e%3c/svg%3e");
}

.msg__markdown pre::-webkit-scrollbar-button:single-button:horizontal:increment {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666666'%3e%3cpath d='M9 5l7 7-7 7z'/%3e%3c/svg%3e");
}

.msg__markdown pre::-webkit-scrollbar-button:single-button:horizontal:increment:hover {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23aaaaaa'%3e%3cpath d='M9 5l7 7-7 7z'/%3e%3c/svg%3e");
}

.msg__markdown pre code {
  display: block;
  font-family: "Consolas", "Cascadia Mono", "Courier New", monospace;
  font-size: 0.86rem;
  line-height: 1.65;
  color: rgba(232, 244, 255, 0.92);
}

.msg__code {
  display: block;
}

.msg__code-token--comment {
  color: #7f8a9b;
}

.msg__code-token--keyword {
  color: #ff7ab2;
}

.msg__code-token--string {
  color: #7ee787;
}

.msg__code-token--number {
  color: #ffb86c;
}

.msg__code-token--function {
  color: #82aaff;
}

.msg__code-token--method,
.msg__code-token--property,
.msg__code-token--variable {
  color: #c792ea;
}

.msg__code-token--builtin {
  color: #78dce8;
}

.msg__code-token--type {
  color: #ffd580;
}

.msg__code-token--attr {
  color: #f6c177;
}

.msg__code-token--tag {
  color: #ff966c;
}

.msg__code-token--operator,
.msg__code-token--punctuation,
.msg__code-token--atom {
  color: rgba(232, 244, 255, 0.92);
}

.msg__link {
  color: rgba(135, 228, 255, 0.95);
  text-decoration: underline;
  text-decoration-color: rgba(135, 228, 255, 0.4);
  text-underline-offset: 0.18em;
}

.msg__link:hover {
  color: rgba(180, 240, 255, 1);
}

.msg__regular-text {
  min-width: 0;
  max-width: 100%;
}

.msg__streaming-text {
  white-space: pre-wrap;
}

.msg__streaming-text::after {
  display: none;
}

.msg__streaming-markdown .msg__streaming-caret {
  display: none;
}

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

.msg--user .msg__bubble {
  padding: var(--chat-user-bubble-padding-y) var(--chat-user-bubble-padding-x);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 248, 235, 0.96);
  box-shadow: none;
}

.msg__steering-status {
  position: absolute;
  top: 50%;
  right: 100%;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  display: grid;
  place-items: center;
  opacity: 0.62;
  transform: translateY(-50%);
  pointer-events: none;
}

.msg--live-steering .msg__body {
  position: relative;
}

.msg__steering-status::before {
  content: "";
  box-sizing: border-box;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-top-color: rgba(255, 255, 255, 0.62);
}

.msg__steering-status[data-state="queued"]::before {
  animation: steeringStatusSpin 0.9s linear infinite;
}

.msg__steering-status[data-state="failed"]::before {
  width: 6px;
  height: 6px;
  border: 0;
  background: rgba(255, 128, 128, 0.86);
  box-shadow: 0 0 0 3px rgba(255, 128, 128, 0.1);
}

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

@media (prefers-reduced-motion: reduce) {
  .msg__steering-status[data-state="queued"]::before,
  .history-item__scan-indicator::before {
    animation: none;
  }
}

.msg--typing .msg__action-text {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.4) 30%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0.4) 70%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: typingShimmer 2s linear infinite;
  font-style: normal;
  font-weight: 500;
}

.msg__status-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  margin-bottom: 6px;
}

.msg--ai {
  position: relative;
}

.msg--ai .msg__bubble {
  overflow: visible;
}

.msg--ai .msg__finalize-now {
  position: absolute;
  top: var(--chat-bubble-padding-y, 12px);
  right: 0;
  margin: 0;
  z-index: 2;
}

.msg__action-text {
  min-width: 0;
  flex: 1 1 auto;
}

.msg__finalize-now {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.64);
  font-size: 12.5px;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.msg__finalize-now:hover {
  color: rgba(255, 255, 255, 0.88);
}

.msg__finalize-now:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.28);
  outline-offset: 3px;
  border-radius: 999px;
}

.msg__finalize-now:disabled {
  cursor: default;
  color: rgba(255, 255, 255, 0.38);
}

.msg__search-links {
  display: flex;
  align-items: flex-start;
  margin: 4px 0 10px;
  opacity: 0;
  transform: translateY(-3px);
  animation: searchPreviewIn 110ms ease-out forwards;
  will-change: opacity, transform;
}

.msg__search-links.is-exiting {
  pointer-events: none;
  animation: searchPreviewOut 180ms ease-in forwards;
}

.msg__search-link {
  display: inline-block;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg__search-link:hover {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: underline;
}

@keyframes searchPreviewIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes searchPreviewOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-3px);
  }
}

@keyframes typingShimmer {
  to {
    background-position: 200% center;
  }
}

.cot-text {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.45);
  white-space: pre-wrap;
  word-break: break-word;
  padding-left: 2px;
  font-style: italic;
  line-height: 1.5;
}

.cot-text--live::after {
  display: none;
}

.cot-block {
  position: relative;
}

.cot-text--clamp {
  overflow: hidden;
  transition: max-height 0.32s ease;
}

.cot-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 20px;
  margin: 2px 0 0 0;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.cot-toggle:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.06);
}

.cot-toggle svg {
  transition: transform 0.32s ease;
}

.cot-block.is-expanded .cot-toggle svg {
  transform: rotate(180deg);
}

.swarm-process {
  min-width: 0;
  max-width: 100%;
  margin: 0 0 12px;
}

.swarm-process__toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font: inherit;
  font-size: var(--chat-bubble-font-size);
  font-weight: 500;
  line-height: var(--chat-bubble-line-height);
  text-align: left;
  cursor: pointer;
}

.swarm-process__toggle:hover {
  color: rgba(255, 255, 255, 0.94);
}

.swarm-process__toggle:focus-visible {
  outline: 2px solid rgba(102, 255, 80, 0.45);
  outline-offset: 4px;
  border-radius: 4px;
}

.swarm-process__title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Completed swarm history matches the resting "Thinking..." typography. */
.swarm-process.is-complete .swarm-process__title {
  color: rgba(255, 255, 255, 0.4);
  font-style: normal;
  font-weight: 500;
}

/* Live swarm title mirrors the agent-mode "Thinking..." shimmer exactly. */
.swarm-process.is-live .swarm-process__title {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.4) 30%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0.4) 70%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: typingShimmer 2s linear infinite;
  font-style: normal;
  font-weight: 500;
}

.swarm-process__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.55);
  transition: transform 0.18s ease;
  transform-origin: center;
}

.swarm-process__chevron svg {
  width: 14px;
  height: 14px;
}

.swarm-process:not(.is-expanded) .swarm-process__chevron {
  transform: rotate(-90deg);
}

.swarm-process__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin: 9px 0 0 2px;
}

.swarm-process__body[hidden] {
  display: none;
}

.swarm-process__entry {
  min-width: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13.5px;
  font-style: italic;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.swarm-process__entry--phase,
.swarm-process__entry--verdict {
  color: rgba(255, 255, 255, 0.68);
  font-weight: 500;
}

.swarm-process__entry--worker {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.swarm-process__worker-status {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  font-style: normal;
}

/* Active worker labels stay in phase with the live Swarm title shimmer. */
.swarm-process.is-live .swarm-process__entry--worker:not(.is-complete):not(.has-error) .swarm-process__worker-status {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.4) 30%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0.4) 70%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: typingShimmer 2s linear infinite;
}

.swarm-process__entry--worker.is-complete .swarm-process__worker-status {
  color: #10a37f;
}

.swarm-process__entry--worker.has-error .swarm-process__worker-status {
  color: rgba(255, 184, 143, 0.92);
}

.swarm-process + .msg__regular-text {
  margin-top: 12px;
}

@keyframes cotCaretBlink {

  0%,
  45% {
    opacity: 0.8;
  }

  46%,
  100% {
    opacity: 0;
  }
}

.composer {
  width: min(var(--chat-composer-width), 100%);
  display: grid;
  gap: var(--chat-composer-gap);
  justify-items: center;
  margin-top: auto;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.composer__notice {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 183, 77, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 183, 77, 0.16) 0%, rgba(255, 116, 61, 0.12) 100%),
    rgba(33, 33, 33, 0.94);
  color: rgba(255, 244, 228, 0.96);
}

.composer__notice[hidden] {
  display: none;
}

.composer__notice-text {
  flex: 1 1 auto;
  font-size: 13px;
  line-height: 1.5;
}

.composer__notice-action {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 244, 228, 0.14);
  color: rgba(255, 249, 240, 0.98);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.composer__notice-action:hover {
  background: rgba(255, 244, 228, 0.2);
  transform: translateY(-1px);
}

.app.is-guest-session .stage:not(.is-chatting) .composer {
  width: min(720px, 100%);
  margin-top: 0;
}

.app.is-authenticated-session .stage:not(.is-chatting) .composer {
  width: min(700px, 100%);
  margin-top: 0;
}

.app.is-authenticated-session .stage:not(.is-chatting) .composer__shell,
.app.is-guest-session .stage:not(.is-chatting) .composer__shell {
  padding: 4px 18px 14px;
}

.app.is-authenticated-session .stage:not(.is-chatting) .composer__input,
.app.is-guest-session .stage:not(.is-chatting) .composer__input {
  min-height: 54px;
}

.composer__shell {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px var(--chat-composer-shell-padding-x) var(--chat-composer-shell-padding-y);
  border-radius: var(--chat-composer-radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #212121;
  box-shadow: none;
}

.composer__shell:has(.mode-switcher[data-mode="swarm"]) {
  border-color: rgba(108, 255, 199, 0.32);
}

.composer__shell:has(.mode-switcher[data-mode="agent"]) {
  border-color: rgba(108, 255, 199, 0.32);
}

.composer__shell.is-loading {
  position: relative;
  pointer-events: none;
}

.composer__shell.is-loading>* {
  opacity: 0;
}

.composer__shell.is-loading::before,
.composer__shell.is-loading::after {
  content: "";
  position: absolute;
  left: 18px;
  border-radius: 999px;
  background: var(--ui-skeleton-base);
  overflow: hidden;
}

.composer__shell.is-loading::before {
  top: 22px;
  width: min(54%, 260px);
  height: 14px;
}

.composer__shell.is-loading::after {
  left: 18px;
  bottom: 20px;
  width: 140px;
  height: 12px;
}

.composer__shell.is-loading::before,
.composer__shell.is-loading::after {
  box-shadow: inset 0 0 0 1px transparent;
}

.composer__shell.is-loading::before,
.composer__shell.is-loading::after {
  background-image: linear-gradient(90deg,
      var(--ui-skeleton-base) 0%,
      var(--ui-skeleton-highlight) 48%,
      var(--ui-skeleton-base) 100%);
  background-size: 200% 100%;
  animation: composer-shell-skeleton 1.35s linear infinite;
}

@keyframes composer-shell-skeleton {
  100% {
    background-position: -200% 0;
  }
}

.composer__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.composer__toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.composer__toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.composer__inputwrap {
  width: 100%;
  display: grid;
  position: relative;
}

.composer__file-input {
  display: none;
}

.composer__input {
  width: 100%;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--chat-composer-input-font-size);
  line-height: var(--chat-composer-input-line-height);
  padding: 0 4px 6px 4px;
  min-height: var(--chat-composer-input-min-height);
  max-height: 200px;
  overflow-y: auto;
}

.composer__input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.composer__guest-placeholder {
  display: none;
  position: absolute;
  top: 0;
  left: 4px;
  color: rgba(255, 255, 255, 0.45);
  font-size: var(--chat-composer-input-font-size);
  line-height: var(--chat-composer-input-line-height);
  white-space: nowrap;
  pointer-events: none;
}

.composer__guest-placeholder-swarm,
.pricing-card__beta {
  display: inline-block;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.45) 35%, rgba(108, 255, 199, 0.78) 50%, rgba(255, 255, 255, 0.45) 65%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: typingShimmer 2s linear infinite;
}

.app.is-guest-session .composer__shell:has(.mode-switcher[data-mode="assistant"]) .composer__input::placeholder {
  color: transparent;
}

.app.is-guest-session .composer__shell:has(.mode-switcher[data-mode="assistant"]) .composer__inputwrap:not(.is-transcribing) .composer__input:placeholder-shown + .composer__guest-placeholder {
  display: inline-flex;
}

.composer__inputwrap.is-transcribing .composer__input::placeholder {
  color: transparent;
}

.composer__transcribe-spinner {
  position: absolute;
  left: 6px;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(108, 255, 199, 0.2);
  border-top-color: rgba(108, 255, 199, 0.95);
  border-right-color: rgba(108, 255, 199, 0.75);
  transform: translateY(-50%);
  animation: composer-spin 0.8s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes composer-spin {
  from {
    transform: translateY(-50%) rotate(0deg);
  }

  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.composer__attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.composer__attachment {
  min-width: 220px;
  max-width: min(100%, 280px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 48px 8px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  position: relative;
  overflow: hidden;
}

.composer__attachment[data-status="uploading"] {
  opacity: 0.75;
}

.composer__attachment-preview {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.composer__attachment-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.composer__attachment-preview[data-file-ext=".pdf"] {
  background: #ef4444;
}

.composer__attachment-preview[data-file-ext=".txt"],
.composer__attachment-preview[data-file-ext=".md"],
.composer__attachment-preview[data-file-ext=".csv"] {
  background: #0ea5e9;
}

.composer__attachment-preview[data-file-ext=".pdf"] .composer__attachment-icon,
.composer__attachment-preview[data-file-ext=".txt"] .composer__attachment-icon,
.composer__attachment-preview[data-file-ext=".md"] .composer__attachment-icon,
.composer__attachment-preview[data-file-ext=".csv"] .composer__attachment-icon {
  color: #ffffff;
  opacity: 1;
}

.composer__attachment-icon {
  font-size: 16px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.composer__attachment-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.composer__attachment-name {
  font-size: 12px;
  font-weight: 640;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.composer__attachment-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.52);
}

.composer__attachment-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #ffffff;
  color: #000000;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  padding: 0;
  z-index: 10;
}

.composer__attachment-remove:hover {
  background: #e5e5e5;
}

.composer__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.agent-stop-coachmark {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  z-index: 12;
  width: max-content;
  max-width: min(238px, calc(100vw - 32px));
  padding: 10px 12px;
  border-radius: 10px;
  background: #050505;
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
  font-size: 12.5px;
  font-weight: 520;
  line-height: 1.4;
  letter-spacing: -0.005em;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transform: translateY(5px) scale(0.98);
  transform-origin: calc(100% - 19px) 100%;
  transition:
    opacity 240ms ease,
    transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 0s linear 240ms;
  pointer-events: none;
}

.agent-stop-coachmark--confirm {
  max-width: min(288px, calc(100vw - 32px));
}

.agent-stop-coachmark::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 100%;
  width: 0;
  height: 0;
  border: 7px solid transparent;
  border-top-color: #050505;
}

.agent-stop-coachmark.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
  .agent-stop-coachmark {
    transform: none;
    transition-duration: 1ms;
  }
}

.sendbtn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.92);
  color: rgba(0, 0, 0, 0.85);
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
}

.sendbtn__icon {
  grid-area: 1 / 1;
}

.sendbtn__icon--stop {
  display: none;
}

.sendbtn.sendbtn--stop .sendbtn__icon--send {
  display: none;
}

.sendbtn.sendbtn--stop .sendbtn__icon--stop {
  display: block;
}

.sendbtn:hover {
  background: rgba(255, 255, 255, 0.98);
}

.sendbtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.composer__hint {
  font-size: 12px;
  color: var(--muted2);
  min-height: 14px;
}

.guest-legal {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 44px));
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  flex-shrink: 0;
  z-index: 3;
}

.guest-legal__link {
  color: rgba(255, 255, 255, 0.88);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 1px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}

.app:not(.is-guest-session) .guest-legal {
  display: none;
}

.stage.is-hidden~.guest-legal {
  display: none;
}

.stage.is-chatting~.guest-legal {
  display: none;
}

.composer__shell:focus-within {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.thread::-webkit-scrollbar {
  width: 10px;
}

.history__list::-webkit-scrollbar {
  width: 8px;
}

.history__list::-webkit-scrollbar-thumb,
.thread::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.history__list::-webkit-scrollbar-thumb:hover,
.thread::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.33);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.history__list::-webkit-scrollbar-track,
.thread::-webkit-scrollbar-track {
  background: transparent;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
}

.auth-modal__panel {
  position: relative;
  width: min(360px, calc(100vw - 32px));
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--modal-surface);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.56);
  padding: 24px 18px 24px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.auth-modal__loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: var(--modal-surface);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.auth-modal__panel.is-busy .auth-modal__loading {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal__panel.is-busy .auth-modal__body,
.auth-modal__panel.is-busy .auth-modal__close {
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.auth-modal__spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid rgba(108, 255, 199, 0.18);
  border-top-color: rgba(108, 255, 199, 0.94);
  animation: auth-modal-spinner 760ms linear infinite;
}

@keyframes auth-modal-spinner {
  to {
    transform: rotate(360deg);
  }
}

.auth-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.74);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.auth-modal__close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.96);
}

.auth-modal__body {
  display: grid;
  gap: 14px;
  transition:
    opacity 180ms ease,
    transform 220ms ease;
}

.auth-modal__body.is-transitioning {
  opacity: 0;
  transform: translateY(8px);
}

.auth-modal__view {
  display: grid;
  gap: 14px;
}

.auth-modal__view--success .auth-modal__title,
.auth-modal__view--suspended .auth-modal__title {
  margin-top: 0;
}

.auth-modal__view--success .auth-modal__copy,
.auth-modal__view--suspended .auth-modal__copy {
  justify-self: center;
  text-align: center;
}

.auth-modal__body[data-step="email"] .auth-modal__view--code,
.auth-modal__body[data-step="email"] .auth-modal__view--password,
.auth-modal__body[data-step="email"] .auth-modal__view--mfa,
.auth-modal__body[data-step="email"] .auth-modal__view--mfa-recovery,
.auth-modal__body[data-step="email"] .auth-modal__view--suspended,
.auth-modal__body[data-step="email"] .auth-modal__view--success,
.auth-modal__body[data-step="code"] .auth-modal__view--email,
.auth-modal__body[data-step="code"] .auth-modal__view--password,
.auth-modal__body[data-step="code"] .auth-modal__view--mfa,
.auth-modal__body[data-step="code"] .auth-modal__view--mfa-recovery,
.auth-modal__body[data-step="code"] .auth-modal__view--suspended,
.auth-modal__body[data-step="code"] .auth-modal__view--success,
.auth-modal__body[data-step="password"] .auth-modal__view--email,
.auth-modal__body[data-step="password"] .auth-modal__view--code,
.auth-modal__body[data-step="password"] .auth-modal__view--mfa,
.auth-modal__body[data-step="password"] .auth-modal__view--mfa-recovery,
.auth-modal__body[data-step="password"] .auth-modal__view--suspended,
.auth-modal__body[data-step="password"] .auth-modal__view--success,
.auth-modal__body[data-step="mfa"] .auth-modal__view--email,
.auth-modal__body[data-step="mfa"] .auth-modal__view--code,
.auth-modal__body[data-step="mfa"] .auth-modal__view--password,
.auth-modal__body[data-step="mfa"] .auth-modal__view--mfa-recovery,
.auth-modal__body[data-step="mfa"] .auth-modal__view--suspended,
.auth-modal__body[data-step="mfa"] .auth-modal__view--success,
.auth-modal__body[data-step="mfa-recovery"] .auth-modal__view--email,
.auth-modal__body[data-step="mfa-recovery"] .auth-modal__view--code,
.auth-modal__body[data-step="mfa-recovery"] .auth-modal__view--password,
.auth-modal__body[data-step="mfa-recovery"] .auth-modal__view--mfa,
.auth-modal__body[data-step="mfa-recovery"] .auth-modal__view--suspended,
.auth-modal__body[data-step="mfa-recovery"] .auth-modal__view--success,
.auth-modal__body[data-step="success"] .auth-modal__view--email,
.auth-modal__body[data-step="success"] .auth-modal__view--code,
.auth-modal__body[data-step="success"] .auth-modal__view--password,
.auth-modal__body[data-step="success"] .auth-modal__view--mfa,
.auth-modal__body[data-step="success"] .auth-modal__view--mfa-recovery,
.auth-modal__body[data-step="success"] .auth-modal__view--suspended,
.auth-modal__body[data-step="suspended"] .auth-modal__view--email,
.auth-modal__body[data-step="suspended"] .auth-modal__view--code,
.auth-modal__body[data-step="suspended"] .auth-modal__view--password,
.auth-modal__body[data-step="suspended"] .auth-modal__view--mfa,
.auth-modal__body[data-step="suspended"] .auth-modal__view--mfa-recovery,
.auth-modal__body[data-step="suspended"] .auth-modal__view--success {
  display: none;
}

.auth-modal__title {
  margin: 8px 0 0;
  text-align: center;
  font-size: 19px;
  line-height: 1.18;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.97);
}

.auth-modal__copy {
  margin: 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

.auth-modal__providers {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.auth-modal__google-provider {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal__google-provider[hidden] {
  display: none;
}

.auth-modal__provider {
  width: 100%;
  min-height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.95);
  font: inherit;
  font-size: 15.5px;
  font-weight: 620;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

.auth-modal__provider[hidden] {
  display: none;
}

.auth-modal__provider:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

.auth-modal__provider:disabled {
  cursor: default;
  opacity: 0.72;
}

.auth-modal__provider-icon {
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.auth-modal__provider-logo {
  width: 17px;
  height: 17px;
  object-fit: contain;
  display: block;
}

.auth-modal__divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.auth-modal__divider::before,
.auth-modal__divider::after {
  content: "";
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.auth-modal__field {
  display: block;
}

.auth-modal__field[hidden] {
  display: none !important;
}

.auth-modal__input {
  width: 100%;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.96);
  padding: 0 16px;
  font: inherit;
  font-size: 15px;
  outline: none;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

.auth-modal__input::placeholder {
  color: rgba(255, 255, 255, 0.42);
  font-weight: 400;
}

.auth-modal__input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
}

.auth-modal__input--code {
  text-align: center;
  letter-spacing: 0.34em;
  font-variant-numeric: tabular-nums;
}

.auth-modal__inline-link {
  justify-self: center;
  border: none;
  background: transparent;
  padding: 0;
  margin-top: -4px;
  color: rgba(255, 255, 255, 0.74);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.auth-modal__inline-link:hover {
  color: rgba(255, 255, 255, 0.92);
}

.auth-modal__inline-link--thin {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.password-setup__forgot {
  justify-self: start;
  margin: -6px 0 0 20px;
  text-decoration: none;
}

.auth-modal__continue {
  width: 100%;
  min-height: 52px;
  border: none;
  border-radius: 999px;
  background: rgba(108, 255, 199, 0.12);
  color: rgba(220, 255, 245, 0.95);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.auth-modal__continue:hover {
  background: rgba(108, 255, 199, 0.16);
}

.auth-modal__legal {
  margin: -6px 8px 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.62);
  transform: translateY(4px);
}

.auth-modal__legal-accent {
  color: #66a6ff;
}

.auth-modal__legal-link {
  text-decoration: none;
}

.auth-modal__legal-link:hover {
  text-decoration: underline;
}

.auth-modal__secondary {
  width: 100%;
  min-height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: rgba(255, 255, 255, 0.84);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.auth-modal__secondary:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.96);
}

.auth-modal__status {
  margin: 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 120, 120, 0.92);
}

.auth-modal__status[data-tone="success"] {
  color: rgba(220, 255, 245, 0.92);
}

.auth-modal__status[data-tone="muted"] {
  color: rgba(255, 255, 255, 0.62);
}

.auth-modal__copy--success {
  color: rgba(220, 255, 245, 0.92);
}

.auth-modal__success-mark {
  justify-self: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(108, 255, 199, 0.14);
  color: rgba(150, 255, 220, 0.98);
}

.auth-modal__changelog {
  display: grid;
  gap: 8px;
  padding: 2px 6px 2px 2px;
  text-align: left;
}

.auth-modal__changelog[hidden] {
  display: none;
}

.auth-modal__changelog-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: left;
  color: rgba(255, 255, 255, 0.92);
}

.auth-modal__changelog-scroll {
  max-height: 138px;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.auth-modal__changelog-scroll:focus-visible {
  outline: none;
}

.auth-modal__changelog-scroll::-webkit-scrollbar {
  width: 6px;
}

.auth-modal__changelog-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.auth-modal__changelog-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.auth-modal__changelog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.auth-modal__changelog-item {
  font-size: 12.5px;
  line-height: 1.5;
  text-align: left;
  color: rgba(255, 255, 255, 0.74);
}

.auth-modal__changelog-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(108, 255, 199, 0.12);
  color: rgba(180, 255, 228, 0.95);
  font-size: 11px;
  font-weight: 600;
  vertical-align: 1px;
}

.auth-modal__changelog-item strong {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
}

.auth-modal__changelog-mark {
  padding: 0 4px;
  border-radius: 5px;
  background: rgba(108, 255, 199, 0.24);
  color: rgba(220, 255, 244, 0.98);
}

.auth-modal__contact {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.auth-modal__contact a {
  color: rgba(120, 180, 255, 0.95);
  text-decoration: none;
}

.auth-modal__contact a:hover {
  text-decoration: underline;
}

.auth-modal__panel--mfa-setup {
  width: min(388px, calc(100vw - 32px));
  padding: 20px 16px 18px;
}

.auth-modal__panel--password-setup {
  width: min(396px, calc(100vw - 32px));
  padding: 20px 16px 18px;
}

.auth-modal__panel--mfa-setup .auth-modal__body,
.auth-modal__panel--mfa-setup .auth-modal__view,
.auth-modal__panel--password-setup .auth-modal__body,
.auth-modal__panel--password-setup .auth-modal__view {
  gap: 12px;
}

.auth-modal__panel--mfa-setup .auth-modal__title {
  margin-top: 6px;
  font-size: 17px;
}

.auth-modal__panel--password-setup .auth-modal__title {
  margin-top: 6px;
  font-size: 17px;
}

.auth-modal__panel--mfa-setup .auth-modal__copy {
  font-size: 13px;
  line-height: 1.42;
}

.auth-modal__panel--password-setup .auth-modal__copy {
  font-size: 13px;
  line-height: 1.42;
}

.auth-modal__panel--mfa-setup .auth-modal__input {
  height: 48px;
  font-size: 14px;
}

.auth-modal__panel--password-setup .auth-modal__input {
  height: 48px;
  font-size: 14px;
}

.auth-modal__panel--mfa-setup .auth-modal__continue {
  min-height: 48px;
  font-size: 15px;
}

.auth-modal__panel--password-setup .auth-modal__continue {
  min-height: 48px;
  font-size: 15px;
}

.auth-modal__panel--mfa-setup .auth-modal__secondary {
  min-height: 44px;
}

.auth-modal__panel--password-setup .auth-modal__secondary {
  min-height: 44px;
}

.auth-modal__body--mfa-setup {
  gap: 12px;
}

.auth-modal__body--password-setup {
  gap: 12px;
}

.mfa-setup__qr-shell {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
}

.mfa-setup__qr-shell[hidden] {
  display: none !important;
}

.mfa-setup__qr {
  display: grid;
  place-items: center;
  width: 152px;
  min-height: 152px;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
}

.mfa-setup__qr svg {
  display: block;
  width: 100%;
  height: auto;
}

.mfa-setup__manual-trigger {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}

.mfa-setup__manual-trigger:hover {
  color: rgba(255, 255, 255, 0.92);
}

.mfa-setup__manual-trigger[hidden] {
  display: none;
}

.mfa-setup__manual-shell {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.mfa-setup__manual-shell[hidden] {
  display: none;
}

.mfa-setup__manual-key {
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.mfa-setup__footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

  .topbar {
    padding-top: max(10px, env(safe-area-inset-top, 0px));
    padding-right: max(10px, env(safe-area-inset-right, 0px));
    padding-left: max(10px, env(safe-area-inset-left, 0px));
  }

  .stage {
    padding-right: max(22px, env(safe-area-inset-right, 0px));
    padding-bottom: max(18px, env(safe-area-inset-bottom, 0px));
    padding-left: max(22px, env(safe-area-inset-left, 0px));
  }

  .main.is-tool-inspector-open .stage {
    padding-right: 0;
  }

  /* Off-canvas drawer: sidebar slides in from the left over the main content
     instead of being hidden entirely. */
  .sidebar {
    display: grid;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(84vw, 320px);
    z-index: 70;
    transform: translateX(-100%);
    transition: transform 300ms cubic-bezier(0.25, 0.78, 0.25, 1);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.45);
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

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

  /* Show the topbar menu button; never render the collapsed rail on mobile. */
  .mobile-sidebar-toggle {
    display: inline-flex;
  }

  .sidebar-scrim {
    display: block;
  }

  .app.is-sidebar-open .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  /* Prevent background scroll while the drawer is open. */
  body.is-sidebar-drawer-open {
    overflow: hidden;
  }

  /* No hover on touch: always reveal the chat action (3-dot) menu so mobile
     users can tap it directly instead of hovering. */
  .history-item__menu-trigger {
    opacity: 1;
    pointer-events: auto;
    width: 32px;
    height: 32px;
  }

  .history-entry.has-active-scan .history-item__menu-trigger {
    width: 32px;
  }

  /* The action popover is a body-level fixed element; lift it above the
     off-canvas sidebar drawer (z-index 70) so it isn't painted behind it. */
  .history-action-menu {
    z-index: 80;
  }

  /* Guest navigation upsells are anchored below their tapped drawer row.
     Keep the body-level popover above the drawer and its scrim. */
  .guest-upsell-popover[data-mobile-sidebar-anchor="true"] {
    z-index: 80;
    max-width: calc(100vw - 24px);
  }

  /* Mobile: the tool inspector opens as a bottom sheet that slides up from
     the bottom and nearly fills the screen (small gap at the top). */
  .tool-inspector__panel {
    top: calc(env(safe-area-inset-top, 0px) + 24px);
    right: 0;
    left: 0;
    bottom: 0;
    width: auto;
    height: auto;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
  }

  .main.is-tool-inspector-open .tool-inspector__panel {
    transform: translateY(0);
  }

  .tool-inspector__resize-handle {
    display: none;
  }

  .hero__title {
    font-size: 36px;
  }

  .app.is-authenticated-session .hero:not(.is-temporary-chat) .hero__title,
  .app:not(.is-guest-session) .hero:not(.is-temporary-chat) .hero__title {
    font-size: 32px;
  }

  .hero__subtitle {
    font-size: 16px;
  }

  .app.is-guest-session .stage:not(.is-chatting) {
    padding-top: 126px;
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .app.is-guest-session .hero__title {
    font-size: clamp(34px, 9vw, 48px);
  }

  .auth-modal {
    overflow-y: auto;
    padding:
      max(10px, env(safe-area-inset-top, 0px))
      max(10px, env(safe-area-inset-right, 0px))
      max(10px, env(safe-area-inset-bottom, 0px))
      max(10px, env(safe-area-inset-left, 0px));
  }

  .auth-modal__panel {
    width: min(360px, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    padding: 22px 16px 20px;
  }

  .auth-modal__panel--mfa-setup {
    width: min(360px, calc(100vw - 20px));
    padding: 18px 14px 16px;
  }

  .auth-modal__spinner {
    width: 28px;
    height: 28px;
  }

  .auth-modal__title {
    font-size: 18px;
  }

  .auth-modal__copy {
    font-size: 13.5px;
  }

  .mfa-setup__qr {
    width: 144px;
    min-height: 144px;
  }

  .guest-legal {
    bottom: max(18px, env(safe-area-inset-bottom, 0px));
  }
}

/* Short mobile viewports include landscape phones and the reduced viewport
   exposed while an on-screen keyboard is visible. Keep the welcome surface
   compact enough that its legal notice never overlaps the composer. */
@media (max-width: 900px) and (max-height: 520px) {
  .app.is-guest-session .stage:not(.is-chatting) {
    padding-top: max(72px, calc(58px + env(safe-area-inset-top, 0px)));
    padding-bottom: calc(54px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
  }

  .app.is-guest-session .stage:not(.is-chatting) .hero {
    gap: 6px;
    margin-bottom: 8px;
  }

  .app.is-guest-session .hero__title {
    font-size: clamp(28px, 6vw, 40px);
  }

  .app.is-guest-session .hero__subtitle {
    font-size: 14px;
    line-height: 1.35;
  }

  .app.is-guest-session .stage:not(.is-chatting) .composer__input {
    min-height: 44px;
  }

  .guest-legal {
    bottom: max(10px, env(safe-area-inset-bottom, 0px));
  }

  .app.is-guest-session .stage:not(.is-chatting):has(.composer__input:focus) {
    padding-top: max(64px, calc(54px + env(safe-area-inset-top, 0px)));
  }

  .app.is-guest-session .stage:not(.is-chatting):has(.composer__input:focus) .hero,
  .app.is-guest-session .stage:not(.is-chatting):has(.composer__input:focus) ~ .guest-legal {
    display: none;
  }
}

@media (max-width: 900px) and (max-height: 360px) {
  .app.is-guest-session .stage:not(.is-chatting) {
    padding-top: max(60px, calc(50px + env(safe-area-inset-top, 0px)));
    padding-bottom: calc(46px + env(safe-area-inset-bottom, 0px));
  }

  .app.is-guest-session .stage:not(.is-chatting) .hero {
    margin-bottom: 4px;
  }

  .app.is-guest-session .hero__title {
    font-size: clamp(26px, 5vw, 32px);
  }

  .app.is-guest-session .hero__subtitle {
    display: none;
  }

  .app.is-guest-session .stage:not(.is-chatting) .composer__input {
    min-height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .app,
  .sidebar {
    transition: none;
  }
}

/* Settings Modal */
.settings-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-modal[hidden] {
  display: none !important;
}

.settings-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.settings-modal__panel {
  position: relative;
  width: min(840px, calc(100vw - 32px));
  height: min(600px, calc(100vh - 32px));
  background: var(--modal-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  animation: settings-modal-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@keyframes settings-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.settings-modal__sidebar {
  width: 210px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.15);
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-tab {
  width: 100%;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s, color 0.15s;
}

.settings-tab[hidden],
.settings-panel[hidden] {
  display: none !important;
}

.settings-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.95);
}

.settings-tab.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.settings-tab:focus-visible {
  outline: 2px solid rgba(108, 255, 199, 0.46);
  outline-offset: 2px;
}

.settings-tab__icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.settings-tab__icon svg {
  width: 18px;
  height: 18px;
}

.settings-modal__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 22px;
  overflow-y: auto;
  position: relative;
}

.settings-modal__header {
  margin-bottom: 18px;
}

.settings-modal__title {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.settings-modal__close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: absolute;
  top: 16px;
  right: 16px;
  transition: background-color 0.15s, color 0.15s;
}

.settings-modal__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.settings-modal__close svg {
  width: 18px;
  height: 18px;
}

.settings-modal__body {
  flex: 1;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-section+.settings-section {
  margin-top: 28px;
}

.settings-section__title-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.settings-section__title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(250, 252, 255, 0.96);
}

.settings-section__info-tooltip {
  transform: translateY(1px);
}

.settings-section__info-tooltip .library-info-tooltip__content {
  left: 0;
  right: auto;
  z-index: 30;
}

.settings-list {
  display: flex;
  flex-direction: column;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-row__label {
  font-size: 14.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
}

.settings-row__label-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.settings-row__control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background-color 0.15s;
}

.settings-row__control:hover {
  background: rgba(255, 255, 255, 0.08);
}

.settings-row__value {
  margin-right: 4px;
}

.settings-row__warning-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.settings-row__warning-icon[hidden] {
  display: none;
}

.settings-row__static-value {
  flex: 0 1 340px;
  min-width: 0;
  text-align: right;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-row__static-value[data-empty="true"] {
  color: rgba(255, 255, 255, 0.58);
}

.settings-row__swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #888;
  display: inline-block;
}

.settings-row--select {
  position: relative;
  overflow: visible;
}

.settings-select {
  position: relative;
}

.settings-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--modal-surface);
  box-shadow: none;
  display: grid;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 40;
}

.settings-select-menu[hidden] {
  display: none;
}

.settings-select-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.settings-select-menu__item {
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font: inherit;
  font-size: 13.5px;
  font-weight: 550;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.settings-select-menu__item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.settings-select-menu__item.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.98);
}

.settings-row--top {
  align-items: flex-start;
}

.settings-row__group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 85%;
}

.settings-row__desc {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.45;
  font-weight: 400;
}

.settings-row__desc code {
  font-family: "Consolas", "Cascadia Mono", "Courier New", monospace;
  font-size: 0.95em;
  padding: 0 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(244, 248, 252, 0.92);
}

/* Personalization */
.personalization-modal {
  position: fixed;
  inset: 0;
  z-index: 1120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.personalization-modal[hidden] {
  display: none !important;
}

.personalization-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
}

.personalization-modal__panel {
  position: relative;
  width: min(500px, calc(100vw - 40px));
  max-height: min(620px, calc(100vh - 40px));
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: var(--modal-surface);
  color: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  animation: settings-modal-in 0.16s ease-out;
}

.personalization-modal__header {
  padding: 22px 56px 14px 22px;
}

.personalization-modal__title {
  margin: 0;
  color: #fff;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.personalization-modal__description {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  line-height: 1.45;
}

.personalization-modal__close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.personalization-modal__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.96);
}

.personalization-modal__close svg {
  width: 18px;
  height: 18px;
}

.personalization-form {
  padding: 0 22px 20px;
}

.personalization-form__toggle-row {
  min-height: 58px;
  padding: 10px 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.personalization-form__toggle-title {
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 13.5px;
  font-weight: 600;
}

.personalization-form__helper {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  line-height: 1.4;
}

.personalization-form__fields {
  margin-top: 16px;
  display: grid;
  gap: 14px;
  transition: opacity 160ms ease;
}

.personalization-form__fields.is-disabled {
  opacity: 0.46;
}

.personalization-field {
  display: grid;
  gap: 6px;
}

.personalization-field__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.personalization-field__label {
  color: rgba(255, 255, 255, 0.91);
  font-size: 13px;
  font-weight: 600;
}

.personalization-field__count {
  color: rgba(255, 255, 255, 0.38);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.personalization-field__control {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  outline: none;
  background: rgba(0, 0, 0, 0.16);
  color: rgba(255, 255, 255, 0.96);
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.personalization-field__control::placeholder {
  color: rgba(255, 255, 255, 0.31);
}

.personalization-field__control:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.07);
}

.personalization-field__control:disabled {
  cursor: not-allowed;
}

.personalization-field__control--textarea {
  min-height: 88px;
  resize: vertical;
}

.personalization-form__footer {
  min-height: 38px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.personalization-form__status {
  min-height: 18px;
  margin: 0;
  color: #f0b6b6;
  font-size: 12.5px;
  line-height: 1.4;
}

.personalization-form__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.personalization-modal__close:focus-visible,
.personalization-field__control:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.48);
  outline-offset: 2px;
}

.personalization-modal .settings-toggle__input:focus-visible + .settings-toggle__track {
  outline: 2px solid rgba(255, 255, 255, 0.48);
  outline-offset: 2px;
}

.settings-swarm {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-bottom: 10px;
}

.settings-swarm__intro {
  max-width: 600px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13.5px;
  line-height: 1.55;
}

.settings-swarm__section + .settings-swarm__section {
  margin-top: 30px;
}

.settings-swarm__section-heading {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
}

.settings-swarm__section-title {
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.settings-swarm__section-copy {
  max-width: 590px;
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12.5px;
  line-height: 1.48;
}

.settings-swarm__list {
  overflow: visible;
}

.settings-swarm__row {
  gap: 24px;
}

.settings-swarm__row.is-limit-menu-open {
  z-index: 50;
}

.settings-swarm__row[data-swarm-architecture-only],
.settings-swarm-model[data-swarm-architecture-only] {
  max-height: 220px;
  opacity: 1;
  transform: translateY(0);
  transition:
    max-height 180ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 120ms ease,
    transform 160ms cubic-bezier(0.4, 0, 0.2, 1),
    padding 180ms cubic-bezier(0.4, 0, 0.2, 1),
    border-color 120ms ease;
}

.settings-swarm__row[data-swarm-architecture-only].is-architecture-transitioning,
.settings-swarm-model[data-swarm-architecture-only].is-architecture-transitioning {
  overflow: hidden;
}

.settings-swarm__row[data-swarm-architecture-only].is-architecture-collapsed,
.settings-swarm-model[data-swarm-architecture-only].is-architecture-collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-color: transparent;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px);
}

.settings-swarm__row[data-swarm-architecture-only][hidden],
.settings-swarm-model[data-swarm-architecture-only][hidden] {
  display: none;
}

.settings-swarm__row .settings-row__group {
  max-width: min(390px, 70%);
  gap: 6px;
}

.settings-swarm__row--stealth .settings-row__group {
  flex: 1 1 auto;
  max-width: min(520px, calc(100% - 62px));
  min-width: 0;
}

@media (prefers-reduced-motion: reduce) {
  .settings-swarm__row[data-swarm-architecture-only],
  .settings-swarm-model[data-swarm-architecture-only] {
    transition: none;
    transform: none;
  }
}

.settings-swarm__label-with-info {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  max-width: 100%;
}

.settings-swarm__limit-control:disabled,
.settings-swarm-model__trigger:disabled {
  opacity: 0.48;
  cursor: default;
}

.settings-swarm__limit-control:disabled:hover,
.settings-swarm-model__trigger:disabled:hover {
  background: transparent;
}

.settings-swarm__limit-menu {
  min-width: 168px;
}

.settings-swarm-models {
  display: flex;
  flex-direction: column;
}

.settings-swarm-model {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  min-width: 0;
}

.settings-swarm-model__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 6px;
}

.settings-swarm-model__title {
  color: rgba(255, 255, 255, 0.94);
  font-size: 14px;
  font-weight: 600;
}

.settings-swarm-picker__recommended {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(108, 255, 199, 0.1);
  color: rgba(191, 255, 229, 0.92);
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.settings-swarm-picker__recommended-icon {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
}

.settings-swarm-model__desc {
  max-width: 340px;
  color: rgba(255, 255, 255, 0.51);
  font-size: 12.5px;
  line-height: 1.45;
}

.settings-swarm-model__trigger {
  flex: 0 1 246px;
  justify-content: flex-end;
  min-width: 0;
  max-width: 246px;
  text-align: left;
}

.settings-swarm-model__trigger:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
}

.settings-swarm-model__selection {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.settings-swarm-model__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  overflow: visible;
  border: none;
  background: transparent;
}

.settings-swarm-model__icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.settings-swarm-model__trigger:focus-visible,
.settings-swarm-picker__back:focus-visible,
.settings-swarm-picker__option:focus-visible {
  outline: 2px solid rgba(108, 255, 199, 0.42);
  outline-offset: 2px;
}

.settings-swarm-picker__option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: visible;
  border: none;
  background: transparent;
}

.settings-swarm-picker__option-icon img {
  display: block;
  width: 88%;
  height: 88%;
  object-fit: contain;
}

.settings-swarm-model__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-swarm-model__name {
  color: rgba(255, 255, 255, 0.94);
  font-size: 14px;
  font-weight: 500;
}

.settings-swarm-model__chevron {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.45);
}

.settings-swarm__save-status {
  min-height: 18px;
  margin: 10px 2px 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 11.5px;
  line-height: 18px;
  text-align: right;
}

.settings-swarm__save-status:empty {
  display: none;
}

.settings-swarm__save-status[data-state="saved"] {
  color: rgba(171, 244, 211, 0.76);
}

.settings-swarm__save-status[data-state="error"] {
  color: rgba(255, 172, 158, 0.9);
}

.settings-modal__content.is-swarm-picker-open {
  overflow: hidden;
}

.settings-swarm-picker {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 20px 22px 18px;
  background: var(--modal-surface);
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 160ms ease, transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-swarm-picker[hidden] {
  display: none !important;
}

.settings-swarm-picker.is-open {
  opacity: 1;
  transform: translateX(0);
}

.settings-swarm-picker__header {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding-right: 38px;
  margin-bottom: 16px;
}

.settings-swarm-picker__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  margin-top: 1px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.settings-swarm-picker__back:hover {
  background: rgba(255, 255, 255, 0.075);
  color: rgba(255, 255, 255, 0.96);
}

.settings-swarm-picker__heading {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.settings-swarm-picker__title {
  margin: 0;
  color: rgba(255, 255, 255, 0.97);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.settings-swarm-picker__description {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12.5px;
  line-height: 1.4;
}

.settings-swarm-picker__search {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 12px;
  margin-bottom: 12px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.48);
}

.settings-swarm-picker__search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.94);
  font: inherit;
  font-size: 13px;
}

.settings-swarm-picker__search-input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.settings-swarm-picker__search-input::-webkit-search-cancel-button {
  filter: invert(1);
  opacity: 0.55;
}

.settings-swarm-picker__list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 5px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1px 4px 4px 1px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.settings-swarm-picker__option {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  width: 100%;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.settings-swarm-picker__option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.settings-swarm-picker__option.is-selected {
  border-color: transparent;
  background: rgba(108, 255, 199, 0.085);
}

.settings-swarm-picker__option-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.settings-swarm-picker__option-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.settings-swarm-picker__option-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.settings-swarm-picker__option-name {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.94);
  font-size: 13.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-swarm-picker__reasoning {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.64);
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.settings-swarm-picker__recommended {
  flex: 0 0 auto;
  font-size: 9.5px;
}

.settings-swarm-picker__option-author,
.settings-swarm-picker__option-meta {
  color: rgba(255, 255, 255, 0.46);
  font-size: 11.5px;
}

.settings-swarm-picker__option-author {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-swarm-picker__option-meta {
  white-space: nowrap;
}

.settings-swarm-picker__empty {
  flex: 1 1 auto;
  margin: 0;
  padding: 44px 12px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 13px;
  text-align: center;
}

.settings-swarm-picker__footnote {
  flex: 0 0 auto;
  margin: 9px 1px 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 10.5px;
  line-height: 1.35;
}

.settings-recommendation {
  color: #10a37f;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
}

.settings-row__content-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  cursor: pointer;
  padding: 6px 0 6px 8px;
}

.settings-row__content-btn:hover {
  opacity: 0.8;
}

.settings-row__content-btn svg {
  color: rgba(255, 255, 255, 0.6);
}

.settings-toggle {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}

.settings-toggle__input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.settings-toggle__track {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.2s;
  border-radius: 20px;
}

.settings-toggle__track:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #fff;
  transition: 0.2s;
  border-radius: 50%;
}

.settings-toggle__input:checked+.settings-toggle__track {
  background-color: #10a37f;
}

.settings-toggle__input:checked+.settings-toggle__track:before {
  transform: translateX(16px);
}

.settings-toggle__input:disabled+.settings-toggle__track {
  cursor: default;
  opacity: 0.48;
}

.settings-row--plan-status {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.settings-row__value--plan {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  font-size: 14.5px;
}

.settings-row__plan-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.settings-plan-control {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.settings-plan-toggle {
  min-width: 0;
  justify-content: flex-end;
  cursor: default;
}

.settings-plan-toggle:disabled {
  opacity: 1;
}

.settings-plan-toggle:disabled:hover {
  background: transparent;
}

.settings-plan-toggle.is-interactive {
  cursor: pointer;
}

.settings-plan-toggle__indicator {
  flex: 0 0 auto;
}

.settings-plan-toggle.is-free-plan .settings-plan-toggle__indicator {
  display: none;
}

.settings-plan-toggle.is-free-plan .settings-row__value {
  margin-right: 0;
}

.settings-plan-toggle.is-interactive:hover .settings-row__value--plan {
  color: rgba(255, 255, 255, 1);
}

.settings-plan-menu {
  min-width: 176px;
}

.settings-plan-menu__item {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  font: inherit;
  font-size: 13.5px;
  font-weight: 550;
  transition: background-color 160ms ease, color 160ms ease;
}

.settings-plan-menu__item:hover {
  background: rgba(172, 52, 52, 0.16);
  color: rgba(255, 232, 232, 0.98);
}

.settings-row__upgrade-btn {
  margin-left: 0;
  flex-shrink: 0;
}

.settings-usage {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-usage__summary {
  display: block;
}

.settings-usage__hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.settings-usage__hero-main {
  display: grid;
  gap: 4px;
}

.settings-usage__hero-label {
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-usage__hero-amount-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}

.settings-usage__hero-amount {
  color: rgba(255, 255, 255, 0.96);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.credit-badge {
  display: inline-block;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.credit-badge-double-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 23px;
  height: 16px;
  margin-right: 2px;
}

.credit-badge-double-wrapper .credit-badge--back {
  position: absolute;
  left: 0;
  top: 1px;
  opacity: 0.55;
  transform: scale(0.8);
  z-index: 1;
}

.credit-badge-double-wrapper .credit-badge--front {
  position: absolute;
  left: 7px;
  top: -1px;
  z-index: 2;
}

.credit-badge-high-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 23px;
  height: 16px;
  margin-right: 2px;
}

.credit-badge-high-wrapper .credit-badge--back {
  position: absolute;
  left: 0;
  top: 1px;
  opacity: 0.55;
  transform: scale(0.8);
  z-index: 2;
}

.credit-badge-high-wrapper .credit-badge--front {
  position: absolute;
  left: 7px;
  top: -1px;
  z-index: 3;
}

.credit-badge-high-wrapper .credit-badge--sparkle {
  position: absolute;
  left: 2.2px;
  top: -5px;
  opacity: 0.65;
  transform: scale(0.73);
  z-index: 2;
}



.credit-badge--hero {
  width: 26px;
  height: 26px;
}

.credit-badge--cell {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: -2px;
}

.credit-badge--mid path {
  fill: #d99757;
}

.credit-badge--high path {
  fill: #c97171;
}

.settings-usage-table__credit-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

.settings-usage__hero-context {
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.settings-usage__hero-context-value {
  color: #ffffff;
  font-weight: 600;
}

.settings-usage__hero-meta {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12.5px;
}

.settings-usage__hero-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-left: auto;
}

.settings-usage__hero-note {
  max-width: 240px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  line-height: 1.45;
  text-align: right;
}

.settings-usage__topup-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px 0 14px;
  border: none;
  border-radius: 999px;
  background: #4c42d7;
  color: #f1efff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 160ms ease, transform 160ms ease;
}

.settings-usage__topup-btn:hover {
  background: #594fe0;
}

.settings-usage__topup-btn svg {
  flex: 0 0 auto;
}

.topup-modal {
  position: fixed;
  inset: 0;
  z-index: 1310;
  display: grid;
  place-items: center;
  padding: 24px;
}

.topup-modal[hidden] {
  display: none;
}

.topup-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
}

.topup-modal__shell {
  position: relative;
  width: min(460px, calc(100vw - 32px));
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--modal-surface, #16181d);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.56);
  padding: 26px 28px 24px;
  color: rgba(255, 255, 255, 0.94);
}

.topup-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.74);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.topup-modal__close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.96);
}

.topup-modal__title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.97);
}

.topup-modal__field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.topup-modal__field > * {
  min-width: 0;
}

.topup-modal__label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}

.topup-modal__label span {
  color: #ff6b6b;
  margin-left: 2px;
}

.topup-modal__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.topup-modal__input-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.78);
  pointer-events: none;
  opacity: 0;
  transition: opacity 140ms ease;
}

.topup-modal__input-wrap[data-has-value="true"] .topup-modal__input-prefix {
  opacity: 1;
}

.topup-modal__input-wrap[data-has-value="true"] .topup-modal__input {
  padding-left: 28px;
}

.topup-modal__input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.96);
  font: inherit;
  font-size: 14.5px;
  outline: none;
  transition: border-color 160ms ease, background-color 160ms ease;
  -moz-appearance: textfield;
}


.topup-modal__input::-webkit-outer-spin-button,
.topup-modal__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.topup-modal__input:focus {
  border-color: rgba(108, 92, 231, 0.7);
  background: rgba(255, 255, 255, 0.05);
}

.topup-modal__input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.topup-modal__credits-row {
  margin-top: 4px;
  min-width: 0;
  max-width: 100%;
}

.topup-modal__credits-display {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.45);
  font-size: 14.5px;
  user-select: none;
  cursor: not-allowed;
  overflow: hidden;
}

.topup-modal__credits-badge {
  flex: 0 0 auto;
  opacity: 0.75;
}

.topup-modal__credits-value {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.62);
  overflow-wrap: anywhere;
  word-break: break-all;
}

.topup-modal__credits-suffix {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13.5px;
}

.topup-modal__credits-display.is-enterprise {
  cursor: default;
  user-select: text;
}

.topup-modal__credits-display.is-enterprise .topup-modal__credits-badge,
.topup-modal__credits-display.is-enterprise .topup-modal__credits-value,
.topup-modal__credits-display.is-enterprise .topup-modal__credits-suffix {
  display: none;
}

.topup-modal__enterprise-message {
  flex: 1 1 auto;
  min-width: 0;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.topup-modal__enterprise-link {
  color: #6fa8ff;
  font-weight: 500;
  text-decoration: none;
}

.topup-modal__enterprise-link:hover {
  text-decoration: underline;
}

.topup-modal__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.topup-modal__note {
  flex: 1 1 220px;
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
}

:root[data-appearance-theme="light"] .topup-modal__note {
  color: rgba(15, 23, 42, 0.6);
}

.topup-modal__actions-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.topup-modal__btn {
  min-height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  border: none;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

.topup-modal__btn--ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
}

.topup-modal__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.96);
}

.topup-modal__btn--primary {
  background: #4c42d7;
  color: #f1efff;
}

.topup-modal__btn--primary:hover:not(:disabled) {
  background: #594fe0;
}

.topup-modal__btn--primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

:root[data-appearance-theme="light"] .topup-modal__shell {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  color: rgba(15, 23, 42, 0.94);
}

:root[data-appearance-theme="light"] .topup-modal__close {
  color: rgba(15, 23, 42, 0.65);
}

:root[data-appearance-theme="light"] .topup-modal__close:hover {
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.92);
}

:root[data-appearance-theme="light"] .topup-modal__title {
  color: rgba(15, 23, 42, 0.97);
}

:root[data-appearance-theme="light"] .topup-modal__label {
  color: rgba(15, 23, 42, 0.72);
}

:root[data-appearance-theme="light"] .topup-modal__input {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.12);
  color: rgba(15, 23, 42, 0.94);
}

:root[data-appearance-theme="light"] .topup-modal__input::placeholder {
  color: rgba(15, 23, 42, 0.4);
}

:root[data-appearance-theme="light"] .topup-modal__input-prefix {
  color: rgba(15, 23, 42, 0.78);
}

:root[data-appearance-theme="light"] .topup-modal__credits-display {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.12);
  color: rgba(15, 23, 42, 0.5);
}

:root[data-appearance-theme="light"] .topup-modal__credits-value {
  color: rgba(15, 23, 42, 0.7);
}

:root[data-appearance-theme="light"] .topup-modal__credits-suffix {
  color: rgba(15, 23, 42, 0.45);
}

:root[data-appearance-theme="light"] .topup-modal__enterprise-message {
  color: rgba(15, 23, 42, 0.66);
}

:root[data-appearance-theme="light"] .topup-modal__enterprise-link {
  color: #2563eb;
}

:root[data-appearance-theme="light"] .topup-modal__btn--ghost {
  color: rgba(15, 23, 42, 0.78);
}

:root[data-appearance-theme="light"] .topup-modal__btn--ghost:hover {
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.96);
}

:root[data-appearance-theme="light"] .topup-modal__btn--primary {
  background: #5e54e8;
  color: #f7f5ff;
}

:root[data-appearance-theme="light"] .topup-modal__btn--primary:hover:not(:disabled) {
  background: #6a61ee;
}

.settings-usage-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-usage-card__label {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 500;
}

.settings-usage-card__value-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-usage-card__value {
  color: rgba(255, 255, 255, 0.98);
  font-size: clamp(28px, 2.4vw, 34px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 650;
}

.settings-usage-card__total {
  color: rgba(255, 255, 255, 0.62);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 500;
}

.settings-usage-card__meter {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.settings-usage-card__meter-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #10a37f;
}

.settings-usage-card__meta {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.settings-usage-card__status {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1;
  font-weight: 600;
}

.settings-usage-card__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.settings-usage-card__button,
.settings-usage__range-button,
.settings-usage__export-button,
.settings-usage__chip {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  font: inherit;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

.settings-usage-card__button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

.settings-usage-card__toggle-label {
  color: rgba(255, 255, 255, 0.52);
  font-size: 13px;
  font-weight: 500;
}

.settings-usage__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-usage__filters {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-usage__range-select {
  position: relative;
}

.settings-usage__range-button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.settings-usage__range-button:hover,
.settings-usage__export-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.settings-usage__range-button svg {
  color: rgba(255, 255, 255, 0.56);
}

.settings-usage__range-menu {
  min-width: 148px;
  left: 0;
  right: auto;
}

.settings-usage__chips {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.settings-usage__chip {
  min-width: 42px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 600;
}

.settings-usage__chip.is-active {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.98);
}

.settings-usage__export-button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.settings-usage__export-button svg {
  flex: 0 0 auto;
}

.settings-usage-card__button[disabled],
.settings-usage__range-button[disabled],
.settings-usage__export-button[disabled],
.settings-usage__chip[disabled] {
  cursor: default;
  opacity: 0.72;
}

.settings-usage-table__shell {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  max-height: 320px;
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.settings-usage-table__shell::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.settings-usage-table__shell::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.settings-usage-table__shell::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.settings-usage-table__shell::-webkit-scrollbar-track {
  background: transparent;
}

.settings-usage-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 580px;
}

.settings-usage-table th,
.settings-usage-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  vertical-align: middle;
}

.settings-usage-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(34, 34, 35, 0.98);
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.settings-usage-table td {
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  line-height: 1.35;
}

.settings-usage-table tbody tr:last-child td {
  border-bottom: none;
}

.settings-usage-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.settings-usage-table__swarm-summary {
  cursor: pointer;
}

.settings-usage-table__swarm-summary.is-static {
  cursor: default;
}

.settings-usage-table__swarm-summary td {
  transition: background-color 160ms ease, color 160ms ease;
}

.settings-usage-table__swarm-summary:hover td,
.settings-usage-table__swarm-summary.is-expanded td {
  background: rgba(115, 221, 181, 0.045);
}

.settings-usage-table__swarm-summary:focus-within td {
  background: rgba(115, 221, 181, 0.045);
}

.settings-usage-table__swarm-model {
  white-space: nowrap;
}

.settings-usage-table__swarm-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: -4px -6px;
  padding: 4px 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.settings-usage-table__swarm-toggle:focus-visible {
  outline: 1px solid rgba(135, 232, 196, 0.72);
  outline-offset: 2px;
}

.settings-usage-table__swarm-label {
  color: rgba(255, 255, 255, 0.94);
  font-weight: 400;
}

.settings-usage-table__swarm-toggle:disabled {
  cursor: default;
}

.settings-usage-table__swarm-toggle:disabled .settings-usage-table__swarm-chevron {
  visibility: hidden;
}

.settings-usage-table__swarm-count {
  color: rgba(255, 255, 255, 0.42);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.settings-usage-table__swarm-chevron {
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
  color: rgba(255, 255, 255, 0.42);
  transition: color 160ms ease, transform 180ms ease;
}

.settings-usage-table__swarm-summary:hover .settings-usage-table__swarm-chevron {
  color: rgba(255, 255, 255, 0.72);
}

.settings-usage-table__swarm-summary.is-expanded .settings-usage-table__swarm-chevron {
  transform: rotate(180deg);
}

.settings-usage-table__swarm-detail td {
  padding-top: 9px;
  padding-bottom: 9px;
  background: rgba(0, 0, 0, 0.12);
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.settings-usage-table__swarm-detail:not([hidden]) td {
  animation: usageSwarmDetailReveal 170ms ease-out both;
}

@keyframes usageSwarmDetailReveal {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.settings-usage-table__swarm-detail:hover td {
  background: rgba(255, 255, 255, 0.018) !important;
}

.settings-usage-table__swarm-detail-date {
  position: relative;
  padding-left: 30px !important;
  color: rgba(255, 255, 255, 0.42) !important;
  font-size: 11px !important;
}

.settings-usage-table__swarm-detail-date::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(121, 214, 180, 0.58);
  transform: translateY(-50%);
}

.settings-usage-table__swarm-detail-model {
  color: rgba(255, 255, 255, 0.74) !important;
  font-weight: 500;
}

.settings-usage-table__type {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 600;
}

.settings-usage-table__tokens {
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
}

.settings-usage-table__cost {
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.96);
  font-weight: 600;
}

body.has-share-modal {
  overflow: hidden;
}

.app[hidden],
.shared-page[hidden] {
  display: none !important;
}

body.is-shared-route .app {
  display: none !important;
}

body.is-shared-route .shared-page {
  display: flex !important;
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 1040;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.share-modal[hidden] {
  display: none !important;
}

.share-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 10, 16, 0.74);
  backdrop-filter: blur(6px);
}

.share-modal__panel {
  position: relative;
  width: min(688px, calc(100vw - 40px));
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--modal-surface);
  box-shadow: 0 28px 84px rgba(0, 0, 0, 0.48);
  overflow: hidden;
}

.share-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.share-modal__close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.share-modal__header {
  padding: 24px 26px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.share-modal__title {
  margin: 0;
  padding-right: 44px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.97);
}

.share-modal__body {
  padding: 16px 24px 22px;
  display: grid;
  gap: 14px;
}

.share-modal__preview-shell {
  position: relative;
  min-height: 272px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  overflow: hidden;
}

.share-modal__preview-brand {
  position: absolute;
  bottom: 16px;
  right: 18px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.94;
}

.share-modal__preview-brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.share-modal__preview {
  max-height: 284px;
  overflow: hidden;
  padding: 42px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.share-modal__preview-fade {
  position: absolute;
  inset: auto 0 0;
  height: 96px;
  background: linear-gradient(180deg, rgba(18, 18, 19, 0) 0%, rgba(18, 18, 19, 0.94) 78%);
  pointer-events: none;
}

.share-modal__status {
  margin: 0;
  min-height: 20px;
  color: rgba(237, 245, 255, 0.72);
  font-size: 13px;
}

.share-modal__status[data-tone="error"] {
  color: #ff8f8f;
}

.share-modal__status[data-tone="success"] {
  color: #9de7c6;
}

.share-modal__actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.share-modal__action {
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 10px;
  text-align: center;
}

.share-modal__action:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: transparent;
}

.share-modal__action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.share-modal__action-label {
  font-size: 14px;
  line-height: 1.2;
}

.share-preview__empty {
  margin: auto;
  max-width: 320px;
  text-align: center;
  color: rgba(255, 255, 255, 0.62);
  font-size: 15px;
  line-height: 1.5;
}

.share-preview__message,
.shared-message {
  display: flex;
  justify-content: flex-start;
}

.share-preview__message--user,
.shared-message--user {
  justify-content: flex-end;
}

.share-preview__bubble,
.shared-message__bubble {
  max-width: min(82%, 640px);
}

.share-preview__message--user .share-preview__bubble,
.shared-message--user .shared-message__bubble {
  padding: 10px 16px;
  border-radius: 22px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 248, 235, 0.96);
  box-shadow: none;
}

.share-preview__message--assistant .share-preview__bubble,
.shared-message--assistant .shared-message__bubble {
  background: transparent;
  border: none;
  box-shadow: none;
}

.share-preview__content,
.shared-message__content {
  color: rgba(255, 255, 255, 0.96);
}

.share-preview__message--assistant .share-preview__content {
  font-size: 15px;
  line-height: 1.68;
}

.shared-message--assistant .shared-message__content {
  font-size: 17px;
  line-height: 1.78;
}

.share-preview__message--user .share-preview__content,
.shared-message--user .shared-message__content {
  font-size: 15px;
  line-height: 1.45;
}

.shared-page {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.04), transparent 34%),
    linear-gradient(180deg, #161616 0%, #121212 100%);
  color: rgba(255, 255, 255, 0.96);
}

.shared-page__header {
  width: min(1280px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 14px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.shared-page__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.96);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.shared-page__brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.shared-page__brand-text {
  font-size: 19px;
}

.shared-page__header-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.shared-page__signup-btn {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(108, 255, 199, 0.12);
  color: rgba(218, 255, 243, 0.96);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.shared-page__signup-btn:hover {
  background: rgba(108, 255, 199, 0.16);
  border-color: transparent;
  transform: none;
}

.shared-page__auth-btn {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.shared-page__auth-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 1);
}

.shared-page__main {
  flex: 1;
  min-height: 0;
  width: min(980px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 42px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shared-page__hero {
  text-align: center;
  display: grid;
  gap: 12px;
  margin-bottom: 42px;
}

.shared-page__eyebrow {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.shared-page__title {
  margin: 0;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.98);
}

.shared-page__meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 15px;
  line-height: 1.6;
}

.shared-page__thread-shell {
  flex: 1;
  min-height: 0;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  overflow-y: auto;
  box-sizing: border-box;
  padding-right: 18px;
  padding-bottom: 72px;
}

.shared-page__status {
  margin: 0 0 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.68);
  font-size: 15px;
  line-height: 1.6;
}

.shared-page__status[data-tone="error"] {
  color: #ff9c9c;
}

.shared-page__thread {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

@media (max-width: 900px) {
  .share-modal {
    padding: 14px;
  }

  .share-modal__panel {
    width: min(100vw - 12px, 100%);
    border-radius: 24px;
  }

  .share-modal__header {
    padding: 24px 20px 16px;
  }

  .share-modal__body {
    padding: 16px 18px 20px;
  }

  .share-modal__preview {
    padding: 40px 14px 40px;
  }

  .share-modal__preview-brand {
    bottom: 14px;
    right: 16px;
  }

  .share-modal__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shared-page__header {
    width: min(100vw - 20px, 100%);
    padding-top: 12px;
  }

  .shared-page__main {
    width: min(100vw - 28px, 100%);
    padding-top: 28px;
  }

  .shared-page__thread-shell {
    padding-right: 12px;
  }
}

@media (max-width: 640px) {
  .shared-page__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .shared-page__header-actions {
    width: 100%;
  }

  .shared-page__auth-btn,
  .shared-page__signup-btn {
    flex: 1 1 0;
    justify-content: center;
  }

  .share-preview__bubble,
  .shared-message__bubble {
    max-width: 92%;
  }

  .shared-message--assistant .shared-message__content {
    font-size: 16px;
  }
}

:root[data-appearance-theme="light"] .share-modal__panel {
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.4), transparent 46%),
    linear-gradient(180deg, #e3ddd2 0%, #d6cec2 100%);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.16);
}

:root[data-appearance-theme="light"] .share-modal__close,
:root[data-appearance-theme="light"] .share-modal__preview-shell,
:root[data-appearance-theme="light"] .share-modal__action,
:root[data-appearance-theme="light"] .share-modal__action-icon {
  border-color: rgba(15, 23, 42, 0.08);
}

:root[data-appearance-theme="light"] .share-modal__close,
:root[data-appearance-theme="light"] .share-modal__action {
  background: rgba(15, 23, 42, 0.03);
  color: rgba(15, 23, 42, 0.88);
}

:root[data-appearance-theme="light"] .share-modal__title,
:root[data-appearance-theme="light"] .share-preview__content,
:root[data-appearance-theme="light"] .shared-message__content,
:root[data-appearance-theme="light"] .shared-page__title,
:root[data-appearance-theme="light"] .shared-page__brand,
:root[data-appearance-theme="light"] .shared-page__signup-btn {
  color: rgba(15, 23, 42, 0.94);
}

:root[data-appearance-theme="light"] .share-modal__preview-fade {
  background: linear-gradient(180deg, rgba(231, 224, 212, 0) 0%, rgba(231, 224, 212, 0.94) 78%);
}

:root[data-appearance-theme="light"] .share-modal__status,
:root[data-appearance-theme="light"] .shared-page__meta,
:root[data-appearance-theme="light"] .shared-page__eyebrow,
:root[data-appearance-theme="light"] .shared-page__status,
:root[data-appearance-theme="light"] .share-preview__empty {
  color: rgba(15, 23, 42, 0.62);
}

:root[data-appearance-theme="light"] .share-preview__message--user .share-preview__bubble,
:root[data-appearance-theme="light"] .shared-message--user .shared-message__bubble {
  background: #d8cab8;
  border: 1px solid rgba(106, 83, 55, 0.12);
  color: rgba(54, 41, 28, 0.96);
  box-shadow: 0 8px 18px rgba(99, 77, 49, 0.05);
}

:root[data-appearance-theme="light"] .shared-page {
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.42), transparent 34%),
    linear-gradient(180deg, #efe9de 0%, #e3ddd2 100%);
  color: rgba(15, 23, 42, 0.92);
}

:root[data-appearance-theme="light"] .shared-page__auth-btn {
  background: rgba(15, 23, 42, 0.92);
  color: #f7f3ea;
}

:root[data-appearance-theme="light"] .shared-page__signup-btn {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.1);
}

:root[data-appearance-theme="light"] body,
:root[data-appearance-theme="light"] .main,
:root[data-appearance-theme="light"] .stage,
:root[data-appearance-theme="light"] .thread {
  background: #efe9de;
  color: var(--text);
}

:root[data-appearance-theme="light"] .sidebar {
  background: linear-gradient(180deg, #e3ddd2 0%, #d7d0c4 100%);
  border-right-color: rgba(15, 23, 42, 0.08);
}

:root[data-appearance-theme="light"] .sidebar__bottom {
  background: transparent;
  border-top-color: rgba(15, 23, 42, 0.08);
}

:root[data-appearance-theme="light"] .brand,
:root[data-appearance-theme="light"] .brand__text,
:root[data-appearance-theme="light"] .history__toggle,
:root[data-appearance-theme="light"] .history-item,
:root[data-appearance-theme="light"] .history-item__guide-indicator,
:root[data-appearance-theme="light"] .history-empty,
:root[data-appearance-theme="light"] .navbtn,
:root[data-appearance-theme="light"] .navbtn__icon,
:root[data-appearance-theme="light"] .account-menu__item,
:root[data-appearance-theme="light"] .account-menu__icon,
:root[data-appearance-theme="light"] .usercard,
:root[data-appearance-theme="light"] .usercard__name,
:root[data-appearance-theme="light"] .usercard__tier,
:root[data-appearance-theme="light"] .sidebar-promo__title,
:root[data-appearance-theme="light"] .sidebar-promo__copy,
:root[data-appearance-theme="light"] .sidebar-toggle-btn,
:root[data-appearance-theme="light"] .mobile-sidebar-toggle,
:root[data-appearance-theme="light"] .sidebar-collapsed-profile {
  color: rgba(15, 23, 42, 0.84);
}

:root[data-appearance-theme="light"] .mobile-sidebar-toggle:hover {
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.95);
}

:root[data-appearance-theme="light"] .history {
  border-top-color: rgba(15, 23, 42, 0.08);
}

:root[data-appearance-theme="light"] .history-entry:hover,
:root[data-appearance-theme="light"] .usercard:hover,
:root[data-appearance-theme="light"] .navbtn:hover,
:root[data-appearance-theme="light"] .account-menu__item:hover {
  background: rgba(15, 23, 42, 0.05);
}

:root[data-appearance-theme="light"] .account-menu__upgrade,
:root[data-appearance-theme="light"] .account-menu__upgrade .account-menu__icon {
  color: rgba(75, 58, 128, 0.96);
}

:root[data-appearance-theme="light"] .navbtn.is-active {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.08);
  color: rgba(15, 23, 42, 0.96);
}

:root[data-appearance-theme="light"] #modelLibraryBtn.is-active,
:root[data-appearance-theme="light"] #modelLibraryBtn.is-active:hover,
:root[data-appearance-theme="light"] #modelLibraryBtn.is-active:active {
  background: transparent;
  border-color: transparent;
  color: rgba(15, 23, 42, 0.84);
}

:root[data-appearance-theme="light"] #modelLibraryBtn.is-active .navbtn__icon,
:root[data-appearance-theme="light"] #modelLibraryBtn.is-active:hover .navbtn__icon,
:root[data-appearance-theme="light"] #modelLibraryBtn.is-active:active .navbtn__icon {
  color: rgba(15, 23, 42, 0.84);
}

:root[data-appearance-theme="light"] .history-item.is-active {
  color: rgba(15, 23, 42, 0.98);
  border-left-color: rgba(66, 50, 32, 0.96);
}

:root[data-appearance-theme="light"] .history-item__menu-trigger {
  color: rgba(84, 68, 49, 0.72);
}

:root[data-appearance-theme="light"] .history-entry.is-active .history-item__menu-trigger {
  color: rgba(66, 50, 32, 0.96);
}

:root[data-appearance-theme="light"] .history-item__menu-trigger:hover,
:root[data-appearance-theme="light"] .history-item__menu-trigger[aria-expanded="true"] {
  background: rgba(15, 23, 42, 0.06);
  color: rgba(66, 50, 32, 0.96);
}

:root[data-appearance-theme="light"] .avatar,
:root[data-appearance-theme="light"] .sidebar-collapsed-profile {
  background: #bfc4cc;
  color: rgba(15, 23, 42, 0.82);
}

:root[data-appearance-theme="light"] .hero__title {
  color: rgba(15, 23, 42, 0.94);
  text-shadow: none;
}

:root[data-appearance-theme="light"] .hero__subtitle,
:root[data-appearance-theme="light"] .msg__bubble,
:root[data-appearance-theme="light"] .composer__hint,
:root[data-appearance-theme="light"] .guest-legal {
  color: rgba(15, 23, 42, 0.62);
}

:root[data-appearance-theme="light"] .msg__action-btn {
  color: rgba(42, 32, 22, 0.78);
}

:root[data-appearance-theme="light"] .msg__action-btn:hover {
  color: rgba(20, 14, 5, 0.96);
  background: rgba(90, 70, 44, 0.1);
}

:root[data-appearance-theme="light"] .msg__tool-duration {
  color: rgba(70, 54, 36, 0.55);
}

:root[data-appearance-theme="light"] .msg__tool-card {
  border-color: transparent;
  background: transparent;
  color: rgba(15, 23, 42, 0.9);
}

:root[data-appearance-theme="light"] .msg__tool-card:hover,
:root[data-appearance-theme="light"] .msg__tool-card.is-active {
  border-color: transparent;
}

:root[data-appearance-theme="light"] .msg__tool-card-bar {
  background: transparent;
  border-bottom-color: transparent;
}

:root[data-appearance-theme="light"] .msg__tool-card-icon {
  color: rgba(15, 23, 42, 0.82);
}

:root[data-appearance-theme="light"] .msg__tool-card-target {
  color: rgba(15, 23, 42, 0.92);
}

:root[data-appearance-theme="light"] .msg__tool-card-caption {
  color: rgba(15, 23, 42, 0.7);
}

:root[data-appearance-theme="light"] .msg__tool-card--terminal[data-state="running"] .msg__tool-card-caption,
:root[data-appearance-theme="light"] .msg__tool-card--browser[data-state="running"] .msg__tool-card-caption {
  background: linear-gradient(120deg, rgba(110, 88, 60, 0.4) 30%, rgba(58, 44, 29, 1) 50%, rgba(110, 88, 60, 0.4) 70%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

:root[data-appearance-theme="light"] .msg__tool-card--terminal .msg__tool-card-hint,
:root[data-appearance-theme="light"] .msg__tool-card--browser .msg__tool-card-hint {
  color: rgba(70, 54, 36, 0.68);
}

:root[data-appearance-theme="light"] .msg__tool-card--terminal .msg__tool-card-caption::after,
:root[data-appearance-theme="light"] .msg__tool-card--browser .msg__tool-card-caption::after {
  border-color: rgba(15, 23, 42, 0.42);
}

:root[data-appearance-theme="light"] .msg__tool-card-status {
  background: rgba(15, 23, 42, 0.08);
  color: rgba(15, 23, 42, 0.78);
}

:root[data-appearance-theme="light"] .msg__tool-card[data-state="running"] .msg__tool-card-status {
  background: rgba(90, 130, 70, 0.18);
  color: rgba(40, 70, 30, 0.92);
}

:root[data-appearance-theme="light"] .msg__tool-card[data-state="review"] .msg__tool-card-status {
  background: rgba(15, 23, 42, 0.1);
  color: rgba(15, 23, 42, 0.84);
}

:root[data-appearance-theme="light"] .msg__tool-card[data-state="error"] .msg__tool-card-status {
  background: rgba(170, 50, 40, 0.18);
  color: rgba(120, 30, 25, 0.95);
}

:root[data-appearance-theme="light"] .msg__tool-card[data-state="done"] .msg__tool-card-status {
  background: rgba(15, 23, 42, 0.08);
  color: rgba(15, 23, 42, 0.74);
}

:root[data-appearance-theme="light"] .msg__tool-rail::before {
  background: rgba(15, 23, 42, 0.16);
}

:root[data-appearance-theme="light"] .composer__notice {
  border-color: rgba(194, 120, 24, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 220, 168, 0.78) 0%, rgba(255, 201, 145, 0.68) 100%),
    rgba(245, 237, 226, 0.96);
  color: rgba(74, 46, 17, 0.94);
}

:root[data-appearance-theme="light"] .composer__notice-action {
  background: rgba(74, 46, 17, 0.08);
  color: rgba(74, 46, 17, 0.9);
}

:root[data-appearance-theme="light"] .composer__notice-action:hover {
  background: rgba(74, 46, 17, 0.12);
}

:root[data-appearance-theme="light"] .guest-legal__link {
  color: rgba(15, 23, 42, 0.86);
}

:root[data-appearance-theme="light"] .topbar__center,
:root[data-appearance-theme="light"] .modelbtn,
:root[data-appearance-theme="light"] .modelbtn__chevron,
:root[data-appearance-theme="light"] .modebtn,
:root[data-appearance-theme="light"] .modebtn__chevron,
:root[data-appearance-theme="light"] .temporary-chat-toggle,
:root[data-appearance-theme="light"] .topbar__chat-action-btn,
:root[data-appearance-theme="light"] .topbar__auth-btn,
:root[data-appearance-theme="light"] .iconbtn,
:root[data-appearance-theme="light"] .iconbtn svg {
  color: rgba(15, 23, 42, 0.84);
}

:root[data-appearance-theme="light"] .modelbtn:hover,
:root[data-appearance-theme="light"] .temporary-chat-toggle:hover,
:root[data-appearance-theme="light"] .topbar__chat-action-btn:hover,
:root[data-appearance-theme="light"] .topbar__auth-btn:hover,
:root[data-appearance-theme="light"] .iconbtn:hover,
:root[data-appearance-theme="light"] .iconbtn--ghost:hover,
:root[data-appearance-theme="light"] .modebtn:hover {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.08);
  color: rgba(15, 23, 42, 0.96);
}

:root[data-appearance-theme="light"] .temporary-chat-toggle:focus-visible {
  background: rgba(15, 23, 42, 0.08);
}

:root[data-appearance-theme="light"] .temporary-chat-toggle.is-active,
:root[data-appearance-theme="light"] .temporary-chat-toggle[aria-pressed="true"] {
  background: rgba(120, 80, 40, 0.18);
  color: rgba(66, 40, 18, 0.96);
}

:root[data-appearance-theme="light"] .temporary-chat-toggle.is-active:hover,
:root[data-appearance-theme="light"] .temporary-chat-toggle[aria-pressed="true"]:hover {
  background: rgba(120, 80, 40, 0.26);
  color: rgba(66, 40, 18, 1);
}

:root[data-appearance-theme="light"] #attachBtn:hover,
:root[data-appearance-theme="light"] #attachBtn:focus-visible,
:root[data-appearance-theme="light"] #micBtn:hover,
:root[data-appearance-theme="light"] #micBtn:focus-visible {
  background: rgba(15, 23, 42, 0.06);
  border-color: transparent;
}

:root[data-appearance-theme="light"] .iconbtn {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.04);
}

:root[data-appearance-theme="light"] #attachBtn,
:root[data-appearance-theme="light"] #micBtn {
  background: transparent;
  border-color: transparent;
}

:root[data-appearance-theme="light"] #micBtn.is-recording {
  background: rgba(183, 28, 28, 0.12);
  border-color: rgba(183, 28, 28, 0.22);
  color: rgba(183, 28, 28, 0.95);
  box-shadow: 0 0 0 1px rgba(183, 28, 28, 0.12), 0 0 0 8px rgba(183, 28, 28, 0.06);
}

:root[data-appearance-theme="light"] .composer__shell {
  background: linear-gradient(180deg, #e3ddd2 0%, #d7d0c4 100%);
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

:root[data-appearance-theme="light"] .composer__shell:focus-within {
  border-color: rgba(15, 23, 42, 0.14);
}

:root[data-appearance-theme="light"] .composer__input {
  color: rgba(15, 23, 42, 0.9);
}

:root[data-appearance-theme="light"] .composer__input::placeholder {
  color: rgba(15, 23, 42, 0.42);
}

:root[data-appearance-theme="light"] .composer__guest-placeholder {
  color: rgba(15, 23, 42, 0.42);
}

:root[data-appearance-theme="light"] .composer__guest-placeholder-swarm,
:root[data-appearance-theme="light"] .pricing-card__beta {
  background-image: linear-gradient(120deg, rgba(15, 23, 42, 0.42) 35%, rgba(45, 135, 92, 0.78) 50%, rgba(15, 23, 42, 0.42) 65%);
}

:root[data-appearance-theme="light"] .composer__inputwrap.is-transcribing .composer__input::placeholder {
  color: transparent;
}

:root[data-appearance-theme="light"] .composer__transcribe-spinner {
  border-color: rgba(63, 159, 63, 0.2);
  border-top-color: rgba(63, 159, 63, 0.95);
  border-right-color: rgba(63, 159, 63, 0.72);
}

:root[data-appearance-theme="light"] .composer__attachment {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.03);
}

:root[data-appearance-theme="light"] .composer__attachment-preview {
  background: rgba(15, 23, 42, 0.08);
}

:root[data-appearance-theme="light"] .msg__avatar {
  border-color: rgba(15, 23, 42, 0.08);
}

:root[data-appearance-theme="light"] .msg__avatar--user {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.04));
  color: rgba(15, 23, 42, 0.86);
}

:root[data-appearance-theme="light"] .msg__tool-rail {
  border-top-color: rgba(15, 23, 42, 0.1);
}

:root[data-appearance-theme="light"] .msg__bubble,
:root[data-appearance-theme="light"] .msg__regular-text,
:root[data-appearance-theme="light"] .msg__streaming-text,
:root[data-appearance-theme="light"] .msg__markdown {
  color: rgba(58, 47, 35, 0.9);
}

:root[data-appearance-theme="light"] .msg--ai .msg__bubble {
  background: transparent;
  border: none;
  box-shadow: none;
}

:root[data-appearance-theme="light"] .msg--user .msg__bubble {
  background: #d8cab8;
  border: 1px solid rgba(106, 83, 55, 0.12);
  color: rgba(54, 41, 28, 0.96);
  box-shadow: 0 8px 18px rgba(99, 77, 49, 0.05);
}

:root[data-appearance-theme="light"] .msg__steering-status::before,
:root[data-appearance-theme="light"] .history-item__scan-indicator::before {
  border-color: rgba(54, 41, 28, 0.14);
  border-top-color: rgba(54, 41, 28, 0.56);
}

:root[data-appearance-theme="light"] .msg__markdown h1,
:root[data-appearance-theme="light"] .msg__markdown h2,
:root[data-appearance-theme="light"] .msg__markdown h3,
:root[data-appearance-theme="light"] .msg__markdown h4,
:root[data-appearance-theme="light"] .msg__markdown h5,
:root[data-appearance-theme="light"] .msg__markdown h6 {
  color: rgba(66, 50, 32, 0.96);
}

:root[data-appearance-theme="light"] .msg__markdown strong,
:root[data-appearance-theme="light"] .msg__markdown b {
  color: rgba(58, 44, 29, 0.96);
}

:root[data-appearance-theme="light"] .msg__markdown blockquote {
  border-left-color: rgba(132, 101, 67, 0.42);
  color: rgba(82, 63, 41, 0.82);
}

:root[data-appearance-theme="light"] .msg__markdown hr {
  border-top-color: rgba(116, 92, 62, 0.14);
}

:root[data-appearance-theme="light"] .msg__inline-code {
  background: #ddd1bf;
  border-color: rgba(116, 92, 62, 0.12);
  color: rgba(82, 57, 29, 0.96);
}

:root[data-appearance-theme="light"] .msg__link {
  color: #2f5f8a;
  text-decoration-color: rgba(47, 95, 138, 0.35);
}

:root[data-appearance-theme="light"] .msg__link:hover {
  color: #214f79;
}

:root[data-appearance-theme="light"] .msg__search-link {
  color: rgba(84, 68, 49, 0.74);
}

:root[data-appearance-theme="light"] .msg__search-link:hover {
  color: rgba(62, 48, 33, 0.9);
}

:root[data-appearance-theme="light"] .msg__streaming-text::after,
:root[data-appearance-theme="light"] .msg__streaming-markdown .msg__streaming-caret {
  border-right-color: rgba(112, 91, 62, 0.7);
}

:root[data-appearance-theme="light"] .msg--typing .msg__action-text {
  background: linear-gradient(120deg, rgba(110, 88, 60, 0.4) 30%, rgba(58, 44, 29, 1) 50%, rgba(110, 88, 60, 0.4) 70%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: typingShimmer 2s linear infinite;
}

:root[data-appearance-theme="light"] .msg__finalize-now {
  color: rgba(92, 72, 50, 0.7);
}

:root[data-appearance-theme="light"] .msg__finalize-now:hover {
  color: rgba(62, 48, 33, 0.92);
}

:root[data-appearance-theme="light"] .msg__finalize-now:focus-visible {
  outline-color: rgba(92, 72, 50, 0.24);
}

:root[data-appearance-theme="light"] .msg__finalize-now:disabled {
  color: rgba(92, 72, 50, 0.38);
}

:root[data-appearance-theme="light"] .cot-text {
  color: rgba(92, 72, 50, 0.62);
}

:root[data-appearance-theme="light"] .cot-toggle {
  color: rgba(92, 72, 50, 0.62);
}

:root[data-appearance-theme="light"] .cot-toggle:hover {
  color: rgba(92, 72, 50, 0.9);
  background: rgba(92, 72, 50, 0.08);
}

:root[data-appearance-theme="light"] .swarm-process__toggle {
  color: rgba(70, 54, 36, 0.76);
}

:root[data-appearance-theme="light"] .swarm-process__toggle:hover {
  color: rgba(48, 36, 24, 0.94);
}

:root[data-appearance-theme="light"] .swarm-process.is-complete .swarm-process__title {
  color: rgba(110, 88, 60, 0.4);
}

:root[data-appearance-theme="light"] .swarm-process.is-live .swarm-process__title {
  background: linear-gradient(120deg, rgba(110, 88, 60, 0.4) 30%, rgba(58, 44, 29, 1) 50%, rgba(110, 88, 60, 0.4) 70%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: typingShimmer 2s linear infinite;
}

:root[data-appearance-theme="light"] .swarm-process__chevron {
  color: rgba(92, 72, 50, 0.62);
}

:root[data-appearance-theme="light"] .swarm-process__entry {
  color: rgba(70, 54, 36, 0.84);
}

:root[data-appearance-theme="light"] .swarm-process__entry--phase,
:root[data-appearance-theme="light"] .swarm-process__entry--verdict {
  color: rgba(54, 40, 26, 0.92);
}

:root[data-appearance-theme="light"] .swarm-process__worker-status {
  color: rgba(82, 63, 42, 0.72);
}

:root[data-appearance-theme="light"] .swarm-process.is-live .swarm-process__entry--worker:not(.is-complete):not(.has-error) .swarm-process__worker-status {
  background: linear-gradient(120deg, rgba(110, 88, 60, 0.4) 30%, rgba(58, 44, 29, 1) 50%, rgba(110, 88, 60, 0.4) 70%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

:root[data-appearance-theme="light"] .model-library-view {
  background: linear-gradient(180deg, #e7e1d6 0%, #dbd3c7 100%);
}

:root[data-appearance-theme="light"] .library-title,
:root[data-appearance-theme="light"] .library-note,
:root[data-appearance-theme="light"] .library-note__text,
:root[data-appearance-theme="light"] .library-cell,
:root[data-appearance-theme="light"] .library-row .library-cell--author,
:root[data-appearance-theme="light"] .library-row .library-cell--cost,
:root[data-appearance-theme="light"] .library-sort,
:root[data-appearance-theme="light"] .library-empty {
  color: rgba(15, 23, 42, 0.8);
}

:root[data-appearance-theme="light"] .library-model-badges {
  color: rgba(66, 50, 32, 0.82);
}

:root[data-appearance-theme="light"] .msg__inline-capability-icon {
  color: rgba(66, 50, 32, 0.82);
}

:root[data-appearance-theme="light"] .library-model-badge {
  opacity: 1;
}

:root[data-appearance-theme="light"] .library-model-badge svg {
  stroke: currentColor;
}

:root[data-appearance-theme="light"] .library-model-badge[title="Agent"] svg {
  color: #6aa97c;
  stroke: #6aa97c;
}

:root[data-appearance-theme="light"] .library-model-new-badge {
  background: rgba(16, 163, 127, 0.12);
  color: #08785c;
}

:root[data-appearance-theme="light"] .library-search__input,
:root[data-appearance-theme="light"] .library-select__input {
  border-color: rgba(15, 23, 42, 0.12);
  background: #ddd6c7;
  color: rgba(15, 23, 42, 0.92);
}

:root[data-appearance-theme="light"] .library-search__input::placeholder {
  color: rgba(15, 23, 42, 0.5);
}

:root[data-appearance-theme="light"] .library-search__input:focus,
:root[data-appearance-theme="light"] .library-select__input:focus {
  border-color: rgba(15, 23, 42, 0.22);
  background: #e3dccd;
}

:root[data-appearance-theme="light"] .library-search__icon,
:root[data-appearance-theme="light"] .library-select__icon {
  color: rgba(15, 23, 42, 0.7);
}

:root[data-appearance-theme="light"] .library-toggle {
  border-color: rgba(15, 23, 42, 0.12);
  background: #ddd6c7;
  color: rgba(15, 23, 42, 0.82);
}

:root[data-appearance-theme="light"] .library-toggle:hover {
  background: #e3dccd;
}

:root[data-appearance-theme="light"] .library-toggle__icon {
  color: rgba(15, 23, 42, 0.6);
}

:root[data-appearance-theme="light"] .library-toggle__switch {
  background: rgba(15, 23, 42, 0.2);
}

:root[data-appearance-theme="light"] .library-toggle.is-active {
  border-color: rgba(15, 23, 42, 0.2);
}

:root[data-appearance-theme="light"] .library-toggle.is-active .library-toggle__icon {
  color: rgba(15, 23, 42, 0.82);
}

:root[data-appearance-theme="light"] .library-toggle.is-active .library-toggle__switch {
  background: rgba(22, 130, 93, 0.9);
}

:root[data-appearance-theme="light"] .library-panel,
:root[data-appearance-theme="light"] .library-table-head,
:root[data-appearance-theme="light"] .library-row {
  background: #ddd6c7;
  border-color: rgba(15, 23, 42, 0.12);
}

:root[data-appearance-theme="light"] .library-row:hover {
  background: #d3ccbb;
}

:root[data-appearance-theme="light"] .library-row.is-active {
  background: #c5bda9;
  box-shadow: inset 2px 0 0 rgba(66, 50, 32, 0.85);
}

:root[data-appearance-theme="light"] .library-sort-button:hover,
:root[data-appearance-theme="light"] .library-sort-button:focus-visible {
  color: rgba(15, 23, 42, 0.94);
}

:root[data-appearance-theme="light"] .library-pagination {
  border-top-color: rgba(15, 23, 42, 0.12);
  background: #d6cebd;
}

:root[data-appearance-theme="light"] .library-pagination__btn {
  border-color: rgba(15, 23, 42, 0.16);
  background: #ddd6c7;
  color: rgba(15, 23, 42, 0.9);
}

:root[data-appearance-theme="light"] .library-pagination__btn:hover:not(:disabled) {
  background: #d3ccbb;
  border-color: rgba(15, 23, 42, 0.24);
}

:root[data-appearance-theme="light"] .library-pagination__info {
  color: rgba(15, 23, 42, 0.7);
}

:root[data-appearance-theme="light"] .library-credit-amount {
  color: rgba(15, 23, 42, 0.88);
}

:root[data-appearance-theme="light"] .model-item--library-link {
  color: rgba(15, 23, 42, 0.78);
  border-top-color: rgba(15, 23, 42, 0.1);
}

:root[data-appearance-theme="light"] .model-item--library-link:hover {
  background: rgba(15, 23, 42, 0.06);
}

:root[data-appearance-theme="light"] .model-item__library-icon {
  color: rgba(15, 23, 42, 0.78);
}

:root[data-appearance-theme="light"] .library-info-tooltip__content {
  border-color: rgba(15, 23, 42, 0.14);
  background: #f5efe1;
  color: rgba(15, 23, 42, 0.9);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

:root[data-appearance-theme="light"] .reasoningbtn {
  color: rgba(15, 23, 42, 0.72);
}

:root[data-appearance-theme="light"] .reasoningbtn:hover {
  color: rgba(15, 23, 42, 0.92);
  background: rgba(15, 23, 42, 0.06);
}

:root[data-appearance-theme="light"] .reasoning-menu__title {
  color: rgba(15, 23, 42, 0.62);
}

:root[data-appearance-theme="light"] .mode-item__icon--ghost {
  color: rgba(15, 23, 42, 0.7);
}

:root[data-appearance-theme="light"] .mode-switcher[data-mode="agent"] .modebtn,
:root[data-appearance-theme="light"] .mode-switcher[data-mode="swarm"] .modebtn {
  background: rgba(120, 80, 40, 0.18);
  color: rgba(66, 40, 18, 0.96);
}

:root[data-appearance-theme="light"] .mode-switcher[data-mode="agent"] .modebtn:hover,
:root[data-appearance-theme="light"] .mode-switcher[data-mode="swarm"] .modebtn:hover {
  background: rgba(120, 80, 40, 0.26);
  color: rgba(66, 40, 18, 1);
}

:root[data-appearance-theme="light"] .settings-row__content-btn svg {
  color: rgba(15, 23, 42, 0.7);
}

:root[data-appearance-theme="light"] .history-dialog__button--accent,
:root[data-appearance-theme="light"] .history-dialog__button[data-variant="accent"],
:root[data-appearance-theme="light"] .out-of-credits-modal__btn--primary,
:root[data-appearance-theme="light"] .guest-model-sheet__cta,
:root[data-appearance-theme="light"] .auth-modal__continue,
:root[data-appearance-theme="light"] .shared-page__signup-btn {
  background: rgba(120, 80, 40, 0.22);
  color: rgba(66, 40, 18, 0.96);
}

:root[data-appearance-theme="light"] .history-dialog__button--accent:hover,
:root[data-appearance-theme="light"] .history-dialog__button[data-variant="accent"]:hover,
:root[data-appearance-theme="light"] .out-of-credits-modal__btn--primary:hover,
:root[data-appearance-theme="light"] .guest-model-sheet__cta:hover,
:root[data-appearance-theme="light"] .auth-modal__continue:hover,
:root[data-appearance-theme="light"] .shared-page__signup-btn:hover {
  background: rgba(120, 80, 40, 0.32);
  color: rgba(66, 40, 18, 1);
}

:root[data-appearance-theme="light"] .settings-modal__panel,
:root[data-appearance-theme="light"] .personalization-modal__panel,
:root[data-appearance-theme="light"] .auth-modal__panel,
:root[data-appearance-theme="light"] .auth-modal__loading,
:root[data-appearance-theme="light"] .history-dialog__panel,
:root[data-appearance-theme="light"] .out-of-credits-modal__panel,
:root[data-appearance-theme="light"] .conversation-search__panel,
:root[data-appearance-theme="light"] .history-action-menu,
:root[data-appearance-theme="light"] .account-menu,
:root[data-appearance-theme="light"] .settings-plan-menu,
:root[data-appearance-theme="light"] .model-menu,
:root[data-appearance-theme="light"] .mode-menu,
:root[data-appearance-theme="light"] .reasoning-menu,
:root[data-appearance-theme="light"] .guest-upsell-popover,
:root[data-appearance-theme="light"] .settings-select-menu,
:root[data-appearance-theme="light"] .pricing-modal__shell {
  background: linear-gradient(180deg, #ddd6ca 0%, #d1c8bb 100%);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.12);
}

:root[data-appearance-theme="light"] .settings-select-menu {
  box-shadow: none;
}

:root[data-appearance-theme="light"] .settings-modal__sidebar {
  background: linear-gradient(180deg, #ddd6ca 0%, #d4ccbf 100%);
  border-right-color: rgba(15, 23, 42, 0.08);
}

:root[data-appearance-theme="light"] .settings-modal__title,
:root[data-appearance-theme="light"] .personalization-modal__title,
:root[data-appearance-theme="light"] .personalization-form__toggle-title,
:root[data-appearance-theme="light"] .personalization-field__label,
:root[data-appearance-theme="light"] .settings-tab,
:root[data-appearance-theme="light"] .settings-row__label,
:root[data-appearance-theme="light"] .settings-row__control,
:root[data-appearance-theme="light"] .settings-row__content-btn,
:root[data-appearance-theme="light"] .settings-row__value,
:root[data-appearance-theme="light"] .settings-row__static-value,
:root[data-appearance-theme="light"] .settings-row__desc,
:root[data-appearance-theme="light"] .settings-modal__close,
:root[data-appearance-theme="light"] .personalization-modal__close,
:root[data-appearance-theme="light"] .history-dialog__title,
:root[data-appearance-theme="light"] .history-dialog__description,
:root[data-appearance-theme="light"] .history-dialog__message,
:root[data-appearance-theme="light"] .history-dialog__close,
:root[data-appearance-theme="light"] .out-of-credits-modal__title,
:root[data-appearance-theme="light"] .out-of-credits-modal__description,
:root[data-appearance-theme="light"] .conversation-search__input,
:root[data-appearance-theme="light"] .conversation-search__close,
:root[data-appearance-theme="light"] .conversation-search__section-title,
:root[data-appearance-theme="light"] .conversation-search__item-title,
:root[data-appearance-theme="light"] .conversation-search__item-preview,
:root[data-appearance-theme="light"] .conversation-search__message,
:root[data-appearance-theme="light"] .auth-modal__title,
:root[data-appearance-theme="light"] .auth-modal__copy,
:root[data-appearance-theme="light"] .auth-modal__legal,
:root[data-appearance-theme="light"] .auth-modal__close,
:root[data-appearance-theme="light"] .auth-modal__provider,
:root[data-appearance-theme="light"] .auth-modal__divider,
:root[data-appearance-theme="light"] .auth-modal__input,
:root[data-appearance-theme="light"] .auth-modal__inline-link,
:root[data-appearance-theme="light"] .auth-modal__status,
:root[data-appearance-theme="light"] .pricing-modal__title,
:root[data-appearance-theme="light"] .pricing-card__name,
:root[data-appearance-theme="light"] .pricing-card__tagline,
:root[data-appearance-theme="light"] .pricing-card__price,
:root[data-appearance-theme="light"] .pricing-card__currency,
:root[data-appearance-theme="light"] .pricing-card__interval,
:root[data-appearance-theme="light"] .pricing-card__features-title,
:root[data-appearance-theme="light"] .pricing-card__features li,
:root[data-appearance-theme="light"] .history-action-menu__item,
:root[data-appearance-theme="light"] .account-menu__usage-label,
:root[data-appearance-theme="light"] .account-menu__usage-icon,
:root[data-appearance-theme="light"] .account-menu__usage-percent,
:root[data-appearance-theme="light"] .account-menu__item,
:root[data-appearance-theme="light"] .settings-plan-menu__item,
:root[data-appearance-theme="light"] .mode-item,
:root[data-appearance-theme="light"] .model-item,
:root[data-appearance-theme="light"] .guest-model-sheet__copy,
:root[data-appearance-theme="light"] .guest-model-sheet__inline-cta,
:root[data-appearance-theme="light"] .settings-select-menu__item {
  color: rgba(15, 23, 42, 0.86);
}

:root[data-appearance-theme="light"] .mfa-setup__manual-trigger {
  color: rgba(15, 23, 42, 0.68);
}

:root[data-appearance-theme="light"] .mfa-setup__manual-trigger:hover {
  color: rgba(15, 23, 42, 0.92);
}

:root[data-appearance-theme="light"] .mfa-setup__manual-key {
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.92);
}

:root[data-appearance-theme="light"] .settings-tab:hover,
:root[data-appearance-theme="light"] .settings-row__control:hover,
:root[data-appearance-theme="light"] .settings-select-menu__item:hover,
:root[data-appearance-theme="light"] .history-action-menu__item:hover,
:root[data-appearance-theme="light"] .mode-item:hover,
:root[data-appearance-theme="light"] .conversation-search__item:hover,
:root[data-appearance-theme="light"] .conversation-search__item.is-active,
:root[data-appearance-theme="light"] .auth-modal__close:hover,
:root[data-appearance-theme="light"] .settings-modal__close:hover,
:root[data-appearance-theme="light"] .personalization-modal__close:hover,
:root[data-appearance-theme="light"] .history-dialog__close:hover,
:root[data-appearance-theme="light"] .conversation-search__close:hover,
:root[data-appearance-theme="light"] .auth-modal__provider:hover,
:root[data-appearance-theme="light"] .model-item:hover {
  background: rgba(15, 23, 42, 0.05);
  color: rgba(15, 23, 42, 0.96);
}

:root[data-appearance-theme="light"] .personalization-modal__description,
:root[data-appearance-theme="light"] .personalization-form__helper,
:root[data-appearance-theme="light"] .personalization-field__count {
  color: rgba(15, 23, 42, 0.56);
}

:root[data-appearance-theme="light"] .personalization-form__toggle-row {
  border-color: rgba(15, 23, 42, 0.1);
}

:root[data-appearance-theme="light"] .personalization-field__control {
  border-color: rgba(15, 23, 42, 0.13);
  background: rgba(255, 255, 255, 0.38);
  color: rgba(15, 23, 42, 0.92);
}

:root[data-appearance-theme="light"] .personalization-field__control::placeholder {
  color: rgba(15, 23, 42, 0.38);
}

:root[data-appearance-theme="light"] .personalization-field__control:focus {
  border-color: rgba(15, 23, 42, 0.38);
  background: rgba(255, 255, 255, 0.56);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.06);
}

:root[data-appearance-theme="light"] .personalization-modal .settings-toggle__input:focus-visible + .settings-toggle__track {
  outline-color: rgba(15, 23, 42, 0.42);
}

:root[data-appearance-theme="light"] .settings-tab.is-active,
:root[data-appearance-theme="light"] .settings-select-menu__item.is-active,
:root[data-appearance-theme="light"] .model-item.is-active,
:root[data-appearance-theme="light"] .mode-item.is-active {
  background: rgba(15, 23, 42, 0.07);
  color: rgba(15, 23, 42, 0.96);
}

:root[data-appearance-theme="light"] .mode-item:hover {
  background: rgba(84, 68, 49, 0.07);
  border-color: rgba(84, 68, 49, 0.08);
}

:root[data-appearance-theme="light"] .settings-plan-toggle {
  color: rgba(15, 23, 42, 0.86);
}

:root[data-appearance-theme="light"] .settings-toggle__track {
  background-color: rgba(66, 50, 32, 0.18);
}

:root[data-appearance-theme="light"] .settings-toggle__track:before {
  background-color: #6b5636;
}

:root[data-appearance-theme="light"] .settings-toggle__input:checked+.settings-toggle__track:before {
  background-color: #fff;
}

:root[data-appearance-theme="light"] .auth-modal__legal-accent {
  color: #2f5f8a;
}

:root[data-appearance-theme="light"] .settings-plan-toggle__indicator {
  color: rgba(15, 23, 42, 0.84);
}

:root[data-appearance-theme="light"] .settings-plan-toggle.is-interactive:hover .settings-row__value--plan {
  color: rgba(15, 23, 42, 0.96);
}

:root[data-appearance-theme="light"] .settings-plan-menu {
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 20px 52px rgba(15, 23, 42, 0.12);
}

:root[data-appearance-theme="light"] .settings-plan-menu__item:hover {
  background: rgba(172, 52, 52, 0.1);
  color: rgba(124, 36, 36, 0.96);
}

:root[data-appearance-theme="light"] .mode-item.is-active {
  background: rgba(66, 50, 32, 0.09);
  border-color: rgba(66, 50, 32, 0.1);
  color: rgba(66, 50, 32, 0.96);
}

:root[data-appearance-theme="light"] .mode-item__desc {
  color: rgba(84, 68, 49, 0.72);
}

:root[data-appearance-theme="light"] .mode-item.is-active .mode-item__desc {
  color: rgba(66, 50, 32, 0.82);
}

:root[data-appearance-theme="light"] #modeMenuPanel .mode-item.is-active {
  background: transparent;
  border-color: transparent;
  color: rgba(15, 23, 42, 0.86);
}

:root[data-appearance-theme="light"] #modeMenuPanel .mode-item:hover {
  background: rgba(15, 23, 42, 0.05);
  border-color: transparent;
}

:root[data-appearance-theme="light"] #modeMenuPanel .mode-item__desc {
  color: rgba(84, 68, 49, 0.42);
}

:root[data-appearance-theme="light"] #modeMenuPanel .mode-item__name {
  color: rgba(42, 31, 20, 0.92);
  text-shadow: none;
}

:root[data-appearance-theme="light"] #modeMenuPanel .mode-item:hover .mode-item__name {
  color: rgba(28, 20, 13, 1);
}

:root[data-appearance-theme="light"] #modeMenuPanel .mode-item.is-active:hover {
  background: rgba(15, 23, 42, 0.05);
  border-color: transparent;
}

:root[data-appearance-theme="light"] #modeMenuPanel .mode-item.is-active .mode-item__desc {
  color: rgba(84, 68, 49, 0.42);
}

:root[data-appearance-theme="light"] .mode-item__plan-badge {
  background: rgba(66, 50, 32, 0.08);
  color: rgba(66, 50, 32, 0.9);
}

:root[data-appearance-theme="light"] .settings-row,
:root[data-appearance-theme="light"] .account-menu__divider,
:root[data-appearance-theme="light"] .account-menu__usage-bar,
:root[data-appearance-theme="light"] .history-dialog__input,
:root[data-appearance-theme="light"] .conversation-search__input-shell,
:root[data-appearance-theme="light"] .auth-modal__provider,
:root[data-appearance-theme="light"] .auth-modal__divider::before,
:root[data-appearance-theme="light"] .auth-modal__divider::after {
  border-color: rgba(15, 23, 42, 0.08);
}

:root[data-appearance-theme="light"] .account-menu__usage-bar-fill {
  background: rgba(66, 50, 32, 0.96);
}

:root[data-appearance-theme="light"] .conversation-search__header {
  border-bottom-color: rgba(84, 68, 49, 0.1);
}

:root[data-appearance-theme="light"] .conversation-search__input-shell {
  background: #e5ddd0;
  border: 1px solid rgba(84, 68, 49, 0.12);
  border-radius: 16px;
  padding: 0 14px;
  color: rgba(84, 68, 49, 0.72);
}

:root[data-appearance-theme="light"] .conversation-search__search-icon,
:root[data-appearance-theme="light"] .conversation-search__item-icon {
  color: rgba(66, 50, 32, 0.78);
}

:root[data-appearance-theme="light"] .history-dialog__input,
:root[data-appearance-theme="light"] .conversation-search__input,
:root[data-appearance-theme="light"] .auth-modal__input {
  background: #ece7de;
  color: rgba(15, 23, 42, 0.88);
}

:root[data-appearance-theme="light"] .conversation-search__input {
  background: transparent;
  color: rgba(58, 44, 29, 0.94);
}

:root[data-appearance-theme="light"] .history-dialog__input::placeholder,
:root[data-appearance-theme="light"] .conversation-search__input::placeholder,
:root[data-appearance-theme="light"] .auth-modal__input::placeholder {
  color: rgba(15, 23, 42, 0.4);
}

:root[data-appearance-theme="light"] .conversation-search__input::placeholder {
  color: rgba(84, 68, 49, 0.52);
}

:root[data-appearance-theme="light"] .conversation-search__section-title {
  color: rgba(66, 50, 32, 0.78);
}

:root[data-appearance-theme="light"] .conversation-search__item {
  color: rgba(58, 44, 29, 0.94);
}

:root[data-appearance-theme="light"] .conversation-search__item:hover,
:root[data-appearance-theme="light"] .conversation-search__item.is-active {
  background: rgba(84, 68, 49, 0.08);
}

:root[data-appearance-theme="light"] .conversation-search__item-title {
  color: rgba(58, 44, 29, 0.94);
}

:root[data-appearance-theme="light"] .conversation-search__item-preview,
:root[data-appearance-theme="light"] .conversation-search__message {
  color: rgba(84, 68, 49, 0.74);
}

:root[data-appearance-theme="light"] .conversation-search__highlight {
  color: rgba(66, 50, 32, 0.96);
}

:root[data-appearance-theme="light"] .settings-row__static-value[data-empty="true"] {
  color: rgba(84, 68, 49, 0.74);
}

:root[data-appearance-theme="light"] .settings-swarm__intro,
:root[data-appearance-theme="light"] .settings-swarm__section-copy,
:root[data-appearance-theme="light"] .settings-swarm-model__desc,
:root[data-appearance-theme="light"] .settings-swarm-picker__description,
:root[data-appearance-theme="light"] .settings-swarm-picker__option-author,
:root[data-appearance-theme="light"] .settings-swarm-picker__option-meta,
:root[data-appearance-theme="light"] .settings-swarm-picker__footnote,
:root[data-appearance-theme="light"] .settings-swarm-picker__empty,
:root[data-appearance-theme="light"] .settings-swarm__save-status {
  color: rgba(84, 68, 49, 0.66);
}

:root[data-appearance-theme="light"] .settings-swarm__section-title,
:root[data-appearance-theme="light"] .settings-swarm-model__title,
:root[data-appearance-theme="light"] .settings-swarm-model__name,
:root[data-appearance-theme="light"] .settings-swarm-picker__title,
:root[data-appearance-theme="light"] .settings-swarm-picker__option-name {
  color: rgba(42, 31, 20, 0.94);
}

:root[data-appearance-theme="light"] .settings-swarm-picker__back,
:root[data-appearance-theme="light"] .settings-swarm-picker__search {
  background-color: rgba(255, 255, 255, 0.28);
  color: rgba(42, 31, 20, 0.9);
}

:root[data-appearance-theme="light"] .settings-swarm-picker__back:hover,
:root[data-appearance-theme="light"] .settings-swarm-picker__option:hover {
  background-color: rgba(255, 255, 255, 0.4);
  color: rgba(42, 31, 20, 0.96);
}

:root[data-appearance-theme="light"] .settings-swarm-picker {
  background: linear-gradient(180deg, #ddd6ca 0%, #d1c8bb 100%);
}

:root[data-appearance-theme="light"] .settings-swarm-picker__search-input {
  color: rgba(42, 31, 20, 0.94);
}

:root[data-appearance-theme="light"] .settings-swarm-picker__search-input::placeholder {
  color: rgba(84, 68, 49, 0.52);
}

:root[data-appearance-theme="light"] .settings-swarm-picker__search-input::-webkit-search-cancel-button {
  filter: none;
}

:root[data-appearance-theme="light"] .settings-swarm-picker__recommended {
  background: rgba(35, 111, 77, 0.1);
  color: rgba(28, 91, 63, 0.92);
}

:root[data-appearance-theme="light"] .settings-swarm-picker__reasoning {
  color: rgba(20, 24, 22, 0.58);
}

:root[data-appearance-theme="light"] .settings-swarm-picker__option.is-selected {
  border-color: transparent;
  background: rgba(35, 111, 77, 0.08);
}

:root[data-appearance-theme="light"] .settings-swarm-model__chevron {
  color: rgba(84, 68, 49, 0.56);
}

:root[data-appearance-theme="light"] .settings-swarm__save-status[data-state="saved"] {
  color: rgba(28, 106, 70, 0.82);
}

:root[data-appearance-theme="light"] .settings-swarm__save-status[data-state="error"] {
  color: rgba(158, 53, 45, 0.88);
}

:root[data-appearance-theme="light"] .history-dialog__button--secondary,
:root[data-appearance-theme="light"] .auth-modal__secondary,
:root[data-appearance-theme="light"] .out-of-credits-modal__btn--secondary,
:root[data-appearance-theme="light"] .topbar__auth-btn {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.08);
  color: rgba(15, 23, 42, 0.86);
}

:root[data-appearance-theme="light"] .tool-inspector__panel {
  background: linear-gradient(180deg, rgba(227, 221, 210, 0.985), rgba(215, 208, 196, 0.985));
  border-left-color: rgba(15, 23, 42, 0.08);
  box-shadow: -18px 0 48px rgba(15, 23, 42, 0.08);
}

:root[data-appearance-theme="light"] .tool-inspector__chrome {
  background: linear-gradient(180deg, rgba(236, 230, 221, 0.96), rgba(243, 239, 231, 0.92));
  border-bottom-color: rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.03);
}

:root[data-appearance-theme="light"] .tool-inspector__resize-handle::before {
  background: rgba(15, 23, 42, 0.08);
}

:root[data-appearance-theme="light"] .tool-inspector__resize-handle:hover::before,
:root[data-appearance-theme="light"] .main.is-tool-inspector-resizing .tool-inspector__resize-handle::before {
  background: rgba(15, 23, 42, 0.2);
}

:root[data-appearance-theme="light"] .tool-inspector__nav {
  background: rgba(15, 23, 42, 0.05);
  color: rgba(15, 23, 42, 0.84);
}

:root[data-appearance-theme="light"] .tool-inspector__nav:hover:not(:disabled) {
  background: rgba(15, 23, 42, 0.08);
}

:root[data-appearance-theme="light"] .tool-inspector__close,
:root[data-appearance-theme="light"] .tool-inspector__skip,
:root[data-appearance-theme="light"] .tool-inspector__settings,
:root[data-appearance-theme="light"] .tool-inspector__reset,
:root[data-appearance-theme="light"] .tool-inspector__title,
:root[data-appearance-theme="light"] .tool-inspector__subtitle,
:root[data-appearance-theme="light"] .tool-inspector__subtitle-prefix,
:root[data-appearance-theme="light"] .tool-inspector__counter,
:root[data-appearance-theme="light"] .tool-inspector__meta,
:root[data-appearance-theme="light"] .terminal-approval__prompt {
  color: rgba(15, 23, 42, 0.72);
}

:root[data-appearance-theme="light"] .tool-inspector__title {
  color: rgba(15, 23, 42, 0.94);
}

:root[data-appearance-theme="light"] .tool-inspector__close:hover,
:root[data-appearance-theme="light"] .tool-inspector__settings:hover,
:root[data-appearance-theme="light"] .tool-inspector__reset:hover {
  color: rgba(15, 23, 42, 0.96);
}

:root[data-appearance-theme="light"] .tool-inspector__skip:hover:not(:disabled) {
  color: rgb(194, 83, 0);
}

:root[data-appearance-theme="light"] .tool-inspector__command-label {
  color: rgba(15, 23, 42, 0.6);
}

:root[data-appearance-theme="light"] .tool-inspector__artifact {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
  color: rgba(15, 23, 42, 0.84);
}

:root[data-appearance-theme="light"] .tool-inspector__console {
  background: linear-gradient(180deg, #f1ede4, #e7e1d7);
  border-color: rgba(15, 23, 42, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

:root[data-appearance-theme="light"] .tool-inspector__command {
  color: rgba(15, 23, 42, 0.88);
}

:root[data-appearance-theme="light"] .tool-inspector__console-divider,
:root[data-appearance-theme="light"] .tool-inspector__meta {
  border-color: rgba(15, 23, 42, 0.08);
}

:root[data-appearance-theme="light"] .tool-inspector__console-divider {
  background: rgba(15, 23, 42, 0.08);
}

:root[data-appearance-theme="light"] .tool-inspector__console-divider[data-resizable="true"]::after {
  background: rgba(15, 23, 42, 0.18);
}

:root[data-appearance-theme="light"] .tool-inspector__console-divider[data-resizable="true"]:hover,
:root[data-appearance-theme="light"] .tool-inspector__console-divider[data-resizable="true"]:focus-visible,
:root[data-appearance-theme="light"] .is-tool-inspector-console-resizing .tool-inspector__console-divider[data-resizable="true"] {
  background: rgba(15, 23, 42, 0.14);
}

:root[data-appearance-theme="light"] .tool-inspector__console-divider[data-resizable="true"]:hover::after,
:root[data-appearance-theme="light"] .tool-inspector__console-divider[data-resizable="true"]:focus-visible::after,
:root[data-appearance-theme="light"] .is-tool-inspector-console-resizing .tool-inspector__console-divider[data-resizable="true"]::after {
  background: rgba(15, 23, 42, 0.38);
}

:root[data-appearance-theme="light"] .tool-inspector__artifact--toggle {
  background: rgba(15, 23, 42, 0.045);
  border-color: rgba(15, 23, 42, 0.1);
  color: rgba(15, 23, 42, 0.58);
}

:root[data-appearance-theme="light"] .tool-inspector__artifact--toggle:hover {
  background: rgba(15, 23, 42, 0.075);
  border-color: rgba(15, 23, 42, 0.15);
  color: rgba(15, 23, 42, 0.76);
}

:root[data-appearance-theme="light"] .tool-inspector__artifacts-label {
  color: rgba(15, 23, 42, 0.6);
}

:root[data-appearance-theme="light"] .tool-inspector__output {
  background: transparent;
  border-color: transparent;
  color: rgba(15, 23, 42, 0.88);
}

:root[data-appearance-theme="light"] .tool-inspector__output-copy {
  color: rgba(15, 23, 42, 0.62);
}

:root[data-appearance-theme="light"] .tool-inspector__output-copy:hover {
  color: rgba(15, 23, 42, 0.92);
}

:root[data-appearance-theme="light"] .pricing-card {
  background: #efe9dd;
  border-color: rgba(66, 50, 32, 0.18);
  box-shadow: 0 6px 18px rgba(66, 50, 32, 0.1);
}

:root[data-appearance-theme="light"] .pricing-card--plus {
  background: #e8e1d3;
  border-color: rgba(103, 88, 244, 0.32);
  box-shadow: 0 10px 26px rgba(103, 88, 244, 0.16);
}

:root[data-appearance-theme="light"] .pricing-card__features li::before {
  border-right-color: rgba(15, 23, 42, 0.82);
  border-bottom-color: rgba(15, 23, 42, 0.82);
}

:root[data-appearance-theme="light"] .pricing-card__badge {
  background: rgba(103, 88, 244, 0.12);
  color: #5d50d8;
}

:root[data-appearance-theme="light"] .pricing-card__button--ghost {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
  color: rgba(15, 23, 42, 0.62);
}

:root[data-appearance-theme="light"] .pricing-card__button--light {
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.9);
}

:root[data-appearance-theme="light"] .pricing-modal__enterprise {
  color: rgba(15, 23, 42, 0.68);
}

:root[data-appearance-theme="light"] .pricing-modal__footnote-divider {
  background: rgba(15, 23, 42, 0.2);
}

:root[data-appearance-theme="light"] .pricing-modal__tax-note-text {
  color: rgba(15, 23, 42, 0.68);
}

:root[data-appearance-theme="light"] .pricing-modal__billing-note {
  color: #6a63d9;
}

:root[data-appearance-theme="light"] .pricing-modal__close {
  color: rgba(15, 23, 42, 0.82);
}

:root[data-appearance-theme="light"] .pricing-modal__billing {
  background: #cfc6b6;
  border-color: rgba(66, 50, 32, 0.18);
}

:root[data-appearance-theme="light"] .pricing-modal__billing-btn {
  color: rgba(66, 50, 32, 0.66);
}

:root[data-appearance-theme="light"] .pricing-modal__billing-btn.is-active {
  background: #efe9dd;
  color: rgba(15, 23, 42, 0.92);
}

:root[data-appearance-theme="light"] .settings-usage__hero-label,
:root[data-appearance-theme="light"] .settings-usage__hero-meta,
:root[data-appearance-theme="light"] .settings-usage__hero-note,
:root[data-appearance-theme="light"] .settings-usage-card__label,
:root[data-appearance-theme="light"] .settings-usage-card__meta,
:root[data-appearance-theme="light"] .settings-usage-card__toggle-label,
:root[data-appearance-theme="light"] .settings-usage-table th {
  color: rgba(66, 50, 32, 0.72);
}

:root[data-appearance-theme="light"] .settings-usage-card,
:root[data-appearance-theme="light"] .settings-usage-table__shell {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

:root[data-appearance-theme="light"] .settings-usage__hero-amount,
:root[data-appearance-theme="light"] .settings-usage-card__value,
:root[data-appearance-theme="light"] .settings-usage-card__status,
:root[data-appearance-theme="light"] .settings-usage-table td,
:root[data-appearance-theme="light"] .settings-usage-table__cost {
  color: rgba(15, 23, 42, 0.9);
}

:root[data-appearance-theme="light"] .settings-usage__hero-context {
  color: rgba(66, 50, 32, 0.82);
}

:root[data-appearance-theme="light"] .settings-usage__hero-context-value {
  color: #1a1208;
}

:root[data-appearance-theme="light"] .settings-usage-table__tokens {
  color: rgba(66, 50, 32, 0.82);
}

:root[data-appearance-theme="light"] .settings-usage-card__meter {
  background: rgba(15, 23, 42, 0.08);
}

:root[data-appearance-theme="light"] .settings-usage__topup-btn {
  background: #5e54e8;
  color: #f7f5ff;
}

:root[data-appearance-theme="light"] .settings-usage__topup-btn:hover {
  background: #6a61ee;
}

:root[data-appearance-theme="light"] .settings-usage-card__button,
:root[data-appearance-theme="light"] .settings-usage__range-button,
:root[data-appearance-theme="light"] .settings-usage__export-button,
:root[data-appearance-theme="light"] .settings-usage__chip {
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.9);
}

:root[data-appearance-theme="light"] .settings-usage__range-button:hover,
:root[data-appearance-theme="light"] .settings-usage__export-button:hover {
  background: rgba(15, 23, 42, 0.1);
}

:root[data-appearance-theme="light"] .settings-usage__chip.is-active {
  background: rgba(15, 23, 42, 0.08);
  color: rgba(15, 23, 42, 0.94);
}

:root[data-appearance-theme="light"] .settings-usage__range-button svg {
  color: rgba(66, 50, 32, 0.62);
}

:root[data-appearance-theme="light"] .settings-usage-table th,
:root[data-appearance-theme="light"] .settings-usage-table td {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

:root[data-appearance-theme="light"] .settings-usage-table th {
  background: rgba(239, 233, 225, 0.98);
}

:root[data-appearance-theme="light"] .settings-usage-table__shell {
  scrollbar-color: rgba(15, 23, 42, 0.16) transparent;
}

:root[data-appearance-theme="light"] .settings-usage-table__shell::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.14);
  border: 2px solid transparent;
  background-clip: padding-box;
}

:root[data-appearance-theme="light"] .settings-usage-table__shell::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.2);
  border: 2px solid transparent;
  background-clip: padding-box;
}

:root[data-appearance-theme="light"] .settings-usage-table tbody tr:hover td {
  background: rgba(15, 23, 42, 0.025);
}

:root[data-appearance-theme="light"] .settings-usage-table__swarm-summary:hover td,
:root[data-appearance-theme="light"] .settings-usage-table__swarm-summary.is-expanded td {
  background: rgba(21, 128, 95, 0.055);
}

:root[data-appearance-theme="light"] .settings-usage-table__swarm-label {
  color: rgba(15, 23, 42, 0.92);
}

:root[data-appearance-theme="light"] .settings-usage-table__swarm-count,
:root[data-appearance-theme="light"] .settings-usage-table__swarm-chevron {
  color: rgba(15, 23, 42, 0.42);
}

:root[data-appearance-theme="light"] .settings-usage-table__swarm-summary:hover .settings-usage-table__swarm-chevron {
  color: rgba(15, 23, 42, 0.7);
}

:root[data-appearance-theme="light"] .settings-usage-table__swarm-detail td {
  background: rgba(15, 23, 42, 0.025);
  color: rgba(15, 23, 42, 0.66);
}

:root[data-appearance-theme="light"] .settings-usage-table__swarm-detail:hover td {
  background: rgba(21, 128, 95, 0.035) !important;
}

:root[data-appearance-theme="light"] .settings-usage-table__swarm-detail-date {
  color: rgba(15, 23, 42, 0.42) !important;
}

:root[data-appearance-theme="light"] .settings-usage-table__swarm-detail-model {
  color: rgba(15, 23, 42, 0.72) !important;
}

:root[data-appearance-theme="light"] .settings-usage-table__type {
  color: rgba(66, 50, 32, 0.82);
}

.settings-pro-card {
  display: flex;
  flex-direction: column;
}

.settings-pro-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.settings-pro-card__title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.settings-pro-card__btn {
  background-color: #19382f;
  color: #d1f2e1;
  border: none;
  border-radius: 9999px;
  padding: 8px 16px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, background-color 0.2s;
}

.settings-pro-card__btn:hover {
  background-color: #214339;
}

.settings-pro-card__btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.settings-pro-card__btn:disabled:hover {
  background-color: inherit;
}

.settings-pro-card__subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 20px;
  font-weight: 500;
}

.settings-pro-card__features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-pro-card__features li {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14.5px;
  color: #fff;
}

.settings-pro-card__features li svg {
  color: rgba(255, 255, 255, 0.95);
}

.settings-row--delete-account {
  margin-top: 0;
}

.settings-pro-card__btn--danger {
  background-color: #8c2b2b;
  color: #fff;
}

.settings-pro-card__btn--danger:hover {
  background-color: #bd3a3a;
}

@media (max-width: 980px) {
  .settings-usage__hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .settings-usage__hero-side {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .settings-usage__hero-note {
    max-width: none;
    text-align: left;
  }

  .settings-usage__hero-amount {
    font-size: 26px;
  }
}

@media (max-width: 860px) {
  .settings-modal__panel {
    width: min(100vw - 16px, 100%);
    height: min(100vh - 16px, 100%);
    flex-direction: column;
  }

  .settings-modal__sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 10px;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
  }

  .settings-tab {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .settings-modal__content {
    padding: 22px 20px 20px;
  }

  .settings-modal__header {
    margin-bottom: 18px;
  }

  .settings-swarm-picker {
    padding: 20px 20px 16px;
  }
}

@media (max-width: 640px) {
  .personalization-modal {
    padding: 8px;
  }

  .personalization-modal__panel {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 11px;
  }

  .personalization-modal__header {
    padding: 20px 52px 12px 18px;
  }

  .personalization-modal__close {
    top: 12px;
    right: 12px;
  }

  .personalization-form {
    padding: 0 18px 18px;
  }

  .personalization-form__toggle-row {
    padding: 10px 0 12px;
  }

  .personalization-form__footer {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .personalization-form__actions {
    width: 100%;
  }

  .settings-modal__content {
    padding: 18px 16px 16px;
  }

  .settings-usage__hero {
    gap: 10px;
  }

  .settings-usage__hero-side {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .settings-usage__hero-amount {
    font-size: 22px;
  }

  .settings-usage__hero-context {
    font-size: 14px;
  }

  .settings-usage__toolbar,
  .settings-usage__filters,
  .settings-usage__chips {
    width: 100%;
  }

  .settings-usage__range-button,
  .settings-usage__export-button {
    width: 100%;
    justify-content: center;
  }

  .settings-usage__chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .settings-usage__chip {
    width: 100%;
  }

  .settings-swarm__intro {
    margin-bottom: 20px;
  }

  .settings-swarm__section + .settings-swarm__section {
    margin-top: 25px;
  }

  .settings-swarm__row {
    align-items: stretch;
    flex-direction: column;
    gap: 11px;
  }

  .settings-swarm__row .settings-row__group {
    max-width: none;
  }

  .settings-swarm__row > .settings-select,
  .settings-swarm__limit-control,
  .settings-swarm__limit-menu {
    width: 100%;
  }

  .settings-swarm__limit-control {
    justify-content: space-between;
  }

  .settings-swarm-model {
    flex-direction: column;
    gap: 12px;
  }

  .settings-swarm-model__desc {
    max-width: none;
  }

  .settings-swarm-model__trigger {
    width: 100%;
    max-width: none;
    justify-content: space-between;
  }

  .settings-swarm-picker {
    padding: 17px 16px 14px;
  }

  .settings-swarm-picker__header {
    padding-right: 34px;
    margin-bottom: 13px;
  }

  .settings-swarm-picker__option {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    min-height: 54px;
    padding: 8px;
  }

  .settings-swarm-picker__option-icon {
    width: 34px;
    height: 34px;
  }

  .settings-swarm-picker__option-meta {
    display: none;
  }

  .settings-swarm-picker__recommended {
    display: none;
  }

}

@media (prefers-reduced-motion: reduce) {
  .settings-swarm-picker,
  .settings-swarm-picker__option,
  .settings-usage-table__swarm-summary td,
  .settings-usage-table__swarm-chevron {
    transition: none;
  }

  .settings-usage-table__swarm-detail:not([hidden]) td {
    animation: none;
  }
}

body.has-pricing-modal {
  overflow: hidden;
}

.pricing-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  overflow: hidden;
  background: var(--modal-surface);
  opacity: 0;
  transition: opacity 220ms ease;
}

.pricing-modal[hidden] {
  display: none !important;
}

.pricing-modal.is-open {
  opacity: 1;
}

.pricing-modal__backdrop {
  position: fixed;
  inset: 0;
  background: var(--modal-surface);
  opacity: 0;
  transition: opacity 220ms ease;
}

.pricing-modal__shell {
  position: relative;
  min-height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  padding: 34px clamp(14px, 3vw, 28px) 8px;
  background: var(--modal-surface);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
  transform: translateY(10px);
  opacity: 0;
  transition:
    transform 240ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 220ms ease;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.pricing-modal.is-open .pricing-modal__backdrop {
  opacity: 1;
}

.pricing-modal.is-open .pricing-modal__shell {
  transform: translateY(0);
  opacity: 1;
}

.pricing-modal__shell::-webkit-scrollbar {
  width: 12px;
}

.pricing-modal__shell::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}

.pricing-modal__shell::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}

.pricing-modal__shell::-webkit-scrollbar-track {
  background: transparent;
}

.pricing-modal__close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
  z-index: 2;
}

.pricing-modal__close:hover {
  color: rgba(255, 255, 255, 0.96);
}

.pricing-modal__close svg {
  width: 18px;
  height: 18px;
}

.pricing-modal__hero {
  max-width: 760px;
  margin: 0 auto 18px;
  padding-top: 6px;
  text-align: center;
}

.pricing-modal__title {
  margin: 0;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.08;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.98);
}

.pricing-modal__billing {
  width: fit-content;
  margin: 0 auto 32px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: #1c1c1f;
  display: flex;
  align-items: center;
  gap: 2px;
}

.pricing-modal__billing-btn {
  min-height: 30px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  padding: 0 14px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.pricing-modal__billing-btn.is-active {
  background: #2a2a2f;
  color: #ffffff;
}

.pricing-modal__billing-note {
  font-size: 10px;
  font-weight: 700;
  color: #9ea4ff;
  white-space: nowrap;
}

.pricing-modal__grid {
  width: min(1320px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.pricing-modal__footnotes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  margin: 18px auto 14px;
}

.pricing-modal__tax-note-text {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

/* Vertical rule that keeps the tax note and the enterprise line from blending. */
.pricing-modal__footnote-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.2);
}

.pricing-modal__enterprise {
  margin: 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

.pricing-modal__enterprise-link {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0 2px;
  font: inherit;
  font-weight: 400;
  color: #5b8cff;
  cursor: pointer;
  text-decoration: none;
}

.pricing-modal__enterprise-link:hover {
  text-decoration: underline;
}

.pricing-card {
  position: relative;
  min-height: 100%;
  padding: 22px 20px 36px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #232323;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pricing-card--plus {
  border-color: rgba(132, 117, 255, 0.32);
  background: #3a376b;
}

.pricing-card__header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  z-index: 1;
}

.pricing-card__name {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.98);
}

.pricing-card__tagline {
  margin: 8px 0 0;
  min-height: 38px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

.pricing-card__badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(133, 118, 255, 0.2);
  color: #d9d0ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pricing-card__price {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.98);
}

.pricing-card__currency {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.62);
}

.pricing-card__amount {
  font-size: clamp(36px, 3.2vw, 48px);
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.pricing-card__interval {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.pricing-card__button {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 42px;
  margin-top: 16px;
  border: none;
  border-radius: 999px;
  padding: 0 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.pricing-card__button:disabled {
  cursor: default;
  opacity: 1;
}

.pricing-card__button[data-plan-action] {
  font-weight: 500;
}

.pricing-card__button--ghost {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.48);
}

.pricing-card__button--light {
  background: #f3f3f5;
  color: #141418;
}

.pricing-card__button--accent {
  background: #6758f4;
  color: #ffffff;
}

.pricing-card__features-title {
  margin: 18px 0 0;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.96);
}

.pricing-card__features {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 11px;
}

.pricing-card__features li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

.pricing-card__credits {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.4;
}

.pricing-card__mode {
  position: relative;
  display: inline-block;
  margin-right: 26px;
  white-space: nowrap;
}

.pricing-card__beta {
  position: absolute;
  top: -0.35em;
  left: calc(100% + 3px);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
}

.pricing-card__credits svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: currentColor;
  display: block;
  transform: translateY(0);
}

.pricing-card__features li::before {
  content: "";
  width: 6px;
  height: 12px;
  margin-top: 2px;
  margin-left: 2px;
  border-right: 2px solid rgba(255, 255, 255, 0.92);
  border-bottom: 2px solid rgba(255, 255, 255, 0.92);
  transform: rotate(45deg);
  transform-origin: center;
}

.topbar__upgrade-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #3d3370;
  color: #d4ccf8;
  border: none;
  border-radius: 9999px;
  padding: 7px 16px 7px 12px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
  margin-left: 10px;
}

.topbar__upgrade-btn:hover {
  background-color: #4a3f82;
}

.topbar__upgrade-btn svg {
  flex-shrink: 0;
  display: block;
  margin-top: 2px;
}

.app.is-authenticated-session:not([data-auth-plan="free"]) .topbar__upgrade-btn {
  display: none;
}

.app.is-guest-session .topbar__upgrade-btn {
  display: none;
}

.app.is-guest-session .topbar__guest-actions {
  display: inline-flex;
}

.app.is-authenticated-session .topbar__guest-actions {
  display: none;
}

@media (max-width: 1320px) {
  .pricing-modal__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    padding:
      max(10px, env(safe-area-inset-top, 0px))
      max(10px, env(safe-area-inset-right, 0px))
      10px
      max(10px, env(safe-area-inset-left, 0px));
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .topbar__center {
    display: none;
  }

  .topbar__left {
    width: 100%;
    min-width: 0;
  }

  .model-switcher {
    min-width: 0;
    max-width: calc(100% - 50px);
  }

  .modelbtn {
    min-width: 0;
    max-width: 100%;
  }

  .modelbtn__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar__right {
    gap: 10px;
  }

  .topbar__guest-signup,
  .topbar__auth-btn {
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
  }

  .temporary-chat-toggle {
    width: 36px;
    height: 36px;
  }

  .temporary-chat-toggle__frame {
    width: 22px;
    height: 22px;
  }

  .guest-legal {
    width: min(100%, 540px);
    font-size: 11.5px;
    line-height: 1.45;
  }

  .composer__guest-placeholder {
    right: 4px;
    width: auto;
    overflow: hidden;
    white-space: normal;
  }

  .app.is-guest-session .composer__shell:has(.mode-switcher[data-mode="assistant"]) .composer__inputwrap:not(.is-transcribing) .composer__input:placeholder-shown + .composer__guest-placeholder {
    display: block;
  }
}

/* The full sign-up action remains available in the mobile drawer. Hiding its
   duplicate here keeps the model control and sign-in action usable at the
   narrowest supported phone widths. */
@media (max-width: 380px) {
  .app.is-guest-session .topbar__guest-signup {
    display: none;
  }
}

@media (max-width: 720px) {
  .pricing-modal__shell {
    padding: 24px 12px 8px;
  }

  .pricing-modal__close {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
  }

  .pricing-modal__hero {
    margin-bottom: 28px;
    padding-top: 24px;
  }

  .pricing-modal__billing {
    margin-bottom: 24px;
  }

  .pricing-modal__footnotes {
    gap: 4px;
    margin: 14px auto 12px;
  }

  /* Stack the two notes on narrow screens; the vertical rule only makes sense
     when they sit side by side. */
  .pricing-modal__footnote-divider {
    display: none;
  }

  .pricing-modal__tax-note-text,
  .pricing-modal__enterprise {
    font-size: 13px;
  }

  .pricing-modal__enterprise {
    margin: 0;
  }

  .pricing-modal__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pricing-card {
    padding: 18px 16px 28px;
    border-radius: 18px;
  }

  .pricing-card__tagline {
    min-height: 0;
  }

  .pricing-card__amount {
    font-size: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .pricing-modal,
  .pricing-modal__backdrop,
  .pricing-modal__shell {
    transition: none;
  }

  .pricing-modal__shell {
    transform: none;
    opacity: 1;
  }
}





.history-action-menu__item[data-action="pin"] .history-action-menu__icon {
  transform: scale(1.2);
}

/* ----------------------------------------------------------------------------
   Billing checkout modal (in-place plan change: review -> code -> charge)
   ------------------------------------------------------------------------- */
.billing-checkout {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 18px;
}

.billing-checkout[hidden] {
  display: none;
}

.billing-checkout__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  opacity: 0;
  transition: opacity 220ms ease;
}

.billing-checkout__panel {
  position: relative;
  width: min(720px, calc(100vw - 36px));
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--modal-surface);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.5);
  padding: 26px;
  opacity: 0;
  transform: translateY(16px);
  transition:
    transform 240ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 220ms ease,
    width 280ms cubic-bezier(0.16, 1, 0.3, 1),
    padding 280ms cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Smooth fade/slide for the active step on each transition — mirrors the classic
   auth modal's view switch. Replays when a step goes from display:none to visible. */
.billing-checkout__step:not([hidden]) {
  animation: billing-checkout-step-in 220ms ease;
}

@keyframes billing-checkout-step-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.billing-checkout.is-open .billing-checkout__backdrop {
  opacity: 1;
}

.billing-checkout.is-open .billing-checkout__panel {
  opacity: 1;
  transform: translateY(0);
}

.billing-checkout.is-closing .billing-checkout__backdrop {
  opacity: 0;
}

.billing-checkout.is-closing .billing-checkout__panel {
  opacity: 0;
  transform: translateY(10px);
}

.billing-checkout__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease;
  z-index: 2;
}

.billing-checkout__close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.96);
}

.billing-checkout__step[hidden] {
  display: none;
}

.billing-checkout__step--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 28px 8px 12px;
}

/* The review step is a wide two-column layout; the code/processing/success steps
   collapse the panel back to the classic portrait email-OTP modal (a little wider
   and taller than the sign-in one so the sentences fit). */
.billing-checkout__panel[data-step="verify"],
.billing-checkout__panel[data-step="processing"],
.billing-checkout__panel[data-step="success"] {
  width: min(452px, calc(100vw - 32px));
}

.billing-checkout__panel[data-step="verify"] [data-step="verify"] {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 6px 4px;
}

.billing-checkout__panel[data-step="verify"] .billing-checkout__step-lead,
.billing-checkout__panel[data-step="verify"] .billing-checkout__charge-reminder,
.billing-checkout__panel[data-step="verify"] .billing-checkout__error {
  max-width: 380px;
}

.billing-checkout__panel[data-step="verify"] .billing-checkout__code-input {
  max-width: 320px;
}

.billing-checkout__panel[data-step="verify"] .billing-checkout__resend {
  align-self: center;
}

.billing-checkout__panel[data-step="verify"] .billing-checkout__footer {
  flex-direction: column-reverse;
  align-items: stretch;
  width: 100%;
  max-width: 320px;
  gap: 8px;
}

.billing-checkout__panel[data-step="verify"] .billing-checkout__footer .billing-checkout__button {
  width: 100%;
}

/* Review step: product summary (left) + details (right) */
.billing-checkout__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 22px;
  margin-top: 6px;
}

.billing-checkout__product {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.billing-checkout__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.billing-checkout__product-name {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.97);
}

.billing-checkout__cycle-badge {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 9999px;
  background: rgba(108, 255, 199, 0.12);
  color: rgba(220, 255, 245, 0.95);
}

.billing-checkout__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 8px;
}

.billing-checkout__price-amount {
  font-size: 30px;
  font-weight: 760;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.billing-checkout__price-period {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.billing-checkout__product-note {
  margin: 2px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.billing-checkout__tax-line {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}

.billing-checkout__tax-line[hidden] {
  display: none;
}

.billing-checkout__tax-total {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.billing-checkout__details {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.billing-checkout__details-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 680;
  color: rgba(255, 255, 255, 0.95);
}

.billing-checkout__charge-line {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
}

.billing-checkout__charge-line strong {
  color: rgba(255, 255, 255, 0.97);
  font-weight: 680;
}

.billing-checkout__bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.billing-checkout__bullet {
  position: relative;
  padding-left: 22px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.66);
}

.billing-checkout__bullet::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(108, 255, 199, 0.7);
}

/* Verify step */
.billing-checkout__step-title {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.97);
}

.billing-checkout__step-lead {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
}

.billing-checkout__step-lead strong {
  color: rgba(255, 255, 255, 0.95);
}

/* Match the classic email-OTP input: a pill, neutral focus (no green, no square). */
.billing-checkout__code-input {
  width: 100%;
  height: 52px;
  margin-top: 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.96);
  text-align: center;
  letter-spacing: 0.34em;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  outline: none;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

.billing-checkout__code-input::placeholder {
  color: rgba(255, 255, 255, 0.42);
  font-weight: 400;
}

.billing-checkout__code-input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
}

.billing-checkout__charge-reminder {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
}

.billing-checkout__charge-reminder strong {
  color: rgba(255, 255, 255, 0.85);
}

.billing-checkout__resend {
  margin-top: 12px;
  border: none;
  background: transparent;
  color: rgba(108, 255, 199, 0.9);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 0;
  align-self: flex-start;
}

.billing-checkout__resend:hover {
  color: rgba(150, 255, 220, 0.95);
}

.billing-checkout__resend:disabled {
  color: rgba(255, 255, 255, 0.4);
  cursor: not-allowed;
}

.billing-checkout__error {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 150, 150, 0.95);
}

.billing-checkout__error[hidden] {
  display: none;
}

/* Processing + success */
.billing-checkout__spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-top-color: rgba(108, 255, 199, 0.85);
  animation: billing-checkout-spin 0.8s linear infinite;
}

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

.billing-checkout__success-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(108, 255, 199, 0.14);
  color: rgba(150, 255, 220, 0.98);
}

/* Footer + buttons */
.billing-checkout__footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.billing-checkout__footer--center {
  justify-content: center;
}

.billing-checkout__button {
  min-width: 96px;
  height: 40px;
  border-radius: 9999px;
  border: none;
  font: inherit;
  font-size: 13.5px;
  font-weight: 620;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 6px 18px;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

.billing-checkout__button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.billing-checkout__button--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.billing-checkout__button--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.billing-checkout__button--accent {
  background: rgba(108, 255, 199, 0.16);
  color: rgba(220, 255, 245, 0.96);
}

.billing-checkout__button--accent:hover {
  background: rgba(108, 255, 199, 0.22);
}

@media (max-width: 620px) {
  .billing-checkout__grid {
    grid-template-columns: 1fr;
  }

  .billing-checkout__panel {
    padding: 22px;
  }

  .billing-checkout__footer {
    flex-direction: column-reverse;
  }

  .billing-checkout__button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .billing-checkout__backdrop,
  .billing-checkout__panel {
    transition: none;
  }

  .billing-checkout__step:not([hidden]) {
    animation: none;
  }

  .billing-checkout__spinner {
    animation-duration: 1.6s;
  }
}

/* Light theme overrides for the billing checkout modal */
:root[data-appearance-theme="light"] .billing-checkout__panel {
  background: linear-gradient(180deg, #ddd6ca 0%, #d1c8bb 100%);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
}

:root[data-appearance-theme="light"] .billing-checkout__product {
  background: rgba(66, 40, 18, 0.05);
  border-color: rgba(15, 23, 42, 0.08);
}

:root[data-appearance-theme="light"] .billing-checkout__product-name,
:root[data-appearance-theme="light"] .billing-checkout__price-amount,
:root[data-appearance-theme="light"] .billing-checkout__tax-total,
:root[data-appearance-theme="light"] .billing-checkout__details-title,
:root[data-appearance-theme="light"] .billing-checkout__step-title,
:root[data-appearance-theme="light"] .billing-checkout__charge-line strong,
:root[data-appearance-theme="light"] .billing-checkout__step-lead strong,
:root[data-appearance-theme="light"] .billing-checkout__close {
  color: rgba(40, 28, 16, 0.96);
}

:root[data-appearance-theme="light"] .billing-checkout__charge-line,
:root[data-appearance-theme="light"] .billing-checkout__step-lead {
  color: rgba(56, 42, 26, 0.86);
}

:root[data-appearance-theme="light"] .billing-checkout__eyebrow,
:root[data-appearance-theme="light"] .billing-checkout__product-note,
:root[data-appearance-theme="light"] .billing-checkout__price-period,
:root[data-appearance-theme="light"] .billing-checkout__bullet,
:root[data-appearance-theme="light"] .billing-checkout__charge-reminder {
  color: rgba(66, 50, 32, 0.7);
}

:root[data-appearance-theme="light"] .billing-checkout__tax-line {
  color: rgba(56, 42, 26, 0.9);
}

:root[data-appearance-theme="light"] .billing-checkout__cycle-badge,
:root[data-appearance-theme="light"] .billing-checkout__success-mark {
  background: rgba(120, 80, 40, 0.16);
  color: rgba(66, 40, 18, 0.96);
}

:root[data-appearance-theme="light"] .auth-modal__success-mark {
  background: rgba(120, 80, 40, 0.16);
  color: rgba(66, 40, 18, 0.96);
}

:root[data-appearance-theme="light"] .auth-modal__changelog {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(15, 23, 42, 0.03);
}

:root[data-appearance-theme="light"] .auth-modal__changelog-title {
  color: rgba(15, 23, 42, 0.9);
}

:root[data-appearance-theme="light"] .auth-modal__changelog-item {
  color: rgba(15, 23, 42, 0.74);
}

:root[data-appearance-theme="light"] .auth-modal__changelog-tag {
  background: rgba(120, 80, 40, 0.14);
  color: rgba(66, 40, 18, 0.92);
}

:root[data-appearance-theme="light"] .auth-modal__changelog-item strong {
  color: rgba(15, 23, 42, 0.95);
}

:root[data-appearance-theme="light"] .auth-modal__changelog-mark {
  background: rgba(120, 200, 160, 0.32);
  color: rgba(12, 44, 32, 0.96);
}

:root[data-appearance-theme="light"] .auth-modal__contact {
  color: rgba(15, 23, 42, 0.62);
}

:root[data-appearance-theme="light"] .auth-modal__contact a {
  color: rgba(37, 99, 235, 0.95);
}

:root[data-appearance-theme="light"] .billing-checkout__bullet::before {
  background: rgba(120, 80, 40, 0.6);
}

:root[data-appearance-theme="light"] .billing-checkout__code-input {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(15, 23, 42, 0.14);
  color: rgba(40, 28, 16, 0.96);
}

:root[data-appearance-theme="light"] .billing-checkout__code-input:focus {
  border-color: rgba(120, 80, 40, 0.45);
}

:root[data-appearance-theme="light"] .billing-checkout__resend {
  color: rgba(120, 80, 40, 0.95);
}

:root[data-appearance-theme="light"] .billing-checkout__spinner {
  border-color: rgba(15, 23, 42, 0.14);
  border-top-color: rgba(120, 80, 40, 0.8);
}

:root[data-appearance-theme="light"] .billing-checkout__button--ghost {
  background: rgba(66, 40, 18, 0.1);
  color: rgba(56, 38, 20, 0.92);
}

:root[data-appearance-theme="light"] .billing-checkout__button--ghost:hover {
  background: rgba(66, 40, 18, 0.16);
}

:root[data-appearance-theme="light"] .billing-checkout__button--accent {
  background: rgba(120, 80, 40, 0.22);
  color: rgba(66, 40, 18, 0.96);
}

:root[data-appearance-theme="light"] .billing-checkout__button--accent:hover {
  background: rgba(120, 80, 40, 0.32);
}
