/* ── Reset ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pink: #1877f2;
  --purple: #0866d6;
  --deep-purple: #0a4fa8;
  --lavender: #7fb5f5;
  --soft-pink: #d0e4fc;
  --hot-pink: #0084ff;
  --gradient: linear-gradient(135deg, #1877f2 0%, #0866d6 50%, #0a4fa8 100%);
  --gradient-soft: linear-gradient(135deg, #e7f0fd 0%, #eaf2fe 50%, #eef4fe 100%);
  --gradient-card: linear-gradient(145deg, rgba(24, 119, 242,.08) 0%, rgba(8, 102, 214,.10) 100%);
  --gradient-hero: linear-gradient(160deg, #0d2a5e 0%, #0d47a1 30%, #1565c0 55%, #1877f2 75%, #4da3ff 100%);
  --glass: rgba(255,255,255,0.92);
  --glass-border: #dcdfe4;
  --glass-strong: #ffffff;
  --bg: #f0f2f5;
  --surface: #ffffff;
  --text: #050505;
  --text-muted: #65676b;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.08), 0 8px 24px rgba(8, 102, 214,0.08);
  --shadow-glow: 0 0 40px rgba(24, 119, 242,0.10);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* animated bg blobs */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .25;
  z-index: -1;
  animation: float 20s ease-in-out infinite;
}
body::before {
  width: 600px; height: 600px;
  background: var(--pink);
  top: -200px; left: -150px;
}
body::after {
  width: 500px; height: 500px;
  background: var(--purple);
  bottom: -150px; right: -100px;
  animation-delay: -10s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(40px, 30px) scale(1.05); }
  50% { transform: translate(-20px, 60px) scale(.95); }
  75% { transform: translate(30px, -20px) scale(1.02); }
}

/* ── Navbar ───────────────────────────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo {
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: -.5px;
}
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  transition: all .3s;
  position: relative;
}
.nav-links a:hover { color: var(--pink); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--gradient);
  transition: width .3s;
}
.nav-links a:hover::after { width: 100%; }

/* ── Container ────────────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 2rem auto; padding: 0 1.5rem; flex: 1; width: 100%; }

/* ── Alerts ───────────────────────────────────────────────────────────── */
.alert {
  padding: .8rem 1.2rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: .95rem;
  backdrop-filter: blur(10px);
}
.alert-success { background: rgba(76,175,80,.15); border: 1px solid rgba(76,175,80,.4); }
.alert-danger { background: rgba(244,67,54,.12); border: 1px solid rgba(244,67,54,.4); }
.alert-info { background: rgba(8, 102, 214,.12); border: 1px solid rgba(8, 102, 214,.4); }

/* ── Hero / Landing ───────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 6rem 1rem 4rem;
  position: relative;
}
.hero h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: .6rem; letter-spacing: -1px; }
.hero h1 .grad {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 550px;
  margin: 0 auto 2.5rem;
}

.features { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; margin-top: 3rem; }
@media (max-width: 768px) { .features { grid-template-columns: 1fr; } }
.feature-card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform .3s, box-shadow .3s;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}
.feature-icon { font-size: 2.8rem; margin-bottom: .8rem; display: block; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.feature-card p { font-size: .88rem; color: var(--text-muted); }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: .75rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all .3s;
  letter-spacing: .3px;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(24, 119, 242,.3);
}
.btn-primary:hover { box-shadow: 0 6px 30px rgba(24, 119, 242,.5); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--pink);
  color: var(--pink);
}
.btn-outline:hover { background: rgba(24, 119, 242,.12); }
.btn-sm { padding: .45rem 1.2rem; font-size: .85rem; }
.btn-ghost {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: var(--glass-strong); }

/* ── Glass Card ───────────────────────────────────────────────────────── */
.card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all .3s;
}
.card:hover {
  border-color: rgba(24, 119, 242,.3);
  box-shadow: var(--shadow-glow);
}

/* ── Profile Grid (dashboard) ─────────────────────────────────────────── */
.profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.profile-card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .4s cubic-bezier(.25,.8,.25,1);
  position: relative;
}
.profile-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(24, 119, 242,.2);
  border-color: rgba(24, 119, 242,.4);
}
.profile-card-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}
.profile-card-body {
  padding: 1.2rem 1.4rem 1rem;
}
.profile-card-body h3 {
  font-size: 1.15rem;
  margin-bottom: .2rem;
}
.profile-card-body .meta {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: .8rem;
}

/* match score pill */
.match-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: .35rem .9rem;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
}

/* Mini bars inside card */
.mini-bars { display: flex; flex-direction: column; gap: .35rem; }
.mini-bar-row { display: flex; align-items: center; gap: .5rem; }
.mini-bar-label { font-size: .72rem; color: var(--text-muted); width: 70px; flex-shrink: 0; }
.mini-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(0,0,0,.08);
  border-radius: 3px;
  overflow: hidden;
}
.mini-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .8s cubic-bezier(.25,.8,.25,1);
}
.mini-bar-val { font-size: .72rem; color: var(--text-muted); width: 30px; text-align: right; }

.profile-card-footer {
  padding: .8rem 1.4rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.match-msg { font-size: .82rem; font-style: italic; }

/* ── Large Match Bars (detail page) ───────────────────────────────────── */
.match-bar-container {
  background: rgba(0,0,0,.08);
  border-radius: 10px;
  overflow: hidden;
  height: 28px;
  position: relative;
  margin-bottom: .3rem;
}
.match-bar {
  height: 100%;
  border-radius: 10px;
  transition: width .8s cubic-bezier(.25,.8,.25,1);
  display: flex;
  align-items: center;
  padding-left: .8rem;
  font-size: .78rem;
  font-weight: 700;
  color: #fff;
  min-width: fit-content;
}
.match-bar-label {
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: .2rem;
}

/* ── Auth forms ───────────────────────────────────────────────────────── */
.auth-card {
  max-width: 420px;
  margin: 4rem auto;
}
.auth-card h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Forms ─────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  margin-bottom: .3rem;
  font-weight: 600;
  font-size: .88rem;
  color: var(--text-muted);
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: .7rem 1rem;
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .95rem;
  transition: border-color .3s, box-shadow .3s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(24, 119, 242,.15);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; }
@media (max-width: 600px) { .form-row { flex-direction: column; } }

.form-section {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.form-section h3 {
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--glass-border);
  font-size: 1.1rem;
}
.form-section h3 .badge {
  font-size: .7rem;
  background: var(--gradient);
  padding: .2rem .6rem;
  border-radius: 50px;
  font-weight: 600;
  vertical-align: middle;
  margin-left: .5rem;
  -webkit-text-fill-color: #fff;
}
.checkbox-group { display: flex; align-items: center; gap: .5rem; }
.checkbox-group input[type="checkbox"] { width: auto; accent-color: var(--pink); }

/* ── Profile detail ───────────────────────────────────────────────────── */
.profile-header {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2rem;
}
.profile-photo-lg {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--pink);
  box-shadow: 0 0 30px rgba(24, 119, 242,.25);
  flex-shrink: 0;
}
.profile-header h1 { margin-bottom: .3rem; font-size: 1.8rem; }
.profile-header .meta { color: var(--text-muted); }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}
.detail-item { padding: .6rem 0; }
.detail-item .label {
  font-size: .75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
}
.detail-item .value { font-size: 1rem; margin-top: .2rem; }

/* ── Dimension score cards ────────────────────────────────────────────── */
.dim-scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.5rem 0; }
@media (max-width: 768px) { .dim-scores { grid-template-columns: 1fr; } }
.dim-card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.dim-card h4 { margin-bottom: .5rem; font-size: .9rem; color: var(--text-muted); }
.dim-card .score { font-size: 2.2rem; font-weight: 800; }

/* ── Overall match hero ───────────────────────────────────────────────── */
.overall-match {
  text-align: center;
  padding: 2.5rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  background: var(--glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
}
.overall-match::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  opacity: .12;
}
.overall-match .score { font-size: 4.5rem; font-weight: 800; position: relative; }
.overall-match .msg { font-size: 1.3rem; position: relative; margin-top: .3rem; }

/* ── Search bar ───────────────────────────────────────────────────────── */
.search-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.search-controls select {
  padding: .55rem 1rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .9rem;
  backdrop-filter: blur(8px);
}

/* ── Dashboard header ─────────────────────────────────────────────────── */
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .5rem;
}
.dash-header h1 {
  font-size: 1.8rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.dash-subtitle {
  color: var(--text-muted);
  margin-bottom: 1.8rem;
  font-size: .95rem;
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: .85rem;
  border-top: 1px solid var(--glass-border);
  margin-top: auto;
}
.footer span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* ── Utility ──────────────────────────────────────────────────────────── */
.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══════════════════════════════════════════════════════════════════════════
   PREMIUM HOMEPAGE
   ══════════════════════════════════════════════════════════════════════════ */

.hero-premium { padding: 8rem 1rem 5rem; }
.hero-premium h1 {
  font-size: 4.5rem;
  font-weight: 800;
  margin-bottom: .8rem;
  letter-spacing: -2px;
  line-height: 1.05;
}
.hero-eyebrow {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--pink);
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 2rem;
  line-height: 1.5;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Split hero: text left, poster image right */
.hero-split {
  display: flex;
  align-items: center;
  gap: 3rem;
  text-align: left;
  padding: 4rem 1rem 3rem;
  max-width: 1050px;
  margin: 0 auto;
}
.hero-split-text { flex: 1.2; }
.hero-split .hero-subtitle { margin: 0 0 2rem; }
.hero-split .hero-actions { justify-content: flex-start; }
.hero-split-image {
  flex: 1;
  max-width: 380px;
}
.hero-split-image img {
  width: 100%;
  display: block;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(10, 79, 168, .25);
  border: 1px solid var(--glass-border);
}
@media (max-width: 820px) {
  .hero-split {
    flex-direction: column;
    text-align: center;
    padding-top: 3rem;
  }
  .hero-split .hero-subtitle { margin: 0 auto 2rem; }
  .hero-split .hero-actions { justify-content: center; }
  .hero-split-image { max-width: 320px; }
}
.features-compact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 768px) {
  .features-compact { grid-template-columns: 1fr; }
}
.features-compact .feature-card p {
  font-size: .88rem;
  color: var(--text-muted);
}
.btn-lg { padding: 1rem 2.5rem; font-size: 1.1rem; }

@media (max-width: 768px) {
  .hero-premium h1 { font-size: 2.8rem; letter-spacing: -1px; }
  .hero-subtitle { font-size: 1.05rem; }
}

/* ── Stats Section ─────────────────────────────────────────────────────── */
.stats-section {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 3rem 1rem;
  margin: 1rem 0 3rem;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-number { font-size: 3rem; font-weight: 800; line-height: 1.1; }
.stat-label {
  font-size: .9rem;
  color: var(--text-muted);
  margin-top: .3rem;
  letter-spacing: .5px;
}

/* ── How It Works ──────────────────────────────────────────────────────── */
.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 2.5rem;
  letter-spacing: -.5px;
}
.how-it-works { padding: 4rem 0; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 768px) { .steps-grid { grid-template-columns: 1fr; } }
.step-card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  transition: transform .3s, box-shadow .3s;
}
.step-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}
.step-number {
  width: 52px; height: 52px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 1.2rem;
}
.step-card h3 { font-size: 1.15rem; margin-bottom: .6rem; }
.step-card p { font-size: .9rem; color: var(--text-muted); line-height: 1.6; }

/* ── Premium Features Grid ─────────────────────────────────────────────── */
.features-premium { margin-top: 2rem; padding-bottom: 2rem; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 768px) { .features-grid { grid-template-columns: 1fr; } }
.features-premium .feature-card p { line-height: 1.6; }

/* ── CTA Section ───────────────────────────────────────────────────────── */
.cta-section {
  text-align: center;
  padding: 5rem 1rem;
  margin-top: 2rem;
}
.cta-section h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: .8rem; }
.cta-section p { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 2rem; }

/* ══════════════════════════════════════════════════════════════════════════
   HOBBY CLUSTER GRID (edit_profile)
   ══════════════════════════════════════════════════════════════════════════ */

.hobby-counter {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding: .4rem .8rem;
  display: inline-block;
  border-radius: 50px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
}
.hobby-counter.at-limit { color: var(--pink); border-color: var(--pink); }

.hobby-clusters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
}
.hobby-cluster {
  background: rgba(0,0,0,.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
}
.cluster-heading {
  font-size: .9rem;
  font-weight: 700;
  color: var(--pink);
  margin-bottom: .8rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--glass-border);
}
.cluster-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.hobby-checkbox-label { cursor: pointer; }
.hobby-checkbox-label input { display: none; }
.hobby-chip {
  display: inline-block;
  padding: .35rem .85rem;
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 500;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  transition: all .25s;
}
.hobby-checkbox-label input:checked + .hobby-chip {
  background: var(--gradient);
  border-color: var(--pink);
  color: #fff;
  box-shadow: 0 2px 12px rgba(24, 119, 242,.3);
}
.hobby-checkbox-label.disabled .hobby-chip {
  opacity: .35;
  cursor: not-allowed;
}
.hobby-chip:hover { border-color: var(--pink); }

.avatar-mode-toggle label {
  font-size: .95rem;
  color: var(--text);
}

/* ══════════════════════════════════════════════════════════════════════════
   AI SUMMARY & EXPLAINABILITY (view_profile)
   ══════════════════════════════════════════════════════════════════════════ */

.ai-summary-section { margin-top: 1.5rem; }
.ai-intro-quote {
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--pink);
  padding: 1.2rem 1.5rem;
  border-left: 3px solid var(--pink);
  background: rgba(24, 119, 242,.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1.5rem;
}
.ai-insights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 768px) { .ai-insights-grid { grid-template-columns: 1fr; } }
.ai-insight-card {
  background: rgba(0,0,0,.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
  text-align: center;
  transition: transform .3s, box-shadow .3s;
}
.ai-insight-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.ai-insight-icon { font-size: 2rem; margin-bottom: .6rem; }
.ai-insight-card h4 {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--pink);
}
.ai-insight-card p { font-size: .85rem; color: var(--text-muted); line-height: 1.5; }

/* ── Explainability Table ──────────────────────────────────────────────── */
.explainability-section { margin-top: 1.5rem; }
.explain-table {
  width: 100%;
  border-collapse: collapse;
}
.explain-table th {
  text-align: left;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
  padding: .6rem .5rem;
  border-bottom: 1px solid var(--glass-border);
}
.explain-table td {
  padding: .8rem .5rem;
  font-size: .92rem;
  border-bottom: 1px solid rgba(0,0,0,.06);
  vertical-align: middle;
}
.bar-cell {
  display: flex;
  align-items: center;
  gap: .6rem;
}
.explain-bar-track {
  flex: 1;
  height: 10px;
  background: rgba(0,0,0,.08);
  border-radius: 5px;
  overflow: hidden;
}
.explain-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width .8s cubic-bezier(.25,.8,.25,1);
}
.explain-bar-val {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 36px;
  text-align: right;
}

/* ══════════════════════════════════════════════════════════════════════════
   SWIPE PAGE
   ══════════════════════════════════════════════════════════════════════════ */

.swipe-page { max-width: 480px; margin: 0 auto; }
.swipe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.swipe-header h1 { font-size: 1.8rem; }
.swipe-remaining {
  font-size: .85rem;
  color: var(--text-muted);
  background: var(--glass);
  padding: .4rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--glass-border);
}

.swipe-card-wrapper { position: relative; }
.swipe-card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
.swipe-card:hover {
  box-shadow: 0 16px 48px rgba(24, 119, 242,.2);
}
.swipe-card-image {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
}
.swipe-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.swipe-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 1.5rem 1.2rem;
  background: linear-gradient(transparent, rgba(255, 255, 255,.9));
}
.swipe-match-pill {
  display: inline-block;
  padding: .3rem .9rem;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .6rem;
  backdrop-filter: blur(10px);
}
.swipe-card-info h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: .15rem;
}
.swipe-card-meta {
  font-size: .9rem;
  color: #65676b;
}
.swipe-card-body { padding: 1rem 1.5rem 1.2rem; }
.swipe-card-message {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: .8rem;
  font-style: italic;
}
.swipe-mini-bars { display: flex; flex-direction: column; gap: .4rem; }

/* ── Swipe Action Buttons ──────────────────────────────────────────────── */
.swipe-actions {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 1.5rem;
  padding-bottom: 1rem;
}
.swipe-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 1.8rem;
  cursor: pointer;
  transition: all .3s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.swipe-btn:hover { transform: scale(1.12); }
.swipe-btn-pass {
  border-color: rgba(244,67,54,.4);
  color: #f44336;
}
.swipe-btn-pass:hover {
  background: rgba(244,67,54,.15);
  box-shadow: 0 0 25px rgba(244,67,54,.25);
}
.swipe-btn-like {
  border-color: rgba(24, 119, 242,.4);
  color: var(--pink);
}
.swipe-btn-like:hover {
  background: rgba(24, 119, 242,.15);
  box-shadow: 0 0 25px rgba(24, 119, 242,.3);
}

/* ── Swipe Empty State ─────────────────────────────────────────────────── */
.swipe-empty {
  text-align: center;
  padding: 5rem 1rem;
}
.swipe-empty-icon { font-size: 4rem; margin-bottom: 1rem; }
.swipe-empty h2 { font-size: 1.6rem; margin-bottom: .6rem; }
.swipe-empty p { color: var(--text-muted); max-width: 400px; margin: 0 auto; line-height: 1.6; }

/* ══════════════════════════════════════════════════════════════════════════
   MATCHES LIST
   ══════════════════════════════════════════════════════════════════════════ */

.matches-page { max-width: 700px; margin: 0 auto; }
.matches-grid { display: flex; flex-direction: column; gap: .8rem; }

.match-list-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: all .3s;
}
.match-list-card:hover {
  border-color: rgba(24, 119, 242,.3);
  box-shadow: var(--shadow-glow);
  transform: translateX(4px);
}
.match-list-photo-wrap {
  position: relative;
  flex-shrink: 0;
}
.match-list-photo-wrap img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--glass-border);
}
.unread-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  background: var(--pink);
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
}
.match-list-info { flex: 1; min-width: 0; }
.match-list-info h3 { font-size: 1rem; font-weight: 600; margin-bottom: .1rem; }
.match-list-meta { font-size: .82rem; color: var(--text-muted); }
.match-list-preview {
  font-size: .82rem;
  color: var(--purple);
  margin-top: .25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.match-list-arrow {
  font-size: 1.2rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ── Matches Empty State ───────────────────────────────────────────────── */
.matches-empty {
  text-align: center;
  padding: 5rem 1rem;
}
.matches-empty-icon { font-size: 4rem; margin-bottom: 1rem; }
.matches-empty h2 { font-size: 1.6rem; margin-bottom: .6rem; }
.matches-empty p { color: var(--text-muted); max-width: 400px; margin: 0 auto; line-height: 1.6; }

/* ══════════════════════════════════════════════════════════════════════════
   CHAT
   ══════════════════════════════════════════════════════════════════════════ */

.chat-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px);
  max-width: 700px;
  margin: 0 auto;
}
.chat-header {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: .5rem;
  flex-shrink: 0;
}
.chat-back-btn {
  font-size: 1.3rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: .3rem;
  transition: color .2s;
}
.chat-back-btn:hover { color: var(--pink); }
.chat-header-photo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--glass-border);
}
.chat-header-info h3 { font-size: 1rem; font-weight: 600; }
.chat-header-meta { font-size: .8rem; color: var(--text-muted); }

/* ── Messages Area ─────────────────────────────────────────────────────── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 2px; }

.chat-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-style: italic;
}
.chat-bubble-wrap { display: flex; flex-direction: column; max-width: 75%; }
.chat-bubble-wrap.sent { align-self: flex-end; align-items: flex-end; }
.chat-bubble-wrap.received { align-self: flex-start; align-items: flex-start; }

.chat-bubble {
  padding: .7rem 1rem;
  border-radius: 18px;
  font-size: .92rem;
  line-height: 1.5;
  position: relative;
  word-break: break-word;
}
.chat-bubble-wrap.sent .chat-bubble {
  background: var(--gradient);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-bubble-wrap.received .chat-bubble {
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.chat-bubble.avatar-msg {
  border: 1px dashed var(--lavender);
}
.avatar-indicator {
  display: block;
  font-size: .7rem;
  margin-top: .4rem;
  opacity: .7;
  color: var(--purple);
}
.chat-bubble-wrap.sent .avatar-indicator { color: rgba(255,255,255,.7); }
.chat-timestamp {
  font-size: .68rem;
  color: var(--text-muted);
  margin-top: .15rem;
  padding: 0 .3rem;
}

/* ── Input Area ────────────────────────────────────────────────────────── */
.chat-input-area {
  flex-shrink: 0;
  padding: .8rem 0;
  border-top: 1px solid var(--glass-border);
}
.chat-limit-note {
  font-size: .72rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: .5rem;
}
.chat-input-form {
  display: flex;
  gap: .5rem;
}
.chat-input-form input {
  flex: 1;
  padding: .7rem 1rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  color: var(--text);
  font-size: .95rem;
  outline: none;
  transition: border-color .3s;
}
.chat-input-form input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(24, 119, 242,.12);
}
.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--gradient);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, box-shadow .2s;
  flex-shrink: 0;
}
.chat-send-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(24, 119, 242,.35);
}

/* ── ML Map & Explainability ───────────────────────────────────────────── */
.map-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .8rem;
  margin-bottom: .5rem;
}
.map-toggle { display: flex; gap: .4rem; }
.map-toggle-btn {
  padding: .4rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s;
}
.map-toggle-btn.active {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
}
.map-mode-note {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: .6rem;
  line-height: 1.5;
}

.compat-map-container {
  position: relative;
  width: 100%;
  height: 520px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  margin: 1rem 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(24, 119, 242,0.10) 0%, rgba(10, 79, 168,0.06) 45%, rgba(255, 255, 255,0.0) 70%),
    linear-gradient(rgba(8, 102, 214,0.10) 1px, transparent 1px) 0 0 / 100% 40px,
    linear-gradient(90deg, rgba(8, 102, 214,0.10) 1px, transparent 1px) 0 0 / 40px 100%,
    radial-gradient(circle at 20% 30%, rgba(24, 119, 242,0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(24, 119, 242,0.04) 0%, transparent 35%),
    #eaf2fe;
}

/* Subtle "map streets" grid overlay */
.map-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(24, 119, 242,0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 119, 242,0.10) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: -20px -20px;
}

/* Radar rings (only visible in radar view) */
.radar-rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s;
}
.radar-view .radar-rings { opacity: 1; }
.radar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(24, 119, 242,0.25);
  border-radius: 50%;
}
.radar-ring.ring-1 { width: 18%; height: 18%; }
.radar-ring.ring-2 { width: 42%; height: 42%; }
.radar-ring.ring-3 { width: 66%; height: 66%; }
.radar-ring.ring-4 { width: 90%; height: 90%; border-style: dashed; }
.ring-label {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translate(-50%, -100%);
  font-size: .62rem;
  color: var(--purple);
  background: rgba(255,255,255,0.85);
  padding: 0 4px;
  border-radius: 4px;
  white-space: nowrap;
}
.radar-sweep {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 45%;
  height: 45%;
  transform-origin: top left;
  background: conic-gradient(from 0deg, rgba(24, 119, 242,0.18) 0deg, transparent 50deg);
  border-radius: 0 0 0 0;
  animation: radarSweep 6s linear infinite;
}
@keyframes radarSweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.vector-view .radar-sweep { display: none; }
.map-point {
  position: absolute;
  transform: translate(-50%, -50%);
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: transform .2s, left .6s cubic-bezier(.25,.8,.25,1), top .6s cubic-bezier(.25,.8,.25,1);
  z-index: 1;
}
.map-point:hover { transform: translate(-50%, -50%) scale(1.15); z-index: 10; }
.map-point img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  display: block;
  margin: 0 auto;
}
.map-point-focus img { width: 56px; height: 56px; border: 3px solid var(--pink); box-shadow: 0 0 20px rgba(24, 119, 242,.5); }
.map-point-highlight img { border: 3px solid #f1c40f; box-shadow: 0 0 16px rgba(241,196,15,.4); }
.map-point-label { font-size: .65rem; color: var(--text-muted); margin-top: 2px; display: block; }
.map-legend { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: .5rem; font-size: .85rem; color: var(--text-muted); }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #888; margin-right: 4px; }
.focus-dot { background: var(--pink); }
.highlight-dot { background: #f1c40f; }
.map-help-list { padding-left: 1.2rem; color: var(--text-muted); font-size: .9rem; line-height: 1.8; }
.ml-attr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.ml-attr-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 1rem;
}
.ml-attr-card h4 { font-size: .95rem; margin-bottom: .3rem; }
.ml-attr-pair { font-size: .85rem; color: var(--text-muted); margin-bottom: .4rem; }
.ml-attr-score { font-size: 1.8rem; font-weight: 800; }
.ml-attr-likelihood { font-size: .82rem; color: var(--pink); margin: .2rem 0; }
.ml-attr-reason { font-size: .8rem; color: var(--text-muted); line-height: 1.5; }

/* ── Photo upload ──────────────────────────────────────────────────────── */
.photo-upload-row {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.photo-upload-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--pink);
  box-shadow: 0 0 24px rgba(24, 119, 242,.25);
  flex-shrink: 0;
}
.photo-upload-controls { flex: 1; min-width: 220px; }
.photo-upload-hint { font-size: .8rem; color: var(--text-muted); margin-top: .5rem; }

/* Three-part bio on profile view */
.bio-sections {
  margin-top: .9rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.bio-block {
  background: rgba(0,0,0,.03);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: .7rem .9rem;
}
.bio-block p {
  margin: .35rem 0 0;
  color: var(--text-muted);
  line-height: 1.5;
}
.bio-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .2rem .6rem;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--purple));
}

/* Relationship goal badges */
.goal-badge-row {
  margin-top: .5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.goal-badge-row-sm { margin-top: .35rem; }
.goal-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  padding: .25rem .65rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.15);
  line-height: 1.3;
}
.goal-badge-friendship {
  background: linear-gradient(135deg, #26c6da, #00838f);
  color: #fff;
  border-color: rgba(38, 198, 218, .5);
  box-shadow: 0 0 12px rgba(38, 198, 218, .35);
}
.goal-badge-romantic {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff;
  border-color: rgba(24, 119, 242, .4);
}
.form-hint {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: .75rem;
  line-height: 1.45;
}

/* Profile mode picker */
.profile-mode-picker {
  margin-bottom: 1.5rem;
}
.profile-mode-heading {
  font-size: 1.15rem;
  margin-bottom: 1rem;
}
.profile-mode-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 700px) {
  .profile-mode-cards { grid-template-columns: 1fr; }
}
.profile-mode-card {
  text-align: left;
  background: #ffffff;
  border: 1px solid rgba(24, 119, 242, .28);
  border-radius: 18px;
  padding: 1.25rem 1.2rem;
  cursor: pointer;
  color: inherit;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.profile-mode-card:hover {
  transform: translateY(-2px);
  border-color: rgba(24, 119, 242, .6);
  box-shadow: 0 10px 28px rgba(10, 79, 168, .25);
}
.profile-mode-emoji { font-size: 1.75rem; display: block; margin-bottom: .5rem; }
.profile-mode-card strong { display: block; font-size: 1.05rem; margin-bottom: .35rem; }
.profile-mode-card p { margin: 0; color: var(--text-muted); font-size: .88rem; line-height: 1.4; }

.essentials-section {
  border: 1px solid rgba(24, 119, 242, .35) !important;
  box-shadow: 0 0 24px rgba(24, 119, 242, .12);
}
.badge-required {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff;
}
.req-star { color: var(--pink); }
.optional-bios { margin-top: .5rem; color: var(--text-muted); }
.optional-bios summary { cursor: pointer; font-size: .9rem; }
.optional-details {
  margin-top: 1rem;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 16px;
  padding: .5rem 1rem 1rem;
}
.optional-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem 0;
  font-weight: 600;
}
.optional-summary::-webkit-details-marker { display: none; }
.form-subsection {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,0,0,.08);
}
.form-subsection h3 { margin-bottom: .75rem; font-size: 1rem; }

/* Interest chips + aspiration line on profile cards */
.card-interests {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-bottom: .55rem;
}
.interest-chip {
  font-size: .68rem;
  font-weight: 600;
  padding: .18rem .55rem;
  border-radius: 999px;
  background: rgba(24, 119, 242, .1);
  color: var(--pink);
  border: 1px solid rgba(24, 119, 242, .25);
}
.interest-chip-more {
  background: rgba(0,0,0,.05);
  color: var(--text-muted);
  border-color: rgba(0,0,0,.1);
}
.card-aspiration {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: .7rem;
}

/* Own-profile banner */
.own-profile-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: rgba(24, 119, 242, .08);
  border: 1px solid rgba(24, 119, 242, .3);
  border-radius: var(--radius-sm);
  padding: .7rem 1rem;
  margin-bottom: 1.2rem;
  font-size: .92rem;
}

/* ── Events ───────────────────────────────────────────────────────────── */
.events-section-heading {
  font-size: 1.15rem;
  margin: 1.6rem 0 .9rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.badge-match {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff;
  font-size: .68rem;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-weight: 700;
}
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
}
.event-card {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: transform .2s, box-shadow .2s;
}
.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.event-card-top {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.event-interest-chip {
  background: rgba(24, 119, 242, .12);
  color: var(--pink);
  font-size: .74rem;
  font-weight: 700;
  padding: .22rem .7rem;
  border-radius: 999px;
  border: 1px solid rgba(24, 119, 242, .3);
}
.event-category {
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.event-title { font-size: 1.08rem; margin: .1rem 0; }
.event-meta { font-size: .85rem; color: var(--text-muted); line-height: 1.5; }
.event-desc { font-size: .88rem; color: var(--text-muted); line-height: 1.5; }
.event-card-footer {
  margin-top: auto;
  padding-top: .6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}
.event-attendees { font-size: .8rem; color: var(--text-muted); }
.event-detail-card { padding: 1.6rem 1.8rem; }
.event-attendee-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.event-attendee {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  text-decoration: none;
  color: var(--text);
  font-size: .8rem;
  width: 64px;
}
.event-attendee img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
.event-attendee:hover img { border-color: var(--pink); }

/* Group wall */
.group-post-form {
  display: flex;
  gap: .6rem;
  margin-bottom: 1.2rem;
}
.group-post-form input {
  flex: 1;
  padding: .6rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  font-size: .92rem;
}
.group-wall {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.group-wall-post {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
}
.group-wall-post img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.group-wall-post p { margin: .15rem 0 0; line-height: 1.5; font-size: .92rem; }
.group-wall-meta { display: flex; gap: .6rem; align-items: baseline; }
.group-wall-meta strong { font-size: .9rem; }
.group-wall-meta span { font-size: .72rem; color: var(--text-muted); }

/* Avatar Profile Filler */
.avatar-fill-panel {
  background: #ffffff;
  border: 1px solid rgba(24, 119, 242, .25);
  border-radius: 18px;
  padding: 1rem 1.15rem 1.1rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(10, 79, 168, .15);
}
.avatar-fill-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}
.avatar-fill-title {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.avatar-fill-icon {
  font-size: 1.75rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  box-shadow: 0 0 18px rgba(24, 119, 242, .35);
}
.avatar-fill-sub {
  display: block;
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: .15rem;
}
.avatar-fill-actions {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.avatar-progress {
  margin-top: .85rem;
  height: 6px;
  border-radius: 999px;
  background: rgba(0,0,0,.08);
  overflow: hidden;
}
.avatar-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  transition: width .35s ease;
}
.avatar-chat {
  margin-top: .9rem;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: .25rem .15rem;
}
.avatar-bubble {
  max-width: 88%;
  padding: .7rem .95rem;
  border-radius: 16px;
  line-height: 1.45;
  font-size: .92rem;
  white-space: pre-wrap;
}
.avatar-bubble-bot {
  align-self: flex-start;
  background: rgba(10, 79, 168, .35);
  border: 1px solid rgba(127, 181, 245, .3);
  border-bottom-left-radius: 4px;
}
.avatar-bubble-user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(24, 119, 242, .55), rgba(8, 102, 214, .55));
  border-bottom-right-radius: 4px;
}
.avatar-chat-input {
  margin-top: .75rem;
  display: flex;
  gap: .5rem;
}
.avatar-chat-input input {
  flex: 1;
  margin: 0;
}
.avatar-filled-flash {
  animation: avatarFieldPulse 1.1s ease;
  outline: 2px solid rgba(24, 119, 242, .7) !important;
}
@keyframes avatarFieldPulse {
  0% { box-shadow: 0 0 0 0 rgba(24, 119, 242, .55); }
  70% { box-shadow: 0 0 0 8px rgba(24, 119, 242, 0); }
  100% { box-shadow: none; }
}
@media (max-width: 640px) {
  .avatar-bubble { max-width: 95%; }
}
