.model-picker-menu {
  position: absolute;
  right: 0;
  left: auto;
  top: calc(100% + 8px);
  bottom: auto;
  min-width: 260px;
  max-width: min(280px, calc(100vw - 20px));
  max-height: min(300px, var(--model-menu-max-h, calc(100dvh - 188px - env(safe-area-inset-bottom, 0px))));
  overflow-y: auto;
  overflow-x: hidden;
  scroll-padding-block: 10px;
  scroll-padding-bottom: 12px;
  scrollbar-gutter: stable;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  padding: 5px 5px 8px 5px;
  z-index: 1500;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
}

.provider-picker-menu {
  min-width: 150px;
}

.model-picker-menu.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
}

.model-picker-wrap.menu-up .model-picker-menu {
  top: auto;
  bottom: calc(100% + 8px);
  transform: translateY(6px) scale(0.98);
  transform-origin: bottom right;
}

.model-picker-wrap.menu-up .model-picker-menu.show {
  transform: translateY(0) scale(1);
}

.model-picker-item {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 5px 8px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 450;
  font-size: 0.78rem;
  color: #1f1f1f;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.model-picker-item:hover,
.model-picker-item.active {
  background: rgba(0, 0, 0, 0.05);
}

.response-actions,
.response-actions * {
  -webkit-user-select: none !important;
  user-select: none !important;
}

.stream-final {
  margin: 0;
  padding: 0;
  line-height: 1.7;
}

.stream-final > *:first-child {
  margin-top: 0 !important;
}

.stream-final > *:last-child {
  margin-bottom: 0 !important;
}

.user-response-actions {
  right: -8px;
}

.user-copy-btn {
  width: 16px;
  height: 16px;
}

.user-copy-btn .material-symbols-rounded {
  font-size: 15px !important;
}

.user-message {
  align-items: flex-end;
  position: relative;
}

.user-response-actions {
  position: absolute;
  right: 2px;
  bottom: -16px;
  margin: 0;
  gap: 6px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.user-copy-btn {
  width: 16px;
  height: 16px;
}

.user-copy-btn .material-symbols-rounded {
  font-size: 15px !important;
}

.user-message.user-actions-near .user-response-actions,
.user-response-actions:hover,
.user-message:focus-within .user-response-actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.model-picker-item.disabled,
.model-picker-item:disabled {
  color: #8a8680;
  cursor: pointer;
  filter: grayscale(1);
  opacity: 0.52;
}

.model-picker-item.disabled:hover,
.model-picker-item.disabled.active,
.model-picker-item:disabled:hover,
.model-picker-item:disabled.active {
  background: transparent;
}

.model-picker-item.disabled .model-picker-badge,
.model-picker-item:disabled .model-picker-badge {
  background: #eeeeee !important;
  color: #777777 !important;
}

.model-picker-lock-copy {
  margin-left: auto;
  color: #666666;
  font-size: 0.66rem;
  font-weight: 560;
}

.inline-upgrade-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  background: #111111;
  color: #ffffff;
  font-weight: 680;
  text-decoration: none;
  user-select: none;
}

.inline-upgrade-link:hover {
  filter: brightness(1.08);
}

.usage-limit-banner-host {
  position: fixed;
  top: 18px;
  left: 50%;
  width: min(680px, calc(100vw - 32px));
  transform: translateX(-50%);
  z-index: 36000;
  pointer-events: none;
}

.usage-limit-banner {
  position: relative;
  min-height: 64px;
  padding: 12px 48px 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  animation: usageLimitBannerIn 0.24s ease both;
}

@keyframes usageLimitBannerIn {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.usage-limit-banner-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #f4f0e9;
  color: #8a6b3f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px !important;
}

.usage-limit-banner-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.25;
}

.usage-limit-banner-copy strong {
  color: #111111;
  font-size: 0.94rem;
  font-weight: 723;
}

.usage-limit-banner-copy span {
  color: #666666;
  font-size: 0.82rem;
  font-weight: 510;
}

.usage-limit-banner-action {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 723;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.usage-limit-banner-action:hover {
  filter: brightness(1.08);
}

.usage-limit-banner-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #555555;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.usage-limit-banner-close:hover {
  background: #f0f0f0;
  color: #111111;
}

.usage-limit-banner-close .material-symbols-rounded {
  font-size: 19px !important;
}

#sidebar {
  --sidebar-collapsed-rail-x: 10px;
  --sidebar-icon-slot: 40px;
  --sidebar-icon-size: 24px;
  --sidebar-item-bg: #ececec;
  --sidebar-item-hover: #f4f4f4;
  position: relative;
  z-index: 40000;
  width: 276px;
  min-width: 276px;
  flex: 0 0 276px;
  flex-basis: 276px;
  background: #fefefe;
  border-right: 1px solid #ededed;
  overflow: visible;
  transition:
    width 0.24s cubic-bezier(0.4, 0, 0.2, 1),
    min-width 0.24s cubic-bezier(0.4, 0, 0.2, 1),
    flex-basis 0.24s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.18s ease !important;
  will-change: width, min-width, flex-basis;
}

#sidebar.collapsed {
  width: var(--sidebar-mini);
  min-width: var(--sidebar-mini);
  flex-basis: var(--sidebar-mini);
}

.sidebar-header {
  height: 62px;
  padding: 12px 18px 6px 11px;
  align-items: center;
}

.sidebar-brand-btn {
  width: auto !important;
  min-width: 58px;
  justify-content: flex-start;
  border-radius: 10px;
  padding: 0 6px;
}

.sidebar-full-brand {
  display: inline-flex !important;
  color: #000000;
  font-size: 1.34rem;
  font-weight: 500;
  line-height: 1;
  position: relative;
  left: 0.5px;
}

.sidebar-mini-brand {
  display: none !important;
  align-items: center;
  justify-content: center;
  width: var(--sidebar-icon-slot);
  height: var(--sidebar-icon-slot);
  line-height: 1;
  overflow: visible;
}

.sidebar-mini-favicon {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex: 0 0 auto;
  border-radius: 8px;
  transform: translate(2px, 1px);
}

.menu-toggle {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #5f6368;
}

.menu-toggle .material-symbols-rounded,
.sidebar-brand-btn .sidebar-toggle-icon {
  font-variation-settings:
    "FILL" 0,
    "wght" 320,
    "GRAD" 0,
    "opsz" 28 !important;
}

#sidebar-top-nav {
  padding: 6px 10px 14px 9px !important;
  gap: 2px;
}

#sidebar-top-nav .nav-link,
.sidebar-bottom .nav-link {
  position: relative;
  height: 36px;
  border-radius: 10px;
  padding: 0 6px 0 0;
  color: #222222;
  font-size: 0.96rem;
  font-weight: 425;
  text-decoration: none;
  display: grid !important;
  grid-template-columns: var(--sidebar-icon-slot) minmax(0, 1fr) auto;
  align-items: center;
  justify-content: stretch;
  column-gap: 8px;
}

#sidebar .nav-link:hover,
#sidebar .nav-link.active,
#searchToggleBtn:hover::before,
#searchToggleBtn.active::before,
#newChatBtn:hover::before,
#newChatBtn.active::before {
  background: var(--sidebar-item-hover) !important;
}

#sidebar #sidebarMoreBtn,
#sidebar #sidebarMoreBtn:focus,
#sidebar #sidebarMoreBtn:focus-visible {
  appearance: none;
  -webkit-appearance: none;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: #fefefe !important;
}

#sidebar #sidebarMoreBtn:hover,
#sidebar #sidebarMoreBtn.active {
  appearance: none;
  -webkit-appearance: none;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: var(--sidebar-item-hover) !important;
}

#newChatBtn.active,
#newChatBtn:hover,
#searchToggleBtn.active,
#searchToggleBtn:hover {
  background: var(--sidebar-item-bg) !important;
}

#newChatBtn::before,
#searchToggleBtn::before {
  display: none;
}

#newChatBtn,
#searchToggleBtn {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: 36px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 6px 0 0 !important;
}

#sidebar-top-nav .nav-link .material-symbols-rounded,
#newChatBtn .material-symbols-rounded,
#searchToggleBtn .material-symbols-rounded {
  transform: none !important;
  transition: none !important;
}

#sidebar-top-nav .sidebar-nav-svg {
  width: var(--sidebar-icon-size);
  height: var(--sidebar-icon-size);
  display: block;
  justify-self: center;
  align-self: center;
  overflow: visible;
  fill: none;
  stroke: #111111;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transform: none !important;
  transition: none !important;
}

#sidebar-top-nav .nav-text {
  margin-left: 0 !important;
}

#sidebar-top-nav .nav-link .material-symbols-rounded,
.sidebar-bottom .nav-link .material-symbols-rounded,
#newChatBtn .material-symbols-rounded,
#searchToggleBtn .material-symbols-rounded {
  width: var(--sidebar-icon-size);
  min-width: var(--sidebar-icon-size);
  max-width: var(--sidebar-icon-size);
  height: var(--sidebar-icon-size);
  flex: 0 0 var(--sidebar-icon-size);
  justify-self: center;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  left: 0 !important;
  top: 0 !important;
  transform: none !important;
  translate: none !important;
  position: static !important;
  color: #111111;
  overflow: visible !important;
  font-size: var(--sidebar-icon-size) !important;
  line-height: 1;
  font-variation-settings:
    "FILL" 0,
    "wght" 145,
    "GRAD" 0,
    "opsz" 24;
}

#newChatBtn {
  padding-left: 0 !important;
}

#newChatBtn .material-symbols-rounded {
  font-size: var(--sidebar-icon-size) !important;
}

#sidebar .nav-text {
  margin-left: 0;
  font-size: 0.96rem;
}

.addons-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 0;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.logo-menu-wrap,
#topLogoMenuBtn,
.header-bar > .logo-text {
  display: none !important;
}

.top-utility-btn,
.top-utility-icon-btn {
  height: 38px;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  cursor: pointer;
  color: #242424;
}

.top-utility-btn {
  gap: 5px;
  padding: 0 9px 0 12px;
  font-weight: 553;
  font-size: 0.9rem;
}

.top-utility-icon-btn {
  width: 42px;
  margin-left: 0;
}

.top-utility-btn:hover,
.top-utility-btn:focus,
.top-utility-btn:focus-visible,
.top-utility-btn.open,
.top-utility-icon-btn:hover,
.top-utility-icon-btn:focus,
.top-utility-icon-btn:focus-visible {
  background: #f3f3f3;
  outline: none;
  box-shadow: none;
}

.addons-arrow {
  font-size: 20px !important;
  color: #5f6368;
  transition: transform 0.18s ease;
}

.addons-btn.open .addons-arrow {
  transform: rotate(90deg);
}

.top-logo-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 164px;
  padding: 6px;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
  z-index: 1600;
}

.addons-menu {
  right: 0;
  left: auto;
}

.top-logo-menu a,
.top-logo-menu-button {
  min-height: 38px;
  width: 100%;
  padding: 0 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #1f1f1f;
  text-decoration: none;
  font-weight: 553;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}

.top-logo-menu a:hover,
.top-logo-menu-button:hover,
.top-logo-menu-button.active {
  background: #f4f4f4;
}

.top-logo-menu .material-symbols-rounded {
  font-size: 20px;
}

.temporary-toggle-btn {
  margin-left: 0;
  border-radius: 999px;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.temporary-toggle-btn:hover {
  background: #f3f3f3;
}

.temporary-toggle-btn.active {
  background: #f3f3f3;
  color: #171717;
}

.temporary-toggle-btn .material-symbols-rounded {
  font-size: 21px;
}

.incognito-toggle-btn {
  order: 3;
  width: 38px;
  position: relative;
  top: -2px;
}

.incognito-glyph {
  position: relative;
  width: 31px;
  height: 31px;
  border: none;
  border-radius: 999px;
  background: transparent !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #181818;
  box-shadow: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.incognito-toggle-btn:hover .incognito-glyph,
.temporary-toggle-btn.active .incognito-glyph {
  border-color: transparent;
  box-shadow: none;
  transform: translateY(-1px);
}

.incognito-hat {
  position: absolute;
  left: 9px;
  top: 7px;
  width: 13px;
  height: 5px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 5px 5px 1px 1px;
}

.incognito-hat::after {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: -3.7px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.incognito-glasses {
  position: absolute;
  left: 7px;
  top: 18px;
  width: 17px;
  height: 7px;
}

.incognito-glasses::before,
.incognito-glasses::after {
  content: "";
  position: absolute;
  top: 0;
  width: 4.4px;
  height: 4.4px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.incognito-glasses::before {
  left: 0;
}

.incognito-glasses::after {
  right: 0;
}

.incognito-glasses {
  background: linear-gradient(currentColor, currentColor) center 3.8px / 3.2px 2px no-repeat;
}

.temporary-toggle-btn[hidden] {
  display: none !important;
}

.chat-options-toggle-btn[hidden] {
  display: none !important;
}

.chat-options-toggle-btn .material-symbols-rounded {
  font-size: 22px !important;
}

body.temporary-chat-mode #chatOptionsBtn {
  display: none !important;
}

body.temporary-chat-mode .input-region .composer,
body.temporary-chat-mode.composer-centered .input-region .composer {
  background: #2b2b2b !important;
  background-color: #2b2b2b !important;
  border-color: #303030 !important;
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

body.temporary-chat-mode .input-region .composer:focus-within,
body.temporary-chat-mode.composer-centered .input-region .composer:focus-within {
  background: #2b2b2b !important;
  background-color: #2b2b2b !important;
  border-color: #3a3a3a !important;
}

#auth-section {
  margin-left: 0;
}

.sidebar-main-content {
  overflow: hidden;
  min-height: 0;
}

.sidebar-history-scroll {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-history-profile-mist {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 15px;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(180deg, rgba(254, 254, 254, 0) 0%, rgba(17, 17, 17, 0.045) 100%);
  opacity: 1;
  transition: opacity 0.14s ease;
}

.sidebar-history-scroll.sidebar-history-empty .sidebar-history-profile-mist,
.sidebar-history-scroll.sidebar-history-at-bottom .sidebar-history-profile-mist,
#sidebar.collapsed .sidebar-history-profile-mist {
  opacity: 0;
  visibility: hidden;
}

.viewport {
  position: relative;
}

.chat-memory-drop-backdrop {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fefefe;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.14s ease,
    visibility 0.14s ease;
}

.chat-memory-drop-backdrop.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.chat-memory-drop-label {
  margin: 0;
  padding: 0 24px;
  max-width: 92%;
  text-align: center;
  color: #2a2a2a;
  font-size: 1.08rem;
  font-weight: 560;
  letter-spacing: 0.01em;
}

.history-label {
  width: calc(100% - 22px);
  height: 30px;
  flex: 0 0 30px;
  margin: 2px 10px 0 9px;
  padding: 0 2px 0 4px;
  color: #171717;
  cursor: default;
  font-size: 0.98rem;
  font-weight: 578;
  letter-spacing: 0;
  text-transform: none;
  justify-content: space-between;
  gap: 10px;
  background: transparent !important;
}

.history-label:hover {
  color: #171717;
  background: transparent !important;
}

.history-label > span:first-child {
  margin-left: 5.75px;
}

.history-label .material-symbols-rounded {
  display: inline-flex;
}

.history-toggle-arrow {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 8px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.history-toggle-arrow:hover {
  background: #eeeeee;
}

.history-toggle-icon {
  color: #5f6368;
  font-size: 19px !important;
  transition: transform 0.2s ease;
}

.history-toggle-arrow[aria-expanded="false"] .history-toggle-icon {
  transform: rotate(180deg);
}

#sidebar-history {
  padding: 0 5px 14px 11px !important;
  gap: 2px;
  scrollbar-color: #c8c8c8 transparent;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
  will-change: opacity, transform;
}

#sidebar-main-content.history-collapsed .sidebar-history-scroll {
  display: flex !important;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  overflow: hidden !important;
}

#sidebar-history .history-chat-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100%;
  height: 38px;
  border-radius: 10px !important;
  padding: 0 3px 0 9px !important;
  color: #242424;
  gap: 0;
}

#sidebar-history .history-chat-btn:hover,
#sidebar-history .history-chat-btn.active {
  background: #f3f3f3 !important;
}

#sidebar-history .history-chat-btn .nav-text {
  margin-left: 0 !important;
  font-size: 0.94rem;
  font-weight: 362;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 3px;
}

#sidebar-history .history-chat-btn .chat-pin-indicator {
  width: 16px;
  flex: 0 0 16px;
  margin-right: 4px;
  font-size: 15px;
  color: #5f6368;
}

#sidebar-history .history-chat-btn .material-symbols-rounded {
  width: 24px;
  min-width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin: 0;
  transform: translateX(4px);
  transition: none;
  font-size: 24px;
}

#sidebar-history .history-chat-btn .chat-more-btn {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  margin-left: 0;
  margin-right: 0;
}

#sidebar-history .history-chat-btn .chat-pin-indicator {
  width: 16px;
  min-width: 16px;
  max-width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-right: 4px;
  transform: none !important;
  font-size: 15px !important;
}

#sidebar-history .history-chat-btn .chat-more-btn .material-symbols-rounded {
  width: auto;
  min-width: 0;
  max-width: none;
  height: auto;
  flex: 0 0 auto;
  transform: none !important;
  font-size: 17px !important;
}

#sidebar-history .history-chat-btn--placeholder {
  cursor: progress;
}

.sidebar-bottom {
  padding: 0;
  border-top: 1px solid #eeeeee !important;
  background: #fefefe;
  min-height: 64px;
  flex: 0 0 64px;
  transition: none !important;
}

.sidebar-bottom.sidebar-bottom-guest {
  min-height: 276px;
  flex: 0 0 276px;
}

.sidebar-auth-slot {
  min-height: 64px;
  transition: none !important;
}

.sidebar-bottom-profile {
  min-height: 64px;
  padding: 6px 10px 8px 8px;
  border-top: none;
  display: block;
  transition: none !important;
}

.sidebar-user-menu-wrap {
  position: relative;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  transition: none !important;
  width: 100% !important;
  z-index: 26000;
}

.sidebar-profile-btn {
  width: auto;
  flex: 1 1 auto;
  height: 46px;
  border-radius: 12px;
  background: transparent;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 8px;
  color: #171717;
  transition: none !important;
}

.sidebar-profile-btn:hover {
  background: transparent;
}

.sidebar-profile-shell {
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  overflow: hidden;
  transition: none !important;
  width: 100%;
}

.sidebar-profile-shell:hover {
  background: #f3f3f3;
}

.sidebar-profile-btn .profile-avatar {
  width: 34px;
  height: 34px;
  background: #b79353;
  color: #ffffff;
  font-size: 0.82rem;
  padding: 0;
  flex: 0 0 auto;
  margin: 0;
  transform: none !important;
  transition: none !important;
}

.sidebar-profile-btn .sidebar-avatar-frame {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  overflow: hidden;
  flex: 0 0 auto;
}

.sidebar-profile-btn .profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-account-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
  line-height: 1.15;
}

.sidebar-account-name {
  overflow: hidden;
  text-overflow: ellipsis;
  color: #111111;
  font-size: 0.95rem;
  font-weight: 523;
}

.sidebar-account-plan {
  color: #94764a;
  font-size: 0.78rem;
  font-weight: 402;
  margin-top: 2px;
}

.sidebar-auth-profile-loading .sidebar-auth-skeleton-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 10px;
  pointer-events: none;
}

.sidebar-auth-profile-loading .workspace-boot-loading-inline {
  color: var(--text-low);
  font-size: 0.83rem;
  font-weight: 491;
}

.sidebar-auth-skeleton-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e0e0e0;
  flex: 0 0 32px;
}

.sidebar-auth-skeleton-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sidebar-auth-skeleton-line--track {
  display: block;
  position: relative;
  height: 6px;
  width: 100%;
  border-radius: 3px;
  background: #e4e4e4;
  overflow: hidden;
}

.sidebar-auth-skeleton-sweep {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  animation: sidebar-auth-skeleton-sweep 1.15s ease-in-out infinite;
}

.sidebar-user-menu-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  width: min(202px, calc(100vw - 24px));
  min-width: min(202px, calc(100vw - 24px));
  padding: 6px 9px;
  border: 1px solid #dedede;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  overflow: visible;
  isolation: isolate;
  z-index: 52000;
}

.sidebar-user-menu-item {
  min-height: 32px;
  padding: 5px 0;
  gap: 8px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 420;
}

.sidebar-user-menu-item:hover {
  background: transparent;
}

.sidebar-user-menu-divider {
  height: 1px;
  margin: 5px 0;
  background: #e5e5e5;
}

.sidebar-help-menu-wrap {
  position: relative;
  isolation: isolate;
}

.sidebar-menu-chevron {
  margin-left: auto;
}

.sidebar-help-submenu {
  position: fixed !important;
  left: auto;
  top: auto;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: 300px;
  max-height: calc(100vh - 20px);
  padding: 14px 18px;
  border: 1px solid #dcdcdc;
  border-radius: 24px;
  background: #fefefe;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.13),
    0 2px 8px rgba(0, 0, 0, 0.06);
  display: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 2147483647;
}

.sidebar-help-submenu .sidebar-user-menu-item {
  height: 46px;
  padding: 0 8px;
  border-radius: 12px;
  font-size: 0.98rem;
  font-weight: 430;
}

.sidebar-help-submenu .sidebar-user-menu-item .material-symbols-rounded {
  width: 26px;
  min-width: 26px;
  font-size: 24px;
  color: #111111;
  font-variation-settings:
    "FILL" 0,
    "wght" 220,
    "GRAD" 0,
    "opsz" 24;
}

.sidebar-help-submenu .sidebar-user-menu-divider {
  margin: 9px 0;
}

.sidebar-help-menu-wrap:hover .sidebar-help-submenu,
.sidebar-help-menu-wrap:focus-within .sidebar-help-submenu {
  display: block;
}

.profile-edit-overlay {
  position: fixed;
  inset: 0;
  z-index: 90000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(2px);
}

.profile-edit-modal {
  width: min(672px, calc(100vw - 40px));
  min-height: 640px;
  border: 1px solid #d7d7d7;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.18);
  padding: 24px;
  display: flex;
  flex-direction: column;
  color: #1f1f1f;
}

.profile-edit-modal h2 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 430;
  line-height: 1.1;
}

.profile-edit-avatar-wrap {
  position: relative;
  align-self: center;
  margin: 64px 0 56px;
}

.profile-edit-avatar {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.profile-edit-avatar-initials {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 4.35rem;
  font-weight: 330;
  letter-spacing: 0;
}

.profile-edit-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.profile-edit-camera-btn {
  position: absolute;
  right: 9px;
  bottom: 13px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: #ffffff;
  color: #3f3f3f;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.profile-edit-camera-btn .material-symbols-rounded {
  font-size: 23px;
}

.profile-edit-field {
  min-height: 86px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 14px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-edit-field + .profile-edit-field {
  margin-top: 12px;
}

.profile-edit-field span {
  font-size: 1rem;
  color: #222222;
}

.profile-edit-field input {
  border: none;
  outline: none;
  padding: 0;
  background: transparent;
  color: #1f1f1f;
  font: inherit;
  font-size: 1.15rem;
}

.profile-edit-note {
  margin: 20px 0 0;
  text-align: center;
  color: #8b8b8b;
  font-size: 1.02rem;
}

.profile-edit-actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  padding-top: 26px;
}

.profile-edit-cancel,
.profile-edit-save {
  min-width: 82px;
  height: 52px;
  border-radius: 999px;
  font-size: 1.08rem;
  font-weight: 560;
  cursor: pointer;
  padding: 0 20px;
}

.profile-edit-cancel {
  border: 1px solid #dddddd;
  background: #ffffff;
  color: #1f1f1f;
}

.profile-edit-save {
  border: none;
  background: #111111;
  color: #ffffff;
}

@media screen and (max-width: 768px) {
  .profile-edit-overlay {
    padding: 12px;
    align-items: flex-start;
    overflow-y: auto;
  }

  .profile-edit-modal {
    width: min(100%, 672px);
    min-height: auto;
    margin: 12px 0;
    padding: 20px;
  }

  .profile-edit-avatar-wrap {
    margin: 38px 0 34px;
  }

  .profile-edit-avatar {
    width: 156px;
    height: 156px;
  }
}

@keyframes sidebar-auth-skeleton-sweep {
  0% {
    transform: translateX(-130%);
  }
  100% {
    transform: translateX(320%);
  }
}

#sidebar.collapsed .sidebar-auth-skeleton-copy {
  display: none;
}

#sidebar.collapsed .workspace-boot-loading-label,
#sidebar.collapsed .sidebar-loading-label {
  display: none;
}

#sidebar.collapsed .workspace-loading-ray {
  width: 18px;
  flex-basis: 18px;
}

#sidebar.collapsed .sidebar-auth-skeleton-shell {
  justify-content: center;
  padding: 0;
}

.sidebar-billing-btn {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #5f6368;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar-more-panel {
  position: fixed;
  left: 286px;
  top: 174px;
  width: 150px;
  margin: 0;
  padding: 4px;
  border: none;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
  z-index: 1800;
}

#sidebar.collapsed .sidebar-more-panel {
  left: 73px;
}

.sidebar-more-flyout-btn {
  width: 100%;
  min-height: 36px;
  border: none;
  border-radius: 10px;
  background: #ffffff;
  color: #222222;
  font-weight: 383;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 13px;
  padding: 0 12px;
  cursor: pointer;
}

.sidebar-more-flyout-btn:hover {
  background: #f4f4f4;
}

.sidebar-more-flyout-btn .material-symbols-rounded {
  font-size: 20px !important;
}

.library-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 21000;
  background: rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.library-modal-overlay[hidden] {
  display: none !important;
}

.library-modal {
  width: min(760px, 94vw);
  max-height: min(680px, 86vh);
  border: 1px solid #e6e6e6;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 26px 74px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.library-modal-header {
  height: 58px;
  flex: 0 0 58px;
  padding: 0 12px 0 18px;
  border-bottom: 1px solid #eeeeee;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.library-modal-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 680;
  color: #171717;
}

.library-modal-close {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.library-modal-close:hover {
  background: #eeeeee;
}

.library-modal-content {
  padding: 14px;
  min-height: 180px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.library-modal-content.library-list-mode {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.library-modal-content.library-memory-mode {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.1fr);
  gap: 12px;
  overflow: hidden;
}

.library-memory-list {
  min-width: 0;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.library-memory-preview {
  min-width: 0;
  min-height: 220px;
  border-left: 1px solid #eeeeee;
  padding: 6px 4px 6px 14px;
  overflow-y: auto;
  color: #202124;
}

.library-memory-preview-empty {
  height: 100%;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777777;
  font-size: 0.92rem;
  text-align: center;
}

.library-memory-preview-title {
  font-size: 0.98rem;
  font-weight: 523;
  margin-bottom: 6px;
}

.library-memory-preview-count {
  color: #777777;
  font-size: 0.78rem;
  margin-bottom: 12px;
}

.library-memory-preview-message {
  border-radius: 10px;
  background: #f6f6f6;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 0.84rem;
  line-height: 1.35;
}

.library-memory-preview-message strong {
  display: block;
  margin-bottom: 3px;
  color: #555555;
  font-size: 0.72rem;
  font-weight: 523;
  text-transform: capitalize;
}

.library-modal-content.folder-workspace-mode {
  display: block;
  padding: 0;
  overflow: hidden;
}

.folder-workspace {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 520px;
  max-height: calc(86vh - 58px);
}

.folder-sidebar {
  border-right: 1px solid #eeeeee;
  background: #fafafa;
  padding: 12px;
  overflow-y: auto;
}

.folder-create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 12px;
}

.folder-create-row .modal-input {
  margin: 0;
}

.folder-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.folder-sidebar-item {
  width: 100%;
  min-height: 46px;
  border: none;
  border-radius: 10px;
  background: transparent;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}

.folder-sidebar-item:hover,
.folder-sidebar-item.active {
  background: #eeeeee;
}

.folder-sidebar-item .material-symbols-rounded {
  font-size: 20px;
  color: #5f6368;
}

.folder-sidebar-item span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.folder-sidebar-item strong,
.folder-sidebar-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-sidebar-item small,
.folder-main-panel p,
.folder-file-row small,
.folder-message {
  color: #70757a;
  font-size: 0.82rem;
}

.folder-main-panel {
  padding: 16px;
  overflow-y: auto;
  min-width: 0;
}

.folder-main-empty,
.folder-login-card {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  color: #444746;
  padding: 24px;
}

.folder-main-empty .material-symbols-rounded,
.folder-login-card .material-symbols-rounded {
  font-size: 42px;
  color: #1f1f1f;
}

.folder-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.folder-panel-head h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.folder-panel-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.danger-soft {
  color: #8b1d1d;
}

.folder-ai-card {
  border: 1px solid #eeeeee;
  border-radius: 14px;
  background: #ffffff;
  padding: 12px;
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.folder-ai-card label {
  font-weight: 680;
  color: #1f1f1f;
}

.folder-credit-card {
  border: 1px solid #eeeeee;
  border-radius: 13px;
  background: linear-gradient(135deg, #fffaf2, #ffffff);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.folder-credit-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.folder-credit-card strong {
  color: #1f1f1f;
  font-size: 0.9rem;
}

.folder-credit-card span,
.folder-credit-note {
  color: #755f3d;
  font-size: 0.8rem;
  font-weight: 553;
}

.folder-credit-meter {
  height: 7px;
  border-radius: 999px;
  background: #eee6d9;
  overflow: hidden;
}

.folder-credit-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #8a6b3f;
}

.folder-model-row {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: 10px;
  align-items: center;
}

.folder-model-select {
  width: 100%;
  height: 38px;
  border: 1px solid #dedede;
  border-radius: 10px;
  background: #ffffff;
  color: #1f1f1f;
  padding: 0 10px;
  font: inherit;
  font-weight: 595;
  outline: none;
}

.folder-model-select:focus {
  border-color: #bba06d;
  box-shadow: 0 0 0 3px rgba(138, 107, 63, 0.12);
}

.folder-credit-note {
  margin: -2px 0 0;
  line-height: 1.35;
}

.folder-ai-card .modal-btn-primary:disabled {
  opacity: 0.55;
  cursor: pointer;
}

.folder-ai-input,
.folder-file-content-input {
  width: 100%;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 10px 12px;
  resize: vertical;
  font: inherit;
  outline: none;
}

.folder-file-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1.2fr);
  gap: 12px;
  margin-top: 12px;
}

.folder-file-list {
  border: 1px solid #eeeeee;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.folder-file-row {
  width: 100%;
  min-height: 48px;
  border: none;
  border-bottom: 1px solid #f1f1f1;
  background: #ffffff;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.folder-file-row:last-child {
  border-bottom: none;
}

.folder-file-row:hover {
  background: #f8f8f8;
}

.folder-file-row span:nth-child(2) {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.folder-file-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-file-row em {
  color: #5f6368;
  font-style: normal;
  font-weight: 595;
  font-size: 0.75rem;
}

.folder-file-editor {
  display: grid;
  gap: 8px;
  align-content: start;
}

.folder-file-editor .modal-input {
  margin-bottom: 0;
}

.folder-empty-state {
  color: #70757a;
  padding: 14px;
  font-size: 0.9rem;
}

@media screen and (max-width: 768px) {
  .usage-limit-banner-host {
    top: 12px;
    width: calc(100vw - 20px);
  }

  .usage-limit-banner {
    grid-template-columns: 30px minmax(0, 1fr);
    padding: 12px 42px 12px 12px;
  }

  .usage-limit-banner-action {
    grid-column: 2;
    justify-self: start;
    min-height: 34px;
    margin-top: 4px;
  }

  .folder-workspace,
  .folder-file-layout,
  .folder-model-row {
    grid-template-columns: 1fr;
  }

  .folder-sidebar {
    border-right: none;
    border-bottom: 1px solid #eeeeee;
    max-height: 210px;
  }

  .folder-panel-head {
    flex-direction: column;
  }
}

.library-modal-content .history-chat-btn {
  height: 42px !important;
  padding: 0 10px !important;
  border-radius: 10px !important;
}

.library-image-card {
  min-width: 0;
  border: 1px solid #eeeeee;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.library-image-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  background: #eeeeee;
}

.library-image-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f2f2f2;
  color: #777777;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.library-image-placeholder .material-symbols-rounded {
  font-size: 28px;
}

.library-image-placeholder small {
  font-size: 0.78rem;
  font-weight: 595;
}

.library-memory-chat-btn {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #202124;
  padding: 7px 10px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.library-memory-chat-btn:hover {
  background: #f3f3f3;
}

.library-memory-chat-btn.attached {
  background: #f7f2ea;
  color: #111111;
}

.library-memory-chat-btn.attached:hover {
  background: #efe5d4;
}

.library-memory-chat-btn span {
  font-weight: 523;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-memory-chat-btn small {
  color: #777777;
  font-size: 0.78rem;
}

@media screen and (max-width: 768px) {
  .library-modal-content.library-memory-mode {
    grid-template-columns: 1fr;
  }

  .library-memory-preview {
    border-left: none;
    border-top: 1px solid #eeeeee;
    padding: 12px 0 0;
    min-height: 140px;
  }
}

.library-image-card span {
  display: block;
  padding: 8px;
  color: #242424;
  font-size: 0.86rem;
  font-weight: 553;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-empty {
  grid-column: 1 / -1;
  padding: 20px;
  text-align: center;
  color: #70757a;
  font-size: 0.95rem;
}

.library-empty.error {
  color: #b00020;
}

.sidebar-billing-btn:hover {
  background: #e9e9e9;
  color: #111111;
}

.sidebar-login-box {
  margin: 8px 12px 12px;
  border: none;
  border-radius: 14px;
  background: #f4f4f4;
  padding: 15px 16px 16px;
  gap: 10px;
}

.sidebar-auth-slot.guest-auth-slot {
  min-height: 0;
  flex: 0 0 auto;
}

.sidebar-auth-slot.guest-auth-slot .sidebar-login-box {
  aspect-ratio: 1 / 1;
  min-height: 0;
  justify-content: flex-start;
}

.sidebar-auth-slot.guest-auth-slot .sidebar-login-copy {
  font-size: 0.82rem;
  line-height: 1.28;
  gap: 8px;
}

.sidebar-auth-slot.guest-auth-slot .sidebar-login-copy .emphasis {
  font-size: 1rem;
}

.sidebar-login-benefits {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
  color: #64686d;
  font-size: 0.76rem;
  line-height: 1.18;
}

.sidebar-login-benefits span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sidebar-login-benefits span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #111111;
  opacity: 0.55;
  flex: 0 0 auto;
}

.sidebar-auth-slot.guest-auth-slot .sidebar-login-btn {
  margin-top: auto;
  min-height: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 1rem;
}

.sidebar-mobile-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(1px);
  z-index: 998;
}

body.sidebar-mobile-open {
  overflow: hidden;
}

#sidebar.collapsed .sidebar-full-brand,
#sidebar.collapsed .menu-toggle,
#sidebar.collapsed .history-label,
#sidebar.collapsed #sidebar-history,
#sidebar.collapsed .sidebar-account-copy,
#sidebar.collapsed .sidebar-billing-btn {
  display: none !important;
}

#sidebar.sidebar-width-animating {
  overflow: hidden;
  transition:
    width 290ms cubic-bezier(0.22, 0.8, 0.28, 1),
    min-width 290ms cubic-bezier(0.22, 0.8, 0.28, 1),
    flex-basis 290ms cubic-bezier(0.22, 0.8, 0.28, 1);
}

#sidebar.sidebar-closing {
  width: var(--sidebar-mini);
  min-width: var(--sidebar-mini);
  flex-basis: var(--sidebar-mini);
}

#sidebar.sidebar-closing .sidebar-full-brand,
#sidebar.sidebar-closing .history-label,
#sidebar.sidebar-closing #sidebar-history,
#sidebar.sidebar-closing .sidebar-account-copy,
#sidebar.sidebar-closing .sidebar-billing-btn,
#sidebar.sidebar-closing .nav-text {
  opacity: 0;
  pointer-events: none;
}

#sidebar.sidebar-closing .sidebar-full-brand {
  transition: opacity 70ms ease 190ms;
}

#sidebar.sidebar-closing .menu-toggle {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 60ms ease 190ms,
    visibility 0s linear 250ms;
}

#sidebar.sidebar-closing .sidebar-mini-brand {
  display: inline-flex !important;
  opacity: 0;
  animation: sidebarMiniLogoQuickFadeIn 90ms ease 215ms forwards;
}

#sidebar.sidebar-closing .sidebar-brand-btn .sidebar-toggle-icon {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@keyframes sidebarMiniLogoQuickFadeIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

#sidebar.collapsed .sidebar-mini-brand {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  transform: none;
}

#sidebar.collapsed:hover .sidebar-mini-brand {
  display: none !important;
}

#sidebar.collapsed:hover .sidebar-brand-btn .sidebar-toggle-icon {
  display: inline-flex !important;
}

#sidebar.collapsed .sidebar-brand-btn .sidebar-toggle-icon {
  transform: none !important;
}

#sidebar.collapsed .sidebar-header {
  width: var(--sidebar-mini) !important;
  min-width: var(--sidebar-mini) !important;
  box-sizing: border-box;
  justify-content: flex-start;
  padding: 16px 0 8px var(--sidebar-collapsed-rail-x);
}

#sidebar.collapsed .sidebar-brand-btn {
  width: var(--sidebar-icon-slot) !important;
  justify-content: center;
  min-width: var(--sidebar-icon-slot);
  margin: 0;
  padding: 0;
}

#sidebar.collapsed #sidebar-top-nav {
  width: var(--sidebar-mini) !important;
  min-width: var(--sidebar-mini) !important;
  box-sizing: border-box;
  padding: 8px 0 8px var(--sidebar-collapsed-rail-x) !important;
  align-items: flex-start;
}

#sidebar.collapsed .nav-link {
  justify-content: center;
  padding: 0 !important;
  grid-template-columns: var(--sidebar-icon-slot);
  column-gap: 0;
}

#sidebar.collapsed #sidebar-top-nav .nav-link .material-symbols-rounded {
  transform: none !important;
}

#sidebar.collapsed #sidebar-top-nav .nav-link {
  width: var(--sidebar-icon-slot) !important;
  min-width: var(--sidebar-icon-slot) !important;
  max-width: var(--sidebar-icon-slot) !important;
  margin: 0 !important;
}

#sidebar.collapsed #newChatBtn,
#sidebar.collapsed #searchToggleBtn {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: var(--sidebar-icon-slot) !important;
  margin: 0 !important;
  padding: 0 !important;
}

#sidebar.collapsed .sidebar-bottom {
  width: var(--sidebar-mini) !important;
  min-width: var(--sidebar-mini) !important;
  align-items: center;
  min-height: 64px;
  flex-basis: 64px;
  position: relative;
  padding: 0 !important;
}

#sidebar.collapsed .sidebar-bottom.sidebar-bottom-guest {
  min-height: 64px;
  flex-basis: 64px;
}

#sidebar.collapsed .sidebar-auth-slot.member-auth-slot {
  position: relative;
  width: var(--sidebar-mini);
  height: 64px;
  min-height: 64px;
  flex: 0 0 64px;
}

#sidebar.collapsed .sidebar-auth-slot.guest-auth-slot {
  min-height: 64px;
  flex-basis: 64px;
}

#sidebar.collapsed .sidebar-auth-slot.guest-auth-slot .sidebar-login-box {
  width: var(--sidebar-icon-slot);
  min-height: var(--sidebar-icon-slot);
  height: var(--sidebar-icon-slot);
  margin: 12px auto;
  padding: 0;
  background: transparent;
  justify-content: center;
}

#sidebar.collapsed .sidebar-auth-slot.guest-auth-slot .sidebar-login-copy {
  display: none !important;
}

#sidebar.collapsed .sidebar-auth-slot.guest-auth-slot .sidebar-login-btn {
  width: var(--sidebar-icon-slot);
  height: var(--sidebar-icon-slot);
  border-radius: 12px;
  font-size: 0;
}

#sidebar.collapsed .sidebar-auth-slot.guest-auth-slot .sidebar-login-btn::before {
  content: "login";
  font-family: "Material Symbols Rounded";
  font-size: var(--sidebar-icon-size);
  line-height: 1;
}

#sidebar.collapsed .sidebar-bottom-profile {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--sidebar-mini);
  height: 64px;
  min-height: 64px;
  padding: 0;
}

#sidebar.collapsed .sidebar-auth-slot,
#sidebar.collapsed .sidebar-profile-shell {
  width: var(--sidebar-mini);
}

#sidebar.collapsed .sidebar-user-menu-wrap {
  position: absolute !important;
  left: var(--sidebar-collapsed-rail-x) !important;
  top: calc(50% - 20px) !important;
  width: var(--sidebar-icon-slot) !important;
  height: var(--sidebar-icon-slot) !important;
  transform: none !important;
}

#sidebar.collapsed .sidebar-profile-shell {
  position: relative;
  justify-content: center;
  overflow: visible;
  width: var(--sidebar-icon-slot) !important;
  height: var(--sidebar-icon-slot);
}

#sidebar.collapsed .sidebar-profile-btn {
  position: absolute;
  inset: 0;
  width: var(--sidebar-icon-slot) !important;
  min-width: var(--sidebar-icon-slot) !important;
  height: var(--sidebar-icon-slot);
  flex: 0 0 var(--sidebar-icon-slot);
  justify-content: center;
  padding: 0;
  margin: 0 !important;
  transform: none !important;
}

#sidebar.collapsed .sidebar-profile-btn .profile-avatar {
  width: 34px;
  height: 34px;
  margin: auto !important;
  transform: none !important;
}

#sidebar.collapsed .sidebar-user-menu-panel {
  position: fixed !important;
  left: calc(var(--sidebar-mini) + 10px) !important;
  right: auto !important;
  top: auto !important;
  bottom: 18px !important;
  width: min(202px, calc(100vw - var(--sidebar-mini) - 22px)) !important;
  min-width: min(202px, calc(100vw - var(--sidebar-mini) - 22px)) !important;
  transform: none !important;
}

@media screen and (max-width: 768px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  body {
    zoom: 1;
    display: block;
    height: 100svh;
    width: 100vw;
  }

  .mobile-sidebar-btn {
    display: inline-flex;
    flex: 0 0 40px;
  }

  .viewport {
    flex: none !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    height: 100svh;
    margin: 0 !important;
    transform: none !important;
    overflow: hidden;
  }

  .header-bar {
    justify-content: flex-start;
    gap: 10px;
    height: 52px;
    padding: 0 10px !important;
  }

  .header-actions {
    flex: 1;
    min-width: 0;
    justify-content: flex-end;
    gap: 6px;
  }

  #auth-section {
    margin-left: auto;
    gap: 6px;
  }

  #auth-section .btn {
    height: 34px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  #sidebar {
    position: fixed !important;
    top: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    width: min(82vw, 288px) !important;
    min-width: min(82vw, 288px) !important;
    max-width: calc(100vw - 42px) !important;
    flex: none !important;
    transform: translateX(-105%) !important;
    border-right: 1px solid #eeeeee;
    height: 100svh !important;
    max-height: 100svh;
    overflow: hidden;
    box-shadow: none;
    transition:
      transform 0.22s cubic-bezier(0.2, 0, 0, 1),
      box-shadow 0.22s ease !important;
    z-index: 30000;
  }

  #sidebar.mobile-active {
    transform: translateX(0) !important;
    box-shadow: 18px 0 38px rgba(0, 0, 0, 0.14);
  }

  #chat-scroller {
    align-items: stretch;
    padding: 18px 0 96px;
  }

  #chat-container {
    max-width: 100%;
    padding: 0 12px !important;
  }

  .message {
    margin-bottom: 24px;
  }

  .ai-bubble {
    max-width: 100%;
    padding: 0 10px 4px 10px;
  }

  .user-bubble {
    max-width: 88%;
    margin-right: 0;
    padding: 10px 14px;
  }

  .scroll-chat-to-bottom-btn {
    bottom: calc(max(0px, env(safe-area-inset-bottom)) + 5.25rem + 36px);
  }

  body:not(.composer-centered) .scroll-chat-to-bottom-btn {
    bottom: calc(max(0px, env(safe-area-inset-bottom)) + 5.25rem + 22px);
  }

  .input-region {
    bottom: max(0px, env(safe-area-inset-bottom));
    padding: 0 10px;
  }

  body:not(.composer-centered) .input-region {
    bottom: calc(max(0px, env(safe-area-inset-bottom)) + 6px);
  }

  .composer {
    width: 100% !important;
    min-height: 53.5px;
    border-radius: 27px;
    padding: 0;
  }

  .composer-body {
    padding: 0 12px;
  }

  #userInput {
    line-height: 22px;
    max-height: 118px;
    padding: 8px 184px 8px 36px;
  }

  .toolbar-left {
    left: 11px;
  }

  .composer-right-actions {
    right: 10px;
    gap: 8px;
  }

  .model-picker-btn {
    max-width: 78px;
    overflow: hidden;
  }

  .model-picker-menu {
    position: absolute;
    right: 0;
    left: auto;
    top: calc(100% + 8px);
    bottom: auto;
    max-width: min(330px, calc(100vw - 16px));
    max-height: min(380px, var(--model-menu-max-h, calc(100dvh - 184px - env(safe-area-inset-bottom, 0px))));
    overflow-y: auto;
    transform-origin: top right;
  }

  .model-picker-menu.show {
    transform: translateY(0) scale(1);
  }

  .model-picker-wrap.menu-up .model-picker-menu {
    top: auto;
    bottom: calc(100% + 8px);
    transform-origin: bottom right;
  }

  .model-picker-wrap.menu-up .model-picker-menu.show {
    transform: translateY(0) scale(1);
  }

  .addons-menu {
    right: 0;
    left: auto;
    max-width: calc(100vw - 20px);
  }

  .search-modal-overlay {
    align-items: flex-start;
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .search-modal {
    width: calc(100vw - 18px);
    max-height: calc(100svh - 24px);
    border-radius: 18px;
  }

  .library-modal {
    width: calc(100vw - 18px);
    max-height: calc(100svh - 18px);
  }

  .floating-response-toast {
    left: 10px;
    right: 10px;
    top: max(10px, env(safe-area-inset-top));
    width: auto;
  }

  body.composer-centered .input-region {
    top: calc(58% - 15px);
  }

  body.composer-centered.chat-has-user-turn .input-region {
    top: calc(58% - 2px);
  }
}

@media screen and (max-width: 430px) {
  .addons-btn {
    width: 38px;
    padding: 0;
  }

  .addons-btn span:first-child {
    display: none;
  }

  .top-utility-icon-btn,
  .mobile-sidebar-btn {
    width: 36px;
    height: 36px;
  }

  #auth-section .btn-primary {
    display: none;
  }

  .model-picker-btn {
    max-width: 60px;
    padding: 0 5px;
  }

  #selectedProviderLabel,
  #selectedModelLabel {
    max-width: 34px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
