/* ==============================================================================

   ATOM AI -- STANDALONE COGNITIVE INTELLIGENCE STYLESHEET

   Aesthetic: Obsidian Black with Emerald / Cyber Mint Accents (#ea580c / #fb923c)

   Engineered by ATOM FORGE

============================================================================== */

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}



/* ==============================================================================

   GOOGLE SANS & PRODUCT SANS -- GOOGLE AI STUDIO BRAND TYPOGRAPHY

   Local WOFF2 with CDN Fallbacks

============================================================================== */

@font-face {

  font-family: 'Google Sans';

  src: url('fonts/ProductSans-Light.woff2') format('woff2'),

       url('https://cdn.jsdelivr.net/gh/mortezaom/google-sans-cdn@master/fonts/ProductSans-Light.woff2') format('woff2');

  font-weight: 300;

  font-style: normal;

  font-display: swap;

}

@font-face {

  font-family: 'Google Sans';

  src: url('fonts/ProductSans-Regular.woff2') format('woff2'),

       url('https://cdn.jsdelivr.net/gh/mortezaom/google-sans-cdn@master/fonts/ProductSans-Regular.woff2') format('woff2');

  font-weight: 400;

  font-style: normal;

  font-display: swap;

}

@font-face {

  font-family: 'Google Sans';

  src: url('fonts/ProductSans-Medium.woff2') format('woff2'),

       url('https://cdn.jsdelivr.net/gh/mortezaom/google-sans-cdn@master/fonts/ProductSans-Medium.woff2') format('woff2');

  font-weight: 500;

  font-style: normal;

  font-display: swap;

}

@font-face {

  font-family: 'Google Sans';

  src: url('fonts/ProductSans-Bold.woff2') format('woff2'),

       url('https://cdn.jsdelivr.net/gh/mortezaom/google-sans-cdn@master/fonts/ProductSans-Bold.woff2') format('woff2');

  font-weight: 600;

  font-style: normal;

  font-display: swap;

}

@font-face {

  font-family: 'Google Sans';

  src: url('fonts/ProductSans-Bold.woff2') format('woff2'),

       url('https://cdn.jsdelivr.net/gh/mortezaom/google-sans-cdn@master/fonts/ProductSans-Bold.woff2') format('woff2');

  font-weight: 700;

  font-style: normal;

  font-display: swap;

}

@font-face {

  font-family: 'Google Sans';

  src: url('fonts/ProductSans-Black.woff2') format('woff2'),

       url('https://cdn.jsdelivr.net/gh/mortezaom/google-sans-cdn@master/fonts/ProductSans-Black.woff2') format('woff2');

  font-weight: 800;

  font-style: normal;

  font-display: swap;

}

@font-face {

  font-family: 'Google Sans';

  src: url('fonts/ProductSans-Black.woff2') format('woff2'),

       url('https://cdn.jsdelivr.net/gh/mortezaom/google-sans-cdn@master/fonts/ProductSans-Black.woff2') format('woff2');

  font-weight: 900;

  font-style: normal;

  font-display: swap;

}



/* Product Sans Aliases */

@font-face {

  font-family: 'Product Sans';

  src: url('fonts/ProductSans-Light.woff2') format('woff2');

  font-weight: 300;

  font-style: normal;

  font-display: swap;

}

@font-face {

  font-family: 'Product Sans';

  src: url('fonts/ProductSans-Regular.woff2') format('woff2');

  font-weight: 400;

  font-style: normal;

  font-display: swap;

}

@font-face {

  font-family: 'Product Sans';

  src: url('fonts/ProductSans-Medium.woff2') format('woff2');

  font-weight: 500;

  font-style: normal;

  font-display: swap;

}

@font-face {

  font-family: 'Product Sans';

  src: url('fonts/ProductSans-Bold.woff2') format('woff2');

  font-weight: 600;

  font-style: normal;

  font-display: swap;

}

@font-face {

  font-family: 'Product Sans';

  src: url('fonts/ProductSans-Bold.woff2') format('woff2');

  font-weight: 700;

  font-style: normal;

  font-display: swap;

}

@font-face {

  font-family: 'Product Sans';

  src: url('fonts/ProductSans-Black.woff2') format('woff2');

  font-weight: 800;

  font-style: normal;

  font-display: swap;

}

@font-face {

  font-family: 'Product Sans';

  src: url('fonts/ProductSans-Black.woff2') format('woff2');

  font-weight: 900;

  font-style: normal;

  font-display: swap;

}



:root {

  --bg-core: #151515;

  --bg-surface: #1d1d1d;

  --bg-card: #232323;

  --bg-card-hover: #2c2c2c;

  --bg-glass: rgba(21, 21, 21, 0.94);



  --border-subtle: rgba(255, 255, 255, 0.08);

  --border-emerald: rgba(251, 146, 60, 0.24);

  --border-emerald-bright: rgba(251, 146, 60, 0.6);



  --emerald-primary: #ea580c;

  --emerald-glow: #fb923c;

  --emerald-dark: #c2410c;

  --emerald-soft: rgba(251, 146, 60, 0.12);

  --emerald-light: rgba(251, 146, 60, 0.06);



  --text-primary: #f8fafc;

  --text-secondary: #94a3b8;

  --text-muted: #64748b;

  --text-emerald: #fb923c;



  --font-sans: 'Google Sans', 'Product Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --font-serif: 'Google Sans', 'Product Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --font-mono: 'JetBrains Mono', Consolas, Monaco, monospace;



  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6), 0 0 20px rgba(234, 88, 12, 0.06);

  --shadow-glow: 0 0 20px rgba(251, 146, 60, 0.25);



  --radius-sm: 8px;

  --radius-md: 12px;

  --radius-lg: 18px;

  --radius-pill: 9999px;

}



*, *::before, *::after {

  box-sizing: border-box;

  margin: 0;

  padding: 0;

}



/* ==============================================================================
   MODERN MINIMALIST DARK GLASS SCROLLBAR DESIGN SYSTEM
   Ultra-clean translucent rounded pills with transparent tracks & NO native buttons
============================================================================== */

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: transparent !important;
}

*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16) !important;
  border-radius: 9999px !important;
  border: 1px solid transparent !important;
  background-clip: content-box !important;
  transition: background 0.2s ease;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32) !important;
  background-clip: content-box !important;
}

*::-webkit-scrollbar-corner {
  background: transparent !important;
}

*::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  -webkit-appearance: none !important;
}



button, input, textarea, select {

  font-family: inherit;

}



html, body {

  width: 100%;

  height: 100%;

  overflow: hidden;

  background-color: #151515;

  color: var(--text-primary);

  font-family: var(--font-sans);

  -webkit-font-smoothing: antialiased;

  -moz-osx-font-smoothing: grayscale;

}



/* ==============================================================================

   APP LAYOUT & STRUCTURE (FIXED TO PREVENT ANY BOTTOM JUMP/SHIFT ON SCROLL)

============================================================================== */

.atom-app-layout {

  display: flex;

  flex-direction: column;

  width: 100%;

  height: 100vh;

  height: 100dvh;

  overflow: hidden;

  position: relative;

  background-color: #151515;

}



/* Screen Reader Accessible Announcer */

.sr-only {

  position: absolute;

  width: 1px;

  height: 1px;

  padding: 0;

  margin: -1px;

  overflow: hidden;

  clip: rect(0, 0, 0, 0);

  border: 0;

}



.text-emerald {

  color: var(--emerald-glow) !important;

}



/* ==============================================================================

   TOP NAVIGATION BAR

============================================================================== */

.atom-top-bar {

  display: flex;

  justify-content: space-between;

  align-items: center;

  height: 58px;

  padding: 0 1.25rem;

  border-bottom: 1px solid var(--border-subtle);

  background: rgba(21, 21, 21, 0.94);

  backdrop-filter: blur(14px);

  z-index: 40;

  flex-shrink: 0;

}



.top-bar-left, .top-bar-right {

  display: flex;

  align-items: center;

  gap: 0.5rem;

}



.top-bar-center {

  display: flex;

  align-items: center;

  justify-content: center;

}



.atom-top-brand {

  display: flex;

  align-items: center;

  gap: 0.55rem;

  padding: 0.35rem 0.85rem;

  background: rgba(255, 255, 255, 0.03);

  border: 1px solid var(--border-subtle);

  border-radius: var(--radius-pill);

}



.top-brand-text {

  font-size: 0.95rem;

  font-weight: 800;

  letter-spacing: 0.03em;

  color: var(--text-primary);

}



.top-brand-subbadge {

  font-size: 0.65rem;

  font-weight: 700;

  letter-spacing: 0.06em;

  color: var(--emerald-glow);

  background: var(--emerald-soft);

  border: 1px solid var(--border-emerald);

  padding: 0.12rem 0.45rem;

  border-radius: var(--radius-pill);

  text-transform: uppercase;

}



.emerald-pulsing-dot {

  width: 8px;

  height: 8px;

  border-radius: 50%;

  background-color: var(--emerald-glow);

  box-shadow: 0 0 10px var(--emerald-glow);

  animation: pulseEmerald 2.2s infinite ease-in-out;

}



@keyframes pulseEmerald {

  0%, 100% { transform: scale(1); opacity: 1; }

  50% { transform: scale(1.35); opacity: 0.65; }

}



/* Clean Icon Buttons */

.atom-icon-btn {

  background: transparent;

  border: 1px solid transparent;

  color: var(--text-secondary);

  font-size: 1rem;

  width: 36px;

  height: 36px;

  border-radius: var(--radius-sm);

  display: flex;

  align-items: center;

  justify-content: center;

  cursor: pointer;

  transition: all 0.2s ease;

}



.atom-icon-btn:hover {

  color: var(--text-primary);

  background: rgba(255, 255, 255, 0.06);

  border-color: var(--border-subtle);

}



.atom-icon-btn.active {

  color: var(--emerald-glow);

  background: var(--emerald-soft);

  border-color: var(--border-emerald);

}



/* ==============================================================================

   SLIDE-OUT SIDEBAR DRAWER (SESSIONS & HISTORY)

============================================================================== */

.atom-sidebar-drawer {

  position: absolute;

  top: 0;

  left: 0;

  bottom: 0;

  width: 320px;

  background: #1c1c1c;

  border-right: 1px solid var(--border-subtle);

  z-index: 1000;

  display: flex;

  flex-direction: column;

  padding: 1rem;

  box-shadow: 16px 0 50px rgba(0, 0, 0, 0.85);

  transform: translateX(-105%);

  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);

  box-sizing: border-box;

}



.atom-sidebar-drawer.open {

  transform: translateX(0);

}



.atom-sidebar-backdrop {

  display: none;

  position: absolute;

  inset: 0;

  background: rgba(0, 0, 0, 0.65);

  backdrop-filter: blur(4px);

  z-index: 990;

}



.atom-sidebar-backdrop.active {

  display: block;

}



.atom-sidebar-header {

  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-bottom: 1rem;

  padding-bottom: 0.65rem;

  border-bottom: 1px solid var(--border-subtle);

}



.atom-sidebar-title-row {

  display: flex;

  align-items: center;

  gap: 0.6rem;

}



.atom-brand-icon-mini {

  width: 28px;

  height: 28px;

  border-radius: 6px;

  background: var(--emerald-soft);

  border: 1px solid var(--border-emerald);

  display: flex;

  align-items: center;

  justify-content: center;

  font-size: 0.95rem;

}



.atom-sidebar-brand-name {

  font-weight: 800;

  font-size: 1rem;

  color: var(--text-primary);

  letter-spacing: 0.02em;

}



.atom-new-chat-btn {

  width: 100%;

  display: flex;

  align-items: center;

  gap: 0.65rem;

  background: var(--emerald-soft);

  border: 1px solid var(--border-emerald);

  border-radius: var(--radius-md);

  padding: 0.75rem 0.95rem;

  color: var(--text-primary);

  font-size: 0.9rem;

  font-weight: 700;

  cursor: pointer;

  margin-bottom: 1.25rem;

  transition: all 0.2s ease;

}



.atom-new-chat-btn:hover {

  background: rgba(251, 146, 60, 0.18);

  border-color: var(--emerald-glow);

  box-shadow: 0 0 16px rgba(251, 146, 60, 0.25);

  transform: translateY(-1px);

}



.atom-sessions-section {

  flex: 1;

  display: flex;

  flex-direction: column;

  overflow: hidden;

}



.atom-sessions-header-row {

  display: flex;

  justify-content: space-between;

  align-items: center;

  font-size: 0.75rem;

  font-weight: 600;

  text-transform: uppercase;

  letter-spacing: 0.04em;

  color: var(--text-muted);

  padding: 0 0.4rem 0.6rem 0.4rem;

}



.atom-count-badge {

  background: var(--emerald-soft);

  color: var(--emerald-glow);

  padding: 0.12rem 0.5rem;

  border-radius: var(--radius-pill);

  font-size: 0.7rem;

  font-weight: 800;

}



.atom-sessions-scroll {

  flex: 1;

  overflow-y: auto;

  display: flex;

  flex-direction: column;

  gap: 0.35rem;

  padding-right: 0.25rem;

}



.atom-sessions-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

.atom-sessions-scroll::-webkit-scrollbar {
  width: 4px;
}

.atom-sessions-scroll::-webkit-scrollbar-track {
  background: transparent !important;
}

.atom-sessions-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14) !important;
  border-radius: 4px;
}

.atom-sessions-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28) !important;
}



.atom-session-item {

  display: flex;

  align-items: center;

  gap: 0.6rem;

  padding: 0.65rem 0.75rem;

  border-radius: var(--radius-sm);

  background: transparent;

  color: var(--text-secondary);

  font-size: 0.85rem;

  cursor: pointer;

  border-left: 2.5px solid transparent;

  transition: all 0.18s ease;

}



.atom-session-item:hover {

  background: rgba(255, 255, 255, 0.04);

  color: var(--text-primary);

}



.atom-session-item.active {

  background: var(--emerald-soft);

  color: var(--emerald-glow);

  font-weight: 600;

  border-left-color: var(--emerald-glow);

}



.atom-session-title {

  flex: 1;

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;

}



.btn-delete-session {

  background: transparent;

  border: none;

  color: var(--text-muted);

  cursor: pointer;

  font-size: 0.8rem;

  padding: 3px 6px;

  border-radius: 4px;

  opacity: 0;

  transition: all 0.18s ease;

}



.atom-session-item:hover .btn-delete-session {

  opacity: 0.8;

}



.btn-delete-session:hover {

  opacity: 1;

  color: #ef4444;

  background: rgba(239, 68, 68, 0.15);

}



.atom-no-sessions-msg {

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  gap: 0.6rem;

  padding: 3rem 1rem;

  text-align: center;

  color: var(--text-muted);

  font-size: 0.84rem;

  line-height: 1.4;

}



.atom-no-sessions-msg i {

  font-size: 1.6rem;

  color: rgba(255, 255, 255, 0.15);

}



.atom-sidebar-actions-row {

  padding: 0.65rem 0.25rem;

  border-top: 1px solid var(--border-subtle);

}



.atom-text-action-btn {

  width: 100%;

  display: flex;

  align-items: center;

  gap: 0.5rem;

  background: transparent;

  border: none;

  color: var(--text-muted);

  font-size: 0.78rem;

  cursor: pointer;

  padding: 0.4rem 0.5rem;

  border-radius: var(--radius-sm);

  transition: all 0.18s ease;

}



.atom-text-action-btn:hover {

  color: #ef4444;

  background: rgba(239, 68, 68, 0.08);

}



.atom-sidebar-user-footer {

  display: flex;

  justify-content: space-between;

  align-items: center;

  padding-top: 0.85rem;

  margin-top: 0.25rem;

  border-top: 1px solid var(--border-subtle);

}



.atom-user-info-card {

  display: flex;

  align-items: center;

  gap: 0.65rem;

}



.atom-user-avatar {

  width: 32px;

  height: 32px;

  border-radius: 50%;

  background: var(--emerald-soft);

  border: 1px solid var(--border-emerald);

  color: var(--emerald-glow);

  font-weight: 800;

  font-size: 0.9rem;

  display: flex;

  align-items: center;

  justify-content: center;

}



.atom-user-meta {

  display: flex;

  flex-direction: column;

  line-height: 1.2;

}



.atom-username {

  font-size: 0.86rem;

  font-weight: 700;

  color: var(--text-primary);

}



.atom-user-title {

  font-size: 0.72rem;

  color: var(--emerald-glow);

}



/* ==============================================================================

   CHAT VIEWPORT & MESSAGE STREAM

============================================================================== */

.atom-chat-viewport {

  flex: 1;

  overflow-y: auto;

  overflow-x: hidden;

  display: flex;

  flex-direction: column;

  padding: 1.5rem 1rem 1rem 1rem;

  scroll-behavior: smooth;

}



.atom-chat-viewport::-webkit-scrollbar {

  width: 6px;

}

.atom-chat-viewport::-webkit-scrollbar-thumb {

  background: rgba(255, 255, 255, 0.1);

  border-radius: 6px;

}



/* ==============================================================================

   HERO WELCOME STAGE

============================================================================== */

.atom-hero-stage {

  max-width: 820px;

  margin: auto;

  display: flex;

  flex-direction: column;

  align-items: center;

  text-align: center;

  padding: 2rem 1rem;

  animation: fadeInHero 0.5s ease-out;

}



@keyframes fadeInHero {

  from { opacity: 0; transform: translateY(12px); }

  to { opacity: 1; transform: translateY(0); }

}



.atom-brain-emblem-wrap {

  margin-bottom: 1.5rem;

  position: relative;

}



.atom-hero-greeting {

  font-family: var(--font-sans);

  font-size: 2.2rem;

  font-weight: 500;

  line-height: 1.25;

  color: var(--text-primary);

  margin-bottom: 0.5rem;

  letter-spacing: -0.02em;

}



.greeting-salutation {

  display: block;

  color: #f1f5f9;

  font-style: normal;

  font-weight: 600;

  font-size: 2.3rem;

  letter-spacing: -0.02em;

}



.greeting-subprompt {

  display: block;

  color: var(--emerald-glow);

  font-family: var(--font-sans);

  font-size: 1.35rem;

  font-weight: 600;

  margin-top: 0.35rem;

  letter-spacing: 0;

}



/* Suggestions Cards Grid */

.atom-suggestions-grid {

  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));

  gap: 0.85rem;

  width: 100%;

  max-width: 780px;

}



.atom-prompt-card {

  display: flex;

  align-items: center;

  gap: 0.85rem;

  padding: 0.95rem 1.1rem;

  background: var(--bg-surface);

  border: 1px solid var(--border-subtle);

  border-radius: var(--radius-md);

  text-align: left;

  cursor: pointer;

  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);

}



.atom-prompt-card:hover {

  background: var(--bg-card-hover);

  border-color: var(--border-emerald);

  transform: translateY(-2px);

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(251, 146, 60, 0.12);

}



.atom-prompt-card .card-icon {

  width: 36px;

  height: 36px;

  border-radius: var(--radius-sm);

  background: var(--emerald-soft);

  border: 1px solid var(--border-emerald);

  color: var(--emerald-glow);

  display: flex;

  align-items: center;

  justify-content: center;

  font-size: 1rem;

  flex-shrink: 0;

}



.atom-prompt-card .card-text {

  display: flex;

  flex-direction: column;

  gap: 0.15rem;

}



.atom-prompt-card .card-text strong {

  font-size: 0.88rem;

  color: var(--text-primary);

  font-weight: 600;

}



.atom-prompt-card .card-text span {

  font-size: 0.74rem;

  color: var(--text-muted);

}



/* ==============================================================================

   MESSAGE DIALOGUE STREAM

============================================================================== */

.atom-message-stream {

  width: 100%;

  max-width: 900px;

  margin: 0 auto;

  display: flex;

  flex-direction: column;

  gap: 1.25rem;

}



.chat-bubble-row {

  display: flex;

  gap: 0.85rem;

  width: 100%;

  animation: slideInMsg 0.24s ease-out;

}



@keyframes slideInMsg {

  from { opacity: 0; transform: translateY(8px); }

  to { opacity: 1; transform: translateY(0); }

}



.chat-bubble-row.user {

  justify-content: flex-end;

}



.chat-bubble-row.user .chat-text-box {

  background: #252525 !important;

  border: 1px solid rgba(255, 255, 255, 0.08) !important;

  border-radius: 20px !important;

  box-shadow: none !important;

  padding: 0.65rem 1.15rem !important;

  max-width: 78% !important;

  color: #f3f4f6 !important;

  font-size: 0.95rem !important;

  line-height: 1.5 !important;

  word-break: break-word;

}



.chat-bubble-row.bot {

  justify-content: flex-start;

  align-items: flex-start;

  width: 100% !important;

  background: transparent !important;

  border: none !important;

}



.chat-bot-avatar {

  display: none !important;

  visibility: hidden !important;

  width: 0 !important;

  height: 0 !important;

  margin: 0 !important;

  padding: 0 !important;

}



.chat-bubble-row.bot .chat-text-box {

  background: transparent !important;

  border: none !important;

  outline: none !important;

  border-radius: 0 !important;

  padding: 0.35rem 0.2rem !important;

  max-width: 100% !important;

  width: 100% !important;

  color: #eceae4 !important;

  font-family: 'Hanken Grotesk', 'Google Sans', Inter, system-ui, sans-serif !important;

  font-size: 0.98rem !important;

  line-height: 1.72 !important;

  box-shadow: none !important;

  word-break: break-word;

}



/* Formatted Body */

/* Enhanced Structured Chat Typography & Elements */

.chat-formatted-body .chat-heading-1 {

  color: #ffffff;

  font-size: 1.25rem;

  font-weight: 700;

  margin: 1.1rem 0 0.5rem 0;

  letter-spacing: -0.015em;

}



.chat-formatted-body .chat-heading-2 {

  color: #f8fafc;

  font-size: 1.1rem;

  font-weight: 700;

  margin: 1rem 0 0.45rem 0;

  display: flex;

  align-items: center;

  gap: 0.45rem;

}



.chat-formatted-body .chat-heading-2::before {

  content: "";

  display: inline-block;

  width: 4px;

  height: 1.05em;

  background: var(--emerald-glow);

  border-radius: 2px;

}



.chat-formatted-body .chat-heading-3 {

  color: var(--emerald-glow);

  font-size: 0.96rem;

  font-weight: 700;

  margin: 0.85rem 0 0.35rem 0;

}



.chat-formatted-body h3, .chat-formatted-body h4 {

  color: var(--text-primary);

  margin: 0.75rem 0 0.4rem 0;

  font-weight: 700;

}



.chat-formatted-body h3 { font-size: 1.05rem; }

.chat-formatted-body h4 { font-size: 0.95rem; }



.chat-formatted-body p {

  margin-bottom: 0.65rem;

}



.chat-formatted-body p:last-child {

  margin-bottom: 0;

}



.chat-highlight {

  color: #f8fafc;

  font-weight: 700;

}



.chat-inline-code {

  background: rgba(255, 255, 255, 0.08);

  padding: 2px 6px;

  border-radius: 4px;

  font-family: var(--font-mono);

  color: #fdba74;

  font-size: 0.88em;

  border: 1px solid rgba(255, 255, 255, 0.06);

}



.chat-bullet-row {

  display: flex;

  align-items: flex-start;

  gap: 0.5rem;

  margin-bottom: 0.45rem;

  line-height: 1.55;

}



.bullet-dot {

  color: var(--emerald-glow);

  font-weight: 800;

  line-height: 1.2;

}



.bullet-text {

  flex: 1;

}



.chat-num-row {

  display: flex;

  align-items: flex-start;

  gap: 0.65rem;

  margin-bottom: 0.5rem;

  line-height: 1.55;

}



.num-badge {

  display: inline-flex;

  align-items: center;

  justify-content: center;

  min-width: 22px;

  height: 22px;

  background: rgba(234, 88, 12, 0.15);

  border: 1px solid rgba(234, 88, 12, 0.35);

  color: var(--emerald-glow);

  border-radius: 6px;

  font-size: 0.76rem;

  font-weight: 800;

  flex-shrink: 0;

  margin-top: 2px;

}



.num-text {

  flex: 1;

}



.chat-plain-quote,
.chat-callout-quote {
  display: block;
  background: transparent !important;
  border: none !important;
  border-left: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0.35rem 0;
  font-size: inherit;
  line-height: 1.6;
  color: inherit;
}

.chat-callout-quote .callout-icon {
  display: none !important;
}

.chat-callout-quote .callout-body {
  display: block;
}



.chat-divider {

  border: none;

  height: 1px;

  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);

  margin: 1.1rem 0;

}



.chat-link {

  color: var(--emerald-glow);

  text-decoration: none;

  border-bottom: 1px dashed rgba(251, 146, 60, 0.4);

  transition: all 0.18s ease;

}



.chat-link:hover {

  color: #fed7aa;

  border-bottom-style: solid;

}



.chat-para-break {

  height: 0.85rem;

}



/* Code Blocks */

.chat-code-block-wrap {

  position: relative;

  margin: 0.75rem 0;

  background: #0e0e0e;

  border: 1px solid rgba(255, 255, 255, 0.08);

  border-radius: var(--radius-sm);

  overflow: hidden;

}



.chat-code-header {

  display: flex;

  justify-content: space-between;

  align-items: center;

  padding: 0.35rem 0.75rem;

  background: rgba(255, 255, 255, 0.04);

  font-family: var(--font-mono);

  font-size: 0.72rem;

  color: var(--text-muted);

  border-bottom: 1px solid rgba(255, 255, 255, 0.06);

}



.btn-copy-code {

  background: transparent;

  border: none;

  color: var(--text-muted);

  font-size: 0.74rem;

  cursor: pointer;

  display: flex;

  align-items: center;

  gap: 0.35rem;

  padding: 2px 6px;

  border-radius: 4px;

  transition: all 0.18s ease;

}



.btn-copy-code:hover {

  color: var(--emerald-glow);

  background: rgba(251, 146, 60, 0.12);

}



.chat-code-pre {

  margin: 0;

  padding: 0.85rem 1rem;

  font-family: var(--font-mono);

  font-size: 0.84rem;

  line-height: 1.5;

  color: #fed7aa;

  overflow-x: auto;

}



/* ==============================================================================

   CLAUDE-STYLE THINKING LOADER & THOUGHT ACCORDION (EMERALD GREEN THEME)

   ============================================================================== */



:root {

  --claude-green: #ea580c;

  --claude-green-glow: rgba(234, 88, 12, 0.35);

  --claude-thought-text: #fb923c;

  --claude-thought-muted: #fed7aa;

}



/* 1. Live Thinking Row (While AI is Reasoning) */

.claude-thinking-row {

  display: flex;

  align-items: flex-start;

  gap: 0;

  margin-bottom: 1.15rem;

}



.claude-thinking-box {

  background: transparent !important;

  border: none !important;

  padding: 0 !important;

  box-shadow: none !important;

  max-width: 100% !important;

}



.claude-thinking-pill {

  display: inline-flex;

  align-items: center;

  gap: 0.55rem;

  padding: 0.32rem 0.95rem 0.32rem 0.65rem;

  background: #191919 !important;

  border: 1px solid #ea580c !important;

  border-radius: 9999px !important;

  cursor: default !important;

  user-select: none;

  transition: all 0.2s ease;

  font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;

  color: #fb923c !important;

  box-shadow: 0 0 10px rgba(234, 88, 12, 0.22), 0 2px 6px rgba(0, 0, 0, 0.4) !important;

}



.claude-thinking-pill:hover {

  background: #191919 !important;

  border-color: #fb923c !important;

  box-shadow: 0 0 16px rgba(251, 146, 60, 0.38), 0 2px 8px rgba(0, 0, 0, 0.5) !important;

}



/* Animated Braille Dot Spinner */

.claude-braille-spinner {

  color: #fb923c !important;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;

  font-size: 0.95rem;

  font-weight: 700;

  display: inline-block;

  min-width: 14px;

  line-height: 1;

  text-shadow: 0 0 10px rgba(251, 146, 60, 0.6);

  animation: claudePulsate 1.8s infinite ease-in-out;

}



@keyframes claudePulsate {

  0%, 100% { opacity: 0.8; transform: scale(1); }

  50% { opacity: 1; transform: scale(1.15); }

}



.claude-thinking-status {

  color: #fb923c !important;

  font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;

  font-size: 0.96rem !important;

  font-weight: 600 !important;

  letter-spacing: 0.01em !important;

  line-height: 1.2 !important;

}



.claude-thinking-timer {

  color: #fb923c !important;

  font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;

  font-size: 1.15rem !important;

  font-weight: 600 !important;

  line-height: 1.2 !important;

  margin-left: 0.15rem;

}



.claude-thinking-chevron {

  color: #fb923c !important;

  display: flex;

  align-items: center;

  transition: transform 0.2s ease;

  margin-left: 0.1rem;

}



.claude-thinking-chevron {

  display: none !important;

}



/* Live Thinking Drawer (Permanently suppressed) */

.claude-thinking-live-drawer {

  display: none !important;

  visibility: hidden !important;

  height: 0 !important;

  margin: 0 !important;

  padding: 0 !important;

  border: none !important;

  box-shadow: none !important;

  overflow: hidden !important;

}



.claude-live-step {

  display: flex;

  align-items: center;

  gap: 0.5rem;

}



.claude-live-step.active {

  color: #fb923c !important;

  font-weight: 600;

  font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;

}



.claude-step-bullet {

  color: #ea580c !important;

  font-size: 0.75rem;

}



.claude-step-text {

  color: #fb923c !important;

  font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;

  font-size: 1.12rem !important;

}



.claude-step-bullet {

  color: var(--claude-green) !important;

  font-size: 0.72rem;

  line-height: 1.5;

}



/* 2. Finished Thought Accordion (Removed once answer is given) */

.claude-thought-accordion,

.atom-thought-accordion {

  display: none !important;

  visibility: hidden !important;

  height: 0 !important;

  margin: 0 !important;

  padding: 0 !important;

  overflow: hidden !important;

}



.claude-thought-summary,

.atom-thought-accordion summary {

  display: inline-flex !important;

  align-items: center !important;

  gap: 0.55rem !important;

  padding: 0.34rem 0.82rem 0.34rem 0.62rem !important;

  background: rgba(234, 88, 12, 0.09) !important;

  border: 1px solid rgba(234, 88, 12, 0.3) !important;

  border-radius: 9999px !important;

  cursor: pointer !important;

  user-select: none !important;

  list-style: none !important;

  transition: all 0.2s ease !important;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif !important;

  font-size: 0.82rem !important;

  color: var(--claude-thought-text) !important;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);

}



.claude-thought-summary::-webkit-details-marker,

.atom-thought-accordion summary::-webkit-details-marker {

  display: none !important;

}



.claude-thought-summary:hover,

.atom-thought-accordion summary:hover {

  background: rgba(234, 88, 12, 0.16) !important;

  border-color: rgba(234, 88, 12, 0.55) !important;

  box-shadow: 0 0 10px rgba(234, 88, 12, 0.2);

}



.claude-thought-header-left,

.thought-summary-left {

  display: inline-flex !important;

  align-items: center !important;

  gap: 0.45rem !important;

  font-weight: 600 !important;

}



.claude-braille-icon {

  color: var(--claude-green) !important;

  font-size: 0.92rem;

  font-weight: 700;

}



.claude-thought-label {

  color: var(--claude-thought-text) !important;

  font-size: 0.84rem;

  font-weight: 600;

}



.claude-thought-chevron {

  color: #fb923c !important;

  display: inline-flex;

  align-items: center;

  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  margin-left: 0.15rem;

}



.claude-thought-accordion[open] > .claude-thought-summary .claude-thought-chevron,

.atom-thought-accordion[open] > summary .claude-thought-chevron {

  transform: rotate(90deg);

}



/* Thinking Content Drawer */

.claude-thought-drawer,

.atom-thought-content {

  margin-top: 0.65rem !important;

  margin-left: 0.25rem !important;

  padding: 0.75rem 1rem !important;

  border-left: 2px solid rgba(234, 88, 12, 0.5) !important;

  background: rgba(26, 14, 10, 0.55) !important;

  border-radius: 0 8px 8px 0 !important;

  border-top: none !important;

}



.claude-thought-inner {

  display: flex;

  flex-direction: column;

  gap: 0.45rem;

  font-size: 0.83rem;

  color: #cbd5e1;

  line-height: 1.6;

  font-family: var(--font-mono, monospace);

}



.claude-thought-step,

.atom-thought-step {

  display: flex !important;

  align-items: flex-start !important;

  gap: 0.5rem !important;

  color: #e2e8f0 !important;

  font-size: 0.82rem !important;

  line-height: 1.55 !important;

}



.claude-step-dot,

.atom-thought-step .step-dot {

  color: var(--claude-green) !important;

  font-size: 0.72rem !important;

  line-height: 1.6 !important;

  flex-shrink: 0 !important;

}



/* Assistant Message Action Footer & Clean Borderless Feedback Bar */

.chat-bot-action-footer {

  display: flex;

  align-items: center;

  justify-content: flex-start;

  margin-top: 0.85rem;

  padding-top: 0;

  border: none !important;

  border-top: none !important;

  background: transparent !important;

}



.reply-feedback-bar {

  display: flex !important;

  align-items: center !important;

  gap: 8px !important;

  margin-top: 0.85rem !important;

  padding: 0 !important;

  border: none !important;

  border-top: none !important;

  background: transparent !important;

}



.btn-reply-action {

  display: inline-flex !important;

  align-items: center !important;

  justify-content: center !important;

  width: 28px !important;

  height: 28px !important;

  border-radius: 6px !important;

  background: transparent !important;

  border: none !important;

  color: #9ca3af !important;

  cursor: pointer !important;

  padding: 0 !important;

  font-size: 13.5px !important;

  transition: all 0.15s ease !important;

  box-sizing: border-box !important;

}



.btn-reply-action svg {

  display: block;

}



.btn-reply-action:hover {

  color: #f1f5f9 !important;

  background: rgba(255, 255, 255, 0.08) !important;

}



.btn-reply-action:active {

  transform: scale(0.92) !important;

}



.btn-reply-action.active-liked {

  color: #fb923c !important;

}



.btn-reply-action.active-disliked {

  color: #f87171 !important;

}



.reply-more-wrap {

  position: relative !important;

  display: inline-flex !important;

}



.reply-share-menu {

  position: absolute !important;

  top: calc(100% + 6px) !important;

  left: 0 !important;

  background: #1e1e1e !important;

  border: 1px solid rgba(255, 255, 255, 0.12) !important;

  border-radius: 10px !important;

  padding: 5px !important;

  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65) !important;

  display: none !important;

  flex-direction: column !important;

  gap: 2px !important;

  min-width: 150px !important;

  z-index: 99 !important;

  animation: fadeInReplyMenu 0.16s ease-out !important;

}



.reply-share-menu.is-active,

.reply-share-menu.open {

  display: flex !important;

}



@keyframes fadeInReplyMenu {

  from { opacity: 0; transform: translateY(-4px); }

  to { opacity: 1; transform: translateY(0); }

}



.share-menu-item {

  display: flex !important;

  align-items: center !important;

  gap: 10px !important;

  padding: 7px 11px !important;

  background: transparent !important;

  border: none !important;

  border-radius: 6px !important;

  color: #d1d5db !important;

  font-family: 'Hanken Grotesk', 'Google Sans', Inter, sans-serif !important;

  font-size: 0.82rem !important;

  font-weight: 500 !important;

  cursor: pointer !important;

  width: 100% !important;

  text-align: left !important;

  transition: background 0.15s ease, color 0.15s ease !important;

  box-sizing: border-box !important;

}



.share-menu-item:hover {

  background: rgba(255, 255, 255, 0.08) !important;

  color: #ffffff !important;

}



.share-menu-item i {

  font-size: 13px !important;

  width: 15px !important;

  text-align: center !important;

  color: #9ca3af !important;

}



.share-menu-item:hover i {

  color: #fb923c !important;

}



.chat-meta-tag {

  font-family: var(--font-sans);

  font-size: 0.70rem;

  font-weight: 600;

  letter-spacing: 0.06em;

  color: #64748b;

  text-transform: uppercase;

  display: inline-flex;

  align-items: center;

  gap: 0.45rem;

}



.chat-meta-tag::before {

  content: '';

  display: inline-block;

  width: 5px;

  height: 5px;

  border-radius: 50%;

  background-color: var(--emerald-glow);

  opacity: 0.8;

}



.chat-action-buttons {

  display: flex;

  align-items: center;

  gap: 0.35rem;

}



.btn-msg-action {

  background: transparent;

  border: 1px solid transparent;

  color: var(--text-muted);

  font-size: 0.75rem;

  padding: 3px 7px;

  border-radius: 4px;

  cursor: pointer;

  display: flex;

  align-items: center;

  gap: 0.35rem;

  transition: all 0.18s ease;

}



.btn-msg-action:hover {

  color: var(--emerald-glow);

  background: var(--emerald-soft);

  border-color: var(--border-emerald);

}



.btn-msg-action.speaking {

  color: #ea580c;

  background: rgba(234, 88, 12, 0.15);

  border-color: rgba(234, 88, 12, 0.4);

  box-shadow: 0 0 8px rgba(234, 88, 12, 0.3);

}



/* ==============================================================================

   LOCKED BOTTOM INPUT CARD (ANCHORED FIRMLY AT BOTTOM, NO MOVEMENT ON SCROLL)

============================================================================= */

.atom-locked-input-container {

  flex-shrink: 0;

  width: 100%;

  max-width: 900px;

  margin: 0 auto;

  padding: 0.75rem 1rem 1.25rem 1rem;

  position: relative;

  z-index: 50;

  pointer-events: auto;

}



.atom-chat-form {

  width: 100%;

}



.atom-input-glass-box {

  background: var(--bg-glass);

  border: 1px solid rgba(255, 255, 255, 0.1);

  border-radius: var(--radius-lg);

  padding: 0.85rem 1rem 0.65rem 1.15rem;

  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.75);

  backdrop-filter: blur(18px);

  -webkit-backdrop-filter: blur(18px);

  display: flex;

  flex-direction: column;

  gap: 0.5rem;

  transition: border-color 0.2s ease, box-shadow 0.2s ease;

}



.atom-input-glass-box:focus-within {

  border-color: rgba(255, 255, 255, 0.2);

  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.85);

}



.atom-textarea {

  width: 100%;

  background: transparent;

  border: none;

  outline: none;

  color: var(--text-primary);

  font-family: var(--font-sans);

  font-size: 0.98rem;

  line-height: 1.45;

  resize: none;

  min-height: 24px;

  max-height: 180px;

  overflow-y: auto;

}



.atom-textarea::placeholder {

  color: var(--text-muted);

}



.atom-input-action-bar {

  display: flex;

  justify-content: space-between;

  align-items: center;

  position: relative;

}



/* Engine Mode Selector Pill */

.atom-engine-picker-wrap {

  position: relative;

}



.atom-engine-pill {

  display: flex;

  align-items: center;

  gap: 0.45rem;

  background: rgba(255, 255, 255, 0.04);

  border: 1px solid var(--border-subtle);

  border-radius: var(--radius-pill);

  padding: 0.35rem 0.8rem;

  color: var(--text-primary);

  font-size: 0.82rem;

  font-weight: 700;

  cursor: pointer;

  transition: all 0.2s ease;

}



.atom-engine-pill:hover {

  background: rgba(255, 255, 255, 0.08);

  border-color: var(--border-emerald);

}



.pill-prefix {

  color: var(--text-secondary);

  font-size: 0.8rem;

  font-weight: 600;

  letter-spacing: 0.01em;

}



.pill-badge {

  color: var(--emerald-glow);

  font-weight: 800;

  letter-spacing: 0.01em;

}



.pill-chevron {

  font-size: 0.65rem;

  color: var(--text-muted);

  transition: transform 0.2s ease;

}



/* Engine Mode Floating Dropdown (Clean, State-of-the-Art Master-Detail Layout) */

/* Engine Floating Flyout Menu (Cascading Popover Layout) */

.atom-engine-dropdown {

  position: absolute;

  bottom: calc(100% + 12px);

  right: 0;

  left: auto;

  display: flex;

  flex-direction: row;

  align-items: stretch;

  gap: 10px;

  z-index: 1050;

  pointer-events: auto;

  animation: fadeInPop 0.16s cubic-bezier(0.16, 1, 0.3, 1);

}



@keyframes fadeInPop {

  from { opacity: 0; transform: translateY(6px); }

  to { opacity: 1; transform: translateY(0); }

}



/* Left Card: AI Providers Menu */

.engine-providers-menu {

  width: 245px;

  background: #1e1e1e;

  border: 1px solid rgba(255, 255, 255, 0.12);

  border-radius: 12px;

  padding: 0.55rem;

  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.9), 0 0 1px rgba(255, 255, 255, 0.2);

  display: flex;

  flex-direction: column;

  gap: 0.35rem;

}

/* Guest-Locked Select AI Menu Styles */
.provider-flyout-item.guest-locked {
  cursor: pointer;
}

.provider-flyout-item.guest-locked .flyout-arrow {
  color: #71717a !important;
  font-size: 11px !important;
  margin-left: auto !important;
  transform: none !important;
  transition: color 0.15s ease, transform 0.15s ease;
}

.provider-flyout-item.guest-locked:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

.provider-flyout-item.guest-locked:hover .flyout-arrow {
  color: #f97316 !important;
  transform: scale(1.1) !important;
}

.tier-flyout-item.guest-locked .flyout-arrow,
.engine-option.guest-locked .flyout-arrow {
  color: #71717a !important;
  font-size: 11px !important;
}



/* Right Card: Models Submenu (Floats BESIDE Providers Menu) */

.engine-models-flyout {

  width: 330px;

  background: #1e1e1e;

  border: 1px solid rgba(255, 255, 255, 0.12);

  border-radius: 12px;

  padding: 0.55rem;

  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.9), 0 0 1px rgba(255, 255, 255, 0.2);

  display: flex;

  flex-direction: column;

  gap: 0.35rem;

  animation: flyoutSlideIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);

}



@keyframes flyoutSlideIn {

  from { opacity: 0; transform: translateX(-6px); }

  to { opacity: 1; transform: translateY(0); }

}



.engine-card-header {

  display: flex;

  justify-content: space-between;

  align-items: center;

  padding: 0.25rem 0.4rem 0.45rem 0.4rem;

  border-bottom: 1px solid rgba(255, 255, 255, 0.07);

}



.engine-card-title {

  font-size: 0.72rem;

  font-weight: 700;

  text-transform: uppercase;

  color: #a1a1aa;

  letter-spacing: 0.05em;

}



.flyout-provider-title {

  font-size: 0.76rem;

  font-weight: 700;

  color: var(--emerald-glow);

}



.engine-providers-list {

  display: flex;

  flex-direction: column;

  gap: 0.25rem;

}



.provider-flyout-item {

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 0.5rem 0.65rem;

  background: transparent;

  border: 1px solid transparent;

  border-radius: 8px;

  color: var(--text-secondary);

  cursor: pointer;

  text-align: left;

  transition: all 0.14s ease;

  width: 100%;

  gap: 0.75rem;

}



.provider-flyout-item:hover {

  background: rgba(255, 255, 255, 0.06);

  color: var(--text-primary);

}



.provider-flyout-item.active {

  background: rgba(255, 255, 255, 0.09);

  border-color: rgba(251, 146, 60, 0.3);

  color: #fff;

}



.provider-flyout-item.active .provider-name-text {

  color: var(--emerald-glow);

}



.provider-flyout-item.active .flyout-arrow {

  color: var(--emerald-glow);

}



.flyout-arrow {

  font-size: 0.70rem;

  color: #71717a;

  transition: transform 0.15s ease, color 0.15s ease;

  flex-shrink: 0;

  margin-left: auto;

}



.provider-flyout-item:hover .flyout-arrow {

  transform: translateX(2px);

  color: #f1f5f9;

}

.provider-section-divider {
  padding: 6px 10px 4px;
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(251, 146, 60, 0.85);
  user-select: none;
}

.provider-flyout-item.owner-locked {
  opacity: 0.72;
}

.provider-flyout-item.owner-locked .provider-name-text {
  color: #a1a1aa;
}

.owner-lock-icon {
  font-size: 10px;
  color: #f97316;
  margin-left: 6px;
  vertical-align: middle;
}



.provider-info-meta {

  display: flex;

  flex-direction: column;

  gap: 0.1rem;

  min-width: 0;

}



.provider-name-text {

  font-size: 0.83rem;

  font-weight: 600;

  color: #f1f5f9;

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;

}



.provider-desc-text {

  font-size: 0.68rem;

  color: #71717a;

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;

}



/* Level 2: Models Viewport */

.engine-models-viewport {

  display: flex;

  flex-direction: column;

  min-width: 0;

  max-height: 280px;

  overflow-y: auto;

  padding-right: 2px;

}



.engine-group-pane {

  display: flex;

  flex-direction: column;

  gap: 0.35rem;

}

.engine-group-subheading {
  padding: 8px 12px 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #f97316;
  opacity: 0.9;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 6px;
  margin-bottom: 2px;
}

.engine-group-subheading:first-child {
  margin-top: 0;
}



.engine-option {

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 0.55rem 0.75rem;

  background: transparent;

  border: 1px solid transparent;

  border-radius: var(--radius-sm);

  color: var(--text-secondary);

  cursor: pointer;

  text-align: left;

  transition: all 0.16s ease;

}



.engine-option:hover {

  background: rgba(255, 255, 255, 0.05);

  color: var(--text-primary);

}



.engine-option.active {

  background: rgba(251, 146, 60, 0.08);

  border-color: rgba(251, 146, 60, 0.2);

  color: var(--text-primary);

}



.hot-badge {

  font-size: 0.62rem;

  background: rgba(56, 189, 248, 0.2);

  color: #38bdf8;

  padding: 1px 5px;

  border-radius: 4px;

  font-weight: 800;

  margin-left: 0.35rem;

}



.speed-badge {

  font-size: 0.62rem;

  background: rgba(245, 158, 11, 0.2);

  color: #f59e0b;

  padding: 1px 5px;

  border-radius: 4px;

  font-weight: 800;

  margin-left: 0.35rem;

}



.reason-badge {

  font-size: 0.62rem;

  background: rgba(129, 140, 248, 0.2);

  color: #818cf8;

  padding: 1px 5px;

  border-radius: 4px;

  font-weight: 800;

  margin-left: 0.35rem;

}



.coder-badge {

  font-size: 0.62rem;

  background: rgba(234, 88, 12, 0.2);

  color: #fb923c;

  padding: 1px 5px;

  border-radius: 4px;

  font-weight: 800;

  margin-left: 0.35rem;

}



.fusion-badge {

  font-size: 0.62rem;

  background: linear-gradient(135deg, rgba(236, 72, 153, 0.25), rgba(139, 92, 246, 0.25));

  color: #c084fc;

  border: 1px solid rgba(192, 132, 252, 0.4);

  padding: 1px 6px;

  border-radius: 4px;

  font-weight: 800;

  margin-left: 0.35rem;

  text-shadow: 0 0 8px rgba(192, 132, 252, 0.5);

  display: inline-block;

  vertical-align: middle;

}







.option-left {

  display: flex;

  align-items: center;

  flex: 1;

}



.option-meta {

  display: flex;

  flex-direction: column;

  gap: 0.15rem;

}



.option-title {

  font-size: 0.84rem;

  font-weight: 600;

  color: var(--text-primary);

  display: flex;

  align-items: center;

  gap: 0.4rem;

}



.default-badge {

  font-size: 0.58rem;

  background: rgba(251, 146, 60, 0.15);

  color: var(--emerald-glow);

  padding: 1px 5px;

  border-radius: 4px;

  font-weight: 700;

  letter-spacing: 0.04em;

}



.option-desc {

  font-size: 0.72rem;

  color: #808a9d;

  line-height: 1.35;

}



.option-check {

  font-size: 0.8rem;

  color: var(--emerald-glow);

  opacity: 0;

  margin-left: 0.5rem;

}



.engine-option.active .option-check {

  opacity: 1;

}



/* Providers Menu Footer Link */

.engine-menu-footer {

  margin-top: 0.2rem;

  padding-top: 0.45rem;

  border-top: 1px solid rgba(255, 255, 255, 0.07);

}



.engine-footer-action-btn {

  width: 100%;

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 0.45rem;

  padding: 0.42rem 0.6rem;

  border-radius: 6px;

  background: rgba(255, 255, 255, 0.04);

  border: 1px solid rgba(255, 255, 255, 0.08);

  color: var(--text-secondary);

  font-size: 0.72rem;

  font-weight: 600;

  cursor: pointer;

  transition: all 0.16s ease;

}



.engine-footer-action-btn:hover {

  background: rgba(251, 146, 60, 0.1);

  border-color: rgba(251, 146, 60, 0.3);

  color: var(--emerald-glow);

}



@media (max-width: 620px) {

  .atom-engine-dropdown {

    flex-direction: column;

    align-items: stretch;

    width: calc(100vw - 24px);

    left: 0;

    max-width: 360px;

    gap: 8px;

    max-height: 80vh;

    overflow-y: auto;

  }

  .engine-providers-menu,

  .engine-models-flyout {

    width: 100%;

  }

}



/* Right Tools (Mic & Send) */

.atom-input-right-tools {

  display: flex;

  align-items: center;

  gap: 0.5rem;

}



.atom-round-btn {

  width: 38px;

  height: 38px;

  border-radius: 50%;

  border: none;

  display: flex;

  align-items: center;

  justify-content: center;

  cursor: pointer;

  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);

  position: relative;

}



.atom-round-btn.mic-btn {

  background: rgba(255, 255, 255, 0.06);

  color: var(--text-secondary);

}



.atom-round-btn.mic-btn:hover {

  background: rgba(255, 255, 255, 0.12);

  color: var(--text-primary);

}



.atom-round-btn.mic-btn.recording {

  background: rgba(239, 68, 68, 0.2);

  color: #ef4444;

}



.mic-pulse-ring {

  display: none;

  position: absolute;

  inset: -4px;

  border-radius: 50%;

  border: 2px solid #ef4444;

  animation: pulseRing 1.5s infinite;

}



.atom-round-btn.mic-btn.recording .mic-pulse-ring {

  display: block;

}



@keyframes pulseRing {

  0% { transform: scale(0.95); opacity: 0.9; }

  100% { transform: scale(1.35); opacity: 0; }

}



.atom-round-btn.send-btn {

  background: var(--emerald-primary);

  color: #04100b;

  font-size: 1rem;

  font-weight: 800;

}



.atom-round-btn.send-btn:hover {

  background: var(--emerald-glow);

  box-shadow: 0 0 16px var(--emerald-glow);

  transform: scale(1.05);

}



.atom-round-btn.send-btn:active {

  transform: scale(0.96);

}



/* ==============================================================================

   EXTENSIBLE STUDIO FEATURES MENU (BESIDE MIC)

============================================================================== */

.atom-feature-menu-wrap {

  position: relative;

}



.atom-round-btn.feature-menu-btn {

  background: rgba(255, 255, 255, 0.06);

  color: var(--text-secondary);

  font-size: 0.95rem;

  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);

}



.atom-round-btn.feature-menu-btn:hover {

  background: rgba(251, 146, 60, 0.15);

  color: var(--emerald-glow);

  border: 1px solid var(--border-emerald);

  transform: scale(1.06);

}



.atom-round-btn.feature-menu-btn.active {

  background: rgba(251, 146, 60, 0.22);

  color: var(--emerald-glow);

  border: 1px solid var(--emerald-glow);

  box-shadow: 0 0 12px rgba(251, 146, 60, 0.3);

}



.atom-round-btn.feature-menu-btn.active i {

  transform: rotate(45deg);

  transition: transform 0.2s ease;

}



/* Studio Feature Floating Popover */

.atom-feature-popover {

  position: absolute;

  bottom: calc(100% + 12px);

  right: 0;

  width: 320px;

  background: #1c1c1c;

  border: 1px solid rgba(251, 146, 60, 0.3);

  border-radius: var(--radius-md);

  padding: 0.55rem;

  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.9), 0 0 24px rgba(234, 88, 12, 0.15);

  z-index: 1100;

  display: flex;

  flex-direction: column;

  gap: 0.35rem;

  animation: popoverFadeIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);

}



@keyframes popoverFadeIn {

  from { opacity: 0; transform: translateY(6px) scale(0.97); }

  to { opacity: 1; transform: translateY(0) scale(1); }

}



.feature-popover-header {

  font-size: 0.68rem;

  font-weight: 700;

  text-transform: uppercase;

  color: #64748b;

  padding: 0.35rem 0.65rem 0.25rem 0.65rem;

  letter-spacing: 0.06em;

  border-bottom: 1px solid rgba(255, 255, 255, 0.06);

  margin-bottom: 0.2rem;

}



.feature-popover-item {

  display: flex;

  flex-direction: column;

  padding: 0.65rem 0.85rem;

  background: transparent;

  border: 1px solid transparent;

  border-radius: var(--radius-sm);

  color: var(--text-primary);

  cursor: pointer;

  text-align: left;

  transition: all 0.16s ease;

  width: 100%;

}



.feature-popover-item:hover {

  background: rgba(251, 146, 60, 0.09);

  border-color: rgba(251, 146, 60, 0.25);

  transform: translateX(3px);

}



.feature-item-meta {

  display: flex;

  flex-direction: column;

  gap: 0.2rem;

  flex: 1;

}



.feature-item-title {

  font-size: 0.85rem;

  font-weight: 700;

  color: var(--text-primary);

  display: flex;

  align-items: center;

  gap: 0.45rem;

}



.feature-badge-audio {

  font-size: 0.58rem;

  padding: 1px 5px;

  border-radius: 4px;

  background: rgba(234, 88, 12, 0.2);

  color: var(--emerald-glow);

  font-weight: 700;

  text-transform: uppercase;

}



.feature-item-desc {

  font-size: 0.72rem;

  color: var(--text-muted);

  line-height: 1.35;

}



/* ==============================================================================

   CREATE SLIDES FROM NOTES MODAL DIALOG

============================================================================== */

.atom-modal-overlay {

  position: fixed;

  inset: 0;

  background: rgba(0, 0, 0, 0.82);

  backdrop-filter: blur(10px);

  -webkit-backdrop-filter: blur(10px);

  z-index: 2100;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 1.25rem;

  animation: modalFadeIn 0.2s ease-out;

}



@keyframes modalFadeIn {

  from { opacity: 0; }

  to { opacity: 1; }

}



.atom-modal-card {

  background: #1c1c1c;

  border: 1px solid var(--border-emerald);

  border-radius: var(--radius-lg);

  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(234, 88, 12, 0.18);

  width: 100%;

  max-width: 640px;

  overflow: hidden;

  display: flex;

  flex-direction: column;

  animation: modalSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);

}



@keyframes modalSlideUp {

  from { opacity: 0; transform: translateY(16px) scale(0.98); }

  to { opacity: 1; transform: translateY(0) scale(1); }

}



.atom-modal-header {

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 1.25rem 1.5rem;

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);

}



.atom-modal-title-wrap {

  display: flex;

  align-items: center;

  gap: 0.85rem;

}



.modal-title-icon {

  width: 42px;

  height: 42px;

  border-radius: 12px;

  background: rgba(234, 88, 12, 0.15);

  border: 1px solid var(--border-emerald);

  display: flex;

  align-items: center;

  justify-content: center;

  font-size: 1.25rem;

  color: var(--emerald-glow);

}



.atom-modal-title {

  font-size: 1.15rem;

  font-weight: 700;

  color: var(--text-primary);

}



.atom-modal-subtitle {

  font-size: 0.8rem;

  color: var(--text-muted);

  margin-top: 0.15rem;

}



.modal-close-btn {

  background: transparent;

  border: none;

  color: var(--text-muted);

  font-size: 1.1rem;

  cursor: pointer;

  padding: 0.4rem;

  border-radius: 6px;

  transition: all 0.18s ease;

}



.modal-close-btn:hover {

  color: var(--text-primary);

  background: rgba(255, 255, 255, 0.08);

}



.atom-modal-body {

  padding: 1.35rem 1.5rem;

  display: flex;

  flex-direction: column;

  gap: 0.95rem;

}



.modal-field-group {

  display: flex;

  flex-direction: column;

  gap: 0.45rem;

}



.modal-label-row {

  display: flex;

  justify-content: space-between;

  align-items: center;

}



.modal-label {

  font-size: 0.82rem;

  font-weight: 600;

  color: var(--text-secondary);

}



.modal-link-btn {

  background: transparent;

  border: none;

  color: var(--emerald-glow);

  font-size: 0.78rem;

  font-weight: 600;

  cursor: pointer;

  display: flex;

  align-items: center;

  gap: 0.35rem;

  transition: color 0.15s ease;

}



.modal-link-btn:hover {

  color: #fdba74;

  text-decoration: underline;

}



.modal-notes-textarea {

  width: 100%;

  background: #131313;

  border: 1px solid rgba(255, 255, 255, 0.12);

  border-radius: var(--radius-sm);

  color: var(--text-primary);

  font-family: var(--font-sans);

  font-size: 0.92rem;

  line-height: 1.55;

  padding: 0.85rem 1rem;

  resize: vertical;

  min-height: 160px;

  outline: none;

  transition: border-color 0.2s ease, box-shadow 0.2s ease;

}



.modal-notes-textarea:focus {

  border-color: var(--emerald-glow);

  box-shadow: 0 0 16px rgba(251, 146, 60, 0.2);

}



.modal-tips {

  display: flex;

  align-items: center;

  gap: 0.6rem;

  font-size: 0.76rem;

  color: var(--text-muted);

  line-height: 1.4;

  background: rgba(255, 255, 255, 0.03);

  padding: 0.65rem 0.85rem;

  border-radius: var(--radius-sm);

  border: 1px solid rgba(255, 255, 255, 0.05);

}



.atom-modal-footer {

  display: flex;

  justify-content: flex-end;

  align-items: center;

  gap: 0.75rem;

  padding: 1rem 1.5rem;

  border-top: 1px solid rgba(255, 255, 255, 0.08);

  background: rgba(20, 20, 20, 0.6);

}



.modal-btn-cancel {

  background: rgba(255, 255, 255, 0.06);

  border: 1px solid var(--border-subtle);

  border-radius: var(--radius-sm);

  color: var(--text-secondary);

  padding: 0.6rem 1.25rem;

  font-size: 0.85rem;

  font-weight: 600;

  cursor: pointer;

  transition: all 0.18s ease;

}



.modal-btn-cancel:hover {

  background: rgba(255, 255, 255, 0.1);

  color: var(--text-primary);

}



.modal-btn-generate {

  background: var(--emerald-primary);

  border: 1px solid var(--emerald-primary);

  border-radius: var(--radius-sm);

  color: #04100b;

  padding: 0.6rem 1.35rem;

  font-size: 0.88rem;

  font-weight: 700;

  cursor: pointer;

  display: flex;

  align-items: center;

  gap: 0.5rem;

  transition: all 0.2s ease;

  box-shadow: 0 4px 15px rgba(234, 88, 12, 0.35);

}



.modal-btn-generate:hover {

  background: var(--emerald-glow);

  box-shadow: 0 0 20px rgba(251, 146, 60, 0.55);

  transform: translateY(-1px);

}



/* ==============================================================================

   SETTINGS MODAL

============================================================================== */

.atom-modal-backdrop {

  position: fixed;

  inset: 0;

  background: rgba(0, 0, 0, 0.75);

  backdrop-filter: blur(8px);

  z-index: 2000;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 1rem;

  animation: fadeInModal 0.2s ease-out;

}



@keyframes fadeInModal {

  from { opacity: 0; }

  to { opacity: 1; }

}



.atom-modal-card {

  width: 100%;

  max-width: 480px;

  background: #111722;

  border: 1px solid var(--border-emerald);

  border-radius: var(--radius-lg);

  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(251, 146, 60, 0.2);

  overflow: hidden;

}



.modal-head {

  display: flex;

  justify-content: space-between;

  align-items: center;

  padding: 1.15rem 1.35rem;

  border-bottom: 1px solid var(--border-subtle);

}



.modal-head-title {

  display: flex;

  align-items: center;

  gap: 0.65rem;

}



.modal-head-title h3 {

  font-size: 1.05rem;

  color: var(--text-primary);

  font-weight: 700;

}



.modal-body {

  padding: 1.35rem;

  display: flex;

  flex-direction: column;

  gap: 1.25rem;

}



.settings-engine-card {

  background: rgba(0, 0, 0, 0.35);

  border: 1px solid var(--border-subtle);

  border-radius: var(--radius-sm);

  padding: 0.9rem;

}



.card-status-row {

  display: flex;

  align-items: center;

  gap: 0.5rem;

  font-size: 0.88rem;

  margin-bottom: 0.4rem;

}



.status-indicator-dot {

  width: 8px;

  height: 8px;

  border-radius: 50%;

  background: var(--emerald-glow);

  box-shadow: 0 0 8px var(--emerald-glow);

}



.card-desc {

  font-size: 0.78rem;

  color: var(--text-muted);

  line-height: 1.4;

}



.api-locked-info-card {

  background: rgba(0, 0, 0, 0.45);

  border: 1px solid var(--border-emerald);

  border-radius: var(--radius-sm);

  padding: 1.1rem;

  display: flex;

  flex-direction: column;

  gap: 0.65rem;

}



.locked-badge-header {

  display: flex;

  align-items: center;

  gap: 0.55rem;

  font-size: 0.92rem;

  color: var(--text-primary);

  font-weight: 700;

}



.locked-desc {

  font-size: 0.8rem;

  color: var(--text-secondary);

  line-height: 1.5;

}



.locked-status-pill {

  display: inline-flex;

  align-items: center;

  gap: 0.45rem;

  padding: 0.3rem 0.65rem;

  background: var(--emerald-soft);

  border: 1px solid var(--border-emerald);

  border-radius: var(--radius-pill);

  font-size: 0.74rem;

  font-weight: 600;

  color: var(--emerald-glow);

  width: fit-content;

}



.settings-actions-row {

  display: flex;

  justify-content: flex-end;

  gap: 0.65rem;

  margin-top: 0.35rem;

}



.atom-btn-primary {

  background: var(--emerald-primary);

  border: none;

  color: #04100b;

  font-size: 0.84rem;

  font-weight: 700;

  padding: 0.6rem 1.15rem;

  border-radius: var(--radius-sm);

  cursor: pointer;

  transition: all 0.2s ease;

}



.atom-btn-primary:hover {

  background: var(--emerald-glow);

  box-shadow: 0 0 14px var(--emerald-glow);

}







/* ==============================================================================

   RESPONSIVE OPTIMIZATION

============================================================================== */

@media (max-width: 640px) {

  .atom-top-bar {

    padding: 0 0.85rem;

  }



  .atom-hero-greeting {

    font-size: 1.75rem;

  }



  .greeting-salutation {

    font-size: 1.85rem;

  }



  .greeting-subprompt {

    font-size: 1.15rem;

  }



  .atom-suggestions-grid {

    grid-template-columns: 1fr;

  }



  .atom-locked-input-container {

    padding: 0.5rem 0.65rem 0.85rem 0.65rem;

  }



  .atom-sidebar-drawer {

    width: 280px;

  }

}



/* ==============================================================================

   FLAGSHIP CLASS MODE & SLIDE-IN STUDIO DRAWER STYLES

   ============================================================================== */



/* Top Bar Quick Mode Badge */

.atom-mode-badge-btn {

  display: inline-flex;

  align-items: center;

  gap: 0.5rem;

  background: rgba(251, 146, 60, 0.08);

  border: 1px solid var(--border-emerald);

  color: var(--emerald-glow);

  padding: 0.38rem 0.95rem;

  border-radius: var(--radius-pill);

  font-size: 0.82rem;

  font-weight: 600;

  cursor: pointer;

  transition: all 0.25s ease;

  position: relative;

}



.atom-mode-badge-btn:hover {

  background: rgba(251, 146, 60, 0.16);

  border-color: var(--emerald-glow);

  box-shadow: 0 0 16px rgba(251, 146, 60, 0.3);

  transform: translateY(-1px);

}



.atom-mode-badge-btn.active {

  background: linear-gradient(135deg, rgba(234, 88, 12, 0.25), rgba(251, 146, 60, 0.35));

  border-color: var(--emerald-glow);

  box-shadow: 0 0 20px rgba(251, 146, 60, 0.4);

  color: #fff;

}



.class-mode-pulse {

  width: 7px;

  height: 7px;

  background: var(--emerald-glow);

  border-radius: 50%;

  display: inline-block;

  box-shadow: 0 0 8px var(--emerald-glow);

  animation: pulseBeacon 1.8s infinite;

}



.atom-top-action-btn {

  display: inline-flex;

  align-items: center;

  gap: 0.45rem;

  background: rgba(255, 255, 255, 0.04);

  border: 1px solid var(--border-subtle);

  color: var(--text-primary);

  padding: 0.4rem 0.85rem;

  border-radius: var(--radius-sm);

  font-size: 0.82rem;

  font-weight: 600;

  cursor: pointer;

  transition: all 0.2s ease;

}



.atom-top-action-btn:hover {

  background: rgba(251, 146, 60, 0.1);

  border-color: var(--border-emerald);

  color: var(--emerald-glow);

}



.btn-top-label {

  font-size: 0.8rem;

}



/* Engine Dropdown Flagship Item */

.option-icon-box {

  width: 28px;

  height: 28px;

  border-radius: 6px;

  background: rgba(251, 146, 60, 0.1);

  display: flex;

  align-items: center;

  justify-content: center;

  color: var(--emerald-glow);

  font-size: 0.85rem;

  flex-shrink: 0;

}



.flagship-badge {

  font-size: 0.62rem;

  font-weight: 800;

  letter-spacing: 0.05em;

  background: linear-gradient(135deg, #ea580c, #c2410c);

  color: #04100b;

  padding: 0.15rem 0.45rem;

  border-radius: 4px;

  margin-left: 0.35rem;

  text-transform: uppercase;

}



/* Hero Suggestion Chips */

.atom-hero-suggestions {

  display: flex;

  flex-wrap: wrap;

  gap: 0.65rem;

  justify-content: center;

  margin-top: 1.5rem;

  max-width: 620px;

}



.hero-chip-btn {

  display: inline-flex;

  align-items: center;

  gap: 0.55rem;

  padding: 0.55rem 1rem;

  background: rgba(255, 255, 255, 0.03);

  border: 1px solid var(--border-subtle);

  border-radius: var(--radius-pill);

  color: var(--text-secondary);

  font-size: 0.82rem;

  font-weight: 500;

  cursor: pointer;

  transition: all 0.22s ease;

}



.hero-chip-btn:hover {

  background: rgba(251, 146, 60, 0.08);

  border-color: var(--border-emerald);

  color: var(--text-primary);

  transform: translateY(-2px);

  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);

}



/* ==============================================================================

   CLASS MODE RECORDING HUD (LIVE LECTURE BAR)

   ============================================================================== */

.class-mode-hud {

  position: relative;

  width: calc(100% - 2rem);

  max-width: 900px;

  margin: 0.5rem auto 0 auto;

  background: rgba(24, 24, 27, 0.94);

  backdrop-filter: blur(20px);

  border: 1px solid var(--border-emerald);

  border-radius: var(--radius-md);

  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(251, 146, 60, 0.15);

  padding: 0.75rem 1.15rem;

  z-index: 50;

  animation: slideDownFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);

}



@keyframes slideDownFade {

  from { opacity: 0; transform: translateY(-10px); }

  to { opacity: 1; transform: translateY(0); }

}



.class-hud-inner {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 1rem;

  flex-wrap: wrap;

}



.class-hud-left {

  display: flex;

  align-items: center;

  gap: 0.75rem;

}



.class-rec-beacon {

  width: 12px;

  height: 12px;

  background: #ef4444;

  border-radius: 50%;

  display: inline-block;

  box-shadow: 0 0 10px #ef4444;

}



.class-rec-beacon.recording {

  animation: pulseBeacon 1.2s infinite;

}



@keyframes pulseBeacon {

  0%, 100% { transform: scale(1); opacity: 1; }

  50% { transform: scale(1.4); opacity: 0.4; }

}



.class-hud-meta {

  display: flex;

  flex-direction: column;

}



.class-hud-title {

  font-size: 0.72rem;

  font-weight: 800;

  letter-spacing: 0.06em;

  color: var(--emerald-glow);

  text-transform: uppercase;

}



.class-hud-status {

  font-size: 0.8rem;

  color: var(--text-secondary);

}



.class-rec-timer {

  font-family: var(--font-mono);

  font-size: 1.05rem;

  font-weight: 700;

  color: #f8fafc;

  background: rgba(0, 0, 0, 0.45);

  padding: 0.25rem 0.6rem;

  border-radius: 6px;

  border: 1px solid rgba(255, 255, 255, 0.08);

}



/* Dynamic Waveform Visualizer */

.class-waveform-wrap {

  display: flex;

  align-items: center;

  gap: 4px;

  height: 28px;

  padding: 0 0.5rem;

}



.wave-bar {

  width: 3.5px;

  height: 5px;

  background: var(--emerald-glow);

  border-radius: 2px;

  transition: height 0.15s ease;

  opacity: 0.65;

}



.class-waveform-wrap.active .wave-bar:nth-child(1) { animation: waveAnim 0.8s infinite 0.1s; }

.class-waveform-wrap.active .wave-bar:nth-child(2) { animation: waveAnim 0.7s infinite 0.2s; }

.class-waveform-wrap.active .wave-bar:nth-child(3) { animation: waveAnim 0.9s infinite 0.15s; }

.class-waveform-wrap.active .wave-bar:nth-child(4) { animation: waveAnim 0.6s infinite 0.05s; }

.class-waveform-wrap.active .wave-bar:nth-child(5) { animation: waveAnim 0.85s infinite 0.25s; }

.class-waveform-wrap.active .wave-bar:nth-child(6) { animation: waveAnim 0.75s infinite 0.3s; }

.class-waveform-wrap.active .wave-bar:nth-child(7) { animation: waveAnim 0.95s infinite 0.1s; }

.class-waveform-wrap.active .wave-bar:nth-child(8) { animation: waveAnim 0.65s infinite 0.2s; }



@keyframes waveAnim {

  0%, 100% { height: 4px; opacity: 0.4; }

  50% { height: 26px; opacity: 1; }

}



.class-hud-actions {

  display: flex;

  align-items: center;

  gap: 0.5rem;

}



.class-btn-action {

  display: inline-flex;

  align-items: center;

  gap: 0.45rem;

  padding: 0.45rem 0.9rem;

  border-radius: var(--radius-sm);

  font-size: 0.82rem;

  font-weight: 600;

  cursor: pointer;

  transition: all 0.2s ease;

  border: none;

}



.class-btn-action.rec-btn {

  background: #ef4444;

  color: #fff;

  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);

}



.class-btn-action.rec-btn:hover {

  background: #dc2626;

  box-shadow: 0 0 18px rgba(239, 68, 68, 0.6);

}



.class-btn-action.finish-btn {

  background: var(--emerald-primary);

  color: #04100b;

  box-shadow: 0 0 14px rgba(234, 88, 12, 0.35);

}



.class-btn-action.finish-btn:hover {

  background: var(--emerald-glow);

  box-shadow: 0 0 20px rgba(251, 146, 60, 0.6);

}



.class-btn-action.close-hud-btn {

  background: rgba(255, 255, 255, 0.06);

  color: var(--text-secondary);

  padding: 0.45rem 0.65rem;

}



.class-btn-action.close-hud-btn:hover {

  background: rgba(255, 255, 255, 0.12);

  color: #fff;

}



/* Live Speech Transcription Box */

.class-live-transcript-box {

  margin-top: 0.65rem;

  padding-top: 0.65rem;

  border-top: 1px solid rgba(255, 255, 255, 0.08);

}



.live-ticker-header {

  display: flex;

  align-items: center;

  justify-content: space-between;

  margin-bottom: 0.35rem;

}



.live-ticker-badge {

  display: inline-flex;

  align-items: center;

  gap: 0.35rem;

  font-size: 0.68rem;

  font-weight: 700;

  color: var(--emerald-glow);

  text-transform: uppercase;

  letter-spacing: 0.05em;

}



.live-ticker-hint {

  font-size: 0.7rem;

  color: var(--text-muted);

}



.live-transcript-text {

  font-size: 0.84rem;

  color: var(--text-primary);

  line-height: 1.45;

  max-height: 72px;

  overflow-y: auto;

  font-style: italic;

  background: rgba(0, 0, 0, 0.3);

  padding: 0.45rem 0.65rem;

  border-radius: 6px;

}



/* ==============================================================================

   SLIDE-IN STUDIO DRAWER (#ATOM-SLIDE-DRAWER)

   ============================================================================== */

.atom-slide-drawer {

  position: fixed;

  top: 0;

  right: 0;

  width: 580px;

  max-width: 96vw;

  height: 100vh;

  height: 100dvh;

  background: #141416;

  border-left: 1px solid var(--border-emerald);

  box-shadow: -15px 0 45px rgba(0, 0, 0, 0.8), -5px 0 20px rgba(251, 146, 60, 0.1);

  display: flex;

  flex-direction: column;

  z-index: 1200;

  transform: translateX(105%);

  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);

  overflow: hidden;

}



.atom-slide-drawer.open {

  transform: translateX(0);

}



.atom-slide-backdrop {

  position: fixed;

  inset: 0;

  background: rgba(0, 0, 0, 0.65);

  backdrop-filter: blur(6px);

  z-index: 1100;

  opacity: 0;

  pointer-events: none;

  transition: opacity 0.3s ease;

}



.atom-slide-backdrop.active {

  opacity: 1;

  pointer-events: auto;

}



/* Drawer Header */

.slide-drawer-header {

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 1rem 1.25rem;

  border-bottom: 1px solid var(--border-subtle);

  background: rgba(20, 20, 22, 0.95);

  flex-shrink: 0;

}



.slide-drawer-title-wrap {

  display: flex;

  align-items: center;

  gap: 0.75rem;

}



.slide-drawer-icon {

  width: 38px;

  height: 38px;

  border-radius: 10px;

  background: rgba(251, 146, 60, 0.12);

  border: 1px solid var(--border-emerald);

  color: var(--emerald-glow);

  display: flex;

  align-items: center;

  justify-content: center;

  font-size: 1.1rem;

}



.slide-drawer-title {

  font-size: 1.05rem;

  font-weight: 700;

  color: #fff;

  letter-spacing: -0.01em;

}



.slide-drawer-subtitle {

  font-size: 0.75rem;

  color: var(--text-secondary);

  display: block;

}



/* Drawer Tab Navigation */

.slide-drawer-nav {

  display: flex;

  padding: 0.5rem 1.25rem;

  gap: 0.5rem;

  border-bottom: 1px solid rgba(255, 255, 255, 0.06);

  background: rgba(16, 16, 18, 0.85);

  flex-shrink: 0;

}



.slide-nav-tab {

  flex: 1;

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 0.45rem;

  padding: 0.55rem 0.75rem;

  background: rgba(255, 255, 255, 0.03);

  border: 1px solid transparent;

  border-radius: var(--radius-sm);

  color: var(--text-secondary);

  font-size: 0.82rem;

  font-weight: 600;

  cursor: pointer;

  transition: all 0.2s ease;

}



.slide-nav-tab:hover {

  background: rgba(255, 255, 255, 0.06);

  color: var(--text-primary);

}



.slide-nav-tab.active {

  background: rgba(251, 146, 60, 0.12);

  border-color: var(--border-emerald);

  color: var(--emerald-glow);

}



/* Drawer Content Scroll Area */

.slide-drawer-content {

  flex: 1;

  overflow-y: auto;

  padding: 1.25rem;

  display: flex;

  flex-direction: column;

}



.slide-tab-pane {

  display: none;

  flex-direction: column;

  height: 100%;

}



.slide-tab-pane.active {

  display: flex;

}



/* ==============================================================================

   INTERACTIVE PRESENTATION SLIDE DECK VIEWPORT

   ============================================================================== */

.interactive-slide-viewport {

  display: flex;

  flex-direction: column;

  height: 100%;

  justify-content: space-between;

  gap: 1rem;

}



.slide-deck-card {

  background: linear-gradient(145deg, #18191d, #151515);

  border: 1px solid var(--border-emerald);

  border-radius: var(--radius-lg);

  padding: 1.75rem 1.75rem 1.5rem 1.75rem;

  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(251, 146, 60, 0.08);

  display: flex;

  flex-direction: column;

  flex: 1;

  min-height: 380px;

  position: relative;

  overflow: hidden;

  transition: all 0.3s ease;

}



.slide-card-topbar {

  display: flex;

  align-items: center;

  justify-content: space-between;

  margin-bottom: 1.25rem;

}



.slide-number-badge {

  font-family: var(--font-mono);

  font-size: 0.72rem;

  font-weight: 700;

  text-transform: uppercase;

  background: rgba(251, 146, 60, 0.1);

  color: var(--emerald-glow);

  padding: 0.25rem 0.6rem;

  border-radius: 4px;

  border: 1px solid var(--border-emerald);

}



.btn-slide-tool {

  background: transparent;

  border: 1px solid rgba(255, 255, 255, 0.1);

  color: var(--text-secondary);

  font-size: 0.75rem;

  font-weight: 600;

  padding: 0.25rem 0.55rem;

  border-radius: 4px;

  cursor: pointer;

  display: inline-flex;

  align-items: center;

  gap: 0.35rem;

  transition: all 0.2s ease;

}



.btn-slide-tool:hover {

  border-color: var(--emerald-glow);

  color: #fff;

  background: rgba(251, 146, 60, 0.1);

}



.slide-card-title {

  font-size: 1.45rem;

  font-weight: 800;

  color: #fff;

  line-height: 1.25;

  margin-bottom: 1.25rem;

  letter-spacing: -0.02em;

}



.slide-bullets-list {

  list-style: none;

  display: flex;

  flex-direction: column;

  gap: 0.85rem;

  margin-bottom: 1.5rem;

  flex: 1;

}



.slide-bullet-item {

  display: flex;

  align-items: flex-start;

  gap: 0.75rem;

  font-size: 0.95rem;

  color: #e2e8f0;

  line-height: 1.5;

}



.slide-bullet-dot {

  width: 8px;

  height: 8px;

  background: var(--emerald-glow);

  border-radius: 50%;

  margin-top: 0.45rem;

  flex-shrink: 0;

  box-shadow: 0 0 8px var(--emerald-glow);

}



.slide-takeaway-box {

  background: rgba(251, 146, 60, 0.07);

  border-left: 3px solid var(--emerald-glow);

  padding: 0.85rem 1rem;

  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;

  margin-top: auto;

}



.takeaway-badge {

  font-size: 0.65rem;

  font-weight: 800;

  color: var(--emerald-glow);

  letter-spacing: 0.08em;

  margin-bottom: 0.25rem;

  display: flex;

  align-items: center;

  gap: 0.35rem;

}



.slide-takeaway-box p {

  font-size: 0.88rem;

  color: #f1f5f9;

  line-height: 1.45;

  font-weight: 500;

}



/* Slide Deck Controls Bar */

.slide-controls-bar {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 1rem;

  background: rgba(255, 255, 255, 0.03);

  border: 1px solid var(--border-subtle);

  border-radius: var(--radius-pill);

  padding: 0.45rem 1rem;

}



.btn-slide-nav {

  display: inline-flex;

  align-items: center;

  gap: 0.45rem;

  background: transparent;

  border: none;

  color: var(--text-primary);

  font-size: 0.85rem;

  font-weight: 600;

  cursor: pointer;

  padding: 0.35rem 0.75rem;

  border-radius: var(--radius-pill);

  transition: all 0.2s ease;

}



.btn-slide-nav:hover:not(:disabled) {

  background: rgba(251, 146, 60, 0.15);

  color: var(--emerald-glow);

}



.btn-slide-nav:disabled {

  opacity: 0.35;

  cursor: not-allowed;

}



.slide-dots-indicator {

  display: flex;

  align-items: center;

  gap: 0.45rem;

}



.slide-dot {

  width: 8px;

  height: 8px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.2);

  cursor: pointer;

  transition: all 0.25s ease;

}



.slide-dot.active {

  width: 24px;

  border-radius: 4px;

  background: var(--emerald-glow);

  box-shadow: 0 0 10px var(--emerald-glow);

}



/* ==============================================================================

   SIMPLIFIED NOTES & DEFINITIONS CARDS VIEW

   ============================================================================== */

.notes-content-wrap {

  display: flex;

  flex-direction: column;

  gap: 1.25rem;

}



.notes-card-section {

  background: rgba(255, 255, 255, 0.03);

  border: 1px solid var(--border-subtle);

  border-radius: var(--radius-md);

  padding: 1.15rem;

}



.notes-card-title {

  display: flex;

  align-items: center;

  gap: 0.5rem;

  font-size: 0.95rem;

  font-weight: 700;

  color: var(--emerald-glow);

  margin-bottom: 0.75rem;

  letter-spacing: -0.01em;

}



.eli5-box {

  background: linear-gradient(135deg, rgba(251, 146, 60, 0.08), rgba(234, 88, 12, 0.03));

  border: 1px solid var(--border-emerald);

  border-radius: var(--radius-sm);

  padding: 1rem;

  font-size: 0.96rem;

  line-height: 1.55;

  color: #f8fafc;

  font-style: italic;

}



.definition-item {

  background: rgba(0, 0, 0, 0.25);

  border-left: 3px solid var(--emerald-primary);

  border-radius: 0 6px 6px 0;

  padding: 0.65rem 0.85rem;

  margin-bottom: 0.65rem;

}



.definition-term {

  font-size: 0.88rem;

  font-weight: 700;

  color: var(--emerald-glow);

  margin-bottom: 0.2rem;

}



.definition-meaning {

  font-size: 0.84rem;

  color: var(--text-secondary);

  line-height: 1.45;

}



.high-yield-list {

  list-style: none;

  display: flex;

  flex-direction: column;

  gap: 0.65rem;

}



.high-yield-item {

  display: flex;

  align-items: flex-start;

  gap: 0.6rem;

  font-size: 0.88rem;

  color: #e2e8f0;

  line-height: 1.45;

}



.exam-tip-item {

  background: rgba(239, 68, 68, 0.08);

  border: 1px solid rgba(239, 68, 68, 0.25);

  border-radius: 6px;

  padding: 0.65rem 0.85rem;

  font-size: 0.84rem;

  color: #fca5a5;

  line-height: 1.45;

  margin-bottom: 0.5rem;

}



/* Transcript View */

.raw-transcript-text {

  font-size: 0.88rem;

  color: var(--text-secondary);

  line-height: 1.6;

  white-space: pre-wrap;

  background: rgba(0, 0, 0, 0.35);

  padding: 1rem;

  border-radius: var(--radius-sm);

  border: 1px solid var(--border-subtle);

}



/* Drawer Footer */

.slide-drawer-footer {

  display: flex;

  gap: 0.65rem;

  padding: 1rem 1.25rem;

  border-top: 1px solid var(--border-subtle);

  background: rgba(20, 20, 22, 0.95);

  flex-shrink: 0;

}



.slide-footer-btn {

  flex: 1;

  display: inline-flex;

  align-items: center;

  justify-content: center;

  gap: 0.45rem;

  padding: 0.65rem 0.85rem;

  border-radius: var(--radius-sm);

  font-size: 0.82rem;

  font-weight: 600;

  background: rgba(255, 255, 255, 0.05);

  border: 1px solid var(--border-subtle);

  color: var(--text-primary);

  cursor: pointer;

  transition: all 0.2s ease;

}



.slide-footer-btn:hover {

  background: rgba(255, 255, 255, 0.1);

  border-color: rgba(255, 255, 255, 0.2);

}



.slide-footer-btn.primary {

  background: var(--emerald-primary);

  border-color: var(--emerald-primary);

  color: #04100b;

  font-weight: 700;

}



.slide-footer-btn.primary:hover {

  background: var(--emerald-glow);

  box-shadow: 0 0 16px var(--emerald-glow);

}



/* Floating Quick Open Button */

.btn-floating-slides {

  position: fixed;

  bottom: 96px;

  right: 1.5rem;

  display: inline-flex;

  align-items: center;

  gap: 0.55rem;

  background: linear-gradient(135deg, #ea580c, #c2410c);

  color: #04100b;

  padding: 0.65rem 1.15rem;

  border-radius: var(--radius-pill);

  font-size: 0.85rem;

  font-weight: 700;

  border: none;

  cursor: pointer;

  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(251, 146, 60, 0.4);

  z-index: 100;

  transition: all 0.25s ease;

  animation: floatBounce 3s ease-in-out infinite;

}



.btn-floating-slides:hover {

  transform: scale(1.05);

  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 28px rgba(251, 146, 60, 0.6);

}



@keyframes floatBounce {

  0%, 100% { transform: translateY(0); }

  50% { transform: translateY(-5px); }

}



/* Fullscreen Presentation Mode */

body.fullscreen-slide-mode .atom-slide-drawer {

  width: 100vw;

  max-width: 100vw;

  height: 100vh;

  background: #090a0d;

}



body.fullscreen-slide-mode .slide-deck-card {

  height: 80vh;

  padding: 3rem;

}



body.fullscreen-slide-mode .slide-card-title {

  font-size: 2.5rem;

}



body.fullscreen-slide-mode .slide-bullet-item {

  font-size: 1.45rem;

  gap: 1.25rem;

}



/* Print Optimization for Lecture Notes & Slides */

@media print {

  body * {

    visibility: hidden;

  }

  #pane-notes, #pane-notes * {

    visibility: visible;

  }

  #pane-notes {

    position: absolute;

    left: 0;

    top: 0;

    width: 100%;

    color: #000 !important;

    background: #fff !important;

  }

  .notes-card-section {

    border: 1px solid #ccc !important;

    background: #fff !important;

    color: #000 !important;

    page-break-inside: avoid;

  }

}



/* ==============================================================================

   API KEYS HEADER BUTTON & MODAL

   ============================================================================== */

.atom-header-badge-btn {

  display: inline-flex;

  align-items: center;

  gap: 0.45rem;

  background: rgba(255, 255, 255, 0.05);

  border: 1px solid var(--border-subtle);

  border-radius: var(--radius-pill);

  padding: 0.38rem 0.8rem;

  color: var(--text-secondary);

  font-size: 0.80rem;

  font-weight: 600;

  cursor: pointer;

  transition: all 0.2s ease;

}



.atom-header-badge-btn:hover {

  background: rgba(255, 255, 255, 0.1);

  color: var(--text-primary);

  border-color: var(--border-emerald);

}



.key-field-row {

  display: flex;

  flex-direction: column;

  gap: 0.4rem;

  margin-bottom: 0.95rem;

}



.key-field-meta {

  display: flex;

  justify-content: space-between;

  align-items: center;

}



.key-provider-name {

  font-size: 0.84rem;

  font-weight: 600;

  color: var(--text-primary);

}



.key-status-badge {

  font-size: 0.68rem;

  font-weight: 700;

  padding: 0.15rem 0.5rem;

  border-radius: var(--radius-pill);

  background: rgba(255, 255, 255, 0.08);

  color: var(--text-muted);

}



.key-status-badge.active {

  background: var(--emerald-soft);

  color: var(--emerald-glow);

  border: 1px solid var(--border-emerald);

}



.key-input {

  width: 100%;

  background: rgba(0, 0, 0, 0.45);

  border: 1px solid var(--border-subtle);

  border-radius: var(--radius-sm);

  padding: 0.65rem 0.85rem;

  color: var(--text-primary);

  font-family: var(--font-mono);

  font-size: 0.84rem;

  outline: none;

  transition: border-color 0.2s ease;

}



.key-input:focus {

  border-color: var(--emerald-glow);

}



.key-input:disabled {

  opacity: 0.6;

  cursor: not-allowed;

}



/* ==============================================================================

   PERSONALIZE AI & FIREBASE CLOUD STORAGE MODAL

   ============================================================================== */

.persona-modal-card {

  max-width: 680px;

  width: 95%;

  max-height: 88vh;

  display: flex;

  flex-direction: column;

}



.persona-modal-body {

  overflow-y: auto;

  padding: 1.25rem 1.5rem;

  max-height: calc(88vh - 150px);

}



/* Modal Tabs Navigation */

.persona-tabs-nav {

  display: flex;

  gap: 0.5rem;

  padding: 0.5rem 1.5rem 0.2rem 1.5rem;

  border-bottom: 1px solid var(--border-subtle);

  background: rgba(0, 0, 0, 0.25);

}



.persona-tab-btn {

  display: inline-flex;

  align-items: center;

  gap: 0.45rem;

  background: transparent;

  border: none;

  border-bottom: 2px solid transparent;

  padding: 0.65rem 0.85rem;

  color: var(--text-secondary);

  font-size: 0.84rem;

  font-weight: 600;

  cursor: pointer;

  transition: all 0.2s ease;

  position: relative;

}



.persona-tab-btn:hover {

  color: var(--text-primary);

}



.persona-tab-btn.active {

  color: var(--emerald-glow);

  border-bottom-color: var(--emerald-glow);

}



.memory-count-badge {

  font-size: 0.65rem;

  background: rgba(251, 146, 60, 0.15);

  color: var(--emerald-glow);

  padding: 1px 6px;

  border-radius: var(--radius-pill);

  font-family: var(--font-mono);

}



.cloud-status-dot {

  width: 7px;

  height: 7px;

  border-radius: 50%;

  background: #71717a;

  transition: all 0.2s ease;

}



.cloud-status-dot.active {

  background: var(--emerald-glow);

  box-shadow: 0 0 8px var(--emerald-glow);

}



/* Fields & Labels */

.persona-field-row {

  display: flex;

  flex-direction: column;

  gap: 0.4rem;

  margin-bottom: 1.15rem;

}



.persona-field-label {

  display: flex;

  justify-content: space-between;

  align-items: center;

  font-size: 0.84rem;

  font-weight: 600;

  color: var(--text-primary);

}



.field-hint {

  font-size: 0.72rem;

  font-weight: 450;

  color: var(--text-muted);

}



.persona-textarea {

  width: 100%;

  background: rgba(0, 0, 0, 0.45);

  border: 1px solid var(--border-subtle);

  border-radius: var(--radius-sm);

  padding: 0.75rem 0.9rem;

  color: var(--text-primary);

  font-family: var(--font-sans);

  font-size: 0.85rem;

  line-height: 1.45;

  resize: vertical;

  outline: none;

  transition: border-color 0.2s ease;

}



.persona-textarea:focus {

  border-color: var(--emerald-glow);

}



.persona-textarea.font-mono {

  font-family: var(--font-mono);

  font-size: 0.80rem;

}



/* Tone Selector 4-Card Grid */

.tone-selector-grid {

  display: grid;

  grid-template-columns: repeat(2, 1fr);

  gap: 0.65rem;

}



.tone-card-btn {

  display: flex;

  flex-direction: column;

  gap: 0.25rem;

  padding: 0.75rem 0.85rem;

  border-radius: var(--radius-sm);

  background: rgba(255, 255, 255, 0.03);

  border: 1px solid var(--border-subtle);

  color: var(--text-secondary);

  cursor: pointer;

  text-align: left;

  transition: all 0.18s ease;

}



.tone-card-btn:hover {

  background: rgba(255, 255, 255, 0.06);

  border-color: rgba(255, 255, 255, 0.15);

  color: var(--text-primary);

}



.tone-card-btn.active {

  background: rgba(251, 146, 60, 0.08);

  border-color: var(--emerald-glow);

  color: #fff;

}



.tone-card-header {

  display: flex;

  justify-content: space-between;

  align-items: center;

}



.tone-name {

  font-size: 0.84rem;

  font-weight: 700;

  color: #f1f5f9;

}



.tone-card-btn.active .tone-name {

  color: var(--emerald-glow);

}



.tone-check {

  font-size: 0.75rem;

  color: var(--emerald-glow);

  opacity: 0;

  transition: opacity 0.15s ease;

}



.tone-card-btn.active .tone-check {

  opacity: 1;

}



.tone-desc {

  font-size: 0.72rem;

  color: var(--text-muted);

  line-height: 1.35;

}



/* Memory Bank Styling */

.memory-intro-box {

  display: flex;

  align-items: flex-start;

  gap: 0.65rem;

  background: rgba(251, 146, 60, 0.06);

  border: 1px solid rgba(251, 146, 60, 0.18);

  border-radius: var(--radius-sm);

  padding: 0.75rem 0.95rem;

  font-size: 0.80rem;

  color: var(--text-secondary);

  line-height: 1.4;

  margin-bottom: 1.15rem;

}



.memory-input-row {

  display: flex;

  gap: 0.55rem;

  margin-bottom: 1.15rem;

}



.btn-add-memory {

  display: inline-flex;

  align-items: center;

  gap: 0.45rem;

  padding: 0 1.15rem;

  background: var(--emerald-primary);

  color: #04100b;

  font-size: 0.82rem;

  font-weight: 700;

  border-radius: var(--radius-sm);

  border: none;

  cursor: pointer;

  white-space: nowrap;

  transition: all 0.2s ease;

}



.btn-add-memory:hover {

  background: var(--emerald-glow);

  box-shadow: 0 0 14px var(--emerald-glow);

}



.persona-memory-list {

  display: flex;

  flex-direction: column;

  gap: 0.45rem;

  max-height: 240px;

  overflow-y: auto;

}



.memory-fact-item {

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 0.55rem 0.8rem;

  background: rgba(255, 255, 255, 0.03);

  border: 1px solid var(--border-subtle);

  border-radius: var(--radius-sm);

  transition: all 0.16s ease;

}



.memory-fact-item:hover {

  background: rgba(255, 255, 255, 0.06);

  border-color: rgba(255, 255, 255, 0.15);

}



.memory-fact-text {

  font-size: 0.82rem;

  color: var(--text-primary);

  display: flex;

  align-items: center;

  gap: 0.5rem;

}



.memory-fact-text i {

  color: var(--emerald-glow);

  font-size: 0.70rem;

}



.btn-del-memory {

  background: transparent;

  border: none;

  color: var(--text-muted);

  cursor: pointer;

  font-size: 0.80rem;

  padding: 0.2rem 0.4rem;

  border-radius: 4px;

  transition: all 0.15s ease;

}



.btn-del-memory:hover {

  color: #ef4444;

  background: rgba(239, 68, 68, 0.12);

}



.empty-memories-msg {

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  gap: 0.5rem;

  padding: 2rem 1rem;

  color: var(--text-muted);

  font-size: 0.82rem;

  text-align: center;

}



.empty-memories-msg i {

  font-size: 1.8rem;

  opacity: 0.4;

}



/* Firebase Cloud Banner & Buttons */

.cloud-status-banner {

  display: flex;

  align-items: center;

  gap: 0.85rem;

  background: rgba(255, 255, 255, 0.03);

  border: 1px solid var(--border-subtle);

  border-radius: var(--radius-md);

  padding: 0.85rem 1.1rem;

  margin-bottom: 1.25rem;

  transition: all 0.2s ease;

}



.cloud-status-banner.connected {

  background: rgba(251, 146, 60, 0.07);

  border-color: rgba(251, 146, 60, 0.35);

}



.cloud-banner-icon-wrap {

  width: 42px;

  height: 42px;

  border-radius: 10px;

  background: rgba(255, 255, 255, 0.05);

  display: flex;

  align-items: center;

  justify-content: center;

  flex-shrink: 0;

}



.cloud-status-banner.connected .cloud-banner-icon-wrap {

  background: var(--emerald-soft);

}



.cloud-banner-icon {

  font-size: 1.2rem;

  color: var(--text-muted);

}



.cloud-status-banner.connected .cloud-banner-icon {

  color: var(--emerald-glow);

}



.cloud-banner-info {

  display: flex;

  flex-direction: column;

  gap: 0.15rem;

}



.cloud-banner-title {

  font-size: 0.88rem;

  font-weight: 700;

  color: var(--text-primary);

}



.cloud-status-banner.connected .cloud-banner-title {

  color: var(--emerald-glow);

}



.cloud-banner-desc {

  font-size: 0.74rem;

  color: var(--text-secondary);

  line-height: 1.35;

}



.cloud-config-header {

  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-bottom: 0.35rem;

}



.btn-text-sample {

  background: transparent;

  border: none;

  color: var(--emerald-glow);

  font-size: 0.74rem;

  font-weight: 600;

  cursor: pointer;

  text-decoration: underline;

  text-underline-offset: 3px;

}



.cloud-actions-row {

  display: flex;

  gap: 0.65rem;

  margin-top: 0.85rem;

  margin-bottom: 0.95rem;

}



.cloud-btn-primary {

  display: inline-flex;

  align-items: center;

  gap: 0.45rem;

  padding: 0.6rem 1.15rem;

  background: var(--emerald-primary);

  color: #04100b;

  font-size: 0.82rem;

  font-weight: 700;

  border-radius: var(--radius-sm);

  border: none;

  cursor: pointer;

  transition: all 0.2s ease;

}



.cloud-btn-primary:hover {

  background: var(--emerald-glow);

  box-shadow: 0 0 16px var(--emerald-glow);

}



.cloud-btn-secondary {

  display: inline-flex;

  align-items: center;

  gap: 0.45rem;

  padding: 0.6rem 1rem;

  background: rgba(255, 255, 255, 0.05);

  border: 1px solid var(--border-subtle);

  color: var(--text-primary);

  font-size: 0.82rem;

  font-weight: 600;

  border-radius: var(--radius-sm);

  cursor: pointer;

  transition: all 0.2s ease;

}



.cloud-btn-secondary:hover {

  background: rgba(255, 255, 255, 0.1);

  border-color: rgba(255, 255, 255, 0.2);

}



.cloud-btn-danger {

  display: inline-flex;

  align-items: center;

  gap: 0.45rem;

  padding: 0.6rem 0.9rem;

  background: rgba(239, 68, 68, 0.1);

  border: 1px solid rgba(239, 68, 68, 0.25);

  color: #ef4444;

  font-size: 0.82rem;

  font-weight: 600;

  border-radius: var(--radius-sm);

  cursor: pointer;

  transition: all 0.2s ease;

}



.cloud-btn-danger:hover {

  background: rgba(239, 68, 68, 0.2);

}



/* Cloud Button in Top Bar Connected Glow */

.cloud-sync-btn.connected {

  border-color: rgba(251, 146, 60, 0.4);

  background: rgba(251, 146, 60, 0.08);

  color: var(--emerald-glow);

}



.cloud-sync-btn.connected #cloud-sync-icon {

  color: var(--emerald-glow);

}



.cloud-sync-btn.syncing #cloud-sync-icon {

  animation: spinSlow 1.5s linear infinite;

  color: #f59e0b;

}



@keyframes spinSlow {

  from { transform: rotate(0deg); }

  to { transform: rotate(360deg); }

}



@media (max-width: 640px) {

  .tone-selector-grid {

    grid-template-columns: 1fr;

  }

  .persona-tabs-nav {

    overflow-x: auto;

    padding: 0.5rem 0.75rem;

  }

  .persona-tab-btn {

    font-size: 0.76rem;

    padding: 0.5rem 0.65rem;

  }

}



/* ======================================================== */

/*  MULTIMODAL ATTACHMENTS & FILE UPLOAD STYLING             */

/* ======================================================== */



/* Drag-and-Drop Active Box Glow */

.atom-input-glass-box.drag-over {

  border-color: var(--emerald-glow) !important;

  box-shadow: 0 0 24px rgba(251, 146, 60, 0.35), inset 0 0 16px rgba(251, 146, 60, 0.15) !important;

  background: rgba(18, 30, 24, 0.85) !important;

}



/* Attach Paperclip Button */

.atom-round-btn.attach-btn {

  background: rgba(255, 255, 255, 0.05);

  border: 1px solid var(--border-subtle);

  color: var(--text-secondary);

  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);

}



.atom-round-btn.attach-btn:hover {

  background: rgba(251, 146, 60, 0.12);

  border-color: rgba(251, 146, 60, 0.4);

  color: var(--emerald-glow);

  transform: translateY(-1px);

}



/* Input Tray inside Glass Box */

.atom-attachment-tray {

  display: flex;

  flex-wrap: wrap;

  gap: 0.55rem;

  padding: 0.35rem 0.2rem 0.6rem 0.2rem;

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);

  margin-bottom: 0.45rem;

  animation: fadeInTray 0.2s ease-out;

}



@keyframes fadeInTray {

  from { opacity: 0; transform: translateY(-4px); }

  to { opacity: 1; transform: translateY(0); }

}



/* Attachment Item Card in Tray */

.attachment-card {

  position: relative;

  display: flex;

  align-items: center;

  gap: 0.5rem;

  background: rgba(255, 255, 255, 0.06);

  border: 1px solid rgba(255, 255, 255, 0.14);

  border-radius: var(--radius-sm);

  padding: 0.35rem 0.6rem;

  max-width: 240px;

  backdrop-filter: blur(8px);

  transition: all 0.2s ease;

}



.attachment-card:hover {

  border-color: rgba(251, 146, 60, 0.4);

  background: rgba(251, 146, 60, 0.08);

}



/* Photo Thumbnail Card */

.attachment-card.is-image {

  padding: 0.25rem 0.45rem 0.25rem 0.25rem;

}



.attachment-thumb {

  width: 38px;

  height: 38px;

  border-radius: 6px;

  object-fit: cover;

  border: 1px solid rgba(255, 255, 255, 0.2);

  background: #000;

  flex-shrink: 0;

}



/* Document Icon */

.attachment-doc-icon {

  width: 34px;

  height: 34px;

  border-radius: 6px;

  background: rgba(251, 146, 60, 0.12);

  border: 1px solid rgba(251, 146, 60, 0.25);

  display: flex;

  align-items: center;

  justify-content: center;

  color: var(--emerald-glow);

  font-size: 0.95rem;

  flex-shrink: 0;

}



/* Card Meta Details */

.attachment-info {

  display: flex;

  flex-direction: column;

  min-width: 0;

  flex: 1;

}



.attachment-name {

  font-size: 0.78rem;

  font-weight: 600;

  color: var(--text-primary);

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;

  max-width: 130px;

}



.attachment-size {

  font-size: 0.68rem;

  color: var(--text-muted);

}



/* Remove 'X' Button */

.attachment-remove-btn {

  background: rgba(0, 0, 0, 0.4);

  border: 1px solid rgba(255, 255, 255, 0.15);

  color: var(--text-muted);

  width: 20px;

  height: 20px;

  border-radius: 50%;

  display: flex;

  align-items: center;

  justify-content: center;

  font-size: 0.65rem;

  cursor: pointer;

  transition: all 0.15s ease;

  flex-shrink: 0;

  margin-left: 0.15rem;

}



.attachment-remove-btn:hover {

  background: #ef4444;

  border-color: #ef4444;

  color: #fff;

  transform: scale(1.1);

}



/* ======================================================== */

/*  ATTACHMENT RENDERING INSIDE MESSAGE BUBBLES             */

/* ======================================================== */



.msg-attachments-wrap {

  display: flex;

  flex-wrap: wrap;

  gap: 0.6rem;

  margin-bottom: 0.75rem;

}



/* Image Thumbnails in Message */

.msg-photo-grid {

  display: flex;

  flex-wrap: wrap;

  gap: 0.5rem;

}



.msg-photo-item {

  position: relative;

  border-radius: var(--radius-sm);

  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.15);

  cursor: pointer;

  transition: transform 0.2s ease, box-shadow 0.2s ease;

  max-width: 220px;

  max-height: 170px;

}



.msg-photo-item:hover {

  transform: scale(1.02);

  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 12px rgba(251, 146, 60, 0.3);

  border-color: var(--emerald-glow);

}



.msg-photo-item img {

  width: 100%;

  height: 100%;

  max-height: 160px;

  object-fit: cover;

  display: block;

}



.msg-photo-badge {

  position: absolute;

  bottom: 6px;

  right: 6px;

  background: rgba(0, 0, 0, 0.7);

  backdrop-filter: blur(4px);

  color: #fff;

  font-size: 0.65rem;

  padding: 0.15rem 0.4rem;

  border-radius: 4px;

  pointer-events: none;

}



/* Document Chip in Message */

.msg-doc-pill {

  display: inline-flex;

  align-items: center;

  gap: 0.5rem;

  background: rgba(255, 255, 255, 0.05);

  border: 1px solid rgba(255, 255, 255, 0.12);

  border-radius: var(--radius-sm);

  padding: 0.4rem 0.7rem;

  text-decoration: none;

  color: var(--text-primary);

  font-size: 0.8rem;

  backdrop-filter: blur(6px);

  transition: all 0.2s ease;

}



.msg-doc-pill:hover {

  background: rgba(251, 146, 60, 0.1);

  border-color: rgba(251, 146, 60, 0.35);

  color: var(--emerald-glow);

}



.msg-doc-icon {

  color: var(--emerald-glow);

  font-size: 0.95rem;

}



.msg-doc-name {

  font-weight: 600;

  max-width: 180px;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

}



.msg-doc-size {

  color: var(--text-muted);

  font-size: 0.7rem;

}



/* ======================================================== */

/*  IMAGE LIGHTBOX MODAL                                    */

/* ======================================================== */



.atom-lightbox-overlay {

  position: fixed;

  inset: 0;

  background: rgba(0, 0, 0, 0.9);

  backdrop-filter: blur(14px);

  z-index: 9999;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 2rem;

  animation: lightboxFadeIn 0.2s ease-out;

}



@keyframes lightboxFadeIn {

  from { opacity: 0; }

  to { opacity: 1; }

}



.lightbox-close-btn {

  position: absolute;

  top: 1.5rem;

  right: 1.8rem;

  background: rgba(255, 255, 255, 0.1);

  border: 1px solid rgba(255, 255, 255, 0.2);

  color: #fff;

  font-size: 1.8rem;

  width: 44px;

  height: 44px;

  border-radius: 50%;

  display: flex;

  align-items: center;

  justify-content: center;

  cursor: pointer;

  transition: all 0.2s ease;

  line-height: 1;

}



.lightbox-close-btn:hover {

  background: #ef4444;

  border-color: #ef4444;

  transform: scale(1.1);

}



.lightbox-content-box {

  display: flex;

  flex-direction: column;

  align-items: center;

  max-width: 90vw;

  max-height: 90vh;

}



.lightbox-content-box img {

  max-width: 100%;

  max-height: 80vh;

  object-fit: contain;

  border-radius: var(--radius-md);

  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(251, 146, 60, 0.2);

  border: 1px solid rgba(255, 255, 255, 0.15);

}



.lightbox-caption {

  margin-top: 0.85rem;

  color: var(--text-secondary);

  font-size: 0.88rem;

  text-align: center;

}









/* ==============================================================================

   CLAUDE-STYLE INTERACTIVE ARTIFACT SPLIT SCREEN & GAME STUDIO

   ============================================================================== */



.atom-main-stage {

  flex: 1;

  display: flex;

  flex-direction: row;

  width: 100%;

  height: 100%;

  min-height: 0;

  overflow: hidden;

  position: relative;

}



.atom-chat-pane {

  flex: 1 1 100%;

  width: 100%;

  height: 100%;

  min-width: 0;

  display: flex;

  flex-direction: column;

  overflow: hidden;

  position: relative;

  transition: flex 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.35s cubic-bezier(0.16, 1, 0.3, 1);

}



/* Split Screen Mode: 50/50 Side-by-Side */

.atom-app-layout.artifact-open .atom-chat-pane {

  flex: 1 1 50%;

  width: 50%;

  max-width: 52%;

}



.atom-app-layout.artifact-open .atom-chat-viewport {

  padding-left: 1.25rem;

  padding-right: 1.25rem;

}



.atom-app-layout.artifact-open .atom-locked-input-container {

  max-width: 100%;

  padding-left: 1.25rem;

  padding-right: 1.25rem;

}



/* Right-Side Interactive Artifact Studio Pane */

.atom-artifact-pane {

  width: 0;

  flex: 0 0 0;

  height: 100%;

  overflow: hidden;

  background: #0c0e12;

  border-left: 1px solid transparent;

  display: flex;

  flex-direction: column;

  transition: flex 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;

  opacity: 0;

  pointer-events: none;

  position: relative;

  z-index: 75;

}



.atom-app-layout.artifact-open .atom-artifact-pane {

  width: 50%;

  flex: 1 1 50%;

  opacity: 1;

  pointer-events: auto;

  border-left: 1px solid rgba(251, 146, 60, 0.2);

  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.7);

}



/* Artifact Header */

.artifact-pane-header {

  height: 56px;

  min-height: 56px;

  background: #13161c;

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 0 1.25rem;

  gap: 1rem;

  z-index: 10;

  flex-shrink: 0;

}



.artifact-header-left {

  display: flex;

  align-items: center;

  gap: 0.75rem;

  min-width: 0;

}



.artifact-icon-wrap {

  width: 34px;

  height: 34px;

  border-radius: 9px;

  background: rgba(234, 88, 12, 0.12);

  border: 1px solid rgba(251, 146, 60, 0.25);

  display: flex;

  align-items: center;

  justify-content: center;

  font-size: 0.95rem;

  color: #fb923c;

  flex-shrink: 0;

}



.artifact-header-meta {

  display: flex;

  flex-direction: column;

  min-width: 0;

}



.artifact-title-row {

  display: flex;

  align-items: center;

  gap: 0.5rem;

}



.artifact-title {

  font-family: 'Plus Jakarta Sans', sans-serif;

  font-size: 0.92rem;

  font-weight: 600;

  color: #f8fafc;

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;

  margin: 0;

}



.artifact-badge {

  font-size: 0.65rem;

  font-weight: 600;

  padding: 1px 6px;

  border-radius: 4px;

  background: rgba(251, 146, 60, 0.15);

  color: #fb923c;

  border: 1px solid rgba(251, 146, 60, 0.3);

  letter-spacing: 0.04em;

  text-transform: uppercase;

}



.artifact-subtitle {

  font-size: 0.72rem;

  color: #94a3b8;

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;

}



/* Claude-Style Segmented Navigation (Preview vs Code Pill) */

.artifact-segmented-nav {

  display: inline-flex;

  align-items: center;

  background: rgba(255, 255, 255, 0.05);

  border: 1px solid rgba(255, 255, 255, 0.08);

  border-radius: 8px;

  padding: 3px;

  gap: 2px;

}



.artifact-nav-tab {

  border: none;

  background: transparent;

  color: #94a3b8;

  font-size: 0.8rem;

  font-weight: 500;

  font-family: inherit;

  padding: 4px 12px;

  border-radius: 6px;

  display: inline-flex;

  align-items: center;

  gap: 6px;

  cursor: pointer;

  transition: all 0.2s ease;

}



.artifact-nav-tab:hover {

  color: #f1f5f9;

  background: rgba(255, 255, 255, 0.05);

}



.artifact-nav-tab.active {

  background: rgba(234, 88, 12, 0.18);

  color: #fb923c;

  font-weight: 600;

  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);

}



/* Header Action Buttons */

.artifact-header-actions {

  display: flex;

  align-items: center;

  gap: 0.35rem;

}



.artifact-icon-btn {

  width: 32px;

  height: 32px;

  border-radius: 6px;

  border: 1px solid rgba(255, 255, 255, 0.08);

  background: rgba(255, 255, 255, 0.04);

  color: #94a3b8;

  display: flex;

  align-items: center;

  justify-content: center;

  cursor: pointer;

  transition: all 0.15s ease;

  font-size: 0.85rem;

}



.artifact-icon-btn:hover {

  color: #f1f5f9;

  background: rgba(255, 255, 255, 0.09);

  border-color: rgba(255, 255, 255, 0.15);

}



.artifact-icon-btn.close-btn:hover {

  color: #ef4444;

  background: rgba(239, 68, 68, 0.12);

  border-color: rgba(239, 68, 68, 0.25);

}



/* Preview Viewport & Sandboxed Iframe */

.artifact-body-preview {

  flex: 1;

  width: 100%;

  height: calc(100% - 56px);

  min-height: 0;

  display: flex;

  position: relative;

  background: #000;

  overflow: hidden;

}



#atom-artifact-iframe {

  width: 100%;

  height: 100%;

  border: none;

  background: #000;

  display: block;

}



/* Code Viewport & Monospace Scroll */

.artifact-body-code {

  flex: 1;

  width: 100%;

  height: calc(100% - 56px);

  min-height: 0;

  display: flex;

  flex-direction: column;

  background: #0a0c10;

  overflow: hidden;

}



.artifact-code-toolbar {

  height: 38px;

  background: #11141a;

  border-bottom: 1px solid rgba(255, 255, 255, 0.06);

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 0 1rem;

  flex-shrink: 0;

}



.artifact-code-lang {

  font-size: 0.78rem;

  font-family: 'JetBrains Mono', monospace;

  color: #94a3b8;

  display: flex;

  align-items: center;

  gap: 6px;

}



.artifact-copy-code-btn {

  border: 1px solid rgba(251, 146, 60, 0.25);

  background: rgba(234, 88, 12, 0.1);

  color: #fb923c;

  font-size: 0.75rem;

  font-weight: 500;

  padding: 4px 10px;

  border-radius: 6px;

  display: inline-flex;

  align-items: center;

  gap: 5px;

  cursor: pointer;

  transition: all 0.2s ease;

}



.artifact-copy-code-btn:hover {

  background: rgba(234, 88, 12, 0.2);

  color: #fdba74;

}



.artifact-code-scroll {

  flex: 1;

  overflow: auto;

  padding: 1.25rem;

  font-family: 'JetBrains Mono', monospace;

  font-size: 0.82rem;

  line-height: 1.6;

  background: #0a0c10;

}



.artifact-code-scroll pre {

  margin: 0;

  white-space: pre-wrap;

  word-break: break-word;

  color: #e2e8f0;

}



/* Claude-Style Artifact Pill Card in Chat Stream */

.atom-artifact-card {

  display: flex;

  align-items: center;

  justify-content: space-between;

  background: #151820;

  border: 1px solid rgba(251, 146, 60, 0.25);

  border-radius: 12px;

  padding: 0.85rem 1.15rem;

  margin-top: 1rem;

  gap: 1rem;

  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);

  transition: all 0.2s ease;

  cursor: pointer;

}



.atom-artifact-card:hover {

  border-color: rgba(251, 146, 60, 0.55);

  background: #181d26;

  transform: translateY(-1px);

  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);

}



.artifact-card-left {

  display: flex;

  align-items: center;

  gap: 0.85rem;

  min-width: 0;

}



.artifact-card-icon {

  width: 40px;

  height: 40px;

  border-radius: 10px;

  background: rgba(234, 88, 12, 0.12);

  border: 1px solid rgba(251, 146, 60, 0.25);

  display: flex;

  align-items: center;

  justify-content: center;

  font-size: 1.15rem;

  color: #fb923c;

  flex-shrink: 0;

}



.artifact-card-info {

  display: flex;

  flex-direction: column;

  min-width: 0;

}



.artifact-card-title {

  font-family: 'Plus Jakarta Sans', sans-serif;

  font-size: 0.95rem;

  font-weight: 600;

  color: #f8fafc;

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;

}



.artifact-card-meta {

  font-size: 0.78rem;

  color: #94a3b8;

  margin-top: 2px;

}



.artifact-card-action-btn {

  border: 1px solid rgba(251, 146, 60, 0.3);

  background: rgba(234, 88, 12, 0.15);

  color: #fb923c;

  font-size: 0.82rem;

  font-weight: 600;

  padding: 7px 14px;

  border-radius: 8px;

  display: inline-flex;

  align-items: center;

  gap: 6px;

  cursor: pointer;

  transition: all 0.2s ease;

  flex-shrink: 0;

}



.artifact-card-action-btn:hover {

  background: #ea580c;

  color: #fff;

  box-shadow: 0 0 12px rgba(234, 88, 12, 0.4);

}



/* Responsive Split Layout */

@media (max-width: 900px) {

  .atom-app-layout.artifact-open .atom-chat-pane {

    display: none;

  }

  .atom-app-layout.artifact-open .atom-artifact-pane {

    width: 100%;

    flex: 1 1 100%;

    border-left: none;

  }

}





/* ==============================================================================

   MIDDLE CARD: GEMINI TIERS SUBMENU (FLASH / FLASH-LITE / PRO)

   ============================================================================== */

.engine-tiers-flyout {

  width: 225px;

  background: #1e1e1e;

  border: 1px solid rgba(255, 255, 255, 0.12);

  border-radius: 12px;

  padding: 0.55rem;

  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.9), 0 0 1px rgba(255, 255, 255, 0.2);

  display: flex;

  flex-direction: column;

  gap: 0.35rem;

  animation: flyoutSlideIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);

}



.engine-tiers-list {

  display: flex;

  flex-direction: column;

  gap: 0.3rem;

}



.tier-flyout-item {

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 0.55rem 0.65rem;

  background: transparent;

  border: 1px solid transparent;

  border-radius: 8px;

  color: var(--text-secondary, #94a3b8);

  cursor: pointer;

  transition: all 0.15s ease;

  text-align: left;

  width: 100%;

}



.tier-flyout-item:hover {

  background: rgba(255, 255, 255, 0.05);

  color: var(--text-primary, #fff);

}



.tier-flyout-item.active {

  background: rgba(234, 88, 12, 0.14);

  border-color: rgba(251, 146, 60, 0.35);

  color: #fb923c;

}



.tier-flyout-item.active .provider-name-text {

  color: #fb923c;

  font-weight: 700;

}



.tier-flyout-item.active .flyout-arrow {

  color: #fb923c;

  transform: translateX(2px);

}



/* ==============================================================================

   OBSIDIAN SPATIAL 3D LUXURY ARCHITECTURE (V4.0)

   Bespoke Anodized Tungsten, Optical Glass, True 3D Preserve-3D & OKLab Lighting

   ============================================================================== */



:root {

  --in-oklab: ;

  --in-oklch: ;

  --luxury-obsidian: #0b0d10;

  --luxury-surface: #12151b;

  --luxury-elevated: #171b22;

  --luxury-rim-top: rgba(255, 255, 255, 0.12);

  --luxury-rim-subtle: rgba(255, 255, 255, 0.065);

  --luxury-emerald-edge: rgba(251, 146, 60, 0.32);

  --luxury-shadow-3d:

    0 24px 48px -12px rgba(0, 0, 0, 0.82),

    0 8px 20px -6px rgba(0, 0, 0, 0.65),

    inset 0 1px 0 0 rgba(255, 255, 255, 0.11);

}



@supports (background: linear-gradient(in oklab, white, black)) {

  :root {

    --in-oklab: in oklab;

    --in-oklch: in oklch;

  }

}



/* 1. Ambient 3D Spatial Depth Canvas & Black-Orange Architectural Stage */

.atom-app-layout {

  background:

    radial-gradient(1100px 580px at 50% -8% var(--in-oklab), rgba(234, 88, 12, 0.14), transparent 70%),

    radial-gradient(900px 500px at 85% 95% var(--in-oklab), rgba(249, 115, 22, 0.08), transparent 70%),

    linear-gradient(180deg var(--in-oklab), #0b0d11 0%, #07080b 100%) !important;

  isolation: isolate;

}



.atom-spatial-canvas {

  display: block;

  position: fixed;

  inset: 0;

  width: 100vw;

  height: 100vh;

  pointer-events: none;

  z-index: 0;

  opacity: 0.92;

  visibility: visible;

  transition: opacity 0.4s ease;

}



body.motion-paused .atom-spatial-canvas {

  opacity: 0.25;

}



.atom-main-stage,

.atom-chat-pane {

  position: relative;

  z-index: 2;

}



/* 2. Refined Architectural Top Bar & Segmented 3D Workspace Dock */

.atom-top-bar {

  height: 62px !important;

  padding: 0 1.4rem !important;

  background: linear-gradient(180deg var(--in-oklab), rgba(14, 16, 21, 0.88), rgba(9, 11, 15, 0.82)) !important;

  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;

  box-shadow:

    0 10px 30px rgba(0, 0, 0, 0.45),

    inset 0 -1px 0 0 rgba(255, 255, 255, 0.04) !important;

  backdrop-filter: blur(20px) saturate(140%) !important;

  -webkit-backdrop-filter: blur(20px) saturate(140%) !important;

  z-index: 60 !important;

}



.atom-top-brand {

  display: inline-flex;

  align-items: center;

  gap: 0.55rem;

  padding: 0.36rem 0.85rem;

  margin-left: 0.25rem;

  background: linear-gradient(165deg var(--in-oklab), rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));

  border: 1px solid rgba(255, 255, 255, 0.08);

  border-radius: 9999px;

  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.1), 0 4px 12px rgba(0, 0, 0, 0.35);

}



.top-brand-text {

  font-size: 0.76rem !important;

  font-weight: 700 !important;

  letter-spacing: 0.14em !important;

  color: #f1f5f9 !important;

}



/* Center Segmented Workspace Switcher */

.atom-workspace-segmented {

  display: inline-flex;

  align-items: center;

  gap: 0.25rem;

  padding: 0.26rem;

  background: linear-gradient(180deg var(--in-oklab), rgba(10, 12, 16, 0.9), rgba(16, 19, 25, 0.85));

  border: 1px solid rgba(255, 255, 255, 0.075);

  border-radius: 12px;

  box-shadow:

    inset 0 2px 5px rgba(0, 0, 0, 0.65),

    0 1px 0 rgba(255, 255, 255, 0.05);

}



.ws-seg-btn {

  display: inline-flex;

  align-items: center;

  gap: 0.45rem;

  padding: 0.38rem 0.82rem;

  border-radius: 9px;

  border: 1px solid transparent;

  background: transparent;

  color: #94a3b8;

  font-size: 0.78rem;

  font-weight: 600;

  letter-spacing: 0.01em;

  cursor: pointer;

  transition:

    color 0.2s ease,

    background 0.2s ease,

    border-color 0.2s ease,

    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),

    box-shadow 0.2s ease;

}



.ws-seg-btn i {

  font-size: 0.78rem;

  color: #64748b;

  transition: color 0.2s ease, transform 0.2s ease;

}



.ws-seg-btn:hover {

  color: #f8fafc;

  background: rgba(255, 255, 255, 0.04);

}



.ws-seg-btn:hover i {

  color: #fb923c;

}



.ws-seg-btn.active {

  color: #f8fafc;

  background: linear-gradient(165deg var(--in-oklab), rgba(30, 36, 46, 0.95), rgba(20, 24, 31, 0.95));

  border-color: rgba(251, 146, 60, 0.28);

  box-shadow:

    0 4px 12px rgba(0, 0, 0, 0.5),

    inset 0 1px 0 0 rgba(255, 255, 255, 0.12);

}



.ws-seg-btn.active i {

  color: #fb923c;

}



/* Top Right Utility Buttons */

.atom-top-utility-btn {

  display: inline-flex;

  align-items: center;

  gap: 0.42rem;

  height: 36px;

  padding: 0 0.78rem;

  border-radius: 10px;

  background: linear-gradient(165deg var(--in-oklab), rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));

  border: 1px solid rgba(255, 255, 255, 0.075);

  color: #cbd5e1;

  font-size: 0.78rem;

  font-weight: 600;

  cursor: pointer;

  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.08), 0 4px 10px rgba(0, 0, 0, 0.3);

  transition:

    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),

    border-color 0.2s ease,

    color 0.2s ease,

    box-shadow 0.2s ease;

}



.atom-top-utility-btn i {

  color: #fb923c;

  font-size: 0.78rem;

}



.atom-top-utility-btn:hover {

  color: #ffffff;

  border-color: rgba(251, 146, 60, 0.35);

  transform: translateY(-1px);

  box-shadow:

    inset 0 1px 0 0 rgba(255, 255, 255, 0.14),

    0 8px 18px rgba(0, 0, 0, 0.45),

    0 0 14px rgba(234, 88, 12, 0.14);

}



.atom-top-utility-btn[aria-pressed="false"] i {

  color: #64748b;

}



.top-learn-x-btn {

  display: inline-flex !important;

  align-items: center !important;

  gap: 0.5rem !important;

  height: 36px !important;

  padding: 0 0.95rem !important;

  border-radius: 10px !important;

  background: linear-gradient(165deg var(--in-oklab), rgba(234, 88, 12, 0.22), rgba(194, 65, 12, 0.12)) !important;

  border: 1px solid rgba(251, 146, 60, 0.38) !important;

  color: #fff7ed !important;

  font-size: 0.8rem !important;

  font-weight: 600 !important;

  letter-spacing: 0.01em !important;

  box-shadow:

    inset 0 1px 0 0 rgba(255, 255, 255, 0.18),

    0 6px 16px rgba(0, 0, 0, 0.4),

    0 0 18px rgba(234, 88, 12, 0.12) !important;

  transition:

    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),

    border-color 0.2s ease,

    box-shadow 0.2s ease !important;

}



.top-learn-x-btn:hover {

  transform: translateY(-1px) !important;

  border-color: #fb923c !important;

  box-shadow:

    inset 0 1px 0 0 rgba(255, 255, 255, 0.25),

    0 10px 24px rgba(0, 0, 0, 0.55),

    0 0 22px rgba(251, 146, 60, 0.25) !important;

}



.atom-sidebar-cloud-btn {

  width: 34px;

  height: 34px;

  border-radius: 9px;

  background: rgba(255, 255, 255, 0.04);

  border: 1px solid rgba(255, 255, 255, 0.08);

  color: #fb923c;

  display: inline-flex;

  align-items: center;

  justify-content: center;

  cursor: pointer;

  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;

}



.atom-sidebar-cloud-btn:hover {

  background: rgba(251, 146, 60, 0.12);

  border-color: rgba(251, 146, 60, 0.35);

  transform: translateY(-1px);

}



/* 3. Centerpiece 3D Gyroscopic Orbital Core (#atom-3d-gyro-stage) */

.atom-3d-gyro-stage {

  position: relative;

  width: 118px;

  height: 118px;

  margin: 0 auto 1.35rem auto;

  perspective: 900px;

  display: flex;

  align-items: center;

  justify-content: center;

  user-select: none;

}



.gyro-ambient-halo {

  position: absolute;

  inset: -18px;

  border-radius: 50%;

  background: radial-gradient(circle var(--in-oklab), rgba(234, 88, 12, 0.22) 0%, rgba(234, 88, 12, 0.05) 48%, transparent 72%);

  filter: blur(12px);

  pointer-events: none;

}



.gyro-assembly {

  position: relative;

  width: 96px;

  height: 96px;

  transform-style: preserve-3d;

  transform: rotateX(var(--gyro-rx, 18deg)) rotateY(var(--gyro-ry, -18deg));

  transition: transform 0.18s ease-out;

}



.gyro-ring {

  position: absolute;

  inset: 0;

  border-radius: 50%;

  transform-style: preserve-3d;

  border: 1.5px solid rgba(251, 146, 60, 0.38);

  box-shadow:

    0 0 16px rgba(234, 88, 12, 0.16),

    inset 0 0 12px rgba(251, 146, 60, 0.08);

}



.gyro-ring-x {

  border-color: rgba(251, 146, 60, 0.52);

  animation: gyroOrbitX 14s linear infinite;

  @media (prefers-reduced-motion: reduce) {

    animation: none;

    transform: rotateX(64deg) rotateY(12deg);

  }

}



.gyro-ring-y {

  inset: 8px;

  border-color: rgba(226, 232, 240, 0.28);

  animation: gyroOrbitY 19s linear infinite reverse;

  @media (prefers-reduced-motion: reduce) {

    animation: none;

    transform: rotateY(64deg) rotateX(-18deg);

  }

}



.gyro-ring-z {

  inset: 16px;

  border: 1px dashed rgba(251, 146, 60, 0.42);

  animation: gyroOrbitZ 24s linear infinite;

  @media (prefers-reduced-motion: reduce) {

    animation: none;

    transform: rotateZ(45deg);

  }

}



body.motion-paused .gyro-ring-x,

body.motion-paused .gyro-ring-y,

body.motion-paused .gyro-ring-z,

body.motion-paused .gyro-nucleus-inner {

  animation-play-state: paused !important;

}



.gyro-orbital-node {

  position: absolute;

  top: -4px;

  left: 50%;

  width: 7px;

  height: 7px;

  margin-left: -3.5px;

  border-radius: 50%;

  background: #fdba74;

  box-shadow: 0 0 12px #fb923c, 0 0 4px #ffffff;

}



.gyro-nucleus {

  position: absolute;

  inset: 31px;

  border-radius: 50%;

  transform-style: preserve-3d;

  transform: translateZ(8px);

  display: flex;

  align-items: center;

  justify-content: center;

  background: radial-gradient(circle at 32% 30% var(--in-oklab), #fdba74 0%, #ea580c 42%, #7c2d12 85%, #270c04 100%);

  box-shadow:

    0 0 24px rgba(234, 88, 12, 0.55),

    inset 0 2px 4px rgba(255, 255, 255, 0.45),

    inset 0 -4px 8px rgba(0, 0, 0, 0.65);

}



.gyro-nucleus-inner {

  width: 14px;

  height: 14px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.9);

  filter: blur(2px);

  animation: gyroCoreBreathe 3.6s ease-in-out infinite;

  @media (prefers-reduced-motion: reduce) {

    animation: none;

  }

}



@keyframes gyroOrbitX {

  0% { transform: rotateX(68deg) rotateY(0deg) rotateZ(0deg); }

  100% { transform: rotateX(68deg) rotateY(360deg) rotateZ(360deg); }

}



@keyframes gyroOrbitY {

  0% { transform: rotateY(66deg) rotateX(22deg) rotateZ(0deg); }

  100% { transform: rotateY(66deg) rotateX(22deg) rotateZ(360deg); }

}



@keyframes gyroOrbitZ {

  0% { transform: rotateX(-48deg) rotateY(35deg) rotateZ(0deg); }

  100% { transform: rotateX(-48deg) rotateY(35deg) rotateZ(360deg); }

}



@keyframes gyroCoreBreathe {

  0%, 100% { transform: scale(0.88); opacity: 0.75; }

  50% { transform: scale(1.15); opacity: 1; }

}



/* 4. Executive Hero Typography & 4-Card 3D Perspective Spatial Command Grid */

.atom-hero-stage {

  max-width: 860px !important;

  padding: 1.5rem 1.25rem 1.75rem 1.25rem !important;

}



.greeting-salutation {

  font-size: 2.45rem !important;

  font-weight: 600 !important;

  letter-spacing: -0.03em !important;

  background: linear-gradient(180deg var(--in-oklab), #ffffff 0%, #cbd5e1 100%);

  -webkit-background-clip: text;

  background-clip: text;

  color: transparent !important;

}



.greeting-subprompt {

  font-size: 1.18rem !important;

  font-weight: 400 !important;

  color: #94a3b8 !important;

  margin-top: 0.4rem !important;

  letter-spacing: -0.01em !important;

}



.atom-hero-suggestions {

  display: grid !important;

  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;

  gap: 0.9rem !important;

  width: 100% !important;

  max-width: 780px !important;

  margin-top: 1.85rem !important;

  perspective: 1100px;

}



.hero-chip-btn {

  position: relative !important;

  display: flex !important;

  align-items: center !important;

  justify-content: space-between !important;

  gap: 0.95rem !important;

  padding: 1.05rem 1.15rem !important;

  border-radius: 16px !important;

  background:

    radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(251, 146, 60, 0.11), transparent 65%),

    linear-gradient(165deg var(--in-oklab), rgba(26, 31, 40, 0.88) 0%, rgba(15, 18, 24, 0.92) 100%) !important;

  border: 1px solid rgba(255, 255, 255, 0.085) !important;

  box-shadow:

    0 18px 36px -12px rgba(0, 0, 0, 0.75),

    0 4px 12px rgba(0, 0, 0, 0.45),

    inset 0 1px 0 0 rgba(255, 255, 255, 0.12) !important;

  text-align: left !important;

  transform-style: preserve-3d;

  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(var(--tz, 0px));

  transition:

    transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),

    border-color 0.25s ease,

    box-shadow 0.25s ease !important;

  overflow: hidden;

  isolation: isolate;

}



.hero-chip-btn:hover {

  border-color: rgba(251, 146, 60, 0.42) !important;

  box-shadow:

    0 24px 48px -12px rgba(0, 0, 0, 0.88),

    0 0 24px rgba(234, 88, 12, 0.14),

    inset 0 1px 0 0 rgba(255, 255, 255, 0.2) !important;

}



.hero-card-3d-icon {

  width: 42px;

  height: 42px;

  border-radius: 12px;

  background: linear-gradient(155deg var(--in-oklab), rgba(234, 88, 12, 0.22), rgba(124, 45, 18, 0.38));

  border: 1px solid rgba(251, 146, 60, 0.32);

  box-shadow:

    0 8px 16px rgba(0, 0, 0, 0.45),

    inset 0 1px 0 0 rgba(255, 255, 255, 0.22);

  color: #fb923c;

  font-size: 1rem;

  display: flex;

  align-items: center;

  justify-content: center;

  flex-shrink: 0;

  transform: translateZ(16px);

  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease, border-color 0.2s ease;

}



.hero-chip-btn:hover .hero-card-3d-icon {

  color: #fdba74;

  border-color: rgba(251, 146, 60, 0.6);

  transform: translateZ(22px) scale(1.04);

}



.hero-card-meta {

  display: flex;

  flex-direction: column;

  gap: 0.2rem;

  flex: 1;

  min-width: 0;

  transform: translateZ(10px);

}



.hero-card-title {

  font-size: 0.9rem;

  font-weight: 600;

  color: #f8fafc;

  letter-spacing: -0.01em;

}



.hero-card-desc {

  font-size: 0.74rem;

  color: #94a3b8;

  line-height: 1.38;

  font-weight: 400;

}



.hero-card-arrow {

  font-size: 0.76rem;

  color: #64748b;

  flex-shrink: 0;

  transform: translateZ(12px);

  transition: transform 0.2s ease, color 0.2s ease;

}



.hero-chip-btn:hover .hero-card-arrow {

  color: #fb923c;

  transform: translateZ(16px) translateX(3px);

}



/* 5. 3D Sculpted Bottom Command Console (.atom-input-glass-box) */

.atom-input-glass-box {

  background: linear-gradient(170deg var(--in-oklab), rgba(25, 30, 39, 0.92) 0%, rgba(14, 17, 23, 0.96) 100%) !important;

  border: 1px solid rgba(255, 255, 255, 0.1) !important;

  border-radius: 20px !important;

  padding: 0.95rem 1.05rem 0.72rem 1.2rem !important;

  box-shadow:

    0 24px 60px -12px rgba(0, 0, 0, 0.88),

    0 6px 20px rgba(0, 0, 0, 0.6),

    inset 0 1px 0 0 rgba(255, 255, 255, 0.14) !important;

  backdrop-filter: blur(24px) saturate(150%) !important;

  -webkit-backdrop-filter: blur(24px) saturate(150%) !important;

  transition:

    transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),

    border-color 0.24s ease,

    box-shadow 0.24s ease !important;

}



.atom-input-glass-box:focus-within {

  transform: translateY(-2px);

  border-color: rgba(255, 255, 255, 0.22) !important;

  box-shadow:

    0 28px 68px -10px rgba(0, 0, 0, 0.92),

    inset 0 1px 0 0 rgba(255, 255, 255, 0.22) !important;

}



.atom-engine-pill {

  background: linear-gradient(165deg var(--in-oklab), rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.02)) !important;

  border: 1px solid rgba(255, 255, 255, 0.1) !important;

  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.1), 0 4px 10px rgba(0, 0, 0, 0.35) !important;

  padding: 0.38rem 0.88rem !important;

}



.atom-engine-pill:hover {

  border-color: rgba(251, 146, 60, 0.45) !important;

  transform: translateY(-1px);

}



/* 6. 3-Column Cascading Engine Flyout & Discrete Entry/Exit Transitions */

.atom-engine-dropdown,

.atom-feature-popover {

  opacity: 1;

  translate: 0 0;

  transition:

    display 0.22s,

    opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),

    translate 0.22s cubic-bezier(0.16, 1, 0.3, 1);

  transition-behavior: allow-discrete;

}



@starting-style {

  .atom-engine-dropdown,

  .atom-feature-popover {

    opacity: 0;

    translate: 0 8px;

  }

}



.atom-engine-dropdown:where([hidden], [data-closing]),

.atom-feature-popover:where([hidden], [data-closing]) {

  opacity: 0;

  translate: 0 8px;

}



@media (prefers-reduced-motion: reduce) {

  .atom-engine-dropdown,

  .atom-feature-popover {

    translate: none;

    transition-duration: 0.1s;

  }

  @starting-style {

    .atom-engine-dropdown,

    .atom-feature-popover {

      translate: none;

    }

  }

  .atom-engine-dropdown:where([hidden], [data-closing]),

  .atom-feature-popover:where([hidden], [data-closing]) {

    translate: none;

  }

}



.engine-providers-menu,

.engine-tiers-flyout,

.engine-models-flyout,

.atom-feature-popover {

  background: linear-gradient(168deg var(--in-oklab), rgba(26, 30, 39, 0.97) 0%, rgba(15, 18, 24, 0.98) 100%) !important;

  border: 1px solid rgba(255, 255, 255, 0.11) !important;

  border-radius: 14px !important;

  box-shadow:

    0 28px 60px -12px rgba(0, 0, 0, 0.92),

    0 8px 24px rgba(0, 0, 0, 0.7),

    inset 0 1px 0 0 rgba(255, 255, 255, 0.14) !important;

  backdrop-filter: blur(24px) saturate(150%) !important;

  -webkit-backdrop-filter: blur(24px) saturate(150%) !important;

}



/* 7. Luxury Dialogue Stream Bubbles & Learn X 3D Subject Cards */

.chat-bubble-row.bot .chat-text-box {

  background: transparent !important;

  border: none !important;

  outline: none !important;

  box-shadow: none !important;

  border-radius: 0 !important;

  padding: 0.35rem 0.2rem !important;

  width: 100% !important;

  max-width: 100% !important;

  color: #eceae4 !important;

  font-family: 'Hanken Grotesk', 'Google Sans', Inter, system-ui, sans-serif !important;

  font-size: 0.98rem !important;

  line-height: 1.72 !important;

}



.chat-bubble-row.user .chat-text-box {

  background: #252525 !important;

  border: 1px solid rgba(255, 255, 255, 0.08) !important;

  border-radius: 20px !important;

  box-shadow: none !important;

  color: #f3f4f6 !important;

}



.nb-subject-card {

  transform-style: preserve-3d;

  transform: perspective(950px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(var(--tz, 0px));

  transition:

    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),

    border-color 0.25s ease,

    box-shadow 0.25s ease !important;

  box-shadow:

    0 18px 40px -12px rgba(0, 0, 0, 0.72),

    inset 0 1px 0 0 rgba(255, 255, 255, 0.1) !important;

}



@media (max-width: 860px) {

  .top-bar-center {

    display: none !important;

  }

  .atom-hero-suggestions {

    grid-template-columns: 1fr !important;

  }

  .utility-label {

    display: none;

  }

}







/* ==============================================================================

   ATOM STUDIO AUTHENTICATION & RATE LIMITING SUITE (FOR 30+ CLASSROOM USERS)

   ============================================================================== */



/* 1. Top Bar Auth & Quota Capsule */

.atom-user-nav-wrap {

  position: relative;

  display: flex;

  align-items: center;

}



.auth-top-trigger-btn {

  display: inline-flex;

  align-items: center;

  gap: 0.45rem;

  padding: 0.35rem 0.75rem;

  background: rgba(234, 88, 12, 0.12);

  border: 1px solid rgba(251, 146, 60, 0.35);

  border-radius: var(--radius-pill, 9999px);

  color: #fff;

  font-size: 0.8rem;

  font-weight: 600;

  cursor: pointer;

  transition: all 0.2s ease;

}



.auth-top-trigger-btn:hover {

  background: rgba(234, 88, 12, 0.22);

  border-color: rgba(251, 146, 60, 0.6);

  transform: translateY(-1px);

}



.user-profile-capsule {

  position: relative;

  display: flex;

  align-items: center;

}



.user-capsule-btn {

  display: inline-flex;

  align-items: center;

  gap: 0.5rem;

  padding: 0.3rem 0.65rem 0.3rem 0.4rem;

  background: rgba(255, 255, 255, 0.05);

  border: 1px solid rgba(255, 255, 255, 0.12);

  border-radius: var(--radius-pill, 9999px);

  color: #f1f5f9;

  font-size: 0.8rem;

  font-weight: 600;

  cursor: pointer;

  transition: all 0.18s ease;

}



.user-capsule-btn:hover {

  background: rgba(255, 255, 255, 0.09);

  border-color: rgba(251, 146, 60, 0.35);

}



.user-avatar-circle {

  width: 24px;

  height: 24px;

  border-radius: 50%;

  background: linear-gradient(135deg, #ea580c, #c2410c);

  color: #fff;

  display: inline-flex;

  align-items: center;

  justify-content: center;

  font-size: 0.72rem;

  font-weight: 700;

  text-transform: uppercase;

}



.quota-pill {

  display: inline-flex;

  align-items: center;

  gap: 0.25rem;

  padding: 0.12rem 0.45rem;

  background: rgba(234, 88, 12, 0.16);

  border: 1px solid rgba(251, 146, 60, 0.3);

  border-radius: 4px;

  font-size: 0.7rem;

  font-weight: 700;

  color: #fb923c;

}



.user-chevron {

  font-size: 0.65rem;

  color: #94a3b8;

  transition: transform 0.2s ease;

}



/* User Profile Dropdown Popover */

.user-profile-dropdown {

  position: absolute;

  top: calc(100% + 8px);

  right: 0;

  width: 260px;

  background: #171b22;

  border: 1px solid rgba(255, 255, 255, 0.12);

  border-radius: 12px;

  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.85);

  padding: 0.75rem;

  display: flex;

  flex-direction: column;

  gap: 0.65rem;

  z-index: 1100;

  animation: fadeInPop 0.15s ease;

}



.user-dropdown-header {

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);

  padding-bottom: 0.5rem;

}



.user-dd-name {

  font-size: 0.88rem;

  font-weight: 700;

  color: #fff;

}



.user-dd-email {

  font-size: 0.74rem;

  color: #94a3b8;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

}



.user-dropdown-stats {

  display: flex;

  flex-direction: column;

  gap: 0.4rem;

  padding: 0.35rem 0;

}



.stat-row {

  display: flex;

  justify-content: space-between;

  align-items: center;

  font-size: 0.76rem;

  color: #94a3b8;

}



.stat-val {

  font-weight: 700;

  color: #fff;

}



.user-dd-logout-btn {

  width: 100%;

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 0.45rem;

  padding: 0.45rem;

  background: rgba(239, 68, 68, 0.12);

  border: 1px solid rgba(239, 68, 68, 0.3);

  border-radius: 8px;

  color: #f87171;

  font-size: 0.78rem;

  font-weight: 600;

  cursor: pointer;

  transition: all 0.15s ease;

}



.user-dd-logout-btn:hover {

  background: rgba(239, 68, 68, 0.22);

  color: #fca5a5;

}



/* 2. Auth Modal Card & Form Styling */

.auth-modal-card {

  max-width: 440px !important;

  width: 92% !important;

  background: linear-gradient(168deg, #171b22 0%, #0d1117 100%) !important;

  border: 1px solid rgba(255, 255, 255, 0.13) !important;

  border-radius: 18px !important;

  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;

  padding: 1.5rem !important;

  animation: fadeInPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);

}



.auth-brand-badge {

  display: inline-flex;

  align-items: center;

  gap: 0.4rem;

  font-size: 0.7rem;

  font-weight: 800;

  letter-spacing: 0.1em;

  color: #fb923c;

  margin-bottom: 0.35rem;

  text-transform: uppercase;

}



.auth-google-section {

  display: flex;

  flex-direction: column;

  gap: 0.5rem;

  margin-top: 0.5rem;

}



.btn-google-signin {

  width: 100%;

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 0.75rem;

  padding: 0.65rem 1rem;

  background: #ffffff;

  border: 1px solid #dadce0;

  border-radius: 10px;

  color: #3c4043;

  font-family: 'Google Sans', 'Product Sans', system-ui, sans-serif;

  font-size: 0.92rem;

  font-weight: 600;

  cursor: pointer;

  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);

  transition: all 0.18s ease;

}



.btn-google-signin:hover {

  background: #f8f9fa;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);

  transform: translateY(-1px);

}



.auth-divider {

  display: flex;

  align-items: center;

  text-align: center;

  margin: 1.1rem 0;

  color: #64748b;

  font-size: 0.75rem;

  text-transform: uppercase;

  letter-spacing: 0.05em;

}



.auth-divider::before,

.auth-divider::after {

  content: '';

  flex: 1;

  border-bottom: 1px solid rgba(255, 255, 255, 0.09);

}



.auth-divider span {

  padding: 0 0.75rem;

}



.auth-nav-tabs {

  display: flex;

  background: rgba(255, 255, 255, 0.04);

  border-radius: 10px;

  padding: 3px;

  gap: 4px;

  margin-bottom: 1.1rem;

}



.auth-tab-btn {

  flex: 1;

  padding: 0.45rem 0.75rem;

  border: none;

  background: transparent;

  color: #94a3b8;

  font-size: 0.82rem;

  font-weight: 600;

  border-radius: 8px;

  cursor: pointer;

  transition: all 0.16s ease;

}



.auth-tab-btn.active {

  background: rgba(255, 255, 255, 0.1);

  color: #fff;

  font-weight: 700;

}



.auth-form-pane {

  display: flex;

  flex-direction: column;

  gap: 0.85rem;

}



.auth-field-group {

  display: flex;

  flex-direction: column;

  gap: 0.35rem;

}



.auth-label {

  font-size: 0.75rem;

  font-weight: 600;

  color: #cbd5e1;

}



.auth-input-wrap {

  position: relative;

  display: flex;

  align-items: center;

}



.auth-field-icon {

  position: absolute;

  left: 0.85rem;

  font-size: 0.85rem;

  color: #64748b;

  pointer-events: none;

}



.auth-input {

  width: 100%;

  padding: 0.6rem 0.85rem 0.6rem 2.25rem;

  background: rgba(15, 23, 42, 0.6);

  border: 1px solid rgba(255, 255, 255, 0.12);

  border-radius: 8px;

  color: #fff;

  font-size: 0.88rem;

  outline: none;

  transition: border-color 0.16s ease, box-shadow 0.16s ease;

}



.auth-input:focus {

  border-color: #fb923c;

  box-shadow: 0 0 0 2px rgba(251, 146, 60, 0.2);

}



.auth-error-banner {

  padding: 0.55rem 0.75rem;

  background: rgba(239, 68, 68, 0.15);

  border: 1px solid rgba(239, 68, 68, 0.35);

  border-radius: 8px;

  color: #fca5a5;

  font-size: 0.78rem;

  line-height: 1.4;

}



.auth-submit-btn {

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 0.5rem;

  width: 100%;

  padding: 0.65rem;

  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);

  border: none;

  border-radius: 10px;

  color: #fff;

  font-size: 0.88rem;

  font-weight: 700;

  cursor: pointer;

  margin-top: 0.4rem;

  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3);

  transition: all 0.18s ease;

}



.auth-submit-btn:hover {

  background: linear-gradient(135deg, #c2410c 0%, #b9380f 100%);

  transform: translateY(-1px);

  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.45);

}



.auth-quota-notice {

  display: flex;

  align-items: flex-start;

  gap: 0.6rem;

  margin-top: 1.1rem;

  padding: 0.65rem 0.85rem;

  background: rgba(234, 88, 12, 0.08);

  border: 1px solid rgba(251, 146, 60, 0.2);

  border-radius: 10px;

  font-size: 0.75rem;

  color: #94a3b8;

  line-height: 1.45;

}



.auth-quota-notice strong {

  color: #fb923c;

}



.auth-modal-card .atom-modal-title-wrap {

  display: flex !important;

  flex-direction: column !important;

  align-items: flex-start !important;

  gap: 0.25rem !important;

}





/* ==============================================================================

   GOOGLE STITCH CHAT HOME THEME & COMPONENTS

   Reference: Chat_home-html / Main.dc.html

   ============================================================================== */



:root {

  --stitch-ground: #191919;

  --stitch-card: #242424;

  --stitch-accent: #f97316;

  --stitch-accent-dark: #9a3412;

  --stitch-text-primary: #ECEAE4;

  --stitch-text-muted: #A8A69E;

  --stitch-text-placeholder: #8A8880;

  --stitch-border: #3A3A37;

  --stitch-glow: 0 0 14px rgba(249, 115, 22,0.45), 0 0 40px rgba(249, 115, 22,0.28), 0 0 90px rgba(249, 115, 22,0.14);

}



body[data-theme="dark"] {

  background-color: var(--stitch-ground) !important;

  color: var(--stitch-text-primary) !important;

  font-family: 'Hanken Grotesk', 'Google Sans', system-ui, sans-serif !important;

}



/* 1. Stitch Top Navigation Bar */

.atom-top-bar {

  display: flex !important;

  align-items: center !important;

  justify-content: space-between !important;

  padding: 16px 24px !important;

  height: 64px !important;

  background: var(--stitch-ground) !important;

  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;

  box-shadow: none !important;

  box-sizing: border-box !important;

}



.top-bar-left {

  display: flex !important;

  align-items: center !important;

  gap: 12px !important;

}



.stitch-sidebar-toggle-btn {

  width: 40px !important;

  height: 40px !important;

  border: 0 !important;

  border-radius: 10px !important;

  background: transparent !important;

  color: var(--stitch-text-primary) !important;

  display: grid !important;

  place-items: center !important;

  cursor: pointer !important;

  transition: background 0.15s ease !important;

}



.stitch-sidebar-toggle-btn:hover {

  background: rgba(255, 255, 255, 0.08) !important;

}



.stitch-brand-title {

  font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;

  font-size: 26px !important;

  color: var(--stitch-text-primary) !important;

  font-weight: 500 !important;

  letter-spacing: -0.01em !important;

  line-height: 1 !important;

}







.stitch-user-avatar-btn {

  width: 36px !important;

  height: 36px !important;

  border-radius: 50% !important;

  border: 0 !important;

  color: #ECEAE4 !important;

  font-weight: 600 !important;

  font-size: 16px !important;

  background-color: var(--stitch-accent-dark) !important;

  display: grid !important;

  place-items: center !important;

  cursor: pointer !important;

  transition: transform 0.15s ease, opacity 0.15s ease !important;

}



.stitch-user-avatar-btn:hover {

  opacity: 0.9 !important;

  transform: scale(1.04) !important;

}



/* 2. Stitch Hero Greeting */

.atom-hero-stage {

  display: flex;

  flex-direction: column !important;

  align-items: center !important;

  justify-content: center !important;

  padding: 40px 24px 32px !important;

  gap: 24px !important;

}

.atom-hero-stage.is-hidden,
#atom-hero-welcome.is-hidden {

  display: none !important;

}



.atom-hero-greeting {

  margin: 0 !important;

  font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;

  font-weight: 400 !important;

  font-size: 52px !important;

  line-height: 1.1 !important;

  letter-spacing: -0.01em !important;

  color: var(--stitch-text-primary) !important;

  text-align: center !important;

  border: none !important;

  box-shadow: none !important;

  background: transparent !important;

}



.atom-hero-greeting .greeting-salutation {

  font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;

  font-size: 54px !important;

  font-weight: 400 !important;

  color: var(--stitch-text-primary) !important;

}



.atom-hero-greeting .greeting-subprompt {

  display: none !important;

}



/* 3. Stitch Chat Composer Card */

.atom-locked-input-container {

  width: 100% !important;

  max-width: 900px !important;

  margin: 0 auto !important;

  padding: 0 16px 24px !important;

  box-sizing: border-box !important;

}



.atom-input-glass-box {

  background: var(--stitch-card) !important;

  border: 1px solid #333333 !important;

  border-radius: 28px !important;

  padding: 20px 22px 14px !important;

  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;

  display: flex !important;

  flex-direction: column !important;

  gap: 14px !important;

  min-height: 132px !important;

  box-sizing: border-box !important;

  transition: box-shadow 0.3s ease, border-color 0.3s ease !important;

}



.atom-input-glass-box:focus-within {

  border-color: #444444 !important;

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;

}



.atom-textarea {

  width: 100% !important;

  box-sizing: border-box !important;

  border: 0 !important;

  resize: none !important;

  background: transparent !important;

  font-family: inherit !important;

  font-size: 17.5px !important;

  line-height: 1.55 !important;

  color: var(--stitch-text-primary) !important;

  padding: 2px 4px !important;

  outline: none !important;

  min-height: 60px !important;

}



.atom-textarea::placeholder {

  color: var(--stitch-text-placeholder) !important;

}



.atom-input-action-bar {

  display: flex !important;

  align-items: center !important;

  justify-content: space-between !important;

  padding-top: 4px !important;

}



.stitch-composer-left {

  display: flex !important;

  align-items: center !important;

  gap: 6px !important;

}



.stitch-icon-btn {

  width: 36px !important;

  height: 36px !important;

  border-radius: 10px !important;

  background: transparent !important;

  display: grid !important;

  place-items: center !important;

  cursor: pointer !important;

  color: var(--stitch-text-primary) !important;

  transition: background 0.15s ease !important;

}



.stitch-icon-btn.bordered {

  border: 1px solid var(--stitch-border) !important;

}



.stitch-icon-btn.muted {

  border: 0 !important;

  color: var(--stitch-text-muted) !important;

}



.stitch-icon-btn:hover {

  background: rgba(255, 255, 255, 0.08) !important;

}



.stitch-composer-right {

  display: flex !important;

  align-items: center !important;

  gap: 10px !important;

}



.stitch-model-btn {

  height: 36px !important;

  padding: 0 12px !important;

  border: 0 !important;

  border-radius: 10px !important;

  background: transparent !important;

  color: var(--stitch-text-muted) !important;

  font-size: 14px !important;

  display: flex !important;

  align-items: center !important;

  gap: 6px !important;

  cursor: pointer !important;

  font-family: inherit !important;

  transition: background 0.15s ease, color 0.15s ease !important;

}



.stitch-model-btn:hover {

  background: rgba(255, 255, 255, 0.08) !important;

  color: var(--stitch-text-primary) !important;

}



.stitch-send-btn {

  width: 40px !important;

  height: 40px !important;

  border: 0 !important;

  border-radius: 12px !important;

  color: #191919 !important;

  display: grid !important;

  place-items: center !important;

  background-color: var(--stitch-accent-dark) !important;

  cursor: pointer !important;

  transition: transform 0.15s ease, background-color 0.15s ease !important;

}



.stitch-send-btn:hover {

  background-color: var(--stitch-accent) !important;

  transform: translateY(-1px) !important;

}



/* 4. Stitch Suggestion Chips */

.stitch-suggestions-row {

  display: flex !important;

  flex-wrap: wrap !important;

  gap: 10px !important;

  justify-content: center !important;

  width: 100% !important;

  max-width: 680px !important;

  margin: 0 auto !important;

}



.stitch-chip-btn {

  background: var(--stitch-card) !important;

  border: 1px solid var(--stitch-border) !important;

  border-radius: 12px !important;

  padding: 10px 16px !important;

  color: var(--stitch-text-primary) !important;

  font-size: 14px !important;

  font-weight: 500 !important;

  cursor: pointer !important;

  transition: all 0.18s ease !important;

  font-family: inherit !important;

  display: flex !important;

  align-items: center !important;

  gap: 8px !important;

}



.stitch-chip-btn:hover {

  border-color: rgba(249, 115, 22, 0.5) !important;

  background: rgba(255, 255, 255, 0.05) !important;

  transform: translateY(-1px) !important;

}





/* ==============================================================================

   5. GOOGLE STITCH 3-COLUMN MODEL SELECTION FLYOUT DROPDOWN

   Theme: Charcoal Ground (#191919), Card Surface (#1C1C1C / #242424),

          Stitch Emerald Accent (#f97316), Border (#3A3A37), Google Sans / Hanken Grotesk

   ============================================================================== */



.atom-engine-dropdown {

  position: absolute !important;

  bottom: calc(100% + 14px) !important;

  left: 0 !important;

  right: auto !important;

  display: none !important;

  flex-direction: row !important;

  align-items: stretch !important;

  gap: 12px !important;

  z-index: 1000 !important;

  pointer-events: auto !important;

  font-family: 'Hanken Grotesk', 'Google Sans', system-ui, -apple-system, sans-serif !important;

  animation: stitchDropdownPop 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;

}



.atom-engine-dropdown.open {

  display: flex !important;

}



@keyframes stitchDropdownPop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Progressive Step Transitions */
@keyframes stepSlideForward {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes stepSlideBackward {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.step-slide-forward {
  animation: stepSlideForward 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.step-slide-backward {
  animation: stepSlideBackward 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.btn-tiers-back,
.btn-models-back {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #9ca3af !important;
  cursor: pointer !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  transition: all 0.15s ease !important;
}

.btn-tiers-back:hover,
.btn-models-back:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #f3f4f6 !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
}



/* 3-Column Panels: Left (Select AI), Middle (Family Tier), Right (Models) */

.engine-providers-menu,

.engine-tiers-flyout,

.engine-models-flyout {

  background: #1C1C1C !important;

  border: 1px solid #3A3A37 !important;

  border-radius: 18px !important;

  padding: 10px !important;

  box-shadow: 0 20px 48px -8px rgba(0, 0, 0, 0.9), 0 0 1px rgba(255, 255, 255, 0.12), 0 0 24px rgba(249, 115, 22, 0.08) !important;

  backdrop-filter: blur(24px) !important;

  -webkit-backdrop-filter: blur(24px) !important;

  flex-direction: column !important;

  gap: 4px !important;

  box-sizing: border-box !important;

  max-height: 360px !important;

  overflow: hidden !important;

}

/* Multi-Column Cascading Engine Flyout Menu */
.engine-providers-menu[style*="display: none"],
.engine-tiers-flyout[style*="display: none"],
.engine-models-flyout[style*="display: none"] {
  display: none !important;
}

.engine-providers-menu[style*="display: flex"],
.engine-tiers-flyout[style*="display: flex"],
.engine-models-flyout[style*="display: flex"] {
  display: flex !important;
}

.engine-providers-menu {
  width: 215px !important;
  min-width: 200px !important;
  max-width: 230px !important;
  flex-shrink: 0 !important;
}

.engine-tiers-flyout {
  width: 195px !important;
  min-width: 180px !important;
  max-width: 210px !important;
  flex-shrink: 0 !important;
  animation: flyoutSlideIn 0.16s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.engine-models-flyout {
  width: 270px !important;
  min-width: 250px !important;
  max-width: 300px !important;
  flex-shrink: 0 !important;
  animation: flyoutSlideIn 0.16s cubic-bezier(0.16, 1, 0.3, 1) !important;
}



/* Panel Headers */

.engine-card-header {

  display: flex !important;

  justify-content: space-between !important;

  align-items: center !important;

  padding: 6px 8px 10px 8px !important;

  border-bottom: 1px solid #2B2B28 !important;

  margin-bottom: 4px !important;

  flex-shrink: 0 !important;

}



.engine-card-title {

  font-family: 'Hanken Grotesk', 'Google Sans', system-ui, sans-serif !important;

  font-size: 11px !important;

  font-weight: 700 !important;

  text-transform: uppercase !important;

  letter-spacing: 0.08em !important;

  color: #8A8880 !important;

}



.flyout-provider-title {

  font-family: 'Hanken Grotesk', 'Google Sans', system-ui, sans-serif !important;

  font-size: 13px !important;

  font-weight: 700 !important;

  letter-spacing: 0.02em !important;

  color: #f97316 !important;

}



/* Scrollable Model & Provider Lists */

.engine-providers-list,

.engine-tiers-list,

.engine-models-viewport {

  display: flex !important;

  flex-direction: column !important;

  gap: 4px !important;

  max-height: 290px !important;

  overflow-y: auto !important;

  overflow-x: hidden !important;

  padding-right: 4px !important;

  scrollbar-width: thin !important;

  scrollbar-color: #3A3A37 transparent !important;

  -webkit-overflow-scrolling: touch !important;

  flex: 1 1 auto !important;

  min-height: 0 !important;

}



.engine-group-pane {

  display: flex !important;

  flex-direction: column !important;

  gap: 4px !important;

  width: 100% !important;

}



/* Interactive Rows */

.provider-flyout-item,

.tier-flyout-item,

.engine-option {

  display: flex !important;

  align-items: center !important;

  justify-content: space-between !important;

  padding: 8px 12px !important;

  background: transparent !important;

  border: 1px solid transparent !important;

  border-radius: 12px !important;

  cursor: pointer !important;

  text-align: left !important;

  width: 100% !important;

  box-sizing: border-box !important;

  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1) !important;

  color: #ECEAE4 !important;

  text-decoration: none !important;

}



.provider-flyout-item:hover,

.tier-flyout-item:hover,

.engine-option:hover {

  background: #262624 !important;

  border-color: #383834 !important;

  transform: none !important;

}



.provider-flyout-item:hover .flyout-arrow,

.tier-flyout-item:hover .flyout-arrow {

  color: #ECEAE4 !important;

  transform: translateX(2px) !important;

}



/* Active Row Highlight (Stitch Emerald Glow) */

.provider-flyout-item.active,

.tier-flyout-item.active,

.engine-option.active {

  background: rgba(249, 115, 22, 0.09) !important;

  border: 1px solid #f97316 !important;

  box-shadow: 0 0 16px rgba(249, 115, 22, 0.18), inset 0 0 8px rgba(249, 115, 22, 0.04) !important;

}



.provider-flyout-item.active .provider-name-text,

.tier-flyout-item.active .provider-name-text {

  color: #f97316 !important;

  font-weight: 600 !important;

}



.provider-flyout-item.active .flyout-arrow,

.tier-flyout-item.active .flyout-arrow {

  color: #f97316 !important;

  transform: translateX(2px) !important;

}



/* Meta Typography */

.provider-info-meta,

.option-meta {

  display: flex !important;

  flex-direction: column !important;

  gap: 2px !important;

  min-width: 0 !important;

  flex: 1 !important;

}



.provider-name-text,

.option-title {

  font-family: 'Hanken Grotesk', 'Google Sans', system-ui, sans-serif !important;

  font-size: 13.5px !important;

  font-weight: 600 !important;

  color: #ECEAE4 !important;

  line-height: 1.25 !important;

  display: flex !important;

  align-items: center !important;

  gap: 6px !important;

  white-space: nowrap !important;

  overflow: hidden !important;

  text-overflow: ellipsis !important;

}



.provider-desc-text,

.option-desc {

  font-family: 'Hanken Grotesk', 'Google Sans', system-ui, sans-serif !important;

  font-size: 11px !important;

  color: #8A8880 !important;

  font-weight: 400 !important;

  line-height: 1.25 !important;

  white-space: nowrap !important;

  overflow: hidden !important;

  text-overflow: ellipsis !important;

}



/* Stitch Badges (FLAGSHIP SPEED, NEXT-GEN, 1M CONTEXT, FAST REASONING) */

.tier-badge,

.hot-badge,

.speed-badge,

.reason-badge,

.coder-badge,

.default-badge {

  font-family: 'Hanken Grotesk', 'Google Sans', system-ui, sans-serif !important;

  font-size: 9.5px !important;

  font-weight: 700 !important;

  letter-spacing: 0.05em !important;

  text-transform: uppercase !important;

  padding: 1px 6px !important;

  border-radius: 4px !important;

  margin-left: 6px !important;

  display: inline-flex !important;

  align-items: center !important;

  line-height: 1.3 !important;

}



.tier-badge.flash,

.default-badge,

.hot-badge {

  background: rgba(249, 115, 22, 0.16) !important;

  color: #f97316 !important;

  border: 1px solid rgba(249, 115, 22, 0.35) !important;

}



.engine-option.active .tier-badge.flash {

  background: rgba(249, 115, 22, 0.25) !important;

  color: #f97316 !important;

  border-color: #f97316 !important;

}



.tier-badge.lite,

.speed-badge {

  background: rgba(56, 189, 248, 0.15) !important;

  color: #38bdf8 !important;

  border: 1px solid rgba(56, 189, 248, 0.3) !important;

}



.tier-badge.pro,

.reason-badge {

  background: rgba(168, 85, 247, 0.15) !important;

  color: #c084fc !important;

  border: 1px solid rgba(168, 85, 247, 0.3) !important;

}



/* Emerald Checkmark */

.option-check {

  font-size: 13px !important;

  color: #f97316 !important;

  filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.6)) !important;

  margin-left: 8px !important;

  opacity: 0 !important;

  flex-shrink: 0 !important;

  transition: opacity 0.15s ease !important;

}



.engine-option.active .option-check {

  opacity: 1 !important;

}



/* Flyout Chevron */

.flyout-arrow {

  font-size: 11px !important;

  color: #6C6A64 !important;

  margin-left: auto !important;

  flex-shrink: 0 !important;

  transition: all 0.15s ease !important;

}



/* Configure Cloud Keys Footer */

.engine-menu-footer {

  margin-top: 6px !important;

  padding-top: 8px !important;

  border-top: 1px solid #2B2B28 !important;

}



.engine-footer-action-btn {

  width: 100% !important;

  display: flex !important;

  align-items: center !important;

  justify-content: center !important;

  gap: 8px !important;

  padding: 8px 12px !important;

  border-radius: 10px !important;

  background: #161616 !important;

  border: 1px solid #333330 !important;

  color: #A8A69E !important;

  font-family: 'Hanken Grotesk', 'Google Sans', system-ui, sans-serif !important;

  font-size: 12px !important;

  font-weight: 600 !important;

  cursor: pointer !important;

  transition: all 0.16s ease !important;

  box-sizing: border-box !important;

}



.engine-footer-action-btn:hover {

  background: #242424 !important;

  border-color: #f97316 !important;

  color: #f97316 !important;

  box-shadow: 0 0 12px rgba(249, 115, 22, 0.2) !important;

}



/* Models Viewport Scrollbar */

.engine-models-viewport {

  max-height: 290px !important;

  overflow-y: auto !important;

  padding-right: 4px !important;

}



/* Universal Models & Providers Viewport Scrollbars */

.engine-providers-list::-webkit-scrollbar,

.engine-tiers-list::-webkit-scrollbar,

.engine-models-viewport::-webkit-scrollbar {

  width: 5px !important;

}



.engine-providers-list::-webkit-scrollbar-track,

.engine-tiers-list::-webkit-scrollbar-track,

.engine-models-viewport::-webkit-scrollbar-track {

  background: transparent !important;

}



.engine-providers-list::-webkit-scrollbar-thumb,

.engine-tiers-list::-webkit-scrollbar-thumb,

.engine-models-viewport::-webkit-scrollbar-thumb {

  background: #3A3A37 !important;

  border-radius: 4px !important;

}



.engine-providers-list::-webkit-scrollbar-thumb:hover,

.engine-tiers-list::-webkit-scrollbar-thumb:hover,

.engine-models-viewport::-webkit-scrollbar-thumb:hover {

  background: #f97316 !important;

}



/* Responsive Dropdown Behavior - Mobile View */
@media (max-width: 740px) {
  .atom-engine-dropdown {
    flex-direction: column !important;
    right: 0 !important;
    left: auto !important;
    width: calc(100vw - 32px) !important;
    max-width: 360px !important;
    max-height: 80vh !important;
    overflow: visible !important;
    display: none !important;
    gap: 0 !important;
  }

  .atom-engine-dropdown.open {
    display: flex !important;
  }

  .engine-providers-menu,
  .engine-tiers-flyout,
  .engine-models-flyout {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .engine-models-viewport {
    max-height: 52vh !important;
  }
}



/* Display none overrides for pane visibility */

.engine-group-pane[style*="display: none"],

.engine-group-pane[style*="none"] {

  display: none !important;

}



.engine-tiers-flyout[style*="display: none"],

.engine-tiers-flyout[style*="none"] {

  display: none !important;

}



.engine-models-viewport {

  max-height: 290px !important;

  overflow-y: auto !important;

  overflow-x: hidden !important;

  padding-right: 2px !important;

}



/* Display none overrides for engine options */

.engine-option[style*="display: none"],

.engine-option[style*="none"] {

  display: none !important;

}



.tier-badge {

  background: rgba(249, 115, 22, 0.14) !important;

  color: #f97316 !important;

  border: 1px solid rgba(249, 115, 22, 0.35) !important;

  font-family: 'Hanken Grotesk', 'Google Sans', system-ui, sans-serif !important;

  font-size: 9.5px !important;

  font-weight: 700 !important;

  letter-spacing: 0.05em !important;

  text-transform: uppercase !important;

  padding: 1px 6px !important;

  border-radius: 4px !important;

  margin-left: 6px !important;

  display: inline-flex !important;

  align-items: center !important;

  line-height: 1.3 !important;

}



.engine-option.active .tier-badge {

  background: rgba(249, 115, 22, 0.25) !important;

  color: #f97316 !important;

  border-color: #f97316 !important;

}



/* ==============================================================================

   6. ATOM FORGE STUDIO SIDEBAR DRAWER (DARK ACCENT THEME)

   Theme: Background (#161617), Border (#242426), New Chat (#1c1c1e), Mint Accent (#f97316),

          Brush Script MT Brand, Inter / System-UI

   ============================================================================== */



.sidebar,

.atom-sidebar-drawer {

  position: absolute !important;

  top: 0 !important;

  left: 0 !important;

  bottom: 0 !important;

  width: 280px !important;

  max-width: 85vw !important;

  height: 100vh !important;

  padding: 16px 12px 12px 12px !important;

  background: #161617 !important;

  border-right: 1px solid #242426 !important;

  z-index: 1000 !important;

  display: flex !important;

  flex-direction: column !important;

  gap: 12px !important;

  box-shadow: 24px 0 60px rgba(0, 0, 0, 0.9) !important;

  font-family: Inter, system-ui, -apple-system, sans-serif !important;

  box-sizing: border-box !important;

  color: #e6e6e6 !important;

}



.atom-sidebar-backdrop {

  background: rgba(0, 0, 0, 0.72) !important;

  backdrop-filter: blur(8px) !important;

  -webkit-backdrop-filter: blur(8px) !important;

}



/* Header */

.sidebar .header,

.atom-sidebar-header {

  display: flex !important;

  align-items: center !important;

  justify-content: space-between !important;

  padding: 4px 4px 12px !important;

  border-bottom: 1px solid #242426 !important;

  margin-bottom: 0 !important;

}



.sidebar .brand,

.atom-sidebar-brand-name {

  font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;

  font-size: 26px !important;

  color: #ffffff !important;

  white-space: nowrap !important;

  font-weight: 700 !important;

  letter-spacing: 0.03em !important;

  text-shadow: rgba(66, 133, 244, 0.6) -1px 0px 1px, rgba(234, 67, 53, 0.5) 1px 1px 1px !important;

  line-height: 1 !important;

}



.sidebar .close,

#btn-sidebar-close {

  background: none !important;

  border: none !important;

  color: #6b6b70 !important;

  font-size: 18px !important;

  cursor: pointer !important;

  padding: 0 4px !important;

  line-height: 1 !important;

  transition: color 0.15s ease !important;

}



.sidebar .close:hover,

#btn-sidebar-close:hover {

  color: #f0f0f0 !important;

  background: transparent !important;

}



/* New Chat Session Button */

.sidebar .new-chat,

.atom-new-chat-btn {

  height: 40px !important;

  width: 100% !important;

  display: flex !important;

  align-items: center !important;

  gap: 8px !important;

  padding: 0 12px !important;

  border-radius: 10px !important;

  border: 1px solid #2c2c2f !important;

  background: #1c1c1e !important;

  color: #f0f0f0 !important;

  font-size: 13px !important;

  font-weight: 600 !important;

  cursor: pointer !important;

  margin-bottom: 0 !important;

  transition: all 0.15s ease !important;

  box-sizing: border-box !important;

}



.sidebar .new-chat:hover,

.atom-new-chat-btn:hover {

  background: #242427 !important;

  border-color: #f97316 !important;

  box-shadow: 0 0 14px rgba(251, 146, 60, 0.2) !important;

}



.sidebar .new-chat span.plus,

.atom-new-chat-btn span.plus,

.atom-new-chat-btn i {

  color: #f97316 !important;

  font-size: 16px !important;

  font-weight: 700 !important;

}



/* Section Header Row & Badge */

.sidebar .section-label,

.atom-sessions-header-row {

  display: flex !important;

  justify-content: space-between !important;

  align-items: center !important;

  margin-top: 8px !important;

  font-size: 11px !important;

  letter-spacing: 0.08em !important;

  color: #7a7a80 !important;

  font-weight: 500 !important;

  text-transform: uppercase !important;

  padding: 0 4px !important;

}



.sidebar .badge,

.atom-count-badge {

  padding: 2px 8px !important;

  border-radius: 10px !important;

  background: rgba(251, 146, 60, 0.14) !important;

  color: #f97316 !important;

  font-size: 11px !important;

  font-weight: 600 !important;

  border: none !important;

}



/* Scrollable Sessions List */

.sidebar .list,

.atom-sessions-scroll {

  display: flex !important;

  flex-direction: column !important;

  gap: 2px !important;

  overflow-y: auto !important;

  overflow-x: hidden !important;

  flex: 1 !important;

  padding-right: 2px !important;

}



.atom-sessions-scroll::-webkit-scrollbar {

  width: 4px !important;

}

.atom-sessions-scroll::-webkit-scrollbar-thumb {

  background: #242426 !important;

  border-radius: 4px !important;

}

.atom-sessions-scroll::-webkit-scrollbar-thumb:hover {

  background: #f97316 !important;

}



/* Session Items */

.sidebar .item,

.atom-session-item {

  padding: 9px 10px !important;

  border-radius: 8px !important;

  font-size: 13px !important;

  color: #d6d6d6 !important;

  white-space: nowrap !important;

  overflow: hidden !important;

  text-overflow: ellipsis !important;

  cursor: pointer !important;

  border: 1px solid transparent !important;

  background: transparent !important;

  display: flex !important;

  align-items: center !important;

  justify-content: space-between !important;

  transition: all 0.15s ease !important;

  box-sizing: border-box !important;

}



.sidebar .item:hover,

.atom-session-item:hover {

  background: #1e1e20 !important;

  color: #f0f0f0 !important;

}



.sidebar .item.active,

.atom-session-item.active {

  border-color: #3b82f6 !important;

  background: #1a1a1c !important;

  color: #ffffff !important;

}



.atom-session-title {

  flex: 1 !important;

  font-size: 13px !important;

  white-space: nowrap !important;

  overflow: hidden !important;

  text-overflow: ellipsis !important;

}



.btn-delete-session {

  width: 20px !important;

  height: 20px !important;

  border-radius: 4px !important;

  background: transparent !important;

  border: 0 !important;

  color: #6b6b70 !important;

  cursor: pointer !important;

  display: grid !important;

  place-items: center !important;

  font-size: 11px !important;

  opacity: 0 !important;

  transition: all 0.15s ease !important;

  padding: 0 !important;

  flex-shrink: 0 !important;

}



.atom-session-item:hover .btn-delete-session {

  opacity: 0.8 !important;

}



.btn-delete-session:hover {

  opacity: 1 !important;

  color: #f87171 !important;

}



/* Empty State */

.atom-no-sessions-msg {

  padding: 36px 12px !important;

  color: #7a7a80 !important;

  font-size: 12px !important;

  line-height: 1.5 !important;

  text-align: center !important;

}



/* Clear History Footer */

.sidebar .footer,

.atom-sidebar-actions-row,

#btn-clear-all-sessions {

  margin-top: auto !important;

  padding-top: 12px !important;

  border-top: 1px solid #242426 !important;

  font-size: 12px !important;

  color: #8a8a90 !important;

  cursor: pointer !important;

  display: flex !important;

  align-items: center !important;

  gap: 6px !important;

  background: transparent !important;

  border-left: none !important;

  border-right: none !important;

  border-bottom: none !important;

  transition: color 0.15s ease !important;

}



.sidebar .footer:hover,

#btn-clear-all-sessions:hover {

  color: #e6e6e6 !important;

}



/* User Account Profile Card (Dynamic Footer) */

.atom-sidebar-user-footer {

  margin-top: 4px !important;

  padding-top: 10px !important;

  border-top: 1px solid #242426 !important;

  display: flex !important;

  align-items: center !important;

  justify-content: space-between !important;

  gap: 10px !important;

}



.atom-user-info-card {

  display: flex !important;

  align-items: center !important;

  gap: 10px !important;

  flex: 1 !important;

  min-width: 0 !important;

  padding: 4px 6px !important;

  border-radius: 8px !important;

  transition: background 0.15s ease !important;

  cursor: pointer !important;

}



.atom-user-info-card:hover {

  background: #1e1e20 !important;

}



.atom-user-avatar {

  width: 32px !important;

  height: 32px !important;

  border-radius: 50% !important;

  background: #f97316 !important;

  color: #1a110d !important;

  font-weight: 700 !important;

  font-size: 14px !important;

  display: flex !important;

  align-items: center !important;

  justify-content: center !important;

  flex-shrink: 0 !important;

}



.atom-user-meta {

  display: flex !important;

  flex-direction: column !important;

  min-width: 0 !important;

  overflow: hidden !important;

}



.atom-username {

  font-size: 12.5px !important;

  font-weight: 600 !important;

  color: #e6e6e6 !important;

  white-space: nowrap !important;

  overflow: hidden !important;

  text-overflow: ellipsis !important;

}



.atom-user-title {

  font-size: 10.5px !important;

  color: #f97316 !important;

  white-space: nowrap !important;

  overflow: hidden !important;

  text-overflow: ellipsis !important;

}



.atom-sidebar-cloud-btn {

  background: #1c1c1e !important;

  border: 1px solid #2c2c2f !important;

  border-radius: 8px !important;

  width: 30px !important;

  height: 30px !important;

  display: flex !important;

  align-items: center !important;

  justify-content: center !important;

  cursor: pointer !important;

  color: #f97316 !important;

  transition: all 0.15s ease !important;

  flex-shrink: 0 !important;

}



.atom-sidebar-cloud-btn:hover {

  background: #242427 !important;

  border-color: #f97316 !important;

}



/* ==============================================================================

   7. GOOGLE STITCH USER PROFILE MODAL & INTERACTIVE USER FOOTER

   ============================================================================== */



.atom-user-info-card {

  cursor: pointer !important;

  transition: opacity 0.15s ease, transform 0.15s ease !important;

  border-radius: 10px !important;

  padding: 4px 6px !important;

  margin: -4px -6px !important;

}



.atom-user-info-card:hover {

  background: rgba(255, 255, 255, 0.04) !important;

  opacity: 0.95 !important;

}



.stitch-profile-card {

  width: 420px;

  max-width: calc(100vw - 32px);

  background: #1C1C1C !important;

  border: 1px solid #3A3A37 !important;

  border-radius: 20px !important;

  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.92), 0 0 24px rgba(249, 115, 22, 0.12) !important;

  padding: 24px !important;

  box-sizing: border-box !important;

  font-family: 'Hanken Grotesk', 'Google Sans', system-ui, sans-serif !important;

  animation: stitchDropdownPop 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;

}



.stitch-profile-header {

  display: flex !important;

  align-items: center !important;

  justify-content: space-between !important;

  padding-bottom: 16px !important;

  border-bottom: 1px solid #2B2B28 !important;

  margin-bottom: 20px !important;

}



.stitch-profile-header-title {

  display: flex !important;

  align-items: center !important;

  gap: 8px !important;

  font-size: 13px !important;

  font-weight: 700 !important;

  text-transform: uppercase !important;

  letter-spacing: 0.08em !important;

  color: #8A8880 !important;

}



.stitch-profile-body {

  display: flex !important;

  flex-direction: column !important;

  gap: 20px !important;

}



.stitch-profile-user-showcase {

  display: flex !important;

  align-items: center !important;

  gap: 16px !important;

}



.stitch-profile-avatar-large {

  width: 64px !important;

  height: 64px !important;

  border-radius: 50% !important;

  background: #9a3412 !important;

  color: #ECEAE4 !important;

  font-size: 26px !important;

  font-weight: 600 !important;

  display: grid !important;

  place-items: center !important;

  box-shadow: 0 0 20px rgba(249, 115, 22, 0.3) !important;

  flex-shrink: 0 !important;

  overflow: hidden !important;

}



.stitch-profile-avatar-large img {

  width: 100% !important;

  height: 100% !important;

  border-radius: 50% !important;

  object-fit: cover !important;

}



.stitch-profile-user-details {

  display: flex !important;

  flex-direction: column !important;

  gap: 4px !important;

  min-width: 0 !important;

  flex: 1 !important;

}



.stitch-profile-fullname {

  margin: 0 !important;

  font-size: 18px !important;

  font-weight: 600 !important;

  color: #ECEAE4 !important;

  white-space: nowrap !important;

  overflow: hidden !important;

  text-overflow: ellipsis !important;

}



.stitch-profile-email {

  margin: 0 !important;

  font-size: 13px !important;

  color: #8A8880 !important;

  white-space: nowrap !important;

  overflow: hidden !important;

  text-overflow: ellipsis !important;

}



.stitch-profile-badge-row {

  display: flex !important;

  align-items: center !important;

  gap: 8px !important;

  margin-top: 4px !important;

}



.stitch-badge-emerald {

  font-size: 11px !important;

  font-weight: 600 !important;

  background: rgba(249, 115, 22, 0.15) !important;

  color: #f97316 !important;

  border: 1px solid rgba(249, 115, 22, 0.35) !important;

  padding: 2px 8px !important;

  border-radius: 6px !important;

}



.stitch-badge-neutral {

  font-size: 11px !important;

  font-weight: 500 !important;

  background: #252525 !important;

  color: #A8A69E !important;

  border: 1px solid #3A3A37 !important;

  padding: 2px 8px !important;

  border-radius: 6px !important;

}



/* Quota Card */

.stitch-profile-quota-card {

  background: #222220 !important;

  border: 1px solid #3A3A37 !important;

  border-radius: 14px !important;

  padding: 14px 16px !important;

  display: flex !important;

  flex-direction: column !important;

  gap: 10px !important;

}



.stitch-quota-header {

  display: flex !important;

  justify-content: space-between !important;

  align-items: center !important;

}



.stitch-quota-label {

  font-size: 12px !important;

  font-weight: 600 !important;

  text-transform: uppercase !important;

  letter-spacing: 0.05em !important;

  color: #8A8880 !important;

}



.stitch-quota-count {

  font-size: 13px !important;

  font-weight: 700 !important;

  color: #f97316 !important;

}



.stitch-quota-progress-track {

  width: 100% !important;

  height: 6px !important;

  background: #2E2E2C !important;

  border-radius: 999px !important;

  overflow: hidden !important;

}



.stitch-quota-progress-fill {

  height: 100% !important;

  background: #f97316 !important;

  border-radius: 999px !important;

  transition: width 0.3s ease, background-color 0.3s ease !important;

}



.stitch-quota-footer {

  display: flex !important;

  justify-content: space-between !important;

  align-items: center !important;

  font-size: 11px !important;

  color: #8A8880 !important;

}



.stitch-quota-tier-tag {

  color: #A8A69E !important;

  font-weight: 500 !important;

}

#modal-profile-tokens-bar {
  background: linear-gradient(90deg, #0284c7, #38bdf8) !important;
}

#modal-profile-tokens-text {
  color: #38bdf8 !important;
}



/* Profile Action Buttons */

.stitch-profile-actions {

  display: grid !important;

  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;

  gap: 10px !important;

  margin-top: 10px !important;

  width: 100% !important;

  box-sizing: border-box !important;

}

.stitch-profile-actions-full {

  grid-column: 1 / -1 !important;

  width: 100% !important;

}

.stitch-profile-actions .stitch-btn-secondary,
.stitch-profile-actions .stitch-btn-danger {

  flex: none !important;

  width: 100% !important;

  height: auto !important;

  min-height: 42px !important;

  padding: 10px 14px !important;

  white-space: nowrap !important;

  box-sizing: border-box !important;

  margin: 0 !important;

}

.stitch-admin-users-panel {

  grid-column: 1 / -1 !important;

  background: rgba(255, 255, 255, 0.03) !important;

  border: 1px solid #3A3A37 !important;

  border-radius: 12px !important;

  padding: 12px !important;

  max-height: 220px !important;

  overflow-y: auto !important;

  font-size: 12px !important;

  color: #D4D2CC !important;

  box-sizing: border-box !important;

}

.stitch-admin-users-header {

  display: flex !important;

  align-items: center !important;

  justify-content: space-between !important;

  font-weight: 600 !important;

  color: #ECEAE4 !important;

  margin-bottom: 8px !important;

  padding-bottom: 6px !important;

  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;

}

.stitch-admin-user-row {

  display: flex !important;

  align-items: center !important;

  justify-content: space-between !important;

  gap: 8px !important;

  padding: 6px 4px !important;

  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;

}

.stitch-admin-user-row:last-child {

  border-bottom: none !important;

}

.stitch-admin-user-email {

  color: #ECEAE4 !important;

  font-weight: 500 !important;

  overflow: hidden !important;

  text-overflow: ellipsis !important;

  white-space: nowrap !important;

}

.stitch-admin-user-meta {

  color: #9A9891 !important;

  font-size: 11px !important;

  flex-shrink: 0 !important;

}

.stitch-profile-about-faq {

  background: rgba(255, 255, 255, 0.025) !important;

  border: 1px solid #2E2E2B !important;

  border-radius: 14px !important;

  overflow: hidden !important;

}

.stitch-profile-about-summary {

  display: flex !important;

  align-items: center !important;

  justify-content: space-between !important;

  gap: 10px !important;

  padding: 12px 14px !important;

  cursor: pointer !important;

  list-style: none !important;

  font-size: 13px !important;

  font-weight: 600 !important;

  color: #ECEAE4 !important;

}

.stitch-profile-about-summary::-webkit-details-marker {

  display: none !important;

}

.stitch-profile-about-body {

  padding: 0 14px 14px 14px !important;

  font-size: 12.5px !important;

  line-height: 1.55 !important;

  color: #B9B7B0 !important;

  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;

}

.stitch-profile-about-faq-item {

  margin-top: 10px !important;

}

.stitch-profile-about-faq-item strong {

  display: block !important;

  color: #ECEAE4 !important;

  font-size: 12.5px !important;

  margin-bottom: 2px !important;

}

.stitch-btn-secondary {

  width: 100% !important;

  min-height: 42px !important;

  height: auto !important;

  padding: 10px 14px !important;

  white-space: nowrap !important;

  box-sizing: border-box !important;

  border-radius: 12px !important;

  background: #252525 !important;

  border: 1px solid #3A3A37 !important;

  color: #ECEAE4 !important;

  font-family: inherit !important;

  font-size: 13px !important;

  font-weight: 600 !important;

  display: flex !important;

  align-items: center !important;

  justify-content: center !important;

  gap: 8px !important;

  cursor: pointer !important;

  transition: all 0.15s ease !important;

}



.stitch-btn-secondary:hover {

  background: #2D2D2A !important;

  border-color: #4A4A46 !important;

}



.stitch-btn-danger {

  flex: 1 !important;

  height: 40px !important;

  border-radius: 12px !important;

  background: rgba(239, 68, 68, 0.1) !important;

  border: 1px solid rgba(239, 68, 68, 0.3) !important;

  color: #f87171 !important;

  font-family: inherit !important;

  font-size: 13px !important;

  font-weight: 600 !important;

  display: flex !important;

  align-items: center !important;

  justify-content: center !important;

  gap: 8px !important;

  cursor: pointer !important;

  transition: all 0.15s ease !important;

}



.stitch-btn-danger:hover {

  background: rgba(239, 68, 68, 0.2) !important;

  border-color: #ef4444 !important;

}





/* ==========================================================================

   ATOM FORGE STUDIO — NEW SIGN-IN SCREEN STYLES

   ========================================================================== */

.ambient-glow {

  position: absolute;

  top: 36%;

  left: 50%;

  transform: translate(-50%, -50%);

  width: clamp(750px, 85vw, 1150px);

  height: clamp(750px, 85vw, 1150px);

  background: radial-gradient(

    circle at center,

    rgba(249, 115, 22, 0.18) 0%,

    rgba(249, 115, 22, 0.14) 15%,

    rgba(249, 115, 22, 0.095) 30%,

    rgba(249, 115, 22, 0.055) 45%,

    rgba(249, 115, 22, 0.03) 60%,

    rgba(249, 115, 22, 0.012) 75%,

    rgba(249, 115, 22, 0.003) 88%,

    rgba(19, 19, 19, 0) 100%

  );

  filter: blur(80px);

  pointer-events: none;

  z-index: 0;

  will-change: filter, transform;

}



#auth-step-welcome .ambient-glow {

  top: 48%;

  width: clamp(850px, 95vw, 1300px);

  height: clamp(850px, 95vw, 1300px);

  filter: blur(95px);

}



@keyframes animEnterSlideUp {

  0% {

    opacity: 0;

    transform: translateY(16px);

  }

  100% {

    opacity: 1;

    transform: translateY(0);

  }

}



.anim-enter-1 {

  animation: animEnterSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;

}



.anim-enter-2 {

  animation: animEnterSlideUp 0.45s 0.08s cubic-bezier(0.16, 1, 0.3, 1) forwards;

  opacity: 0;

}



.anim-enter-3 {

  animation: animEnterSlideUp 0.55s 0.16s cubic-bezier(0.16, 1, 0.3, 1) forwards;

  opacity: 0;

}



.shimmer-btn {

  position: relative;

  overflow: hidden;

}



.shimmer-btn::after {

  content: '';

  position: absolute;

  top: -50%;

  left: -50%;

  width: 200%;

  height: 200%;

  background: linear-gradient(

    60deg,

    transparent,

    rgba(255, 255, 255, 0.22),

    transparent

  );

  transform: rotate(30deg);

  animation: shimmerSweep 3.5s infinite;

}



@keyframes shimmerSweep {

  0% {

    transform: translateX(-100%) rotate(30deg);

  }

  20%, 100% {

    transform: translateX(100%) rotate(30deg);

  }

}





/* --- Welcome Screen Button Glow & Mobile Safe Area --- */

.safe-pb {

  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));

}



.safe-pt {

  padding-top: max(1rem, env(safe-area-inset-top));

}



.btn-glow {

  box-shadow: 0 4px 20px -2px rgba(249, 115, 22, 0.25);

  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

}



.btn-glow:hover {

  filter: brightness(1.05);

  box-shadow: 0 6px 24px -1px rgba(249, 115, 22, 0.35);

}



.btn-glow:active {

  transform: scale(0.98);

  box-shadow: 0 2px 10px -2px rgba(249, 115, 22, 0.4);

  background-color: #ea580c !important;

}





/* ==============================================================================

   WELCOME SCREEN (Main.dc.html - Start Wondering)

   ============================================================================== */

@keyframes glowPulse {

  0% {

    box-shadow: 0 0 0 0 rgba(194, 65, 12, 0.0), 0 0 12px rgba(194, 65, 12, 0.35);

  }

  50% {

    box-shadow: 0 0 0 6px rgba(194, 65, 12, 0.18), 0 0 32px rgba(194, 65, 12, 0.75);

  }

  100% {

    box-shadow: 0 0 0 0 rgba(194, 65, 12, 0.0), 0 0 12px rgba(194, 65, 12, 0.35);

  }

}



@keyframes wobble {

  0% { transform: scale(1); }

  30% { transform: scale(0.96); }

  60% { transform: scale(1.04); }

  100% { transform: scale(1); }

}



.start-btn {

  transition: transform 0.2s ease, filter 0.2s ease !important;

  animation: glowPulse 2.4s ease-in-out infinite !important;

  cursor: pointer !important;

  display: flex !important;

  align-items: center !important;

  justify-content: center !important;

  width: 429px !important;

  max-width: 90% !important;

  height: 48px !important;

  border-radius: 10px !important;

  font-size: 25px !important;

  font-weight: 600 !important;

  font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;

  background: #c2410c !important;

  color: #1a110d !important;

  border: none !important;

  outline: none !important;

  box-sizing: border-box !important;

  text-decoration: none !important;

}



.start-btn:hover {

  filter: brightness(1.12) !important;

  transform: translateY(-2px) !important;

}



.start-btn:active {

  animation: wobble 0.45s ease, glowPulse 0.45s ease-out 1 !important;

  transform: scale(0.97) !important;

}



/* Dedicated Sidebar Logout Button */

.atom-sidebar-logout-btn {

  background: #1c1c1e !important;

  border: 1px solid #2c2c2f !important;

  border-radius: 8px !important;

  width: 30px !important;

  height: 30px !important;

  display: flex !important;

  align-items: center !important;

  justify-content: center !important;

  cursor: pointer !important;

  color: #9ca3af !important;

  transition: all 0.15s ease !important;

  flex-shrink: 0 !important;

}

.atom-sidebar-logout-btn:hover {

  background: rgba(239, 68, 68, 0.15) !important;

  border-color: #ef4444 !important;

  color: #ef4444 !important;

  transform: translateY(-1px) !important;

}



/* ==============================================================================
   Atom AI Studio - Locked Models & Extended Thinking Styling
   ============================================================================== */
.tier-badge.thinking {
  background: rgba(168, 85, 247, 0.18) !important;
  color: #c084fc !important;
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
}

.tier-badge.locked {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
}

/* Locked Engine Options */
.engine-option.locked,
.engine-option[disabled] {
  opacity: 0.65 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  user-select: none !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(255, 255, 255, 0.04) !important;
  justify-content: flex-start !important;
  text-align: left !important;
}

.engine-option.locked .option-left,
.engine-option[disabled] .option-left {
  width: 100% !important;
  justify-content: flex-start !important;
}

.engine-option.locked .option-meta,
.engine-option[disabled] .option-meta {
  align-items: flex-start !important;
  justify-content: flex-start !important;
  text-align: left !important;
}

.engine-option.locked .option-title,
.engine-option[disabled] .option-title {
  justify-content: flex-start !important;
  text-align: left !important;
}

.engine-option.locked .option-check,
.engine-option[disabled] .option-check {
  display: none !important;
}

.engine-option.locked .option-desc,
.engine-option[disabled] .option-desc {
  display: none !important;
}

.engine-option.locked:hover,
.engine-option[disabled]:hover {
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(255, 255, 255, 0.04) !important;
}

/* Moving 3D Spatial Canvas Background */
.atom-spatial-canvas,
#atom-spatial-canvas {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: block;
  pointer-events: none !important;
  z-index: 0 !important;
}

/* Stop Button State for Send Message Button */
.stitch-send-btn.stop-mode {
  background: #f87171 !important;
  color: #111827 !important;
  cursor: pointer !important;
  box-shadow: 0 0 14px rgba(248, 113, 113, 0.45) !important;
  transition: all 0.2s ease !important;
}

.stitch-send-btn.stop-mode:hover {
  background: #ef4444 !important;
  transform: scale(1.06) !important;
}

.stitch-composer-right {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

/* ==============================================================================
   STITCH EXTENDED THINKING TOGGLE BUTTON (Lightbulb Icon Beside Model Selector)
   ============================================================================== */
.stitch-extended-btn {
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  color: var(--stitch-text-muted, #9ca3af) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-family: inherit !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  outline: none !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.stitch-extended-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #f3f4f6 !important;
  transform: translateY(-1px) !important;
}

.stitch-extended-btn .extended-icon {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Active State (When Extended Thinking is ON -> Glowing Lightbulb) */
.stitch-extended-btn.active {
  background: rgba(234, 88, 12, 0.16) !important;
  border-color: rgba(234, 88, 12, 0.55) !important;
  color: #fb923c !important;
  box-shadow: 0 0 14px rgba(234, 88, 12, 0.28) !important;
}

.stitch-extended-btn.active .extended-icon {
  stroke: #fb923c !important;
  fill: rgba(234, 88, 12, 0.22) !important;
  filter: drop-shadow(0 0 5px rgba(234, 88, 12, 0.75));
  transform: scale(1.12);
}

/* Muted / Dimmed State for non-Atom and non-Google models */
.stitch-extended-btn.muted-mode {
  opacity: 0.18 !important;
  cursor: not-allowed !important;
  pointer-events: auto !important;
  filter: grayscale(1) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.stitch-extended-btn.muted-mode:hover {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--stitch-text-muted, #9ca3af) !important;
  transform: none !important;
}

.stitch-extended-btn.muted-mode .extended-icon {
  fill: none !important;
  filter: none !important;
  transform: none !important;
  stroke: #6b7280 !important;
}


/* ==============================================================================
   ATOM AI WELCOME NOTE (CLEAN TRY ME CALLOUT)
   ============================================================================== */
.atom-note-card {
  width: 100%;
  max-width: 580px;
  margin: 14px auto 20px auto;
  padding: 16px 20px;
  background: rgba(22, 27, 24, 0.72);
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 16px rgba(249, 115, 22, 0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.25s ease;
  animation: fadeInNote 0.35s ease-out;
  text-align: left;
}

@keyframes fadeInNote {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.atom-note-card:hover {
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.5), 0 0 24px rgba(249, 115, 22, 0.18);
}

.atom-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.atom-note-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: #fb923c;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.atom-note-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f97316;
  box-shadow: 0 0 8px #f97316;
  animation: notePulse 2s infinite ease-in-out;
}

@keyframes notePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.atom-note-close {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.atom-note-close:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.08);
}

.atom-note-text {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
}

.atom-note-text strong {
  color: #f1f5f9;
  font-weight: 600;
}

.atom-note-action {
  display: flex;
  align-items: center;
  margin-top: 4px;
}

.atom-note-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: #f97316;
  color: #1c0802;
  border: none;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.atom-note-cta-btn:hover {
  background: #fb923c;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.45);
}

.atom-note-cta-btn:active {
  transform: scale(0.97);
}


/* ==============================================================================
   ATOM AI LOGIN NOTE MODAL (BLURRED BACKGROUND OVERLAY - REFERENCE MAIN.DC.HTML)
   ============================================================================== */
.atom-note-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.atom-note-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.atom-note-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 14, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
}

.atom-note-modal-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 680px;
  box-sizing: border-box;
  padding: 32px 36px 26px;
  border-radius: 22px;
  background: linear-gradient(180deg, #161a19 0%, #121615 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 40px -12px rgba(249, 115, 22, 0.35);
  display: flex;
  flex-direction: column;
  gap: 22px;
  transform: scale(0.92) translateY(14px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: #eef2f0;
}

.atom-note-modal-overlay.active .atom-note-modal-card {
  transform: scale(1) translateY(0);
}

.atom-note-modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.atom-note-logo {
  font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  font-size: 26px;
  color: #eef2f0;
  line-height: 1;
}

.atom-note-close-btn {
  background: transparent;
  border: none;
  color: #6e7975;
  font-size: 16px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.atom-note-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.atom-note-heading-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.atom-note-title {
  margin: 0;
  font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  font-size: 68px;
  line-height: 1;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.atom-note-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #9aa5a1;
  max-width: 560px;
}

.atom-note-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.atom-note-grid-item {
  background: #1f2423;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.atom-note-grid-item:hover {
  border-color: rgba(249, 115, 22, 0.35);
  transform: translateY(-1px);
}

.atom-note-grid-num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(249, 115, 22, 0.14);
  color: #eef2f0;
  font-size: 14px;
  font-weight: 600;
}

.atom-note-grid-title {
  font-size: 14px;
  font-weight: 600;
  color: #eef2f0;
}

.atom-note-grid-text {
  font-size: 13px;
  line-height: 1.5;
  color: #9aa5a1;
}

.atom-note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.atom-note-footer-brand {
  font-size: 13px;
  color: #9aa5a1;
}

.atom-note-footer-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.atom-note-btn-secondary {
  font-size: 14px;
  font-weight: 500;
  color: #9aa5a1;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: Inter, system-ui, sans-serif;
}

.atom-note-btn-secondary:hover {
  color: #eef2f0;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.atom-note-btn-primary {
  font-size: 14px;
  font-weight: 600;
  color: #eef2f0;
  padding: 10px 22px;
  border-radius: 12px;
  box-shadow: 0 0 6px 0 rgba(249, 115, 22, 0.9), 0 0 22px 2px rgba(249, 115, 22, 0.6), 0 0 46px 6px rgba(249, 115, 22, 0.3);
  background-color: #c2410c;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: Inter, system-ui, sans-serif;
}

.atom-note-btn-primary:hover {
  background-color: #ea580c;
  transform: translateY(-1px);
  box-shadow: 0 0 8px 1px rgba(249, 115, 22, 1), 0 0 28px 4px rgba(249, 115, 22, 0.7), 0 0 54px 8px rgba(249, 115, 22, 0.4);
}

.atom-note-btn-primary:active {
  transform: scale(0.97);
}

@media (max-width: 640px) {
  .atom-note-grid {
    grid-template-columns: 1fr;
  }
  .atom-note-title {
    font-size: 46px;
  }
  .atom-note-modal-card {
    padding: 24px 20px 20px;
  }
}


.atom-note-btn-never {
  font-size: 13px;
  font-weight: 500;
  color: #9c8c84;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: Inter, system-ui, sans-serif;
}

.atom-note-btn-never:hover {
  color: #eef2f0;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}

/* ==============================================================================
   BLACK & ORANGE HOME STAGE + MOVING 3D SPATIAL CANVAS
   - Home Screen: Deep obsidian black & glowing orange gradients + live moving 3D spatial lattice
   - Active Chat, Studio Artifacts, Image Generation & Music Generation: Clean reading canvas, lattice hidden
============================================================================== */
body.chat-active,
body.artifacts-mode-active,
body.image-mode-active,
body.music-mode-active,
body.chat-active .atom-app-layout,
body.artifacts-mode-active .atom-app-layout,
body.image-mode-active .atom-app-layout,
body.music-mode-active .atom-app-layout,
.atom-app-layout.chat-active,
.atom-app-layout.artifacts-mode-active,
.atom-app-layout.image-mode-active,
.atom-app-layout.music-mode-active,
body.chat-active #atom-main-stage,
body.artifacts-mode-active #atom-main-stage,
body.image-mode-active #atom-main-stage,
body.music-mode-active #atom-main-stage,
.atom-app-layout.chat-active #atom-main-stage,
.atom-app-layout.artifacts-mode-active #atom-main-stage,
.atom-app-layout.image-mode-active #atom-main-stage,
.atom-app-layout.music-mode-active #atom-main-stage,
body.chat-active .atom-chat-pane,
body.artifacts-mode-active .atom-chat-pane,
body.image-mode-active .atom-chat-pane,
body.music-mode-active .atom-chat-pane,
.atom-app-layout.chat-active .atom-chat-pane,
.atom-app-layout.artifacts-mode-active .atom-chat-pane,
.atom-app-layout.image-mode-active .atom-chat-pane,
.atom-app-layout.music-mode-active .atom-chat-pane,
body.chat-active #atom-chat-pane,
body.artifacts-mode-active #atom-chat-pane,
body.image-mode-active #atom-chat-pane,
body.music-mode-active #atom-chat-pane,
.atom-app-layout.chat-active #atom-chat-pane,
.atom-app-layout.artifacts-mode-active #atom-chat-pane,
.atom-app-layout.image-mode-active #atom-chat-pane,
.atom-app-layout.music-mode-active #atom-chat-pane,
body.chat-active .atom-chat-viewport,
body.image-mode-active .atom-chat-viewport,
body.music-mode-active .atom-chat-viewport,
.atom-app-layout.chat-active .atom-chat-viewport,
.atom-app-layout.image-mode-active .atom-chat-viewport,
.atom-app-layout.music-mode-active .atom-chat-viewport,
body.chat-active #atom-chat-viewport,
body.image-mode-active #atom-chat-viewport,
body.music-mode-active #atom-chat-viewport,
.atom-app-layout.chat-active #atom-chat-viewport,
.atom-app-layout.image-mode-active #atom-chat-viewport,
.atom-app-layout.music-mode-active #atom-chat-viewport,
body.chat-active .atom-chat-stream,
.atom-app-layout.chat-active .atom-chat-stream,
body.chat-active .atom-locked-input-container,
body.image-mode-active .atom-locked-input-container,
body.music-mode-active .atom-locked-input-container,
.atom-app-layout.chat-active .atom-locked-input-container,
.atom-app-layout.image-mode-active .atom-locked-input-container,
.atom-app-layout.music-mode-active .atom-locked-input-container {
  background: #141414 !important;
  background-color: #141414 !important;
  background-image: none !important;
}

body.chat-active .atom-top-bar,
body.artifacts-mode-active .atom-top-bar,
body.image-mode-active .atom-top-bar,
body.music-mode-active .atom-top-bar,
.atom-app-layout.chat-active .atom-top-bar,
.atom-app-layout.artifacts-mode-active .atom-top-bar,
.atom-app-layout.image-mode-active .atom-top-bar,
.atom-app-layout.music-mode-active .atom-top-bar {
  background: linear-gradient(180deg, rgba(16, 18, 22, 0.94), rgba(12, 13, 16, 0.9)) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(18px) saturate(135%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(135%) !important;
}

/* Hide spatial lattice canvas when chat, artifacts, image gen, or music gen is active */
body.chat-active .atom-spatial-canvas,
body.artifacts-mode-active .atom-spatial-canvas,
body.image-mode-active .atom-spatial-canvas,
body.music-mode-active .atom-spatial-canvas,
.atom-app-layout.chat-active .atom-spatial-canvas,
.atom-app-layout.artifacts-mode-active .atom-spatial-canvas,
.atom-app-layout.image-mode-active .atom-spatial-canvas,
.atom-app-layout.music-mode-active .atom-spatial-canvas {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

/* User Message Bubble in chat */
body.chat-active .chat-bubble-row.user .chat-text-box,
.atom-app-layout.chat-active .chat-bubble-row.user .chat-text-box {
  background: #252525 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px !important;
  box-shadow: none !important;
  color: #f3f4f6 !important;
  padding: 0.65rem 1.15rem !important;
  max-width: 78% !important;
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
}

/* Assistant Message Bubble: Seamless flow on #191919 solid background with zero borders */
body.chat-active .chat-bubble-row.bot,
.atom-app-layout.chat-active .chat-bubble-row.bot {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-bottom: 1.5rem !important;
}

body.chat-active .chat-bubble-row.bot .chat-text-box,
.atom-app-layout.chat-active .chat-bubble-row.bot .chat-text-box {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0.25rem 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  color: #eceae4 !important;
  font-family: 'Hanken Grotesk', 'Google Sans', Inter, system-ui, sans-serif !important;
  font-size: 0.98rem !important;
  line-height: 1.72 !important;
}

/* Inline code tags inside bot reply */
body.chat-active .chat-bubble-row.bot .chat-text-box code:not(pre code) {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #e2e8f0 !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  font-family: 'JetBrains Mono', 'Fira Code', monospace !important;
  font-size: 0.88em !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* Prompt input glass box on solid #191919 stage */
body.chat-active .atom-input-glass-box,
.atom-app-layout.chat-active .atom-input-glass-box {
  background: #202020 !important;
  border: 1px solid #333333 !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5) !important;
}

/* Prevent white/blue Chrome browser autofill background on dark Auth inputs */
#modal-auth input:-webkit-autofill,
#modal-auth input:-webkit-autofill:hover,
#modal-auth input:-webkit-autofill:focus,
#modal-auth input:-webkit-autofill:active,
.google-auth-popup-modal input:-webkit-autofill,
.google-auth-popup-modal input:-webkit-autofill:hover,
.google-auth-popup-modal input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #121212 inset !important;
  box-shadow: 0 0 0 1000px #121212 inset !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff !important;
  border-color: #333333 !important;
  transition: background-color 5000s ease-in-out 0s !important;
}



/* --- Atom Forge Studio Legal Modal Styling --- */
.atom-legal-modal-card {
  max-width: 840px !important;
  max-height: 88vh !important;
}

@media (max-width: 640px) {
  .atom-legal-modal-card {
    max-height: 94vh !important;
    border-radius: 14px !important;
  }
  #atom-legal-modal-title {
    font-size: 15px !important;
  }
}

#legal-modal-content-area::-webkit-scrollbar {
  width: 6px;
}
#legal-modal-content-area::-webkit-scrollbar-track {
  background: #141414;
}
#legal-modal-content-area::-webkit-scrollbar-thumb {
  background: #38261e;
  border-radius: 3px;
}
#legal-modal-content-area::-webkit-scrollbar-thumb:hover {
  background: #f97316;
}

/* ==============================================================================
   COMPREHENSIVE MOBILE VIEWPORT & TOUCH COMPATIBILITY (iOS / Android)
   ============================================================================== */
@media (max-width: 640px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* Prevent iOS Safari zoom on input focus */
  #atom-text-input,
  .atom-textarea,
  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Top Bar Mobile Optimization */
  .atom-top-bar {
    padding: 0 12px !important;
    height: 54px !important;
  }
  .stitch-brand-title {
    font-size: 15px !important;
  }

  /* Safe-area padding for notched iPhones / gesture bars */
  .atom-locked-input-container {
    padding: 0.35rem 0.5rem calc(0.55rem + env(safe-area-inset-bottom, 0px)) 0.5rem !important;
  }

  .atom-input-glass-box {
    padding: 10px 12px 8px !important;
    border-radius: 18px !important;
    gap: 8px !important;
    min-height: auto !important;
  }

  /* Compact suggestion chips on mobile screens */
  .stitch-suggestions-row {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 0 8px !important;
    max-width: 100% !important;
  }

  .stitch-chip-btn {
    font-size: 11.5px !important;
    padding: 6px 10px !important;
    max-width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    border-radius: 9999px !important;
  }

  /* ============================================================================
     1. ATOM NOTE MODAL (ONBOARDING POPUP) MOBILE OPTIMIZATION
     Make it fit beautifully without scrolling or huge titles
     ============================================================================ */
  .atom-note-modal-overlay {
    padding: 12px !important;
  }

  .atom-note-modal-card {
    padding: 16px 16px 14px !important;
    border-radius: 18px !important;
    gap: 12px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .atom-note-title {
    font-size: 32px !important;
    line-height: 1.1 !important;
  }

  .atom-note-desc {
    font-size: 12.5px !important;
    line-height: 1.45 !important;
  }

  .atom-note-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .atom-note-grid-item {
    padding: 10px 12px !important;
    border-radius: 12px !important;
    gap: 6px !important;
  }

  .atom-note-grid-num {
    width: 24px !important;
    height: 24px !important;
    font-size: 11px !important;
    border-radius: 6px !important;
  }

  .atom-note-grid-title {
    font-size: 13px !important;
  }

  .atom-note-grid-text {
    font-size: 11.5px !important;
    line-height: 1.4 !important;
  }

  .atom-note-footer {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .atom-note-footer-brand {
    text-align: center !important;
    font-size: 11px !important;
  }

  .atom-note-footer-actions {
    flex-direction: column !important;
    width: 100% !important;
    gap: 6px !important;
  }

  .atom-note-btn-primary,
  .atom-note-btn-secondary,
  .atom-note-btn-never {
    width: 100% !important;
    text-align: center !important;
    padding: 9px 12px !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
  }

  /* ============================================================================
     2. MODEL SELECTOR DROPDOWN MOBILE SHEET
     Converts to a slick, compact bottom sheet with optimal height
     ============================================================================ */
  .atom-engine-dropdown {
    position: fixed !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 68px) !important;
    left: 10px !important;
    right: 10px !important;
    width: calc(100vw - 20px) !important;
    max-width: 420px !important;
    margin: 0 auto !important;
    max-height: 52vh !important;
    border-radius: 16px !important;
    background: #181818 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.96), 0 0 1px rgba(255, 255, 255, 0.2) !important;
    overflow: hidden !important;
    z-index: 2500 !important;
  }

  .engine-providers-menu,
  .engine-tiers-flyout,
  .engine-models-flyout {
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px 6px !important;
    border: none !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
  }

  .engine-card-header {
    padding: 4px 6px 6px 6px !important;
    margin-bottom: 2px !important;
  }

  .engine-models-viewport {
    max-height: 40vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-right: 2px !important;
  }

  .provider-flyout-item,
  .tier-flyout-item,
  .engine-option {
    padding: 9px 12px !important;
    min-height: 38px !important;
    border-radius: 8px !important;
    margin-bottom: 2px !important;
  }

  .provider-name-text,
  .option-title {
    font-size: 13.5px !important;
    font-weight: 500 !important;
  }

  .engine-card-title,
  .flyout-provider-title {
    font-size: 12.5px !important;
  }

  /* Compact Model Selector Trigger Button in composer bar */
  .stitch-model-btn {
    height: 34px !important;
    padding: 0 8px !important;
    font-size: 12.5px !important;
    max-width: 130px !important;
  }

  #label-active-engine {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 85px !important;
    display: inline-block !important;
  }

  /* ============================================================================
     3. SLIDE-IN STUDIO DRAWER (CLASS MODE & SLIDES) MOBILE VIEWPORT
     ============================================================================ */
  .atom-slide-drawer {
    width: 100vw !important;
    max-width: 100vw !important;
    border-left: none !important;
  }

  /* ============================================================================
     4. CHAT BUBBLES & CODE BLOCKS ON PHONES
     ============================================================================ */
  .chat-bubble-row {
    gap: 0.5rem !important;
  }

  .chat-bubble-row.bot .chat-text-box {
    font-size: 0.94rem !important;
    line-height: 1.6 !important;
    padding: 0.2rem 0 !important;
  }

  .chat-bubble-row.user .chat-text-box {
    font-size: 0.92rem !important;
    padding: 8px 12px !important;
  }

  /* Responsive Auth Card on narrow mobile screens (320px - 420px) */
  [data-purpose="auth-card"] {
    padding: 20px 16px !important;
    border-radius: 16px !important;
  }

  /* Prevent code blocks & KaTeX equations from overflowing mobile bubbles */
  .atom-message-stream pre,
  .atom-message-stream code,
  .katex-display {
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Ensure top user dropdown fits within mobile viewport */
  #top-user-dropdown {
    right: 4px !important;
    min-width: min(270px, calc(100vw - 24px)) !important;
  }

  .atom-input-legal-disclaimer {
    font-size: 10px !important;
    line-height: 1.35 !important;
    padding: 4px 6px 1px !important;
  }
}

/* ==============================================================================
   CLAUDE-STYLE CENTERED CHAT INPUT ON WELCOME / HOME SCREEN
   Moves the input container and greeting to the vertical & horizontal center
   when no chat messages are active, and smoothly anchors down when chat is active.
============================================================================== */

body:not(.chat-active):not(.music-mode-active):not(.image-mode-active) .atom-chat-pane,
.atom-app-layout:not(.chat-active):not(.music-mode-active):not(.image-mode-active) .atom-chat-pane {
  display: flex !important;
  flex-direction: column !important;
  justify-content: safe center !important;
  align-items: center !important;
  height: 100% !important;
  min-height: 100% !important;
  overflow-y: auto !important;
}

body:not(.chat-active):not(.music-mode-active):not(.image-mode-active) .atom-chat-viewport,
.atom-app-layout:not(.chat-active):not(.music-mode-active):not(.image-mode-active) .atom-chat-viewport {
  flex: 0 1 auto !important;
  width: 100% !important;
  max-width: 900px !important;
  margin: clamp(40px, 8vh, 100px) auto 0 auto !important;
  padding: 1.5rem 1rem 0.5rem 1rem !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

body:not(.chat-active):not(.music-mode-active):not(.image-mode-active) .atom-hero-stage,
.atom-app-layout:not(.chat-active):not(.music-mode-active):not(.image-mode-active) .atom-hero-stage {
  margin: 0 auto !important;
  padding: 0 1rem 0.75rem 1rem !important;
  width: 100% !important;
  text-align: center !important;
}

.atom-3d-gyro-stage,
#atom-3d-gyro-stage {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body:not(.chat-active):not(.music-mode-active):not(.image-mode-active) .atom-hero-greeting,
.atom-app-layout:not(.chat-active):not(.music-mode-active):not(.image-mode-active) .atom-hero-greeting {
  margin-bottom: 0.75rem !important;
}

body:not(.chat-active):not(.music-mode-active):not(.image-mode-active) .atom-locked-input-container,
.atom-app-layout:not(.chat-active):not(.music-mode-active):not(.image-mode-active) .atom-locked-input-container {
  flex-shrink: 0 !important;
  width: 100% !important;
  max-width: 900px !important;
  margin: 0 auto !important;
  padding: 0 1rem 1.75rem 1rem !important;
  position: relative !important;
}

/* When chat is active, ensure standard bottom locked dock and scrollable stream */
body.chat-active .atom-chat-pane,
.atom-app-layout.chat-active .atom-chat-pane {
  justify-content: flex-start !important;
  align-items: stretch !important;
}

body.chat-active .atom-chat-viewport,
.atom-app-layout.chat-active .atom-chat-viewport {
  flex: 1 1 auto !important;
  height: auto !important;
  overflow-y: auto !important;
}

body.chat-active .atom-locked-input-container,
.atom-app-layout.chat-active .atom-locked-input-container {
  margin-top: auto !important;
}

/* Mobile Viewport: Move chat box down to the bottom on mobile screens */
@media (max-width: 768px) {
  #auth-step-welcome {
    min-height: 100dvh !important;
    height: 100dvh !important;
    padding: max(0.75rem, env(safe-area-inset-top)) 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px)) 1rem !important;
    justify-content: center !important;
    overflow-y: auto !important;
  }

  #auth-step-welcome [data-purpose="welcome-main"] {
    flex: 0 1 auto !important;
    width: 100% !important;
    max-width: 520px !important;
    min-height: 0 !important;
    padding: 0 0.5rem !important;
    gap: 12px !important;
    margin: auto 0 !important;
  }

  #auth-step-welcome [data-purpose="action-controls"] {
    flex: 0 0 auto !important;
    width: min(100%, 360px) !important;
    padding-bottom: 0 !important;
    margin-top: 1.25rem !important;
  }

  #auth-step-welcome [data-purpose="welcome-main"] h1 {
    margin-top: 0 !important;
    font-size: clamp(32px, 9vw, 44px) !important;
    line-height: 1.1 !important;
  }

  #auth-step-welcome [data-purpose="welcome-main"] p {
    font-size: clamp(14px, 4vw, 17px) !important;
    line-height: 1.4 !important;
  }

  #auth-step-signin {
    min-height: 100dvh !important;
    height: 100dvh !important;
    align-items: center !important;
    justify-content: center !important;
    padding: max(0.75rem, env(safe-area-inset-top)) 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 0px)) 0.75rem !important;
    overflow-y: auto !important;
  }

  #auth-step-signin [data-purpose="auth-container"] {
    width: min(100%, 400px) !important;
    max-width: 400px !important;
    margin: auto !important;
  }

  #auth-step-signin [data-purpose="auth-card"] {
    padding: 18px 14px !important;
  }

  body:not(.chat-active):not(.music-mode-active):not(.image-mode-active):not(.artifacts-mode-active) .atom-chat-pane,
  .atom-app-layout:not(.chat-active):not(.music-mode-active):not(.image-mode-active):not(.artifacts-mode-active) .atom-chat-pane {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body:not(.chat-active):not(.music-mode-active):not(.image-mode-active):not(.artifacts-mode-active) .atom-chat-viewport,
  .atom-app-layout:not(.chat-active):not(.music-mode-active):not(.image-mode-active):not(.artifacts-mode-active) .atom-chat-viewport {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: safe center !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body:not(.chat-active):not(.music-mode-active):not(.image-mode-active):not(.artifacts-mode-active) .atom-hero-stage,
  .atom-app-layout:not(.chat-active):not(.music-mode-active):not(.image-mode-active):not(.artifacts-mode-active) .atom-hero-stage {
    margin: auto 0 !important;
    padding: 0 1rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body:not(.chat-active):not(.music-mode-active):not(.image-mode-active) .atom-hero-greeting,
  .atom-app-layout:not(.chat-active):not(.music-mode-active):not(.image-mode-active) .atom-hero-greeting {
    margin: 0 !important;
  }

  body:not(.chat-active):not(.music-mode-active):not(.image-mode-active) .atom-locked-input-container,
  .atom-app-layout:not(.chat-active):not(.music-mode-active):not(.image-mode-active) .atom-locked-input-container {
    margin-top: auto !important;
    flex-shrink: 0 !important;
    width: 100% !important;
    padding: 0.35rem 0.65rem calc(0.65rem + env(safe-area-inset-bottom, 0px)) 0.65rem !important;
    position: relative !important;
    z-index: 10 !important;
  }

  /* Welcome Screen (Step 1 Modal) Mobile Responsiveness */
  #auth-step-welcome {
    padding: max(1rem, env(safe-area-inset-top)) 1rem max(1.25rem, env(safe-area-inset-bottom)) 1rem !important;
  }

  #auth-step-welcome [data-purpose="welcome-main"] h1 {
    font-size: clamp(34px, 8.5vw, 44px) !important;
  }

  #auth-step-welcome [data-purpose="welcome-main"] p {
    font-size: 15px !important;
  }

  #auth-step-welcome .start-btn {
    width: 100% !important;
    max-width: 330px !important;
    height: 46px !important;
    font-size: 17px !important;
  }

  .auth-welcome-sublinks {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    row-gap: 6px !important;
    column-gap: 6px !important;
    text-align: center !important;
    font-size: 13px !important;
  }

  /* Sign-in Modal Card Mobile Width & Padding */
  #auth-step-signin {
    align-items: center !important;
    justify-content: safe center !important;
    padding: max(56px, calc(env(safe-area-inset-top, 0px) + 48px)) 14px max(20px, env(safe-area-inset-bottom, 16px)) 14px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #auth-step-signin [data-purpose="auth-container"] {
    width: 100% !important;
    max-width: 400px !important;
    min-width: 0 !important;
    margin: 4px auto !important;
  }

  #auth-step-signin [data-purpose="auth-card"] {
    width: 100% !important;
    max-width: 100% !important;
    padding: 18px 14px !important;
    border-radius: 14px !important;
    gap: 12px !important;
    box-sizing: border-box !important;
  }

  #auth-step-signin .ambient-glow {
    max-width: 100vw !important;
    overflow: hidden !important;
  }

  /* Compact Heading & Brand on Mobile Auth */
  #auth-step-signin .anim-enter-1 {
    margin-bottom: 12px !important;
    transform: translateY(-8px);
  }

  #auth-step-signin .anim-enter-1 span {
    font-size: clamp(34px, 8vw, 42px) !important;
  }

  #auth-step-signin .auth-brand-logo {
    font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
  }

  #auth-card-title {
    font-size: 18px !important;
  }

  #auth-card-subtitle {
    font-size: 12.5px !important;
    margin-top: 3px !important;
    line-height: 1.35 !important;
  }

  /* Compact Auth Mode Tabs (Sign In / Sign Up) */
  #auth-tabs-wrap {
    margin-bottom: 12px !important;
  }

  #auth-tabs-wrap button {
    padding: 6px 14px !important;
    font-size: 13px !important;
    height: 36px !important;
  }

  /* Compact Google Sign In button */
  #btn-google-signin-trigger {
    height: 44px !important;
    padding: 0 14px !important;
    border-radius: 10px !important;
    gap: 10px !important;
  }

  #btn-google-signin-trigger svg {
    width: 20px !important;
    height: 20px !important;
  }

  #google-btn-text {
    font-size: 14px !important;
  }

  /* Form and Inputs */
  #form-auth-submit {
    gap: 10px !important;
  }

  #auth-input-name,
  #auth-input-email,
  #auth-input-password {
    height: 44px !important;
    font-size: 14px !important;
    padding: 0 14px !important;
    border-radius: 10px !important;
  }

  /* Submit Primary Button */
  #btn-auth-submit-primary {
    height: 44px !important;
    font-size: 14.5px !important;
    border-radius: 10px !important;
  }

  /* Continue as Guest Button */
  #btn-auth-guest {
    height: 40px !important;
    font-size: 13px !important;
    border-radius: 10px !important;
  }

  /* Switch prompt & legal footer */
  #auth-switch-prompt {
    font-size: 12.5px !important;
  }

  #auth-step-signin [data-purpose="auth-card"] > div:last-child {
    font-size: 11px !important;
    line-height: 1.35 !important;
    margin-top: 2px !important;
  }
}


/* ==============================================================================
   NEW COMPACT CHAT BAR: COMBINED THINK/EXTENDED & ENTER/MIC CONTROLS
   ============================================================================== */

/* Think & Model Button (Tap = choose model, Long-hold = Gemini High Thinking / Image Enhance Prompt) */
.stitch-model-btn {
  height: 32px !important;
  padding: 0 10px 0 8px !important;
  border: 1px solid #383838 !important;
  border-radius: 9px !important;
  background-color: #242424 !important;
  color: #d1d5db !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  box-shadow: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.stitch-model-btn:hover {
  background-color: #2e2e2e !important;
  border-color: #4b5563 !important;
  color: #ffffff !important;
}

.stitch-model-btn .engine-bulb-icon {
  width: 14px !important;
  height: 14px !important;
  stroke: currentColor !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease !important;
}

/* Extended Thinking Active state (Long-hold on Gemini / Image model button) */
.stitch-model-btn.extended-active {
  background-color: rgba(154, 52, 18, 0.32) !important;
  border-color: #fb923c !important;
  color: #fb923c !important;
  box-shadow: 0 0 16px rgba(251, 146, 60, 0.35) !important;
}

.stitch-model-btn.extended-active .engine-bulb-icon {
  stroke: #fb923c !important;
  fill: rgba(251, 146, 60, 0.25) !important;
  filter: drop-shadow(0 0 5px rgba(251, 146, 60, 0.8)) !important;
  transform: scale(1.15) !important;
}

/* Plus (+) Attachment Button */
.stitch-icon-btn.bordered {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
  border: 1px solid #3a3a3a !important;
  background: #2a2a2a !important;
  color: #e6e6e6 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
}

.stitch-icon-btn.bordered:hover {
  background: #333333 !important;
  border-color: #4b5563 !important;
  color: #ffffff !important;
}

/* Send / Enter Button: Click to send, Long-press for Mic */
.stitch-send-btn {
  width: 44px !important;
  height: 44px !important;
  border-radius: 14px !important;
  border: 1px solid #383838 !important;
  color: #e5e7eb !important;
  cursor: pointer !important;
  background-color: #242424 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  box-shadow: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.stitch-send-btn:hover {
  background-color: #2e2e2e !important;
  border-color: #4b5563 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.stitch-send-btn:active {
  transform: scale(0.95) !important;
}

/* When recording voice (long-press activated) */
.stitch-send-btn.mic-recording {
  background-color: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  animation: sendMicPulse 1.25s infinite !important;
}

.stitch-send-btn.mic-recording .send-arrow-icon {
  display: none !important;
}

.stitch-send-btn.mic-recording .send-mic-icon {
  display: block !important;
  stroke: #ffffff !important;
}

@keyframes sendMicPulse {
  0% { transform: scale(0.96); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.96); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Guarantee Far-Left and Far-Right Spacing in Chat Composer */
.atom-input-action-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding-top: 6px !important;
}

.stitch-composer-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 0 0 auto !important;
}

.stitch-composer-right {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  margin-left: auto !important;
  flex: 0 0 auto !important;
}


/* ==============================================================================
   OFFICIAL AF BRAND LOGO, HERO QUICK ACTIONS & ORANGE THEME ENHANCEMENTS
   ============================================================================== */
.af-brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-drag: none;
}

.atom-sidebar-brand-name,
.stitch-brand-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
  font-family: 'Google Sans', 'Product Sans', Inter, sans-serif !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  color: #f8fafc !important;
}

.hero-af-logo {
  width: 68px;
  height: 68px;
  object-fit: contain;
  margin: 0 auto 10px auto;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(234, 88, 12, 0.28));
  user-select: none;
  -webkit-user-drag: none;
}

.hero-subtitle {
  font-size: 14px;
  color: #9ca3af;
  margin: 4px auto 16px auto;
  max-width: 500px;
  line-height: 1.45;
  font-weight: 400;
}

.hero-quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto;
  max-width: 660px;
  width: 100%;
}

body.chat-active .hero-quick-actions,
body.chat-active .hero-af-logo,
body.chat-active .hero-subtitle {
  display: none !important;
}

.hero-quick-btn {
  background: #1e1e1e;
  border: 1px solid rgba(249, 115, 22, 0.26);
  color: #e5e7eb;
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: 'Google Sans', Inter, sans-serif;
}

.hero-quick-btn:hover {
  background: rgba(234, 88, 12, 0.15);
  border-color: #f97316;
  color: #ffffff;
  transform: translateY(-1px);
}

.stitch-new-chat-top-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  background: #222222;
  border: 1px solid rgba(249, 115, 22, 0.32);
  color: #f97316;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.stitch-new-chat-top-btn:hover {
  background: rgba(234, 88, 12, 0.16);
  border-color: #f97316;
  color: #fb923c;
}

.account-delete-confirm-box {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-size: 12.5px;
  color: #fca5a5;
  line-height: 1.45;
}

/* ==============================================================================
   STRICT MOBILE VIEWPORT LOCK:
   NO SCROLLING IN MOBILE VIEW UNLESS IN CHAT MESSAGES OR SIDEBAR HISTORY
   ============================================================================== */
@media (max-width: 768px) {
  html,
  body {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }

  .atom-app-layout,
  .atom-main-stage,
  .atom-chat-pane {
    width: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }

  .atom-main-stage {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
  }

  .atom-chat-pane {
    flex: 1 1 auto !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
  }

  /* Welcome screen: allow vertical scroll only if needed on very short phones */
  body:not(.chat-active):not(.music-mode-active):not(.image-mode-active):not(.artifacts-mode-active) .atom-chat-viewport,
  .atom-app-layout:not(.chat-active):not(.music-mode-active):not(.image-mode-active):not(.artifacts-mode-active) .atom-chat-viewport {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    justify-content: safe center !important;
    padding: 0.75rem 0.75rem !important;
  }

  /* When in active chat, ONLY the chat message viewport scrolls */
  body.chat-active .atom-chat-viewport,
  .atom-app-layout.chat-active .atom-chat-viewport {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y !important;
  }

  /* Sidebar drawer: lock outer drawer, allow scrolling ONLY in #atom-sessions-list (history) */
  #atom-sidebar-drawer,
  .atom-sidebar-drawer {
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #atom-sessions-list,
  .atom-sessions-scroll {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y !important;
  }

  /* Compact hero welcome elements so they fit 100% inside mobile screen with zero scroll */
  .hero-af-logo {
    width: 52px !important;
    height: 52px !important;
    margin-bottom: 6px !important;
  }

  .hero-subtitle {
    font-size: 12.5px !important;
    margin: 2px auto 10px auto !important;
    padding: 0 8px !important;
  }

  .hero-quick-actions {
    gap: 6px !important;
    padding: 0 4px !important;
  }

  .hero-quick-btn {
    padding: 6px 11px !important;
    font-size: 11.5px !important;
  }

  /* Sign-in modal on mobile: fit within 100dvh with safe vertical scroll if needed */
  #modal-auth {
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
  }

  #auth-step-signin {
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }
}


/* ==============================================================================
   ATOM FORGE STUDIO — PROFESSIONAL UI & COMPACT PHONE VIEW OPTIMIZATION
   ============================================================================== */

/* Ensure logo is hidden from entire app UI (retained only for browser favicons & PWA app icon) */
.af-brand-logo,
.hero-af-logo,
.atom-ui-logo {
  display: none !important;
}

/* Professional Modern Thinking Accordion */
.claude-thinking-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.32rem 0.85rem 0.32rem 0.75rem !important;
  background: #181818 !important;
  border: 1px solid #ea580c !important;
  border-radius: 9999px !important;
  cursor: pointer !important;
  user-select: none !important;
  transition: all 0.2s ease !important;
  font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  color: #fb923c !important;
  box-shadow: 0 0 10px rgba(234, 88, 12, 0.2), 0 2px 6px rgba(0, 0, 0, 0.4) !important;
  max-width: 100% !important;
  white-space: nowrap !important;
}

.claude-thinking-status {
  color: #fb923c !important;
  font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em !important;
  line-height: 1.25 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Prevent timer from wrapping '0' and 's' onto two lines on mobile */
.claude-thinking-timer {
  color: #fb923c !important;
  font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  margin-left: 0.25rem !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
}

.claude-step-text {
  font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 0.85rem !important;
  color: #fb923c !important;
}

/* Clean Brand Titles */
.stitch-brand-title {
  font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  color: #f3f4f6 !important;
  display: inline-flex !important;
  align-items: center !important;
}

.atom-sidebar-brand-name {
  font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #f3f4f6 !important;
}

/* Hero Section Professional Clean Typography */
.atom-hero-greeting {
  font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: clamp(24px, 5vw, 34px) !important;
  font-weight: 600 !important;
  color: #f3f4f6 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.2 !important;
  text-align: center !important;
  margin: 0 0 6px 0 !important;
}

.atom-hero-greeting .greeting-salutation {
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
}

.hero-subtitle {
  display: none !important;
}

/* Strict Phone View Adjustments */
@media (max-width: 600px) {
  .stitch-top-bar {
    height: 48px !important;
    padding: 0 10px !important;
  }

  .stitch-brand-title {
    font-size: 15px !important;
  }

  .atom-hero-stage {
    padding: 0 10px !important;
    max-width: 100% !important;
  }

  .atom-hero-greeting {
    font-size: 22px !important;
    line-height: 1.25 !important;
    margin-bottom: 4px !important;
  }

  .hero-subtitle {
    font-size: 12.5px !important;
    max-width: 320px !important;
    margin-bottom: 12px !important;
    line-height: 1.35 !important;
  }

  .hero-quick-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 6px !important;
    max-width: 330px !important;
    margin: 0 auto !important;
  }

  .hero-quick-btn {
    padding: 5px 10px !important;
    font-size: 11px !important;
    border-radius: 8px !important;
  }

  .claude-thinking-pill {
    padding: 0.28rem 0.65rem !important;
    gap: 0.35rem !important;
  }

  .claude-thinking-status {
    font-size: 0.78rem !important;
    max-width: 180px !important;
  }

  .claude-thinking-timer {
    font-size: 0.76rem !important;
  }
}


/* ==============================================================================
   SIGN-IN & AUTH MODAL BLURRED BACKDROP
   ============================================================================== */
#modal-auth {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  height: 100dvh !important;
  background: rgba(8, 8, 8, 0.72) !important;
  backdrop-filter: blur(28px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
  z-index: 99999 !important;
  box-sizing: border-box !important;
}

#auth-step-welcome,
#auth-step-signin {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

[data-purpose="auth-card"] {
  background: rgba(22, 22, 22, 0.85) !important;
  backdrop-filter: blur(24px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
  border: 1px solid rgba(234, 88, 12, 0.35) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(234, 88, 12, 0.15) !important;
  border-radius: 20px !important;
}

/* ==============================================================================
   RECOMMENDATION CHIPS: BELOW CHAT BOX ON PC VIEW, REMAIN IN HERO ON MOBILE
   ============================================================================== */
.hero-quick-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  border-radius: 12px !important;
  color: #f3f4f6 !important;
  font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 8px 16px !important;
  cursor: pointer !important;
  user-select: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
  white-space: nowrap !important;
}

.hero-quick-btn:hover {
  background: rgba(234, 88, 12, 0.16) !important;
  border-color: rgba(249, 115, 22, 0.6) !important;
  color: #fb923c !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.25) !important;
}

/* PC View (> 768px): Show below chat box, hide in hero stage */
@media (min-width: 769px) {
  .hero-quick-actions-mobile {
    display: none !important;
  }
  body:not(.chat-active):not(.music-mode-active):not(.image-mode-active) .hero-quick-actions-desktop {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin: 10px auto 4px auto !important;
    max-width: 760px !important;
    padding: 0 8px !important;
  }
  body.chat-active .hero-quick-actions-desktop {
    display: none !important;
  }
}

/* Mobile View (<= 768px): Remain in hero stage, hide below chat box */
@media (max-width: 768px) {
  .hero-quick-actions-desktop {
    display: none !important;
  }
  body:not(.chat-active):not(.music-mode-active):not(.image-mode-active) .hero-quick-actions-mobile {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin: 8px auto 0 auto !important;
    max-width: 340px !important;
  }
  body.chat-active .hero-quick-actions-mobile {
    display: none !important;
  }
  .hero-quick-actions-mobile .hero-quick-btn {
    padding: 6px 11px !important;
    font-size: 11.5px !important;
    border-radius: 8px !important;
  }
}


/* ======================================================== */
/*  AF VECTOR SVG LOADER (OFFICIAL VECTOR SHIMMER LOADER)   */
/* ======================================================== */
.af-loader {
  --w: 160px;
  width: var(--w);
  height: auto;
  display: block;
}

.af-loader.sm {
  --w: 36px;
  width: var(--w);
  height: auto;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Dots bounce animation from af-loader-svg.html */
.dots span {
  display: inline-block;
  animation: af-dot 1.2s ease-in-out infinite;
}
.dots span:nth-child(2) {
  animation-delay: 0.15s;
}
.dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes af-dot {
  0%, 60%, 100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

/* ======================================================== */
/*  APP STARTUP LOADER OVERLAY (CASE 1: WHEN APP IS LOADING)*/
/* ======================================================== */
#atom-app-loader {
  position: fixed;
  inset: 0;
  z-index: 99999999;
  background: #0c0e12;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: all;
  user-select: none;
}

#atom-app-loader.is-loaded {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.atom-app-loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  animation: afLoaderFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes afLoaderFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.atom-app-loader-label {
  color: #a8a59e;
  font-family: 'Google Sans', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ==============================================================================
   EXTENDED THINKING ROTATING CONIC-BEAM BORDER FLOW ANIMATION
   (Triggered by long-holding the model chip on Gemini / Image modes; illuminates input box and chip)
============================================================================== */

.wrap, .chipwrap, .chat-composer-wrap, .atom-chip-wrap {
  position: relative;
}

.wrap, .chat-composer-wrap {
  width: 100%;
}

.wrap::before, .chipwrap::before,
.chat-composer-wrap::before, .atom-chip-wrap::before {
  content: "";
  position: absolute;
  background: conic-gradient(from var(--angle), transparent 0deg, transparent 190deg, rgba(255, 122, 26, 0.75) 300deg, #ffb066 345deg, #fff1de 360deg);
  filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.4s ease;
}

.wrap::before, .chat-composer-wrap::before {
  inset: -10px;
  border-radius: 38px;
}

.chipwrap::before, .atom-chip-wrap::before {
  inset: -6px;
  border-radius: 16px;
  filter: blur(8px);
}

.box, .chip,
.atom-input-glass-box, .stitch-model-btn {
  position: relative;
  z-index: 1;
  transition: box-shadow 0.5s ease, border-color 0.5s ease;
}

.chip, .stitch-model-btn {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.box::before, .chip::before,
.atom-input-glass-box::before, .stitch-model-btn::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 3px;
  background: conic-gradient(from var(--angle), transparent 0deg, transparent 190deg, #ff7a1a 290deg, #ffb066 335deg, #fff6ea 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.chip::before, .stitch-model-btn::before {
  padding: 2px;
}

/* Lit state (sustained glowing orange border & ambient aura) */
.wrap.lit .box,
.chat-composer-wrap.lit .box,
.wrap.lit .atom-input-glass-box,
.chat-composer-wrap.lit .atom-input-glass-box,
.chat-composer-wrap.lit #atom-input-glass-box,
body.chat-active .chat-composer-wrap.lit .atom-input-glass-box,
body.chat-active .chat-composer-wrap.lit #atom-input-glass-box,
.chat-composer-wrap.lit .atom-input-glass-box:focus-within,
.chat-composer-wrap.lit #atom-input-glass-box:focus-within,
#atom-input-glass-box.lit {
  border-color: #ff8a2a !important;
  box-shadow: 0 0 56px rgba(255, 122, 26, 0.7), 0 0 14px rgba(255, 150, 60, 0.55) !important;
}

.chipwrap.lit .chip,
.atom-chip-wrap.lit .chip,
.chipwrap.lit .stitch-model-btn,
.atom-chip-wrap.lit .stitch-model-btn,
.atom-chip-wrap.lit #btn-engine-dropdown,
#btn-engine-dropdown.extended-active {
  border-color: #ff9340 !important;
  color: #ffa552 !important;
  box-shadow: 0 0 22px rgba(255, 122, 26, 0.75), 0 0 6px rgba(255, 160, 70, 0.6) !important;
}

#btn-engine-dropdown,
.stitch-model-btn {
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
  touch-action: manipulation !important;
}

#btn-engine-dropdown.hold-pressing {
  transform: scale(0.96) !important;
  border-color: rgba(255, 138, 42, 0.75) !important;
}

/* Flowing animation state */
.flowing.wrap::before, .flowing.chipwrap::before,
.flowing.chat-composer-wrap::before, .flowing.atom-chip-wrap::before,
.flowing .box::before, .flowing .chip::before,
.flowing.wrap .atom-input-glass-box::before,
.flowing.chat-composer-wrap .atom-input-glass-box::before,
.flowing.chipwrap .stitch-model-btn::before,
.flowing.atom-chip-wrap .stitch-model-btn::before {
  opacity: 1;
  animation: flow-spin 1.5s linear forwards, flow-fade 0.5s ease 1.5s forwards;
}

@keyframes flow-spin {
  to {
    --angle: 360deg;
  }
}

@keyframes flow-fade {
  to {
    opacity: 0;
  }
}

/* ========================================================
   ATOM FORGE STUDIO NEW SIDEBAR (EXPANDED & COLLAPSED)
   ======================================================== */
#atom-sidebar-drawer,
.atom-sidebar-drawer {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  width: 300px !important;
  height: 100vh !important;
  height: 100dvh !important;
  box-sizing: border-box !important;
  background: #1e1e1e !important;
  border-right: 1px solid #2a2a2a !important;
  color: #ececec !important;
  font-family: Inter, system-ui, -apple-system, sans-serif !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 14px 12px !important;
  z-index: 1000 !important;
  overflow: hidden !important;
  transform: translateX(0) !important;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5) !important;
}

/* Header */
#atom-sidebar-drawer .atom-sidebar-header,
.atom-sidebar-drawer .atom-sidebar-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 2px 6px 12px !important;
  min-height: 40px !important;
  border-bottom: none !important;
  margin-bottom: 0 !important;
}

#atom-sidebar-drawer .atom-sidebar-brand-name,
.atom-sidebar-drawer .atom-sidebar-brand-name {
  font-weight: 600 !important;
  font-size: 16px !important;
  color: #ececec !important;
  letter-spacing: normal !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#atom-sidebar-drawer .atom-sidebar-collapse-btn,
.atom-sidebar-drawer .atom-sidebar-collapse-btn {
  background: none !important;
  border: 0 !important;
  color: #a3a3a3 !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  display: grid !important;
  place-items: center !important;
  transition: background 0.15s, color 0.15s !important;
  padding: 0 !important;
}

#atom-sidebar-drawer .atom-sidebar-collapse-btn:hover,
.atom-sidebar-drawer .atom-sidebar-collapse-btn:hover {
  background: #2a2a2a !important;
  color: #ffffff !important;
}

#atom-sidebar-drawer .atom-sidebar-expand-btn,
.atom-sidebar-drawer .atom-sidebar-expand-btn {
  display: none !important;
  background: none !important;
  border: 0 !important;
  color: #ececec !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  place-items: center !important;
  transition: background 0.15s !important;
  padding: 0 !important;
}

#atom-sidebar-drawer .atom-sidebar-expand-btn:hover,
.atom-sidebar-drawer .atom-sidebar-expand-btn:hover {
  background: #2a2a2a !important;
}

/* Nav & Tools Buttons */
#atom-sidebar-drawer .atom-sidebar-nav-group,
.atom-sidebar-drawer .atom-sidebar-nav-group,
#atom-sidebar-drawer .atom-sidebar-tools-group,
.atom-sidebar-drawer .atom-sidebar-tools-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

#atom-sidebar-drawer .atom-sidebar-btn,
.atom-sidebar-drawer .atom-sidebar-btn {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 8px !important;
  border-radius: 8px !important;
  border: 0 !important;
  background: none !important;
  color: #ececec !important;
  font-size: 14px !important;
  cursor: pointer !important;
  font-family: inherit !important;
  text-align: left !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: background 0.15s, color 0.15s !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

#atom-sidebar-drawer .atom-sidebar-btn:hover,
.atom-sidebar-drawer .atom-sidebar-btn:hover {
  background: #2a2a2a !important;
  color: #ffffff !important;
}

#atom-sidebar-drawer .atom-sidebar-btn svg,
.atom-sidebar-drawer .atom-sidebar-btn svg {
  flex-shrink: 0 !important;
}

#atom-sidebar-drawer .atom-sidebar-btn-label,
.atom-sidebar-drawer .atom-sidebar-btn-label {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Search Box */
#atom-sidebar-drawer .atom-sidebar-search-box,
.atom-sidebar-drawer .atom-sidebar-search-box {
  padding: 4px 6px 8px !important;
}

#atom-sidebar-drawer .atom-sidebar-search-input,
.atom-sidebar-drawer .atom-sidebar-search-input {
  width: 100% !important;
  box-sizing: border-box !important;
  background: #141414 !important;
  border: 1px solid #333333 !important;
  border-radius: 6px !important;
  color: #ececec !important;
  font-size: 13px !important;
  font-family: inherit !important;
  padding: 6px 10px !important;
  outline: none !important;
  transition: border-color 0.2s !important;
}

#atom-sidebar-drawer .atom-sidebar-search-input:focus,
.atom-sidebar-drawer .atom-sidebar-search-input:focus {
  border-color: #ff5700 !important;
}

/* Section Labels */
#atom-sidebar-drawer .atom-sidebar-section-label,
.atom-sidebar-drawer .atom-sidebar-section-label {
  font-size: 12px !important;
  color: #8a8a8a !important;
  padding: 16px 8px 6px !important;
  text-transform: none !important;
  font-weight: 500 !important;
  user-select: none !important;
}

/* Recents Scroll Container */
#atom-sidebar-drawer .atom-sidebar-recents-container,
.atom-sidebar-drawer .atom-sidebar-recents-container,
#atom-sessions-list {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  padding-right: 2px !important;
}

#atom-sessions-list::-webkit-scrollbar {
  width: 4px !important;
}

#atom-sessions-list::-webkit-scrollbar-thumb {
  background: #333333 !important;
  border-radius: 4px !important;
}

/* Recent Session Item */
#atom-sessions-list .atom-session-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 8px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  color: #a3a3a3 !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  transition: background 0.15s, color 0.15s !important;
  user-select: none !important;
  position: relative !important;
  gap: 6px !important;
  text-align: left !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#atom-sessions-list .atom-session-item:hover {
  background: #262626 !important;
  color: #ffffff !important;
}

#atom-sessions-list .atom-session-item.active {
  background: #2a2a2a !important;
  color: #ececec !important;
}

#atom-sessions-list .atom-session-title {
  flex: 1 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-weight: normal !important;
}

#atom-sessions-list .btn-delete-session {
  background: none !important;
  border: 0 !important;
  color: #737373 !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0 !important;
  transition: opacity 0.15s, color 0.15s, background 0.15s !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
}

#atom-sessions-list .atom-session-item:hover .btn-delete-session {
  opacity: 1 !important;
}

#atom-sessions-list .btn-delete-session:hover {
  color: #ff5700 !important;
  background: rgba(255, 87, 0, 0.14) !important;
}

/* Footer: Clear all history & Profile */
#atom-sidebar-drawer .atom-sidebar-footer,
.atom-sidebar-drawer .atom-sidebar-footer {
  border-top: 1px solid #2a2a2a !important;
  padding: 10px 6px 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

#atom-sidebar-drawer .atom-sidebar-clear-btn,
.atom-sidebar-drawer .atom-sidebar-clear-btn {
  width: 100% !important;
  background: none !important;
  border: 0 !important;
  color: #a3a3a3 !important;
  padding: 6px 2px !important;
  font-size: 13px !important;
  cursor: pointer !important;
  font-family: inherit !important;
  text-align: left !important;
  transition: color 0.15s !important;
}

#atom-sidebar-drawer .atom-sidebar-clear-btn:hover,
.atom-sidebar-drawer .atom-sidebar-clear-btn:hover {
  color: #ffffff !important;
}

#atom-sidebar-drawer .atom-sidebar-user-card,
.atom-sidebar-drawer .atom-sidebar-user-card {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 6px 4px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: background 0.15s !important;
}

#atom-sidebar-drawer .atom-sidebar-user-card:hover,
.atom-sidebar-drawer .atom-sidebar-user-card:hover {
  background: #262626 !important;
}

#atom-sidebar-drawer .atom-user-avatar,
.atom-sidebar-drawer .atom-user-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: #ff5700 !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  flex-shrink: 0 !important;
}

#atom-sidebar-drawer .atom-user-meta,
.atom-sidebar-drawer .atom-user-meta {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  flex: 1 !important;
}

#atom-sidebar-drawer .atom-username,
.atom-sidebar-drawer .atom-username {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #ececec !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#atom-sidebar-drawer .atom-user-title,
.atom-sidebar-drawer .atom-user-title {
  font-size: 11px !important;
  color: #8a8a8a !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* ========================================================
   COLLAPSED STATE (width: 64px)
   ======================================================== */
#atom-sidebar-drawer.collapsed,
.atom-sidebar-drawer.collapsed {
  width: 64px !important;
  padding: 14px 0 !important;
  align-items: center !important;
}

#atom-sidebar-drawer.collapsed .atom-sidebar-header,
.atom-sidebar-drawer.collapsed .atom-sidebar-header {
  padding: 0 0 6px 0 !important;
  justify-content: center !important;
  width: 100% !important;
}

#atom-sidebar-drawer.collapsed .atom-sidebar-brand-name,
.atom-sidebar-drawer.collapsed .atom-sidebar-brand-name,
#atom-sidebar-drawer.collapsed .atom-sidebar-collapse-btn,
.atom-sidebar-drawer.collapsed .atom-sidebar-collapse-btn {
  display: none !important;
}

#atom-sidebar-drawer.collapsed .atom-sidebar-expand-btn,
.atom-sidebar-drawer.collapsed .atom-sidebar-expand-btn {
  display: grid !important;
}

#atom-sidebar-drawer.collapsed .atom-sidebar-nav-group,
.atom-sidebar-drawer.collapsed .atom-sidebar-nav-group,
#atom-sidebar-drawer.collapsed .atom-sidebar-tools-group,
.atom-sidebar-drawer.collapsed .atom-sidebar-tools-group {
  gap: 6px !important;
  align-items: center !important;
  width: 100% !important;
}

#atom-sidebar-drawer.collapsed .atom-sidebar-btn,
.atom-sidebar-drawer.collapsed .atom-sidebar-btn {
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  justify-content: center !important;
}

#atom-sidebar-drawer.collapsed .atom-sidebar-btn-label,
.atom-sidebar-drawer.collapsed .atom-sidebar-btn-label,
#atom-sidebar-drawer.collapsed .atom-sidebar-search-box,
.atom-sidebar-drawer.collapsed .atom-sidebar-search-box,
#atom-sidebar-drawer.collapsed .atom-sidebar-section-label,
.atom-sidebar-drawer.collapsed .atom-sidebar-section-label,
#atom-sidebar-drawer.collapsed .atom-sidebar-recents-container,
.atom-sidebar-drawer.collapsed .atom-sidebar-recents-container,
#atom-sidebar-drawer.collapsed .atom-sidebar-clear-btn,
.atom-sidebar-drawer.collapsed .atom-sidebar-clear-btn,
#atom-sidebar-drawer.collapsed .atom-sidebar-user-card .atom-user-meta,
.atom-sidebar-drawer.collapsed .atom-sidebar-user-card .atom-user-meta,
#atom-sidebar-drawer.collapsed .atom-sidebar-user-card .atom-sidebar-logout-btn,
.atom-sidebar-drawer.collapsed .atom-sidebar-user-card .atom-sidebar-logout-btn,
body.sidebar-collapsed #atom-artifacts-count,
body.sidebar-collapsed .atom-count-badge,
body.sidebar-collapsed .badge,
#atom-sidebar-drawer.collapsed #atom-artifacts-count,
.atom-sidebar-drawer.collapsed #atom-artifacts-count,
#atom-sidebar-drawer.collapsed .atom-count-badge,
.atom-sidebar-drawer.collapsed .atom-count-badge,
#atom-sidebar-drawer.collapsed .badge,
.atom-sidebar-drawer.collapsed .badge {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

#atom-sidebar-drawer.collapsed .atom-sidebar-footer,
.atom-sidebar-drawer.collapsed .atom-sidebar-footer {
  border-top: none !important;
  padding: 6px 0 0 !important;
  align-items: center !important;
}

#atom-sidebar-drawer.collapsed .atom-sidebar-user-card,
.atom-sidebar-drawer.collapsed .atom-sidebar-user-card {
  padding: 0 !important;
  justify-content: center !important;
}

/* ========================================================
   RESPONSIVE LAYOUT ADJUSTMENTS (DESKTOP & MOBILE)
   ======================================================== */
@media (min-width: 769px) {
  .atom-app-layout {
    margin-left: 300px !important;
    width: calc(100% - 300px) !important;
    transition: margin-left 0.22s cubic-bezier(0.16, 1, 0.3, 1), width 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  body.sidebar-collapsed .atom-app-layout {
    margin-left: 64px !important;
    width: calc(100% - 64px) !important;
  }

  .atom-sidebar-backdrop {
    display: none !important;
  }

  /* On desktop, the sidebar has its own collapse/expand controls in-place.
     Hide redundant top-bar toggle button to prevent duplicate [◨] buttons side-by-side. */
  #btn-sidebar-toggle,
  .stitch-sidebar-toggle-btn {
    display: none !important;
  }
}

@media (max-width: 768px) {
  #atom-sidebar-drawer,
  .atom-sidebar-drawer {
    width: 290px !important;
    max-width: 85vw !important;
    transform: translateX(-105%) !important;
    box-shadow: 16px 0 50px rgba(0, 0, 0, 0.85) !important;
  }

  #atom-sidebar-drawer.open,
  .atom-sidebar-drawer.open {
    transform: translateX(0) !important;
  }

  .atom-app-layout {
    margin-left: 0 !important;
    width: 100% !important;
  }

  #atom-sidebar-drawer .atom-sidebar-expand-btn,
  .atom-sidebar-drawer .atom-sidebar-expand-btn {
    display: none !important;
  }

  #btn-sidebar-toggle,
  .stitch-sidebar-toggle-btn {
    display: grid !important;
  }
}

/* ========================================================
   ATOM IMAGE CREATION STUDIO -- MULTI-PROVIDER DEDICATED SUITE
   ======================================================== */
#atom-image-studio-modal.atom-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 1;
  transition: opacity 0.2s ease;
}

#atom-image-studio-modal.atom-modal-overlay.open,
#atom-music-studio-modal.atom-modal-overlay.open {
  display: flex !important;
}

#atom-image-studio-modal.atom-modal-overlay[style*="display: none"],
#atom-music-studio-modal.atom-modal-overlay[style*="display: none"] {
  display: none !important;
}

.atom-img-studio-card {
  width: 100% !important;
  max-width: 1100px !important;
  max-height: 92vh !important;
  background: #121212 !important;
  border: 1px solid rgba(255, 87, 0, 0.28) !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(255, 87, 0, 0.12) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  position: relative !important;
  color: #e5e7eb !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

.atom-img-studio-header {
  padding: 16px 24px !important;
  background: #171717 !important;
  border-bottom: 1px solid #242424 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
}

.atom-img-studio-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

.atom-img-studio-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 10px !important;
  background: rgba(255, 87, 0, 0.12) !important;
  border: 1px solid rgba(255, 87, 0, 0.3) !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  color: #ff5700 !important;
}

.atom-img-studio-title {
  margin: 0 !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: -0.01em !important;
}

.atom-img-studio-desc {
  margin: 3px 0 0 !important;
  font-size: 12px !important;
  color: #9ca3af !important;
}

.atom-img-studio-close-btn {
  background: transparent !important;
  border: 1px solid #2c2c2c !important;
  color: #9ca3af !important;
  border-radius: 10px !important;
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.16s ease !important;
}

.atom-img-studio-close-btn:hover {
  background: #242424 !important;
  color: #ffffff !important;
  border-color: #ff5700 !important;
}

.atom-img-studio-body {
  display: grid !important;
  grid-template-columns: 1.15fr 1fr !important;
  gap: 24px !important;
  padding: 22px 24px !important;
  overflow-y: auto !important;
  max-height: calc(92vh - 75px) !important;
}

@media (max-width: 900px) {
  .atom-img-studio-body {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    padding: 16px !important;
  }
}

/* Controls Form Groups */
.atom-img-studio-controls {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

.atom-img-form-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
}

.atom-img-label {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: #d1d5db !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

.atom-img-provider-status {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #10b981 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

.atom-img-model-tag {
  font-size: 11px !important;
  font-weight: 500 !important;
  color: #ff5700 !important;
  text-transform: none !important;
}

/* Provider 3x2 Grid */
.atom-img-provider-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
}

@media (max-width: 600px) {
  .atom-img-provider-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

.atom-img-prov-card {
  background: #171717 !important;
  border: 1px solid #282828 !important;
  border-radius: 10px !important;
  padding: 10px 10px 8px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 3px !important;
  cursor: pointer !important;
  transition: all 0.16s ease !important;
  text-align: left !important;
  position: relative !important;
  min-height: 64px !important;
}

.atom-img-prov-card:hover {
  background: #1e1e1e !important;
  border-color: rgba(255, 87, 0, 0.4) !important;
}

.atom-img-prov-card.active {
  background: rgba(255, 87, 0, 0.08) !important;
  border-color: #ff5700 !important;
  box-shadow: 0 0 14px rgba(255, 87, 0, 0.22) !important;
}

.atom-img-prov-rank {
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #ff5700 !important;
  line-height: 1 !important;
}

.atom-img-prov-name {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  line-height: 1.25 !important;
}

.atom-img-prov-meta {
  font-size: 10px !important;
  color: #888888 !important;
  line-height: 1.2 !important;
}

/* Model Dropdown */
.atom-img-select-wrapper {
  position: relative !important;
  width: 100% !important;
}

.atom-img-select {
  width: 100% !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background: #181818 !important;
  border: 1px solid #2e2e2e !important;
  border-radius: 10px !important;
  padding: 10px 36px 10px 14px !important;
  color: #f3f4f6 !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.16s ease !important;
}

.atom-img-select:focus {
  outline: none !important;
  border-color: #ff5700 !important;
  box-shadow: 0 0 0 3px rgba(255, 87, 0, 0.18) !important;
}

.atom-img-select-chevron {
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  pointer-events: none !important;
  color: #9ca3af !important;
}

/* Credentials Box */
.atom-img-creds-box {
  background: #171717 !important;
  border: 1px solid #2d2d2d !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.atom-img-creds-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #e5e7eb !important;
}

.atom-img-creds-save-btn {
  background: #242424 !important;
  border: 1px solid #383838 !important;
  color: #ff7a29 !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 4px 10px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.atom-img-creds-save-btn:hover {
  background: #ff5700 !important;
  color: #ffffff !important;
  border-color: #ff5700 !important;
}

.atom-img-creds-inputs {
  display: flex !important;
  gap: 8px !important;
}

.atom-img-input {
  flex: 1 !important;
  background: #121212 !important;
  border: 1px solid #2b2b2b !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  color: #ffffff !important;
  font-size: 12.5px !important;
}

.atom-img-input:focus {
  outline: none !important;
  border-color: #ff5700 !important;
}

.atom-img-creds-hint {
  font-size: 11px !important;
  color: #888888 !important;
}

/* Prompt Box */
.atom-img-prompt-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.atom-img-random-btn {
  background: rgba(255, 87, 0, 0.1) !important;
  border: 1px solid rgba(255, 87, 0, 0.28) !important;
  color: #ff7a29 !important;
  border-radius: 8px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  padding: 4px 10px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.atom-img-random-btn:hover {
  background: #ff5700 !important;
  color: #ffffff !important;
}

.atom-img-textarea-wrap {
  position: relative !important;
  width: 100% !important;
}

.atom-img-textarea {
  width: 100% !important;
  background: #171717 !important;
  border: 1px solid #2d2d2d !important;
  border-radius: 12px !important;
  padding: 12px 34px 12px 14px !important;
  color: #f3f4f6 !important;
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  resize: vertical !important;
  min-height: 75px !important;
  font-family: inherit !important;
  transition: all 0.16s ease !important;
}

.atom-img-textarea:focus {
  outline: none !important;
  border-color: #ff5700 !important;
  box-shadow: 0 0 0 3px rgba(255, 87, 0, 0.18) !important;
}

.atom-img-clear-prompt {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  background: transparent !important;
  border: none !important;
  color: #888888 !important;
  font-size: 18px !important;
  cursor: pointer !important;
  padding: 2px 6px !important;
  line-height: 1 !important;
}

.atom-img-clear-prompt:hover {
  color: #ffffff !important;
}

/* Style Presets List */
.atom-img-presets-scroll {
  display: flex !important;
  gap: 6px !important;
  overflow-x: auto !important;
  padding-bottom: 4px !important;
}

.atom-img-presets-scroll::-webkit-scrollbar {
  height: 4px !important;
}
.atom-img-presets-scroll::-webkit-scrollbar-thumb {
  background: #2a2a2a !important;
  border-radius: 4px !important;
}

.atom-img-preset-pill {
  flex-shrink: 0 !important;
  background: #191919 !important;
  border: 1px solid #282828 !important;
  color: #9ca3af !important;
  border-radius: 20px !important;
  padding: 5px 12px !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.atom-img-preset-pill:hover {
  background: #222222 !important;
  color: #ffffff !important;
}

.atom-img-preset-pill.active {
  background: rgba(255, 87, 0, 0.14) !important;
  border-color: #ff5700 !important;
  color: #ff7a29 !important;
  font-weight: 600 !important;
}

/* Aspect Ratio Buttons */
.atom-img-ratio-group {
  display: flex !important;
  gap: 8px !important;
}

.atom-img-ratio-btn {
  flex: 1 !important;
  background: #171717 !important;
  border: 1px solid #282828 !important;
  border-radius: 8px !important;
  padding: 8px 6px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #9ca3af !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.atom-img-ratio-btn:hover {
  background: #202020 !important;
  color: #ffffff !important;
}

.atom-img-ratio-btn.active {
  background: rgba(255, 87, 0, 0.1) !important;
  border-color: #ff5700 !important;
  color: #ff5700 !important;
}

.ratio-box {
  display: inline-block !important;
  border: 1.5px solid currentColor !important;
  border-radius: 2px !important;
}

.ratio-box.square { width: 14px; height: 14px; }
.ratio-box.wide { width: 18px; height: 11px; }
.ratio-box.tall { width: 11px; height: 18px; }
.ratio-box.four-three { width: 16px; height: 12px; }
.ratio-box.three-four { width: 12px; height: 16px; }

/* Generate Action Button */
.atom-img-generate-btn {
  margin-top: 4px !important;
  background: linear-gradient(135deg, #ff5700, #ff7a29) !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 13px 20px !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 18px rgba(255, 87, 0, 0.35) !important;
  transition: all 0.18s ease !important;
}

.atom-img-generate-btn:hover:not(:disabled) {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 24px rgba(255, 87, 0, 0.45) !important;
}

.atom-img-generate-btn:disabled {
  opacity: 0.65 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.atom-img-generate-btn.loading .atom-img-gen-icon {
  animation: atom-spin 1s linear infinite !important;
}

@keyframes atom-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Stage Canvas */
.atom-img-studio-stage {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.atom-img-stage-canvas {
  width: 100% !important;
  min-height: 330px !important;
  max-height: 400px !important;
  background: #0d0d0d !important;
  border: 1px dashed #2b2b2b !important;
  border-radius: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  overflow: hidden !important;
}

.atom-img-placeholder {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 24px !important;
  gap: 8px !important;
}

.atom-img-ph-title {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
}

.atom-img-ph-desc {
  font-size: 12px !important;
  color: #888888 !important;
  max-width: 260px !important;
  line-height: 1.4 !important;
}

/* Stage Loading */
.atom-img-loading {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  text-align: center !important;
  padding: 20px !important;
}

.atom-img-spinner {
  width: 44px !important;
  height: 44px !important;
  border: 3px solid rgba(255, 87, 0, 0.18) !important;
  border-top-color: #ff5700 !important;
  border-radius: 50% !important;
  animation: atom-spin 0.85s linear infinite !important;
}

.atom-img-loading-title {
  font-size: 14.5px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
}

.atom-img-loading-sub {
  font-size: 11.5px !important;
  color: #9ca3af !important;
}

.atom-img-loading-timer {
  font-size: 12px !important;
  font-weight: 700 !important;
  font-family: monospace !important;
  color: #ff5700 !important;
}

/* Rendered Result */
.atom-img-result {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
}

.atom-img-result img {
  max-width: 100% !important;
  max-height: 400px !important;
  object-fit: contain !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

.atom-img-overlay-controls {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  opacity: 0 !important;
  transition: opacity 0.16s ease !important;
}

.atom-img-result:hover .atom-img-overlay-controls {
  opacity: 1 !important;
}

.atom-img-overlay-btn {
  background: rgba(18, 18, 18, 0.85) !important;
  backdrop-filter: blur(4px) !important;
  border: 1px solid #3a3a3a !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  width: 34px !important;
  height: 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.atom-img-overlay-btn:hover {
  background: #ff5700 !important;
  border-color: #ff5700 !important;
}

/* Meta Bar */
.atom-img-meta-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 4px 2px !important;
}

.atom-img-meta-left {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}

.atom-img-pill {
  font-size: 11px !important;
  font-weight: 500 !important;
  background: #181818 !important;
  border: 1px solid #2b2b2b !important;
  border-radius: 6px !important;
  padding: 3px 8px !important;
  color: #9ca3af !important;
}

/* Action Toolbar */
.atom-img-actions {
  display: flex !important;
  gap: 8px !important;
}

.atom-img-act-btn {
  flex: 1 !important;
  background: #181818 !important;
  border: 1px solid #2e2e2e !important;
  border-radius: 10px !important;
  padding: 9px 12px !important;
  color: #e5e7eb !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  cursor: pointer !important;
  transition: all 0.16s ease !important;
}

.atom-img-act-btn:hover {
  background: #242424 !important;
  border-color: #444444 !important;
}

.atom-img-act-btn.highlight {
  background: rgba(255, 87, 0, 0.12) !important;
  border-color: rgba(255, 87, 0, 0.4) !important;
  color: #ff7a29 !important;
}

.atom-img-act-btn.highlight:hover {
  background: #ff5700 !important;
  color: #ffffff !important;
  border-color: #ff5700 !important;
}

/* History Gallery Strip */
.atom-img-gallery-section {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin-top: 4px !important;
}

.atom-img-gallery-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: #888888 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.atom-img-gallery-clear {
  background: transparent !important;
  border: none !important;
  color: #666666 !important;
  font-size: 11px !important;
  cursor: pointer !important;
}

.atom-img-gallery-clear:hover {
  color: #ff5700 !important;
}

.atom-img-gallery-strip {
  display: flex !important;
  gap: 8px !important;
  overflow-x: auto !important;
  padding: 4px 2px !important;
  min-height: 60px !important;
  align-items: center !important;
}

.atom-img-gallery-strip::-webkit-scrollbar {
  height: 4px !important;
}
.atom-img-gallery-strip::-webkit-scrollbar-thumb {
  background: #2b2b2b !important;
  border-radius: 4px !important;
}

.atom-img-gallery-thumb {
  width: 54px !important;
  height: 54px !important;
  flex-shrink: 0 !important;
  border-radius: 8px !important;
  border: 1px solid #2d2d2d !important;
  overflow: hidden !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  background: #141414 !important;
}

.atom-img-gallery-thumb:hover {
  border-color: #ff5700 !important;
  transform: scale(1.05) !important;
}

.atom-img-gallery-thumb.active {
  border-color: #ff5700 !important;
  box-shadow: 0 0 10px rgba(255, 87, 0, 0.4) !important;
}

.atom-img-gallery-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.atom-img-gallery-empty {
  font-size: 11.5px !important;
  color: #666666 !important;
  font-style: italic !important;
}

/* ========================================================
   COMPOSER IMAGE GENERATION MODE & DROPDOWN VIEW
   ======================================================== */
.stitch-model-btn.image-mode-active:not(.extended-active),
#btn-engine-dropdown.image-mode-active:not(.extended-active) {
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #e6e6ec !important;
  background: rgba(255, 255, 255, 0.04) !important;
  box-shadow: none !important;
}

.stitch-model-btn.image-mode-active.extended-active,
#btn-engine-dropdown.image-mode-active.extended-active,
.atom-chip-wrap.lit #btn-engine-dropdown.image-mode-active {
  border-color: #ff9340 !important;
  color: #ffa552 !important;
  background: rgba(255, 106, 26, 0.14) !important;
  box-shadow: 0 0 22px rgba(255, 122, 26, 0.75), 0 0 6px rgba(255, 160, 70, 0.6) !important;
}

.engine-image-models-view {
  width: 215px !important;
  min-width: 200px !important;
  max-width: 230px !important;
  flex-shrink: 0 !important;
}

/* ========================================================
   IMAGE GENERATION STAGE (STYLE PREVIEW GALLERY - 24 STYLES)
   ======================================================== */
#atom-image-stage,
body:not(.image-mode-active) #atom-image-stage,
body.chat-active #atom-image-stage,
body.music-mode-active #atom-image-stage,
.atom-app-layout:not(.image-mode-active) #atom-image-stage,
.atom-app-layout.chat-active #atom-image-stage,
.atom-app-layout.music-mode-active #atom-image-stage {
  display: none !important;
}

body.image-mode-active:not(.chat-active):not(.music-mode-active) #atom-image-stage,
.atom-app-layout.image-mode-active:not(.chat-active):not(.music-mode-active) #atom-image-stage {
  width: 100% !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: 8px 16px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  gap: 12px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  animation: afImageStageFadeIn 0.22s ease-out;
}

@keyframes afImageStageFadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.atom-image-stage-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
  flex-shrink: 0 !important;
  padding: 4px 4px 0 !important;
}

.atom-image-stage-title-wrap h2 {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: -0.2px !important;
}

.atom-image-stage-title-wrap p {
  margin: 3px 0 0 !important;
  font-size: 13px !important;
  color: #8d8f98 !important;
}

.atom-image-stage-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#btn-back-image-styles {
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #ecedef !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-radius: 8px !important;
  padding: 6px 14px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#btn-back-image-styles:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 106, 26, 0.6) !important;
  color: #ffffff !important;
}

#btn-clear-image-style {
  border: 1px solid #d9531e !important;
  color: #f0703f !important;
  background: rgba(217, 83, 30, 0.12) !important;
  border-radius: 8px !important;
  padding: 6px 14px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#btn-clear-image-style:hover {
  background: rgba(217, 83, 30, 0.22) !important;
  border-color: #ff6a1a !important;
  color: #ff9d75 !important;
}

.atom-image-styles-grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  grid-auto-rows: max-content !important;
  gap: 14px !important;
  row-gap: 16px !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  padding: 8px 8px 36px 4px !important;
  box-sizing: border-box !important;
  align-items: stretch !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(255, 106, 26, 0.5) rgba(255, 255, 255, 0.04) !important;
}

.atom-image-styles-grid::-webkit-scrollbar {
  width: 6px !important;
}

.atom-image-styles-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03) !important;
  border-radius: 4px !important;
}

.atom-image-styles-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 106, 26, 0.45) !important;
  border-radius: 4px !important;
}

.atom-image-styles-grid.is-compact-18 {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  grid-template-rows: repeat(3, minmax(0, 1fr)) !important;
  grid-auto-rows: unset !important;
  height: 100% !important;
  overflow: hidden !important;
  gap: 12px !important;
  row-gap: 12px !important;
  padding: 4px 4px 6px 4px !important;
}

.atom-image-styles-grid.is-compact-18 .atom-style-tile {
  aspect-ratio: auto !important;
  min-height: 0 !important;
  max-height: 100% !important;
  height: 100% !important;
}

@media (max-width: 1100px) {
  .atom-image-styles-grid,
  .atom-image-styles-grid.is-compact-18 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-template-rows: none !important;
    grid-auto-rows: max-content !important;
    height: auto !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    gap: 12px !important;
    row-gap: 14px !important;
  }

  .atom-image-styles-grid.is-compact-18 .atom-style-tile {
    aspect-ratio: 1 / 1.18 !important;
    min-height: 120px !important;
    max-height: 180px !important;
    height: auto !important;
  }
}

@media (max-width: 768px) {
  .atom-image-styles-grid,
  .atom-image-styles-grid.is-compact-18 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
    row-gap: 12px !important;
  }
}

@media (max-width: 480px) {
  .atom-image-styles-grid,
  .atom-image-styles-grid.is-compact-18 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    row-gap: 10px !important;
  }
}

.atom-style-tile {
  position: relative !important;
  aspect-ratio: 1 / 1.18 !important;
  min-height: 130px !important;
  max-height: 190px !important;
  height: auto !important;
  width: 100% !important;
  margin: 0 !important;
  border-radius: 16px !important;
  background-color: #17181d !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding: 10px 8px !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  overflow: hidden !important;
  isolation: isolate !important;
  flex-shrink: 0 !important;
  transition: transform 0.18s cubic-bezier(0.2, 0, 0, 1), border-color 0.18s ease, box-shadow 0.18s ease !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  outline: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
}

.atom-style-tile::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.35) 52%, transparent 100%) !important;
  pointer-events: none !important;
  transition: opacity 0.18s ease !important;
}

.atom-style-tile:hover {
  transform: translateY(-3px) !important;
  border-color: #ff6a1a !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.65), 0 0 14px rgba(255, 106, 26, 0.38) !important;
}

.atom-style-tile.is-active {
  border-color: #ff6a1a !important;
  border-width: 2.5px !important;
  box-shadow: 0 0 22px rgba(255, 106, 26, 0.7), inset 0 0 0 1px #ff6a1a !important;
}

.atom-style-tile.is-active::after {
  content: '✓' !important;
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  background: #ff6a1a !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
  z-index: 3 !important;
}

.atom-style-tile-label {
  position: relative !important;
  z-index: 2 !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  text-shadow: 0 1.5px 4px rgba(0, 0, 0, 0.95) !important;
  line-height: 1.2 !important;
  letter-spacing: -0.15px !important;
  text-align: center !important;
  width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  pointer-events: none !important;
}

.atom-style-tile-other {
  justify-content: center !important;
  align-items: center !important;
  gap: 0 !important;
  background: radial-gradient(circle at 50% 50%, rgba(255, 106, 26, 0.12), rgba(21, 22, 26, 0.96) 75%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.14) !important;
}

.atom-style-tile-other::before {
  display: none !important;
}

.atom-style-tile-other:hover {
  border-color: #ff6a1a !important;
  background: radial-gradient(circle at 50% 50%, rgba(255, 106, 26, 0.22), rgba(24, 25, 31, 0.98) 75%) !important;
}

.atom-style-tile-other-text {
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px !important;
  color: #ffffff !important;
}

/* Style popover chip with image preview */
.image-style-popover-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  height: 44px !important;
  padding: 0 14px 0 7px !important;
  border-radius: 22px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  border: 1px solid #2b2c34 !important;
  background: #0f1013 !important;
  color: #d6d6de !important;
  user-select: none !important;
}

.image-style-popover-chip img {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  flex-shrink: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.image-style-popover-chip:hover {
  border-color: #ff6a1a !important;
  color: #ffffff !important;
}

.image-style-popover-chip.is-active {
  background: rgba(255, 106, 26, 0.16) !important;
  color: #ffb088 !important;
  border-color: #ff6a1a !important;
  box-shadow: inset 0 0 0 1px #ff6a1a, 0 0 12px rgba(255, 106, 26, 0.3) !important;
}

/* ========================================================
   COMPOSER MUSIC GENERATION MODE & DROPDOWN VIEW
   ======================================================== */
.stitch-model-btn.music-mode-active,
#btn-engine-dropdown.music-mode-active {
  border-color: #ff6a1a !important;
  color: #ff8a4d !important;
  background: rgba(255, 106, 26, 0.14) !important;
  box-shadow: 0 0 14px rgba(255, 106, 26, 0.3) !important;
}

.engine-music-models-view {
  width: 250px !important;
  min-width: 230px !important;
  max-width: 280px !important;
  flex-shrink: 0 !important;
}

/* Bring chat box to the very bottom and align music stage / image mode cleanly */
body.music-mode-active .atom-chat-pane,
body.image-mode-active .atom-chat-pane,
body.music-mode-active .atom-app-layout .atom-chat-pane,
body.image-mode-active .atom-app-layout .atom-chat-pane,
.atom-app-layout.music-mode-active .atom-chat-pane,
.atom-app-layout.image-mode-active .atom-chat-pane,
body.music-mode-active #atom-chat-pane,
body.image-mode-active #atom-chat-pane,
.atom-app-layout.music-mode-active #atom-chat-pane,
.atom-app-layout.image-mode-active #atom-chat-pane {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 100% !important;
  max-height: 100% !important;
  justify-content: space-between !important;
  align-items: stretch !important;
  overflow: hidden !important;
}

body.music-mode-active .atom-chat-viewport,
body.image-mode-active .atom-chat-viewport,
body.music-mode-active .atom-app-layout .atom-chat-viewport,
body.image-mode-active .atom-app-layout .atom-chat-viewport,
.atom-app-layout.music-mode-active .atom-chat-viewport,
.atom-app-layout.image-mode-active .atom-chat-viewport,
body.music-mode-active #atom-chat-viewport,
body.image-mode-active #atom-chat-viewport,
.atom-app-layout.music-mode-active #atom-chat-viewport,
.atom-app-layout.image-mode-active #atom-chat-viewport {
  flex: 1 1 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 20px 24px 12px 24px !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

body:not(.music-mode-active) #atom-music-stage,
body.image-mode-active #atom-music-stage,
.atom-app-layout:not(.music-mode-active) #atom-music-stage,
.atom-app-layout.image-mode-active #atom-music-stage {
  display: none !important;
}

body.music-mode-active #atom-hero-welcome,
body.image-mode-active #atom-hero-welcome,
.atom-app-layout.music-mode-active #atom-hero-welcome,
.atom-app-layout.image-mode-active #atom-hero-welcome {
  display: none !important;
}

body.image-mode-active:not(.chat-active) .atom-chat-viewport,
.atom-app-layout.image-mode-active:not(.chat-active) .atom-chat-viewport,
body.image-mode-active:not(.chat-active) #atom-chat-viewport,
.atom-app-layout.image-mode-active:not(.chat-active) #atom-chat-viewport {
  overflow: hidden !important;
}

body.music-mode-active #atom-music-stage,
.atom-app-layout.music-mode-active #atom-music-stage {
  width: 100% !important;
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding: 8px 0 16px 0 !important;
  flex-shrink: 0 !important;
}

body.music-mode-active .atom-locked-input-container,
body.image-mode-active .atom-locked-input-container,
body.music-mode-active .atom-app-layout .atom-locked-input-container,
body.image-mode-active .atom-app-layout .atom-locked-input-container,
.atom-app-layout.music-mode-active .atom-locked-input-container,
.atom-app-layout.image-mode-active .atom-locked-input-container,
body.music-mode-active footer.atom-locked-input-container,
body.image-mode-active footer.atom-locked-input-container,
.atom-app-layout.music-mode-active footer.atom-locked-input-container,
.atom-app-layout.image-mode-active footer.atom-locked-input-container {
  flex-shrink: 0 !important;
  margin-top: auto !important;
  margin-bottom: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  position: relative !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 860px !important;
  padding: 8px 16px 14px 16px !important;
  z-index: 100 !important;
}

/* Completely hide all recommendation chips in music and image generation modes */
body.music-mode-active .hero-quick-actions-desktop,
body.music-mode-active .hero-quick-actions-mobile,
body.music-mode-active #atom-composer-suggestions,
body.music-mode-active #atom-hero-suggestions,
body.music-mode-active .hero-quick-actions,
body.image-mode-active .hero-quick-actions-desktop,
body.image-mode-active .hero-quick-actions-mobile,
body.image-mode-active #atom-composer-suggestions,
body.image-mode-active #atom-hero-suggestions,
body.image-mode-active .hero-quick-actions {
  display: none !important;
}

/* ============================================================ */
/* ============================================================ */
/*  STUDIO ARTIFACTS VAULT (FULL-PAGE WORKSPACE VIEW)           */
/* ============================================================ */
#atom-artifacts-stage,
body:not(.artifacts-mode-active) #atom-artifacts-stage,
.atom-app-layout:not(.artifacts-mode-active) #atom-artifacts-stage {
  display: none !important;
}

body.artifacts-mode-active #atom-chat-viewport,
body.artifacts-mode-active footer.atom-locked-input-container,
body.artifacts-mode-active #atom-image-stage,
body.artifacts-mode-active #atom-music-stage,
body.artifacts-mode-active #atom-hero-welcome,
.atom-app-layout.artifacts-mode-active #atom-chat-viewport,
.atom-app-layout.artifacts-mode-active footer.atom-locked-input-container,
.atom-app-layout.artifacts-mode-active #atom-image-stage,
.atom-app-layout.artifacts-mode-active #atom-music-stage,
.atom-app-layout.artifacts-mode-active #atom-hero-welcome {
  display: none !important;
}

body.artifacts-mode-active .atom-chat-pane,
.atom-app-layout.artifacts-mode-active .atom-chat-pane,
body.artifacts-mode-active #atom-chat-pane,
.atom-app-layout.artifacts-mode-active #atom-chat-pane {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overflow: hidden !important;
  background: #191919 !important;
}

body.artifacts-mode-active #atom-artifacts-stage,
.atom-app-layout.artifacts-mode-active #atom-artifacts-stage,
.atom-artifacts-page {
  width: 100%;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  background: #191919;
  display: flex !important;
  flex-direction: column;
  overflow: hidden;
  padding: 28px 36px 20px;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #ecedef;
  animation: afImageStageFadeIn 0.2s ease-out;
}

@media (max-width: 768px) {
  body.artifacts-mode-active #atom-artifacts-stage,
  .atom-app-layout.artifacts-mode-active #atom-artifacts-stage {
    padding: 18px 16px 14px;
  }
}

.atom-artifacts-top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.atom-artifacts-main-heading {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #ecedef;
  letter-spacing: -0.02em;
}

.atom-artifacts-header-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.atom-artifacts-search-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #15161a;
  border: 1px solid #2a2b31;
  border-radius: 999px;
  padding: 8px 16px;
  width: 250px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.atom-artifacts-search-pill:focus-within {
  border-color: #ff5a1f;
  box-shadow: 0 0 0 2px rgba(255, 90, 31, 0.18);
}

.atom-artifacts-search-pill input {
  background: transparent;
  border: none;
  outline: none;
  color: #ecedef;
  font-size: 13.5px;
  width: 100%;
  font-family: inherit;
}

.atom-artifacts-clear-vault-btn {
  background: #15161a;
  border: 1px solid #2a2b31;
  color: #8b8e96;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.atom-artifacts-clear-vault-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.atom-artifacts-modal-close-pill {
  background: #15161a;
  border: 1px solid #2a2b31;
  color: #8b8e96;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.atom-artifacts-modal-close-pill:hover {
  color: #ffffff;
  border-color: #ff5a1f;
  background: rgba(255, 90, 31, 0.12);
}

/* Filters & Counters Bar */
.atom-artifacts-filters-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.atom-artifacts-filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.atom-artifact-pill-btn {
  background: #15161a;
  border: 1px solid #2a2b31;
  color: #8b8e96;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.atom-artifact-pill-btn:hover {
  color: #ecedef;
  border-color: rgba(255, 90, 31, 0.5);
}

.atom-artifact-pill-btn.active {
  background: rgba(255, 90, 31, 0.12);
  border-color: #ff5a1f;
  color: #ff5a1f;
  font-weight: 600;
}

.atom-artifacts-showing-label {
  font-size: 13px;
  color: #8b8e96;
}

/* Grid Viewport */
.atom-artifacts-grid-viewport {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 248px));
  grid-auto-rows: max-content;
  gap: 16px;
  padding-right: 6px;
  padding-bottom: 12px;
  align-content: start;
  justify-content: start;
  scrollbar-width: thin;
  scrollbar-color: #3a3b43 transparent;
}
.atom-artifacts-grid-viewport:has(.atom-artifacts-empty-state) {
  grid-template-columns: 1fr;
}

.atom-artifacts-grid-viewport::-webkit-scrollbar {
  width: 6px;
}
.atom-artifacts-grid-viewport::-webkit-scrollbar-track {
  background: transparent;
}
.atom-artifacts-grid-viewport::-webkit-scrollbar-thumb {
  background: #2a2b31;
  border-radius: 999px;
}
.atom-artifacts-grid-viewport::-webkit-scrollbar-thumb:hover {
  background: #3a3b43;
}

/* Cards */
.atom-artifact-card-item {
  background: #15161a;
  border: 1px solid #2a2b31;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-self: start;
  height: auto;
  flex-shrink: 0;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.atom-artifact-card-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 90, 31, 0.5);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

/* Media Thumbnails */
.atom-artifact-media-thumb {
  position: relative;
  overflow: hidden;
  background: #0c0d10;
  cursor: pointer;
  width: 100%;
  flex: 0 0 auto;
}
.atom-artifact-media-thumb.aspect-square {
  aspect-ratio: 1 / 1;
}
.atom-artifact-media-thumb.aspect-16-9 {
  aspect-ratio: 16 / 9;
}
.atom-artifact-media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.atom-artifact-card-item:hover .atom-artifact-media-thumb img {
  transform: scale(1.03);
}

.atom-artifact-type-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  z-index: 2;
  pointer-events: none;
}

.atom-artifact-hover-actions {
  position: absolute;
  inset: 0;
  background: rgba(12, 13, 16, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 3;
}
.atom-artifact-card-item:hover .atom-artifact-hover-actions {
  opacity: 1;
}

.atom-artifact-btn-pill {
  background: rgba(21, 22, 26, 0.9);
  border: 1px solid #2a2b31;
  color: #ecedef;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  text-decoration: none;
  font-family: inherit;
}
.atom-artifact-btn-pill:hover {
  background: #ff5a1f;
  border-color: #ff5a1f;
  color: #ffffff;
}
.atom-artifact-btn-pill.primary {
  background: #ff5a1f;
  border-color: #ff5a1f;
  color: #ffffff;
}
.atom-artifact-btn-pill.primary:hover {
  background: #ff6a1a;
}

/* Audio Waveform */
.atom-artifact-waveform-wrapper {
  aspect-ratio: 16 / 9;
  position: relative;
  background: linear-gradient(135deg, #2a1608, #0c0d10);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  flex: 0 0 auto;
}
.atom-artifact-waveform-bars {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 50px;
}
.atom-artifact-wave-bar {
  width: 4px;
  background: #ff5a1f;
  border-radius: 2px;
  display: inline-block;
  transition: height 0.15s ease;
}
.atom-artifact-wave-bar.playing {
  animation: atomWaveBarPulse 0.6s infinite alternate ease-in-out;
}
@keyframes atomWaveBarPulse {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1.3); }
}

.atom-artifact-play-bubble {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ff5a1f;
  color: #fff;
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  font-size: 14px;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 12px rgba(255, 90, 31, 0.4);
  transition: transform 0.15s ease, background 0.15s ease;
  z-index: 4;
}
.atom-artifact-play-bubble:hover {
  transform: scale(1.08);
  background: #ff6a1a;
}

/* Card Body */
.atom-artifact-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 0 auto;
}
.atom-artifact-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #ecedef;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.atom-artifact-card-desc {
  margin: 0;
  font-size: 12.5px;
  color: #8b8e96;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}
.atom-artifact-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #8b8e96;
  margin-top: auto;
  border-top: 1px solid #2a2b31;
  padding-top: 10px;
}
.atom-artifact-action-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}
.atom-artifact-icon-button {
  background: transparent;
  border: none;
  color: #8b8e96;
  cursor: pointer;
  font-size: 13px;
  padding: 4px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, transform 0.15s ease;
}
.atom-artifact-icon-button:hover {
  color: #ecedef;
  transform: scale(1.15);
}
.atom-artifact-icon-button.fav.active {
  color: #ff5a1f;
}
.atom-artifact-icon-button.download:hover {
  color: #ff5a1f;
}
.atom-artifact-icon-button.danger:hover {
  color: #f87171;
}

/* Footer Disclaimer */
.atom-artifacts-disclaimer-footer {
  margin-top: auto;
  padding-top: 22px;
  width: 100%;
  font-size: 12px;
  color: #8b8e96;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
  flex-shrink: 0;
}
.atom-artifacts-disclaimer-text {
  text-align: center;
  flex: 1;
}
.atom-artifacts-safe-badge {
  font-size: 11.5px;
  color: #22c55e;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Empty State */
.atom-artifacts-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #8b8e96;
}
.atom-artifacts-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #15161a;
  border: 1px dashed #2a2b31;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: #ff5a1f;
}

/* ==============================================================================
   IMAGE GENERATION LOADER ANIMATION (SPARKLE + RADIAL DOT-MATRIX WAVE)
   ============================================================================== */
@keyframes atomImgSparkle {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.18) rotate(18deg);
    opacity: 1;
  }
}

@keyframes atomImgWave {
  0% {
    -webkit-mask-size: 240% 240%;
    mask-size: 240% 240%;
  }
  100% {
    -webkit-mask-size: 0% 0%;
    mask-size: 0% 0%;
  }
}

@keyframes atomImgBlink {
  0%, 20% {
    opacity: 0.2;
  }
  40%, 100% {
    opacity: 1;
  }
}

.atom-img-gen-spark {
  animation: atomImgSparkle 1.6s ease-in-out infinite;
}

.atom-img-gen-dot {
  animation: atomImgBlink 1.4s infinite;
  opacity: 0.2;
}

.atom-img-gen-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.atom-img-gen-dot:nth-child(3) {
  animation-delay: 0.4s;
}

.atom-img-gen-wave {
  -webkit-mask-image: radial-gradient(circle closest-side, transparent 80%, #000 92%, transparent 100%);
  mask-image: radial-gradient(circle closest-side, transparent 80%, #000 92%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  animation: atomImgWave 2.4s ease-in infinite;
}

/* ==============================================================================
   COMPREHENSIVE ANDROID CHROME & MOBILE VIEW OPTIMIZATION (<= 900px / 768px / 480px)
   Fixes fixed dropdown trapping, composer bar fit on 360px phones, studio mode
   scrolling, waveforms, artifacts cards/search, split pane, and modals.
   ============================================================================== */

@media (max-width: 900px) {
  body.chat-active .atom-app-layout.artifact-open .atom-chat-pane,
  .atom-app-layout.chat-active.artifact-open .atom-chat-pane,
  .atom-app-layout.artifact-open .atom-chat-pane {
    display: none !important;
  }

  .atom-app-layout.artifact-open .atom-artifact-pane {
    width: 100% !important;
    flex: 1 1 100% !important;
    max-width: 100% !important;
    border-left: none !important;
  }
}

@media (max-width: 768px) {
  /* 1. Top Navigation Bar: Consistent 54px height & clean mobile spacing */
  .atom-top-bar,
  body.chat-active .atom-top-bar,
  body.artifacts-mode-active .atom-top-bar,
  body.image-mode-active .atom-top-bar,
  body.music-mode-active .atom-top-bar {
    height: 54px !important;
    min-height: 54px !important;
    padding: 0 12px !important;
  }

  .top-bar-left {
    gap: 8px !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .stitch-brand-title {
    font-size: 15px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .top-bar-right {
    gap: 8px !important;
    flex-shrink: 0 !important;
  }

  #top-user-dropdown {
    right: 0 !important;
    width: min(290px, calc(100vw - 24px)) !important;
    min-width: 0 !important;
    max-height: calc(100dvh - 72px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* 2. Neutralize containing-block trap so fixed dropdowns position against viewport */
  .atom-input-glass-box,
  .atom-input-glass-box:focus-within {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
  }

  /* Prevent fixed-lock on Studio Artifacts mode */
  body.artifacts-mode-active .atom-locked-input-container,
  .atom-app-layout.artifacts-mode-active .atom-locked-input-container {
    display: none !important;
  }

  body.artifacts-mode-active .atom-chat-pane,
  .atom-app-layout.artifacts-mode-active .atom-chat-pane,
  body.artifacts-mode-active #atom-chat-pane,
  .atom-app-layout.artifacts-mode-active #atom-chat-pane {
    justify-content: flex-start !important;
    align-items: stretch !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  /* 3. Composer Action Bar & Popovers */
  .atom-input-action-bar {
    gap: 8px !important;
  }

  .stitch-composer-left {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    gap: 6px !important;
  }

  .atom-engine-picker-wrap,
  .atom-chip-wrap {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .stitch-model-btn {
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    padding: 0 10px !important;
    height: 34px !important;
    font-size: 13px !important;
  }

  #label-active-engine {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    min-width: 0 !important;
  }

  .stitch-composer-right {
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  .atom-textarea {
    max-height: 132px !important;
    line-height: 1.45 !important;
  }

  .atom-feature-popover {
    right: 0 !important;
    left: auto !important;
    width: min(300px, calc(100vw - 24px)) !important;
    max-height: min(55dvh, 340px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* 4. Active Chat Touch Scrolling & Table/Code Wrapping */
  body.chat-active .atom-chat-viewport,
  .atom-app-layout.chat-active .atom-chat-viewport {
    padding: 12px 12px 8px 12px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    overscroll-behavior-y: contain !important;
  }

  body.chat-active .chat-bubble-row.user .chat-text-box,
  .atom-app-layout.chat-active .chat-bubble-row.user .chat-text-box {
    max-width: 88% !important;
    padding: 9px 13px !important;
    font-size: 0.94rem !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  body.chat-active .chat-bubble-row.bot .chat-text-box,
  .atom-app-layout.chat-active .chat-bubble-row.bot .chat-text-box {
    font-size: 0.95rem !important;
    line-height: 1.65 !important;
    overflow-x: hidden !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  .atom-message-stream table {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .atom-message-stream img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* 5. Image Generation Stage on Mobile */
  body.image-mode-active:not(.chat-active) #atom-chat-viewport,
  .atom-app-layout.image-mode-active:not(.chat-active) #atom-chat-viewport,
  body.image-mode-active:not(.chat-active) .atom-chat-viewport,
  .atom-app-layout.image-mode-active:not(.chat-active) .atom-chat-viewport {
    padding: 10px 10px 6px 10px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
  }

  body.image-mode-active.chat-active #atom-chat-viewport,
  .atom-app-layout.image-mode-active.chat-active #atom-chat-viewport {
    padding: 12px 12px 8px 12px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    overscroll-behavior-y: contain !important;
  }

  #atom-image-stage {
    padding: 4px 2px 6px !important;
    gap: 10px !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
  }

  .atom-image-stage-header {
    gap: 8px !important;
    padding: 2px 2px 0 !important;
  }

  .atom-image-stage-title-wrap h2 {
    font-size: 15px !important;
  }

  .atom-image-stage-title-wrap p {
    font-size: 12px !important;
  }

  #btn-back-image-styles,
  #btn-clear-image-style {
    padding: 5px 10px !important;
    font-size: 12px !important;
  }

  .atom-image-styles-grid,
  .atom-image-styles-grid.is-compact-18 {
    padding: 2px 2px 8px 2px !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    overscroll-behavior-y: contain !important;
  }

  /* 6. Music Generation Stage on Mobile */
  body.music-mode-active #atom-chat-viewport,
  .atom-app-layout.music-mode-active #atom-chat-viewport,
  body.music-mode-active .atom-chat-viewport,
  .atom-app-layout.music-mode-active .atom-chat-viewport {
    padding: 10px 12px 8px 12px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    overscroll-behavior-y: contain !important;
  }

  #atom-music-stage {
    padding: 4px 0 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  #atom-music-stage > div {
    gap: 14px !important;
  }

  #atom-music-stage > div > div {
    flex: 1 1 100% !important;
    width: 100% !important;
    padding: 16px 14px !important;
    border-radius: 16px !important;
    min-height: auto !important;
    gap: 14px !important;
  }

  #music-stage-waveform {
    height: 96px !important;
    padding: 0 10px !important;
    gap: 2px !important;
    border-radius: 12px !important;
  }

  #btn-music-stage-play {
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px !important;
  }

  #btn-music-stage-regenerate,
  #btn-music-stage-download {
    flex: 1 1 calc(50% - 6px) !important;
    justify-content: center !important;
    height: 40px !important;
    padding: 0 12px !important;
    font-size: 12.5px !important;
  }

  /* 7. Settings Popovers (Image & Music) on Mobile */
  #atom-music-settings-popover,
  #atom-image-settings-popover {
    padding: 14px !important;
    gap: 14px !important;
    border-radius: 16px !important;
    margin-bottom: 8px !important;
    max-height: min(56dvh, calc(100dvh - 180px)) !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    overscroll-behavior: contain !important;
  }

  #music-settings-genre-list button,
  #music-settings-mood-list button {
    height: 36px !important;
    padding: 0 12px !important;
    font-size: 12.5px !important;
  }

  .image-style-popover-chip {
    height: 36px !important;
    padding: 0 10px 0 5px !important;
    font-size: 12px !important;
    gap: 6px !important;
  }

  .image-style-popover-chip img {
    width: 24px !important;
    height: 24px !important;
  }

  /* 8. Studio Artifacts Vault on Mobile */
  body.artifacts-mode-active #atom-artifacts-stage,
  .atom-app-layout.artifacts-mode-active #atom-artifacts-stage {
    padding: 12px 12px 10px !important;
    overflow: hidden !important;
    min-height: 0 !important;
    height: 100% !important;
  }

  .atom-artifacts-top-header {
    gap: 10px !important;
    margin-bottom: 12px !important;
  }

  .atom-artifacts-main-heading {
    font-size: 19px !important;
  }

  .atom-artifacts-header-controls {
    width: 100% !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  .atom-artifacts-search-pill {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 7px 12px !important;
  }

  .atom-artifacts-clear-vault-btn {
    padding: 7px 12px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .atom-artifacts-filters-bar {
    gap: 8px !important;
    margin-bottom: 12px !important;
  }

  .atom-artifacts-filter-pills {
    flex: 1 1 auto !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding-bottom: 2px !important;
  }

  .atom-artifacts-filter-pills::-webkit-scrollbar {
    display: none !important;
  }

  .atom-artifact-pill-btn {
    padding: 5px 11px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .atom-artifacts-showing-label {
    font-size: 11.5px !important;
  }

  .atom-artifacts-grid-viewport {
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)) !important;
    gap: 12px !important;
    padding-right: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    overscroll-behavior-y: contain !important;
  }

  .atom-artifacts-disclaimer-footer {
    padding-top: 10px !important;
    font-size: 10.5px !important;
    line-height: 1.35 !important;
  }

  /* 9. Modals & Lightbox on Mobile */
  .atom-modal-overlay {
    padding: 12px !important;
  }

  .stitch-profile-card {
    padding: 16px !important;
    width: 100% !important;
    max-width: calc(100vw - 24px) !important;
    max-height: 90dvh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 16px !important;
  }

  .stitch-profile-header {
    padding-bottom: 12px !important;
    margin-bottom: 14px !important;
  }

  .stitch-profile-body {
    gap: 14px !important;
  }

  #modal-user-profile input[type="text"],
  #modal-user-profile input[type="password"] {
    min-width: 0 !important;
  }

  .stitch-profile-actions button {
    width: 100% !important;
    justify-content: center !important;
  }
}

@media (max-width: 420px) {
  .stitch-profile-actions {
    grid-template-columns: 1fr !important;
  }

  .atom-lightbox-overlay {
    padding: 12px !important;
  }

  .lightbox-close-btn {
    top: max(12px, env(safe-area-inset-top)) !important;
    right: 12px !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 1.5rem !important;
    z-index: 10 !important;
  }

  .lightbox-content-box {
    max-width: 96vw !important;
    max-height: 86dvh !important;
  }

  .lightbox-content-box img {
    max-height: 72dvh !important;
  }
}

@media (hover: none), (max-width: 768px) {
  .atom-artifact-hover-actions {
    display: none !important;
  }
}

@media (max-width: 740px) {
  .atom-engine-dropdown {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    top: auto !important;
    width: auto !important;
    max-width: 420px !important;
    margin: 0 auto !important;
    max-height: min(72dvh, 480px) !important;
    overflow: hidden !important;
    z-index: 3000 !important;
  }

  .engine-providers-list,
  .engine-tiers-list,
  .engine-models-viewport {
    max-height: min(56dvh, 380px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
  }
}

@media (max-width: 640px) {
  .atom-artifacts-grid-viewport {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .atom-artifact-card-body {
    padding: 10px 10px 12px !important;
    gap: 6px !important;
  }

  .atom-artifact-card-title {
    font-size: 13px !important;
  }

  .atom-artifact-card-desc {
    font-size: 11.5px !important;
  }

  .atom-artifact-card-footer {
    padding-top: 8px !important;
    font-size: 11px !important;
  }

  .atom-artifact-action-icons {
    gap: 4px !important;
  }

  .atom-artifact-icon-button {
    padding: 5px !important;
    font-size: 13px !important;
  }
}

@media (max-width: 480px) {
  .atom-image-styles-grid .atom-style-tile,
  .atom-image-styles-grid.is-compact-18 .atom-style-tile {
    aspect-ratio: 1 / 1.08 !important;
    min-height: 110px !important;
    max-height: 165px !important;
    border-radius: 14px !important;
    padding: 8px 6px !important;
  }
}

@media (max-width: 420px) {
  #btn-attach-file,
  #btn-music-customize-settings,
  #btn-image-customize-settings,
  #btn-send-message {
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px !important;
  }

  .stitch-model-btn {
    padding: 0 8px !important;
    font-size: 12.5px !important;
    gap: 4px !important;
  }

  .atom-active-tool-pill {
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
    gap: 5px !important;
  }
}

/* Active Studio Tool SVG Pill Badge (Composer Footer) */
.atom-active-tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 9999px;
  background: #121316;
  border: 1.5px solid #f97316;
  color: #f97316;
  font-family: 'Google Sans', 'Inter', -apple-system, sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 1;
  min-width: 0;
  max-width: 100%;
  transition: background-color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
}

.atom-active-tool-pill:hover {
  background: rgba(249, 115, 22, 0.12);
  box-shadow: 0 0 14px rgba(249, 115, 22, 0.2);
}

.atom-active-tool-pill:active {
  transform: scale(0.97);
}

.atom-active-tool-pill.is-listening {
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.32), 0 0 14px rgba(249, 115, 22, 0.25);
}

.atom-active-tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #f97316;
}

.atom-active-tool-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

@media (max-width: 768px) {
  .stitch-composer-left {
    flex-wrap: wrap !important;
  }

  .atom-active-tool-pill {
    height: 34px;
    padding: 0 11px;
    font-size: 12.5px;
    gap: 6px;
  }
}

/* ==============================================================================
   COLLAPSIBLE GEO ABOUT & FAQ SECTION (WELCOME VIEW ONLY)
   ============================================================================== */
body.chat-active #atom-about-faq-section,
body.music-mode-active #atom-about-faq-section,
body.image-mode-active #atom-about-faq-section,
body.artifacts-mode-active #atom-about-faq-section,
.atom-app-layout.chat-active #atom-about-faq-section,
.atom-app-layout.music-mode-active #atom-about-faq-section,
.atom-app-layout.image-mode-active #atom-about-faq-section,
.atom-app-layout.artifacts-mode-active #atom-about-faq-section {
  display: none !important;
}

.atom-geo-about-section {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 18px auto;
  padding: 0 1rem;
  box-sizing: border-box;
  flex-shrink: 0;
  z-index: 2;
}

.atom-geo-accordion {
  background: rgba(25, 25, 25, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.atom-geo-accordion[open] {
  border-color: rgba(249, 115, 22, 0.32);
  background: rgba(24, 24, 24, 0.96);
}

.atom-geo-summary-toggle {
  list-style: none;
  cursor: pointer;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: #a1a1aa;
  user-select: none;
}

.atom-geo-summary-toggle::-webkit-details-marker {
  display: none;
}

.atom-geo-summary-toggle:hover {
  color: #f4f4f5;
}

.atom-geo-summary-toggle::after {
  content: '▾';
  font-size: 12px;
  color: #f97316;
  transition: transform 0.2s ease;
}

.atom-geo-accordion[open] .atom-geo-summary-toggle::after {
  transform: rotate(180deg);
}

.atom-geo-summary-badge {
  font-size: 11px;
  color: #71717a;
  margin-left: auto;
}

.atom-geo-content {
  padding: 4px 16px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.atom-geo-heading {
  margin: 10px 0 6px 0;
  font-size: 14px;
  font-weight: 600;
  color: #f4f4f5;
}

.atom-geo-copy {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #d4d4d8;
}

.atom-geo-meta-links {
  margin: 8px 0 0 0;
  font-size: 12px;
  color: #a1a1aa;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.atom-geo-meta-links a {
  color: #fb923c;
  text-decoration: underline;
}

.atom-geo-faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.atom-geo-faq-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 9px 12px;
}

.atom-geo-faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.atom-geo-faq-item summary::-webkit-details-marker {
  display: none;
}

.atom-geo-faq-item summary h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #e4e4e7;
}

.atom-geo-faq-item p {
  margin: 8px 0 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #a1a1aa;
}

.atom-geo-faq-item p a {
  color: #fb923c;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .atom-geo-summary-badge {
    display: none;
  }
}

/* ==============================================================================
   CONTEXTUAL STUDIO TOOL CONTROLS BAR (Translate / Audio-to-Text) & WEB CARDS
   ============================================================================== */
.atom-tool-controls-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 10px 8px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.atom-tool-control-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.atom-tool-control-label {
  font-size: 12px;
  font-weight: 600;
  color: #a1a1aa;
  letter-spacing: 0.01em;
}

.atom-tool-select {
  background: #18181b;
  color: #f4f4f5;
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12.5px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.atom-tool-select:hover,
.atom-tool-select:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.16);
}

.atom-tool-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #18181b;
  color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 5px 11px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.atom-tool-action-btn:hover {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.45);
  color: #ffffff;
}

.atom-tool-action-btn.is-recording {
  background: rgba(239, 68, 68, 0.16);
  border-color: #ef4444;
  color: #fca5a5;
}

.atom-rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #f97316;
  display: inline-block;
}

.atom-tool-action-btn.is-recording .atom-rec-dot {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  animation: atomPulseRec 1.1s infinite ease-in-out;
}

@keyframes atomPulseRec {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.55; }
}

/* Web Search Source Citations Grid */
.atom-web-sources-wrap {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.atom-web-sources-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #a1a1aa;
}

.atom-web-sources-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.atom-web-source-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 240px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e4e4e7;
  text-decoration: none;
  font-size: 12px;
  line-height: 1.25;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.12s ease;
}

.atom-web-source-chip:hover {
  border-color: rgba(249, 115, 22, 0.55);
  background: rgba(249, 115, 22, 0.1);
  color: #ffffff;
  transform: translateY(-1px);
}

.atom-web-source-idx {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  border-radius: 9999px;
  background: rgba(249, 115, 22, 0.18);
  color: #fb923c;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.atom-web-source-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.atom-web-source-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.atom-web-source-domain {
  font-size: 10.5px;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 480px) {
  .atom-tool-controls-bar {
    padding: 6px 8px 8px 8px;
    gap: 6px;
  }

  .atom-tool-control-group {
    gap: 6px;
  }

  .atom-tool-control-label {
    font-size: 11.5px;
  }

  .atom-composer-lang-select {
    height: 32px !important;
    max-width: 124px !important;
    padding: 0 24px 0 10px !important;
    font-size: 11.5px !important;
  }

  body .atom-app-layout .atom-input-action-bar {
    flex-wrap: wrap !important;
    row-gap: 6px !important;
  }

  .atom-active-tool-pill {
    max-width: 116px !important;
    padding: 4px 8px !important;
    font-size: 11px !important;
  }

  .atom-web-source-chip {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
}

/* ==============================================================================
   BLACK & ORANGE LIVE SPATIAL HOME STAGE (GUEST & SIGNED-IN HOME)
   ============================================================================== */
body[data-theme="dark"]:not(.bg-mode-grey) {
  background-color: #090b0e !important;
}

body:not(.bg-mode-grey):not(.chat-active):not(.artifacts-mode-active):not(.image-mode-active):not(.music-mode-active) .atom-app-layout {
  background:
    radial-gradient(1100px 580px at 50% -6%, rgba(234, 88, 12, 0.16), transparent 68%),
    radial-gradient(880px 520px at 84% 92%, rgba(249, 115, 22, 0.09), transparent 68%),
    linear-gradient(180deg, #0b0d11 0%, #07080b 100%) !important;
  background-color: #090b0e !important;
}

body:not(.bg-mode-grey):not(.chat-active):not(.artifacts-mode-active):not(.image-mode-active):not(.music-mode-active) #atom-main-stage,
body:not(.bg-mode-grey):not(.chat-active):not(.artifacts-mode-active):not(.image-mode-active):not(.music-mode-active) #atom-chat-pane,
body:not(.bg-mode-grey):not(.chat-active):not(.artifacts-mode-active):not(.image-mode-active):not(.music-mode-active) #atom-chat-viewport,
body:not(.bg-mode-grey):not(.chat-active):not(.artifacts-mode-active):not(.image-mode-active):not(.music-mode-active) .atom-locked-input-container,
body:not(.bg-mode-grey):not(.chat-active):not(.artifacts-mode-active):not(.image-mode-active):not(.music-mode-active) .atom-main-stage,
body:not(.bg-mode-grey):not(.chat-active):not(.artifacts-mode-active):not(.image-mode-active):not(.music-mode-active) .atom-chat-pane,
body:not(.bg-mode-grey):not(.chat-active):not(.artifacts-mode-active):not(.image-mode-active):not(.music-mode-active) .atom-hero-welcome {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

body:not(.bg-mode-grey):not(.chat-active):not(.artifacts-mode-active):not(.image-mode-active):not(.music-mode-active) .atom-top-bar {
  background: linear-gradient(180deg, rgba(13, 15, 19, 0.88), rgba(9, 11, 14, 0.80)) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  backdrop-filter: blur(20px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(140%) !important;
}

body:not(.bg-mode-grey):not(.chat-active):not(.artifacts-mode-active):not(.image-mode-active):not(.music-mode-active):not(.motion-paused) #atom-spatial-canvas,
body:not(.bg-mode-grey):not(.chat-active):not(.artifacts-mode-active):not(.image-mode-active):not(.music-mode-active):not(.motion-paused) .atom-spatial-canvas {
  display: block !important;
  opacity: 0.94 !important;
  visibility: visible !important;
  z-index: 0 !important;
  pointer-events: none !important;
}

/* ==============================================================================
   AZURE AI PREMIUM ADMIN-ONLY LOCKS & BADGES
   ============================================================================== */
.admin-pro-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-transform: uppercase;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.38);
  vertical-align: middle;
}

.provider-flyout-item.owner-unlocked .admin-pro-badge {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.35);
}

.provider-lock-icon {
  margin-left: auto;
  margin-right: 4px;
  font-size: 11px;
  color: #f59e0b;
  flex-shrink: 0;
}

.engine-option .option-lock-icon {
  display: none;
  margin-left: auto;
  font-size: 11px;
  color: #f59e0b;
  flex-shrink: 0;
}

.engine-option.owner-locked .option-lock-icon {
  display: inline-block;
}

.engine-option.owner-locked {
  opacity: 0.68 !important;
  cursor: not-allowed !important;
}

/* ==============================================================================
   INLINE COMPOSER LANGUAGE SELECTOR (LEFT OF + AND ↑ ON RIGHT SIDE)
   ============================================================================== */
.atom-composer-lang-wrap {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  order: 1 !important;
}

.stitch-composer-right #btn-music-customize-settings,
.stitch-composer-right #btn-image-customize-settings {
  order: 2 !important;
}

.stitch-composer-right #btn-attach-file {
  order: 3 !important;
}

.stitch-composer-right #btn-send-message {
  order: 4 !important;
}

.atom-composer-lang-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  height: 36px;
  max-width: 136px;
  padding: 0 26px 0 11px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background-color: rgba(255, 255, 255, 0.055);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 12px 12px;
  color: #f1f5f9;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  outline: none;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.atom-composer-lang-select:hover {
  border-color: rgba(249, 115, 22, 0.55);
  background-color: rgba(255, 255, 255, 0.09);
}

.atom-composer-lang-select:focus {
  border-color: #f97316;
  background-color: rgba(255, 255, 255, 0.1);
}

.atom-composer-lang-select option {
  background: #202020;
  color: #f1f5f9;
}

/* ==============================================================================
   ACCOUNT SETTINGS: BACKGROUND MODE (LIVE VS GREY)
   ============================================================================== */
.atom-bg-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin: 0 0 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.atom-bg-setting-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.atom-bg-setting-label span {
  font-size: 13.5px;
  font-weight: 600;
  color: #f3f4f6;
}

.atom-bg-setting-label small {
  font-size: 11.5px;
  color: #9ca3af;
}

.atom-bg-segmented {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 10px;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.09);
  gap: 2px;
  flex-shrink: 0;
}

.atom-bg-option {
  border: none;
  background: transparent;
  color: #9ca3af;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.atom-bg-option:hover {
  color: #f3f4f6;
}

.atom-bg-option.is-active {
  background: #f97316;
  color: #090b0e;
}

/* Solid Grey Background Preference when user chooses "Grey" in Settings */
html.bg-mode-grey,
body.bg-mode-grey,
body.bg-mode-grey .atom-app-layout,
body.bg-mode-grey #atom-main-stage,
body.bg-mode-grey .atom-chat-pane,
body.bg-mode-grey #atom-chat-pane,
body.bg-mode-grey .atom-chat-viewport,
body.bg-mode-grey #atom-chat-viewport,
body.bg-mode-grey .atom-chat-stream,
body.bg-mode-grey .atom-locked-input-container,
body.bg-mode-grey .atom-hero-welcome {
  background: #191919 !important;
  background-color: #191919 !important;
  background-image: none !important;
}

body.bg-mode-grey .atom-top-bar {
  background: #191919 !important;
  background-color: #191919 !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

body.bg-mode-grey #atom-spatial-canvas,
body.bg-mode-grey .atom-spatial-canvas {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ============================================================================
 * REDESIGNED SCROLLABLE RECENTS SIDEBAR & ARTIFACTS SHARE / MOBILE POLISH
 * ============================================================================ */
#atom-sidebar-drawer,
.atom-sidebar-drawer {
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

#atom-sidebar-drawer .atom-sidebar-header,
#atom-sidebar-drawer .atom-sidebar-nav-group,
#atom-sidebar-drawer .atom-sidebar-tools-group,
#atom-sidebar-drawer .atom-sidebar-recents-label,
#atom-sidebar-drawer .atom-sidebar-footer {
  flex-shrink: 0 !important;
}

#atom-sidebar-drawer .atom-sidebar-recents-label {
  padding: 10px 14px 6px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #8b8e96 !important;
}

#atom-sidebar-drawer #atom-sessions-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 87, 0, 0.14);
  border: 1px solid rgba(255, 87, 0, 0.3);
  color: #ff7a33;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
}

#atom-sidebar-drawer .atom-sidebar-recents-container,
.atom-sidebar-drawer .atom-sidebar-recents-container,
#atom-sessions-list {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  padding: 2px 8px 10px 10px !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent !important;
  overscroll-behavior-y: contain !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
}

#atom-sessions-list::-webkit-scrollbar,
.atom-sidebar-recents-container::-webkit-scrollbar {
  width: 5px !important;
  display: block !important;
}

#atom-sessions-list::-webkit-scrollbar-track,
.atom-sidebar-recents-container::-webkit-scrollbar-track {
  background: transparent !important;
}

#atom-sessions-list::-webkit-scrollbar-thumb,
.atom-sidebar-recents-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 999px !important;
}

#atom-sessions-list::-webkit-scrollbar-thumb:hover,
.atom-sidebar-recents-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35) !important;
}

#atom-sessions-list .atom-session-item {
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  padding: 8px 9px !important;
  border-radius: 10px !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: background 0.16s ease !important;
  min-width: 0 !important;
}

#atom-sessions-list .atom-session-item:hover {
  background: rgba(255, 255, 255, 0.055) !important;
  border: none !important;
}

#atom-sessions-list .atom-session-item.active {
  background: rgba(255, 255, 255, 0.08) !important;
  border: none !important;
  box-shadow: none !important;
}

#atom-sessions-list .atom-session-icon,
#atom-sessions-list .atom-session-item.active .atom-session-icon {
  display: none !important;
}

#atom-sessions-list .atom-session-info {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

#atom-sessions-list .atom-session-title {
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
  color: #ececef !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
}

#atom-sessions-list .atom-session-item.active .atom-session-title {
  color: #ffffff !important;
  font-weight: 600 !important;
}

#atom-sessions-list .atom-session-meta {
  font-size: 10.5px !important;
  line-height: 1.2 !important;
  color: #7c7f87 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
}

#atom-sessions-list .btn-delete-session {
  opacity: 0;
  width: 24px !important;
  height: 24px !important;
  border-radius: 6px !important;
  border: none !important;
  background: transparent !important;
  color: #8b8e96 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease !important;
}

#atom-sessions-list .atom-session-item:hover .btn-delete-session,
#atom-sessions-list .atom-session-item:focus-within .btn-delete-session,
#atom-sessions-list .atom-session-item.active .btn-delete-session {
  opacity: 1;
}

#atom-sessions-list .btn-delete-session:hover {
  background: rgba(239, 68, 68, 0.16) !important;
  color: #f87171 !important;
}

@media (max-width: 768px) {
  #atom-sessions-list .btn-delete-session {
    opacity: 0.78 !important;
  }
}

/* Studio Artifacts Share & Responsive Fixes */
.atom-artifact-icon-button {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
}

.atom-artifact-icon-button.share:hover {
  color: #ff7a33;
  background: rgba(255, 87, 0, 0.12);
}

.atom-artifact-icon-button.download:hover {
  color: #ff5a1f;
  background: rgba(255, 87, 0, 0.12);
}

.atom-artifact-icon-button.danger:hover {
  background: rgba(239, 68, 68, 0.14);
}

.atom-artifact-card-footer {
  gap: 8px;
}

.atom-artifact-card-footer > span {
  white-space: nowrap;
  font-size: 11.5px;
}

.atom-artifact-action-icons {
  gap: 4px !important;
  flex-shrink: 0;
}

#btn-sidebar-logout,
.atom-sidebar-logout-btn {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  padding: 5px 10px !important;
}

/* Collapsible Studio Tools Accordion & Compact Footer (more space for History) */
#atom-sidebar-drawer .atom-sidebar-tools-toggle {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 8px !important;
  padding: 8px 10px !important;
  cursor: pointer !important;
  font-family: inherit !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #8b8e96 !important;
  transition: background 0.15s ease, color 0.15s ease !important;
  flex-shrink: 0 !important;
}

#atom-sidebar-drawer .atom-sidebar-tools-toggle:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  color: #ececef !important;
}

#atom-sidebar-drawer .atom-sidebar-tools-toggle .atom-tools-chevron {
  transition: transform 0.2s ease !important;
  color: #8b8e96 !important;
  flex-shrink: 0 !important;
}

#atom-sidebar-drawer .atom-sidebar-tools-toggle[aria-expanded="false"] .atom-tools-chevron {
  transform: rotate(-90deg) !important;
}

#atom-sidebar-drawer:not(.collapsed) #atom-sidebar-tools-group.is-collapsed,
#atom-sidebar-drawer:not(.collapsed) .atom-sidebar-tools-group.is-collapsed {
  display: none !important;
}

#atom-sidebar-drawer .atom-sidebar-footer {
  padding-top: 8px !important;
  padding-bottom: 10px !important;
}

/* Top header bar matches sidebar grey seamlessly in all modes */
header.atom-top-bar,
.atom-top-bar,
body.bg-mode-grey .atom-top-bar,
body:not(.bg-mode-grey):not(.chat-active):not(.artifacts-mode-active):not(.image-mode-active):not(.music-mode-active) .atom-top-bar,
body.chat-active .atom-top-bar,
body.artifacts-mode-active .atom-top-bar,
body.image-mode-active .atom-top-bar,
body.music-mode-active .atom-top-bar,
.atom-app-layout.chat-active .atom-top-bar,
.atom-app-layout.artifacts-mode-active .atom-top-bar,
.atom-app-layout.image-mode-active .atom-top-bar,
.atom-app-layout.music-mode-active .atom-top-bar {
  background: #1e1e1e !important;
  background-color: #1e1e1e !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: 1px solid #2a2a2a !important;
}

@media (max-width: 560px) {
  .atom-artifacts-grid-viewport {
    grid-template-columns: 1fr !important;
  }
  .atom-artifacts-search-pill {
    width: 100%;
    flex: 1 1 180px;
  }
}

/* ============================================================================
   ATOM STUDIO CUSTOM CONFIRMATION & NOTIFICATION DIALOG (DARK GREY + ORANGE)
   ============================================================================ */
#atom-studio-dialog-overlay.atom-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: modalFadeIn 0.16s ease-out;
}

#atom-studio-dialog-overlay .atom-dialog-card {
  width: 100%;
  max-width: 420px;
  background: #1a1a1c;
  border: 1px solid #2e2e33;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.88), 0 0 0 1px rgba(255, 255, 255, 0.03);
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-family: 'Google Sans', 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  animation: modalSlideUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

#atom-studio-dialog-overlay .atom-dialog-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

#atom-studio-dialog-overlay .atom-dialog-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 87, 0, 0.12);
  border: 1px solid rgba(255, 87, 0, 0.28);
  color: #ff7a33;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

#atom-studio-dialog-overlay.is-danger .atom-dialog-icon-wrap {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.28);
  color: #f87171;
}

#atom-studio-dialog-overlay .atom-dialog-copy {
  flex: 1 1 auto;
  min-width: 0;
}

#atom-studio-dialog-overlay .atom-dialog-title {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.3;
  color: #f4f4f5;
}

#atom-studio-dialog-overlay .atom-dialog-message {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: #a1a1aa;
  word-break: break-word;
}

#atom-studio-dialog-overlay .atom-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

#atom-studio-dialog-overlay .atom-dialog-btn {
  height: 36px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#atom-studio-dialog-overlay .atom-dialog-btn-cancel {
  background: #252529;
  border: 1px solid #35353b;
  color: #e4e4e7;
}

#atom-studio-dialog-overlay .atom-dialog-btn-cancel:hover {
  background: #2f2f35;
  border-color: #46464e;
}

#atom-studio-dialog-overlay .atom-dialog-btn-confirm {
  background: #ff5700;
  border: 1px solid #ff6a1a;
  color: #ffffff;
}

#atom-studio-dialog-overlay .atom-dialog-btn-confirm:hover {
  background: #ff6a1a;
}

#atom-studio-dialog-overlay .atom-dialog-btn-confirm.is-danger {
  background: #dc2626;
  border-color: #ef4444;
  color: #ffffff;
}

#atom-studio-dialog-overlay .atom-dialog-btn-confirm.is-danger:hover {
  background: #ef4444;
}

@media (max-width: 540px) {
  #atom-studio-dialog-overlay .atom-dialog-card {
    padding: 18px 16px 16px;
    border-radius: 14px;
  }
  #atom-studio-dialog-overlay .atom-dialog-actions {
    flex-direction: row;
  }
  #atom-studio-dialog-overlay .atom-dialog-btn {
    flex: 1 1 0;
    height: 40px;
  }
}










/* ============================================================================
   RIGHT-SIDE CONTEXTUAL FEEDBACK DRAWER (Atom Forge Studio Dark & Orange Theme)
   ============================================================================ */
@keyframes atomFeedbackSlideIn {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.atom-feedback-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 10060;
}

.atom-feedback-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  background: #101014;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -16px 0 48px rgba(0, 0, 0, 0.65);
  z-index: 10065;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 24px;
  color: #f4f4f5;
  overflow-y: auto;
  animation: atomFeedbackSlideIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.atom-feedback-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.atom-feedback-title {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 4px;
  line-height: 1.3;
}

.atom-feedback-subtitle {
  font-size: 13px;
  color: #9ca3af;
  margin: 0;
  line-height: 1.45;
}

.atom-feedback-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #9ca3af;
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.16s ease, background 0.16s ease;
}

.atom-feedback-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.atom-feedback-body {
  display: flex;
  flex-direction: column;
}

.atom-feedback-pills {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}

.atom-feedback-pill {
  padding: 9px 16px;
  border-radius: 999px;
  background: #1b1b20;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e4e4e7;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: left;
  font-family: inherit;
}

.atom-feedback-pill:hover {
  background: #24242b;
  border-color: rgba(255, 255, 255, 0.18);
}

.atom-feedback-pill.selected {
  background: rgba(255, 106, 26, 0.16);
  border-color: #ff6a1a;
  color: #ffb088;
  box-shadow: 0 0 0 1px rgba(255, 106, 26, 0.25);
}

.atom-feedback-input-wrap {
  margin-bottom: 14px;
}

.atom-feedback-textarea {
  width: 100%;
  min-height: 78px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #141419;
  color: #f4f4f5;
  font-size: 13.5px;
  font-family: inherit;
  line-height: 1.45;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.atom-feedback-textarea::placeholder {
  color: #71717a;
}

.atom-feedback-textarea:focus {
  border-color: #ff6a1a;
  box-shadow: 0 0 0 2px rgba(255, 106, 26, 0.18);
}

.atom-feedback-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 12px;
  line-height: 1.45;
  color: #a1a1aa;
  cursor: pointer;
}

.atom-feedback-consent input[type="checkbox"] {
  accent-color: #ff6a1a;
  margin-top: 2px;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  cursor: pointer;
}

.atom-feedback-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.atom-feedback-submit-btn {
  padding: 9px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 106, 26, 0.5);
  background: linear-gradient(135deg, #ff6a1a, #ea580c);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.atom-feedback-submit-btn:hover:not(:disabled) {
  filter: brightness(1.08);
  box-shadow: 0 6px 20px rgba(255, 106, 26, 0.28);
}

.atom-feedback-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.atom-feedback-skip-btn {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.atom-feedback-skip-btn:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.55);
}

.atom-feedback-thanks {
  margin: auto 0;
  padding: 28px 18px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255, 106, 26, 0.08), rgba(24, 24, 29, 0.95));
  border: 1px solid rgba(255, 106, 26, 0.32);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.atom-feedback-thanks-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 106, 26, 0.14);
  border: 1px solid rgba(255, 106, 26, 0.4);
  color: #fb923c;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(255, 106, 26, 0.2);
}

.atom-feedback-thanks-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 600;
  color: #ffffff;
}

.atom-feedback-thanks-sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #a1a1aa;
}


/* ============================================================================
   PROFILE ACCOUNT ACTIONS REDESIGN & STRICT ADMIN VISIBILITY
   ============================================================================ */
.stitch-profile-actions [hidden],
.stitch-profile-actions .is-admin-hidden,
#btn-admin-view-users.is-admin-hidden,
#btn-profile-switch-account.is-admin-hidden,
#admin-users-list-panel.is-admin-hidden {
  display: none !important;
}

.stitch-profile-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-top: 12px !important;
  padding-top: 12px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
}

#modal-user-profile .stitch-btn-secondary {
  background: #1b1b20 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #f4f4f5 !important;
  border-radius: 11px !important;
  min-height: 42px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

#modal-user-profile .stitch-btn-secondary:hover {
  background: #24242b !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

#modal-user-profile .stitch-btn-admin {
  background: rgba(255, 106, 26, 0.1) !important;
  border: 1px solid rgba(255, 106, 26, 0.32) !important;
  color: #fdba74 !important;
}

#modal-user-profile .stitch-btn-admin:hover {
  background: rgba(255, 106, 26, 0.18) !important;
  border-color: rgba(255, 106, 26, 0.5) !important;
}

.stitch-admin-pill {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 106, 26, 0.2);
  color: #fb923c;
  margin-left: 4px;
}

#modal-user-profile .stitch-btn-danger {
  background: rgba(239, 68, 68, 0.07) !important;
  border: 1px solid rgba(239, 68, 68, 0.26) !important;
  color: #f87171 !important;
  border-radius: 11px !important;
  min-height: 42px !important;
  height: auto !important;
}

#modal-user-profile .stitch-btn-danger:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
  color: #fca5a5 !important;
}
