/* ============================================================
   AV7-UI Â· Cinematic End-User Interface
   "The Veyra Experience" â€” Deep Space Glassmorphism
   ============================================================ */

/* â”€â”€ 1. FONTS & RESET â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* â”€â”€ 2. DESIGN TOKENS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
:root {
  /* Palette */
  --void:            #02000c;
  --deep:            #06001a;
  --surface:         rgba(255, 255, 255, 0.030);
  --surface-hover:   rgba(255, 255, 255, 0.055);
  --surface-active:  rgba(255, 255, 255, 0.080);

  /* Borders */
  --border:          rgba(139, 92, 246, 0.16);
  --border-bright:   rgba(139, 92, 246, 0.40);
  --border-cyan:     rgba(34, 211, 238, 0.25);

  /* Brand colors */
  --violet:          #a855f7;
  --violet-dim:      #7c3aed;
  --violet-glow:     rgba(168, 85, 247, 0.28);
  --cyan:            #22d3ee;
  --cyan-glow:       rgba(34, 211, 238, 0.25);
  --rose:            #fb7185;
  --rose-glow:       rgba(251, 113, 133, 0.25);
  --emerald:         #34d399;
  --amber:           #fbbf24;

  /* Text */
  --text-1:   #f0eeff;
  --text-2:   rgba(240, 238, 255, 0.65);
  --text-3:   rgba(240, 238, 255, 0.38);
  --text-4:   rgba(240, 238, 255, 0.20);

  /* Shadows */
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.70);
  --shadow-glow-v: 0 0 30px rgba(168, 85, 247, 0.15);

  /* Geometry */
  --radius-xl:   24px;
  --radius-lg:   16px;
  --radius-md:   10px;
  --radius-sm:    6px;
  --radius-pill:100px;

  /* Motion */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* â”€â”€ 3. SCROLLBARS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
::-webkit-scrollbar              { width: 5px; height: 5px; }
::-webkit-scrollbar-track        { background: transparent; }
::-webkit-scrollbar-thumb        { background: rgba(168,85,247,0.35); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover  { background: rgba(168,85,247,0.60); }

/* â”€â”€ 4. GLOBAL BACKGROUND â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
body { background: var(--void); color: var(--text-1); }

/* â”€â”€ 5. AURORA LAYER â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 55% at 15% 35%, rgba(139,92,246,0.18) 0%, transparent 65%),
    radial-gradient(ellipse 70% 45% at 85% 65%,  rgba(34,211,238,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 50% 95%,  rgba(251,113,133,0.08) 0%, transparent 55%);
  animation: auroraShift 16s ease-in-out infinite alternate;
}
@keyframes auroraShift {
  0%   { opacity: 0.6; transform: scale(1.00) translateY( 0%); }
  50%  { opacity: 1.0; transform: scale(1.04) translateY(-1.5%); }
  100% { opacity: 0.7; transform: scale(0.98) translateY( 1.5%); }
}

/* â”€â”€ 6. PARTICLES â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.particles-host { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168,85,247,0.9) 0%, rgba(34,211,238,0.4) 100%);
  animation: particleDrift linear infinite;
}
@keyframes particleDrift {
  0%   { transform: translateY(0px) translateX(0px) scale(1);   opacity: var(--p-opacity, 0.25); }
  33%  { transform: translateY(-35px) translateX(18px) scale(1.15); }
  66%  { transform: translateY(-18px) translateX(-12px) scale(0.90); }
  100% { transform: translateY(0px) translateX(0px) scale(1);   opacity: var(--p-opacity, 0.25); }
}

/* â”€â”€ 7. SCREENS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.screen { position: fixed; inset: 0; z-index: 1; display: flex; flex-direction: column; }
.screen-hidden  { opacity: 0; pointer-events: none; transition: opacity 0.5s var(--ease-smooth); }
.screen-active  { opacity: 1; }
.screen-exit    { opacity: 0; pointer-events: none; transition: opacity 0.4s var(--ease-smooth); }

/* â”€â”€ 8. GLASS PANEL BASE â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.glass-panel {
  background: var(--surface);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--shadow-glow-v);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.glass-panel:hover {
  border-color: var(--border-bright);
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   LOGIN SCREEN
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
#screen-login {
  align-items: center;
  justify-content: center;
}

.login-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 56px 52px;
  width: min(520px, 90vw);
  background: rgba(6, 0, 26, 0.65);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  box-shadow: var(--shadow-lg), 0 0 80px var(--violet-glow), inset 0 0 0 1px rgba(255,255,255,0.06);
  animation: cardFloat 6s ease-in-out infinite alternate;
}
@keyframes cardFloat {
  0%   { transform: translateY(0px); }
  100% { transform: translateY(-6px); }
}

/* Login orb */
.login-card .voice-orb,
.login-card .login-orb {
  width: 100px;
  height: 100px;
  position: relative;
  flex-shrink: 0;
}
.login-orb { width: 110px; height: 110px; position: relative; }
.login-orb .orb-core {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d8b4fe, #9333ea 52%, #4c1d95 100%);
  box-shadow: 0 0 40px rgba(168,85,247,0.55), 0 0 90px rgba(168,85,247,0.20), inset 0 0 30px rgba(0,0,0,0.4);
  animation: orbBreathe 3.5s ease-in-out infinite;
}
.login-orb .orb-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(168,85,247,0.45);
  animation: orbRingExpand 3s ease-out infinite;
}
.login-orb .ring-1 { inset: -16px; animation-delay: 0.0s; }
.login-orb .ring-2 { inset: -32px; animation-delay: 1.0s; }
.login-orb .ring-3 { inset: -48px; animation-delay: 2.0s; }

.login-brand { text-align: center; }
.login-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.12em;
  color: var(--violet); background: rgba(168,85,247,0.12);
  border: 1px solid rgba(168,85,247,0.30); border-radius: var(--radius-pill);
  padding: 3px 12px; margin-bottom: 12px;
}
.login-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.1;
  background: linear-gradient(135deg, #f0eeff 0%, #c4b5fd 50%, #67e8f9 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}
.login-subtitle {
  font-size: 1.05rem; color: var(--text-2); line-height: 1.6;
}

/* Login Form */
.login-form { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.login-input-wrap { position: relative; }
.login-input {
  width: 100%; padding: 16px 20px;
  font-family: inherit; font-size: 1.05rem; color: var(--text-1);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.login-input::placeholder { color: var(--text-3); }
.login-input:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-glow), 0 0 20px var(--violet-glow);
}
.login-input-glow {
  position: absolute; inset: 0; border-radius: var(--radius-lg);
  background: var(--violet-glow); opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.login-input:focus ~ .login-input-glow { opacity: 0.4; }

.glass-textarea {
  width: 100%; padding: 12px 14px;
  font-family: inherit; font-size: 0.95rem; color: var(--text-1);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none; resize: vertical; min-height: 80px; max-height: 250px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.glass-textarea:focus {
  border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-glow);
}
.glass-textarea::placeholder { color: var(--text-3); }

.glass-select {
  width: 100%; padding: 10px 32px 10px 14px;
  font-family: inherit; font-size: 0.95rem; color: var(--text-1);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none; appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23a1a1aa" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.25s;
}
.glass-select:focus { border-color: var(--violet); }
.glass-select option { background: var(--bg-1); color: var(--text-1); }
.orb-strip-select { padding: 6px 32px 6px 12px; font-size: 0.85rem; }
.orb-mic-select { padding: 8px 32px 8px 12px; font-size: 0.9rem; }

.login-btn, .enter-session-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 28px; border: none; border-radius: var(--radius-lg);
  font-family: 'Space Grotesk', sans-serif; font-size: 1rem; font-weight: 600;
  letter-spacing: 0.02em; cursor: pointer;
  background: linear-gradient(135deg, var(--violet-dim), var(--violet));
  color: #fff;
  box-shadow: 0 0 30px var(--violet-glow), 0 4px 12px rgba(0,0,0,0.4);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s, opacity 0.2s;
}
.login-btn:hover, .enter-session-btn:hover  { transform: translateY(-2px) scale(1.01); box-shadow: 0 0 50px var(--violet-glow), 0 6px 20px rgba(0,0,0,0.5); }
.login-btn:active, .enter-session-btn:active { transform: scale(0.98); }
.login-btn-arrow  { font-size: 1.2rem; transition: transform 0.2s; }
.login-btn:hover .login-btn-arrow { transform: translateX(4px); }

.login-footer {
  font-size: 0.72rem; color: var(--text-4);
  letter-spacing: 0.04em; text-align: center;
}

/* Google Sign-In button wrapper */
.google-signin-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

/* Status / error message below Google button */
.login-status-msg {
  font-size: 0.78rem;
  color: var(--rose);
  min-height: 18px;
  text-align: center;
}

/* Google profile avatar shown in the header user-badge */
.user-google-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-bright);
  box-shadow: 0 0 8px var(--violet-glow);
  flex-shrink: 0;
}

/* Sign-out button in header */
.signout-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  font-size: 0.72rem; font-weight: 500;
  color: var(--text-3);
  cursor: pointer; white-space: nowrap;
  font-family: inherit;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.signout-btn:hover {
  background: rgba(251,113,133,0.12);
  border-color: rgba(251,113,133,0.40);
  color: var(--rose);
}
.signout-btn svg { flex-shrink: 0; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   MAIN SCREEN STRUCTURE
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
#screen-main { flex-direction: column; }

/* â”€â”€ HEADER â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.app-header {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 22px;
  background: rgba(2, 0, 12, 0.70);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-shrink: 0;
}

.header-left { display: flex; align-items: center; gap: 12px; }

.av-avatar {
  width: 38px; height: 38px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border-bright);
  box-shadow: 0 0 12px var(--violet-glow);
  flex-shrink: 0;
}
.av-avatar-fallback {
  width: 38px; height: 38px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--violet-dim), var(--cyan));
  border-radius: 10px; border: 1px solid var(--border-bright);
  align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-size: 0.8rem; font-weight: 700;
  color: #fff; letter-spacing: 0.05em;
}
.header-brand  { display: flex; flex-direction: column; line-height: 1.2; }
.header-name   { font-family: 'Space Grotesk', sans-serif; font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; color: var(--text-1); }
.header-version { font-size: 0.68rem; color: var(--text-3); font-family: 'JetBrains Mono', monospace; letter-spacing: 0.08em; }

.header-right { display: flex; align-items: center; gap: 14px; }

/* State badge */
.state-badge {
  font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  color: var(--text-2); transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.state-badge.state-idle     { color: var(--cyan);    border-color: var(--border-cyan);    background: rgba(34,211,238,0.08); }
.state-badge.state-engage   { color: var(--violet);  border-color: rgba(168,85,247,0.35); background: rgba(168,85,247,0.10); }
.state-badge.state-perform  { color: var(--rose);    border-color: rgba(251,113,133,0.35);background: rgba(251,113,133,0.10); }
.state-badge.state-listen   { color: var(--emerald); border-color: rgba(52,211,153,0.35); background: rgba(52,211,153,0.10); }
.state-badge.state-thinking { color: var(--amber);   border-color: rgba(251,191,36,0.35); background: rgba(251,191,36,0.10); }

/* Quiet toggle */
.quiet-toggle-wrap { display: flex; align-items: center; }
.quiet-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--text-2); cursor: pointer; transition: all 0.2s;
}
.quiet-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-1); }
.quiet-btn[aria-pressed="true"] {
  background: rgba(239,68,68,0.15); border-color: var(--rose); color: var(--rose);
}

/* User badge */
.user-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  font-size: 0.82rem; font-weight: 500; color: var(--text-2);
}
.user-initial {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--violet-dim), var(--cyan));
  font-size: 0.72rem; font-weight: 700; color: #fff;
}

/* Connection dot */
.conn-indicator { display: flex; align-items: center; gap: 6px; }
.conn-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239,68,68,0.6);
  transition: background 0.3s, box-shadow 0.3s;
}
.conn-dot.online {
  background: var(--emerald);
  box-shadow: 0 0 8px rgba(52,211,153,0.7);
  animation: connPulse 2.5s ease-in-out infinite;
}
.conn-label { font-size: 0.72rem; color: var(--text-3); font-family: 'JetBrains Mono', monospace; }
@keyframes connPulse {
  0%,100% { box-shadow: 0 0 6px rgba(52,211,153,0.6); }
  50%      { box-shadow: 0 0 14px rgba(52,211,153,0.9); }
}

/* â”€â”€ MAIN LAYOUT â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.main-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0;
  padding: 0;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

/* Each panel fills full area; hidden by default except .mob-active */
.app-panel {
  position: absolute;
  inset: 0;
  bottom: calc(56px + env(safe-area-inset-bottom)); /* tab bar height */
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.app-panel.mob-active { display: flex; }

/* Remove grid layout from panels */
.panel-chat   { gap: 0; }
.panel-chords { }
.panel-studio { }
.panel-video  { }
.panel-songs  { }

/* â”€â”€ Mobile & Desktop bottom tab bar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.mob-tab-bar {
  display: flex;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  height: calc(56px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(4, 0, 18, 0.96);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-top: 1px solid var(--border-bright);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
}
.mob-tab {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  background: none; border: none; cursor: pointer;
  color: var(--text-3);
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem; font-weight: 500;
  letter-spacing: 0.03em;
  position: relative;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.mob-tab svg { transition: transform 0.2s var(--ease-spring); }
.mob-tab:active svg { transform: scale(0.88); }
.mob-tab.mob-tab-active {
  color: var(--violet);
}
.mob-tab.mob-tab-active svg {
  filter: drop-shadow(0 0 6px rgba(168,85,247,0.6));
}
/* Active underline indicator */
.mob-tab.mob-tab-active::before {
  content: '';
  position: absolute;
  top: 0; left: 25%; right: 25%;
  height: 2px;
  background: var(--violet);
  border-radius: 0 0 2px 2px;
  box-shadow: 0 0 8px var(--violet-glow);
}

/* â”€â”€ Orb strip (compact voice indicator at top of chat) â”€â”€â”€ */
.orb-strip {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px; flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.orb-strip .voice-orb  { width: 48px; height: 48px; flex-shrink: 0; }
.orb-strip-text        { flex: 1; min-width: 0; }
.orb-strip .orb-status { font-size: 0.82rem; }
.orb-strip .orb-sub    { font-size: 0.70rem; }
.orb-strip .orb-strip-select { width: 160px; flex-shrink: 0; text-overflow: ellipsis; }



/* Conversation panel */
.conv-panel {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  padding: 18px 18px 14px;
  overflow: hidden;
}

.panel-title-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0; margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.panel-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-2);
}
.panel-actions { display: flex; gap: 6px; }
.icon-action-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  background: transparent; border: 1px solid transparent;
  color: var(--text-3); cursor: pointer; font-size: 0.85rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.icon-action-btn:hover { background: var(--surface-hover); color: var(--text-1); border-color: var(--border); }

/* Chat messages */
.chat-messages {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column;
  gap: 12px; padding-right: 4px;
}

/* Message bubbles */
.message { display: flex; flex-direction: column; max-width: 78%; gap: 4px; animation: msgAppear 0.3s var(--ease-spring); }
@keyframes msgAppear {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.message-veyra { align-self: flex-start; }
.message-user  { align-self: flex-end; align-items: flex-end; }

.bubble {
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 0.93rem; line-height: 1.6;
  word-break: break-word;
  transition: background 0.2s;
}
.message-veyra .bubble {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: var(--text-1);
  border-bottom-left-radius: var(--radius-sm);
}
.message-user .bubble {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-1);
  border-bottom-right-radius: var(--radius-sm);
}
.message.transcription .bubble {
  background: rgba(34,211,238,0.06);
  border-color: rgba(34,211,238,0.18);
  font-style: italic;
  color: var(--text-2);
}
.bubble.system-bubble {
  background: rgba(251,191,36,0.06);
  border-color: rgba(251,191,36,0.20);
  color: var(--amber); font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
}
.bubble.attachment-bubble {
  display: flex; align-items: center; gap: 8px;
  background: rgba(52,211,153,0.07); border-color: rgba(52,211,153,0.22);
  color: var(--emerald); font-size: 0.82rem;
}

/* â”€â”€ Markdown rendered content inside Veyra bubbles â”€â”€â”€â”€â”€â”€â”€â”€ */
.bubble-markdown { line-height: 1.7; }

.bubble-markdown .md-h1,
.bubble-markdown .md-h2,
.bubble-markdown .md-h3,
.bubble-markdown .md-h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; color: var(--text-1);
  margin: 10px 0 4px;
  line-height: 1.25;
}
.bubble-markdown .md-h1 { font-size: 1.15rem; color: var(--violet); }
.bubble-markdown .md-h2 { font-size: 1.05rem; color: var(--cyan); }
.bubble-markdown .md-h3 { font-size: 0.97rem; color: var(--text-1); letter-spacing: 0.01em; }
.bubble-markdown .md-h4 { font-size: 0.90rem; color: var(--text-2); }

.bubble-markdown .md-p {
  margin: 0 0 8px;
  color: var(--text-1);
}
.bubble-markdown .md-p:last-child { margin-bottom: 0; }

.bubble-markdown strong { color: var(--text-1); font-weight: 700; }
.bubble-markdown em     { color: var(--text-2); font-style: italic; }

.bubble-markdown .md-ul,
.bubble-markdown .md-ol {
  margin: 6px 0 8px 18px;
  display: flex; flex-direction: column; gap: 3px;
}
.bubble-markdown .md-li { color: var(--text-1); }
.bubble-markdown .md-ul .md-li { list-style: disc; }
.bubble-markdown .md-ol .md-li { list-style: decimal; }

.bubble-markdown .md-hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 10px 0;
}

.bubble-markdown .md-inline-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82em;
  color: var(--cyan);
  background: rgba(34,211,238,0.08);
  border: 1px solid rgba(34,211,238,0.18);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
}

.bubble-markdown .md-code-block {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.80rem;
  color: var(--cyan);
  background: rgba(0, 0, 0, 0.30);
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin: 8px 0;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.55;
}


.msg-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.68rem; color: var(--text-3); padding: 0 4px;
}
.msg-meta-name { font-weight: 600; }
.msg-time { margin-left: auto; }

/* Typing indicator */
.typing-bubble {
  display: flex; gap: 6px; align-items: center;
  padding: 14px 18px;
}
.typing-bubble span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--violet);
  animation: typingDot 1.2s ease-in-out infinite;
  display: inline-block;
}
.typing-bubble span:nth-child(2) { animation-delay: 0.2s; }
.typing-bubble span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%,60%,100% { transform: translateY(0); opacity: 0.5; }
  30%          { transform: translateY(-6px); opacity: 1; }
}

/* Chord section */
.chord-section {
  flex-shrink: 0;
  max-height: 50vh;
  display: flex; flex-direction: column;
  padding: 14px 16px;
  overflow: hidden;
}
.chord-display {
  flex: 1; overflow-y: auto; overflow-x: auto;
  font-family: 'JetBrains Mono', monospace; font-size: 0.78rem;
  line-height: 1.6; color: var(--cyan); white-space: pre;
  background: rgba(0,0,0,0.2); border-radius: var(--radius-md);
  padding: 10px 14px; border: 1px solid var(--border-cyan);
}

/* Input bar */
.input-bar {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-xl);
}

.input-icon-btn {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: var(--radius-md);
  background: var(--surface-hover); border: 1px solid var(--border);
  color: var(--text-2); cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.input-icon-btn:hover { background: var(--surface-active); border-color: var(--border-bright); color: var(--text-1); }

/* Mic button states */
.mic-btn.mic-active {
  background: rgba(34,211,238,0.15);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 18px rgba(34,211,238,0.3);
  animation: micPulseBtn 1.5s ease-in-out infinite;
}
@keyframes micPulseBtn {
  0%,100% { box-shadow: 0 0 12px rgba(34,211,238,0.25); }
  50%      { box-shadow: 0 0 24px rgba(34,211,238,0.50); }
}

.text-input {
  flex: 1; padding: 12px 16px;
  font-family: 'Outfit', sans-serif; font-size: 0.92rem; color: var(--text-1);
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--radius-md); outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.text-input::placeholder { color: var(--text-3); }
.text-input:focus { border-color: var(--border-bright); box-shadow: 0 0 0 3px var(--violet-glow); }

.send-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px; border: none; border-radius: var(--radius-md);
  font-family: 'Space Grotesk', sans-serif; font-size: 0.88rem; font-weight: 600;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  background: linear-gradient(135deg, var(--violet-dim), var(--violet));
  color: #fff;
  box-shadow: 0 0 20px var(--violet-glow);
  transition: transform 0.15s var(--ease-spring), box-shadow 0.15s, opacity 0.15s;
}
.send-btn:hover  { transform: scale(1.03); box-shadow: 0 0 30px var(--violet-glow); }
.send-btn:active { transform: scale(0.97); }

/* â”€â”€ RIGHT COLUMN â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.right-column {
  display: flex; flex-direction: column;
  gap: 10px; min-height: 0; overflow: hidden;
}

/* ORB PANEL â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.orb-panel {
  flex-shrink: 0;
  display: flex; flex-direction: column;
  align-items: center; gap: 16px;
  padding: 24px 20px 18px;
}

.orb-wrap {
  display: flex; flex-direction: column;
  align-items: center; gap: 14px; width: 100%;
}

/* VOICE ORB â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.voice-orb {
  position: relative;
  width: 150px; height: 150px;
  cursor: default;
}
.orb-core {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 33% 28%, #e9d5ff, #9333ea 52%, #3b0764 100%);
  box-shadow: 0 0 40px rgba(168,85,247,0.50), 0 0 80px rgba(168,85,247,0.22), inset 0 0 30px rgba(0,0,0,0.45);
  transition: background 0.6s, box-shadow 0.6s;
}
.orb-inner-glow {
  position: absolute; inset: 8px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(255,255,255,0.25) 0%, transparent 60%);
  pointer-events: none;
}
.orb-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(168,85,247,0.35);
}
.ring-1 { inset: -18px; }
.ring-2 { inset: -36px; }
.ring-3 { inset: -54px; }

/* Idle: slow breathing */
.orb-idle .orb-core  { animation: orbBreathe 3.5s ease-in-out infinite; }
.orb-idle .orb-ring  { animation: orbRingIdle 4s ease-out infinite; opacity: 0.3; }
.orb-idle .ring-1    { animation-delay: 0s; }
.orb-idle .ring-2    { animation-delay: 1.3s; }
.orb-idle .ring-3    { animation-delay: 2.6s; }

/* Listening: cyan, faster pulse */
.orb-listening .orb-core {
  background: radial-gradient(circle at 33% 28%, #a5f3fc, #0891b2 52%, #0c4a6e 100%);
  box-shadow: 0 0 50px rgba(34,211,238,0.65), 0 0 100px rgba(34,211,238,0.25), inset 0 0 30px rgba(0,0,0,0.45);
  animation: orbListening 1.1s ease-in-out infinite;
}
.orb-listening .orb-ring { border-color: rgba(34,211,238,0.45); animation: orbRingExpand 1.5s ease-out infinite; }
.orb-listening .ring-1   { animation-delay: 0s; }
.orb-listening .ring-2   { animation-delay: 0.5s; }
.orb-listening .ring-3   { animation-delay: 1.0s; }

/* Thinking: amber spin */
.orb-thinking .orb-core {
  background: conic-gradient(from 0deg, #fbbf24, #f472b6, #a855f7, #22d3ee, #fbbf24);
  box-shadow: 0 0 50px rgba(251,191,36,0.45), 0 0 90px rgba(251,191,36,0.15);
  animation: orbSpin 1.8s linear infinite;
}
.orb-thinking .orb-ring  { border-color: rgba(251,191,36,0.40); animation: orbRingExpand 2s ease-out infinite; }

/* Speaking: rose rings */
.orb-speaking .orb-core {
  background: radial-gradient(circle at 33% 28%, #fda4af, #e11d48 52%, #4c0519 100%);
  box-shadow: 0 0 50px rgba(251,113,133,0.60), 0 0 100px rgba(251,113,133,0.22);
  animation: orbSpeaking 0.9s ease-in-out infinite;
}
.orb-speaking .orb-ring  { border-color: rgba(251,113,133,0.45); animation: orbRingExpand 1.1s ease-out infinite; }
.orb-speaking .ring-1    { animation-delay: 0s; }
.orb-speaking .ring-2    { animation-delay: 0.37s; }
.orb-speaking .ring-3    { animation-delay: 0.74s; }

/* Keyframes */
@keyframes orbBreathe {
  0%,100% { transform: scale(1.00); }
  50%      { transform: scale(1.06); }
}
@keyframes orbListening {
  0%,100% { transform: scale(1.00); }
  50%      { transform: scale(1.09); }
}
@keyframes orbSpin    { to { transform: rotate(360deg); } }
@keyframes orbSpeaking {
  0%,100% { transform: scale(1.00); }
  25%      { transform: scale(1.07); }
  75%      { transform: scale(0.96); }
}
@keyframes orbRingExpand {
  0%   { transform: scale(0.88); opacity: 0.55; }
  100% { transform: scale(1.18); opacity: 0.00; }
}
@keyframes orbRingIdle {
  0%   { transform: scale(0.92); opacity: 0.28; }
  100% { transform: scale(1.10); opacity: 0.00; }
}
@keyframes orbBreathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* Labels */
.orb-status {
  font-family: 'Space Grotesk', sans-serif; font-size: 1rem; font-weight: 600;
  color: var(--text-1); letter-spacing: 0.02em; text-align: center;
  transition: color 0.4s;
}
.orb-sub {
  font-size: 0.74rem; color: var(--text-3); text-align: center;
  max-width: 200px; line-height: 1.4;
}
.orb-listening ~ .orb-status,
.voice-orb.orb-listening + .orb-status { color: var(--cyan); }

.mic-controls { width: 100%; }
.glass-select {
  width: 100%; padding: 9px 12px;
  font-family: 'Outfit', sans-serif; font-size: 0.82rem; color: var(--text-2);
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  border-radius: var(--radius-md); outline: none; cursor: pointer;
  transition: border-color 0.2s;
  -webkit-appearance: none; appearance: none;
  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='rgba(240,238,255,0.4)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 32px;
}
.glass-select:focus  { border-color: var(--border-bright); }
.glass-select option { background: #150030; }

/* Enrollment */
.enroll-section { width: 100%; }
.enroll-summary {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.78rem; color: var(--text-3); cursor: pointer;
  padding: 6px 4px;
  list-style: none;
  transition: color 0.2s;
  user-select: none;
}
.enroll-summary:hover { color: var(--text-2); }
.enroll-summary::-webkit-details-marker { display: none; }
.enroll-section[open] .enroll-summary { color: var(--violet); }

.enroll-body {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 10px; padding: 14px;
  background: rgba(255,255,255,0.025); border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.enroll-hint { font-size: 0.75rem; color: var(--text-3); line-height: 1.5; }
.glass-input {
  padding: 9px 12px; font-family: 'Outfit', sans-serif; font-size: 0.85rem;
  color: var(--text-1); background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: var(--radius-md); outline: none;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.glass-input::placeholder { color: var(--text-3); }
.glass-input:focus { border-color: var(--border-bright); box-shadow: 0 0 0 2px var(--violet-glow); }

.enroll-btn {
  padding: 9px 14px; border: 1px solid rgba(168,85,247,0.40);
  border-radius: var(--radius-md); background: rgba(168,85,247,0.12);
  font-family: 'Outfit', sans-serif; font-size: 0.82rem; font-weight: 500;
  color: var(--violet); cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.enroll-btn:hover  { background: rgba(168,85,247,0.22); border-color: var(--violet); transform: scale(1.01); }
.enroll-btn:active { transform: scale(0.98); }

.enroll-status { font-size: 0.75rem; color: var(--text-3); min-height: 16px; font-weight: 500; }
.enroll-status.success { color: var(--emerald); }
.enroll-status.error   { color: var(--rose); }

/* MUSIC STUDIO PANEL â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.studio-panel {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  padding: 18px 18px 16px; overflow: hidden;
}

.studio-icon { font-size: 1rem; }
.studio-state-badge {
  font-family: 'JetBrains Mono', monospace; font-size: 0.62rem;
  letter-spacing: 0.1em; padding: 3px 8px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text-3);
  transition: all 0.3s;
}
.studio-state-badge.generating {
  color: var(--amber); border-color: rgba(251,191,36,0.35); background: rgba(251,191,36,0.08);
  animation: badgePulse 1.5s ease-in-out infinite;
}
.studio-state-badge.done {
  color: var(--emerald); border-color: rgba(52,211,153,0.35); background: rgba(52,211,153,0.08);
}
@keyframes badgePulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

.studio-fields { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; overflow-y: auto; }

.field-group { display: flex; flex-direction: column; gap: 5px; flex-shrink: 0; }
.field-label {
  font-size: 0.74rem; color: var(--text-3); font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.field-hint { text-transform: none; color: var(--text-4); font-weight: 400; }

.glass-textarea {
  padding: 10px 12px; font-family: 'JetBrains Mono', monospace; font-size: 0.80rem;
  color: var(--text-1); background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  outline: none; resize: vertical; line-height: 1.55;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.glass-textarea::placeholder { color: var(--text-4); }
.glass-textarea:focus { border-color: var(--border-bright); box-shadow: 0 0 0 2px var(--violet-glow); }

.studio-row { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.studio-row .glass-input { flex: 1; }

.generate-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 18px; border: none; border-radius: var(--radius-md);
  font-family: 'Space Grotesk', sans-serif; font-size: 0.88rem; font-weight: 700;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  background: linear-gradient(135deg, #7c3aed, #a855f7, #22d3ee);
  background-size: 200% 200%; background-position: 0% 50%;
  color: #fff;
  box-shadow: 0 0 20px var(--violet-glow), 0 4px 12px rgba(0,0,0,0.4);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s, background-position 0.5s;
}
.generate-btn:hover {
  transform: scale(1.03);
  background-position: 100% 50%;
  box-shadow: 0 0 35px var(--violet-glow), 0 0 15px var(--cyan-glow);
}
.generate-btn:active { transform: scale(0.97); }
.generate-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.gen-star { font-size: 0.9rem; }

/* Progress */
.studio-progress {
  display: flex; flex-direction: column; gap: 6px; flex-shrink: 0;
}
.progress-bar-track {
  height: 3px; background: rgba(255,255,255,0.08); border-radius: 10px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  border-radius: 10px;
  animation: progressPulse 1.8s ease-in-out infinite;
}
@keyframes progressPulse {
  0%,100% { opacity: 0.5; background-position: 0% 50%; }
  50%      { opacity: 1.0; background-position: 100% 50%; }
}
#studio-progress-text { font-size: 0.74rem; color: var(--amber); font-family: 'JetBrains Mono', monospace; }

/* Music player */
.music-player-wrap {
  display: flex; flex-direction: column; gap: 8px;
  background: rgba(0,0,0,0.25); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 14px; flex-shrink: 0;
}
.music-track-info { display: flex; align-items: center; gap: 8px; }
.music-note-icon { color: var(--violet); font-size: 0.9rem; }
.music-track-name { font-size: 0.80rem; color: var(--emerald); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-audio-player {
  width: 100%; height: 32px; outline: none; border-radius: var(--radius-sm);
  filter: invert(1) hue-rotate(200deg) saturate(80%) brightness(0.9);
}
.music-download-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.74rem; color: var(--text-3); text-decoration: none;
  padding: 5px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); align-self: flex-start;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.music-download-btn:hover { color: var(--text-1); border-color: var(--border-bright); background: var(--surface-hover); }

/* â”€â”€ TOASTS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 100; display: flex; flex-direction: column;
  gap: 8px; pointer-events: none;
}
.toast {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.84rem; font-weight: 500;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  background: rgba(6, 0, 26, 0.85);
  color: var(--text-1);
  transform: translateX(120%);
  transition: transform 0.35s var(--ease-spring), opacity 0.3s;
  opacity: 0; pointer-events: auto;
  max-width: 320px; box-shadow: var(--shadow-lg);
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast-success { border-color: rgba(52,211,153,0.35); color: var(--emerald); }
.toast-error   { border-color: rgba(251,113,133,0.35); color: var(--rose); }
.toast-info    { border-color: var(--border-bright); color: var(--violet); }
.toast-warning { border-color: rgba(251,191,36,0.35); color: var(--amber); }

/* â”€â”€ UTILITY â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hidden { display: none !important; }

/* Drop zone for file drag */
.drag-over { border-color: var(--cyan) !important; box-shadow: 0 0 30px var(--cyan-glow) !important; }

/* Focus visible for a11y */
*:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }


/* â”€â”€ Songs panel â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.songs-panel {
  flex: 1; display: flex; flex-direction: column;
  padding: 18px 18px 14px; overflow: hidden;
}
.songs-total-label {
  font-family: 'JetBrains Mono', monospace; font-size: 0.62rem;
  letter-spacing: 0.08em; color: var(--text-3);
}
.songs-list {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 8px;
  -webkit-overflow-scrolling: touch;
}
.songs-empty-hint {
  color: var(--text-3); font-size: 0.82rem; text-align: center;
  margin-top: 24px; line-height: 1.6;
}
.song-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-md);
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
}
.song-item:hover { background: var(--surface-hover); border-color: var(--border-bright); }
.song-item-icon { color: var(--violet); font-size: 1rem; flex-shrink: 0; }
.song-item-info { flex: 1; min-width: 0; }
.song-item-name {
  font-size: 0.83rem; font-weight: 600; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.song-item-meta { font-size: 0.72rem; color: var(--text-3); margin-top: 2px; }
.song-item-play {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(168,85,247,0.15); border: 1px solid rgba(168,85,247,0.35);
  color: var(--violet); cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.song-item-play:hover { background: rgba(168,85,247,0.30); transform: scale(1.08); }
.song-item-dl {
  flex-shrink: 0; color: var(--text-3); text-decoration: none;
  display: flex; align-items: center; padding: 4px;
  transition: color 0.2s;
}
.song-item-dl:hover { color: var(--emerald); }
.song-item-rework {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none;
  color: var(--text-3); cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.song-item-rework:hover { color: var(--cyan); background: rgba(34,211,238,0.10); }
.song-item-delete {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none;
  color: var(--text-3); cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.song-item-delete:hover { color: var(--rose); background: rgba(251,113,133,0.12); }


/* Tab notification dot */
.tab-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--rose); display: inline-block;
  position: absolute; top: 6px; right: 6px;
  animation: tabDotPulse 1.5s ease-in-out infinite;
}
.tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; border-radius: 9px;
  background: var(--violet); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  padding: 0 4px; margin-left: 4px;
}
@keyframes tabDotPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.8); }
}

/* â”€â”€ RESPONSIVE â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* â”€â”€ Tablet (â‰¤ 900px) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr 320px;
  }
}

/* â”€â”€ Mobile (â‰¤ 640px) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 640px) {

  html, body { height: 100dvh; overflow: hidden; }
  .screen    { height: 100dvh; }

  /* Compact header */
  .app-header {
    padding: 8px 14px;
    padding-top: max(8px, env(safe-area-inset-top));
  }
  .header-left { gap: 8px; }
  .av-avatar, .av-avatar-fallback { width: 32px; height: 32px; border-radius: 8px; }
  .header-name    { font-size: 0.9rem; }
  .header-version { display: none; }
  .header-right   { gap: 8px; }
  .state-badge    { display: none; }
  .quiet-label    { display: none; }
  .conn-label     { display: none; }
  .signout-text   { display: none; }
  .signout-btn    { padding: 6px 8px; }

  /* Main layout: flex column, panels as full-screen layers */
  .main-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
  }

  /* App panels inherit absolute positioning and bottom clearance from desktop rules */

  /* â”€â”€ Chat panel â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  .panel-chat {
    gap: 0;
    padding-bottom: 10px;
  }

  /* Orb strip compact on mobile */
  .orb-strip {
    padding: 8px 12px;
    gap: 10px;
  }
  .orb-strip .voice-orb { width: 38px; height: 38px; }
  .orb-strip-select     { display: none; } /* hidden on mobile â€” default mic used */

  .conv-panel {
    flex: 1; min-height: 0;
    border-radius: 0; border: none;
    border-bottom: 1px solid var(--border);
    padding: 10px 14px 8px;
    background: transparent;
    backdrop-filter: none; -webkit-backdrop-filter: none;
    box-shadow: none;
  }
  .panel-title-row { margin-bottom: 8px; padding-bottom: 8px; }
  .panel-title     { font-size: 0.78rem; }

  .chat-messages {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    gap: 10px; padding-right: 0;
  }
  .message  { max-width: 90%; }
  .bubble   { font-size: 0.9rem; padding: 10px 14px; }

  .input-bar {
    flex-shrink: 0;
    border-radius: 0; border: none;
    border-top: 1px solid var(--border);
    padding: 8px 12px;
    background: rgba(2, 0, 12, 0.92);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    gap: 6px;
  }
  .input-icon-btn { width: 44px; height: 44px; border-radius: var(--radius-md); }
  .text-input     { font-size: 16px; padding: 11px 14px; } /* 16px prevents iOS zoom */
  .send-btn       { padding: 0; width: 44px; height: 44px; border-radius: var(--radius-md); justify-content: center; }
  .send-btn-text  { display: none; }

  /* â”€â”€ Chords panel â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  .panel-chords { padding: 12px 14px; }
  .chord-section {
    flex: 1; border-radius: var(--radius-lg);
    padding: 14px 16px; overflow: hidden;
    max-height: none;
  }
  .chord-display {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* â”€â”€ Studio panel â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  .panel-studio { padding: 12px 14px; }
  .studio-panel {
    flex: 1; overflow: hidden;
    border-radius: var(--radius-lg);
    padding: 14px 16px 12px;
  }
  .studio-fields {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* â”€â”€ Songs panel â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  .panel-songs { padding: 12px 14px; }
  .songs-panel { border-radius: var(--radius-lg); }



  /* Toast above tab bar */
  .toast-container {
    left: 14px; right: 14px;
    bottom: calc(64px + env(safe-area-inset-bottom));
  }
  .toast { max-width: 100%; }

  /* Login compact */
  .login-card  { padding: 36px 24px; gap: 22px; }
  .login-orb   { width: 80px; height: 80px; }
  .login-title { font-size: clamp(1.6rem, 7vw, 2.2rem); }
}

/* â”€â”€ Very small screens (â‰¤ 380px) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 380px) {
  .header-name { font-size: 0.82rem; }
  .bubble      { font-size: 0.85rem; }
}

