/* ==========================================================================
   ALIGNED V2 ALPHA — Design System
   Palette:  #0A0A0F bg · #121018 raised · #8B5CF6 violet · #C4B5FD violet-light
             #6D28D9 violet-deep · #F5A524 amber (growth accent, used sparingly)
   Type:     Space Grotesk (display) · Inter (body) · JetBrains Mono (data)
   ========================================================================== */

:root {
  --bg: #0a0a0f;
  --bg-raised: #121018;
  --bg-raised-2: #17141f;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-soft: rgba(255, 255, 255, 0.05);

  --violet-300: #c4b5fd;
  --violet-400: #a78bfa;
  --violet-500: #8b5cf6;
  --violet-600: #7c3aed;
  --violet-700: #6d28d9;
  --amber-400: #f5a524;

  --text-primary: #f6f4fc;
  --text-secondary: #c9c5d6;
  --text-muted: #8f8aa3;
  --text-faint: #605c72;

  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-glow: 0 0 0 1px rgba(139, 92, 246, 0.15), 0 8px 40px rgba(139, 92, 246, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image: radial-gradient(circle at 15% 0%, rgba(139, 92, 246, 0.14), transparent 45%),
    radial-gradient(circle at 85% 100%, rgba(109, 40, 217, 0.12), transparent 40%);
  background-attachment: fixed;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

button,
input {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--violet-400);
  outline-offset: 2px;
  border-radius: 6px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  line-height: 1.55;
}

.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------------- Glass surface ---------------- */

.glass {
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* ---------------- Buttons ---------------- */

.btn {
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--violet-500), var(--violet-700));
  color: #fff;
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(139, 92, 246, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--surface-strong);
  color: var(--text-primary);
}

.btn-lg {
  padding: 15px 32px;
  font-size: 1.02rem;
}

.btn-block {
  width: 100%;
}

.btn-send {
  flex-shrink: 0;
}

.btn-photo {
  position: relative;
}

/* ---------------- Header ---------------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, rgba(10, 10, 15, 0.92), rgba(10, 10, 15, 0.6));
  backdrop-filter: blur(10px);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.wordmark-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet-300), var(--violet-600));
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.8);
}

.wordmark-alpha {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.demo-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.demo-toggle input {
  display: none;
}

.toggle-track {
  width: 34px;
  height: 19px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  position: relative;
  transition: background 0.2s var(--ease);
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

.demo-toggle input:checked + .toggle-track {
  background: rgba(139, 92, 246, 0.35);
  border-color: var(--violet-500);
}

.demo-toggle input:checked + .toggle-track .toggle-thumb {
  transform: translateX(15px);
  background: var(--violet-300);
  box-shadow: 0 0 8px rgba(196, 181, 253, 0.8);
}

.avatar {
  --hue: 271;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
  background: linear-gradient(135deg, hsl(var(--hue), 85%, 68%), hsl(calc(var(--hue) + 30), 70%, 40%));
  flex-shrink: 0;
}

.avatar-sm {
  width: 30px;
  height: 30px;
  font-size: 0.7rem;
}

.avatar-md {
  width: 48px;
  height: 48px;
  font-size: 1rem;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 1.3rem;
}

/* ---------------- Welcome screen ---------------- */

.welcome-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px 60px;
  position: relative;
  gap: 22px;
}

.welcome-glow {
  position: absolute;
  top: 8%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.35), transparent 70%);
  filter: blur(10px);
  animation: driftGlow 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes driftGlow {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(14px) scale(1.06); }
}

.welcome-title {
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  font-weight: 600;
  max-width: 620px;
  line-height: 1.18;
  z-index: 1;
}

.grad-text {
  background: linear-gradient(120deg, var(--violet-300), var(--violet-500) 60%, var(--violet-700));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.welcome-sub {
  max-width: 460px;
  color: var(--text-secondary);
  font-size: 1rem;
  z-index: 1;
}

.welcome-note {
  color: var(--text-faint);
  font-size: 0.82rem;
  max-width: 380px;
  z-index: 1;
}

/* ---------------- Onboarding chat ---------------- */

.progress-rail {
  height: 3px;
  background: var(--surface);
  position: sticky;
  top: 74px;
  z-index: 15;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--violet-400), var(--violet-600));
  transition: width 0.4s var(--ease);
}

.chat-main {
  flex: 1;
  overflow-y: auto;
  padding: 24px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}

.bubble {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  max-width: 85%;
  animation: bubbleIn 0.35s var(--ease);
}

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

.bubble-ai {
  align-self: flex-start;
}

.bubble-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.bubble-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet-400), var(--violet-700));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
}

.bubble-text {
  padding: 11px 15px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  line-height: 1.5;
}

.bubble-ai .bubble-text {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-bottom-left-radius: 4px;
}

.bubble-user .bubble-text {
  background: linear-gradient(135deg, var(--violet-600), var(--violet-700));
  color: #fff;
  border-bottom-right-radius: 4px;
}

.typing-dots {
  display: flex;
  gap: 4px;
  padding: 15px 15px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.1s infinite ease-in-out;
}

.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat-input-area {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 16px 26px;
}

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

.text-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 13px 18px;
  color: var(--text-primary);
  font-size: 0.94rem;
  transition: border-color 0.15s var(--ease);
}

.text-input:focus {
  border-color: var(--violet-500);
}

.text-input::placeholder {
  color: var(--text-faint);
}

.choice-grid {
  display: grid;
  gap: 9px;
}

.choice-btn {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
}

.choice-btn:hover {
  border-color: var(--violet-500);
  background: rgba(139, 92, 246, 0.1);
  color: var(--text-primary);
  transform: translateX(2px);
}

.photo-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.input-waiting {
  height: 46px;
}

.generating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.pulse-orb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--violet-300), var(--violet-600));
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.6);
  animation: pulseOrb 1.3s ease-in-out infinite;
}

@keyframes pulseOrb {
  0%, 100% { transform: scale(0.85); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
}

/* ---------------- Reveal screen ---------------- */

.reveal-main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 30px 16px 60px;
}

.reveal-card {
  max-width: 560px;
  width: 100%;
  padding: 34px 28px 30px;
  text-align: center;
  animation: revealIn 0.5s var(--ease);
}

@keyframes revealIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.reveal-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--violet-300);
  margin-bottom: 14px;
}

.reveal-avatar {
  width: 74px;
  height: 74px;
  font-size: 1.4rem;
  margin: 0 auto 14px;
}

.reveal-name {
  font-size: 1.5rem;
  font-weight: 600;
}

.coupling-type {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  color: var(--violet-300);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.reveal-bio {
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.reveal-grid {
  margin-top: 26px;
  display: grid;
  gap: 14px;
  text-align: left;
}

.reveal-block {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.reveal-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.reveal-value {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.reveal-card .btn {
  margin-top: 28px;
}

/* ---------------- Dashboard ---------------- */

.dashboard-main {
  flex: 1;
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px 70px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* --- Signature element: Resonance Preference --- */

.resonance-panel {
  padding: 22px 22px 26px;
}

.resonance-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.resonance-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}

.resonance-sub {
  color: var(--text-muted);
  font-size: 0.84rem;
  margin-top: 4px;
  max-width: 380px;
}

.resonance-readout {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--violet-300);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.resonance-slider-wrap {
  position: relative;
  padding-top: 4px;
}

.resonance-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--violet-500) 0%, var(--violet-300) 22%, #6b6478 50%, var(--amber-400) 78%, #f5a524 100%);
  outline: none;
  cursor: pointer;
}

.resonance-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--violet-300) 45%, var(--violet-600));
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.18), 0 2px 14px rgba(139, 92, 246, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.8);
  cursor: grab;
  transition: transform 0.12s var(--ease);
}

.resonance-slider::-webkit-slider-thumb:active {
  transform: scale(1.12);
  cursor: grabbing;
}

.resonance-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--violet-300) 45%, var(--violet-600));
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.18), 0 2px 14px rgba(139, 92, 246, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.8);
  cursor: grab;
}

.resonance-slider::-moz-range-track {
  height: 8px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--violet-500) 0%, var(--violet-300) 22%, #6b6478 50%, var(--amber-400) 78%, #f5a524 100%);
}

.resonance-endlabels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-faint);
}

.resonance-endlabels span:nth-child(2) {
  flex: 1;
  text-align: center;
}

/* --- Matches --- */

.matches-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.matches-heading h2 {
  font-size: 1.15rem;
  font-weight: 600;
}

.matches-count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
  transition: opacity 0.2s var(--ease);
}

.match-grid.loading {
  opacity: 0.5;
}

.match-card {
  padding: 18px;
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  animation: cardIn 0.4s var(--ease) both;
  animation-delay: var(--fade-delay, 0ms);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.match-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: var(--shadow-glow);
}

.match-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.match-score {
  position: relative;
  width: 46px;
  height: 46px;
}

.score-ring {
  width: 46px;
  height: 46px;
  transform: rotate(-90deg);
}

.score-ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 3;
}

.score-ring-fg {
  fill: none;
  stroke: var(--violet-400);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dasharray 0.5s var(--ease);
}

.score-number {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--text-primary);
}

.match-name {
  font-size: 1.02rem;
  font-weight: 600;
}

.match-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.match-type {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--violet-300);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.match-why {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

.match-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
}

.view-btn {
  margin-top: 4px;
}

.empty-state {
  color: var(--text-faint);
  padding: 40px;
  text-align: center;
  font-size: 0.9rem;
}

/* ---------------- Modal / overlay ---------------- */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 5, 10, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  animation: overlayIn 0.2s var(--ease);
}

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

@media (min-width: 720px) {
  .overlay {
    align-items: center;
  }
}

.modal {
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px 22px 28px;
  position: relative;
  border-radius: 24px 24px 0 0;
  animation: modalIn 0.28s var(--ease);
}

@media (min-width: 720px) {
  .modal {
    border-radius: var(--radius-lg);
  }
}

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

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.modal-header h2 {
  font-size: 1.15rem;
}

.modal-score {
  margin-left: auto;
  text-align: center;
  flex-shrink: 0;
}

.score-number-lg {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--violet-300);
}

.score-label {
  font-size: 0.66rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-bio {
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.insight-grid {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.insight-card {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: var(--surface);
}

.insight-card p {
  color: var(--text-secondary);
  font-size: 0.87rem;
  margin-top: 4px;
}

.insight-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
}

.insight-align { border-left: 3px solid var(--violet-400); }
.insight-diff { border-left: 3px solid var(--amber-400); }
.insight-growth { border-left: 3px solid var(--amber-400); }
.insight-starter { border-left: 3px solid var(--violet-400); }

.env-section {
  margin-top: 22px;
}

.env-grid {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.env-item {
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
}

.env-key {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  color: var(--violet-300);
  margin-bottom: 3px;
}

.env-val {
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.modal-actions {
  margin-top: 22px;
}

/* ---------------- Message drawer ---------------- */

.modal-message {
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

.msg-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 30px;
  font-weight: 600;
}

.demo-pill {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  margin-left: auto;
}

.msg-thread {
  flex: 1;
  overflow-y: auto;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 160px;
  max-height: 40vh;
}

.msg-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.45;
}

.msg-them {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-bottom-left-radius: 4px;
}

.msg-me {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--violet-600), var(--violet-700));
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg-input-row {
  display: flex;
  gap: 8px;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 480px) {
  .reveal-grid {
    gap: 10px;
  }
  .match-grid {
    grid-template-columns: 1fr;
  }
}
