/* studio-home.css — Personal Studio lobby styles */

/* ---- BASE ---- */
:root {
  --accent: #c847f4;
  --accent2: #4ecaff;
  --gradient: linear-gradient(135deg, #c847f4, #4ecaff);
  --gradient-warm: linear-gradient(135deg, #a855f7, #c847f4);
  --fg: #f0f0f0;
  --fg-muted: #8888a0;
  --bg: #0a0a0f;
  --bg2: #111118;
  --card-bg: #13131c;
  --card-border: #1e1e2e;
  --font-display: 'Syne', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Space Grotesk', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  /* On iOS Safari, leave room for the bottom browser bar. */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---- LAYOUT WRAPPER ---- */
.home-layout {
  display: flex;
  min-height: 100vh;
}

/* ---- MAIN CONTENT ---- */
.home-main {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 100px; /* space for crew bar on mobile */
}

/* ---- NAV ---- */
.home-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--card-border);
  gap: 16px;
  flex-wrap: wrap;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}
.nav-links { display: flex; gap: 18px; align-items: center; }
.nav-link { font-size: 0.8rem; font-weight: 500; color: var(--fg-muted); text-decoration: none; transition: color 0.2s; }
.nav-link:hover { color: var(--fg); }
.nav-link.active { color: var(--accent); }
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; padding: 6px; color: var(--fg-muted); font-size: 1.4rem; line-height: 1; }

/* ---- LOBBY CONTENT ---- */
.lobby-wrap {
  max-width: 680px;
  margin: 0 auto;
  /* Use iPhone notch value when present so the greeting isn't clipped. */
  padding: max(20px, env(safe-area-inset-top, 0px)) 32px 32px;
}

/* ---- NOVA GREETING ---- */
.nova-greeting {
  margin-bottom: 40px;
}

/* Nova entrance inline chat thread — uses the shared chat.css tokens
   (.pb-msg, .pb-typing, .pb-msg-bubble) so it visually matches the
   Coach Rooms. Container is just a vertical stack with breathing
   room between Nova's bubbles and the artist input. */
.receptionist-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding: 4px 0 8px;
}
.receptionist-thread .pb-msg { max-width: 92%; }
.pb-msg-ack-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 0 2px;
}
.pb-msg-ack-actions .nova-ack-cta {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #a78bfa;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.08);
  transition: background 0.15s, border-color 0.15s;
}
.pb-msg-ack-actions .nova-ack-cta:hover {
  background: rgba(167, 139, 250, 0.16);
  border-color: rgba(167, 139, 250, 0.6);
}
.pb-msg-ack-actions .nova-ack-dismiss {
  background: none;
  border: none;
  color: #8888a0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 8px;
}
.pb-msg-ack-actions .nova-ack-dismiss:hover { color: #f0f0f0; }
@media (max-width: 480px) {
  .receptionist-thread .pb-msg { max-width: 96%; }
}
.nova-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: 100px;
  padding: 6px 14px 6px 10px;
  margin-bottom: 16px;
}
.nova-badge-mark {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  animation: novaPulse 3s ease-in-out infinite;
}
@keyframes novaPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.9); }
}
.nova-badge-text {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(167,139,250,0.9);
  text-transform: uppercase;
}
.nova-heading {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.2;
  color: var(--fg);
  margin-bottom: 8px;
}
.nova-heading .accent { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.nova-sub {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ---- RECENT PROJECTS ---- */
.recent-section { margin-bottom: 36px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.see-all-link {
  font-size: 0.78rem;
  color: var(--accent2);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.see-all-link:hover { color: var(--fg); }

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.project-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.15s;
  cursor: pointer;
}
.project-row:hover {
  border-color: rgba(200,71,244,0.4);
  transform: translateX(3px);
}
.project-row:active { transform: translateX(2px); }
.project-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}
.project-icon.hiphop { background: rgba(168,85,247,0.15); color: #a855f7; }
.project-icon.pop { background: rgba(236,72,153,0.15); color: #ec4899; }
.project-icon.rnb { background: rgba(96,165,250,0.15); color: #60a5fa; }
.project-icon.electronic { background: rgba(52,211,153,0.15); color: #34d399; }
.project-icon.lofi { background: rgba(251,191,36,0.15); color: #fbbf24; }
.project-icon.rock { background: rgba(239,68,68,0.15); color: #ef4444; }
.project-icon.default { background: rgba(200,71,244,0.15); color: #c847f4; }

.project-info { flex: 1; min-width: 0; }
.project-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-meta {
  font-size: 0.72rem;
  color: var(--fg-muted);
  margin-top: 2px;
}
.project-resume-btn {
  background: rgba(200,71,244,0.08);
  border: 1px solid rgba(200,71,244,0.2);
  border-radius: 8px;
  padding: 7px 14px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  white-space: nowrap;
  transition: background 0.2s;
  text-decoration: none;
  display: inline-block;
}
.project-resume-btn:hover { background: rgba(200,71,244,0.15); }
.project-share-btn { background: none; border: 1px solid rgba(200,71,244,0.2); border-radius: 8px; padding: 7px 12px; color: var(--accent); font-size: 0.75rem; font-weight: 600; cursor: pointer; font-family: 'Space Grotesk', sans-serif; white-space: nowrap; transition: background 0.2s, border-color 0.2s; }
.project-share-btn:hover { background: rgba(200,71,244,0.12); border-color: rgba(200,71,244,0.4); }
.project-share-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.project-share-btn.copied { border-color: #22c55e; color: #22c55e; background: rgba(34,197,94,0.08); }

.no-projects {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
}
.no-projects p { font-size: 0.88rem; color: var(--fg-muted); margin-bottom: 14px; line-height: 1.6; }
.no-projects a { display: inline-flex; align-items: center; gap: 6px; color: var(--accent2); font-size: 0.85rem; font-weight: 600; text-decoration: none; }

/* ---- MOOD ENTRY ---- */
.mood-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 32px;
}
.mood-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 4px;
}
.mood-card-sub {
  font-size: 0.82rem;
  color: var(--fg-muted);
  margin-bottom: 20px;
}
.mood-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.mood-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 100px;
  border: 1.5px solid var(--card-border);
  background: rgba(255,255,255,0.02);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg);
  cursor: pointer;
  transition: all 0.2s;
}
.mood-chip:hover { border-color: var(--chip-color, var(--accent)); background: rgba(200,71,244,0.06); transform: translateY(-2px); }
.mood-chip[data-mood="inspired"] { --chip-color: #ef4444; }
.mood-chip[data-mood="overwhelmed"] { --chip-color: #a855f7; }
.mood-chip[data-mood="focused"] { --chip-color: #4ecaff; }
.mood-chip[data-mood="playful"] { --chip-color: #fbbf24; }
.mood-chip[data-mood="heavy"] { --chip-color: #94a3b8; }

/* return prompt */
.return-prompt {
  font-size: 0.82rem;
  color: var(--fg-muted);
  margin-top: 16px;
}
.return-prompt strong { color: var(--fg); }

/* ---- DIVIDER ---- */
.lobby-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 28px;
}
.lobby-divider-line { flex: 1; height: 1px; background: var(--card-border); }
.lobby-divider-label { font-size: 0.68rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--fg-muted); white-space: nowrap; }

/* ---- QUICK ACTIONS ---- */
.quick-actions { display: flex; flex-direction: column; gap: 10px; }
.quick-action-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.15s;
  cursor: pointer;
}
.quick-action-row:hover { border-color: rgba(200,71,244,0.35); transform: translateX(3px); }
.qa-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
}
.qa-info { flex: 1; min-width: 0; }
.qa-name { font-size: 0.88rem; font-weight: 600; color: var(--fg); }
.qa-desc { font-size: 0.72rem; color: var(--fg-muted); margin-top: 2px; }
.qa-arrow { font-size: 0.85rem; color: var(--fg-muted); flex-shrink: 0; }

/* ---- CREW BAR ---- */
/* Desktop: sidebar right */
.crew-sidebar {
  width: 220px;
  flex-shrink: 0;
  padding: 24px 16px;
  border-left: 1px solid var(--card-border);
  overflow-y: auto;
}
.crew-sidebar-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 16px;
  padding-left: 4px;
}
.crew-list { display: flex; flex-direction: column; gap: 8px; }
.crew-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px 14px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.crew-card:hover { border-color: rgba(200,71,244,0.4); transform: translateY(-1px); }
.crew-card-header { display: flex; align-items: center; gap: 10px; }
.crew-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #a78bfa, #c4b5fd);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
}
.crew-avatar .crew-avatar-svg, .crew-avatar .crew-avatar-img { width: 100%; height: 100%; display: block; }
.crew-avatar .crew-avatar-img { object-fit: cover; object-position: center 30%; border-radius: 50%; }

/* Global SVG avatar styling — readable on every dark canvas used in the
   app (`#0a0a0f`, `#13131c`, etc). */
.crew-avatar-svg { display: block; }

/* No-flicker containment for crew avatar containers. Each box holds an
   inline SVG with hard-coded viewBox 0 0 80 80; without `contain`, the
   parent can re-layout after the SVG child resolves and the avatar pops
   to its final size. Locking `contain` pins the box at first paint so
   the entrance surfaces render identically from greeting to chat reveal. */
.nova-avatar-lg, .cover-art-avatar, .crew-sheet-avatar, .kai-avatar { contain: layout size style; }

/* Suppress the right-side crew sidebar on the entrance gate so only the
   greeting is visible. Mobile already hides it; this is the gate-screen
   overlay rule. */
@media (min-width: 769px) {
  .crew-sidebar.is-stage-a-hidden { display: none; }
  .crew-sidebar.is-stage-b-hidden { display: none; }
}
.crew-name { font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; color: var(--fg); }
.crew-role { font-size: 0.68rem; font-weight: 700; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-left: 4px; }
.crew-desc { font-size: 0.7rem; color: var(--fg-muted); line-height: 1.4; }

/* Mobile crew bar: bottom nav */
.crew-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  padding: 8px 12px;
  z-index: 40;
  overflow-x: auto;
  gap: 8px;
}
.crew-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
  font-family: 'Space Grotesk', sans-serif;
  text-decoration: none;
  color: inherit;
}
.crew-chip:hover { border-color: rgba(200,71,244,0.4); background: rgba(200,71,244,0.06); }
.crew-chip-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 800;
  color: #fff;
}
.crew-chip-info { display: flex; flex-direction: column; gap: 0; }
.crew-chip-name { font-size: 0.7rem; font-weight: 700; color: var(--fg); }
.crew-chip-role { font-size: 0.6rem; color: var(--fg-muted); }

/* ---- CREW INTRO SHEET (modal) ---- */
.crew-sheet-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 60;
  align-items: flex-end;
  justify-content: center;
}
.crew-sheet-overlay.open { display: flex; animation: fadeIn 0.2s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.crew-sheet {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px 24px 0 0;
  padding: 32px 28px 40px;
  width: min(480px, 100vw);
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: slideUp 0.25s ease-out;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.crew-sheet-header { display: flex; align-items: center; gap: 16px; }
.crew-sheet-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #a78bfa, #c4b5fd);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
}
.crew-sheet-avatar .crew-avatar-svg, .crew-sheet-avatar .crew-avatar-img { width: 100%; height: 100%; display: block; }
.crew-sheet-avatar .crew-avatar-img { object-fit: cover; object-position: center 30%; border-radius: 50%; }
.crew-sheet-meta { flex: 1; }
.crew-sheet-name { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; color: var(--fg); letter-spacing: -0.02em; }
.crew-sheet-role { font-size: 0.75rem; color: var(--fg-muted); font-weight: 500; margin-top: 2px; }
.crew-sheet-tagline { font-size: 0.85rem; color: var(--fg-muted); line-height: 1.6; }
.crew-sheet-desc { font-size: 0.92rem; color: var(--fg); line-height: 1.7; font-style: italic; }
.crew-sheet-cta {
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: block;
  transition: opacity 0.2s;
}
.crew-sheet-cta:hover { opacity: 0.9; }
.crew-sheet-close {
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 18px;
  color: var(--fg-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.crew-sheet-close:hover { border-color: var(--accent); color: var(--fg); }

/* ---- ONBOARDING OVERLAY ---- */
.onboarding-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 80;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.onboarding-overlay.open { display: flex; }

.onboarding-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 36px 32px;
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: fadeIn 0.2s ease-out;
}
.onboarding-step-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: -12px;
}
.onboarding-heading {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  font-weight: 800;
  color: var(--fg);
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.onboarding-sub {
  font-size: 0.88rem;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-top: -12px;
}
.option-list { display: flex; flex-direction: column; gap: 10px; }
.option-btn {
  background: var(--bg);
  border: 1.5px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}
.option-btn:hover { border-color: var(--accent); background: rgba(200,71,244,0.06); }
.option-btn.selected { border-color: var(--accent); background: rgba(200,71,244,0.1); }
.option-btn .opt-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.6rem;
  color: transparent;
  transition: all 0.2s;
}
.option-btn.selected .opt-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.onboarding-textarea {
  background: var(--bg);
  border: 1.5px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--fg);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  width: 100%;
  outline: none;
  resize: none;
  min-height: 100px;
  transition: border-color 0.2s;
}
.onboarding-textarea:focus { border-color: var(--accent); }
.onboarding-textarea::placeholder { color: var(--fg-muted); opacity: 0.6; }

.onboarding-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 4px; }
.btn-back-onboard {
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 20px;
  color: var(--fg-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-back-onboard:hover { border-color: var(--accent); color: var(--fg); }
.btn-next-onboard {
  background: var(--gradient);
  border: none;
  border-radius: 10px;
  padding: 10px 24px;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-next-onboard:hover { opacity: 0.85; }
.btn-next-onboard:disabled { opacity: 0.4; cursor: not-allowed; }

.onboarding-progress {
  display: flex;
  gap: 6px;
  margin-bottom: -8px;
}
.onboarding-dot {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: var(--card-border);
  transition: background 0.3s;
}
.onboarding-dot.active { background: var(--accent); }

/* ---- CREW GRID (desktop/mobile unified) ---- */
.crew-grid-section { margin-bottom: 32px; }
.crew-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.crew-grid-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 16px 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.15s;
  cursor: pointer;
}
.crew-grid-card:hover { border-color: rgba(200,71,244,0.35); transform: translateY(-2px); }
.cg-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #a78bfa, #c4b5fd);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
}
.cg-avatar .crew-avatar-svg, .cg-avatar .crew-avatar-img { width: 100%; height: 100%; display: block; }
.cg-avatar .crew-avatar-img { object-fit: cover; object-position: center 30%; border-radius: 50%; }
.cg-body { flex: 1; min-width: 0; }
.cg-role {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}
.cg-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 3px;
}
.cg-desc { font-size: 0.72rem; color: var(--fg-muted); line-height: 1.4; }

/* ---- WORKSPACES GRID ---- */
.workspaces-grid-section { margin-bottom: 16px; }
.workspaces-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.ws-grid-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.15s;
}
.ws-grid-card:hover { border-color: rgba(200,71,244,0.35); transform: translateY(-1px); }
.ws-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ws-body { flex: 1; min-width: 0; }
.ws-name { font-size: 0.85rem; font-weight: 600; color: var(--fg); }
.ws-desc { font-size: 0.68rem; color: var(--fg-muted); margin-top: 2px; line-height: 1.4; }

/* ---- PERSISTENT MOBILE BOTTOM NAV (4-tab) ---- */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mobile-bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 52px;
  max-width: 480px;
  margin: 0 auto;
}
.mbn-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 16px;
  text-decoration: none;
  color: var(--fg-muted);
  transition: color 0.2s;
  cursor: pointer;
  min-width: 60px;
}
.mbn-tab:hover { color: var(--fg); }
.mbn-tab.active { color: var(--accent); }
.mbn-tab-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mbn-tab-label { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.04em; }
.mbn-tab.active .mbn-tab-icon svg { stroke: var(--accent); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .crew-sidebar { display: none; }
  .crew-sidebar.is-stage-a-hidden { display: none; }
  .crew-bottom-bar { display: none; }
  .mobile-bottom-nav { display: block; }
  .lobby-wrap { padding: max(16px, env(safe-area-inset-top, 0px)) 20px 100px; }
  .home-nav { padding: 18px 20px; }
  .nav-links { display: none; flex-direction: column; align-items: flex-start; width: 100%; gap: 12px; padding: 14px 0 6px; border-top: 1px solid var(--card-border); }
  .nav-links.mobile-open { display: flex; }
  .nav-hamburger { display: block; }
  .onboarding-card { padding: 28px 20px; }
  .crew-grid { grid-template-columns: repeat(3, 1fr); }
  .workspaces-grid { grid-template-columns: repeat(2, 1fr); }
  /* Keep the greeting legible on narrow screens — prevents cropped headings. */
  .nova-avatar-lg { width: 56px; height: 56px; }
  .nova-name { font-size: clamp(1.0rem, 4vw, 1.1rem); }
  .nova-bubble { padding: 16px 18px; border-radius: 16px; }
}

@media (max-width: 480px) {
  .lobby-wrap { padding: max(12px, env(safe-area-inset-top, 0px)) 16px 96px; }
  .mood-grid { gap: 8px; }
  .mood-chip { padding: 9px 14px; font-size: 0.78rem; }
  .onboarding-card { padding: 24px 16px; border-radius: 20px; }
  /* Two-column team grid so "All Creative Rooms" sits in one viewport fold. */
  .crew-grid { grid-template-columns: repeat(2, 1fr); }
  .workspaces-grid { grid-template-columns: 1fr 1fr; }
  .nova-avatar-lg { width: 52px; height: 52px; }
  /* Per spec: shrink headline + raise description contrast for WCAG AA
     on mobile (background is #0a0a0f; fg-muted #8888a0 fails the
     contrast check, fg #f0f0f0 passes comfortably). */
  .nova-heading { font-size: 1.45rem; line-height: 1.18; }
  .nova-sub { color: var(--fg); }
}

@media (max-width: 414px) {
  .ws-desc { display: none; }
  .ws-grid-card { padding: 12px 10px; }
  .ws-icon { width: 32px; height: 32px; }
  .nova-avatar-lg { width: 48px; height: 48px; }
  .nova-bubble { padding: 14px 16px; font-size: 0.9rem; }
}

/* ---- NOVA GREETER BUBBLE (lobby top-of-page) ---- */
.nova-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 14px;
  box-shadow: 0 6px 24px rgba(167,139,250,0.4), inset 0 0 0 1px rgba(255,255,255,0.12);
  background: linear-gradient(135deg, #a78bfa, #c4b5fd);
  overflow: hidden;
}
.nova-avatar-lg .crew-avatar-svg, .nova-avatar-lg .crew-avatar-img { width: 100%; height: 100%; display: block; }
.nova-avatar-lg .crew-avatar-img { object-fit: cover; object-position: center 30%; border-radius: 50%; }

.nova-meta { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.nova-name { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: var(--fg); }
.nova-role { font-size: 0.7rem; font-weight: 700; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.1em; }

.nova-bubble {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 18px 22px;
  color: var(--fg);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 14px;
  max-width: 100%;
}
.nova-bubble-listening { opacity: 0.65; transition: opacity 0.2s; }
.nova-bubble-tail {
  position: absolute;
  top: -8px;
  left: 28px;
  width: 14px;
  height: 14px;
  background: var(--card-bg);
  border-left: 1px solid var(--card-border);
  border-top: 1px solid var(--card-border);
  transform: rotate(45deg);
  border-top-left-radius: 4px;
}
.nova-bubble-text { font-family: 'Space Grotesk', sans-serif; opacity: 1; transition: opacity 300ms ease-in; }
.nova-bubble-text[style*="display: none"] { opacity: 0; }
.nova-bubble-text.is-typing-done { opacity: 1; }

/* Typing dots — three little dots animating while Nova "thinks". */
.nova-typing-dots {
  display: none;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}
.nova-typing-dots .nova-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.2;
  animation: novaDot 1s ease-in-out infinite;
}
.nova-typing-dots .nova-dot:nth-child(1) { animation-delay: 0s; }
.nova-typing-dots .nova-dot:nth-child(2) { animation-delay: 0.15s; }
.nova-typing-dots .nova-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes novaDot {
  0%, 60%, 100% { opacity: 0.2; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

.nova-bubble-ack { border-color: rgba(167,139,250,0.35); }
.nova-ack-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.nova-ack-cta {
  background: linear-gradient(135deg,#a78bfa,#c4b5fd);
  border: none;
  border-radius: 12px;
  color: #fff;
  padding: 12px 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  transition: opacity 0.2s;
}
.nova-ack-cta:hover { opacity: 0.9; }
.nova-ack-dismiss {
  background: transparent;
  border: none;
  color: var(--fg-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 12px 8px;
  cursor: pointer;
  min-height: 44px;
}
.nova-ack-dismiss:hover { color: var(--fg); }

.nova-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.nova-quick-replies .nova-qr-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 100px;
  border: 1.5px solid var(--card-border);
  background: rgba(255,255,255,0.02);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg);
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
}
.nova-quick-replies .nova-qr-chip:hover {
  border-color: rgba(167,139,250,0.5);
  background: rgba(167,139,250,0.06);
  transform: translateY(-1px);
}

.nova-enter-full {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(167,139,250,0.35);
  background: rgba(167,139,250,0.08);
  color: #c4b5fd;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  min-height: 44px;
}
.nova-enter-full:hover {
  background: rgba(167,139,250,0.16);
  border-color: rgba(167,139,250,0.6);
}
button.nova-enter-full {
  font: inherit;
  background: rgba(167,139,250,0.08);
}
.nova-text-input {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--card-border);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--fg);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  resize: none;
  min-height: 60px;
  outline: none;
  transition: border-color 0.2s;
}
.nova-text-input:focus { border-color: var(--accent); }
.nova-text-input::placeholder { color: var(--fg-muted); opacity: 0.6; }

/* ---- CONTINUE SESSION card ---- */
.continue-session {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--card-bg);
  text-decoration: none;
  color: inherit;
  margin-bottom: 18px;
  min-height: 64px;
  position: relative;
  border: 1.5px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 0 0 1.5px rgba(200,71,244,0.35), 0 0 28px rgba(200,71,244,0.15);
  transition: transform 0.15s, box-shadow 0.2s;
}
.continue-session:hover {
  transform: translateX(3px);
  box-shadow: 0 0 0 1.5px rgba(200,71,244,0.6), 0 0 32px rgba(200,71,244,0.25);
}
.cs-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg,#c847f4,#4ecaff);
  color: #fff;
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 0.95rem;
  flex-shrink: 0;
}
.cs-info { flex: 1; min-width: 0; }
.cs-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2px;
}
.cs-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-meta { font-size: 0.7rem; color: var(--fg-muted); margin-top: 2px; }
.cs-btn {
  background: linear-gradient(135deg,#c847f4,#4ecaff);
  border: none;
  border-radius: 10px;
  color: #fff;
  padding: 10px 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---- CURRENT PROJECT row ---- */
.current-project-row { margin-bottom: 18px; }

/* ---- QUICK CREATE -- 4 chips row ---- */
.quick-create-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 6px 0 28px;
  width: 100%;
}
.qc-chip {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 12px 6px;
  text-decoration: none;
  color: inherit;
  min-height: 64px;
  transition: border-color 0.2s, transform 0.15s;
}
.qc-chip:hover { border-color: rgba(200,71,244,0.4); transform: translateY(-2px); }
.qc-icon {
  width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 0.8rem;
  flex-shrink: 0;
}
.qc-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fg);
  text-align: center;
  white-space: nowrap;
}

/* ---- VOICE CLONE explanation block ---- */
.voice-clone-explain {
  background: rgba(167,139,250,0.06);
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: -8px;
}

/* ---- INSPIRATION TAG chips ---- */
.inspiration-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -4px;
}
.insp-tag {
  background: transparent;
  border: 1.5px solid var(--card-border);
  border-radius: 100px;
  padding: 8px 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fg-muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  min-height: 44px;
}
.insp-tag:hover { border-color: rgba(200,71,244,0.4); color: var(--fg); }
.insp-tag.selected {
  border-color: var(--accent);
  background: rgba(200,71,244,0.12);
  color: var(--fg);
}

@media (max-width: 414px) {
  .nova-bubble { padding: 16px 18px; border-radius: 16px; }
  .nova-text-input { font-size: 0.88rem; }
  .quick-create-strip { gap: 4px; }
  .qc-chip { padding: 10px 4px; min-height: 48px; }
  .qc-label { font-size: 0.66rem; }
  .qc-icon { width: 26px; height: 26px; font-size: 0.74rem; }
  .continue-session { padding: 14px 14px; }
  .cs-btn { padding: 9px 10px; font-size: 0.74rem; }
}

@media (max-width: 480px) {
  /* Reserve 54px chat fab + 20px right offset + 4px gap on mobile so
     the textarea is never overlapped by the floating chat button. */
  .nova-text-input { padding-right: 78px; }
  .room-card { padding-top: 12px; padding-bottom: 12px; }
  .mood-row .mood-chip { padding: 8px 10px; }
}