:root {
  --brand: #111111;
  --brand-soft: #f1f1f1;
  --border: #e8e8ee;
  --shadow-sm: 0 1px 2px rgba(15,15,30,0.04);
  --shadow-brand: 0 4px 14px rgba(91,77,255,0.28);
}

body { letter-spacing: -0.011em; font-size: 16px; }

.brand-mark {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, #222222, #111111);
  color: #fff; display: grid; place-items: center;
  font-size: 15px; font-weight: 700; box-shadow: var(--shadow-brand);
}

.icon-btn {
  width: 40px; height: 40px; min-width: 40px; min-height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #52525b; border: none; background: transparent; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: #f0f0f4; color: #18181b; }
.icon-btn svg { width: 20px; height: 20px; }

.seg {
  display: inline-flex; background: #ececf1; border-radius: 12px; padding: 3px; gap: 2px;
}
.seg-btn {
  height: 32px; padding: 0 14px; border-radius: 9px; font-size: 13px; font-weight: 500;
  color: #71717a; display: inline-flex; align-items: center; gap: 6px;
  border: none; background: transparent; cursor: pointer; transition: all 0.15s;
}
.seg-btn:hover { color: #18181b; }
.seg-btn.active {
  background: #fff; color: #18181b;
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(0,0,0,0.03);
}

.select-wrap {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer;
  max-width: 260px; transition: border-color 0.15s, box-shadow 0.15s;
}
.select-wrap:focus-within {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91,77,255,0.12);
}
.select-wrap select {
  appearance: none; background: transparent; outline: none;
  font-size: 13px; font-weight: 500; color: #27272a; cursor: pointer; min-width: 0;
}

.send-btn {
  width: 42px; height: 42px; min-width: 42px; min-height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, #222222, #111111, #000000);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; box-shadow: var(--shadow-brand);
  transition: transform 0.12s, box-shadow 0.15s;
}
.send-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(91,77,255,0.4); }
.send-btn:disabled { background: #e4e4e7; color: #a1a1aa; cursor: not-allowed; box-shadow: none; }

.thin-scroll::-webkit-scrollbar, #scroller::-webkit-scrollbar { width: 6px; }
.thin-scroll::-webkit-scrollbar-thumb, #scroller::-webkit-scrollbar-thumb {
  background: #dcdce3; border-radius: 8px;
}

.chat-item {
  width: 100%; text-align: left; padding: 8px 12px; border-radius: 10px;
  font-size: 13px; color: #52525b; border: none; background: transparent; cursor: pointer;
  display: flex; align-items: center; gap: 8px; transition: background 0.15s;
}
.chat-item:hover { background: #f0f0f4; }
.chat-item.active { background: var(--brand-soft); color: var(--brand); }
.chat-item .title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item .del { opacity: 0; padding: 2px; border-radius: 6px; color: #a1a1aa; }
.chat-item:hover .del { opacity: 1; }
.chat-item .del:hover { background: #fee2e2; color: #dc2626; }

.message { display: flex; gap: 12px; margin-bottom: 18px; }
.message.user { flex-direction: row-reverse; }
.message.user.no-avatar { gap: 0; }
.msg-avatar {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0; margin-top: 2px;
}
.msg-avatar.bot { background: linear-gradient(135deg, #222222, #111111); color: #fff; }
.msg-avatar.user { background: #e4e4e7; color: #52525b; }
.msg-avatar.aura-label {
  width: auto; min-width: 0; height: auto; padding: 4px 10px;
  border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  background: rgba(0, 0, 0, 0.08); color: #111111;
  border: 1px solid rgba(91, 77, 255, 0.18); margin-top: 6px;
  backdrop-filter: blur(6px);
}
.msg-body {
  background: #fff; border: 1px solid #e8e8ee; border-radius: 16px;
  padding: 12px 16px; font-size: 15px; line-height: 1.55; max-width: 85%;
  box-shadow: var(--shadow-sm);
}
.message.user .msg-body { background: var(--brand); border-color: transparent; color: #fff; max-width: 90%; }
.message.user.no-avatar .msg-body { max-width: 92%; }
.msg-body p { margin: 0 0 0.5em; }
.msg-body p:last-child { margin: 0; }
.msg-body pre {
  background: #f4f4f5; border-radius: 8px; padding: 10px 12px; overflow-x: auto;
  font-size: 13px; margin: 8px 0;
}
.msg-body code { font-family: ui-monospace, monospace; font-size: 0.9em; }
.msg-body ul, .msg-body ol { margin: 0.4em 0; padding-left: 1.3em; }

.typing .msg-body { display: flex; gap: 5px; align-items: center; padding: 16px 20px; min-width: 60px; }
.typing span {
  width: 7px; height: 7px; background: #a1a1aa; border-radius: 50%;
  animation: bounce 1.2s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

.sug-card {
  text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid #e8e8ee;
  background: #fff; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s;
}
.sug-card:hover { border-color: #d4d4d4; box-shadow: 0 4px 16px rgba(91,77,255,0.08); }
.sug-card .t { font-size: 13px; font-weight: 600; color: #18181b; margin-bottom: 2px; }
.sug-card .d { font-size: 12px; color: #71717a; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

#imageResult img { width: 100%; max-height: 520px; object-fit: contain; display: block; }
.image-actions {
  display: flex; gap: 10px; padding: 12px; justify-content: center; border-top: 1px solid #f0f0f4;
}
.image-actions a, .image-actions button {
  height: 36px; padding: 0 16px; border-radius: 10px; font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; background: #f4f4f5; color: #3f3f46;
  border: none; cursor: pointer; text-decoration: none;
}
.image-actions a:hover, .image-actions button:hover { background: #e4e4e7; }

.hidden { display: none !important; }
#aboutModal:not(.hidden) { display: flex !important; }

@media (max-width: 767px) {
  #sidebar.open { transform: translateX(0); }
}

/* Chat-first creation tools */
.attachment-chip { display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border:1px solid #e4e4e7; border-radius:10px; background:#fafafa; color:#52525b; font-size:12px; }
.attachment-chip button { font-size:17px; line-height:1; color:#a1a1aa; }
.chat-generated-image { display:block; max-width:min(100%,560px); max-height:620px; object-fit:contain; border-radius:12px; }
.chat-download { display:inline-flex; margin-top:10px; padding:7px 12px; border-radius:9px; background:#f4f4f5; color:#3f3f46; font-size:12px; text-decoration:none; }


/* Punjab AI mobile-first refinement */
html, body { min-height: 100%; overscroll-behavior: none; }
button, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(91,77,255,.22); outline-offset: 2px; }
.google-primary { border: 1px solid #e4e4e7; box-shadow: 0 8px 24px rgba(24,24,27,.08), inset 0 1px 0 #fff; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.google-primary:hover { border-color: #d4d4d4; box-shadow: 0 12px 28px rgba(91,77,255,.14); transform: translateY(-1px); }
.google-primary:active { transform: scale(.985); }
.google-primary:disabled { opacity: .65; cursor: wait; }
.auth-card { isolation: isolate; }
.auth-glow { position:absolute; width:230px; height:180px; border-radius:50%; background:radial-gradient(circle,rgba(109,93,255,.13),transparent 70%); top:-100px; left:calc(50% - 115px); z-index:-1; pointer-events:none; }
#composer textarea { line-height:1.5; }
#imageResult { flex-direction:column; }
#chatInput { min-height:46px; }
/* Prevent horizontal scroll */
html, body, #app, main { overflow-x: hidden; max-width: 100vw; }
img, video, iframe, embed { max-width: 100%; height: auto; }

@media (max-width: 767px) {
  #app { min-height:100dvh; height:100dvh; }
  #sidebar { width:min(86vw,320px); padding-bottom:env(safe-area-inset-bottom); }
  header { height:58px; min-height:58px; padding-left:10px; padding-right:10px; gap:5px; }
  .seg { max-width:calc(100vw - 120px); overflow-x:auto; scrollbar-width:none; }
  .seg::-webkit-scrollbar { display:none; }
  .seg-btn { height:40px; min-height:40px; padding:0 12px; font-size:13px; white-space:nowrap; }
  .seg-btn svg { width:16px; height:16px; }
  #loginBtn { height:40px; min-height:40px; padding:0 12px; font-size:13px; white-space:nowrap; }
  #messages { padding:18px 12px 22px; }
  .message { gap:8px; margin-bottom:14px; }
  .msg-avatar { width:32px; height:32px; border-radius:9px; }
  .msg-body { max-width:calc(100% - 40px); padding:12px 14px; font-size:16px; border-radius:14px; overflow-wrap:anywhere; }
  .msg-body pre { max-width:100%; white-space:pre-wrap; overflow-wrap:anywhere; }
  #view-chat > .shrink-0 { padding:6px 10px calc(10px + env(safe-area-inset-bottom)); }
  #composer { border-radius:18px; }
  #chatInput { font-size:16px; padding:12px 13px 7px; min-height:48px; }
  .icon-btn { width:44px; height:44px; min-width:44px; min-height:44px; }
  .send-btn { width:44px; height:44px; min-width:44px; min-height:44px; }
  #view-image > div, #view-pricing > div { padding:22px 13px calc(24px + env(safe-area-inset-bottom)); }
  #view-image .bg-white { padding:16px; border-radius:18px; }
  #imageResult { min-height:220px; border-radius:18px; }
  #imageResult img { max-height:68vh; width:100%; object-fit:contain; }
  #authModal { align-items:flex-end; padding:12px 12px calc(12px + env(safe-area-inset-bottom)); }
  #authModal .auth-card { max-width:480px; border-radius:26px; padding:25px 21px 24px; }
  #authModal .auth-card .brand-mark { width:42px; height:42px; border-radius:14px; }
  .chat-item { min-height:44px; }
  #newChatBtn, #clearHistoryBtn, #aboutBtn { min-height:44px; }
  #generateImageBtn { min-height:48px; }
  .image-sug { min-height:36px; }
  select, #imageStyle, #imageAspect { min-height:44px; font-size:16px; }
}
@media (max-width: 380px) {
  .seg-btn { padding:0 8px; gap:4px; }
  #loginBtn span { max-width:54px; overflow:hidden; text-overflow:ellipsis; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior:auto !important; animation-duration:.01ms !important; transition-duration:.01ms !important; } }

.chat-copy { display:inline-flex; margin-top:10px; padding:6px 10px; border:1px solid #e4e4e7; border-radius:8px; background:#fafafa; color:#71717a; font-size:11px; font-weight:600; cursor:pointer; }
.chat-copy:hover { background:#f1f1f1; color:#000000; border-color:#d4d4d4; }

/* Optional dark theme, persisted per device */
body.aura-dark { background:#101116 !important; color:#f4f4f5 !important; }
body.aura-dark #app, body.aura-dark main { background:#101116 !important; }
body.aura-dark aside, body.aura-dark header, body.aura-dark #composer,
body.aura-dark .msg-body, body.aura-dark #view-image .bg-white,
body.aura-dark #view-pricing .bg-white, body.aura-dark #imageResult,
body.aura-dark #aboutModal .relative, body.aura-dark .auth-card {
  background:#191a23 !important; color:#f4f4f5 !important; border-color:#30313d !important;
}
body.aura-dark .seg { background:#252632 !important; }
body.aura-dark .seg-btn.active { background:#3a3b49 !important; color:#fff !important; }
body.aura-dark input, body.aura-dark textarea, body.aura-dark select { color:#f4f4f5 !important; }
body.aura-dark #composer textarea::placeholder, body.aura-dark input::placeholder { color:#9293a1 !important; }
body.aura-dark .icon-btn, body.aura-dark #loginBtn, body.aura-dark #exportChatBtn { color:#e4e4e7 !important; background:#242530 !important; border-color:#383947 !important; }
body.aura-dark .chat-item { color:#d4d4d8; }
body.aura-dark .chat-item:hover { background:#252632; }
body.aura-dark .sug-card { background:#20212b; border-color:#363746; }
body.aura-dark .sug-card .t { color:#f4f4f5; }
body.aura-dark .msg-body pre { background:#252632; color:#f4f4f5; }
body.aura-dark .border-zinc-100, body.aura-dark .border-zinc-200, body.aura-dark .border-zinc-200\/80 { border-color:#30313d !important; }
body.aura-dark .text-zinc-900, body.aura-dark .text-zinc-800, body.aura-dark .text-zinc-700,
body.aura-dark .text-zinc-600, body.aura-dark .text-zinc-500, body.aura-dark .text-zinc-400 { color:#c9cad4 !important; }
body.aura-dark h1, body.aura-dark h2, body.aura-dark h3 { color:#f4f4f5; }

/* ===== Enhanced polish & Private Mode ===== */
.private-toggle.active {
  background: #fef3c7 !important;
  color: #b45309 !important;
  border-color: #fcd34d !important;
}
body.private-mode .brand-mark {
  box-shadow: 0 0 0 2px #f59e0b, 0 4px 14px rgba(91,77,255,0.28);
}

.msg-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f4;
  flex-wrap: wrap;
}
.chat-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #71717a;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  min-height: 32px;
}
.chat-action:hover {
  background: #f4f4f5;
  color: #3f3f46;
}
.message.user .msg-actions {
  border-top-color: rgba(255,255,255,0.22);
}
.message.user .chat-action {
  color: rgba(255,255,255,0.9);
}
.message.user .chat-action:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.composer-inner { min-height: 52px; }
.composer-icon { opacity: 0.75; }
.composer-icon:hover { opacity: 1; }
body.aura-dark .msg-avatar.aura-label {
  background: rgba(109, 93, 255, 0.18);
  color: #d4d4d4;
  border-color: rgba(109, 93, 255, 0.28);
}

.typing-dots {
  display: flex;
  gap: 5px;
  align-items: center;
  min-height: 24px;
}
.typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a1a1aa;
  animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  color: #52525b;
}
.attachment-chip button {
  background: none;
  border: none;
  color: #a1a1aa;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}
.attachment-chip button:hover { color: #dc2626; }

.sug-card {
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #e8e8ee;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.sug-card:hover {
  border-color: #d4d4d4;
  box-shadow: 0 4px 16px rgba(91,77,255,0.1);
  transform: translateY(-1px);
}
.sug-card .t {
  font-size: 13px;
  font-weight: 600;
  color: #27272a;
  margin-bottom: 3px;
}
.sug-card .d {
  font-size: 12px;
  color: #71717a;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chat-generated-image {
  max-width: 100%;
  border-radius: 12px;
  margin-bottom: 8px;
  border: 1px solid #e8e8ee;
}
.chat-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--brand);
  text-decoration: none;
}
.chat-download:hover { text-decoration: underline; }

/* Dark mode refinements */
body.aura-dark {
  background: #0f0f14;
  color: #e4e4e7;
}
body.aura-dark #sidebar {
  background: #16161d;
  border-color: #27272f;
}
body.aura-dark main {
  background: #0f0f14;
}
body.aura-dark header {
  background: rgba(22,22,29,0.85);
  border-color: #27272f;
}
body.aura-dark .msg-body {
  background: #1c1c24;
  border-color: #2e2e38;
  color: #e4e4e7;
}
body.aura-dark .message.user .msg-body {
  background: var(--brand);
  color: #fff;
}
body.aura-dark .composer,
body.aura-dark #composer {
  background: #1c1c24 !important;
  border-color: #2e2e38 !important;
}
body.aura-dark .seg {
  background: #27272f;
}
body.aura-dark .seg-btn.active {
  background: #1c1c24;
  color: #fafafa;
}
body.aura-dark .sug-card {
  background: #1c1c24;
  border-color: #2e2e38;
}
body.aura-dark .sug-card .t { color: #f4f4f5; }
body.aura-dark .chat-item:hover { background: #27272f; }
body.aura-dark .chat-item.active { background: rgba(91,77,255,0.18); color: #a5a0ff; }
body.aura-dark .icon-btn:hover { background: #27272f; }
body.aura-dark .msg-actions { border-color: #2e2e38; }
body.aura-dark .chat-action:hover { background: #27272f; color: #e4e4e7; }
body.aura-dark input, body.aura-dark textarea, body.aura-dark select {
  color: #e4e4e7;
}
body.aura-dark .select-wrap {
  background: #1c1c24;
  border-color: #2e2e38;
}

/* Smooth transitions */
.message { animation: msgIn 0.25s ease-out; }
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

#sidebar.open { transform: translateX(0); }
@media (max-width: 767px) {
  #sidebar { transform: translateX(-100%); }
  #sidebar.open { transform: translateX(0); }
}


/* Stop generating button */
.stop-btn {
  width: 38px; height: 38px; border-radius: 12px;
  background: #ef4444; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  box-shadow: 0 4px 12px rgba(239,68,68,0.35);
  transition: transform 0.12s, box-shadow 0.15s;
}
.stop-btn:hover { transform: translateY(-1px); background: #dc2626; }
.stop-btn.hidden { display: none !important; }

.msg-actions.user-actions {
  justify-content: flex-end;
  border-top: none;
  margin-top: 6px;
  padding-top: 0;
}
.user-actions .chat-action {
  color: rgba(255,255,255,0.85);
}
.user-actions .chat-action:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* Code blocks with copy */
.code-block {
  position: relative;
  margin: 10px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e4e4e7;
  background: #fafafa;
}
.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: #f4f4f5;
  border-bottom: 1px solid #e4e4e7;
  font-size: 11px;
  color: #71717a;
}
.code-lang { font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.code-copy {
  font-size: 11px; font-weight: 600; color: #111111;
  background: transparent; border: none; cursor: pointer; padding: 2px 8px; border-radius: 6px;
}
.code-copy:hover { background: #efeefe; }
.code-block pre {
  margin: 0; padding: 12px 14px; background: #fafafa;
  overflow-x: auto; font-size: 13px; line-height: 1.5;
}
.code-block code { background: transparent; padding: 0; }

/* Streaming cursor */
.typing-inline {
  display: inline-block;
  animation: blink 1s step-end infinite;
  color: #111111;
  font-weight: 700;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* Drag over composer */
#composer.drag-over {
  border-color: #111111 !important;
  box-shadow: 0 0 0 4px rgba(91,77,255,0.15);
  background: #f8f7ff;
}

/* Reactions */
.reaction-btn.reacted { opacity: 0.7; }

/* Memory modal */
#memoryModal:not(.hidden) { display: flex !important; }

/* Professional simple light theme refinements */
body {
  background: #f8f8fb !important;
  color: #18181b !important;
}
header, aside, #composer, .msg-body, #imageResult, .auth-card {
  background: #fff !important;
}
.seg {
  background: #ececf1 !important;
}


/* Responsive accessibility and overflow safeguards */
html, body { min-height: 100%; max-width: 100%; overflow-x: clip; }
body { font-size: 16px; }
img, video, canvas, iframe, embed, object, svg { max-width: 100%; }
img, video { height: auto; }
textarea, input, select { font-size: 16px; }
#messages, .msg-body, .message, .code-block, pre, code {
  min-width: 0;
  max-width: 100%;
}
#messages { overflow-wrap: anywhere; }
.msg-body img, .msg-body video, .msg-body iframe { max-width: 100%; }
pre, .code-block pre { max-width: 100%; overflow-x: auto; }
.attachment-chip { max-width: 100%; overflow-wrap: anywhere; }
.attachment-chip button { min-width: 32px; min-height: 32px; }
#sidebar { max-width: min(280px, 88vw); }

@media (max-width: 767px) {
  button, [role="button"], input[type="button"], input[type="submit"], select {
    min-height: 44px;
  }
  .icon-btn { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
  .stop-btn, .send-btn { min-width: 44px; min-height: 44px; }
  #view-chat { min-width: 0; }
  #scroller { min-width: 0; }
  #messages { padding-left: 12px; padding-right: 12px; padding-top: 16px; }
  #view-chat > .shrink-0 { padding-left: 10px; padding-right: 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  header { padding-left: 8px !important; padding-right: 8px !important; gap: 6px !important; }
  header .seg { flex-shrink: 0; }
  header #loginBtn { min-width: 44px; padding-left: 9px; padding-right: 9px; }
  .composer-inner { gap: 0; padding-left: 5px; padding-right: 5px; }
  .composer-icon { flex: 0 0 44px; }
  #chatInput { min-width: 0; width: 100%; font-size: 16px !important; }
  .message { max-width: 100%; }
  .msg-body { overflow-wrap: anywhere; }
  .sug-card { min-width: 0; }
  .sug-card .t, .sug-card .d { font-size: 14px; }
}


/* Punjab AI monochrome theme */
:root{--brand:#111111;--brand-soft:#f1f1f1;--border:#dedede}
body{background:#f5f5f5!important;color:#111!important}
.brand-mark,.msg-avatar.bot{background:#09090b!important;color:#fff!important}
.send-btn{background:#09090b!important;color:#fff!important;box-shadow:none!important}
.send-btn:disabled{background:#dedede!important;color:#888!important}
.message.user .msg-body{background:#111!important;color:#fff!important}
.chat-item.active{background:#ededed!important;color:#111!important}
.sug-card:hover{border-color:#888!important;box-shadow:0 4px 16px rgba(0,0,0,.06)!important}
#composer:focus-within{border-color:#888!important;box-shadow:0 0 0 3px rgba(0,0,0,.06)!important}
.attach-menu-wrap{position:relative}
.attach-menu{position:absolute;bottom:48px;left:0;z-index:30;min-width:170px;padding:6px;background:#fff;border:1px solid #ddd;border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.12)}
.attach-menu button{display:flex;align-items:center;gap:9px;width:100%;padding:10px;border:0;border-radius:8px;background:transparent;color:#222;text-align:left;font-size:13px}
.attach-menu button:hover{background:#f1f1f1}
.attachment-chip{background:#f4f4f4!important;color:#111!important;border-color:#ddd!important;min-width:42px;justify-content:space-between}
.file-kind-icon{width:18px;height:18px;display:inline-block;vertical-align:middle;color:#222}
.attachment-icons{display:flex;gap:7px;margin-top:6px}
.attachment-icons .file-kind-icon{color:inherit}

/* Punjab AI monochrome visual refresh */
:root{--brand:#090909!important;--brand-soft:#f1f1f1!important;--border:#e5e5e5!important;--shadow-brand:0 4px 14px rgba(0,0,0,.12)!important}
body,#app{background:#f7f7f7!important;color:#171717!important}#sidebar{background:#fff!important;border-color:#e8e8e8!important}main{background:#f7f7f7!important}header{background:rgba(255,255,255,.94)!important;border-color:#e8e8e8!important}
.brand-mark,.send-btn,.upgrade-link,.image-composer button{background:#090909!important;color:#fff!important;box-shadow:none!important}.brand-mark{background:linear-gradient(145deg,#242424,#050505)!important}
.seg{background:#ededed!important}.seg-btn.active{background:#fff!important;color:#090909!important}
.message{gap:0!important;margin:0 0 24px!important}.message.bot{display:block!important}.message.bot .msg-avatar,.message.bot .aura-label{display:none!important}.message .msg-body{max-width:100%!important;box-shadow:none!important}
.message.bot .msg-body{background:transparent!important;border:0!important;padding:3px 0!important;color:#202020!important;line-height:1.72!important}
.message.user{display:flex!important;justify-content:flex-end!important;flex-direction:row!important}.message.user .msg-body{max-width:min(86%,720px)!important;background:#e9e9e9!important;color:#161616!important;border:1px solid #e3e3e3!important;border-radius:22px!important;padding:12px 17px!important}.message.user .msg-body p{color:#161616!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important}
.msg-body pre{background:#f0f0f0!important;color:#171717!important;border:1px solid #e5e5e5!important}.msg-body code{color:#171717!important}.chat-action{color:#737373!important}.chat-action:hover{background:#ededed!important;color:#111!important}
#composer{border-color:#dedede!important;box-shadow:0 7px 28px rgba(0,0,0,.055)!important}#composer:focus-within{border-color:#999!important;box-shadow:0 0 0 3px rgba(0,0,0,.055)!important}
.typing-inline{display:inline-flex!important;width:24px;height:18px;align-items:center;justify-content:center;font-size:0!important;position:relative}.typing-inline:before{content:"";width:6px;height:6px;border-radius:50%;background:#111;box-shadow:9px 0 0 #777,18px 0 0 #bbb;animation:typingPulse 1.05s ease-in-out infinite}
@keyframes typingPulse{0%,100%{opacity:.45;transform:translateY(0)}50%{opacity:1;transform:translateY(-3px)}}
.response-time{display:inline-flex;align-items:center;gap:5px;margin:0 0 8px;color:#888;font-size:11px;font-weight:500}.response-time svg{width:12px;height:12px}
.image-composer{box-shadow:0 10px 35px rgba(0,0,0,.055)!important}.image-model-select:focus{border-color:#999;box-shadow:0 0 0 3px rgba(0,0,0,.06)}#imageResult{background:#fff!important}
.image-preview-wrap{position:relative;display:inline-block;max-width:100%;margin:auto}.image-preview-wrap img{display:block;max-width:100%;max-height:68vh;object-fit:contain;background:#f7f7f7}
.umar-watermark{position:absolute;right:13px;bottom:13px;color:rgba(255,255,255,.42);font-size:12px;font-weight:600;letter-spacing:.22em;text-shadow:0 1px 5px rgba(0,0,0,.35);pointer-events:none;user-select:none}
.image-actions{border-color:#eee!important}.image-actions a,.image-actions button{background:#f1f1f1!important;color:#222!important}.upgrade-link{background:#090909!important;color:#fff!important;border-color:#090909!important}
.mini-loader{display:inline-block;width:17px;height:17px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:miniSpin .7s linear infinite}.mini-loader.large{width:28px;height:28px;border-color:#dedede;border-top-color:#111}@keyframes miniSpin{to{transform:rotate(360deg)}}
@media(max-width:640px){.message.user .msg-body{max-width:92%!important}.image-model-select{max-width:175px}.image-composer{padding:10px!important}}


/* ChatGPT-inspired navigation layout, retaining Punjab AI's monochrome identity */
#sidebar{width:260px!important;background:#fff!important;border-right:1px solid #e7e7e7!important;box-shadow:none!important}
#sidebar .h-14{height:64px!important}
#newChatBtn{height:48px!important;justify-content:flex-start!important;padding:0 14px!important;background:#f0f0f0!important;color:#161616!important;box-shadow:none!important;border:1px solid #e7e7e7}
#newChatBtn:hover{background:#e8e8e8!important}
.sidebar-nav-btn{width:100%;height:46px;display:flex;align-items:center;gap:12px;padding:0 14px;border:0;border-radius:12px;background:transparent;color:#292929;font-size:15px;font-weight:500;text-align:left;cursor:pointer}
.sidebar-nav-btn:hover{background:#f1f1f1}
.sidebar-account{display:flex;align-items:center;gap:10px;padding:9px 6px 3px;border-top:1px solid #eee;margin-top:6px}
.sidebar-account .account-dot{width:34px;height:34px;border-radius:50%;background:#171717;color:white;display:grid;place-items:center;font-size:13px;font-weight:700}
.sidebar-account span:nth-child(2){display:grid;gap:2px;min-width:0;flex:1}
.sidebar-account b{font-size:13px}.sidebar-account small{font-size:11px;color:#888}
.sidebar-account button{width:34px;height:34px;border:0;border-radius:50%;background:#f1f1f1;color:#333;display:grid;place-items:center}
#messages{max-width:820px!important;padding-top:28px!important}
#view-chat>.shrink-0{padding-bottom:max(18px,env(safe-area-inset-bottom))!important}
#view-chat>.shrink-0>div{max-width:820px!important}
#composer{border-radius:26px!important;min-height:66px!important}
.composer-inner{min-height:64px!important;padding:8px 10px!important;gap:6px!important}
#chatInput{min-height:42px!important;max-height:220px!important;padding-top:10px!important;padding-bottom:10px!important;line-height:1.5!important}
.send-btn{width:42px!important;height:42px!important;border-radius:50%!important}
#scroller{overscroll-behavior:contain}
@media(max-width:767px){
 #sidebar{width:min(300px,88vw)!important;z-index:50!important}
 #sidebarBackdrop{z-index:45!important}
 header{height:58px!important}
 header .seg{margin-right:auto}
 header #memoryBtn,header #privateToggle{display:none!important}
 header .upgrade-link{height:38px!important;padding:0 10px!important;font-size:12px!important}
 header #loginBtn{width:40px;min-width:40px!important;padding:0!important;justify-content:center}
 header #loginBtn span{display:none!important}
 #messages{padding:20px 14px 16px!important}
 #view-chat>.shrink-0{padding:6px 10px max(10px,env(safe-area-inset-bottom))!important}
 #composer{min-height:62px!important;border-radius:24px!important}
 .composer-inner{min-height:60px!important;padding:6px!important}
 #chatInput{font-size:16px!important;max-height:160px!important}
 #voiceBtn{display:none!important}
 #attachBtn{width:40px!important;min-width:40px!important}
 #sendChatBtn{width:42px!important;min-width:42px!important}
 .message.user .msg-body{max-width:94%!important}
 .image-composer{border-radius:20px!important}
 #imageResult{min-height:200px!important}
}
@media(max-width:380px){
 header .upgrade-link{font-size:0!important;gap:0!important;width:38px;justify-content:center;padding:0!important}
 header .upgrade-link svg{width:17px}
 .seg-btn{padding-left:9px!important;padding-right:9px!important}
}

/* Founder avatar: compact square crop, original source file remains full-resolution */
.account-avatar{width:36px;height:36px;flex:0 0 36px;border-radius:50%;object-fit:cover;object-position:center 22%;display:block;border:1px solid #e5e5e5}
.sidebar-account .account-avatar{width:34px;height:34px;flex-basis:34px}
/* Image studio follows the same centered conversation + bottom composer layout as chat */
#imageScroller{overscroll-behavior:contain}
#imageResult{min-height:100%;background:transparent!important;border:0!important;box-shadow:none!important;display:block!important;overflow:visible!important}
.image-turn{width:100%;margin:0 auto 26px}
.image-answer-bubble{box-shadow:0 1px 2px rgba(0,0,0,.035)}
.image-preview-wrap{display:block;width:fit-content;max-width:100%;margin:0 auto}
.image-preview-wrap img{display:block;width:auto;max-width:100%;max-height:min(68vh,680px);height:auto;object-fit:contain;border-radius:12px;background:#f7f7f7}
#imageComposer{border-radius:26px;min-height:66px}
#imagePrompt{min-height:46px;max-height:160px;line-height:1.5}
#generateImageBtn{width:42px;height:42px;min-width:42px;border-radius:50%;background:#111;color:#fff;display:grid;place-items:center}
#generateImageBtn:hover:not(:disabled){background:#333}
#generateImageBtn:disabled{opacity:.65;cursor:wait}
@media(max-width:767px){
 #view-image>.shrink-0{padding:6px 10px max(10px,env(safe-area-inset-bottom))!important}
 #imageComposer{min-height:62px;border-radius:24px}
 #imagePrompt{font-size:16px;max-height:120px;padding:12px 13px 6px}
 #imageResult{padding:18px 14px 16px!important}
 .image-answer-bubble{padding:10px!important}
 .image-preview-wrap img{max-height:62vh}
 .image-actions{gap:6px;flex-wrap:wrap;padding:10px 2px 2px}
 .image-actions a,.image-actions button{padding:0 10px;font-size:12px}
}
/* Keep the founder portrait fully visible without enlarging it */
.sidebar-account .account-avatar{width:36px;height:44px;flex-basis:36px;object-fit:contain;object-position:center;border-radius:8px;background:#f5f5f5;border:1px solid #e5e5e5}

/* Mobile-first cleanup requested for Punjab AI */
.aura-empty-mark{padding:52px 0 24px;text-align:center}
.aura-empty-mark .brand-mark{opacity:.5;filter:grayscale(1);box-shadow:none}
.sidebar-account{display:flex;align-items:center;gap:10px;padding:8px 10px}
.sidebar-account .account-avatar{display:none!important}
@media(max-width:767px){
 header #exportChatBtn,header #loginBtn,header #memoryBtn,header #privateToggle{display:none!important}
 header{gap:7px!important;padding-left:9px!important;padding-right:10px!important}
 header .seg{margin-right:auto!important}
 header .upgrade-link{height:40px!important;min-width:88px;justify-content:center;padding:0 13px!important;font-size:13px!important;background:#080808!important;color:#fff!important;border-radius:13px!important}
 header .upgrade-link svg{display:none!important}
 #view-chat>.shrink-0{padding:4px 10px calc(64px + env(safe-area-inset-bottom))!important}
 #composer{min-height:76px!important;border:1.5px solid #b8b8b8!important;border-radius:23px!important;box-shadow:0 8px 28px rgba(0,0,0,.10),0 0 0 1px rgba(0,0,0,.025)!important;background:#fff!important}
 #composer:focus-within{border-color:#555!important;box-shadow:0 0 0 3px rgba(0,0,0,.09),0 10px 30px rgba(0,0,0,.10)!important}
 .composer-inner{min-height:72px!important;padding:9px 9px!important;gap:5px!important}
 #chatInput{min-height:48px!important;padding-top:12px!important;padding-bottom:12px!important;font-size:16px!important}
 #sendChatBtn{width:46px!important;min-width:46px!important;height:46px!important}
 #view-image>.shrink-0{padding:4px 10px calc(64px + env(safe-area-inset-bottom))!important}
 #imageComposer{min-height:76px!important;border:1.5px solid #b8b8b8!important;border-radius:23px!important;box-shadow:0 8px 28px rgba(0,0,0,.10)!important}
 #imagePrompt{min-height:50px!important;padding:13px 14px 7px!important}
 #generateImageBtn{width:46px!important;height:46px!important;min-width:46px!important}
 .aura-empty-mark{padding-top:62px}
}
.paynumbers[hidden]{display:none!important}
.paynumbers .copy-number{justify-self:start;border:1px solid #ddd;background:#fff;color:#111;border-radius:9px;padding:8px 12px;font-size:12px;font-weight:700;min-height:38px;cursor:pointer}


/* Final mobile composer balance + welcoming empty state */
.aura-welcome{width:100%;max-width:560px;margin:0 auto;text-align:center;padding:52px 18px 30px;color:#171717}
.aura-welcome-logo{width:60px;height:60px;border-radius:19px;font-size:28px;margin-bottom:18px;opacity:1!important;filter:none!important;box-shadow:0 5px 18px rgba(0,0,0,.10)!important}
.aura-welcome-title{font-size:25px;line-height:1.2;font-weight:700;letter-spacing:-.04em;margin:0 0 7px}
.aura-welcome-byline{font-size:14px;font-weight:600;color:#555;margin:0 0 10px}
.aura-welcome-copy{font-size:14px;line-height:1.65;color:#858585;margin:0 auto;max-width:390px}
@media(max-width:767px){
  /* Both composers use the same overall mobile height and sit slightly lower. */
  #view-chat>.shrink-0,#view-image>.shrink-0{padding:4px 10px calc(48px + env(safe-area-inset-bottom))!important}
  #composer,#imageComposer{min-height:104px!important;border-radius:22px!important}
  #composer{border:1px solid #d4d4d4!important;box-shadow:0 4px 16px rgba(0,0,0,.065)!important}
  #composer:focus-within,#imageComposer:focus-within{border-color:#999!important;box-shadow:0 0 0 3px rgba(0,0,0,.055),0 5px 18px rgba(0,0,0,.07)!important}
  .composer-inner{min-height:100px!important;padding:10px 9px!important;gap:5px!important;align-items:center!important}
  #chatInput{min-height:68px!important;max-height:150px!important;padding:14px 9px!important;font-size:16px!important;line-height:1.5!important}
  #sendChatBtn{width:44px!important;height:44px!important;min-width:44px!important}
  #imageComposer{padding:7px 8px!important}
  #imagePrompt{min-height:54px!important;max-height:110px!important;padding:10px 10px 7px!important;font-size:16px!important}
  #generateImageBtn{width:44px!important;height:44px!important;min-width:44px!important}
  .aura-welcome{padding:42px 14px 26px}
  .aura-welcome-logo{width:60px;height:60px;margin-bottom:17px;opacity:1!important}
  .aura-welcome-title{font-size:24px}
  .aura-welcome-byline{font-size:14px}
  .aura-welcome-copy{font-size:13px;max-width:330px}
}

/* Unified two-row ChatGPT-style composers */
#composer,#imageComposer{border:1px solid #d8d8dc!important;border-radius:22px!important;background:#fff!important;box-shadow:0 5px 22px rgba(0,0,0,.065)!important;overflow:visible}
#composer:focus-within,#imageComposer:focus-within{border-color:#777!important;box-shadow:0 0 0 3px rgba(0,0,0,.055),0 7px 24px rgba(0,0,0,.07)!important}
#composer #chatInput,#imageComposer #imagePrompt{display:block;width:100%;min-height:54px;padding:13px 15px 8px!important;line-height:1.5}
.composer-toolbar{min-height:54px}
.composer-model-select{height:36px;max-width:160px;min-width:112px;padding:0 28px 0 11px;border:1px solid #e4e4e7;border-radius:12px;background:#f8f8f8;color:#292929;font-size:13px;font-weight:600;outline:none}
.composer-model-select:focus{border-color:#999;box-shadow:0 0 0 3px rgba(0,0,0,.05)}
#imageComposer .image-model-select{max-width:175px}
#clearHistoryBtn{color:#dc2626!important;border:1px solid #fecaca!important;background:#fff7f7!important}
#clearHistoryBtn:hover{background:#fee2e2!important;border-color:#f87171!important}
@media(max-width:767px){
 #view-chat>.shrink-0,#view-image>.shrink-0{padding:4px 10px calc(48px + env(safe-area-inset-bottom))!important}
 #composer,#imageComposer{min-height:116px!important;border-radius:21px!important}
 #composer #chatInput,#imageComposer #imagePrompt{min-height:58px!important;max-height:120px!important;padding:12px 13px 7px!important;font-size:16px!important}
 .composer-toolbar{min-height:48px;padding:4px 10px 9px!important}
 .composer-model-select{height:36px;min-width:100px;max-width:145px;font-size:12px}
 #imageComposer .image-model-select{max-width:145px}
 #imageComposer{padding:0!important}
 #imageComposer>div.flex.items-center.justify-between{padding:4px 10px 9px!important;min-height:48px}
 #imageAttachBtn{width:38px;height:38px;min-width:38px}
}

/* Green upgrade state after a user signs in; current plan is shown in profile. */
.upgrade-link.upgrade-active{background:#16a34a!important;border-color:#16a34a!important;color:#fff!important}
.upgrade-link.upgrade-active:hover{background:#15803d!important;border-color:#15803d!important}


/* Center Image Studio layout exactly like the Chat view */
#view-image{width:100%;min-width:0}
#view-image>#imageScroller{width:100%;max-width:none!important;align-self:stretch}
#view-image>.shrink-0{width:100%;max-width:none!important;align-self:stretch}
#view-image>.shrink-0>div{width:100%;max-width:820px;margin-left:auto!important;margin-right:auto!important}
#imageResult{width:100%;max-width:820px;margin-left:auto!important;margin-right:auto!important}


/* Stable bottom ad: do not resize #app or disturb the existing composer layout. */
#adsterra-bottom-banner{
  position:fixed; left:0; right:0; bottom:0; z-index:45;
  height:calc(50px + env(safe-area-inset-bottom));
  min-height:calc(50px + env(safe-area-inset-bottom));
  padding:0 0 env(safe-area-inset-bottom); box-sizing:border-box;
  display:flex; align-items:flex-start; justify-content:center;
  background:#fff; border-top:1px solid #e5e7eb; overflow:hidden;
}
#adsterra-bottom-banner .adsterra-unit-inner{width:320px; max-width:100%; height:50px; min-height:50px; margin:0 auto; display:flex; justify-content:center; align-items:flex-start; overflow:hidden}
#adsterra-bottom-banner iframe{display:block!important;width:320px!important;max-width:100%!important;height:50px!important;min-height:50px!important;border:0!important}
/* Preserve the original app viewport; only the ad itself is fixed. */
#app{height:100dvh!important;min-height:0}
@supports not (height:100dvh){#app{height:100vh!important}}
