/* ═══════════════════════════════════════════
   Velunis — theme-dark.css
   Central design token system (Dark charcoal)
   Loaded last → wins over style.css / responsive.css
   ═══════════════════════════════════════════ */

:root {
  /* ── Design tokens ── */
  --cream:        #222221;   /* page canvas */
  --charcoal:     #1c1c1c;   /* sidebar, dark controls */
  --off-white:    #272726;   /* light surfaces (cards, modal, input) */
  --ink:          #fcfbf8;   /* light text on dark surfaces */
  --charcoal-83:  rgba(28, 28, 28, 0.83);
  --muted-gray:   rgba(252, 251, 248, 0.55);
  --charcoal-40:  rgba(28, 28, 28, 0.4);
  --charcoal-4:   rgba(28, 28, 28, 0.04);
  --charcoal-3:   rgba(28, 28, 28, 0.03);
  --light-cream:  rgba(252, 251, 248, 0.1);
  --ring-blue:    rgba(59, 130, 246, 0.5);

  /* ── Legacy variable mapping (used across style.css) ── */
  --bg:           var(--cream);
  --bg-card:      var(--off-white);
  --bg-elevated:  var(--charcoal);
  --bg-glass:     rgba(34, 34, 33, 0.82);
  --bg-input:     var(--off-white);

  --accent:       var(--charcoal);
  --accent-soft:  var(--charcoal-83);
  --img-accent:   var(--off-white);
  --img-soft:     var(--muted-gray);

  --text-dark:    var(--ink);
  --text-mid:     var(--muted-gray);
  --text-soft:    var(--muted-gray);

  --border:       var(--light-cream);
  --border-focus: var(--ring-blue);

  --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md:    0 2px 8px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg:    0 4px 12px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.4);
  --shadow-float: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);

  --sb-open:      240px;
  --sb-closed:    64px;

  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Fraunces — expressive display serif for the hero headline ──
   Self-hosted variable font (wght 100–900, optical sizing), paired
   with the Inter UI type. Used only on the hero title; everything
   else keeps the Inter display/body stacks. */
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/Fraunces-latin.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/Fraunces-latin-ext.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/Fraunces-latin-ext2.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* ── Page surface ── */
html, body, .page {
  background: var(--cream);
}

/* Transparent canvases so the fixed ambient aurora shows through
   the full viewport, including behind the glass sidebar */
.page,
.chat-container {
  background: transparent;
}

.chat-container {
  position: relative;
  z-index: 1;
}

/* ── Message area: no header to blend under, drop the fade mask ── */
#chat-box {
  -webkit-mask-image: none;
  mask-image: none;
}

/* ── Initial (empty) state: hero + input + starter prompts ──
   Two-part landing page in normal document flow: a viewport-height
   stage centers heading + composer as a group (area right of the
   sidebar); the starter prompts sit below the fold as their own
   section. The page scrolls — no JS pinning, no inner scroller. */
.chat-container.is-initial {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  padding-top: 0;
  height: auto;
  min-height: 0;
  overflow: visible;
  overflow-x: hidden;
}
.chat-container.is-initial .prompt-peek-room {
  display: none;
}

.chat-container.is-initial #chat-hero {
  flex: none;
  margin: 0;
  padding: clamp(10px, 2.5vh, 20px) 0 0;
  justify-content: flex-start;
}

.chat-container.is-initial .chat-input-wrapper {
  margin: 0;
  padding-top: 10px;
  padding-bottom: 0;
  width: 100%;
  z-index: 2;
}

.chat-container.is-initial #chat-box {
  flex: none;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.chat-container.is-initial .chat-input-spacer,
.chat-container.is-initial #typing-indicator {
  display: none !important;
}

/* ── Keyboard/accessibility focus ring (blue, only for keyboard) ── */
:focus-visible {
  outline: 2px solid var(--ring-blue);
  outline-offset: 2px;
}

/* ══════════════════════════════
   AMBIENT ATMOSPHERE — cinematic aurora
   Deep navy → electric blue → violet → pink → magenta
   Large feathered glows, no banding, dark corners
   ══════════════════════════════ */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    /* Corner vignette — keeps top corners dark */
    radial-gradient(ellipse 150% 110% at 50% 42%, rgba(3, 5, 10, 0) 42%, rgba(3, 5, 10, 0.55) 100%),
    /* Center softening — calmer band around the composer,
       lets the outer arms carry the light (subtle V / curve) */
    radial-gradient(ellipse 72% 52% at 50% 57%, rgba(3, 5, 10, 0.42) 0%, rgba(3, 5, 10, 0) 75%),
    /* Aurora wash — soft luminous veil over the lower half */
    radial-gradient(ellipse 130% 90% at 50% 88%, rgba(244, 114, 182, 0.16) 0%, rgba(200, 90, 220, 0.08) 45%, rgba(59, 130, 246, 0) 75%),
    /* Base color flow — seamless vertical transition */
    linear-gradient(
      180deg,
      #05070d 0%,
      #081022 14%,
      #0d1a38 28%,
      #14307a 42%,
      #2347b8 52%,
      #3d42b8 56%,
      #5438b8 62%,
      #7a3fc4 68%,
      #a24fd0 72%,
      #c97ac2 77%,
      #d477b8 80%,
      #e46aa2 85%,
      #e8559c 90%,
      #c92a80 95%,
      #a01e6b 100%
    );
  transition: opacity 0.6s ease;
}
.ambient-bg.ambient-hidden {
  opacity: 0.3;
}

/* Chat view — same aurora, calmed: glow stays visible (neon pink/blue
   arms and apex) but at reduced intensity so message text stays readable */
.ambient-bg.ambient-chat {
  opacity: 0.62;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  transition: opacity 1.4s ease;
}

/* Soft V-shaped flow: brighter energy along the outer arms,
   calmer and darker toward the center where the chat sits.
   Left arm — electric blue, hugging the left edge */
.ambient-orb-blue {
  width: 110vmin;
  height: 110vmin;
  top: -12%;
  left: 6%;
  transform: translateX(-50%);
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.5) 0%, rgba(37, 99, 235, 0.2) 38%, rgba(37, 99, 235, 0) 68%);
  filter: blur(50px);
  animation: aurora-drift-a 48s ease-in-out infinite;
}

/* Right arm — violet, hugging the right edge */
.ambient-orb-purple {
  width: 100vmin;
  height: 100vmin;
  top: 10%;
  left: 94%;
  transform: translateX(-50%);
  background: radial-gradient(circle at center, rgba(147, 51, 234, 0.34) 0%, rgba(147, 51, 234, 0.12) 42%, rgba(147, 51, 234, 0) 70%);
  filter: blur(50px);
  animation: aurora-drift-b 56s ease-in-out infinite;
}

/* Apex — pink/magenta glow low in the middle, below the composer,
   slightly calmer than the arms */
.ambient-orb-pink {
  width: 120vmin;
  height: 120vmin;
  bottom: -32%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle at center, rgba(236, 72, 153, 0.4) 0%, rgba(236, 72, 153, 0.16) 38%, rgba(236, 72, 153, 0) 68%);
  filter: blur(50px);
  animation: aurora-drift-c 50s ease-in-out infinite;
}

/* ── Gravitational wave layers ─────────────────────────────
   Soft luminous contour rings that slowly bend, stretch and
   travel. Concentric radial ripples, heavily blurred, so they
   read as atmospheric wave bands — never as lines or shapes.
   Transform-only keyframes (translate/rotate/scale) keep the
   whole effect on the compositor, no per-frame repaints. */
.ambient-wave {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(46px);
  will-change: transform;
}

/* Wave A — blue contour pairs riding the left arm, drifting up-left */
.ambient-wave-a {
  width: 46vmin;
  height: 46vmin;
  top: 38vh;
  left: -6vw;
  background:
    radial-gradient(circle at 50% 50%,
      rgba(96, 165, 250, 0.09) 0%,
      rgba(96, 165, 250, 0.045) 18%,
      rgba(56, 120, 250, 0) 30%,
      rgba(56, 120, 250, 0.11) 42%,
      rgba(56, 120, 250, 0) 54%,
      rgba(96, 165, 250, 0.07) 66%,
      rgba(96, 165, 250, 0) 80%);
  animation: wave-flow-a 42s ease-in-out infinite,
             wave-breathe 15s ease-in-out infinite;
}

/* Wave B — violet contour pairs along the right arm, counter-flow */
.ambient-wave-b {
  width: 42vmin;
  height: 42vmin;
  top: 30vh;
  left: 82vw;
  background:
    radial-gradient(circle at 50% 50%,
      rgba(168, 85, 247, 0.08) 0%,
      rgba(168, 85, 247, 0.04) 18%,
      rgba(139, 92, 246, 0) 30%,
      rgba(139, 92, 246, 0.1) 42%,
      rgba(139, 92, 246, 0) 54%,
      rgba(168, 85, 247, 0.06) 66%,
      rgba(168, 85, 247, 0) 80%);
  animation: wave-flow-b 50s ease-in-out infinite,
             wave-breathe 21s ease-in-out infinite;
}

/* Wave C — magenta ripples gathering low under the composer,
   feeding the apex, mostly below the fold */
.ambient-wave-c {
  width: 50vmin;
  height: 50vmin;
  top: 62vh;
  left: calc(50% - 25vmin);
  background:
    radial-gradient(circle at 50% 50%,
      rgba(244, 114, 182, 0.08) 0%,
      rgba(244, 114, 182, 0.04) 18%,
      rgba(217, 70, 239, 0) 30%,
      rgba(244, 114, 182, 0.09) 42%,
      rgba(217, 70, 239, 0) 54%,
      rgba(217, 70, 239, 0.055) 66%,
      rgba(217, 70, 239, 0) 80%);
  animation: wave-flow-c 46s ease-in-out infinite,
             wave-breathe 17s ease-in-out infinite;
}

@keyframes wave-flow-a {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1.07, 0.9); }
  25%  { transform: translate(-10%, -7%) rotate(14deg) scale(0.9, 1.1); }
  50%  { transform: translate(8%, -5%) rotate(-12deg) scale(1.1, 0.88); }
  75%  { transform: translate(5%, 9%) rotate(7deg) scale(0.92, 1.08); }
  100% { transform: translate(0, 0) rotate(-4deg) scale(1.04, 0.94); }
}
@keyframes wave-flow-b {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1, 1); }
  25%  { transform: translate(9%, -6%) rotate(-13deg) scale(1.09, 0.91); }
  50%  { transform: translate(-7%, 8%) rotate(11deg) scale(0.9, 1.1); }
  75%  { transform: translate(-9%, -5%) rotate(-8deg) scale(1.07, 0.93); }
  100% { transform: translate(0, 0) rotate(5deg) scale(0.96, 1.04); }
}
@keyframes wave-flow-c {
  0%   { transform: translate(0, 0) rotate(0deg) scale(0.95, 1.06); }
  25%  { transform: translate(-8%, 6%) rotate(12deg) scale(1.08, 0.9); }
  50%  { transform: translate(5%, 8%) rotate(-10deg) scale(0.9, 1.09); }
  75%  { transform: translate(9%, -4%) rotate(5deg) scale(1.06, 0.92); }
  100% { transform: translate(0, 0) rotate(-4deg) scale(1.02, 0.98); }
}

/* ── Light-intensity breathing shared by all wave layers ── */
@keyframes wave-breathe {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

/* ── Painterly wash layer ───────────────────────────────────
   Low-opacity collage of the app's own generated artwork,
   heavily blurred and diffused beneath the aurora, so the
   background reads as an expressive painted surface rather
   than a plain SaaS gradient. Soft-light blend keeps it
   subtle; slow transform-only drift keeps it cheap. */
.ambient-paint {
  position: absolute;
  inset: -8%;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: soft-light;
  background-image:
    url('/demo/generated-image.png'),
    url('/demo/generated-image.png'),
    radial-gradient(60% 55% at 18% 22%, rgba(147, 51, 234, 0.35), rgba(147, 51, 234, 0) 70%),
    radial-gradient(55% 50% at 82% 70%, rgba(236, 72, 153, 0.3), rgba(236, 72, 153, 0) 72%);
  background-size: 52% 52%, 62% 62%, 100% 100%, 100% 100%;
  background-position: 10% 16%, 80% 74%, 0 0, 0 0;
  background-repeat: no-repeat;
  filter: blur(48px) saturate(1.15);
  animation: paint-drift 46s ease-in-out infinite alternate;
  will-change: transform;
}

/* Brush-grain texture on top of the washed artwork — soft
   fractal noise so the surface feels painted, never flat */
.ambient-paint::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.28;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><filter id='b'><feTurbulence type='fractalNoise' baseFrequency='0.011 0.016' numOctaves='3' seed='11'/><feColorMatrix type='saturate' values='0'/></filter><rect width='400' height='400' filter='url(%23b)'/></svg>");
  background-size: 400px 400px;
}

@keyframes paint-drift {
  0%   { transform: translate3d(-1.6%, -1.2%, 0) scale(1.02); }
  50%  { transform: translate3d(1.4%, 1.3%, 0) scale(1.1); }
  100% { transform: translate3d(-1%, 1.9%, 0) scale(1.05); }
}

/* ── Slow atmospheric drift — transform only, cheap to animate ── */
@keyframes aurora-drift-a {
  0% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  50% {
    transform: translateX(-50%) translateY(-1.6%) scale(1.03);
  }
  100% {
    transform: translateX(-50%) translateY(1%) scale(1.02);
  }
}
@keyframes aurora-drift-b {
  0% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  50% {
    transform: translateX(-50%) translateY(1.4%) scale(1.02);
  }
  100% {
    transform: translateX(-50%) translateY(-1.2%) scale(1.03);
  }
}
@keyframes aurora-drift-c {
  0% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  50% {
    transform: translateX(-50%) translateY(-1.2%) scale(1.04);
  }
  100% {
    transform: translateX(-50%) translateY(1.4%) scale(1.01);
  }
}

/* ── Focused interaction — keep the flow, calm it down ── */
.ambient-bg.ambient-calm .ambient-orb,
.ambient-bg.ambient-calm .ambient-wave,
.ambient-bg.ambient-calm .ambient-paint {
  opacity: 0.5 !important;
}

@media (prefers-reduced-motion: reduce) {
  .ambient-orb,
  .ambient-wave,
  .ambient-paint {
    animation: none !important;
  }
}

/* ══════════════════════════════
SIDEBAR — translucent dark glass
   ══════════════════════════════════ */
.sidebar {
  background: rgba(10, 10, 12, 0.1);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border-right: 1px solid rgba(252, 251, 248, 0.05);
}

.sidebar-logo {
  background: rgba(252, 251, 248, 0.12);
}
.sidebar-logo svg { color: var(--ink); }

/* ── Brand mark + wordmark (mobile header) ── */
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.95), rgba(168, 85, 247, 0.95) 55%, rgba(236, 72, 153, 0.95));
  box-shadow: 0 4px 14px rgba(147, 51, 234, 0.35);
  color: #0b0b0d;
}
.brand-mark svg { width: 15px; height: 15px; }
.brand-name {
  font-family: 'Fraunces', 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 560;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.sidebar-collapse-btn {
  color: rgba(252, 251, 248, 0.55);
}
.sidebar-collapse-btn:hover { background: rgba(252, 251, 248, 0.1); }

.sidebar-btn {
  color: rgba(252, 251, 248, 0.72);
}
.sidebar-btn:hover {
  background: rgba(252, 251, 248, 0.07);
  color: var(--ink);
}
.sidebar-btn.active {
  background: rgba(252, 251, 248, 0.1);
  color: var(--ink);
}

.sidebar-section-label,
.history-title {
  color: var(--muted-gray);
}

.sidebar-divider {
  background: rgba(252, 251, 248, 0.08);
}

.history-item:hover { background: rgba(252, 251, 248, 0.07); }
.history-item.active-chat { background: rgba(252, 251, 248, 0.1); }
.history-item-text { color: rgba(252, 251, 248, 0.6); }
.history-item.active-chat .history-item-text { color: var(--ink); }

.history-del { color: rgba(252, 251, 248, 0.4); }
.history-del:hover { color: #fca5a5; }

.history-list::-webkit-scrollbar-thumb { background: rgba(252, 251, 248, 0.18); }

.history-search-input {
  background: rgba(252, 251, 248, 0.06);
  border-color: rgba(252, 251, 248, 0.12);
  color: var(--ink);
}
.history-search-input::placeholder { color: rgba(252, 251, 248, 0.38); }
.history-search-input:focus {
  border-color: rgba(252, 251, 248, 0.35);
  box-shadow: 0 0 0 2px rgba(252, 251, 248, 0.08);
}
.history-search svg { color: rgba(252, 251, 248, 0.45); }

.coming-soon-tag {
  background: rgba(252, 251, 248, 0.14);
  color: rgba(252, 251, 248, 0.75);
}

/* ══════════════════════════════
   HEADER / NAV
   ══════════════════════════════ */
.chat-header {
  background: var(--bg-glass);
  border-bottom: 1px solid rgba(252, 251, 248, 0.08);
}

.brand-btn {
  color: var(--ink);
}
.brand-btn::before {
  background: var(--ink);
  box-shadow: none;
}

.new-chat-link {
  color: rgba(252, 251, 248, 0.85);
  background: transparent;
  border-color: rgba(252, 251, 248, 0.15);
}
.new-chat-link:hover {
  background: rgba(252, 251, 248, 0.06);
  color: var(--ink);
  border-color: rgba(252, 251, 248, 0.28);
}

.mobile-header-name { color: var(--ink); }
.mobile-header-dot { background: var(--ink); }
#mobileMenuBtn { color: var(--ink); }
#mobileMenuBtn:active { background: rgba(252, 251, 248, 0.08); }
#mobileNewChatBtn {
  color: var(--ink);
  border-color: rgba(252, 251, 248, 0.18);
}
#mobileNewChatBtn:active { background: rgba(252, 251, 248, 0.08); }
#mobileHeader {
  border-bottom-color: rgba(252, 251, 248, 0.08);
}

/* ══════════════════════════════
   HERO / EMPTY STATE
   ══════════════════════════════ */
.hero-title {
  color: var(--ink);
  font-family: 'Fraunces', 'Playfair Display', Georgia, serif;
  font-weight: 560;
  letter-spacing: -0.01em;
  font-optical-sizing: auto;
}
.hero-highlight { color: var(--ink); font-style: italic; }
.typing-cursor { background: var(--ink); }
.hero-sub { color: rgba(252, 251, 248, 0.6); }

.mode-badge {
  background: rgba(252, 251, 248, 0.06);
  color: var(--ink);
  border-color: rgba(252, 251, 248, 0.14);
}
.img-hint {
  background: rgba(252, 251, 248, 0.04);
  color: rgba(252, 251, 248, 0.8);
  border-color: rgba(252, 251, 248, 0.12);
}

/* ══════════════════════════════
   CHAT COMPOSER — floating translucent glass
   Matches the sidebar glass language: ~88% transparent
   dark charcoal, soft backdrop blur, hairline border,
   gentle shadow. The wave stays faintly visible through it.
   ══════════════════════════════ */
.input-card {
  background: rgba(12, 12, 14, 0.12);
  border: 1px solid rgba(252, 251, 248, 0.16);
  border-radius: 28px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.25),
    0 8px 28px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(252, 251, 248, 0.05);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  padding: 8px 12px;
}
.input-card:hover {
  border-color: rgba(252, 251, 248, 0.24);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 12px 32px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(252, 251, 248, 0.06);
}
.input-card.focused,
.input-card:focus-within {
  border-color: rgba(252, 251, 248, 0.3);
  box-shadow:
    0 0 0 3px rgba(252, 251, 248, 0.05),
    0 8px 28px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(252, 251, 248, 0.05);
}
.input-card.img-mode {
  border-color: rgba(252, 251, 248, 0.3);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.chat-input,
.main-input {
  color: var(--ink);
}
.chat-input::placeholder,
.main-input::placeholder { color: var(--muted-gray); }

/* ── Chat input field ────────────────────────────────
   Textarea area, grows with the native placeholder. */
.chat-input-field {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  min-width: 0;
}

/* Plus button — neutral control */
.plus-btn {
  background: rgba(252, 251, 248, 0.05);
  border-color: rgba(252, 251, 248, 0.12);
  color: rgba(252, 251, 248, 0.85);
}

/* ── Plus button tooltip ──
   Floating glass pill above the composer, anchored to the
   plus button. Hover/focus reveals it; hidden on touch
   devices where tapping opens the modal directly. */
.plus-btn-tip {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 400;
  background: rgba(16, 16, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(252, 251, 248, 0.14);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.2;
  padding: 8px 12px;
  border-radius: 10px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.chat-input-inner:has(#plusBtn:hover) .plus-btn-tip,
.chat-input-inner:has(#plusBtn:focus-visible) .plus-btn-tip {
  opacity: 1;
  transform: translateY(0);
}
@media (hover: none), (max-width: 768px) {
  .plus-btn-tip { display: none !important; }
}
.plus-btn:hover {
  background: rgba(252, 251, 248, 0.09);
  color: var(--ink);
  border-color: rgba(252, 251, 248, 0.22);
}
.plus-btn.active {
  transform: rotate(45deg);
  background: var(--charcoal);
  color: var(--ink);
  border-color: var(--charcoal);
}

/* Microphone — neutral */
.mic-btn { color: rgba(252, 251, 248, 0.85); }
.mic-btn:hover {
  background: rgba(252, 251, 248, 0.08);
  color: var(--ink);
}
.mic-btn.recording,
.mic-btn.listening {
  color: var(--ink);
  background: rgba(252, 251, 248, 0.1);
  border: 1px solid rgba(252, 251, 248, 0.35);
  animation: pulseSubtle 1.8s infinite ease-in-out;
}
@keyframes pulseSubtle {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(252, 251, 248, 0.25); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(252, 251, 248, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(252, 251, 248, 0); }
}

/* Send button — light circle on dark card */
.send-btn {
  background: var(--ink);
  color: var(--charcoal);
}
.send-btn:hover {
  background: rgba(252, 251, 248, 0.85);
}
.send-btn.stop-mode {
  background: #dc2626;
  color: var(--ink);
}

.voice-bar { background: rgba(252, 251, 248, 0.85); }
.voice-status { color: rgba(252, 251, 248, 0.85); }
.voice-cancel-btn {
  background: rgba(252, 251, 248, 0.06);
  border-color: rgba(252, 251, 248, 0.14);
  color: var(--muted-gray);
}
.voice-cancel-btn:hover {
  background: rgba(252, 251, 248, 0.1);
  color: var(--ink);
}
.voice-done-btn {
  background: var(--ink);
  color: var(--charcoal);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.voice-done-btn:hover {
  background: rgba(252, 251, 248, 0.85);
}

.attached-files-container {
  background: rgba(252, 251, 248, 0.04);
  border-color: var(--light-cream);
}
.attached-file-chip {
  background: rgba(252, 251, 248, 0.08);
  color: var(--ink);
}

#chat-box::-webkit-scrollbar-thumb { background: rgba(252, 251, 248, 0.15); }
.chat-container.is-initial::-webkit-scrollbar { width: 6px; }
.chat-container.is-initial::-webkit-scrollbar-thumb { background: rgba(252, 251, 248, 0.15); border-radius: 4px; }

.typing-bubble {
  background: var(--off-white);
  border-color: var(--light-cream);
}
.typing-dot { background: var(--ink); }

/* ══════════════════════════════
   ADD-TO-CHAT MODAL — warm ivory frosted glass
   ══════════════════════════════ */
.plus-modal-overlay {
  background: rgba(12, 10, 22, 0.28);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.plus-modal-panel {
  background: linear-gradient(180deg, rgba(252, 248, 240, 0.8), rgba(244, 238, 226, 0.7));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(130, 118, 96, 0.22);
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(25, 18, 50, 0.16), 0 2px 8px rgba(25, 18, 50, 0.07);
}
.plus-modal-header {
  border-bottom: 1px solid rgba(120, 110, 90, 0.16);
}
.plus-modal-title {
  color: #2b2926;
}
.plus-modal-title svg { color: #2b2926; }
.plus-modal-close {
  color: #6b675f;
}
.plus-modal-close:hover {
  background: rgba(60, 55, 45, 0.08);
  color: #2b2926;
}

.plus-modal-section-label {
  color: rgba(43, 41, 38, 0.62);
}
.plus-modal-divider {
  background: rgba(120, 110, 90, 0.16);
}

.plus-modal-item {
  background: rgba(255, 255, 255, 0.45);
  border-color: rgba(130, 118, 96, 0.18);
  color: #2b2926;
}
.plus-modal-item:hover {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(130, 118, 96, 0.28);
}
.plus-modal-item-icon {
  background: rgba(255, 255, 255, 0.55);
  color: #3a372f;
}
.plus-modal-item-icon.icon-blue,
.plus-modal-item-icon.icon-violet,
.plus-modal-item-icon.icon-amber {
  background: rgba(255, 255, 255, 0.55);
  color: #3a372f;
}
.plus-modal-item-title { color: #2b2926; }
.plus-modal-item-sub { color: rgba(43, 41, 38, 0.6); }

.plus-modal-panel .param-chip {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(130, 118, 96, 0.2);
  color: rgba(43, 41, 38, 0.7);
}
.plus-modal-panel .param-chip:hover {
  background: rgba(255, 255, 255, 0.55);
  color: #2b2926;
  border-color: rgba(130, 118, 96, 0.3);
}
.plus-modal-panel .param-chip.active {
  background: #fdfaf3;
  border-color: rgba(130, 118, 96, 0.3);
  color: #2b2926;
  box-shadow: 0 1px 6px rgba(60, 50, 35, 0.12);
}

.plus-modal-custom-size {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(130, 118, 96, 0.2);
}
.plus-modal-custom-size .option-label { color: rgba(43, 41, 38, 0.62); }
.plus-modal-custom-size .size-input-wrapper {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(130, 118, 96, 0.24);
}
.plus-modal-custom-size .size-input-wrapper:focus-within {
  border-color: rgba(90, 80, 60, 0.45);
  box-shadow: 0 0 0 3px rgba(90, 80, 60, 0.08);
}
.plus-modal-custom-size .size-input-label { color: rgba(43, 41, 38, 0.62); }
.plus-modal-custom-size .size-input { color: #2b2926; }
.plus-modal-custom-size .size-unit { color: rgba(43, 41, 38, 0.62); }
.plus-modal-custom-size .size-x-sep { color: rgba(43, 41, 38, 0.62); }

.plus-modal-body::-webkit-scrollbar-thumb { background: rgba(90, 80, 60, 0.25); }

/* ══════════════════════════════
   SIDEBAR FOOTER — credits, upgrade, profile, settings
   ══════════════════════════════ */
.sidebar-footer {
  margin-top: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lumiq-credits-bar {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px 8px 10px;
  border-top: 1px solid rgba(252, 251, 248, 0.05);
  box-sizing: border-box;
}

.lumiq-credits-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.lumiq-credits-actions .lumiq-credits-chip {
  flex: 1;
  min-width: 0;
  justify-content: space-between;
}
.lumiq-credits-actions .lumiq-upgrade-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
}

.sidebar-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 2px;
}

.sidebar-settings-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(252, 251, 248, 0.22);
  background: rgba(252, 251, 248, 0.07);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 2px 12px rgba(12, 8, 32, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--ink);
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.sidebar-settings-btn:hover {
  background: rgba(252, 251, 248, 0.14);
  border-color: rgba(252, 251, 248, 0.35);
  box-shadow: 0 3px 16px rgba(12, 8, 32, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.sidebar-settings-btn svg {
  width: 16px;
  height: 16px;
}

/* Collapsed sidebar: only the profile/avatar remains */
.sidebar.collapsed .lumiq-credits-actions {
  display: none;
}
.sidebar.collapsed .sidebar-settings-btn {
  display: none;
}
.sidebar.collapsed .sidebar-account-row {
  justify-content: center;
}
.sidebar.collapsed .lumiq-credits-bar {
  border-top: none;
  padding-top: 4px;
}

.lumiq-credits-chip {
  background: var(--off-white);
  border-color: var(--light-cream);
  color: var(--ink);
}
.lumiq-credits-chip:hover {
  border-color: rgba(252, 251, 248, 0.35);
}
.lumiq-credits-chip.low {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(127, 29, 29, 0.25);
}
.lumiq-credits-label { color: var(--muted-gray); }
.lumiq-credits-value { color: var(--ink); }
.lumiq-credits-cost { color: var(--muted-gray); }

.lumiq-upgrade-btn {
  background: var(--ink);
  color: var(--charcoal);
  border-radius: 9999px;
}
.lumiq-upgrade-btn:hover {
  background: rgba(252, 251, 248, 0.85);
}

.lumiq-account-btn {
  border-color: rgba(252, 251, 248, 0.2);
  background: var(--off-white);
}
.lumiq-avatar-fallback {
  color: var(--ink);
  background: rgba(252, 251, 248, 0.12);
}

.lumiq-plan-cta {
  background: var(--ink);
  color: var(--charcoal);
}
.lumiq-plan-cta:hover { opacity: 0.9; }
.lumiq-plan-perks li::before { color: rgba(252, 251, 248, 0.75); }

/* ══════════════════════════════
   MISC SURFACES (dropdowns, toasts, modals)
   ══════════════════════════════ */
.dropdown-soon-tag {
  background: rgba(252, 251, 248, 0.08);
  color: var(--muted-gray);
}

.settings-close-btn:hover {
  background: rgba(252, 251, 248, 0.08);
  color: var(--ink);
}
.lumiq-google-btn {
  background: linear-gradient(180deg, rgba(252, 251, 248, 0.1), rgba(252, 251, 248, 0.04));
  border-color: rgba(252, 251, 248, 0.14);
  color: var(--ink);
}
.lumiq-google-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(252, 251, 248, 0.16), rgba(252, 251, 248, 0.07));
  border-color: rgba(252, 251, 248, 0.24);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
}
.lumiq-google-btn:active:not(:disabled) {
  transform: scale(0.985);
}
.lumiq-google-btn:focus-visible {
  outline-color: var(--ring-blue);
}
.lumiq-google-spinner {
  border-color: rgba(252, 251, 248, 0.25);
  border-top-color: rgba(252, 251, 248, 0.9);
}
.lumiq-auth-warn {
  color: #fdba74;
  background: rgba(180, 83, 9, 0.15);
  border-color: rgba(217, 119, 6, 0.35);
}

/* Sidebar-resident credits (mobile drawer) */
.sidebar .lumiq-credits-chip {
  background: rgba(252, 251, 248, 0.06);
  border-color: rgba(252, 251, 248, 0.12);
  color: var(--ink);
}
.sidebar .lumiq-credits-label { color: rgba(252, 251, 248, 0.5); }
.sidebar .lumiq-credits-value { color: var(--ink); }
.sidebar .lumiq-upgrade-btn {
  background: var(--ink);
  color: var(--charcoal);
}
.sidebar .lumiq-upgrade-btn:hover {
  background: rgba(252, 251, 248, 0.85);
}
.sidebar .lumiq-account-btn {
  border-color: rgba(252, 251, 248, 0.2);
}

/* ── Message bubbles — minimal, light on the aurora ──
   No heavy solid containers: a whisper of fill + a thin
   accent border keeps user/AI distinguishable via
   alignment (user right, bot left) and a subtle color
   edge (rose for user, blue for AI). */
.message.user {
  background: rgba(252, 251, 248, 0.04);
  border: 1px solid rgba(236, 72, 153, 0.22);
  box-shadow: none;
  color: var(--ink);
}
.message.bot {
  background: rgba(252, 251, 248, 0.03);
  border: 1px solid rgba(96, 165, 250, 0.18);
  box-shadow: none;
  color: var(--ink);
}

/* ── Message action toolbar (glass, dark) ── */
.message-actions {
  background: rgba(24, 22, 34, 0.55);
  border: 1px solid rgba(252, 251, 248, 0.16);
  box-shadow: 0 4px 20px rgba(8, 6, 20, 0.4);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
}
.message-action-btn {
  color: rgba(252, 251, 248, 0.78);
}
.message-action-btn:hover {
  background: rgba(252, 251, 248, 0.12);
  color: #fefdfa;
}

/* ── Starter prompt peek panel (glass, dark) ── */
.prompt-peek-fade {
  background: linear-gradient(to bottom, rgba(8, 10, 16, 0) 0%, rgba(8, 10, 16, 0.45) 100%);
}
.prompt-peek-title,
.prompt-card-title {
  color: var(--ink);
}
.prompt-card-desc {
  color: rgba(252, 251, 248, 0.55);
}
.prompt-peek-hint {
  color: rgba(252, 251, 248, 0.6);
}
.prompt-card-copy:hover {
  background: rgba(252, 251, 248, 0.16);
  color: var(--ink);
}

/* ── Mobile refinements ── */
@media (max-width: 768px) {
  .chat-container.has-messages .chat-input-wrapper {
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3) !important;
    border-top-color: rgba(252, 251, 248, 0.08) !important;
    background: rgba(10, 10, 13, 0.14) !important;
  }
  .input-card {
    border-radius: 20px !important;
  }
  .plus-modal-panel {
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
  }
}