:root {
  --bg-page: #fbfbfd;
  --bg-sidebar: #f4f4f6;
  --bg-surface: #ffffff;
  --bg-input: #ffffff;
  --bg-glass: rgba(251, 251, 253, 0.86);
  --text-high: #1d1d1f;
  --text-med: #3f4247;
  --text-low: #777b82;
  --border-subtle: rgba(0, 0, 0, 0.07);
  --border-strong: rgba(0, 0, 0, 0.13);
  --brand-primary-soft: rgba(0, 0, 0, 0.045);
  --sidebar-w: 252px;
  --sidebar-mini: 60px;
  --header-h: 50px;
  --input-max-w: 728px;
  --shadow-subtle: 0 1px 1px rgba(0, 0, 0, 0.025);
  --shadow-elevated: 0 18px 44px rgba(0, 0, 0, 0.085);
  --shadow-modal: 0 24px 70px rgba(0, 0, 0, 0.16);
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 18px;
}

html,
body {
  height: 100%;
  width: 100%;
  background: #fbfbfd;
}

body {
  zoom: 1;
  height: 100vh;
  width: 100vw;
  color: var(--text-high);
  font-weight: 400;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.viewport,
.header-bar,
#chat-scroller {
  background: transparent;
}

#sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.28)),
    var(--bg-sidebar);
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.72);
}

.sidebar-header {
  height: 56px;
  padding: 9px 10px 4px;
}

.nav-content {
  padding: 7px 10px 12px;
  gap: 3px;
}

.nav-link,
.sidebar-bottom .nav-link,
#sidebar-history .history-chat-btn {
  height: 36px;
  min-height: 36px;
  border-radius: 9px !important;
  color: #3d4046;
}

.nav-link:hover,
.nav-link.active,
.sidebar-search-link:hover,
.sidebar-search-link.active,
#sidebar-history .history-chat-btn:hover,
#sidebar-history .history-chat-btn.active,
#newChatBtn:hover::before,
#newChatBtn.active::before {
  background: rgba(0, 0, 0, 0.052) !important;
}

.nav-text,
#sidebar-history .history-chat-btn .nav-text {
  font-size: 0.88rem;
  font-weight: 430;
}

#sidebar .nav-link .material-symbols-rounded,
.sidebar-bottom .material-symbols-rounded,
.menu-toggle,
.search-toggle-btn .material-symbols-rounded {
  color: #3c4043;
  font-variation-settings:
    "FILL" 0,
    "wght" 390,
    "GRAD" 0,
    "opsz" 24 !important;
}

.history-label {
  margin-top: 14px;
  color: #8b9097;
  font-size: 1rem !important;
  font-weight: 620;
  line-height: 1.25;
  text-transform: none;
}

.history-label span {
  font-size: inherit;
  font-weight: inherit;
}

#sidebar-history {
  padding: 0 6px 12px 10px !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.18) transparent;
}

.sidebar-bottom {
  padding: 9px 10px 12px;
  border-top-color: rgba(0, 0, 0, 0.06);
}

.sidebar-bottom.sidebar-bottom-guest {
  min-height: 0;
  flex: 0 0 auto;
}

.sidebar-login-box {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body.guest-auth-shell .history-label,
body.guest-auth-shell .sidebar-history-scroll {
  display: none !important;
}

.sidebar-login-box {
  background: #ffffff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  aspect-ratio: auto;
  height: auto;
  min-height: 0;
  padding: 18px 18px 16px;
  gap: 14px;
}

.sidebar-auth-slot.guest-auth-slot .sidebar-login-box {
  aspect-ratio: auto;
  height: auto;
  min-height: 0;
}

.sidebar-login-copy {
  gap: 8px;
  color: #747982;
  font-size: 0.88rem;
  line-height: 1.28;
}

.sidebar-login-copy .emphasis {
  color: #050505;
  font-size: 0.98rem;
  font-weight: 650;
}

.sidebar-login-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}

.sidebar-auth-slot.guest-auth-slot .sidebar-login-actions .sidebar-login-btn,
.sidebar-auth-slot.guest-auth-slot .sidebar-signup-btn {
  width: auto !important;
  flex: 0 0 auto;
  min-height: 44px;
  height: 44px;
  margin-top: 0;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #d8d8d8;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
}

.sidebar-auth-slot.guest-auth-slot .sidebar-login-actions .sidebar-login-btn {
  min-width: 82px;
  background: #ffffff;
  color: #050505;
}

.sidebar-auth-slot.guest-auth-slot .sidebar-signup-btn {
  min-width: 108px;
  background: #ffffff;
  color: #050505;
}

.header-bar {
  height: 56px;
  padding: 0 22px 0 16px;
  background: rgba(251, 251, 253, 0.82);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
  overflow: visible;
  z-index: 5000;
}

.header-actions {
  gap: 9px;
}

.header-model-picker {
  display: flex;
  align-items: center;
  min-width: 0;
}

.header-model-picker .model-picker-wrap {
  position: relative;
  overflow: visible;
  z-index: 70000;
}

.header-model-picker .model-picker-btn {
  height: 36px;
  padding: 0 7px 0 0;
  font-size: 1rem !important;
  font-weight: 440 !important;
  color: #202124;
  background: transparent;
}

.header-model-picker #selectedModelLabel {
  color: #202124;
  font-size: 1rem !important;
  font-weight: 440 !important;
}

.header-model-picker .model-picker-btn:hover {
  background: transparent;
}

.header-model-picker .model-picker-arrow {
  color: #8b8f95;
  font-size: 24px;
}

.header-model-picker .model-picker-menu {
  left: 0 !important;
  right: auto !important;
  top: calc(100% + 7px) !important;
  bottom: auto !important;
  width: 272px !important;
  min-width: 272px !important;
  max-width: min(272px, calc(100vw - 24px)) !important;
  max-height: min(312px, calc(100dvh - 76px)) !important;
  transform-origin: top left !important;
  z-index: 70000 !important;
}

.header-model-picker .model-picker-wrap.menu-up .model-picker-menu {
  top: calc(100% + 7px) !important;
  bottom: auto !important;
  transform-origin: top left !important;
}

.header-model-picker .model-picker-wrap.menu-up .model-picker-menu:not(.show) {
  transform: translateY(-6px) scale(0.98);
}

.header-model-picker .model-picker-item {
  min-height: 38px;
  padding: 7px 9px;
  font-size: 0.86rem;
  font-weight: 480 !important;
}

.top-utility-icon-btn,
.mobile-sidebar-btn,
.search-toggle-btn,
.menu-toggle {
  border-radius: 999px !important;
}

.btn {
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 560;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background: #111111;
  box-shadow: none;
}

#chat-scroller {
  padding: 30px 0 132px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

#chat-container {
  max-width: 796px;
  padding: 0 22px;
}

.message {
  margin-bottom: 26px;
}

.user-bubble {
  max-width: min(76%, 620px);
  padding: 10px 15px;
  border-radius: 18px;
  background: #eeeeef;
  color: #1d1d1f;
  line-height: 1.48;
  margin-right: 0;
}

.ai-bubble {
  max-width: 92%;
  padding: 0 10px 4px 10px;
  line-height: 1.68;
  color: #1d1d1f;
}

.stream-plain,
.stream-final {
  line-height: 1.68;
}

.response-actions {
  margin-top: 10px;
  gap: 10px;
}

.response-action-btn {
  width: 24px;
  height: 24px;
  border-radius: 8px;
}

.response-action-btn:hover {
  background: rgba(0, 0, 0, 0.045);
}

.code-block-container {
  border-color: rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  background: #ffffff;
}

.code-header {
  min-height: 36px;
  padding: 0 10px 0 12px;
  background: #f7f7f8;
}

.code-content {
  padding: 10px 12px;
}

.input-region {
  padding: 0 24px;
  background: linear-gradient(to top, #fbfbfd 76%, rgba(251, 251, 253, 0));
}

body:not(.composer-centered) .input-region {
  bottom: 10px;
}

.composer {
  max-width: 800px;
  min-height: 58px;
  margin-top: 0;
  border-radius: 28px;
  border: 1px solid rgba(0, 0, 0, 0.105) !important;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.86) inset;
}

.composer:hover {
  border-color: rgba(0, 0, 0, 0.16) !important;
}

.composer:focus-within {
  border-color: rgba(0, 0, 0, 0.18) !important;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.095),
    0 0 0 3px rgba(0, 0, 0, 0.035);
}

.composer-body {
  min-height: 58px;
  padding: 0 14px;
}

#userInput {
  height: 36px;
  min-height: 36px;
  font-size: 0.98rem;
  line-height: 22px;
  padding: 7px 148px 7px 40px;
}

#userInput::placeholder {
  color: #8f9399;
}

.btn-action-plus,
.mic-btn,
.model-picker-btn {
  color: #5f6368;
}

.btn-action-plus,
.mic-btn {
  width: 32px;
  height: 32px;
}

.btn-action-plus:hover,
.mic-btn:hover,
.model-picker-btn:hover {
  background: rgba(0, 0, 0, 0.052);
  color: #1d1d1f;
}

.model-picker-btn {
  height: 32px;
  padding: 0 8px 0 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #676b72;
}

#selectedModelLabel {
  color: #676b72;
  font-weight: 500;
}

#sendBtn,
#sendBtn.record-idle,
#sendBtn.ready,
#sendBtn.streaming {
  width: 36px !important;
  height: 36px !important;
}

#sendBtn.ready,
#sendBtn.streaming {
  background: #111111;
  color: #ffffff;
}

#sendBtn.record-idle {
  width: 104px !important;
  height: 36px !important;
  padding: 0 16px 0 13px;
  gap: 8px;
  border-radius: 18px !important;
  background: #f0f0f1 !important;
  color: #050505 !important;
  overflow: hidden;
}

#sendBtn.record-idle #btnIcon {
  font-size: 24px;
  color: #050505;
}

#sendBtn .voice-action-label {
  display: none;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0;
}

#sendBtn.record-idle .voice-action-label {
  display: inline;
}

#sendBtn.voice-chat-active:not(.ready):not(.streaming) {
  border-radius: 18px !important;
  background: #f3eeee !important;
  color: #8f1d1d !important;
}

#sendBtn.voice-chat-active:not(.ready):not(.streaming) #btnIcon {
  color: #d93025;
  font-variation-settings:
    "FILL" 1,
    "wght" 620,
    "GRAD" 0,
    "opsz" 24;
}

#sendBtn.voice-chat-active:not(.ready):not(.streaming) .voice-action-label {
  color: #8f1d1d;
}

.idle-composer-brand {
  bottom: calc(100% + 48px);
}

.idle-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.idle-brand-text,
.idle-brand-text.idle-brand-greeting,
.idle-brand-greeting {
  color: #1d1d1f;
  font-weight: 360;
  letter-spacing: 0;
}

.idle-brand-text {
  font-size: clamp(2rem, 4.5vw, 2.85rem);
}

.idle-brand-text.idle-brand-greeting,
.idle-brand-greeting {
  font-size: clamp(1.24rem, 3vw, 1.72rem);
}

.composer-add-menu,
.composer-add-submenu,
#composerAddMenu,
#composerRecentMenu,
#composerPersonalitiesMenu,
.model-picker-menu,
.tools-menu,
.chat-context-menu,
.sidebar-user-menu-panel,
.sidebar-help-submenu {
  border-color: rgba(0, 0, 0, 0.09) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.9) inset !important;
}

.composer-add-menu-item,
#composerAddMenu .composer-add-menu-item,
#composerRecentMenu .composer-add-menu-item,
#composerPersonalitiesMenu .composer-add-menu-item,
.model-picker-item,
.tools-menu-item,
.chat-context-item,
.sidebar-user-menu-item {
  border-radius: 8px !important;
  font-weight: 500 !important;
}

.composer-add-menu-item:hover,
#composerAddMenu .composer-add-menu-item:hover,
#composerRecentMenu .composer-add-menu-item:hover,
#composerPersonalitiesMenu .composer-add-menu-item:hover,
.model-picker-item:hover,
.model-picker-item.active,
.chat-context-item:hover,
.tools-menu-item:hover,
.sidebar-user-menu-item:hover {
  background: rgba(0, 0, 0, 0.052) !important;
}

.modal-overlay,
.workspace-sheet-overlay,
.search-modal-overlay,
.library-modal-overlay {
  background: rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.modal-card,
.search-modal,
.library-modal,
.workspace-sheet-panel {
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-modal);
}

.workspace-welcome-back-panel {
  display: grid;
  gap: 18px;
}

.workspace-welcome-back-panel[hidden] {
  display: none;
}

.workspace-welcome-back-panel h3 {
  margin: 0;
  text-align: center;
  color: #111111;
  font-size: clamp(2.4rem, 5vw, 3.45rem);
  font-weight: 400;
  letter-spacing: 0;
}

.workspace-welcome-back-panel p {
  margin: 0 0 18px;
  text-align: center;
  color: #1d1d1f;
  font-size: 1.18rem;
}

.workspace-remembered-account,
.workspace-auth-choice-btn {
  width: 100%;
  min-height: 76px;
  border: 1px solid #dedede;
  border-radius: 32px;
  background: #ffffff;
  color: #111111;
  cursor: pointer;
}

.workspace-remembered-account {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 32px;
  gap: 16px;
  align-items: center;
  padding: 12px 18px;
  text-align: left;
}

.workspace-remembered-avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #b99652;
  color: #ffffff;
  font-size: 1.38rem;
  font-weight: 500;
}

.workspace-remembered-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.workspace-remembered-copy strong,
.workspace-remembered-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-remembered-copy strong {
  font-size: 1.12rem;
}

.workspace-remembered-copy span {
  color: #666666;
  font-size: 1rem;
}

.workspace-remembered-remove {
  display: grid;
  place-items: center;
  color: #111111;
}

.workspace-remembered-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  color: #111111;
  font-weight: 650;
}

.workspace-remembered-divider::before,
.workspace-remembered-divider::after {
  content: "";
  height: 1px;
  background: #dddddd;
}

.workspace-auth-choice-btn {
  min-height: 76px;
  font-size: 1.08rem;
  font-weight: 650;
}

.scroll-chat-to-bottom-btn {
  width: 40px;
  height: 40px;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

body.temporary-chat-mode .viewport,
body.temporary-chat-mode .header-bar,
body.temporary-chat-mode #chat-scroller {
  background: transparent;
}

body.temporary-chat-mode .input-region {
  background: transparent;
}

body.temporary-chat-mode .thinking-live-web-line,
body.temporary-chat-mode .stream-status.searching-status,
body.temporary-chat-mode .stream-status.searching-status .stream-status-primary {
  color: #111111;
}

body.temporary-chat-mode .thinking-searching-for {
  color: var(--text-low);
}

body.temporary-chat-mode .thinking-pending-dots::before {
  border-color: #111111;
}

body.temporary-chat-mode .stream-status-search-detail {
  color: #555555;
}

.app-boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  background: #ffffff;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.18s ease,
    visibility 0.18s ease;
}

body.app-ready .app-boot-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-boot-spinner {
  width: 70px;
  height: 70px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  position: relative;
}

.app-boot-spinner::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(0, 0, 0, 0.09);
  border-top-color: #111111;
  border-radius: inherit;
  animation: zexiraiBootSpin 0.82s linear infinite;
}

.app-boot-spinner img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

@keyframes zexiraiBootSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Reference-density pass: keep the index surface compact, light, and product-like. */
body {
  font-weight: 390;
}

.viewport {
  background: #ffffff;
}

#sidebar {
  --sidebar-collapsed-rail-x: 14px;
  --sidebar-icon-slot: 32px;
  --sidebar-icon-size: 21px;
  width: 252px;
  min-width: 252px;
  flex: 0 0 252px;
  flex-basis: 252px;
  background: #f7f7f8;
  transition:
    width 0.24s cubic-bezier(0.2, 0.8, 0.2, 1),
    min-width 0.24s cubic-bezier(0.2, 0.8, 0.2, 1),
    flex-basis 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#sidebar.collapsed {
  width: 60px;
  min-width: 60px;
  flex: 0 0 60px;
  flex-basis: 60px;
}

#sidebar.collapsed .sidebar-header,
#sidebar.collapsed .nav-content,
#sidebar.collapsed .sidebar-bottom {
  padding-left: 10px;
  padding-right: 10px;
}

#sidebar.collapsed .sidebar-brand-btn {
  width: 40px;
  justify-content: center;
  padding: 0;
  margin-left: 0;
}

#sidebar.collapsed .sidebar-mini-brand {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#sidebar.collapsed .sidebar-mini-favicon {
  width: 31px !important;
  height: 31px !important;
  object-fit: contain;
}

.sidebar-header,
.header-bar {
  height: 50px;
}

.sidebar-header {
  padding: 7px 8px 3px;
}

.nav-content {
  padding: 5px 8px 10px;
  gap: 2px;
}

.nav-link,
.sidebar-bottom .nav-link,
#sidebar-history .history-chat-btn {
  height: 32px;
  min-height: 32px;
  border-radius: 8px !important;
}

.nav-text,
#sidebar-history .history-chat-btn .nav-text {
  font-size: 0.86rem;
  font-weight: 360;
}

#sidebar .material-symbols-rounded,
.header-bar .material-symbols-rounded,
.composer .material-symbols-rounded,
.response-action-btn .material-symbols-rounded,
.workspace-sheet-panel .material-symbols-rounded {
  font-variation-settings:
    "FILL" 0,
    "wght" 320,
    "GRAD" 0,
    "opsz" 24 !important;
}

#sidebar .nav-link .material-symbols-rounded,
.sidebar-bottom .material-symbols-rounded,
.menu-toggle .material-symbols-rounded,
.search-toggle-btn .material-symbols-rounded,
.mobile-sidebar-btn .material-symbols-rounded,
.top-utility-icon-btn .material-symbols-rounded {
  font-size: 21px !important;
  color: #2f3337;
}

.top-utility-icon-btn,
.mobile-sidebar-btn,
.search-toggle-btn,
.menu-toggle,
.btn-action-plus,
.mic-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
}

.history-label {
  margin: 12px 8px 5px;
  color: #8c9198;
  font-size: 0.86rem !important;
  font-weight: 500;
}

.header-bar {
  padding: 0 18px 0 12px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-actions {
  gap: 8px;
}

.header-model-picker .model-picker-btn {
  height: 32px;
  padding: 0 5px 0 0;
  font-size: 0.98rem !important;
  font-weight: 330 !important;
  color: #171717;
}

.header-model-picker #selectedModelLabel {
  font-size: 0.98rem !important;
  font-weight: 330 !important;
  color: #171717;
}

.header-model-picker .model-picker-arrow {
  font-size: 19px;
  color: #767b82;
}

.btn {
  height: 34px;
  padding: 0 14px;
  font-size: 0.85rem;
  font-weight: 560;
}

#auth-section .btn {
  height: 34px;
  padding: 0 15px;
  font-size: 0.85rem;
  font-weight: 560;
  box-shadow: none;
}

#auth-section .btn-primary {
  min-width: 0;
  padding-inline: 16px;
}

#auth-section .btn-outline {
  min-width: 0;
  background: #ffffff;
}

body.composer-centered .input-region {
  top: calc(50% - 28px);
}

.input-region {
  padding: 0 22px;
  background: linear-gradient(to top, #ffffff 76%, rgba(255, 255, 255, 0));
}

.composer {
  max-width: 760px;
  min-height: 58px;
  border-radius: 30px;
  border-color: rgba(0, 0, 0, 0.105) !important;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.92) inset;
}

.composer:hover {
  border-color: rgba(0, 0, 0, 0.14) !important;
}

.composer:focus-within {
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.075),
    0 0 0 2px rgba(0, 0, 0, 0.026);
}

.composer-body {
  min-height: 58px;
  padding: 0 12px;
}

#userInput {
  height: 38px;
  min-height: 38px;
  padding: 7px 150px 7px 38px;
  font-size: 0.98rem;
  line-height: 22px;
}

.toolbar-left {
  left: 11px;
}

.composer-right-actions {
  right: 10px;
  gap: 7px;
}

.btn-action-plus .material-symbols-rounded {
  font-size: 22px !important;
}

.mic-btn .material-symbols-rounded {
  font-size: 19px !important;
}

#sendBtn,
#sendBtn.ready,
#sendBtn.streaming {
  width: 34px !important;
  height: 34px !important;
}

#sendBtn.record-idle {
  width: 87px !important;
  height: 34px !important;
  padding: 0 12px 0 10px !important;
  gap: 7px;
  border-radius: 17px !important;
  background: #f0f0f0 !important;
}

body.member-auth-shell #sendBtn.record-idle {
  width: 34px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: #111111 !important;
  color: #ffffff !important;
}

body.member-auth-shell #sendBtn.record-idle .voice-action-label {
  display: none !important;
}

body.member-auth-shell #sendBtn.record-idle #btnIcon {
  color: #ffffff;
}

body.temporary-chat-mode #sendBtn.record-idle {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background: #3f3f3f !important;
  color: #777777 !important;
  pointer-events: none;
}

body.temporary-chat-mode #sendBtn.record-idle .voice-action-label {
  display: none !important;
}

body.temporary-chat-mode #sendBtn.record-idle #btnIcon {
  color: #777777 !important;
}

body.temporary-chat-mode .mic-btn {
  color: #f4f4f4 !important;
  opacity: 1;
}

.sidebar-bottom {
  padding-bottom: 16px !important;
}

.sidebar-auth-slot {
  min-height: 48px;
}

.sidebar-bottom-profile {
  min-height: 44px;
  padding-top: 4px;
}

.sidebar-user-menu-wrap {
  top: 4px;
}

#sendBtn.record-idle #btnIcon {
  font-size: 21px !important;
  font-variation-settings:
    "FILL" 0,
    "wght" 360,
    "GRAD" 0,
    "opsz" 24 !important;
}

#sendBtn .voice-action-label {
  font-size: 0.85rem;
  font-weight: 560;
}

.idle-composer-brand {
  bottom: calc(100% + 40px);
}

.idle-brand-text,
.idle-brand-text.idle-brand-greeting,
.idle-brand-greeting {
  font-weight: 330;
}

.idle-brand-text.idle-brand-greeting,
.idle-brand-greeting {
  font-size: clamp(1.08rem, 2.25vw, 1.46rem);
}

.composer-add-menu,
.composer-add-submenu,
#composerAddMenu,
#composerRecentMenu,
#composerPersonalitiesMenu,
.model-picker-menu,
.provider-picker-menu,
.tools-menu,
.chat-context-menu,
.sidebar-user-menu-panel,
.sidebar-help-submenu {
  width: 224px !important;
  min-width: 224px !important;
  max-width: min(224px, calc(100vw - 18px)) !important;
  padding: 5px !important;
  border-radius: 10px !important;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.92) inset !important;
}

.header-model-picker .model-picker-menu {
  width: 244px !important;
  min-width: 244px !important;
  max-width: min(244px, calc(100vw - 20px)) !important;
  max-height: min(292px, calc(100dvh - 68px)) !important;
}

.composer-add-menu-item,
#composerAddMenu .composer-add-menu-item,
#composerRecentMenu .composer-add-menu-item,
#composerPersonalitiesMenu .composer-add-menu-item,
.model-picker-item,
.tools-menu-item,
.chat-context-item,
.sidebar-user-menu-item {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 8px !important;
  gap: 8px;
  border-radius: 7px !important;
  font-size: 0.84rem !important;
  font-weight: 400 !important;
}

.composer-add-menu-item .material-symbols-rounded,
.model-picker-item .material-symbols-rounded,
.tools-menu-item .material-symbols-rounded,
.chat-context-item .material-symbols-rounded,
.sidebar-user-menu-item .material-symbols-rounded {
  width: 18px;
  min-width: 18px;
  height: 18px;
  font-size: 18px !important;
  font-variation-settings:
    "FILL" 0,
    "wght" 330,
    "GRAD" 0,
    "opsz" 24 !important;
}

.workspace-sheet-overlay,
.modal-overlay,
.search-modal-overlay,
.library-modal-overlay {
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.workspace-sheet-panel {
  width: min(100%, 392px);
  max-height: calc(100dvh - 28px);
  border-radius: 22px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.18);
}

.workspace-sheet-close {
  width: 34px;
  height: 34px;
  top: 12px;
  right: 12px;
  background: transparent;
}

.workspace-sheet-panel .workspace-login-sheet,
.workspace-sheet-panel .workspace-signup-sheet {
  --auth-control-width: min(100%, 318px);
  --radius-xl: 22px;
  --radius-md: 12px;
  padding: 18px 24px 24px;
  border-radius: 22px;
  box-shadow: none;
}

.workspace-sheet-panel .workspace-login-sheet header,
.workspace-sheet-panel .workspace-signup-sheet header {
  margin-bottom: 14px;
}

.workspace-sheet-panel .workspace-login-sheet .logo-mark,
.workspace-sheet-panel .workspace-signup-sheet .logo-mark {
  font-size: 1.48rem;
  font-weight: 430;
}

.workspace-sheet-panel .workspace-login-sheet h2,
.workspace-sheet-panel .workspace-signup-sheet h2 {
  font-size: 1.18rem;
  font-weight: 430;
}

.workspace-sheet-panel .form-stack,
.workspace-sheet-panel .workspace-signup-sheet .form-stack {
  gap: 10px;
}

.workspace-sheet-panel .form-group label {
  font-size: 0.8rem;
  font-weight: 430;
}

.workspace-sheet-panel input {
  min-height: 44px;
  padding: 10px 14px 10px 44px;
  border-width: 1px;
  font-size: 0.92rem;
}

.workspace-sheet-panel .input-wrapper > .material-symbols-rounded {
  left: 15px;
  font-size: 19px;
}

.workspace-sheet-panel .btn-submit {
  min-height: 44px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 540;
}

.workspace-sheet-panel .btn-submit:hover:not(:disabled) {
  transform: none;
  box-shadow: none;
}

.workspace-welcome-back-panel {
  gap: 14px;
}

.workspace-welcome-back-panel h3 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 380;
}

.workspace-welcome-back-panel p {
  margin-bottom: 10px;
  font-size: 1rem;
}

.workspace-remembered-account,
.workspace-auth-choice-btn {
  min-height: 58px;
  border-radius: 24px;
}

.workspace-remembered-account {
  grid-template-columns: 42px minmax(0, 1fr) 28px;
  gap: 12px;
  padding: 8px 14px;
}

.workspace-remembered-avatar {
  width: 42px;
  height: 42px;
  font-size: 1.05rem;
}

.workspace-remembered-copy strong {
  font-size: 0.96rem;
  font-weight: 540;
}

.workspace-remembered-copy span {
  font-size: 0.86rem;
}

.workspace-auth-choice-btn {
  min-height: 52px;
  font-size: 0.94rem;
  font-weight: 560;
}

/* Targeted chat polish requested after the reference pass. */
#auth-section .btn-primary {
  display: none !important;
}

.sidebar-auth-slot.guest-auth-slot .sidebar-login-copy,
.sidebar-auth-slot.guest-auth-slot .sidebar-signup-btn {
  display: none !important;
}

.sidebar-bottom.sidebar-bottom-guest {
  min-height: 86px !important;
  flex: 0 0 86px !important;
}

.sidebar-auth-slot.guest-auth-slot {
  min-height: 86px !important;
  display: flex;
  align-items: center;
}

.sidebar-auth-slot.guest-auth-slot .sidebar-login-box {
  width: 100%;
  padding: 10px 10px 14px !important;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.sidebar-auth-slot.guest-auth-slot .sidebar-login-actions {
  width: 100%;
}

.sidebar-auth-slot.guest-auth-slot .sidebar-login-actions .sidebar-login-btn {
  width: 100% !important;
  height: 44px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid #dcdcdc;
  background: #ffffff;
  color: #111111;
  font-size: 0.94rem;
  font-weight: 560;
  box-shadow: none;
}

.sidebar-bottom:not(.sidebar-bottom-guest) {
  min-height: 70px;
  flex-basis: 70px;
}

.sidebar-bottom-profile {
  min-height: 62px;
  padding: 7px 9px 9px;
}

.sidebar-profile-shell,
.sidebar-profile-btn {
  min-height: 44px;
}

.sidebar-profile-btn {
  height: 44px;
}

.sidebar-brand-btn {
  min-width: 0 !important;
  height: 34px;
  padding: 0 7px !important;
  align-items: center;
}

.sidebar-full-brand {
  left: 0 !important;
  top: 0 !important;
  transform: translate(2px, 1px);
  font-size: 1.22rem !important;
  font-weight: 430 !important;
}

.sidebar-mini-brand {
  width: 32px !important;
  height: 32px !important;
  transform: translate(0, 1px);
}

.sidebar-mini-favicon {
  width: 25px !important;
  height: 25px !important;
  transform: none !important;
}

#sidebar.collapsed .sidebar-header {
  padding-top: 9px !important;
  padding-left: var(--sidebar-collapsed-rail-x) !important;
}

#sidebar.collapsed .sidebar-brand-btn {
  width: var(--sidebar-icon-slot) !important;
  min-width: var(--sidebar-icon-slot) !important;
  height: var(--sidebar-icon-slot) !important;
  padding: 0 !important;
}

#sidebar.collapsed .sidebar-bottom-profile {
  height: 58px !important;
  min-height: 58px !important;
}

#sidebar.collapsed .sidebar-user-menu-wrap {
  top: calc(50% - 16px) !important;
  height: var(--sidebar-icon-slot) !important;
}

#sidebar.collapsed .sidebar-profile-shell,
#sidebar.collapsed .sidebar-profile-btn {
  width: var(--sidebar-icon-slot) !important;
  height: var(--sidebar-icon-slot) !important;
  min-height: var(--sidebar-icon-slot) !important;
}

.composer,
.composer:focus,
.composer:focus-visible,
.composer:focus-within,
#userInput,
#userInput:focus,
#userInput:focus-visible,
.btn-action-plus:focus,
.btn-action-plus:focus-visible,
.mic-btn:focus,
.mic-btn:focus-visible,
#sendBtn:focus,
#sendBtn:focus-visible {
  outline: none !important;
}

.composer:focus-within {
  border-color: rgba(0, 0, 0, 0.12) !important;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.92) inset !important;
}

body.guest-auth-shell .composer {
  max-width: 860px;
  min-height: 56px;
  border-radius: 28px;
}

body.guest-auth-shell .composer-body {
  min-height: 56px;
}

body.guest-auth-shell #userInput {
  height: 38px;
  min-height: 38px;
  padding-right: 142px;
  font-size: 1rem;
}

body.guest-auth-shell #sendBtn.record-idle {
  width: 84px !important;
}

body.member-auth-shell .header-model-picker.header-model-picker-empty {
  width: 0;
  overflow: hidden;
}

body.member-auth-shell .composer {
  max-width: 800px;
  min-height: 50px;
  border-radius: 25px;
}

body.member-auth-shell .composer-body {
  min-height: 50px;
}

body.member-auth-shell #userInput {
  height: 34px;
  min-height: 34px;
  padding-right: 190px;
}

body.member-auth-shell .composer-right-actions {
  right: 9px;
  gap: 9px;
}

body.member-auth-shell .composer-right-actions .model-picker-wrap {
  position: relative;
  display: inline-flex;
  order: 0;
  z-index: 50;
}

body.member-auth-shell .composer-right-actions .model-picker-btn {
  height: 32px;
  padding: 0 6px 0 9px;
  color: #8a8d92;
  font-size: 0.93rem !important;
  font-weight: 390 !important;
}

body.member-auth-shell .composer-right-actions .model-picker-arrow {
  font-size: 18px;
}

body.member-auth-shell #sendBtn.record-idle {
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  background: #050505 !important;
  color: #ffffff !important;
}

body.member-auth-shell #sendBtn.record-idle .voice-action-label {
  display: none !important;
}

body.member-auth-shell #sendBtn.record-idle #btnIcon {
  color: #ffffff;
  font-size: 23px !important;
  font-variation-settings:
    "FILL" 0,
    "wght" 430,
    "GRAD" 0,
    "opsz" 24 !important;
}

.response-actions {
  gap: 10px;
  margin-top: 10px;
  align-items: center;
}

.response-action-btn,
.user-copy-btn {
  width: 27px !important;
  height: 27px !important;
  border-radius: 7px;
  color: #565a60;
  display: inline-grid;
  place-items: center;
}

.response-action-btn .material-symbols-rounded,
.user-copy-btn .material-symbols-rounded {
  font-size: 22px !important;
  font-variation-settings:
    "FILL" 0,
    "wght" 500,
    "GRAD" 0,
    "opsz" 24 !important;
}

.response-action-btn:hover,
.user-copy-btn:hover {
  background: rgba(0, 0, 0, 0.045);
  color: #111111;
}

.response-action-btn.selected .material-symbols-rounded {
  font-variation-settings:
    "FILL" 1,
    "wght" 500,
    "GRAD" 0,
    "opsz" 24 !important;
}

.user-message {
  position: relative;
  padding-bottom: 32px;
}

.user-response-actions {
  position: absolute !important;
  right: 2px;
  bottom: 2px;
  align-self: flex-end;
  margin: 0 !important;
  opacity: 0;
  transform: none !important;
  pointer-events: none;
}

.user-message.user-actions-near .user-response-actions,
.user-response-actions:hover,
.user-message:focus-within .user-response-actions {
  opacity: 1;
  pointer-events: auto;
}

.user-message-has-image .user-bubble {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  max-width: min(520px, 76vw);
  overflow: visible;
}

.user-attachment-preview {
  width: auto;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.user-attachment-frame {
  position: relative;
  margin: 0;
  width: fit-content;
  max-width: min(520px, 76vw);
  border: 0;
  background: transparent;
}

.user-attachment-frame img {
  display: block;
  width: auto;
  max-width: min(520px, 76vw);
  max-height: 420px;
  height: auto;
  object-fit: contain;
  border: 0 !important;
  border-radius: 18px;
  background: transparent !important;
  cursor: zoom-in;
}

.user-bubble-image-with-text .user-attachment-frame img {
  min-width: min(360px, 70vw);
}

.user-attachment-frame figcaption {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  max-width: calc(100% - 20px);
  padding: 7px 10px;
  border-radius: 13px;
  background: rgba(244, 244, 244, 0.94);
  color: #1d1d1f;
  font-size: 0.92rem;
  line-height: 1.32;
}

.chat-generated-image {
  position: relative;
  width: fit-content;
  max-width: min(100%, 560px);
  margin: 12px 0 8px;
  border: 0;
  background: transparent;
}

.chat-generated-image img {
  display: block;
  width: auto;
  max-width: min(100%, 560px);
  max-height: 620px;
  object-fit: contain;
  border: 0 !important;
  border-radius: 18px;
  background: transparent;
  cursor: zoom-in;
}

.chat-generated-image-actions {
  position: absolute;
  right: 9px;
  top: 9px;
  z-index: 3;
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
}

.chat-generated-image-btn,
.chat-image-lightbox-btn {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #111111;
  cursor: pointer;
}

.chat-generated-image-btn:hover,
.chat-image-lightbox-btn:hover {
  background: rgba(0, 0, 0, 0.07);
}

.chat-generated-image-btn .material-symbols-rounded,
.chat-image-lightbox-btn .material-symbols-rounded {
  font-size: 19px !important;
  font-variation-settings:
    "FILL" 0,
    "wght" 430,
    "GRAD" 0,
    "opsz" 24 !important;
}

.chat-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90000;
  display: grid;
  place-items: center;
  padding: 52px;
  background: rgba(255, 255, 255, 0.96);
}

.chat-image-lightbox[hidden] {
  display: none !important;
}

.chat-image-lightbox-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.chat-image-lightbox-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
}

.chat-image-lightbox-actions {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  gap: 7px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.thinking-shell-generating-image {
  width: min(372px, 88vw);
  min-height: 324px;
}

.image-generation-scene {
  position: relative;
  width: 100%;
  min-height: 324px;
  overflow: hidden;
  border-radius: 24px;
  background: #f3f3f3;
}

.image-generation-scene strong {
  position: absolute;
  left: 20px;
  top: 17px;
  z-index: 2;
  color: #70747a;
  font-size: 0.84rem;
  font-weight: 650;
}

.image-generation-dots {
  position: absolute;
  inset: 52px 18px 18px;
  opacity: 0.82;
  background-image: radial-gradient(circle, rgba(156, 160, 166, 0.58) 1.6px, transparent 1.7px);
  background-size: 16px 16px;
  mask-image: radial-gradient(circle at 16% 18%, #000 0 28%, rgba(0, 0, 0, 0.45) 43%, transparent 72%);
  animation: imageGenerationDotsDrift 2.4s linear infinite;
}

.image-generation-dots::after {
  content: "";
  position: absolute;
  left: 70%;
  top: 54%;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #ef0000;
}

@keyframes imageGenerationDotsDrift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 32px 16px;
  }
}

.chat-loading-surface {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(100dvh - 110px);
  width: 100%;
  background: #ffffff;
}

.chat-loading-spinner {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 5px solid rgba(0, 0, 0, 0.12);
  border-top-color: rgba(0, 0, 0, 0.48);
  animation: chatLoadingSpinner 0.82s linear infinite;
}

@keyframes chatLoadingSpinner {
  to {
    transform: rotate(360deg);
  }
}

#sidebar-history .history-chat-btn {
  grid-template-columns: minmax(0, 1fr) 30px 30px !important;
}

#sidebar-history .history-chat-btn.history-chat-btn--pinned {
  grid-template-columns: 18px minmax(0, 1fr) 30px 30px !important;
}

#sidebar-history .history-chat-btn .chat-share-btn,
#sidebar-history .history-chat-btn .chat-more-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #25272b;
  display: inline-grid;
  place-items: center;
  opacity: 0;
}

#sidebar-history .history-chat-btn:hover .chat-share-btn,
#sidebar-history .history-chat-btn:hover .chat-more-btn,
#sidebar-history .history-chat-btn.active .chat-share-btn,
#sidebar-history .history-chat-btn.active .chat-more-btn {
  opacity: 1;
}

#sidebar-history .history-chat-btn .chat-share-btn:hover,
#sidebar-history .history-chat-btn .chat-more-btn:hover {
  background: rgba(0, 0, 0, 0.055);
}

#sidebar-history .history-chat-btn .chat-share-btn .material-symbols-rounded,
#sidebar-history .history-chat-btn .chat-more-btn .material-symbols-rounded {
  font-size: 19px !important;
  font-variation-settings:
    "FILL" 0,
    "wght" 430,
    "GRAD" 0,
    "opsz" 24 !important;
}

@media (max-width: 768px) {
  body {
    width: 100vw;
    height: 100vh;
  }

  .header-bar {
    padding: 0 12px;
  }

  #chat-scroller {
    padding-top: 18px;
  }

  #chat-container {
    padding: 0 14px;
  }

  .user-bubble {
    max-width: 86%;
  }

  .ai-bubble {
    max-width: 100%;
    padding-left: 4px;
    padding-right: 4px;
  }

  .input-region {
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0 12px;
    overflow: visible;
  }

  .composer {
    flex: none;
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    min-height: 56px;
    border-radius: 26px;
    box-sizing: border-box;
    overflow: visible;
  }

  .composer-body {
    min-height: 56px;
    padding: 0 11px;
  }

  #userInput {
    padding: 7px 142px 7px 38px;
    font-size: 0.94rem;
  }

  .composer-right-actions {
    right: 10px;
    gap: 6px;
    max-width: 136px;
  }

  .model-picker-btn {
    max-width: 66px;
    padding: 0 5px 0 7px;
  }

  #selectedModelLabel,
  #selectedProviderLabel {
    max-width: 36px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mic-btn {
    width: 30px;
    height: 30px;
  }

  #sendBtn,
  #sendBtn.record-idle,
  #sendBtn.ready,
  #sendBtn.streaming {
    height: 34px !important;
  }

  #sendBtn.record-idle {
    width: 96px !important;
    padding: 0 13px 0 11px;
  }

  #sendBtn.ready,
  #sendBtn.streaming {
    width: 34px !important;
  }

  body.composer-centered .input-region {
    top: calc(64% - 10px);
  }
}

@media (max-width: 520px) {
  body.composer-centered .input-region,
  .input-region {
    align-items: flex-start !important;
  }

  .composer {
    flex-basis: auto;
    width: min(366px, calc(100vw - 24px)) !important;
    max-width: min(366px, calc(100vw - 24px)) !important;
  }

  body.composer-centered:not(.chat-has-user-turn) .composer {
    height: 56px !important;
    max-height: 56px !important;
    min-height: 56px;
  }

  body.composer-centered:not(.chat-has-user-turn) .composer-body {
    flex: 0 0 56px;
    height: 56px;
    min-height: 56px;
  }

  body.composer-centered:not(.chat-has-user-turn) #userInput {
    height: 36px !important;
    min-height: 36px;
    max-height: 36px;
    overflow: hidden;
  }
}

/* Launch polish: quieter app shell, tighter controls, and more deliberate spacing. */
:root {
  --bg-page: #ffffff;
  --bg-sidebar: #f7f7f8;
  --bg-surface: #ffffff;
  --bg-input: #ffffff;
  --text-high: #171717;
  --text-med: #3f3f46;
  --text-low: #7b8088;
  --border-subtle: rgba(0, 0, 0, 0.075);
  --border-strong: rgba(0, 0, 0, 0.13);
  --brand-primary-soft: rgba(0, 0, 0, 0.052);
  --input-max-w: 764px;
  --shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-elevated: 0 18px 46px rgba(0, 0, 0, 0.075);
}

html,
body {
  background: #ffffff !important;
  color: var(--text-high);
  letter-spacing: 0 !important;
}

body,
button,
input,
textarea,
select {
  font-weight: 390;
}

#sidebar {
  background: #f7f7f8 !important;
  border-right: 1px solid rgba(0, 0, 0, 0.055) !important;
  box-shadow: none !important;
  transition:
    width 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.sidebar-header {
  padding: 10px 11px 5px !important;
}

.sidebar-brand-btn {
  height: 36px !important;
  border-radius: 9px !important;
}

.logo-text {
  color: #111111 !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  font-size: 1.35rem !important;
  font-weight: 570 !important;
  letter-spacing: -0.02em !important;
}

#sidebar.collapsed .sidebar-brand-btn {
  margin-left: 2px !important;
}

#sidebar.collapsed .logo-text {
  font-size: 0 !important;
}

#sidebar.collapsed .sidebar-logo-mark {
  width: 31px !important;
  height: 31px !important;
  margin: 0 auto !important;
}

.nav-link,
.sidebar-search-link,
#sidebar-history .history-chat-btn {
  height: 34px !important;
  min-height: 34px !important;
  border-radius: 8px !important;
  color: #2f3337 !important;
  font-weight: 385 !important;
}

.nav-link:hover,
.nav-link.active,
.sidebar-search-link:hover,
.sidebar-search-link.active,
#sidebar-history .history-chat-btn:hover,
#sidebar-history .history-chat-btn.active {
  background: rgba(0, 0, 0, 0.052) !important;
  color: #111111 !important;
}

.nav-text,
#sidebar-history .history-chat-btn .nav-text {
  font-size: 0.91rem !important;
  font-weight: 385 !important;
  letter-spacing: 0 !important;
}

#sidebar-history .history-chat-btn.active .nav-text {
  font-weight: 430 !important;
}

#sidebar .material-symbols-rounded,
.top-utility-icon-btn .material-symbols-rounded,
.response-action-btn .material-symbols-rounded,
.user-copy-btn .material-symbols-rounded,
.btn-action-plus .material-symbols-rounded,
.mic-btn .material-symbols-rounded,
.model-picker-arrow {
  font-variation-settings:
    "FILL" 0,
    "wght" 360,
    "GRAD" 0,
    "opsz" 24 !important;
}

.header-bar {
  height: 50px !important;
  padding: 0 18px 0 14px !important;
  background: rgba(255, 255, 255, 0.88) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.045) !important;
  backdrop-filter: blur(16px);
}

.header-model-picker .model-picker-btn {
  height: 34px !important;
  padding: 0 7px 0 2px !important;
  border-radius: 8px !important;
  color: #232323 !important;
}

.header-model-picker #selectedModelLabel,
.header-model-picker #selectedProviderLabel {
  font-size: 1rem !important;
  font-weight: 430 !important;
  letter-spacing: -0.005em !important;
}

.welcome-title,
.empty-state-title,
.composer-centered-title,
.greeting-title {
  color: #151515 !important;
  font-weight: 420 !important;
  letter-spacing: -0.015em !important;
}

#chat-scroller {
  background: #ffffff !important;
  padding-top: 36px !important;
}

#chat-container {
  max-width: 804px !important;
  padding: 0 22px !important;
}

.message {
  margin-bottom: 26px !important;
}

.ai-bubble {
  max-width: min(100%, 764px) !important;
  color: #1f2328 !important;
  font-size: 0.985rem !important;
  line-height: 1.62 !important;
  padding: 0 8px 2px !important;
}

.ai-bubble p,
.ai-bubble li {
  line-height: 1.62 !important;
}

.user-message {
  padding-bottom: 26px !important;
}

.user-bubble {
  max-width: min(76%, 620px) !important;
  padding: 9px 14px !important;
  border-radius: 18px !important;
  background: #f1f1f2 !important;
  color: #171717 !important;
  box-shadow: none !important;
  font-size: 0.965rem !important;
  line-height: 1.48 !important;
}

.user-response-actions {
  right: 0 !important;
  bottom: 0 !important;
  transform: translateY(28px) !important;
  gap: 4px !important;
}

.response-actions {
  gap: 8px !important;
  margin-top: 9px !important;
}

.response-action-btn,
.user-copy-btn {
  width: 28px !important;
  height: 28px !important;
  border-radius: 8px !important;
  color: #62666c !important;
}

.response-action-btn:hover,
.user-copy-btn:hover {
  background: rgba(0, 0, 0, 0.055) !important;
  color: #171717 !important;
}

.response-action-btn .material-symbols-rounded,
.user-copy-btn .material-symbols-rounded {
  font-size: 21px !important;
  line-height: 1 !important;
}

.input-region {
  padding: 0 24px 14px !important;
  background: linear-gradient(to top, #ffffff 78%, rgba(255, 255, 255, 0)) !important;
}

body:not(.composer-centered) .input-region {
  bottom: 0 !important;
}

.composer {
  max-width: min(764px, calc(100vw - 52px)) !important;
  min-height: 56px !important;
  border-radius: 28px !important;
  border: 1px solid rgba(0, 0, 0, 0.115) !important;
  background: #ffffff !important;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.055),
    0 16px 42px rgba(0, 0, 0, 0.06) !important;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease !important;
}

.composer:hover {
  border-color: rgba(0, 0, 0, 0.15) !important;
}

.composer,
.composer:focus,
.composer:focus-visible,
.composer:focus-within,
#userInput,
#userInput:focus,
#userInput:focus-visible {
  outline: 0 !important;
}

.composer:focus-within {
  border-color: rgba(0, 0, 0, 0.16) !important;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 18px 46px rgba(0, 0, 0, 0.07) !important;
}

.composer-body {
  min-height: 56px !important;
  padding: 0 12px !important;
}

#userInput {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  color: #171717 !important;
  font-size: 0.985rem !important;
  font-weight: 390 !important;
}

#userInput::placeholder {
  color: #8b9097 !important;
}

.btn-action-plus,
.mic-btn,
.model-picker-btn {
  color: #5f6368 !important;
}

.btn-action-plus:hover,
.mic-btn:hover,
.model-picker-btn:hover {
  color: #171717 !important;
  background: rgba(0, 0, 0, 0.055) !important;
}

body.guest-auth-shell .composer {
  max-width: min(820px, calc(100vw - 52px)) !important;
  min-height: 56px !important;
}

body.guest-auth-shell #sendBtn.record-idle {
  width: 92px !important;
  padding: 0 14px 0 12px !important;
  border-radius: 22px !important;
}

body.member-auth-shell .composer {
  max-width: min(764px, calc(100vw - 52px)) !important;
  min-height: 50px !important;
  border-radius: 25px !important;
}

body.member-auth-shell .composer-body {
  min-height: 50px !important;
}

body.member-auth-shell #sendBtn,
body.member-auth-shell .mic-btn {
  width: 34px !important;
  height: 34px !important;
}

body.member-auth-shell .composer-right-actions .model-picker-btn {
  height: 32px !important;
  padding: 0 5px 0 8px !important;
  font-size: 0.94rem !important;
  font-weight: 390 !important;
}

body.incognito-mode .composer {
  background: #202020 !important;
  border-color: #202020 !important;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.08) !important;
}

body.incognito-mode #userInput {
  color: #eeeeee !important;
}

body.incognito-mode #userInput::placeholder,
body.incognito-mode .model-picker-btn,
body.incognito-mode .mic-btn {
  color: #c1c1c1 !important;
}

body.incognito-mode #sendBtn.ready,
body.incognito-mode #sendBtn.record-idle {
  background: #3b3b3b !important;
  color: #8e8e8e !important;
}

.model-picker-menu,
.chat-menu,
.response-more-menu {
  border: 1px solid rgba(0, 0, 0, 0.09) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.13) !important;
  backdrop-filter: blur(18px);
}

.model-picker-item,
.chat-menu-item,
.response-more-menu button {
  min-height: 36px !important;
  border-radius: 9px !important;
  font-weight: 390 !important;
}

.model-picker-item:hover,
.chat-menu-item:hover,
.response-more-menu button:hover {
  background: rgba(0, 0, 0, 0.055) !important;
}

.user-message-has-image .user-bubble {
  background: transparent !important;
  border-radius: 0 !important;
}

.user-attachment-frame {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.user-bubble-image-with-text .user-attachment-caption {
  background: rgba(241, 241, 242, 0.92) !important;
  border-radius: 16px 16px 6px 6px !important;
}

@media (max-width: 768px) {
  .header-bar {
    padding: 0 12px !important;
  }

  #chat-container {
    padding: 0 14px !important;
  }

  .input-region {
    padding: 0 12px 12px !important;
  }

  .composer,
  body.guest-auth-shell .composer,
  body.member-auth-shell .composer {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
  }

  .user-bubble {
    max-width: 88% !important;
  }
}

/* New-user first run hook: useful reasons to stay without turning chat into a landing page. */
.first-run-hook {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 18px);
  transform: translateX(-50%);
  width: min(760px, calc(100vw - 56px));
  display: none;
  gap: 10px;
  justify-items: center;
  text-align: center;
  pointer-events: auto;
}

body.guest-auth-shell.composer-centered:not(.temporary-chat-mode):not(.chat-has-user-turn) .first-run-hook {
  display: grid;
}

body.guest-auth-shell.composer-centered:not(.temporary-chat-mode):not(.chat-has-user-turn) .idle-composer-brand {
  bottom: calc(100% + 112px) !important;
}

.first-run-hook p {
  max-width: 620px;
  margin: 0;
  color: #666b73;
  font-size: 0.95rem;
  font-weight: 390;
  line-height: 1.42;
}

.first-run-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.first-run-actions button {
  min-height: 34px;
  border: 1px solid rgba(0, 0, 0, 0.105);
  border-radius: 999px;
  background: #ffffff;
  color: #25272b;
  padding: 0 13px;
  font-size: 0.88rem;
  font-weight: 430;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.035);
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}

.first-run-actions button:hover {
  background: #f6f6f7;
  border-color: rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
}

@media (max-width: 620px) {
  .first-run-hook {
    bottom: calc(100% + 14px);
    width: calc(100vw - 28px);
  }

  body.guest-auth-shell.composer-centered:not(.temporary-chat-mode):not(.chat-has-user-turn) .idle-composer-brand {
    bottom: calc(100% + 140px) !important;
  }

  .first-run-hook p {
    font-size: 0.88rem;
  }

  .first-run-actions {
    gap: 6px;
  }

  .first-run-actions button {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.82rem;
  }
}

/* ChatGPT-like empty chat refinement. Keep ZexirAI identity, copy the calm shell. */
body.composer-centered:not(.temporary-chat-mode) .idle-composer-brand {
  bottom: calc(100% + 36px) !important;
}

.idle-composer-brand.idle-brand-message-only {
  width: min(90vw, 760px) !important;
}

.idle-brand-text.idle-brand-greeting,
.idle-brand-greeting {
  color: #111111 !important;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem) !important;
  font-weight: 390 !important;
  letter-spacing: -0.012em !important;
}

body.composer-centered .input-region {
  top: calc(50% - 8px) !important;
}

body.guest-auth-shell.composer-centered:not(.temporary-chat-mode):not(.chat-has-user-turn) .idle-composer-brand {
  bottom: calc(100% + 42px) !important;
}

.first-run-hook {
  top: calc(100% + 18px) !important;
  bottom: auto !important;
  width: min(650px, calc(100vw - 56px)) !important;
}

.first-run-hook p {
  display: none !important;
}

.first-run-actions {
  gap: 9px !important;
}

.first-run-actions button {
  min-height: 39px !important;
  padding: 0 15px !important;
  border-color: rgba(0, 0, 0, 0.095) !important;
  background: #ffffff !important;
  color: #8b9097 !important;
  box-shadow: none !important;
  font-size: 0.91rem !important;
  font-weight: 430 !important;
}

.first-run-actions button .material-symbols-rounded {
  color: #9aa0a6 !important;
  font-size: 20px !important;
  font-variation-settings:
    "FILL" 0,
    "wght" 340,
    "GRAD" 0,
    "opsz" 24 !important;
}

.first-run-actions button:hover {
  background: #f7f7f8 !important;
  color: #5f6368 !important;
  transform: none !important;
}

body.composer-centered .composer {
  max-width: min(790px, calc(100vw - 52px)) !important;
}

@media (max-width: 620px) {
  body.composer-centered .input-region {
    top: calc(56% - 10px) !important;
  }

  .first-run-hook {
    top: calc(100% + 13px) !important;
    width: calc(100vw - 24px) !important;
  }

  .first-run-actions {
    gap: 6px !important;
  }

  .first-run-actions button {
    min-height: 34px !important;
    padding: 0 10px !important;
    font-size: 0.82rem !important;
  }
}

/* Remove the stray top divider and make sidebar collapse feel animated. */
.header-bar {
  border-bottom: 0 !important;
  box-shadow: none !important;
}

#sidebar {
  overflow: hidden !important;
  transition:
    width 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    min-width 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.2s ease !important;
  will-change: width;
}

#sidebar.sidebar-width-animating {
  pointer-events: none;
}

#sidebar.sidebar-closing,
#sidebar.collapsed {
  width: var(--sidebar-mini) !important;
  min-width: var(--sidebar-mini) !important;
}

#sidebar.sidebar-opening {
  width: var(--sidebar-w) !important;
  min-width: var(--sidebar-w) !important;
}

#sidebar .sidebar-brand-btn,
#sidebar .nav-link,
#sidebar .history-label,
#sidebar .sidebar-history-scroll,
#sidebar .sidebar-login-box,
#sidebar .sidebar-bottom .nav-text,
#sidebar .sidebar-more-panel,
#sidebar .sidebar-user-menu-wrap {
  transition:
    opacity 0.16s ease,
    transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

#sidebar.sidebar-closing .nav-text,
#sidebar.sidebar-closing .history-label,
#sidebar.sidebar-closing .sidebar-history-scroll,
#sidebar.sidebar-closing .sidebar-login-box,
#sidebar.sidebar-closing .sidebar-more-panel {
  opacity: 0 !important;
  transform: translateX(-8px) !important;
}

#sidebar.sidebar-opening .nav-text,
#sidebar.sidebar-opening .history-label,
#sidebar.sidebar-opening .sidebar-history-scroll,
#sidebar.sidebar-opening .sidebar-login-box,
#sidebar.sidebar-opening .sidebar-more-panel {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

@media (prefers-reduced-motion: reduce) {
  #sidebar,
  #sidebar * {
    transition: none !important;
  }
}
