:root {
  --bg: #06101a;
  --bg-soft: #0d2231;
  --card: rgba(7, 23, 35, 0.84);
  --line: rgba(153, 211, 255, 0.18);
  --text: #ecf6ff;
  --muted: #b6d0e3;
  --accent: #19d1b5;
  --accent-2: #ff916f;
  --success: #41d97e;
  --danger: #ff6b6b;
}

/* ═══════════════════════════════════════════
   APP LOADER — full-screen splash until auth resolves
═══════════════════════════════════════════ */
#appLoader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 8% 10%, rgba(41, 195, 174, 0.22), transparent 25%),
    radial-gradient(circle at 90% 85%, rgba(255, 138, 101, 0.18), transparent 30%),
    linear-gradient(135deg, #051019 0%, #0a1f2d 50%, #08131d 100%);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

#appLoader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.app-loader-brand {
  font-family: 'Sora', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.app-loader-brand .brand-swara { color: var(--accent); }
.app-loader-brand .brand-ai    { color: var(--text); }

.app-loader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(25, 209, 181, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: loaderSpin 0.75s linear infinite;
}

@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

button, [role="button"], a {
  touch-action: manipulation;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 10%, rgba(41, 195, 174, 0.25), transparent 25%),
    radial-gradient(circle at 90% 85%, rgba(255, 138, 101, 0.2), transparent 30%),
    linear-gradient(135deg, #051019 0%, #0a1f2d 50%, #08131d 100%);
  position: relative;
  overflow-x: hidden;
}

.aurora {
  position: absolute;
  border-radius: 999px;
  filter: blur(45px);
  pointer-events: none;
}

.aurora-one {
  width: 320px;
  height: 320px;
  background: rgba(29, 212, 191, 0.24);
  top: -100px;
  right: -80px;
}

.aurora-two {
  width: 260px;
  height: 260px;
  background: rgba(255, 138, 101, 0.2);
  bottom: 10%;
  left: -90px;
}

/* ═══════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 200px;
  height: 100vh;
  height: 100dvh;
  background: rgba(5, 12, 22, 0.92);
  border-right: 1px solid rgba(153, 211, 255, 0.1);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  z-index: 500;
  padding: 0;
}

.sidebar-brand {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.4px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(153, 211, 255, 0.08);
  color: var(--text);
}

.brand-swara { color: var(--accent); }
.brand-ai    { color: var(--text); opacity: 0.6; }

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.15s, color 0.15s;
}

.sidebar-nav-item:hover {
  background: rgba(153, 211, 255, 0.07);
  color: var(--text);
}

.sidebar-nav-item.active {
  background: rgba(25, 209, 181, 0.12);
  color: var(--accent);
  border: 1px solid rgba(25, 209, 181, 0.2);
}

.sidebar-nav-item svg {
  flex-shrink: 0;
  opacity: 0.75;
}

.sidebar-nav-item.active svg {
  opacity: 1;
}

/* Co-Composer — coming soon */
.sidebar-nav-item[data-page="composer"].active {
  background: rgba(167, 139, 250, 0.12);
  color: #c4b0ff;
  border-color: rgba(167, 139, 250, 0.25);
}

.sidebar-nav-soon {
  opacity: 0.65;
  position: relative;
}

.nav-soon-badge {
  margin-left: auto;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(167,139,250,0.18);
  color: #c4b0ff;
  border: 1px solid rgba(167,139,250,0.3);
  border-radius: 20px;
  padding: 2px 7px;
}

.sidebar-footer {
  padding: 14px 10px 20px;
  border-top: 1px solid rgba(153, 211, 255, 0.08);
}

/* Swara always-on status dot */
.sidebar-swara-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
}

.swara-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(25, 209, 181, 0.35);
  flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}

.swara-dot-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(25, 209, 181, 0.5);
  letter-spacing: 0.5px;
  transition: color 0.3s;
}

/* Wake word detected / active */
.sidebar-swara-status.active .swara-dot {
  background: #19d1b5;
  box-shadow: 0 0 8px rgba(25, 209, 181, 0.7);
  animation: swaraPulse 1.6s ease-in-out infinite;
}

.sidebar-swara-status.active .swara-dot-label {
  color: #19d1b5;
}

@keyframes swaraPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(25, 209, 181, 0.6); }
  50%       { box-shadow: 0 0 14px rgba(25, 209, 181, 0.95); }
}

/* ═══════════════════════════════════════════
   TOPBAR (top-right profile only)
═══════════════════════════════════════════ */
.topbar {
  position: fixed;
  top: 0;
  left: 200px;
  right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 24px;
  z-index: 400;
  background: rgba(5, 12, 22, 0.6);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(153, 211, 255, 0.08);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Profile icon + dropdown ── */
.profile-menu {
  position: relative;
}

.profile-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(153, 211, 255, 0.2);
  background: rgba(7, 23, 35, 0.8);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.profile-icon-btn:hover {
  border-color: rgba(25, 209, 181, 0.5);
  color: var(--text);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: rgba(7, 18, 30, 0.97);
  border: 1px solid rgba(153, 211, 255, 0.15);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
  display: none;
  z-index: 1000;
}

.profile-dropdown.open {
  display: block;
}

.profile-menu-item {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background 0.12s;
}

.profile-menu-item:hover {
  background: rgba(153, 211, 255, 0.08);
}

.profile-menu-greeting {
  padding: 8px 12px 4px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid rgba(153,211,255,0.08);
  margin-bottom: 4px;
}

.profile-menu-logout {
  color: var(--danger);
}

/* ═══════════════════════════════════════════
   MAIN CONTENT + PAGES
═══════════════════════════════════════════ */
.main-content {
  margin-left: 200px;
  padding-top: 56px;
  min-height: 100vh;
  min-height: 100dvh;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

/* Composer page fills full remaining height */
#pageComposer.active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
  height: calc(100dvh - 56px);
}

#pageComposer .composer-mode {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.layout {
  width: min(960px, 92%);
  margin: 20px auto 40px;
  display: block;
}

.brand {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.hero {
  padding: 46px 0 10px;
  max-width: 880px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--accent);
  font-weight: 700;
}

.kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(25,209,181,0.7);
  animation: swaraPulse 2.2s ease-in-out infinite;
  flex-shrink: 0;
}

/* Raag voice-command chip */
.raag-intro-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding: 7px 16px;
  background: rgba(25,209,181,0.07);
  border: 1px solid rgba(25,209,181,0.2);
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--muted);
}

.raag-intro-chip strong { color: var(--accent); }

.raag-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: swaraPulse 2.2s ease-in-out infinite;
}

/* ── Onboard CTA ─────────────────────────────────────────────── */
.onboard-prompt {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding: 14px 20px;
  background: rgba(25,209,181,0.05);
  border: 1px solid rgba(25,209,181,0.22);
  border-radius: 14px;
  max-width: 520px;
}
.onboard-pulse-ring {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  position: relative;
  animation: onboardPulse 2s ease-in-out infinite;
}
.onboard-pulse-ring::after {
  content: '🎙️';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 15px;
  line-height: 1;
}
@keyframes onboardPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(25,209,181,0.5); }
  50%       { box-shadow: 0 0 0 8px rgba(25,209,181,0); }
}
.onboard-prompt-body { display: flex; flex-direction: column; gap: 3px; }
.onboard-prompt-main { margin: 0; font-size: 0.92rem; color: var(--text); line-height: 1.4; }
.onboard-prompt-sub  { margin: 0; font-size: 0.78rem; color: var(--muted); }
.onboard-kw { color: var(--accent); font-weight: 700; }

/* ── First Session Report card ───────────────────────────────── */
.first-session-report {
  margin-top: 20px;
  padding: 18px 20px;
  background: rgba(25,209,181,0.06);
  border: 1px solid rgba(25,209,181,0.25);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeSlideIn 0.5s ease;
}
.fsr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.fsr-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.fsr-level-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  background: rgba(25,209,181,0.12);
  border-radius: 50px;
  color: var(--accent);
}
.fsr-range-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.fsr-label {
  font-size: 0.78rem;
  color: var(--muted);
  flex-shrink: 0;
}
.fsr-range-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}
.fsr-metrics {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.fsr-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 10px 14px;
  flex: 1;
  min-width: 100px;
}
.fsr-metric-label {
  font-size: 0.73rem;
  color: var(--muted);
}
.fsr-metric-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}
.fsr-focus-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.85rem;
}
.fsr-focus-val { color: var(--text); }
.fsr-cta-row {
  font-size: 0.8rem;
  color: var(--muted);
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero h1 {
  margin: 14px 0 16px;
  font-family: 'Sora', sans-serif;
  font-size: clamp(2.2rem, 4.1vw, 4rem);
  line-height: 1.08;
  letter-spacing: -1.2px;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 62ch;
}

.hero-points {
  margin-top: 28px;
  display: grid;
  gap: 14px;
  color: #d8ebf8;
}

.hero-points div {
  display: flex;
  gap: 10px;
  align-items: center;
}

.hero-points span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(130deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(29, 212, 191, 0.7);
}

.signup-card,
.mvp-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px;
  backdrop-filter: blur(8px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.32);
}

.signup-card h2,
.mvp-card h3 {
  margin: 0 0 8px;
  font-family: 'Sora', sans-serif;
}

.signup-card p,
.mvp-card p {
  margin: 0 0 20px;
  color: var(--muted);
}

label {
  display: block;
  margin: 14px 0 8px;
  font-size: 0.92rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(200, 229, 252, 0.22);
  background: rgba(5, 16, 26, 0.7);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 13px;
  font: inherit;
  font-size: max(16px, 1rem); /* prevent iOS auto-zoom on focus */
}

input[type='file'] {
  padding: 10px;
}

input::placeholder,
textarea::placeholder {
  color: rgba(194, 220, 238, 0.62);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(29, 212, 191, 0.9);
  box-shadow: 0 0 0 3px rgba(29, 212, 191, 0.2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  border: 0;
  cursor: pointer;
}

.btn-nav {
  color: #09141d;
  background: linear-gradient(130deg, #98f5db, #ffd2c4);
  padding: 10px 18px;
  font-size: 0.9rem;
}

.btn-primary {
  width: 100%;
  margin-top: 16px;
  background: linear-gradient(125deg, var(--accent), var(--accent-2));
  color: #07121a;
  padding: 13px 20px;
  font-size: 1rem;
}

.btn-ghost {
  width: 100%;
  margin-top: 14px;
  padding: 11px 16px;
  background: rgba(7, 31, 46, 0.7);
  border: 1px solid rgba(141, 204, 246, 0.22);
  color: #d7ecfb;
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: wait;
}

.record-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.record-actions .btn-ghost {
  margin-top: 0;
}

.btn-ghost.recording {
  border-color: rgba(255, 107, 107, 0.75);
  color: #ffd6d6;
  background: rgba(55, 11, 14, 0.72);
}

.btn-ghost.recording::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff6b6b;
  margin-right: 8px;
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.85);
}

.exercise-prompt {
  margin-top: 10px;
  border: 1px solid rgba(136, 205, 251, 0.24);
  background: rgba(3, 14, 22, 0.6);
  border-radius: 12px;
  padding: 10px 12px;
  color: #dbedf9;
  font-size: 0.9rem;
  line-height: 1.45;
}

#recordingPreview {
  width: min(100%, 520px);
  display: block;
  margin: 14px auto 0;
}

.difficulty-wrap {
  margin: 14px 0 0;
  padding: 10px 12px 12px;
  border: 1px solid rgba(136, 205, 251, 0.24);
  border-radius: 12px;
  background: rgba(3, 14, 22, 0.6);
}

.difficulty-wrap legend {
  padding: 0 6px;
  color: #dbeefb;
  font-size: 0.88rem;
}

.difficulty-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.btn-difficulty {
  background: rgba(7, 31, 46, 0.86);
  border: 1px solid rgba(141, 204, 246, 0.28);
  color: #d7ecfb;
  padding: 9px 10px;
}

.btn-difficulty.selected {
  border-color: rgba(25, 209, 181, 0.8);
  color: #c8fff2;
  box-shadow: 0 0 0 2px rgba(25, 209, 181, 0.2);
}

.hidden {
  display: none;
}

.form-message {
  min-height: 21px;
  margin: 14px 2px 0;
  font-size: 0.92rem;
}

.form-message.success {
  color: var(--success);
}

.form-message.error {
  color: var(--danger);
}

.pw-req-list {
  list-style: none;
  margin: 6px 0 14px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.pw-req-list li {
  font-size: 0.78rem;
  color: var(--muted);
  padding-left: 16px;
  position: relative;
  transition: color 0.2s;
}
.pw-req-list li::before {
  content: '✗';
  position: absolute;
  left: 0;
  color: var(--muted);
  transition: color 0.2s;
}
.pw-req-list li.met {
  color: var(--success);
}
.pw-req-list li.met::before {
  content: '✓';
  color: var(--success);
}

.mvp-panel {
  width: min(1120px, 100%);
  padding: 0 24px;
  margin: 12px auto 44px;
}

.mvp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.small-muted {
  color: var(--muted);
  font-size: 0.92rem;
}

.analysis-result {
  border: 1px solid rgba(136, 205, 251, 0.24);
  background: rgba(3, 14, 22, 0.64);
  border-radius: 14px;
  padding: 14px;
  min-height: 120px;
}

.analysis-result.empty {
  color: var(--muted);
  display: flex;
  align-items: center;
}

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.result-head strong {
  color: var(--text);
}

.score-row {
  margin-bottom: 10px;
}

.score-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.88rem;
}

.score-bar {
  width: 100%;
  height: 8px;
  background: rgba(136, 205, 251, 0.2);
  border-radius: 999px;
  overflow: hidden;
}

.score-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(95deg, var(--accent), var(--accent-2));
}

.feedback-box {
  margin-top: 12px;
  border-top: 1px solid rgba(139, 204, 246, 0.2);
  padding-top: 10px;
}

.feedback-box p {
  margin: 8px 0;
  color: #d9ebf8;
  font-size: 0.92rem;
}

.history-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.history-item {
  border: 1px solid rgba(139, 204, 246, 0.2);
  border-radius: 12px;
  background: rgba(8, 30, 44, 0.55);
  padding: 10px 12px;
}

.history-item div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.history-item span {
  font-size: 0.8rem;
  color: var(--muted);
}

.history-item p {
  margin: 7px 0 0;
  color: #cce6f8;
  font-size: 0.9rem;
}

.signup-panel {
  width: min(1120px, 100%);
  padding: 0 24px;
  margin: 0 auto 70px;
}

.signup-shell {
  max-width: 760px;
  margin: 0 auto;
}

/* ── Free-session feedback panel ─────────────────────────────────────────── */
.feedback-shell {
  max-width: 480px;
  margin: 0 auto 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 28px 24px;
  text-align: center;
}

.feedback-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
}

.feedback-sub {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 20px;
}

.feedback-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.star-btn {
  background: none;
  border: none;
  font-size: 2rem;
  color: rgba(153, 211, 255, 0.25);
  cursor: pointer;
  padding: 0 2px;
  transition: color 0.15s, transform 0.1s;
  line-height: 1;
}

.star-btn:hover,
.star-btn.active {
  color: #f5c518;
}

.star-btn:active {
  transform: scale(1.2);
}

.feedback-textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  font-size: 0.9rem;
  padding: 10px 14px;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 18px;
}

.feedback-textarea:focus {
  border-color: var(--accent);
}

.feedback-textarea::placeholder {
  color: var(--muted);
}

.feedback-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 10px 22px;
  border-radius: 10px;
  font-family: 'Manrope', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--text);
}

@media (max-width: 920px) {
  .mvp-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-right: 0;
  }
}
/* ===============================
   VOICE AGENT OVERLAY
================================ */

.voice-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(25, 209, 181, 0.18), transparent 35%),
    linear-gradient(140deg, #041019 0%, #071a26 60%, #041019 100%);
  transition: opacity 0.5s ease;
}

.voice-agent {
  text-align: center;
  max-width: 420px;
  padding: 40px 28px;
}

.agent-orb {
  width: 120px;
  height: 120px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #5fffe3, #19d1b5 60%, #0c8f7d);
  box-shadow:
    0 0 40px rgba(25, 209, 181, 0.6),
    0 0 80px rgba(25, 209, 181, 0.25);
  position: relative;
  animation: pulse 2.2s infinite ease-in-out;
}

.agent-orb::after {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px solid rgba(25, 209, 181, 0.35);
  animation: ring 2.2s infinite ease-out;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes ring {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.voice-agent h1 {
  font-family: 'Sora', sans-serif;
  font-size: 2.2rem;
  margin: 0 0 14px;
}

.voice-agent p {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0.4px;
}
.voice-overlay.listening .agent-orb {
  animation: pulse 1.2s infinite ease-in-out;
  box-shadow:
    0 0 60px rgba(25, 209, 181, 0.9),
    0 0 120px rgba(25, 209, 181, 0.4);
}

.voice-overlay.speaking .agent-orb {
  animation: pulse 0.8s infinite ease-in-out;
}


/* ===============================
   FLOATING VOICE ORB
================================ */

/* ── Standing Card ─────────────────────────────────────────────────────────── */
.standing-card { display: flex; flex-direction: column; gap: 0; }

.standing-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.standing-empty-icon { font-size: 2rem; }

/* Benchmark row */
.bench-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.bench-level-badge {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
}
.bench-info { flex: 1; min-width: 0; }
.bench-label { font-size: 0.72rem; color: var(--muted); margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.05em; }
.bench-next { font-size: 0.82rem; color: rgba(255,255,255,0.7); margin-bottom: 6px; }
.bench-bar-wrap {
  height: 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}
.bench-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}
.bench-score {
  font-size: 1.6rem;
  font-weight: 700;
  min-width: 44px;
  text-align: right;
  flex-shrink: 0;
}

/* Metrics row */
.standing-metrics {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
}
.sm-stat {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.sm-stat:last-child { border-right: none; }
.sm-val { font-size: 1.15rem; font-weight: 700; color: #fff; }
.sm-label { font-size: 0.7rem; color: var(--muted); margin-top: 2px; }

/* Note proficiency */
.standing-notes-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 6px;
}
.note-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; align-items: center; }
.note-label { font-size: 0.72rem; color: var(--muted); margin-right: 2px; }
.note-pill {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
}
.note-pill.strong { background: rgba(25,209,181,0.15); color: #19d1b5; border: 1px solid rgba(25,209,181,0.3); }
.note-pill.weak   { background: rgba(248,113,113,0.15); color: #f87171; border: 1px solid rgba(248,113,113,0.3); }

/* ── Voice Transcript ──────────────────────────────────────────────────────── */
.voice-transcript {
  position: fixed;
  bottom: 125px;
  right: 20px;
  z-index: 9998;
  max-width: 260px;
  background: rgba(3, 14, 22, 0.88);
  border: 1px solid rgba(25, 209, 181, 0.35);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.4;
  backdrop-filter: blur(8px);
  word-break: break-word;
  transition: opacity 0.2s ease;
}

.voice-transcript.interim {
  color: rgba(25, 209, 181, 0.9);
}

.voice-transcript.hidden {
  opacity: 0;
  pointer-events: none;
}

.voice-orb {
  display: none; /* replaced by avatar panel */
}

.voice-orb.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.5);
}

.orb-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #5fffe3, #19d1b5 60%, #0c8f7d);
  box-shadow:
    0 0 30px rgba(25, 209, 181, 0.6),
    0 0 60px rgba(25, 209, 181, 0.25);
  animation: orbPulse 2s infinite ease-in-out;
}

.voice-orb.listening .orb-inner {
  animation: orbPulse 1s infinite ease-in-out;
  box-shadow:
    0 0 50px rgba(25, 209, 181, 0.9),
    0 0 100px rgba(25, 209, 181, 0.4);
}

.voice-orb.speaking .orb-inner {
  animation: orbPulse 0.6s infinite ease-in-out;
}

@keyframes orbPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}


.exercise-details {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(136, 205, 251, 0.24);
  background: rgba(3, 14, 22, 0.6);
  border-radius: 12px;
}

.exercise-details p {
  margin: 0 0 10px;
  color: #dbedf9;
  font-size: 0.9rem;
  line-height: 1.5;
}

.coaching-feedback {
  margin-top: 14px;
  padding: 12px;
  border-left: 3px solid var(--accent);
  background: rgba(25, 209, 181, 0.1);
  border-radius: 8px;
}

.coaching-feedback h4 {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.95rem;
}

.coaching-feedback p {
  margin: 6px 0;
  color: #d9ebf8;
  font-size: 0.88rem;
  line-height: 1.5;
}

.detected-notes {
  margin-top: 10px;
  padding: 10px;
  background: rgba(7, 31, 46, 0.7);
  border-radius: 8px;
}

.detected-notes strong {
  color: var(--accent);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.note-badge {
  display: inline-block;
  margin: 4px;
  padding: 4px 8px;
  background: rgba(25, 209, 181, 0.2);
  border: 1px solid rgba(25, 209, 181, 0.4);
  border-radius: 6px;
  font-size: 0.85rem;
  color: #c8fff2;
}

.pitch-contour-wrap {
  margin-top: 12px;
  padding: 10px;
  background: rgba(7, 31, 46, 0.7);
  border-radius: 8px;
}

.perfect-voice-section {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 145, 111, 0.3);
  background: rgba(255, 145, 111, 0.06);
  border-radius: 12px;
}

.perfect-voice-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.perfect-voice-header strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.perfect-voice-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.perfect-voice-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.perfect-voice-label {
  margin: 0 0 4px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ===============================
   SIGN-IN MODAL
================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px 28px 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s;
}

.modal-close:hover {
  color: var(--text);
}

.link-muted {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.link-muted:hover { color: #19d1b5; }

.reset-back-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}
.reset-back-btn:hover { color: var(--text); }

.link-btn {
  background: none;
  border: none;
  color: #19d1b5;
  font-size: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  font-family: inherit;
}
.link-btn:disabled {
  color: var(--muted);
  cursor: default;
  text-decoration: none;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 12px;
  color: var(--muted);
  font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 18px;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.btn-google-full {
  padding: 13px 18px;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

/* ═══════════════════════════════════════════════
   CO-COMPOSER MODE
═══════════════════════════════════════════════ */

/* Nav button */
.btn-composer-nav {
  background: linear-gradient(130deg, #a78bfa, #f472b6);
  color: #0a0414;
}

/* Composer mode — fills #pageComposer */
.composer-mode {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 10% 20%, rgba(167, 139, 250, 0.12), transparent 30%),
    radial-gradient(circle at 85% 75%, rgba(244, 114, 182, 0.1), transparent 28%),
    linear-gradient(150deg, #050d18 0%, #080f1e 55%, #050d18 100%);
  overflow: hidden;
  flex: 1;
}

/* ── Composer topbar ── */
.composer-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(167, 139, 250, 0.2);
  background: rgba(5, 13, 24, 0.7);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
  gap: 12px;
  flex-wrap: wrap;
}

.composer-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.composer-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}


.composer-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.meta-pill {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(167, 139, 250, 0.15);
  border: 1px solid rgba(167, 139, 250, 0.3);
  color: #d8c9ff;
}

.cmp-btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
  margin-top: 0;
  width: auto;
}

/* ── Main body ── */
.composer-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  flex: 1;
  overflow: hidden;
  gap: 0;
}

/* ══════════════════════════
   DAW PANEL
══════════════════════════ */
.daw-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid rgba(167, 139, 250, 0.15);
}

/* Beat ruler */
.daw-ruler-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid rgba(167, 139, 250, 0.2);
  background: rgba(8, 14, 28, 0.8);
  flex-shrink: 0;
}

.daw-track-label-spacer {
  width: 130px;
  flex-shrink: 0;
  border-right: 1px solid rgba(167, 139, 250, 0.15);
}

.daw-ruler {
  display: flex;
  align-items: center;
  height: 28px;
  overflow: hidden;
  flex: 1;
  gap: 0;
}

.daw-beat-mark {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 5px;
  font-size: 0.7rem;
  color: rgba(167, 139, 250, 0.6);
  border-right: 1px solid rgba(167, 139, 250, 0.1);
  user-select: none;
}

.daw-beat-mark.bar-start {
  border-right-color: rgba(167, 139, 250, 0.35);
  color: rgba(200, 180, 255, 0.85);
  font-weight: 700;
}

/* Track lanes */
.daw-tracks {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.daw-tracks::-webkit-scrollbar { width: 5px; }
.daw-tracks::-webkit-scrollbar-track { background: transparent; }
.daw-tracks::-webkit-scrollbar-thumb { background: rgba(167,139,250,0.25); border-radius: 3px; }

.daw-track {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid rgba(167, 139, 250, 0.1);
  min-height: 62px;
  position: relative;
  transition: background 0.15s;
}

.daw-track:hover {
  background: rgba(167, 139, 250, 0.04);
}

.daw-track.muted {
  opacity: 0.45;
}

/* Track label sidebar */
.daw-track-label {
  width: 130px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 10px;
  border-right: 1px solid rgba(167, 139, 250, 0.15);
  background: rgba(6, 10, 22, 0.6);
  gap: 4px;
}

.daw-track-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.daw-track-type {
  font-size: 0.68rem;
  color: rgba(167, 139, 250, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.daw-track-controls {
  display: flex;
  gap: 5px;
  margin-top: 4px;
}

.daw-mute-btn {
  font-size: 0.62rem;
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid rgba(167, 139, 250, 0.3);
  background: rgba(167, 139, 250, 0.1);
  color: #c4b0ff;
  cursor: pointer;
  line-height: 1;
  font-weight: 700;
}

.daw-mute-btn:hover {
  background: rgba(167, 139, 250, 0.25);
}

/* Track content area (pattern + effects) */
.daw-track-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
  gap: 5px;
  overflow: hidden;
  position: relative;
}

/* Pattern lane */
.daw-pattern-lane {
  flex: 1;
  position: relative;
  background: rgba(8, 14, 30, 0.6);
  border-radius: 6px;
  border: 1px solid rgba(167, 139, 250, 0.12);
  overflow: hidden;
  min-height: 28px;
  display: flex;
  align-items: center;
}

/* Beat grid lines inside pattern lane */
.daw-pattern-lane::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0%,
    transparent calc(12.5% - 1px),
    rgba(167, 139, 250, 0.08) calc(12.5% - 1px),
    rgba(167, 139, 250, 0.08) 12.5%
  );
  pointer-events: none;
}

/* Note blocks on the lane */
.daw-note-block {
  position: absolute;
  top: 20%;
  height: 60%;
  border-radius: 3px;
  background: linear-gradient(130deg, #a78bfa, #f472b6);
  opacity: 0.85;
  transition: opacity 0.15s;
  cursor: default;
}

.daw-note-block:hover {
  opacity: 1;
}

.daw-note-block.playing {
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.8);
  opacity: 1;
}

.daw-note-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 3px;
  font-size: 0.6rem;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
}

/* Effects row */
.daw-effects-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  min-height: 16px;
}

.daw-effect-chip {
  font-size: 0.62rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(244, 114, 182, 0.15);
  border: 1px solid rgba(244, 114, 182, 0.35);
  color: #f9c5df;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Empty state */
.daw-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(167, 139, 250, 0.5);
  gap: 8px;
  padding: 40px;
  text-align: center;
}

.daw-empty-icon {
  font-size: 3rem;
  opacity: 0.5;
  line-height: 1;
}

.daw-empty p {
  margin: 0;
  font-size: 0.9rem;
}

.daw-empty .daw-empty-hint {
  font-size: 0.8rem;
  color: rgba(167, 139, 250, 0.35);
}

.daw-empty em {
  color: rgba(167, 139, 250, 0.55);
  font-style: normal;
}

/* ── Frequency visualizer ── */
.daw-visualizer-wrap {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid rgba(167, 139, 250, 0.12);
  flex-shrink: 0;
  background: rgba(4, 8, 18, 0.7);
}

.daw-visualizer {
  flex: 1;
  height: 52px;
  display: block;
}

/* ── Multi-row DAW track layout ── */
.daw-track {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid rgba(167, 139, 250, 0.1);
  position: relative;
  transition: background 0.15s;
  min-height: 0;
}

.daw-track:hover { background: rgba(167, 139, 250, 0.03); }
.daw-track.muted { opacity: 0.4; }

/* Sidebar */
.daw-track-sidebar {
  width: 130px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(167, 139, 250, 0.12);
  background: rgba(5, 9, 20, 0.7);
  position: relative;
  overflow: hidden;
}

.daw-track-color-stripe {
  height: 3px;
  width: 100%;
  flex-shrink: 0;
}

.daw-track-info {
  padding: 6px 10px 4px;
  flex: 1;
}

.daw-track-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.daw-track-type {
  font-size: 0.65rem;
  color: rgba(167, 139, 250, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 1px;
}

.daw-track-bottom-controls {
  padding: 4px 8px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.daw-mute-btn {
  font-size: 0.6rem;
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid rgba(167, 139, 250, 0.3);
  background: rgba(167, 139, 250, 0.1);
  color: #c4b0ff;
  cursor: pointer;
  line-height: 1;
  font-weight: 700;
  flex-shrink: 0;
}

.daw-mute-btn.muted {
  background: rgba(255, 107, 107, 0.2);
  border-color: rgba(255, 107, 107, 0.5);
  color: #ffa0a0;
}

.daw-vol-slider {
  flex: 1;
  height: 3px;
  appearance: none;
  background: rgba(167, 139, 250, 0.25);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  border: none;
  padding: 0;
  width: auto;
}

.daw-vol-slider::-webkit-slider-thumb {
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #a78bfa;
  cursor: pointer;
}

/* Track rows area */
.daw-track-rows {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.daw-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid rgba(167, 139, 250, 0.06);
  min-height: 28px;
}

.daw-row:last-child { border-bottom: none; }

.daw-row-label {
  width: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(167, 139, 250, 0.45);
  border-right: 1px solid rgba(167, 139, 250, 0.06);
  padding: 4px 0;
}

/* Pattern row */
.daw-pattern-row { min-height: 44px; }

.daw-pattern-lane {
  flex: 1;
  position: relative;
  background: rgba(6, 10, 22, 0.6);
  overflow: hidden;
  display: flex;
  align-items: center;
  cursor: default;
}

.daw-pattern-lane::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0%,
    transparent calc(12.5% - 1px),
    rgba(167, 139, 250, 0.07) calc(12.5% - 1px),
    rgba(167, 139, 250, 0.07) 12.5%
  );
  pointer-events: none;
}

/* Empty lane hint */
.daw-pattern-lane.empty::after {
  content: 'no pattern yet';
  position: absolute;
  left: 10px;
  font-size: 0.65rem;
  color: rgba(167, 139, 250, 0.25);
  font-style: italic;
  pointer-events: none;
}

/* Effects row */
.daw-fx-row { min-height: 26px; }

.daw-fx-area {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  flex-wrap: wrap;
}

.daw-effect-chip {
  font-size: 0.62rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(244, 114, 182, 0.12);
  border: 1px solid rgba(244, 114, 182, 0.3);
  color: #f9c5df;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* Vocal recording row */
.daw-vocal-row { min-height: 36px; background: rgba(25, 209, 181, 0.03); }

.daw-vocal-controls {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
}

.daw-record-btn {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 107, 107, 0.5);
  background: rgba(255, 107, 107, 0.12);
  color: #ffa0a0;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s;
}

.daw-record-btn:hover { background: rgba(255, 107, 107, 0.22); }

.daw-record-btn.recording {
  background: rgba(255, 107, 107, 0.3);
  border-color: rgba(255, 107, 107, 0.8);
  animation: recordPulse 1s infinite;
}

@keyframes recordPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(255, 107, 107, 0); }
}

.daw-vocal-waveform {
  flex: 1;
  height: 24px;
  border-radius: 4px;
  background: rgba(25, 209, 181, 0.06);
  border: 1px solid rgba(25, 209, 181, 0.1);
  display: block;
}

.daw-vocal-playback {
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(25, 209, 181, 0.3);
  background: rgba(25, 209, 181, 0.08);
  color: var(--accent);
  cursor: pointer;
  font-weight: 700;
  display: none;
}

.daw-vocal-playback.has-recording { display: block; }

/* Playhead */
.daw-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(244, 114, 182, 0.8);
  box-shadow: 0 0 6px rgba(244, 114, 182, 0.6);
  pointer-events: none;
  z-index: 10;
  transition: left 0.05s linear;
}

/* ══════════════════════════
   CHAT PANEL
══════════════════════════ */
.chat-panel {
  display: flex;
  flex-direction: column;
  background: rgba(6, 10, 22, 0.7);
  overflow: hidden;
}

.chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-history::-webkit-scrollbar { width: 4px; }
.chat-history::-webkit-scrollbar-track { background: transparent; }
.chat-history::-webkit-scrollbar-thumb { background: rgba(167,139,250,0.2); border-radius: 3px; }

/* Chat bubbles */
.chat-bubble {
  max-width: 88%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 0.875rem;
  line-height: 1.5;
  word-break: break-word;
}

.chat-bubble.user {
  align-self: flex-end;
  background: rgba(167, 139, 250, 0.18);
  border: 1px solid rgba(167, 139, 250, 0.3);
  color: #e0d4ff;
  border-bottom-right-radius: 4px;
}

.chat-bubble.swara {
  align-self: flex-start;
  background: rgba(25, 209, 181, 0.1);
  border: 1px solid rgba(25, 209, 181, 0.22);
  color: #d0f5ef;
  border-bottom-left-radius: 4px;
}

.chat-bubble .bubble-sender {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  opacity: 0.7;
  text-transform: uppercase;
}

.chat-bubble.swara .bubble-sender { color: var(--accent); }
.chat-bubble.user .bubble-sender { color: #a78bfa; }

/* Thinking dots */
.cmp-thinking {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
}

.cmp-thinking.hidden { display: none; }

.cmp-thinking span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(25, 209, 181, 0.6);
  animation: thinkDot 1.2s infinite ease-in-out;
}

.cmp-thinking span:nth-child(2) { animation-delay: 0.2s; }
.cmp-thinking span:nth-child(3) { animation-delay: 0.4s; }

@keyframes thinkDot {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40% { transform: scale(1.1); opacity: 1; }
}

/* Input area */
.chat-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(167, 139, 250, 0.15);
  background: rgba(5, 10, 20, 0.8);
}

.cmp-voice-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.12);
  color: #c4b0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, box-shadow 0.15s;
}

.cmp-voice-btn:hover {
  background: rgba(167, 139, 250, 0.25);
}

.cmp-voice-btn.active {
  background: rgba(167, 139, 250, 0.35);
  border-color: rgba(167, 139, 250, 0.7);
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.4);
  animation: orbPulse 1s infinite ease-in-out;
}

.cmp-text-input {
  flex: 1;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(167, 139, 250, 0.2);
  background: rgba(8, 14, 28, 0.8);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  padding: 0 12px;
  width: auto;
}

.cmp-text-input:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.6);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.12);
}

.cmp-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(130deg, #a78bfa, #f472b6);
  color: #0a0414;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.cmp-send-btn:hover { opacity: 0.85; }
.cmp-send-btn:disabled { opacity: 0.4; cursor: default; }

.cmp-voice-status {
  text-align: center;
  font-size: 0.78rem;
  color: #a78bfa;
  padding: 4px 12px 8px;
  letter-spacing: 0.4px;
}

.cmp-voice-status.hidden { display: none; }

/* Track added animation */
@keyframes trackIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

.daw-track {
  animation: trackIn 0.25s ease-out;
}

/* Responsive */
@media (max-width: 760px) {
  .composer-body {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 280px;
  }

  .daw-panel {
    border-right: none;
    border-bottom: 1px solid rgba(167, 139, 250, 0.15);
  }
}

/* ══════════════════════════════════════════════════════════════
   PROGRESS PAGE
══════════════════════════════════════════════════════════════ */

#pageProgress.active {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.progress-page {
  padding: 28px 32px 48px;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── Overall score header ─────────────────────────────────── */
.prog-header {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.prog-overall-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 28px;
  width: 100%;
}

.prog-score-ring {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.prog-score-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Sora', sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text);
}

.prog-overall-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prog-overall-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.prog-overall-sub {
  font-size: 0.85rem;
  color: var(--muted);
}

.prog-attrs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.prog-attr {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.prog-attr.strength {
  background: rgba(25, 209, 181, 0.12);
  color: var(--accent);
  border: 1px solid rgba(25, 209, 181, 0.25);
}

.prog-attr.weakness {
  background: rgba(248, 113, 113, 0.10);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.2);
}

/* ── Sign-in prompt ───────────────────────────────────────── */
.prog-signin-prompt {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 24px;
  text-align: center;
  color: var(--muted);
}

.prog-signin-prompt p { margin: 0 0 16px; font-size: 0.95rem; }

.prog-goto-signin {
  display: inline-block;
  width: auto;
  padding: 10px 24px;
  margin-top: 0;
}

/* ── Exercises grid ───────────────────────────────────────── */
.prog-exercises {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.prog-loading, .prog-error {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 16px 0;
}

.prog-empty-state {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Exercise card ────────────────────────────────────────── */
.prog-exercise-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.prog-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.prog-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.prog-ex-name {
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.prog-trend {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 12px;
  letter-spacing: 0.3px;
}

.prog-trend.improving { background: rgba(25,209,181,0.12); color: var(--accent); border: 1px solid rgba(25,209,181,0.25); }
.prog-trend.declining { background: rgba(248,113,113,0.10); color: #f87171; border: 1px solid rgba(248,113,113,0.2); }
.prog-trend.stable    { background: rgba(251,191,36,0.10);  color: #fbbf24; border: 1px solid rgba(251,191,36,0.2); }
.prog-trend.new       { background: rgba(167,139,250,0.10); color: #a78bfa; border: 1px solid rgba(167,139,250,0.2); }

.prog-practice-btn {
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.prog-practice-btn:hover {
  background: var(--accent);
  color: #062822;
}

/* ── Stats row ────────────────────────────────────────────── */
.prog-card-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.prog-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 56px;
}

.prog-stat-value {
  font-family: 'Sora', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.prog-stat-label {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Mini chart ───────────────────────────────────────────── */
.prog-chart-wrap {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.prog-mini-chart {
  display: block;
}

.prog-chart-empty {
  font-size: 0.72rem;
  color: var(--muted);
  padding: 8px 0;
}

/* ── Coaching snippet ─────────────────────────────────────── */
.prog-coaching-snippet {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
  padding: 8px 12px;
  border-left: 2px solid var(--accent);
  background: rgba(25,209,181,0.05);
  border-radius: 0 6px 6px 0;
}

/* ── Expand / attempt list ────────────────────────────────── */
.prog-expand-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: color 0.15s;
}

.prog-expand-btn:hover { color: var(--text); }

.prog-attempts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.prog-attempt-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  border: 1px solid var(--line);
}

.prog-attempt-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.prog-attempt-score {
  font-family: 'Sora', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  min-width: 28px;
}

.prog-attempt-date {
  font-size: 0.78rem;
  color: var(--muted);
}

.prog-song-tag {
  font-size: 0.72rem;
  background: rgba(167,139,250,0.12);
  color: #a78bfa;
  border: 1px solid rgba(167,139,250,0.2);
  padding: 1px 8px;
  border-radius: 10px;
}

.prog-attempt-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.76rem;
  color: var(--muted);
}

.prog-attempt-coaching {
  font-size: 0.76rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.4;
  margin-top: 2px;
}

/* ── Perfect voice play button ────────────────────────────── */
.prog-play-perfect {
  background: none;
  border: 1px solid rgba(167,139,250,0.35);
  color: #a78bfa;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.prog-play-perfect:hover { background: rgba(167,139,250,0.1); }
.prog-play-perfect:disabled { opacity: 0.45; cursor: default; }

/* ── Overall row (inline in session tracking card) ────────── */
.prog-overall-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.prog-score-ring {
  position: relative;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
}

.prog-score-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  pointer-events: none;
}

/* ── Try Again button ─────────────────────────────────────── */
.prog-try-again {
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.prog-try-again:hover {
  background: var(--accent);
  color: #062822;
}

/* ── Latest badge ─────────────────────────────────────────── */
.prog-latest-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(25,209,181,0.12);
  color: var(--accent);
  border: 1px solid rgba(25,209,181,0.25);
  padding: 1px 7px;
  border-radius: 10px;
}

/* ── Exercise cards inside the session tracking card ─────── */
#progressByExercise {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

#progressSummary {
  margin-bottom: 4px;
}

/* ── Overall row extras ───────────────────────────────────── */
.prog-overall-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prog-overall-title {
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.prog-session-count {
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ── Baseline delta row ───────────────────────────────────── */
.prog-baseline-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.prog-baseline-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.prog-delta {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 10px;
}

.prog-delta.pos {
  color: var(--accent);
  background: rgba(25,209,181,0.10);
  border: 1px solid rgba(25,209,181,0.2);
}

.prog-delta.neg {
  color: #f87171;
  background: rgba(248,113,113,0.10);
  border: 1px solid rgba(248,113,113,0.2);
}

/* ── Focus Plan ───────────────────────────────────────────── */
.prog-rec-section { margin-bottom: 14px; }

.focus-plan-section {
  background: rgba(25,209,181,0.04);
  border: 1px solid rgba(25,209,181,0.14);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.focus-plan-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.focus-plan-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--accent);
}

.focus-plan-meta {
  font-size: 0.7rem;
  color: var(--muted);
}

.focus-verdict {
  font-size: 0.83rem;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.45;
}

.focus-gap-card {
  background: rgba(248,113,113,0.07);
  border: 1px solid rgba(248,113,113,0.2);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.focus-gap-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.focus-gap-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
}

.focus-gap-value {
  font-size: 0.78rem;
  color: #f87171;
  font-weight: 600;
}

.focus-gap-trend {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 8px;
  margin-left: auto;
}

.focus-gap-trend.trend-up {
  color: var(--accent);
  background: rgba(25,209,181,0.12);
}

.focus-gap-trend.trend-down {
  color: #f87171;
  background: rgba(248,113,113,0.12);
}

.focus-gap-trend.trend-flat {
  color: var(--muted);
  background: rgba(255,255,255,0.06);
}

.focus-gap-subtext {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.focus-gap-why {
  font-size: 0.78rem;
  color: var(--text-muted, #b0b0c0);
  line-height: 1.5;
  margin-bottom: 8px;
}

.focus-gap-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.focus-fix-label {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.focus-practice-btn {
  background: rgba(25,209,181,0.12);
  border: 1px solid rgba(25,209,181,0.28);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s;
}

.focus-practice-btn:hover { background: rgba(25,209,181,0.22); }

.focus-watch-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(25,209,181,0.06);
  border: 1px solid rgba(25,209,181,0.14);
  border-radius: 10px;
  padding: 8px 14px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.focus-watch-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
}

.focus-watch-value {
  font-size: 0.76rem;
  color: var(--accent);
  font-weight: 600;
}

.focus-no-gaps {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
  padding: 8px 0 2px;
}

/* ── Metric trend pills inside exercise cards ─────────────── */
.metric-trend-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.metric-trend-pill {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
}

.metric-trend-pill.trend-up {
  color: var(--accent);
  background: rgba(25,209,181,0.10);
  border: 1px solid rgba(25,209,181,0.2);
}

.metric-trend-pill.trend-down {
  color: #f87171;
  background: rgba(248,113,113,0.10);
  border: 1px solid rgba(248,113,113,0.2);
}

.metric-trend-pill.trend-flat {
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ── Latest session detail block ──────────────────────────── */
.prog-latest-detail {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prog-latest-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Session Tracking card header ─────────────────────────── */
.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.btn-view-report {
  padding: 5px 13px;
  border-radius: 8px;
  border: 1.5px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}
.btn-view-report:hover {
  background: var(--accent);
  color: #0c0c1a;
}

/* ── Track Progress full-screen overlay ───────────────────── */
.report-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(5, 5, 20, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 16px 40px;
  overflow-y: auto;
  animation: overlayFadeIn 0.22s ease;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.report-overlay-inner {
  width: 100%;
  max-width: 860px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  animation: overlaySlideIn 0.22s ease;
}

@keyframes overlaySlideIn {
  from { transform: translateY(18px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.report-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  position: sticky;
  top: 0;
  z-index: 1;
}

.report-overlay-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Sora', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.report-overlay-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.report-overlay-close:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

.report-overlay-body {
  padding: 20px 24px 32px;
}

/* ── Report exercise section ──────────────────────────────── */
.report-ex-section {
  margin-bottom: 28px;
}

.report-ex-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.report-ex-title {
  font-family: 'Sora', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.report-ex-stats {
  display: flex;
  gap: 14px;
  align-items: center;
}

.report-ex-stat {
  font-size: 0.75rem;
  color: var(--muted);
}

.report-ex-stat strong {
  color: var(--text);
  font-size: 0.88rem;
}

/* ── Report attempt row ───────────────────────────────────── */
.report-attempt {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.report-attempt-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.report-attempt-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.report-score-badge {
  font-size: 1.05rem;
  font-weight: 700;
  min-width: 34px;
  text-align: center;
}

.report-attempt-date {
  font-size: 0.78rem;
  color: var(--muted);
}

.report-attempt-right {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.report-metric {
  font-size: 0.73rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 7px;
  color: var(--muted);
}

.report-metric.good { color: #19d1b5; border-color: rgba(25,209,181,0.2); }

.report-play-perfect {
  padding: 3px 11px;
  border-radius: 6px;
  border: 1.5px solid rgba(25,209,181,0.4);
  background: transparent;
  color: #19d1b5;
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.report-play-perfect:hover:not(:disabled) {
  background: rgba(25,209,181,0.1);
}
.report-play-perfect:disabled {
  opacity: 0.5;
  cursor: default;
}

.report-try-again {
  padding: 3px 11px;
  border-radius: 6px;
  border: 1.5px solid rgba(255,145,111,0.35);
  background: transparent;
  color: var(--accent-2);
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.report-try-again:hover {
  background: rgba(255,145,111,0.08);
}

.report-cents-bar-wrap {
  margin: 4px 0;
}

.report-cents-label {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 3px;
}

.report-cents-bar-bg {
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 4px;
  overflow: hidden;
  max-width: 220px;
}

.report-cents-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #19d1b5, #fbbf24, #f87171);
  transition: width 0.4s ease;
}

.report-coaching {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  font-style: italic;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.report-no-data {
  text-align: center;
  padding: 40px 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.report-overview-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.report-overview-pill {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 90px;
}

.report-overview-val {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.report-overview-lbl {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

/* ══════════════════════════════════════════
   CO-COMPOSER COMING SOON PAGE
══════════════════════════════════════════ */

.cs-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100%;
  padding: 40px 24px 60px;
  position: relative;
  overflow: hidden;
}

/* ── Blurred DAW glimpse ────────────────── */
.cs-daw-glimpse {
  width: 100%;
  max-width: 860px;
  background: rgba(10,12,26,0.7);
  border: 1px solid rgba(153,211,255,0.1);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  margin-bottom: -60px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  pointer-events: none;
  user-select: none;
}

.cs-daw-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(153,211,255,0.08);
  background: rgba(255,255,255,0.025);
}

.cs-meta-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  color: var(--muted);
}

.cs-daw-body {
  display: flex;
  height: 130px;
}

.cs-daw-sidebar {
  width: 130px;
  border-right: 1px solid rgba(153,211,255,0.07);
  display: flex;
  flex-direction: column;
}

.cs-track-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 32.5px;
  font-size: 0.72rem;
  color: var(--muted);
  border-bottom: 1px solid rgba(153,211,255,0.05);
}

.cs-track-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cs-daw-lanes {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cs-lane {
  flex: 1;
  position: relative;
  border-bottom: 1px solid rgba(153,211,255,0.04);
}

.cs-block {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 5px;
}

.cs-chat-glimpse {
  padding: 12px 16px;
  border-top: 1px solid rgba(153,211,255,0.07);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs-bubble {
  max-width: 72%;
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 7px 13px;
  border-radius: 14px;
}

.cs-bubble-ai {
  background: rgba(25,209,181,0.1);
  border: 1px solid rgba(25,209,181,0.18);
  color: var(--text);
  align-self: flex-start;
}

.cs-bubble-user {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--muted);
  align-self: flex-end;
}

/* frosted glass overlay on the DAW glimpse */
.cs-glimpse-frost {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(5px) brightness(0.7);
  background: linear-gradient(to bottom,
    rgba(10,12,26,0.1) 0%,
    rgba(10,12,26,0.6) 60%,
    rgba(10,12,26,0.92) 100%
  );
}

/* ── Coming soon card ───────────────────── */
.cs-card {
  position: relative;
  z-index: 10;
  background: var(--card);
  border: 1px solid rgba(167,139,250,0.22);
  border-radius: 22px;
  padding: 32px 36px 28px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  text-align: center;
}

.cs-card-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #c4b0ff;
  background: rgba(167,139,250,0.12);
  border: 1px solid rgba(167,139,250,0.25);
  border-radius: 20px;
  padding: 3px 12px;
  margin-bottom: 16px;
}

.cs-card-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--text);
  letter-spacing: -0.5px;
}

.cs-card-sub {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
  margin: 0 0 24px;
}

.cs-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cs-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.83rem;
  color: var(--text);
}

.cs-features li svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* ── Notify form ────────────────────────── */
.cs-notify-form {
  display: flex;
  gap: 8px;
}

.cs-notify-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.cs-notify-input:focus {
  border-color: rgba(167,139,250,0.5);
}

.cs-notify-input::placeholder { color: var(--muted); }

.cs-notify-btn {
  background: linear-gradient(135deg, #a78bfa, #7c5cbf);
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.cs-notify-btn:hover { opacity: 0.88; }

.cs-notify-msg {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--accent);
  min-height: 18px;
}

/* ── Journey milestones ──────────────────────────────────────── */
.journey-section {
  margin-top: 14px;
}

.journey-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.journey-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.45);
}

.journey-count {
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 600;
}

.journey-track {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.milestone {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: background 0.2s;
}

.milestone.done {
  background: rgba(25,209,181,0.07);
  border-color: rgba(25,209,181,0.18);
}

.milestone.active {
  background: rgba(251,191,36,0.07);
  border-color: rgba(251,191,36,0.22);
}

.milestone-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.05);
}

.milestone.done .milestone-icon {
  background: #19d1b5;
  border-color: #19d1b5;
  color: #0d1a2e;
}

.milestone.active .milestone-icon {
  background: #fbbf24;
  border-color: #fbbf24;
  color: #0d1a2e;
}

.milestone-body {
  flex: 1;
  min-width: 0;
}

.milestone-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.milestone.done .milestone-label { color: #19d1b5; }
.milestone.active .milestone-label { color: #fbbf24; }

.milestone-sub {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.35);
  margin-top: 1px;
}

.milestone-score {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255,255,255,0.3);
  white-space: nowrap;
}

.milestone.done .milestone-score { color: #19d1b5; }
.milestone.active .milestone-score { color: #fbbf24; }

/* ── Focus recommendation ────────────────────────────────────── */
.focus-section {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(167,139,250,0.08);
  border: 1px solid rgba(167,139,250,0.2);
}

.focus-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #a78bfa;
  margin-bottom: 5px;
}

.focus-body {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.45;
}

.focus-exercise-chip {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(167,139,250,0.15);
  border: 1px solid rgba(167,139,250,0.3);
  font-size: 0.68rem;
  font-weight: 600;
  color: #a78bfa;
  cursor: pointer;
}

.focus-exercise-chip:hover { background: rgba(167,139,250,0.25); }

/* ── Skill gaps ──────────────────────────────────────────────── */
.gap-section {
  margin-top: 12px;
}

.gap-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 8px;
}

.gap-bars {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.gap-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gap-bar-name {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.55);
  width: 90px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gap-bar-track {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
}

.gap-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.gap-bar-val {
  font-size: 0.68rem;
  font-weight: 600;
  width: 30px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Avatar Panel — single slot, swaps persona ─────────────── */
/* Initial opacity/transform are set via JS inline style in _setAvatarState   */
/* so the browser always repaints on change rather than batching class updates */
.avatar-panel {
  position: fixed;
  bottom: 88px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  right: 36px;
  z-index: 902;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px) scale(0.92);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.avatar-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.avatar-ring {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 2.5px solid rgba(255,255,255,0.08);
  box-shadow: 0 2px 14px rgba(0,0,0,0.55);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
  transition: opacity 0.25s ease;
}

/* Raag — teal glow + pulse */
@keyframes avatar-pulse-raag {
  0%   { box-shadow: 0 0 0 0px rgba(25,209,181,0.55), 0 0 16px rgba(25,209,181,0.3); }
  70%  { box-shadow: 0 0 0 9px rgba(25,209,181,0),    0 0 22px rgba(25,209,181,0.2); }
  100% { box-shadow: 0 0 0 0px rgba(25,209,181,0),    0 0 16px rgba(25,209,181,0.3); }
}

/* Swara — purple glow + pulse */
@keyframes avatar-pulse-swara {
  0%   { box-shadow: 0 0 0 0px rgba(167,139,250,0.55), 0 0 16px rgba(167,139,250,0.3); }
  70%  { box-shadow: 0 0 0 9px rgba(167,139,250,0),    0 0 22px rgba(167,139,250,0.2); }
  100% { box-shadow: 0 0 0 0px rgba(167,139,250,0),    0 0 16px rgba(167,139,250,0.3); }
}

.avatar-ring[data-persona="raag"] {
  border-color: #19d1b5;
  animation: avatar-pulse-raag 1.8s ease-out infinite;
}

.avatar-ring[data-persona="swara"] {
  border-color: #a78bfa;
  animation: avatar-pulse-swara 1.8s ease-out infinite;
}

/* Speaking — brighter, faster pulse */
.avatar-ring[data-state="speaking"] {
  animation-duration: 0.9s;
  filter: brightness(1.15);
}

.avatar-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.05em;
}

.avatar-state-label {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .avatar-panel { bottom: 84px; right: 14px; }
  .avatar-ring  { width: 52px; height: 52px; }
  .ask-raag-fab { bottom: 20px; right: 16px; width: 46px; height: 46px; }
  .ask-raag-fab-img { width: 30px; height: 30px; }
}

/* ═══════════════════════════════════════════
   STEP ROUTER — multi-step journey UI
═══════════════════════════════════════════ */

.step-router {
  position: relative;
  min-height: calc(100vh - 56px);
  min-height: calc(100dvh - 56px);
}

.step-screen {
  display: none;
  min-height: calc(100vh - 56px);
  min-height: calc(100dvh - 56px);
  animation: stepFadeIn 0.3s ease;
}

.step-screen.active {
  display: block;
}

@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Shared layout containers ── */

.step-centered-wrap {
  max-width: 580px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.step-results-wrap {
  max-width: 720px;
}

.step-nav-row {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.step-back-btn {
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.15s;
  flex-shrink: 0;
}
.step-back-btn:hover { color: var(--text); }

.step-dots {
  display: flex;
  gap: 7px;
  margin-left: auto;
}

.sdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(153, 211, 255, 0.18);
  transition: background 0.3s;
}
.sdot.active   { background: var(--accent); }
.sdot.complete { background: rgba(25, 209, 181, 0.45); }

/* ── Step card ── */

.step-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  margin-top: 8px;
}

.step-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--accent);
  background: rgba(25, 209, 181, 0.09);
  border: 1px solid rgba(25, 209, 181, 0.22);
  border-radius: 20px;
  padding: 3px 11px;
  margin-bottom: 14px;
}

.step-card-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.2;
  color: var(--text);
}

.step-card-sub {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 24px;
}

/* ── Step buttons ── */

.btn-step-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 24px;
  background: var(--accent);
  color: #051019;
  border: none;
  border-radius: 12px;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  text-align: center;
}
.btn-step-primary:hover  { opacity: 0.87; }
.btn-step-primary:active { transform: scale(0.98); }
.btn-step-primary.btn-step-lg { padding: 16px 32px; font-size: 1.06rem; }

.btn-step-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 11px 20px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.btn-step-ghost:hover { color: var(--text); border-color: rgba(153, 211, 255, 0.32); }

.btn-step-record {
  padding: 13px 32px;
  background: rgba(25, 209, 181, 0.1);
  border: 1px solid rgba(25, 209, 181, 0.3);
  border-radius: 50px;
  color: var(--accent);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-step-record:hover { background: rgba(25, 209, 181, 0.18); }
.btn-step-record:disabled { opacity: 0.55; cursor: default; }
.btn-step-record.is-recording {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
  animation: pulse-record-btn 1.2s ease-in-out infinite;
}
@keyframes pulse-record-btn {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.65; }
}

.btn-step-stop {
  padding: 13px 32px;
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.28);
  border-radius: 50px;
  color: var(--danger);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-step-stop:disabled { opacity: 0.3; cursor: default; }
.btn-step-stop:not(:disabled):hover { background: rgba(255, 107, 107, 0.16); }

.btn-inline-link {
  background: none;
  border: none;
  color: var(--accent);
  font: inherit;
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── STEP: Welcome ── */

.step-welcome-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px);
  min-height: calc(100dvh - 56px);
  padding: 40px 24px;
}

.step-welcome-content {
  max-width: 520px;
  text-align: center;
}

.step-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 20px;
}

.step-welcome-title {
  font-family: 'Sora', sans-serif;
  font-size: 2.7rem;
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 18px;
}
.step-welcome-title em {
  color: var(--accent);
  font-style: normal;
}

.step-welcome-sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 28px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.step-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
}

.step-pill {
  padding: 5px 14px;
  background: rgba(153, 211, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 50px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.step-signin-prompt {
  margin: 14px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ── STEP: Theory ── */

/* ── Theory step: Raag speaker block ─────────────────────────────── */
.theory-speaker {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(25, 209, 181, 0.06);
  border: 1px solid rgba(25, 209, 181, 0.18);
  border-radius: 12px;
  margin-bottom: 18px;
}

.theory-speaker-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 2px solid rgba(25, 209, 181, 0.3);
  box-shadow: 0 0 8px rgba(25, 209, 181, 0.12);
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.theory-speaker-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
}

.theory-speaker-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.theory-speaker-name {
  font-weight: 600;
  color: #e2e8f0;
  font-size: 0.95rem;
}

.theory-speaker-role {
  font-size: 0.78rem;
  color: rgba(25, 209, 181, 0.65);
}

/* Sound-wave bars — hidden until Raag speaks */
.theory-speaker-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.theory-speaker-wave span {
  display: block;
  width: 3px;
  background: rgba(25, 209, 181, 0.8);
  border-radius: 2px;
  animation: theory-wave 0.8s ease-in-out infinite;
}
.theory-speaker-wave span:nth-child(1) { height: 8px;  animation-delay: 0s; }
.theory-speaker-wave span:nth-child(2) { height: 14px; animation-delay: 0.15s; }
.theory-speaker-wave span:nth-child(3) { height: 8px;  animation-delay: 0.3s; }

@keyframes theory-wave {
  0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
  50%       { transform: scaleY(1.2); opacity: 1; }
}

/* Activate ring glow + wave when Raag is speaking (body class set by _setAvatarState) */
body.persona-raag-speaking .theory-speaker-ring {
  animation: avatar-pulse-raag 1.5s infinite;
  border-color: rgba(25, 209, 181, 0.85);
  box-shadow: 0 0 14px rgba(25, 209, 181, 0.3);
}

body.persona-raag-speaking .theory-speaker-wave {
  opacity: 1;
}

.theory-main-block {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: rgba(25, 209, 181, 0.05);
  border: 1px solid rgba(25, 209, 181, 0.14);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 20px;
}

.theory-visual {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
}

.theory-concept {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
}

.theory-concept strong { color: var(--accent); }

.theory-fact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.theory-fact {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.4;
}

.theory-fact-icon { flex-shrink: 0; }

/* ── STEP: Baseline / Record — mic ring ── */

.step-mic-wrap {
  display: flex;
  justify-content: center;
  margin: 28px 0;
}

.step-mic-ring {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 2px solid rgba(25, 209, 181, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.step-mic-ring[data-state="ready"] {
  border-color: var(--accent);
  box-shadow: 0 0 22px rgba(25, 209, 181, 0.28);
}

.step-mic-ring[data-state="recording"] {
  border-color: var(--danger);
  animation: micRecordPulse 1.1s ease-in-out infinite;
}

@keyframes micRecordPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4); }
  50%       { box-shadow: 0 0 0 16px rgba(255, 107, 107, 0); }
}

.step-mic-pulse {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(25, 209, 181, 0.12);
  animation: micIdle 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes micIdle {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50%       { opacity: 0.7;  transform: scale(1.04); }
}

.step-mic-icon {
  width: 46px;
  height: 46px;
  color: var(--accent);
  transition: color 0.3s;
}

.step-mic-ring[data-state="recording"] .step-mic-icon { color: var(--danger); }

.step-status-area { text-align: center; }

.step-status {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
  min-height: 24px;
  transition: color 0.3s;
}

.step-note-display {
  font-family: 'Sora', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  min-height: 52px;
  margin-top: 6px;
}

/* ── STEP: Voice Profile ── */

.step-profile-cta-block {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.step-cta-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 18px;
  line-height: 1.5;
}

.step-secondary-action {
  margin: 14px 0 0;
  font-size: 0.85rem;
}
.step-secondary-action a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── STEP: Dashboard ── */

.step-dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px 28px 60px;
  min-height: calc(100vh - 56px);
  min-height: calc(100dvh - 56px);
  align-items: start;
}

@media (max-width: 880px) {
  .step-dashboard-layout { grid-template-columns: 1fr; }
}

.step-dash-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step-dash-greeting {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.step-dash-hello {
  font-family: 'Sora', sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.step-dash-level {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--accent);
  background: rgba(25, 209, 181, 0.1);
  border: 1px solid rgba(25, 209, 181, 0.25);
  border-radius: 50px;
  padding: 4px 13px;
}

.step-today-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
}

.step-today-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--accent);
  margin-bottom: 10px;
}

.step-today-exercise {
  font-family: 'Sora', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.step-today-why {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 6px;
}

.step-today-meta {
  font-size: 0.8rem;
  color: rgba(153, 211, 255, 0.45);
}

.step-dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.step-stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 12px;
  text-align: center;
}

.step-stat-val {
  font-family: 'Sora', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
}

.step-stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: 3px;
}

.step-dash-side {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  position: sticky;
  top: 76px;
}

/* ── STEP: Exercise Select ── */

.step-exercise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.step-ex-card {
  background: rgba(153, 211, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: left;
}

.step-ex-card:hover {
  border-color: rgba(25, 209, 181, 0.38);
  background: rgba(25, 209, 181, 0.06);
}

.step-ex-card.selected {
  border-color: var(--accent);
  background: rgba(25, 209, 181, 0.1);
}

.step-ex-card.ex-locked {
  opacity: 0.55;
  cursor: not-allowed;
}
.step-ex-card.ex-locked:hover {
  border-color: var(--line);
  background: rgba(153, 211, 255, 0.03);
}

.ex-level-tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.7;
  vertical-align: middle;
  margin-left: 4px;
}
.ex-lock-row {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 6px;
}
.ex-lock-reason {
  color: rgba(255,255,255,0.45);
  font-style: italic;
}

.step-ex-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 5px;
}

.step-ex-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ── STEP: Pre-briefing ── */

.step-theory-block {
  background: rgba(25, 209, 181, 0.05);
  border: 1px solid rgba(25, 209, 181, 0.14);
  border-radius: 14px;
  padding: 20px;
  font-size: 0.96rem;
  line-height: 1.7;
  color: var(--text);
  min-height: 80px;
  margin-top: 14px;
}

.step-theory-loading {
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
}

.prebrief-note-row {
  margin-top: 20px;
}

.prebrief-note-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.prebrief-note-label {
  font-size: 0.88rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.prebrief-note-select {
  width: auto;
  max-width: 160px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

/* ── STEP: Record ── */

.step-record-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  margin-top: 8px;
  text-align: center;
}

.step-record-exercise-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: auto;
}

.step-record-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.step-upload-details {
  margin-top: 24px;
  text-align: left;
}

/* ── Progress Screen ────────────────────────────────────────────────────── */
.pg-toggle-row {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.pg-toggle {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.pg-toggle.active,
.pg-toggle:hover { background: rgba(25,209,181,0.12); color: #19d1b5; border-color: #19d1b5; }

.pg-insight {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 8px 0 14px;
  padding: 10px 14px;
  background: rgba(25,209,181,0.06);
  border-left: 3px solid #19d1b5;
  border-radius: 0 8px 8px 0;
}

.pg-chart-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}
.pg-chart-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 10px;
}
.pg-canvas {
  width: 100%;
  height: 160px;
  display: block;
}

.pg-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 10px;
}
.pg-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--muted);
}
.pg-legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pg-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.pg-ex-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pg-ex-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pg-ex-info { flex: 1; min-width: 0; }
.pg-ex-name { font-size: 0.82rem; font-weight: 600; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-ex-meta { font-size: 0.7rem; color: var(--muted); margin-top: 1px; }
.pg-ex-score { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.pg-ex-avg   { font-size: 1rem; font-weight: 700; color: var(--fg); }
.pg-ex-trend { font-size: 0.78rem; font-weight: 700; }
.pg-up   { color: #19d1b5; }
.pg-down { color: #e05c5c; }
.pg-flat { color: var(--muted); }
.pg-empty { font-size: 0.85rem; color: var(--muted); text-align: center; padding: 20px 0; grid-column: 1/-1; }

/* ── Streak Card ────────────────────────────────────────────────────────── */
.streak-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px 12px;
  margin-bottom: 14px;
}
.streak-main {
  display: flex;
  align-items: center;
  gap: 10px;
}
.streak-flame {
  font-size: 1.6rem;
  line-height: 1;
  transition: opacity 0.3s;
}
.streak-info { flex: 1; }
.streak-count {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
}
.streak-count span { font-size: 1.4rem; }
.streak-best { font-size: 0.73rem; color: var(--muted); margin-top: 1px; }

.streak-reminder-btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--muted);
  transition: border-color 0.15s, color 0.15s;
}
.streak-reminder-btn:hover { border-color: var(--accent); color: var(--fg); }

.streak-calendar {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
}
.streak-day { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.streak-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--line);
  transition: background 0.2s;
}
.streak-day.day-done .streak-dot  { background: #19d1b5; border-color: #19d1b5; }
.streak-day.day-today .streak-dot { box-shadow: 0 0 0 2px rgba(25,209,181,0.35); }
.streak-day-label { font-size: 0.62rem; color: var(--muted); }
.streak-day.day-today .streak-day-label { color: #19d1b5; font-weight: 700; }

.streak-reminder-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.streak-reminder-label { font-size: 0.8rem; color: var(--muted); }
.streak-time-input {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--fg);
  font-size: 0.85rem;
  padding: 5px 8px;
  color-scheme: dark;
}
.btn-streak-save {
  background: rgba(25,209,181,0.12);
  border: 1px solid #19d1b5;
  border-radius: 7px;
  color: #19d1b5;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 12px;
  cursor: pointer;
}

/* ── In-app toast ───────────────────────────────────────────────────────── */
.swara-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--fg);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  z-index: 9999;
  white-space: nowrap;
}
.swara-toast button {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 2px;
}

/* ── Daily Drill Cards ──────────────────────────────────────────────────── */
.dash-drill-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.dash-drill-loading {
  color: var(--muted);
  font-size: 0.85rem;
  padding: 8px 0;
}
.dash-drill-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.2s, opacity 0.2s;
}
.dash-drill-card.drill-done { opacity: 0.6; }
.dash-drill-card:not(.drill-done):hover { border-color: var(--accent); }

.dash-drill-index {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  min-width: 18px;
  text-align: center;
}
.dash-drill-info { flex: 1; min-width: 0; }
.dash-drill-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.dash-drill-note {
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(25,209,181,0.12);
  color: #19d1b5;
  border-radius: 5px;
  padding: 1px 6px;
  letter-spacing: 0.03em;
}
.dash-drill-meta {
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-drill-acc {
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 4px;
  padding: 1px 6px;
}
.dash-drill-acc.acc-good { background: rgba(25,209,181,0.12); color: #19d1b5; }
.dash-drill-acc.acc-mid  { background: rgba(245,166,35,0.12);  color: #f5a623; }
.dash-drill-acc.acc-low  { background: rgba(224,92,92,0.12);   color: #e05c5c; }
.dash-drill-acc.acc-new  { background: rgba(255,255,255,0.07); color: var(--muted); }
.dash-drill-done {
  font-size: 0.75rem;
  color: #19d1b5;
}
.btn-drill-start {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--fg);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn-drill-start:hover {
  background: rgba(25,209,181,0.1);
  border-color: #19d1b5;
  color: #19d1b5;
}

/* ── Micro-feedback block ───────────────────────────────────────────────── */
.micro-feedback-block {
  margin-top: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
}
.micro-fb-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 10px;
}
.micro-fb-row {
  display: grid;
  grid-template-columns: 44px 68px 36px 1fr;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.micro-fb-row:last-child { border-bottom: none; }

.micro-fb-note {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--fg);
}
.micro-fb-dir {
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 5px;
  padding: 2px 7px;
  text-align: center;
}
.micro-fb-dir.fb-flat  { background: rgba(224,92,92,0.12);  color: #e05c5c; }
.micro-fb-dir.fb-sharp { background: rgba(245,166,35,0.12); color: #f5a623; }

.micro-fb-cents {
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.micro-fb-tip {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Drill Session ──────────────────────────────────────────────────────── */
.drill-session-card,
.drill-eval-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 28px 24px;
  margin-top: 8px;
  text-align: center;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}
.drill-goal-header { margin-bottom: 14px; }
.drill-goal-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
}
.drill-goal-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
}
.drill-raag-says {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
  text-align: left;
  font-size: 0.84rem;
}
.drill-raag-label {
  font-weight: 700;
  color: #19d1b5;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.drill-raag-text {
  color: var(--fg);
  opacity: 0.9;
  line-height: 1.7;
}
.drill-raag-text strong {
  color: #fff;
  font-weight: 600;
}
.drill-raag-section {
  margin-bottom: 8px;
}
.drill-raag-section:last-child { margin-bottom: 0; }
.drill-raag-step {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}
.drill-raag-step-num {
  color: #19d1b5;
  font-weight: 700;
  min-width: 18px;
  flex-shrink: 0;
}
.drill-raag-step-text { flex: 1; }

/* Rep row */
.drill-rep-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}
.drill-rep-label { font-size: 0.72rem; color: var(--muted); }
.drill-rep-counter { font-size: 0.9rem; font-weight: 700; color: var(--fg); min-width: 42px; }
.drill-rep-dots { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.drill-rep-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--line);
  transition: background 0.2s;
}
.drill-rep-dot.dot-done   { background: #19d1b5; border-color: #19d1b5; }
.drill-rep-dot.dot-active { background: rgba(25,209,181,0.3); border-color: #19d1b5; }

/* Phase indicator */
.drill-phase-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
}
.drill-phase-badge {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  border-radius: 8px;
  padding: 5px 14px;
}
.drill-phase-badge.phase-sing { background: rgba(25,209,181,0.15); color: #19d1b5; }
.drill-phase-badge.phase-rest { background: rgba(255,255,255,0.07); color: var(--muted); }
.drill-phase-timer {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--fg);
  min-width: 52px;
  font-variant-numeric: tabular-nums;
}

.drill-controls { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 18px; }

.drill-health-warn {
  background: rgba(245,166,35,0.12);
  border: 1px solid rgba(245,166,35,0.35);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.83rem;
  color: #f5a623;
  margin-top: 12px;
}

/* Dashboard drill card Raag quote line */
.dash-drill-raag-line {
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

/* Drill evaluation */
.drill-eval-instruction {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 10px 0 4px;
}
.drill-eval-result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  padding: 16px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
}
.eval-score-prev, .eval-score-now {
  text-align: center;
}
.eval-score-prev span, .eval-score-now span {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--fg);
}
.eval-score-label { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.eval-arrow {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--muted);
}
.eval-arrow.arrow-up   { color: #19d1b5; }
.eval-arrow.arrow-down { color: #e05c5c; }
.drill-eval-verdict {
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--fg);
  line-height: 1.5;
}
.eval-extra-metrics {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}
.eval-extra-metric {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
  min-width: 100px;
  flex: 1;
}
.eval-extra-val {
  font-size: 1.3rem;
  font-weight: 700;
  color: #19d1b5;
  line-height: 1;
}
.eval-extra-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fg);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.eval-extra-tip {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.4;
}

/* ── Pitch Meter ────────────────────────────────────────────────────────── */
.pm-meter {
  margin: 20px auto 4px;
  max-width: 380px;
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px 14px;
  text-align: center;
  transition: border-color 0.25s;
}
.pm-meter[data-state="on"]    { border-color: #19d1b5; }
.pm-meter[data-state="close"] { border-color: #f5a623; }
.pm-meter[data-state="off"]   { border-color: #e05c5c; }

.pm-note-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}
.pm-note-label {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
  min-width: 52px;
  text-align: right;
}
.pm-cents {
  font-size: 0.9rem;
  color: var(--muted);
  min-width: 52px;
  text-align: left;
}

.pm-track { margin-bottom: 10px; }
.pm-track-inner {
  position: relative;
  height: 10px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
}
.pm-center-mark {
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 2px;
  background: rgba(255,255,255,0.25);
  transform: translateX(-50%);
}
.pm-needle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--muted);
  transition: left 0.08s linear, background 0.2s;
  box-shadow: 0 0 6px rgba(0,0,0,0.5);
}
.pm-meter[data-state="on"]    .pm-needle { background: #19d1b5; box-shadow: 0 0 8px #19d1b580; }
.pm-meter[data-state="close"] .pm-needle { background: #f5a623; box-shadow: 0 0 8px #f5a62380; }
.pm-meter[data-state="off"]   .pm-needle { background: #e05c5c; box-shadow: 0 0 8px #e05c5c80; }

.pm-track-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.68rem;
  color: var(--muted);
  opacity: 0.7;
}

.pm-status {
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 2px;
  letter-spacing: 0.01em;
}
.pm-idle  { color: var(--muted); }
.pm-on    { color: #19d1b5; }
.pm-close { color: #f5a623; }
.pm-off   { color: #e05c5c; }

.pm-target-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
}
.pm-target-label { color: var(--muted); }
.pm-diff-val { font-weight: 600; }
.pm-diff-val.pm-on    { color: #19d1b5; }
.pm-diff-val.pm-close { color: #f5a623; }
.pm-diff-val.pm-off   { color: #e05c5c; }

.step-upload-details summary {
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

/* Hidden form elements — preserved for JS, never shown */
.legacy-form-host {
  display: none !important;
}

/* ── Pitch timeline chart ── */
.pitch-chart-wrap {
  margin-top: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px 6px;
}
.pitch-chart-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.pitch-chart-canvas {
  width: 100%;
  height: 110px;
  display: block;
  border-radius: 6px;
}

/* ── Pitch event rows ── */
.pitch-events-wrap { margin-top: 12px; }
.pitch-events-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.pitch-event-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 8px;
  margin-bottom: 5px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
}
.ev-time  { font-weight: 700; color: var(--accent); min-width: 30px; }
.ev-dir   { font-weight: 600; }
.ev-flat  .ev-dir  { color: #ef4444; }
.ev-sharp .ev-dir  { color: #f97316; }
.ev-cents { color: var(--muted); font-size: 0.75rem; }
.ev-badge {
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 600;
}
.ev-recovered { background: rgba(34,197,94,0.18); color: #22c55e; }
.ev-missed    { background: rgba(239,68,68,0.15);  color: #ef4444; }
.ev-tip  {
  color: var(--muted);
  font-size: 0.73rem;
  width: 100%;
  padding-top: 2px;
}

/* ── Logout feedback modal ── */
.logout-fb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.logout-fb-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 28px 28px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.55);
}

.logout-fb-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
}

.logout-fb-sub {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 20px;
}

/* ── STEP: Results ── */

.step-results-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  margin-top: 8px;
}

.step-results-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.step-results-actions .btn-step-ghost,
.step-results-actions .btn-step-primary {
  flex: 1;
}

/* ── Recording card (baseline step) ── */

.step-recording-card {
  text-align: center;
}

/* ── Raag singing visual ── */

.raag-sing-wrap {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: stepFadeIn 0.25s ease;
}

.raag-sing-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  opacity: 0.75;
}

.ref-tone-note {
  font-family: 'Sora', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  text-shadow: 0 0 24px rgba(25, 209, 181, 0.5);
}

.raag-sing-canvas {
  width: 280px;
  height: 48px;
  display: block;
  border-radius: 8px;
  background: rgba(25, 209, 181, 0.04);
  border: 1px solid rgba(25, 209, 181, 0.12);
}

/* ── Ask Raag floating panel ─────────────────────────────────────────────── */
.ask-raag-fab {
  position: fixed;
  bottom: 28px;
  bottom: calc(28px + env(safe-area-inset-bottom));
  right: 28px;
  z-index: 900;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 36, 0.9);
  border: 1.5px solid rgba(25, 209, 181, 0.3);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.45);
  backdrop-filter: blur(12px);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
  user-select: none;
}
.ask-raag-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(0,0,0,0.55);
  border-color: rgba(25,209,181,0.55);
}
.ask-raag-fab-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.ask-raag-fab-label { display: none; }

.ask-raag-panel {
  position: fixed;
  bottom: 90px;
  right: 28px;
  z-index: 901;
  width: 340px;
  max-height: 480px;
  display: flex;
  flex-direction: column;
  background: rgba(16, 16, 28, 0.96);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.55);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.ask-raag-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.ask-raag-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.ask-raag-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Sora', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}
.ask-raag-panel-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(25,209,181,0.35);
}
.ask-raag-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s;
}
.ask-raag-close:hover { color: #fff; }

.ask-raag-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ask-raag-msg {
  max-width: 88%;
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 0.84rem;
  line-height: 1.5;
  font-family: 'Manrope', sans-serif;
}
.ask-raag-msg-raag {
  align-self: flex-start;
  background: rgba(25,209,181,0.1);
  border: 1px solid rgba(25,209,181,0.2);
  color: rgba(255,255,255,0.88);
  border-bottom-left-radius: 4px;
}
.ask-raag-msg-user {
  align-self: flex-end;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.75);
  border-bottom-right-radius: 4px;
}
.ask-raag-msg-thinking {
  align-self: flex-start;
  color: rgba(255,255,255,0.4);
  font-style: italic;
  font-size: 0.8rem;
  background: none;
  border: none;
  padding: 4px 0;
}

.ask-raag-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.ask-raag-input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 9px 14px;
  font-size: 0.84rem;
  font-family: 'Manrope', sans-serif;
  color: #fff;
  outline: none;
  transition: border-color 0.15s;
}
.ask-raag-input:focus { border-color: rgba(25,209,181,0.45); }
.ask-raag-input::placeholder { color: rgba(255,255,255,0.3); }
.ask-raag-send {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: #19d1b5;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #0d1117;
  transition: background 0.15s, transform 0.1s;
}
.ask-raag-send:hover { background: #1ef0d0; transform: scale(1.05); }
.ask-raag-send:active { transform: scale(0.95); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE LAYOUT — tablet (≤768px) and mobile (≤480px)
═══════════════════════════════════════════════════════════ */

/* Hamburger button — hidden on desktop */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  color: var(--text);
  transition: color 0.15s;
}
.nav-hamburger:hover { color: var(--accent); }
.nav-hamburger svg { display: block; }

/* Mobile brand shown in topbar */
.topbar-brand {
  display: none;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.4px;
  flex: 1;
  padding-left: 10px;
}
.topbar-brand .brand-swara { color: var(--accent); }
.topbar-brand .brand-ai    { color: var(--text); opacity: 0.6; }

/* Mobile backdrop overlay (behind open sidebar) */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 499;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.sidebar-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Tablet breakpoint ≤768px ─────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-200px);
    transition: transform 0.25s ease;
    z-index: 600;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  }
  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: block;
  }

  .topbar {
    left: 0;
    justify-content: flex-start;
    padding: 0 16px;
    gap: 0;
  }
  .topbar-brand { display: block; }
  .topbar-right  { margin-left: auto; }

  .nav-hamburger { display: flex; }

  .main-content {
    margin-left: 0;
  }

  /* Step screens: tighter horizontal padding */
  .step-centered-wrap {
    padding: 24px 16px 60px;
  }
  .step-card {
    padding: 24px 20px;
  }
  .step-welcome-wrap {
    padding: 32px 16px;
  }

  /* Dashboard layout: single column (also covered at 880px but ensure 0 margin) */
  .step-dashboard-layout {
    padding: 20px 16px 48px;
    gap: 20px;
  }

  /* Ask Raag panel: full-width on tablet */
  .ask-raag-panel {
    width: min(420px, calc(100vw - 24px));
    right: 12px;
  }

  /* Progress page padding */
  .step-centered-wrap.step-results-wrap {
    max-width: 100%;
  }
}

/* ── Mobile breakpoint ≤480px ─────────────────────────────── */
@media (max-width: 480px) {
  /* Typography scale-down */
  .step-welcome-title  { font-size: 1.9rem; }
  .step-card-title     { font-size: 1.3rem; }
  .step-dash-hello     { font-size: 1.45rem; }

  /* Cards */
  .step-card           { padding: 20px 16px; border-radius: 18px; }
  .step-centered-wrap  { padding: 16px 12px 60px; }

  /* Pill row wraps nicely */
  .step-pill-row       { gap: 6px; }

  /* Stat grid: 2 cols on very small screens */
  .step-dash-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Ask Raag panel: full width with small margin */
  .ask-raag-panel {
    width: calc(100vw - 16px);
    right: 8px;
    bottom: 80px;
    border-radius: 18px;
  }

  /* Modal cards: full width */
  .modal-card {
    width: calc(100vw - 32px);
    padding: 24px 20px;
    max-height: 90vh;
    overflow-y: auto;
  }

  /* Topbar brand slightly smaller */
  .topbar-brand { font-size: 0.9rem; }

  /* Mic ring smaller on tiny screens */
  .step-mic-ring { width: 88px; height: 88px; }
  .step-mic-icon { width: 32px; height: 32px; }

  /* Exercise grid: single column */
  .step-exercise-grid  { grid-template-columns: 1fr; }

  /* Drill session card padding */
  .drill-session-card  { padding: 20px 16px; }
  .drill-eval-card     { padding: 20px 16px; }

  /* Prebrief note row stacks */
  .prebrief-note-row   { flex-direction: column; gap: 10px; }
  .prebrief-note-group { flex-direction: column; gap: 6px; }
}

/* ── iOS / mobile safe-area & scroll fixes ───────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .main-content {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Prevent horizontal scroll from any overflowing child */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Ensure modals and overlays sit within viewport on mobile */
@media (max-width: 480px) {
  .modal-card {
    max-height: calc(100dvh - 32px);
  }
  .ask-raag-panel {
    max-height: calc(100dvh - 120px);
  }
}

/* ── Analysis Fact Overlay ─────────────────────────────────────────────────── */
.analysis-fact-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(10, 8, 20, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.analysis-fact-overlay.active {
  display: flex;
}
.analysis-fact-card {
  background: linear-gradient(145deg, #1a1630 0%, #12102a 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 24px;
  padding: 36px 32px 28px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(139, 92, 246, 0.1);
  animation: factCardIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes factCardIn {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.analysis-fact-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.analysis-fact-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-top-color: #8b5cf6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.analysis-fact-badge {
  display: inline-block;
  background: rgba(139, 92, 246, 0.18);
  color: #a78bfa;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  margin-bottom: 14px;
  transition: opacity 0.3s;
}
.analysis-fact-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 10px;
}
.analysis-fact-text {
  font-size: 1.08rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.88);
  margin: 0 0 24px;
  min-height: 80px;
  transition: opacity 0.4s, transform 0.4s;
}
.analysis-fact-text.fade-out {
  opacity: 0;
  transform: translateY(8px);
}
.analysis-fact-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.analysis-fact-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  transition: background 0.3s;
}
.analysis-fact-dot.active {
  background: #8b5cf6;
}
@media (max-width: 480px) {
  .analysis-fact-card {
    padding: 28px 20px 22px;
    border-radius: 18px;
  }
  .analysis-fact-text {
    font-size: 0.97rem;
  }
}
