/* style.css — My Testimony Hub v5 */
/* Palette: Navy + Gold, DM Sans */

/* ===== TYPE SCALE ===== */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.8125rem);
  --text-sm:   clamp(0.8125rem, 0.78rem + 0.15vw, 0.875rem);
  --text-base: clamp(0.9375rem, 0.9rem  + 0.2vw,  1rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --text-xl:   clamp(1.375rem, 1.1rem + 0.8vw, 1.75rem);
  --text-2xl:  clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem);
  --text-3xl:  clamp(2.25rem, 1.5rem + 2.5vw, 3.5rem);

  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-full: 9999px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 600px;
  --content-default: 768px;
  --content-wide: 1200px;

  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== LIGHT MODE ===== */
:root, [data-theme="light"] {
  --color-bg:               #f5f6f8;
  --color-surface:          #ffffff;
  --color-surface-2:        #fafbfc;
  --color-surface-offset:   #eef0f3;
  --color-surface-offset-2: #e5e8ec;
  --color-surface-dynamic:  #dce0e6;
  --color-divider:          #d0d5dc;
  --color-border:           #c5cad3;
  --color-text:             #1a2138;
  --color-text-muted:       #5c6478;
  --color-text-faint:       #9aa0ae;
  --color-text-inverse:     #ffffff;
  --color-primary:          #1e3a5f;
  --color-primary-hover:    #162d4a;
  --color-primary-active:   #0e1836;
  --color-primary-highlight:#dde1ed;
  --color-primary-light:    #2d4080;
  --color-gold:             #c9a94e;
  --color-gold-hover:       #b8982f;
  --color-gold-active:      #8f6712;
  --color-gold-highlight:   #f5eed8;
  --color-gold-light:       #d4a73e;
  --color-success:          #2a7d4f;
  --color-success-highlight:#ddf0e5;
  --color-error:            #c0392b;
  --color-error-highlight:  #f5ddd9;
  --color-warning:          #e67e22;
  --color-star:             #d4a13a;
  --color-star-empty:       #d0d5dc;
  --shadow-sm: 0 1px 3px rgba(26,43,90,0.06);
  --shadow-md: 0 4px 12px rgba(26,43,90,0.08);
  --shadow-lg: 0 12px 32px rgba(26,43,90,0.12);
  --shadow-card: 0 1px 3px rgba(26,43,90,0.06), 0 0 0 1px rgba(26,43,90,0.04);
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --color-bg:               #0d1117;
  --color-surface:          #141a24;
  --color-surface-2:        #1a2233;
  --color-surface-offset:   #111821;
  --color-surface-offset-2: #182030;
  --color-surface-dynamic:  #1f2a3c;
  --color-divider:          #242d3d;
  --color-border:           #2e3a4e;
  --color-text:             #e1e4ea;
  --color-text-muted:       #8b92a3;
  --color-text-faint:       #505a6e;
  --color-text-inverse:     #0d1117;
  --color-primary:          #5a7abf;
  --color-primary-hover:    #7592d0;
  --color-primary-active:   #8fa8de;
  --color-primary-highlight:#1e2940;
  --color-primary-light:    #6b8ace;
  --color-gold:             #d4a73e;
  --color-gold-hover:       #e0b854;
  --color-gold-active:      #e8c56b;
  --color-gold-highlight:   #2a2418;
  --color-gold-light:       #e0b854;
  --color-success:          #4cb076;
  --color-success-highlight:#1a2e24;
  --color-error:            #e06050;
  --color-error-highlight:  #2e1a1a;
  --color-warning:          #e8943e;
  --color-star:             #e0b854;
  --color-star-empty:       #2e3a4e;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.45);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.04);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:#0d1117;--color-surface:#141a24;--color-surface-2:#1a2233;
    --color-surface-offset:#111821;--color-surface-offset-2:#182030;
    --color-surface-dynamic:#1f2a3c;--color-divider:#242d3d;--color-border:#2e3a4e;
    --color-text:#e1e4ea;--color-text-muted:#8b92a3;--color-text-faint:#505a6e;
    --color-text-inverse:#0d1117;--color-primary:#5a7abf;--color-primary-hover:#7592d0;
    --color-primary-active:#8fa8de;--color-primary-highlight:#1e2940;--color-primary-light:#6b8ace;
    --color-gold:#d4a73e;--color-gold-hover:#e0b854;--color-gold-active:#e8c56b;
    --color-gold-highlight:#2a2418;--color-gold-light:#e0b854;--color-success:#4cb076;
    --color-success-highlight:#1a2e24;--color-error:#e06050;--color-error-highlight:#2e1a1a;
    --color-warning:#e8943e;--color-star:#e0b854;--color-star-empty:#2e3a4e;
    --shadow-sm:0 1px 3px rgba(0,0,0,0.25);--shadow-md:0 4px 12px rgba(0,0,0,0.35);
    --shadow-lg:0 12px 32px rgba(0,0,0,0.45);
    --shadow-card:0 1px 3px rgba(0,0,0,0.3),0 0 0 1px rgba(255,255,255,0.04);
  }
}

/* ===== BASE RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  min-height: 100dvh;
}
body.no-bottom-nav { padding-bottom: 0; }
button, input, select, textarea { font-family: inherit; font-size: inherit; border: none; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
#app { min-height: 100dvh; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  display: flex; align-items: center; justify-content: space-around;
  z-index: 1000;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-1);
  padding: var(--space-2) var(--space-4); min-width: 64px; min-height: 48px;
  border-radius: var(--radius-lg); transition: all var(--transition-interactive);
  color: var(--color-text-muted); -webkit-tap-highlight-color: transparent;
}
.nav-item:active { transform: scale(0.92); }
.nav-item.active { color: var(--color-primary); }
.nav-item svg { width: 24px; height: 24px; }
.nav-label { font-size: var(--text-xs); font-weight: 500; letter-spacing: 0.01em; }

/* ===== STICKY HEADER ===== */
.sticky-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--color-bg);
  padding: var(--space-4) var(--space-4) var(--space-3);
  border-bottom: 1px solid var(--color-divider);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.header-title { font-size: var(--text-lg); font-weight: 700; color: var(--color-text); letter-spacing: -0.01em; }
.header-logo { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-base); font-weight: 700; color: var(--color-navy); text-decoration: none; letter-spacing: -0.01em; }
.header-logo svg { flex-shrink: 0; }
.header-logo:hover { opacity: 0.8; }
[data-theme="dark"] .header-logo { color: var(--color-gold); }
.header-back {
  display: flex; align-items: center; gap: var(--space-2);
  min-width: 48px; min-height: 48px;
  color: var(--color-primary); font-weight: 500; font-size: var(--text-sm);
}
.header-back svg { width: 20px; height: 20px; }

/* Theme toggle */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-full);
  color: var(--color-text-muted); transition: all var(--transition-interactive);
}
.theme-toggle:hover { background: var(--color-surface-offset); color: var(--color-text); }
.theme-toggle:active { transform: scale(0.9); }

/* ===== SEARCH BAR ===== */
.search-container { padding: var(--space-3) var(--space-4) var(--space-2); }
.search-bar {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); transition: all var(--transition-interactive);
}
.search-bar:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-highlight); }
.search-bar svg { width: 20px; height: 20px; color: var(--color-text-muted); flex-shrink: 0; }
.search-bar input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 16px; color: var(--color-text); min-height: 24px;
}
.search-bar input::placeholder { color: var(--color-text-faint); }

/* ===== MEMBER CARDS ===== */
.members-grid {
  padding: var(--space-2) var(--space-4) var(--space-4);
  display: grid; grid-template-columns: 1fr; gap: var(--space-3);
}
@media (min-width: 768px) {
  .members-grid { grid-template-columns: repeat(2, 1fr); padding: var(--space-4) var(--space-6); }
}
@media (min-width: 1024px) {
  .members-grid { grid-template-columns: repeat(3, 1fr); max-width: var(--content-wide); margin: 0 auto; }
}
.member-card {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4);
  background: var(--color-surface); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card); cursor: pointer;
  transition: all var(--transition-interactive);
  -webkit-tap-highlight-color: transparent; color: inherit;
}
.member-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.member-card:active { transform: scale(0.98); }

.avatar {
  width: 48px; height: 48px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: var(--text-sm);
  color: var(--color-text-inverse); flex-shrink: 0; letter-spacing: -0.02em;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 80px; height: 80px; font-size: var(--text-xl); }
.avatar-xl { width: 96px; height: 96px; font-size: var(--text-2xl); }

.member-info { flex: 1; min-width: 0; }
.member-name { font-weight: 600; font-size: var(--text-base); color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-company { font-size: var(--text-sm); color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-category { font-size: var(--text-xs); color: var(--color-text-faint); margin-top: var(--space-1); }
.member-stats { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-1); flex-shrink: 0; }
.member-rating { display: flex; align-items: center; gap: var(--space-1); }
.star { color: var(--color-star); }
.star-empty { color: var(--color-star-empty); }
.star svg, .star-empty svg { width: 14px; height: 14px; }
.rating-number { font-size: var(--text-xs); font-weight: 600; color: var(--color-text); font-variant-numeric: tabular-nums; }
.testimonial-count { font-size: var(--text-xs); color: var(--color-text-faint); font-variant-numeric: tabular-nums; }

/* ===== MEMBER PROFILE ===== */
.profile-hero { text-align: center; padding: var(--space-8) var(--space-4) var(--space-6); max-width: var(--content-narrow); margin: 0 auto; }
.profile-hero .avatar { margin: 0 auto var(--space-4); }
.profile-name { font-size: var(--text-xl); font-weight: 700; color: var(--color-text); margin-bottom: var(--space-1); }
.profile-company { font-size: var(--text-base); color: var(--color-text-muted); margin-bottom: var(--space-1); }
.profile-category { font-size: var(--text-sm); color: var(--color-text-faint); }
.profile-rating-display { display: flex; align-items: center; justify-content: center; gap: var(--space-2); margin-top: var(--space-4); }
.profile-rating-display .stars-large { display: flex; gap: 2px; }
.profile-rating-display .stars-large svg { width: 22px; height: 22px; }
.profile-rating-number { font-size: var(--text-lg); font-weight: 700; color: var(--color-text); font-variant-numeric: tabular-nums; }
.profile-rating-count { font-size: var(--text-sm); color: var(--color-text-muted); }

/* Contact row */
.contact-row {
  display: flex; align-items: center; justify-content: center;
  gap: var(--space-4); padding: var(--space-4); flex-wrap: wrap;
  max-width: var(--content-narrow); margin: 0 auto;
}
.contact-item {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface-offset); border-radius: var(--radius-full);
  color: var(--color-primary); font-size: var(--text-sm); font-weight: 500;
  transition: all var(--transition-interactive); min-height: 44px; white-space: nowrap;
  text-decoration: none; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.contact-item:hover { background: var(--color-primary-highlight); }
.contact-item:active { transform: scale(0.95); }
.contact-item svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Action buttons */
.actions-row { display: flex; gap: var(--space-3); padding: var(--space-2) var(--space-4) var(--space-4); max-width: var(--content-narrow); margin: 0 auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2); padding: var(--space-3) var(--space-5);
  font-weight: 600; font-size: var(--text-sm); border-radius: var(--radius-xl);
  transition: all var(--transition-interactive); min-height: 48px;
  -webkit-tap-highlight-color: transparent; cursor: pointer; white-space: nowrap;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--color-primary); color: var(--color-text-inverse); flex: 1; }
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-outline { background: transparent; color: var(--color-primary); border: 1.5px solid var(--color-primary); flex: 1; }
.btn-outline:hover { background: var(--color-primary-highlight); }
.btn-gold { background: var(--color-gold); color: #fff; }
.btn-gold:hover { background: var(--color-gold-hover); }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; }
.btn-sm { min-height: 36px; font-size: var(--text-xs); padding: var(--space-2) var(--space-3); }
.btn-danger { background: var(--color-error); color: white; }
.btn-danger:hover { opacity: 0.9; }
.btn-cancel { background: var(--color-surface-offset); color: var(--color-text); }
.btn-cancel:hover { background: var(--color-surface-dynamic); }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ===== TESTIMONIAL CARDS ===== */
.testimonials-section { padding: var(--space-4); max-width: 960px; margin: 0 auto; }
.section-heading { font-size: var(--text-lg); font-weight: 700; color: var(--color-text); margin-bottom: var(--space-4); }
.testimonials-grid { column-count: 3; column-gap: var(--space-3); }
@media (max-width: 768px) { .testimonials-grid { column-count: 2; } }
@media (max-width: 480px) { .testimonials-grid { column-count: 1; } }

/* Base card */
.testimonial-card {
  position: relative;
  background: var(--color-surface); border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  margin-bottom: var(--space-3);
  break-inside: avoid; overflow: hidden;
}
.testimonial-delete {
  position: absolute; top: var(--space-2); right: var(--space-2);
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full); z-index: 5;
  background: rgba(0,0,0,0.5); color: #fff; border: none; cursor: pointer;
  transition: all var(--transition-interactive);
}
.testimonial-delete:hover { background: rgba(220,50,50,0.8); }
.testimonial-delete:active { transform: scale(0.85); }
.testimonial-delete svg { width: 14px; height: 14px; }

/* Text / Audio card body */
.testimonial-card-body { padding: var(--space-4); }
.testimonial-stars { display: flex; gap: 2px; margin-bottom: var(--space-2); }
.testimonial-stars svg { width: 16px; height: 16px; }
.testimonial-text { font-size: var(--text-sm); line-height: 1.65; color: var(--color-text); margin-bottom: var(--space-3); }
.testimonial-reviewer { display: flex; align-items: center; gap: var(--space-2); }
.reviewer-avatar {
  width: 32px; height: 32px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 11px; color: var(--color-text-inverse); flex-shrink: 0;
}
.reviewer-info { min-width: 0; }
.reviewer-name { font-weight: 600; font-size: var(--text-sm); color: var(--color-text); }
.reviewer-company { font-size: var(--text-xs); color: var(--color-text-muted); }
.testimonial-date { font-size: 10px; color: var(--color-text-faint); }
.testimonial-type-badge {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: 2px 8px; border-radius: var(--radius-full);
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  background: var(--color-primary-highlight); color: var(--color-primary);
  margin-bottom: var(--space-2);
}

/* ===== AUDIO CARD (Wall of Love style) ===== */
.testimonial-card--audio { padding: 0; overflow: hidden; }
.audio-card-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, #2d5a8e 100%);
  padding: var(--space-5) var(--space-4);
  display: flex; align-items: center; gap: var(--space-3);
}
.audio-waveform-icon { flex-shrink: 0; }
.audio-header-label {
  font-size: var(--text-xs); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: rgba(255,255,255,0.85);
}
.audio-card-body { padding: var(--space-4); }
.audio-player-wrap { margin-bottom: var(--space-3); }
.audio-player-wrap audio {
  width: 100%; height: 40px; border-radius: var(--radius-lg);
}

/* Legacy audio (in case) */
.audio-testimonial { margin-bottom: var(--space-3); padding: var(--space-2); background: var(--color-surface-offset); border-radius: var(--radius-lg); }
.audio-testimonial audio { width: 100%; height: 36px; }

/* ===== VIDEO CARD (testimonial.to style) ===== */
.testimonial-card--video { padding: 0; }
.video-testimonial {
  position: relative; width: 100%;
  background: #000; overflow: hidden; cursor: pointer;
}
.video-thumb {
  width: 100%; display: block; object-fit: cover;
}
.video-thumb-placeholder {
  width: 100%; aspect-ratio: 3/4; display: flex; align-items: center;
  justify-content: center; background: #1a1a1a; color: #666;
}
.video-thumb-placeholder svg { width: 48px; height: 48px; }
.video-player { width: 100%; display: block; }

/* Play button overlay */
.video-play-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; cursor: pointer; padding: 0;
  transition: background 0.2s ease; z-index: 3;
}
.video-play-overlay:hover { background: rgba(0,0,0,0.15); }
.video-play-overlay svg { filter: drop-shadow(0 2px 12px rgba(0,0,0,0.5)); }

/* Name + stars overlay at bottom of video thumbnail */
.video-overlay-info {
  position: absolute; bottom: 0; left: 0; right: 0; pointer-events: none;
  padding: var(--space-6) var(--space-3) var(--space-3);
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff; z-index: 2;
}
.video-overlay-info .overlay-name {
  font-weight: 700; font-size: var(--text-sm); color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.video-overlay-info .overlay-stars { display: flex; gap: 2px; margin-top: 2px; }
.video-overlay-info .overlay-stars svg { width: 14px; height: 14px; }

/* Delete button on video cards */
.testimonial-card--video .testimonial-delete {
  top: var(--space-2); right: var(--space-2);
}

/* ===== INTRO PAGE ===== */
.intro-page {
  min-height: 100dvh; display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  padding: var(--space-8) var(--space-6); text-align: center; background: var(--color-bg);
}
.intro-badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary-highlight); border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 600; color: var(--color-primary);
  margin-bottom: var(--space-6); letter-spacing: 0.04em; text-transform: uppercase;
}
.intro-logo { margin-bottom: var(--space-3); }
.intro-heading {
  font-size: var(--text-3xl); font-weight: 700; color: var(--color-text);
  letter-spacing: -0.02em; margin-bottom: var(--space-4); line-height: 1.1;
}
.intro-subheading {
  font-size: var(--text-lg); color: var(--color-text-muted);
  max-width: 520px; margin: 0 auto var(--space-8); line-height: 1.6;
}
.intro-features {
  display: flex; flex-direction: column; gap: var(--space-5);
  max-width: 420px; margin: 0 auto var(--space-10); text-align: left;
}
.intro-feature { display: flex; gap: var(--space-4); align-items: flex-start; }
.intro-feature-icon {
  width: 44px; height: 44px; border-radius: var(--radius-lg);
  background: var(--color-gold-highlight); color: var(--color-gold);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.intro-feature-icon svg { width: 22px; height: 22px; }
.intro-feature-text { font-size: var(--text-base); color: var(--color-text); line-height: 1.5; }
.intro-feature-text strong { color: var(--color-text); }
.intro-cta {
  padding: var(--space-4) var(--space-10); font-size: var(--text-lg); font-weight: 700;
  border-radius: var(--radius-full); background: var(--color-primary);
  color: var(--color-text-inverse); transition: all var(--transition-interactive);
  min-height: 56px; letter-spacing: -0.01em;
}
.intro-cta:hover { background: var(--color-primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.intro-cta:active { transform: scale(0.97); }
.intro-meeting-info {
  margin-top: var(--space-6); padding: var(--space-3) var(--space-4);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); text-align: center; color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.intro-footer { margin-top: var(--space-10); font-size: var(--text-xs); color: var(--color-text-faint); letter-spacing: 0.02em; }

/* ===== AUTH PAGES ===== */
.auth-page {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: var(--space-6); background: var(--color-bg);
}
.auth-card {
  width: 100%; max-width: 420px;
  padding: var(--space-8) var(--space-6);
  background: var(--color-surface); border-radius: var(--radius-2xl); box-shadow: var(--shadow-lg);
}
.auth-title { font-size: var(--text-2xl); font-weight: 700; color: var(--color-text); text-align: center; margin-bottom: var(--space-2); }
.auth-subtitle { font-size: var(--text-sm); color: var(--color-text-muted); text-align: center; margin-bottom: var(--space-6); line-height: 1.5; }
.auth-error { padding: var(--space-3) var(--space-4); background: var(--color-error-highlight); color: var(--color-error); border-radius: var(--radius-lg); font-size: var(--text-sm); margin-bottom: var(--space-4); text-align: center; }
.auth-link { text-align: center; margin-top: var(--space-4); font-size: var(--text-sm); color: var(--color-text-muted); }
.auth-link a, .auth-link button { color: var(--color-primary); font-weight: 600; }

/* ===== SHARE PAGE ===== */
.share-page { max-width: var(--content-narrow); margin: 0 auto; padding: var(--space-8) var(--space-4) var(--space-10); }
.share-header { display: flex; justify-content: flex-end; padding: var(--space-3) var(--space-4); }
.share-profile { text-align: center; margin-bottom: var(--space-6); }
.share-profile .avatar { margin: 0 auto var(--space-4); }
.share-contact-section {
  display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4);
  background: var(--color-surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); margin: var(--space-6) 0;
}
.share-contact-item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg);
  color: var(--color-text); transition: all var(--transition-interactive); min-height: 48px;
}
.share-contact-item:hover { background: var(--color-surface-offset); }
.share-contact-icon {
  width: 40px; height: 40px; border-radius: var(--radius-lg);
  background: var(--color-primary-highlight); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.share-contact-icon svg { width: 20px; height: 20px; }
.share-contact-label { font-size: var(--text-xs); color: var(--color-text-muted); margin-bottom: 1px; }
.share-contact-value { font-size: var(--text-base); font-weight: 500; color: var(--color-primary); }
.share-footer { text-align: center; padding: var(--space-8) 0 var(--space-4); font-size: var(--text-xs); color: var(--color-text-faint); }

/* ===== RECORD FLOW ===== */
.record-step { padding: var(--space-4); max-width: var(--content-narrow); margin: 0 auto; }
.step-title { font-size: var(--text-xl); font-weight: 700; color: var(--color-text); text-align: center; margin-bottom: var(--space-2); }
.step-subtitle { font-size: var(--text-sm); color: var(--color-text-muted); text-align: center; margin-bottom: var(--space-6); }

/* Camera / Video recording */
.camera-container {
  position: relative; width: 100%; aspect-ratio: 3/4;
  background: #000; border-radius: var(--radius-xl); overflow: hidden; margin-bottom: var(--space-4);
}
.camera-container video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.record-btn-container { display: flex; align-items: center; justify-content: center; gap: var(--space-6); padding: var(--space-4); }
.record-btn {
  width: 72px; height: 72px; border-radius: var(--radius-full);
  background: #e53935; border: 4px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-interactive); position: relative;
}
.record-btn:active { transform: scale(0.9); }
.record-btn.recording { animation: pulse-record 1.5s ease-in-out infinite; }
.record-btn.recording::before { content: ''; width: 28px; height: 28px; border-radius: var(--radius-sm); background: white; }
@keyframes pulse-record {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229,57,53,0.4); }
  50% { box-shadow: 0 0 0 16px rgba(229,57,53,0); }
}
.timer-display { font-size: var(--text-xl); font-weight: 700; color: var(--color-text); font-variant-numeric: tabular-nums; min-width: 60px; text-align: center; }

/* Countdown timer overlay on camera */
.timer-overlay {
  position: absolute; top: var(--space-3); right: var(--space-3); z-index: 10;
  background: rgba(0,0,0,0.6); color: #fff; font-size: var(--text-lg); font-weight: 700;
  font-variant-numeric: tabular-nums; padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full); min-width: 56px; text-align: center;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.timer-overlay.timer-warning { background: rgba(229,57,53,0.85); animation: timer-pulse 1s infinite; }
@keyframes timer-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Audio recording visual */
.audio-record-visual {
  width: 160px; height: 160px; border-radius: var(--radius-full);
  background: var(--color-surface); border: 3px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  margin: var(--space-8) auto; position: relative;
  color: var(--color-primary); transition: all 0.3s ease;
}
.audio-record-visual.recording-active { border-color: #e53935; }
.audio-record-visual svg { width: 48px; height: 48px; position: relative; z-index: 1; }
.audio-pulse {
  position: absolute; inset: -8px; border-radius: var(--radius-full);
  border: 3px solid #e53935; animation: audio-pulse-ring 1.5s ease-out infinite;
}
@keyframes audio-pulse-ring { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(1.3); opacity: 0; } }

/* Star rating input */
.star-rating-input { display: flex; gap: var(--space-2); justify-content: center; padding: var(--space-4) 0; }
.star-rating-input button { padding: var(--space-1); transition: all var(--transition-interactive); }
.star-rating-input button:active { transform: scale(1.2); }
.star-rating-input svg { width: 40px; height: 40px; }

/* Form */
.form-group { margin-bottom: var(--space-4); }
.form-label { display: block; font-size: var(--text-sm); font-weight: 600; color: var(--color-text); margin-bottom: var(--space-2); }
.form-input {
  width: 100%; padding: var(--space-3) var(--space-4);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); font-size: 16px; color: var(--color-text);
  transition: all var(--transition-interactive); min-height: 48px;
}
.form-input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-highlight); }
textarea.form-input { resize: vertical; min-height: 120px; }

/* Type choices */
.type-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); padding: var(--space-4) 0; max-width: 400px; margin: 0 auto; }
.type-choice-card {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  padding: var(--space-5) var(--space-3); background: var(--color-surface);
  border: 2px solid var(--color-border); border-radius: var(--radius-xl);
  transition: all var(--transition-interactive); cursor: pointer; min-height: 120px;
}
.type-choice-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.type-choice-card:active { transform: scale(0.96); }
.type-choice-icon {
  width: 48px; height: 48px; border-radius: var(--radius-lg);
  background: var(--color-primary-highlight); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
}
.type-choice-icon svg { width: 24px; height: 24px; }
.type-choice-label { font-size: var(--text-sm); font-weight: 700; color: var(--color-text); }
.type-choice-desc { font-size: var(--text-xs); color: var(--color-text-muted); text-align: center; line-height: 1.3; }

/* Member select list */
.member-select-list { display: flex; flex-direction: column; gap: var(--space-2); }
.member-select-item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); background: var(--color-surface);
  border-radius: var(--radius-lg); transition: all var(--transition-interactive);
  cursor: pointer; min-height: 48px;
}
.member-select-item:hover { background: var(--color-surface-offset); }
.member-select-item:active { transform: scale(0.98); }

/* Success screen */
.success-screen { text-align: center; padding: var(--space-16) var(--space-4); }
.success-icon {
  width: 80px; height: 80px; border-radius: var(--radius-full);
  background: var(--color-success-highlight); color: var(--color-success);
  display: flex; align-items: center; justify-content: center; margin: 0 auto var(--space-6);
}
.success-icon svg { width: 40px; height: 40px; }
.success-title { font-size: var(--text-xl); font-weight: 700; color: var(--color-text); margin-bottom: var(--space-2); }
.success-text { font-size: var(--text-base); color: var(--color-text-muted); margin-bottom: var(--space-8); }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: var(--space-3) var(--space-5); background: var(--color-text);
  color: var(--color-text-inverse); border-radius: var(--radius-full);
  font-size: var(--text-sm); font-weight: 500; z-index: 2000;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); white-space: nowrap;
}
.toast.visible { transform: translateX(-50%) translateY(0); }

/* ===== DIALOG ===== */
.dialog-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 3000; padding: var(--space-4); animation: fade-in 0.15s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.dialog-box {
  background: var(--color-surface); border-radius: var(--radius-xl);
  padding: var(--space-6); max-width: 320px; width: 100%;
  text-align: center; box-shadow: var(--shadow-lg); animation: dialog-in 0.2s var(--ease-out);
}
@keyframes dialog-in { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.dialog-title { font-size: var(--text-lg); font-weight: 700; color: var(--color-text); margin-bottom: var(--space-2); }
.dialog-text { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-6); }
.dialog-actions { display: flex; gap: var(--space-3); }
.dialog-actions .btn { flex: 1; font-size: var(--text-sm); }

/* ===== ADMIN PANEL ===== */
.admin-page { max-width: var(--content-narrow); margin: 0 auto; padding: var(--space-4); }
.admin-tabs {
  display: flex; gap: var(--space-2); padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-divider); margin-bottom: var(--space-4);
}
.admin-tab {
  flex: 1; padding: var(--space-3); font-size: var(--text-sm); font-weight: 600;
  color: var(--color-text-muted); background: transparent;
  border-radius: var(--radius-lg); transition: all var(--transition-interactive); text-align: center;
}
.admin-tab.active { background: var(--color-primary); color: var(--color-text-inverse); }
.admin-tab:hover:not(.active) { background: var(--color-surface-offset); }
.admin-member-card { padding: var(--space-4); background: var(--color-surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); margin-bottom: var(--space-3); }

.status-badge {
  display: inline-flex; padding: 2px 8px; border-radius: var(--radius-full);
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  vertical-align: middle; margin-left: var(--space-1);
}
.status-badge.approved { background: var(--color-success-highlight); color: var(--color-success); }
.status-badge.pending { background: var(--color-gold-highlight); color: var(--color-gold); }
.status-badge.rejected { background: var(--color-error-highlight); color: var(--color-error); }
.status-badge.admin-role { background: var(--color-primary-highlight); color: var(--color-primary); }

.invite-result-card { padding: var(--space-4); background: var(--color-surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); text-align: center; }
.invite-code-display {
  font-size: var(--text-xl); font-weight: 700; font-family: monospace;
  color: var(--color-primary); background: var(--color-primary-highlight);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg);
  letter-spacing: 0.1em; user-select: all;
}

/* ===== EDIT PROFILE ===== */
.edit-profile-page { padding: var(--space-4); max-width: var(--content-narrow); margin: 0 auto; }
.photo-upload-btn {
  position: absolute; bottom: 0; right: -4px; width: 36px; height: 36px;
  border-radius: var(--radius-full); background: var(--color-primary); color: white;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: var(--shadow-md); transition: all var(--transition-interactive);
}
.photo-upload-btn:hover { background: var(--color-primary-hover); transform: scale(1.05); }
.photo-upload-btn svg { width: 18px; height: 18px; }

/* Profile stats */
.profile-stats-row { display: flex; justify-content: center; gap: var(--space-8); padding: var(--space-4); }
.stat-item { text-align: center; }
.stat-number { font-size: var(--text-xl); font-weight: 700; color: var(--color-text); font-variant-numeric: tabular-nums; }
.stat-label { font-size: var(--text-xs); color: var(--color-text-muted); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: var(--space-12) var(--space-4); color: var(--color-text-faint); }
.empty-state svg { width: 48px; height: 48px; margin: 0 auto var(--space-4); opacity: 0.5; }
.empty-state p { font-size: var(--text-base); margin: 0 auto; }

/* ===== CONFETTI ===== */
.confetti-container { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 5000; overflow: hidden; }
.confetti-piece { position: absolute; width: 10px; height: 10px; top: -10px; animation: confetti-fall linear forwards; }
@keyframes confetti-fall { 0% { transform: translateY(0) rotate(0deg); opacity: 1; } 100% { transform: translateY(100vh) rotate(720deg); opacity: 0; } }

/* ===== LOADING ===== */
.loading-indicator { text-align: center; padding: var(--space-10) var(--space-4); color: var(--color-text-faint); font-size: var(--text-sm); }
.loading-spinner {
  width: 32px; height: 32px; border: 3px solid var(--color-border);
  border-top-color: var(--color-gold); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto var(--space-3);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute; top: -100%; left: var(--space-4);
  padding: var(--space-2) var(--space-4); background: var(--color-primary);
  color: var(--color-text-inverse); border-radius: var(--radius-md);
  z-index: 10000; font-size: var(--text-sm);
}
.skip-link:focus { top: var(--space-4); }

/* ===== CONSENT ===== */
.consent-toggle { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) 0; }
.consent-toggle input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--color-primary); margin-top: 2px; flex-shrink: 0; }
.consent-text { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.5; }

/* ===== COUNTDOWN OVERLAY ===== */
.countdown-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 10; }
.countdown-number { font-size: 80px; font-weight: 700; color: white; animation: countdown-pop 0.8s var(--ease-out) forwards; }
@keyframes countdown-pop { 0% { transform: scale(0.5); opacity: 0; } 50% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); opacity: 0.8; } }

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }

/* ===== FOOTER ===== */
.app-footer {
  text-align: center; padding: var(--space-4);
  font-size: var(--text-xs); color: var(--color-text-faint);
}
.app-footer a { color: var(--color-text-faint); text-decoration: underline; }
.app-footer a:hover { color: var(--color-text-muted); }

/* ===== CHARACTER COUNTER ===== */
.char-counter {
  text-align: right; font-size: var(--text-xs); color: var(--color-text-muted);
  margin-top: var(--space-1); font-variant-numeric: tabular-nums;
}
.char-counter.char-warn { color: #e6a817; }
.char-counter.char-limit { color: #e53935; font-weight: 600; }

/* ===== AUDIO TIMER OVERLAY ===== */
.audio-timer-overlay {
  position: absolute; top: calc(-1 * var(--space-2)); right: calc(-1 * var(--space-2));
}

