.model-picker-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 330px;
  max-height: min(520px, 70vh);
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  padding: 6px;
  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-item {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: #1f1f1f;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.model-picker-item:hover,
.model-picker-item.active {
  background: rgba(0, 0, 0, 0.05);
}

.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);
}

.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: -14px;
  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:hover .user-response-actions,
.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: #8a6b3f;
  font-size: 0.72rem;
  font-weight: 800;
}

.inline-upgrade-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  background: #111111;
  color: #ffffff;
  font-weight: 800;
  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: 850;
}

.usage-limit-banner-copy span {
  color: #666666;
  font-size: 0.82rem;
  font-weight: 600;
}

.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: 850;
  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-item-bg: #ececec;
  --sidebar-item-hover: #f4f4f4;
  width: 276px;
  background: #fefefe;
  border-right: 1px solid #ededed;
  overflow: hidden;
}

#sidebar.collapsed {
  width: var(--sidebar-mini);
}

.sidebar-header {
  height: 62px;
  padding: 14px 14px 6px 13px;
  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: 800;
  line-height: 1;
}

.sidebar-mini-brand {
  display: none !important;
  color: #000000;
  font-size: 1.32rem;
  font-weight: 800;
  line-height: 1;
}

.menu-toggle {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #5f6368;
}

#sidebar-top-nav {
  padding: 8px 10px 14px 8px !important;
  gap: 2px;
}

#sidebar .nav-link {
  height: 36px;
  border-radius: 10px;
  padding: 0 12px;
  color: #222222;
  font-size: 0.96rem;
  font-weight: 500;
  text-decoration: none;
}

#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 {
  height: 36px !important;
  width: 100% !important;
  margin: 2px 0 0 0 !important;
  padding: 0 12px !important;
}

#newChatBtn .material-symbols-rounded,
#searchToggleBtn .material-symbols-rounded {
  transform: none !important;
}

#sidebar .nav-link .material-symbols-rounded {
  width: 24px;
  min-width: 24px;
  height: 24px;
  transform: none !important;
  color: #111111;
  font-size: 23px;
  font-variation-settings:
    "FILL" 0,
    "wght" 330,
    "GRAD" 0,
    "opsz" 24;
}

#sidebar .nav-text {
  margin-left: 13px;
  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: 650;
  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: 650;
  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;
}

.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: 5.5px;
  height: 5.5px;
  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 / 4px 2px no-repeat;
}

.temporary-toggle-btn[hidden] {
  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;
}

.history-label {
  width: calc(100% - 32px);
  height: 36px;
  flex: 0 0 36px;
  margin: 8px 16px;
  padding: 0 2px 0 8px;
  color: #171717;
  cursor: default;
  font-size: 0.98rem;
  font-weight: 720;
  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: 2px;
}

.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: 8px 12px 14px 16px !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 {
  display: flex !important;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  overflow: hidden !important;
}

#sidebar-history .history-chat-btn {
  height: 34px;
  border-radius: 10px !important;
  padding: 0 8px !important;
  color: #242424;
}

#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: 450;
}

.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: 160px;
  flex: 0 0 160px;
}

.sidebar-auth-slot {
  min-height: 64px;
  transition: none !important;
}

.sidebar-bottom-profile {
  min-height: 64px;
  padding: 8px 12px;
  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;
}

.sidebar-profile-btn {
  width: auto;
  flex: 1 1 auto;
  height: 46px;
  border-radius: 12px;
  background: transparent;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 10px;
  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: 32px;
  height: 32px;
  background: #b79353;
  color: #ffffff;
  font-size: 0.82rem;
  padding: 0;
  flex: 0 0 auto;
  margin: 0;
  transform: none !important;
  transition: none !important;
}

.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: 650;
}

.sidebar-account-plan {
  color: #94764a;
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 2px;
}

.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: 450;
  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: 800;
  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.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: 800;
  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: 650;
}

.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: 700;
  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: 700;
  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: 700;
}

.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: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-memory-chat-btn small {
  color: #777777;
  font-size: 0.78rem;
}

.library-image-card span {
  display: block;
  padding: 8px;
  color: #242424;
  font-size: 0.86rem;
  font-weight: 650;
  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: 12px;
  gap: 10px;
}

.sidebar-auth-slot.guest-auth-slot {
  min-height: 160px;
  flex: 0 0 160px;
}

.sidebar-auth-slot.guest-auth-slot .sidebar-login-copy {
  font-size: 0.8rem;
  line-height: 1.25;
}

.sidebar-auth-slot.guest-auth-slot .sidebar-login-copy .emphasis {
  font-size: 0.92rem;
}

.sidebar-auth-slot.guest-auth-slot .sidebar-login-btn {
  height: 38px;
}

.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.collapsed .sidebar-mini-brand {
  display: inline-flex !important;
  color: #000000;
  transform: translateX(2px);
}

#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-header {
  justify-content: center;
  padding: 16px 0 8px 0;
}

#sidebar.collapsed .sidebar-brand-btn {
  width: 42px !important;
  justify-content: center;
  min-width: 42px;
  padding: 0;
}

#sidebar.collapsed #sidebar-top-nav {
  padding: 8px !important;
}

#sidebar.collapsed .nav-link {
  justify-content: center;
  padding: 0 !important;
}

#sidebar.collapsed #newChatBtn,
#sidebar.collapsed #searchToggleBtn {
  width: 38px !important;
  margin: 2px auto 0 auto !important;
  padding: 0 !important;
}

#sidebar.collapsed .sidebar-bottom {
  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: 100%;
  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: 42px;
  min-height: 42px;
  height: 42px;
  margin: 11px 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: 42px;
  height: 42px;
  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: 22px;
  line-height: 1;
}

#sidebar.collapsed .sidebar-bottom-profile {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 64px;
  min-height: 64px;
  padding: 0;
}

#sidebar.collapsed .sidebar-auth-slot,
#sidebar.collapsed .sidebar-profile-shell {
  width: 100%;
}

#sidebar.collapsed .sidebar-user-menu-wrap {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 42px !important;
  height: 42px !important;
  transform: translate(-50%, -50%) !important;
}

#sidebar.collapsed .sidebar-profile-shell {
  position: relative;
  justify-content: center;
  overflow: visible;
  width: 42px !important;
  height: 42px;
}

#sidebar.collapsed .sidebar-profile-btn {
  position: absolute;
  inset: 0;
  width: 42px !important;
  min-width: 42px !important;
  height: 42px;
  flex: 0 0 42px;
  justify-content: center;
  padding: 0;
  margin: 0 !important;
  transform: none !important;
}

#sidebar.collapsed .sidebar-profile-btn .profile-avatar {
  width: 32px;
  height: 32px;
  margin: auto !important;
  transform: none !important;
}

#sidebar.collapsed .sidebar-user-menu-panel {
  left: 8px !important;
  right: auto !important;
  top: auto !important;
  bottom: calc(100% + 10px) !important;
  transform: none !important;
}

@media screen and (max-width: 768px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  body {
    zoom: 1;
    height: 100svh;
    width: 100vw;
  }

  .mobile-sidebar-btn {
    display: inline-flex;
    flex: 0 0 40px;
  }

  .viewport {
    width: 100vw !important;
    min-width: 0 !important;
    height: 100svh;
  }

  .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 {
    width: 276px !important;
    transform: none;
    border-right: none;
    height: 100svh !important;
    max-height: 100svh;
    overflow: hidden;
  }

  #sidebar.mobile-active {
    left: 0;
  }

  #chat-scroller {
    align-items: stretch;
    padding: 18px 0 118px;
  }

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

  .input-region {
    bottom: max(10px, env(safe-area-inset-bottom));
    padding: 0 10px;
  }

  .composer {
    width: 100% !important;
    min-height: 54px;
    border-radius: 27px;
    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: 4px;
  }

  .model-picker-btn {
    max-width: 78px;
    overflow: hidden;
  }

  .model-picker-menu,
  .model-picker-wrap.menu-up .model-picker-menu {
    position: fixed;
    right: 10px;
    top: auto;
    bottom: calc(74px + env(safe-area-inset-bottom));
    max-height: min(280px, 58vh);
    overflow-y: auto;
    transform-origin: bottom right;
  }

  .model-picker-menu.show,
  .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: 58%;
  }
}

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