#chatScreen,
#chatsScreen,
#archivedChatsScreen {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: none;
}

#chatScreen.active,
#chatsScreen.active,
#archivedChatsScreen.active {
  opacity: 1;
}



.chat-item {
  padding: 18px 20px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.chat-item:active {
  transform: scale(0.98);
}

.chat-item.active {
  font-weight: 600;
}

.chat-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-title-input {
  flex: 1;
  height: 36px;
  border-radius: 999px;
  padding: 0 14px;
  font-size: 15px;
  border: none;
  background-color: transparent;
  outline: none;
}

.chat-more-btn {
  background-color: transparent;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-more-btn .material-symbols-outlined {
  font-size: 22px;
}

.chat-item.pinned {
  background: rgba(239, 68, 68, 0.08);
}


.chatlist-items .chat-item {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  padding: 10px 4px;
}

.chatlist-items .chat-item:last-child {
  border-bottom: none;
}

.chatlist-items .chat-item.pinned {
  background: rgba(239, 68, 68, 0.06);
}

body.light-mode .chatlist-items .chat-item {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .chatlist-items .chat-item.pinned {
  background: rgba(239, 68, 68, 0.06);
}

body.light-mode .chatlist-items .chat-item .chat-more-btn {
  background: transparent;
  border: none;
}



.chat-header-actions {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  right: 14px;
  display: flex;
  gap: 8px;
  z-index: 100002;
  pointer-events: auto;
}

.chat-header-icon-btn {
  width: 45px;
  height: 45px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  pointer-events: auto;
  transition: transform 0.15s ease;
}

.chat-header-icon-btn:active {
  transform: scale(0.92);
}


.chat-header-left-btn {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  left: 14px;
  z-index: 100002;
}

.chat-header-icon-btn .material-symbols-outlined {
  font-size: 24px;
}

.chatgpt-body {
  position: fixed;
  inset: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}


.chat-find-bar {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 60px);
  left: 14px;
  right: 14px;
  z-index: 100001;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 6px 6px 14px;
  border-radius: 999px;
  background: rgba(176, 5, 5, 0.303);
  border: 1px solid rgba(239, 68, 68, 0.35);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-sizing: border-box;
}

body.light-mode .chat-find-bar {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.chat-find-bar-icon {
  font-size: 20px;
  opacity: 0.75;
  flex-shrink: 0;
  color: inherit;
}

.chat-find-input {
  flex: 1;
  min-width: 0;
  height: 34px;
  border: none;
  background: transparent;
  outline: none;
  font-size: 15px;
  color: inherit;
}

.chat-find-input::placeholder {
  color: rgba(239, 68, 68, 0.55);
  opacity: 1;
}

.chat-find-count {
  font-size: 13px;
  opacity: 0.7;
  flex-shrink: 0;
  min-width: 32px;
  text-align: center;
}

.chat-find-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.chat-find-nav-btn:active {
  background: rgba(239, 68, 68, 0.16);
}

.chat-find-nav-btn .material-symbols-outlined {
  font-size: 20px;
}

.chatgpt-messages.chat-find-active {
  padding-top: calc(env(safe-area-inset-top, 0px) + 130px);
}

mark.chat-find-hit {
  background: rgba(239, 68, 68, 0.35);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}

mark.chat-find-hit.active {
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
}


.chatlist-row {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  margin-top: 6px;
  border: none;
  border-radius: 50px;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.chatlist-row .material-symbols-outlined {
  font-size: 22px;
  color: #ff5b5b;
  flex-shrink: 0;
}

.chatlist-row-primary {
  background: rgba(239, 68, 68, 0.14);
}

.chatlist-row-danger {
  color: #fff;
}

.chatlist-row-danger .material-symbols-outlined {
  color: #ff6b6b;
}

.chatlist-usage-row {
  cursor: default;
  align-items: center;
  border-radius: 20px;
}

.chatlist-usage-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chatlist-usage-toprow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.chatlist-usage-toprow #usageStatusText {
  font-size: 15px;
  font-weight: 500;
}

.chatlist-usage-toprow #usageStatusReset {
  font-size: 12px;
  opacity: 0.6;
  font-weight: 400;
  white-space: nowrap;
}

.chatlist-usage-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

body.light-mode .chatlist-usage-track {
  background: rgba(0, 0, 0, 0.1);
}

.chatlist-usage-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: #ff5b5b;
  transition: width 0.3s ease;
}

.chatlist-usage-fill.usage-status-limit {
  background: #b91c1c;
}

.chatlist-section-label {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.55;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 40px 6px 4px;
}

.chatgpt-messages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: calc(env(safe-area-inset-top, 0px) + 120px) 14px 260px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chatgpt-composer {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 118px);
  left: 0;
  right: 0;
  padding-bottom: 0;
  background-color: transparent;
  z-index: 100001;
  pointer-events: auto;
}

.chatgpt-disclaimer {
  text-align: center;
  font-size: 11px;
  opacity: 0.45;
  padding: 6px 20px 0;
}

.chatgpt-input-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  width: auto;
  margin: 0 20px;
  padding: 10px 10px 10px 10px;
  box-sizing: border-box;
}

.chatgpt-pill {
  border-radius: 50px;
  background: rgba(176, 5, 5, 0.303);
  border: 1px solid rgba(239, 68, 68, 0.35);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
}

body.light-mode .chatgpt-pill {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.chatgpt-input {
  flex: 1;
  min-height: 40px;
  max-height: 140px;
  height: 40px;
  padding: 9px 6px;
  border-radius: 0;
  background: transparent;
  border: none;
  font-size: 14px;
  line-height: 1.4;
  color: inherit;
  resize: none;
  overflow-y: auto;
  box-sizing: border-box;
}

.chatgpt-input::placeholder {
  color: rgba(239, 68, 68, 0.55);
  opacity: 1;
}

.chatgpt-input:focus {
  outline: none;
}


.chatgpt-send {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  margin-bottom: 5px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.85);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}

.chatgpt-send:active {
  transform: scale(0.92);
}

.chatgpt-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chatgpt-send.recording {
  background: rgba(239, 68, 68, 0.5);
  animation: micPulse 1.2s infinite;
}

.chatgpt-icon-btn.recording {
  background: rgba(239, 68, 68, 0.35);
  color: #ff5b5b;
  animation: micPulse 1.2s infinite;
}

.chat-message {
  padding: 14px 18px;
  border-radius: 24px;
  word-wrap: break-word;
  word-break: break-word;
  line-height: 1.6;

  font-size: 15px;
  max-width: 85%;
}

.chat-user {
  align-self: flex-end;
  background-color: rgba(239, 68, 68, 0.62);
  border-bottom-right-radius: 6px;
}



.chat-empty {
  position: static;
  margin: 0 auto;
  width: 100%;
  min-height: 100%;
  opacity: 0;
  text-align: center;
  padding: 30px 20px 10px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
  animation: bounceIn 1s ease forwards;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: translateY(-50px);
  }

  50% {
    transform: translateY(10px);
  }

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

.chat-empty .material-symbols-outlined {
  animation: rotateIn 0.8s ease forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

@keyframes rotateIn {
  0% {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
  }

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

.chat-empty .material-symbols-outlined {
  font-size: 80px;
  margin-bottom: 16px;
}

.empty-title {
  font-size: 22px;
  font-weight: 600;
  margin: 4px 0;
}

.empty-subtitle {
  font-size: 16px;
  margin: 2px 0;
}



.chatlist-body {
  position: fixed;
  inset: 0;
  padding-left: 14px;
  padding-right: 14px;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 100px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-sizing: border-box;
}


.chatlist-items {
  display: flex;
  margin-top: 10px;
  flex-direction: column;
  gap: 0;
}

.chatlist-empty {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 15px;
  opacity: 0.5;
  text-align: center;
  white-space: nowrap;
}

.chat-item {
  padding: 18px 20px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s ease;
}

.chat-item:active {
  transform: scale(0.98);
}

.chat-item.active {
  font-weight: 600;
}

body.chat-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}








#emptyImage {
  width: 150px;
  height: 150px;
}


.chat-ai {
  line-height: 1.7;
}

.chat-ai .ai-heading {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #ef4444;
  margin: 16px 0 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(239, 68, 68, 0.2);
}

.chat-ai .ai-heading:first-child {
  margin-top: 0;
}

.chat-ai strong {
  font-weight: 700;
}

.chat-ai em {
  font-style: italic;
  opacity: 0.8;
}

.chat-ai p {
  margin: 0 0 9px;
}

.chat-ai p:last-child {
  margin-bottom: 0;
}

.chat-ai ul,
.chat-ai ol {
  margin: 6px 0 10px;
  padding-left: 20px;
}

.chat-ai li {
  margin-bottom: 5px;
}

.chat-ai .ai-hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 12px 0;
}

.chat-ai .ai-quote {
  border-left: 3px solid #ef4444;
  margin: 10px 0;
  padding: 8px 14px;
  background: rgba(239, 68, 68, 0.06);
  border-radius: 0 50px 50px 0;
  font-style: italic;
  color: inherit;
  opacity: 0.9;
}

.chat-ai .ai-table-wrap {
  overflow-x: auto;
  margin: 10px 0;
  border-radius: 8px;
}

.chat-ai .ai-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.chat-ai .ai-table th {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  font-weight: 700;
  padding: 8px 12px;
  text-align: left;
  border-bottom: 2px solid rgba(239, 68, 68, 0.25);
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.chat-ai .ai-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-ai .ai-table tr:last-child td {
  border-bottom: none;
}

.chat-ai .ai-summary {
  background: rgba(239, 68, 68, 0.19);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 50px;
  padding: 12px 16px;
  width: 100%;
  margin-top: 12px;
}

.chat-ai .ai-summary-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #ef4444;
  margin-bottom: 8px;
}

.chat-ai .ai-suggestions {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.chat-ai .ai-suggestions-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 8px;
}

.chat-ai .ai-suggest-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  padding: 9px 13px;
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 13px;
  color: inherit;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.chat-ai .ai-suggest-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
}

.chat-ai .ai-suggest-btn::before {
  content: "→ ";
  opacity: 0.4;
}


.chat-loading .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  opacity: 0.4;
  margin: 0 2px;
  animation: dotBounce 1.2s infinite;
}

.chat-loading .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-loading .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotBounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

.chat-message-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 100%;
}

.chat-user-wrap {
  justify-content: flex-end;
}

.chat-ai-wrap {
  justify-content: flex-start;
}

.chat-ai-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  margin-top: 2px;
  background: rgba(239, 68, 68, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-ai-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-ai-wrap .chat-ai {
  flex: 1;
  min-width: 0;
}

.chat-ai-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-ai-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
}

.chat-ai-action-btn .material-symbols-outlined {
  font-size: 15px;
}

.chat-ai-action-btn:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
}

.chat-ai-action-btn.speaking {
  opacity: 1;
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ff8a8a;
}

.chat-ai-feedback-btn.active {
  opacity: 1;
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ff8a8a;
}

.chat-ai-generated-image {
  max-width: 100%;
  width: 260px;
  border-radius: 18px;
  display: block;
}


#incognitoToggleBtn.active {
  background: rgba(239, 68, 68, 0.22);
  border: 1px solid rgba(239, 68, 68, 0.5);
}

.chat-header-more-wrap {
  position: relative;
  pointer-events: auto;
}

#chatHeaderMoreMenu.chat-header-more-menu {
  height: auto;
  left: auto;
  right: 0;
  bottom: auto;
  top: calc(100% + 8px);
}

#chatHeaderIncognitoOption.active {
  color: #ff8a8a;
}

.incognito-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  font-size: 12.5px;
  padding: 9px 14px;
  margin: 0 14px 8px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 50px;
  color: inherit;
}

.incognito-banner .material-symbols-outlined {
  font-size: 16px;
}

.chatgpt-icon-btn {
  width: 45px;
  height: 45px;
  min-width: 45px;
  margin-bottom: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: inherit;
}


.chatgpt-icon-btn:active {
  transform: scale(0.92);
}

.chatgpt-icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.chat-plus-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 100010;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.chat-plus-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.chat-plus-sheet {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  z-index: 100011;
  background: #2a0d0d;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  transform: translate(-50%, 100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.4);
}

.chat-plus-sheet.open {
  transform: translate(-50%, 0);
}

body.light-mode .chat-plus-sheet {
  background: #ffffff;
  border-color: rgba(239, 68, 68, 0.25);
}

.chat-plus-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  margin: 4px auto 18px;
}

body.light-mode .chat-plus-sheet-handle {
  background: rgba(0, 0, 0, 0.2);
}

.chat-plus-sheet-row {
  display: flex;
  gap: 14px;
}

.chat-plus-sheet-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  padding: 4px;
}

.chat-plus-sheet-icon {
  width: 100%;
  aspect-ratio: 1.15 / 1;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.chat-plus-sheet-item:active .chat-plus-sheet-icon {
  background: rgba(239, 68, 68, 0.3);
  transform: scale(0.95);
}

.chat-plus-sheet-icon .material-symbols-outlined {
  font-size: 30px;
  color: #ef4444;
}

.chat-plus-sheet-label {
  font-size: 13px;
  font-weight: 500;
}




.chat-plus-menu {
  min-height: 220px;
  height: auto;
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  flex-direction: column;
  gap: 3px;
  min-width: 200px;
  padding: 8px;
  border-radius: 20px;
  background: rgb(129, 18, 18);
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 100003;
}

body.light-mode .chat-plus-menu {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chat-plus-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 13px;
  border-radius: 13px;
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.chat-plus-menu-item:hover,
.chat-plus-menu-item:active {
  background: rgba(239, 68, 68, 0.16);
}

.chat-plus-menu-item .material-symbols-outlined {
  font-size: 19px;
  opacity: 0.8;
  flex-shrink: 0;
}


.hadi-model-wrap {
  position: relative;
  display: flex;
  justify-content: flex-start;
  pointer-events: auto;
}

.hadi-model-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 8px;
}

.hadi-model-btn .title {
  margin: 0;
}

.hadi-model-label {
  color: #ad0e0eff;
  font-size: 12px;
  opacity: 0.80;
  font-weight: 500;
}

.hadi-model-chevron {
  font-size: 18px;
  opacity: 0.6;
}

.hadi-model-menu {
  left: 50%;
  transform: translateX(-50%);
  bottom: auto;
  top: calc(100% + 8px);
  min-width: 220px;
}

.hadi-model-option {
  justify-content: space-between;
}

.hadi-model-option-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.hadi-model-option-title {
  font-size: 14px;
  font-weight: 600;
}

.hadi-model-option-sub {
  font-size: 11.5px;
  opacity: 0.55;
}

.hadi-model-check {
  font-size: 18px;
  opacity: 0;
  color: #ef4444;
}

.hadi-model-option.active .hadi-model-check {
  opacity: 1;
}

.chat-item-menu {
  position: fixed;
  display: none;
}


#chatItemMenu {
  z-index: 1000001;
}

.chat-plus-menu-item.danger {
  color: #ff6b6b;
  margin-top: 3px;
  padding-top: 12px;
  border-top: 1px solid rgba(239, 68, 68, 0.16);
  border-radius: 0 0 13px 13px;
}

.chat-plus-menu-item.danger .material-symbols-outlined {
  opacity: 1;
}

@keyframes micPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
}

.chat-image-preview-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  margin-bottom: 6px;
}

.chat-image-preview-row img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#removeImagePreviewBtn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: inherit;
}

#removeImagePreviewBtn .material-symbols-outlined {
  font-size: 16px;
}

@media (max-width: 380px) {
  .chat-header-icon-btn {
    width: 40px;
    height: 40px;
  }
}

.image-library-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px 0 24px 0;
}

.image-library-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
}

.image-library-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.image-library-viewer.open {
  display: flex;
}

.image-library-viewer img {
  max-width: 92vw;
  max-height: 85vh;
  border-radius: 10px;
}

.image-library-viewer-close {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 16px);
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
