/* === Padel Events Calendar – Mobile-First Styles === */

/* CSS Custom Properties (Design System Variables) */
:root {
  /* Color primitives */
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-300: #86efac;
  --emerald-900: #064e3b;
  --green-50: #ecfdf3;
  --green-200: #bbf7d0;
  --green-700: #166534;
  --teal-600: #0891b2;
  --teal-700: #0e7490;
  --teal-800: #0e4a5d;
  --slate-25: #f1f5f9;
  --slate-50: #f8fafc;
  --slate-100: #f3f4f6;
  --slate-200: #e5e7eb;
  --slate-150: #e2e8f0;
  --slate-250: #cbd5e1;
  --slate-300: #d1d5db;
  --slate-400: #9ca3af;
  --slate-500: #6b7280;
  --slate-600: #475569;
  --slate-700: #374151;
  --slate-800: #1f2937;
  --slate-900: #111827;
  --amber-500: #f59e0b;
  --amber-50: #fffbeb;
  --amber-200: #fed7aa;
  --amber-700: #92400e;
  --amber-950: #422006;
  --red-500: #ef4444;
  --red-50: #fef2f2;
  --red-200: #fecaca;
  --red-300: #fca5a5;
  --red-700: #b91c1c;
  --red-800: #7f1d1d;
  --red-950: #450a0a;
  --blue-500: #3b82f6;
  --blue-50: #eff6ff;
  --blue-200: #bfdbfe;
  --blue-700: #1e40af;
  --blue-800: #1d4ed8;
  --blue-950: #0b1f3a;
  --pink-50: #fdf2f8;
  --pink-200: #fbcfe8;
  --pink-300: #f9a8d4;
  --pink-700: #be185d;
  --pink-800: #9d174d;
  --pink-950: #3b0a2a;
  --yellow-50: #fefce8;
  --yellow-200: #fde047;
  --yellow-700: #854d0e;
  --gold-50: #fef3c7;
  --gold-200: #fcd34d;
  --white: #fff;

  /* Assets & effects */
  --background-image: url("/assets/img/background-noise.webp");
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 5%);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 10%);

  /* Spacing Scale (4px-based system) */
  --space-0: 0;
  --space-1: 0.25rem; /* 4px */
  --space-2: 0.5rem; /* 8px */
  --space-3: 0.75rem; /* 12px */
  --space-4: 1rem; /* 16px */
  --space-5: 1.25rem; /* 20px */
  --space-6: 1.5rem; /* 24px */
  --space-8: 2rem; /* 32px */
  --space-10: 2.5rem; /* 40px */
  --space-12: 3rem; /* 48px */
  --space-16: 4rem; /* 64px */

  /* Typography Scale */
  --text-xs: 0.75rem; /* 12px */
  --text-sm: 0.875rem; /* 14px */
  --text-base: 1rem; /* 16px */
  --text-lg: 1.125rem; /* 18px */
  --text-xl: 1.25rem; /* 20px */
  --text-2xl: 1.5rem; /* 24px */
  --text-3xl: 1.7rem; /* 30px */

  /* Line Heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;

  /* Font Weights */
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Font Stacks */
  --font-sans:
    -apple-system, blinkmacsystemfont, "Segoe UI", roboto, "Helvetica Neue",
    arial, sans-serif;
  --font-mono: "SF Mono", monaco, "Cascadia Code", "Courier New", monospace;

  /* Icon Filters */
  --icon-filter-white: brightness(0) invert(1); /* White icon filter */

  /* Transitions */
  --transition-fast: 100ms ease;
  --transition-base: 150ms ease;
  --transition-slow: 300ms ease;

  /* Z-index scale */
  --z-header: 100;

  /* Layout dimensions */
  --header-height: 60px; /* Header height for body padding */
  --content-spacing-top: var(--space-4); /* Extra spacing below header */
}

/* Theme semantic tokens - light (default) */
:root,
:root[data-theme="light"] {
  --color-primary: var(--emerald-500);
  --color-primary-hover: var(--emerald-600);
  --color-primary-light: #d1fae5;
  --color-accent: var(--teal-600);
  --color-accent-hover: var(--teal-700);
  --color-bg-page: #fafafa;
  --color-bg-card: var(--white);
  --color-bg-elevated: var(--white);
  --color-bg-hover: var(--slate-100);
  --color-bg-dark: #141414; /* For dark headers/sections */
  --color-text-primary: var(--slate-900);
  --color-text-secondary: var(--slate-500);
  --color-text-tertiary: var(--slate-400);
  --color-text-inverse: var(--white);
  --color-border: var(--slate-200);
  --color-border-focus: var(--color-primary);
  --color-icon: var(--slate-500);
  --color-success: var(--emerald-500);
  --color-warning: var(--amber-500);
  --color-error: var(--red-500);
  --color-info: var(--blue-500);

  /* Footer (always dark, independent of theme) */
  --color-footer-bg: #0a0a0a;
  --color-footer-text: #a1a1aa;
  --color-footer-heading: #fafafa;
  --color-footer-link-hover: #fff;
  --color-footer-border: #27272a;
  --color-footer-muted: #52525b;

  /* Surface tokens (light) */
  --surface-neutral-bg: var(--slate-50);
  --surface-neutral-bg-strong: var(--slate-25);
  --surface-neutral-border: var(--slate-150);
  --surface-neutral-border-strong: var(--slate-250);
  --surface-neutral-hover: var(--slate-100);
  --surface-neutral-text: var(--slate-600);
  --surface-success-bg: var(--green-50, #ecfdf3);
  --surface-success-border: var(--green-200, #bbf7d0);
  --surface-success-text: var(--green-700, #166534);
  --surface-warning-bg: var(--amber-50);
  --surface-warning-border: var(--amber-200);
  --surface-warning-text: var(--amber-700);
  --surface-error-bg: var(--red-50);
  --surface-error-border: var(--red-200);
  --surface-error-text: var(--red-700);
  --surface-info-bg: var(--blue-50);
  --surface-info-border: var(--blue-200);
  --surface-info-text: var(--blue-700);
  --surface-pink-bg: var(--pink-50);
  --surface-pink-border: var(--pink-200);
  --surface-pink-text: var(--pink-700);

  /* Purple surface tokens (for special UI elements like download) */
  --surface-purple-bg: #ede9fe;
  --surface-purple-border: #ddd6fe;
  --surface-purple-text: #7c3aed;

  /* Cyan surface tokens (for share/social actions) */
  --surface-cyan-bg: #ecfeff;
  --surface-cyan-border: #cffafe;
  --surface-cyan-text: #0891b2;

  /* Legacy aliases (compatibility) */
  --background-color: var(--color-bg-page);
  --brand-primary: var(--color-primary);
  --brand-accent: var(--color-accent);
  --bg-page: var(--color-bg-page);
  --bg-card: var(--color-bg-card);
  --bg-hover: var(--color-bg-hover);
  --text-primary: var(--color-text-primary);
  --text-secondary: var(--color-text-secondary);
  --text-muted: var(--color-text-tertiary);
  --border: var(--color-border);
  --border-active: var(--color-primary);
  --error: var(--color-error);

  /* Overlay backdrop colors (reusable for modals, sheets, dialogs) */
  --overlay-light: rgb(0 0 0 / 50%);
  --overlay-medium: rgb(0 0 0 / 70%);
  --overlay-heavy: rgb(0 0 0 / 80%);

  /* =============================================
     HOVER INTERACTION TOKENS
     =============================================
     Standardized hover effects for consistent UX.
     Use these tokens instead of ad-hoc hover styles.
     
     Categories:
     - Primary CTA: --hover-bg-primary (green buttons)
     - Secondary/Ghost: --hover-bg-subtle + --hover-border-accent
     - Icon/Minimal: --hover-bg-subtle only
     - Cards: --hover-scale-lift + --hover-shadow
     - Danger: Use var(--color-error) directly
     - Brand: Keep custom (WhatsApp #1fb855, Google)
     ============================================= */
  --hover-bg-subtle: var(--color-bg-hover);
  --hover-bg-primary: var(--color-primary-hover);
  --hover-border-accent: var(--color-primary);
  --hover-scale-lift: 1.02;
  --hover-scale-press: 0.98;
  --hover-shadow: var(--shadow-md);
  --hover-transition: 150ms ease;

  /* Auth Gate Variants */
  --gate-bg-neutral: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  --gate-bg-upgrade: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  --gate-border-neutral: var(--color-border);
  --gate-border-upgrade: var(--color-info);
}

/* ============================================
   DARK THEME SUPPORT
   ============================================
   Dark mode is implemented via CSS custom properties.
   When [data-theme="dark"] is set on :root, all semantic
   color tokens are remapped to darker variants.
   
   Sections with explicit dark mode overrides:
   1. Theme semantic tokens (--color-* variables)
   2. Surface tokens (--surface-* variables)
   3. Happening Soon section (gradient + card backgrounds)
   4. Almost Full section (gradient + card backgrounds)
   5. Alerts Email Preview (gradient + card backgrounds)
   6. App Header (already dark in both modes)
   7. Auth Modal (inputs + buttons)
   8. Theme Toggle (button states)
   9. Action Pills (icon filters)
   10. Calendar/Join/Share options (icon filters)
   
   Most components automatically support dark mode via CSS
   variables. Only sections with hardcoded colors (gradients,
   brand colors, rgba overlays) need explicit overrides.
   ============================================ */

/* Theme semantic tokens - dark */
:root[data-theme="dark"] {
  --color-primary: var(--emerald-400);
  --color-primary-hover: var(--emerald-500);
  --color-primary-light: var(--emerald-900);
  --color-accent: var(--teal-600);
  --color-accent-hover: var(--teal-700);
  --color-bg-page: #0f172a; /* Slate 900 */
  --color-bg-card: #1e293b; /* Slate 800 */
  --color-bg-elevated: #334155; /* Slate 700 */
  --color-bg-hover: #475569; /* Slate 600 */
  --color-bg-dark: #0b1220;
  --color-text-primary: #f8fafc; /* Slate 50 */
  --color-text-secondary: #cbd5e1; /* Slate 300 */
  --color-text-tertiary: #94a3b8; /* Slate 400 */
  --color-text-inverse: #0f172a;
  --color-border: #334155; /* Slate 700 */
  --color-border-focus: var(--emerald-400);
  --color-icon: #cbd5e1;
  --color-success: var(--emerald-400);
  --color-warning: var(--amber-500);
  --color-error: var(--red-500);
  --color-info: var(--blue-500);

  /* Remove background image in dark mode */
  --background-image: none;

  /* Surface tokens (dark) */
  --surface-neutral-bg: var(--slate-800);
  --surface-neutral-bg-strong: #131a29;
  --surface-neutral-border: #334155;
  --surface-neutral-border-strong: #3f4e64;
  --surface-neutral-hover: #273449;
  --surface-neutral-text: var(--slate-150);
  --surface-success-bg: var(--emerald-900);
  --surface-success-border: var(--green-700, #166534);
  --surface-success-text: var(--emerald-300);
  --surface-warning-bg: var(--amber-950);
  --surface-warning-border: var(--amber-700);
  --surface-warning-text: var(--gold-200);
  --surface-error-bg: var(--red-950);
  --surface-error-border: var(--red-800);
  --surface-error-text: var(--red-300);
  --surface-info-bg: var(--blue-950);
  --surface-info-border: var(--blue-800);
  --surface-info-text: var(--blue-100);
  --surface-pink-bg: var(--pink-950);
  --surface-pink-border: var(--pink-800);
  --surface-pink-text: var(--pink-300);

  /* Purple surface tokens (dark) */
  --surface-purple-bg: #2e1065;
  --surface-purple-border: #5b21b6;
  --surface-purple-text: #c4b5fd;

  /* Cyan surface tokens (dark) */
  --surface-cyan-bg: #083344;
  --surface-cyan-border: #0e7490;
  --surface-cyan-text: #cffafe;

  /* Legacy aliases (compatibility) */
  --background-color: var(--color-bg-page);
  --brand-primary: var(--color-primary);
  --brand-accent: var(--color-accent);
  --bg-page: var(--color-bg-page);
  --bg-card: var(--color-bg-card);
  --bg-hover: var(--color-bg-hover);
  --text-primary: var(--color-text-primary);
  --text-secondary: var(--color-text-secondary);
  --text-muted: var(--color-text-tertiary);
  --border: var(--color-border);
  --border-active: var(--color-primary);
  --error: var(--color-error);
}

/* Dark mode: Happening Soon section overrides */
:root[data-theme="dark"] .happening-soon {
  /* Use a darker, more subdued gradient for dark mode */
  background: linear-gradient(
    135deg,
    var(--emerald-900) 0%,
    var(--teal-800) 100%
  );
}

:root[data-theme="dark"] .happening-soon .event-card {
  /* Use dark card background instead of white */
  background: var(--color-bg-card);
}

:root[data-theme="dark"] .happening-soon .event-card:hover {
  background: var(--color-bg-elevated);
}

:root[data-theme="dark"] .happening-header {
  color: var(--white);
}

/* Dark mode: Almost Full section overrides */
:root[data-theme="dark"] .almost-full {
  /* Use a darker, more subdued amber gradient for dark mode */
  background: linear-gradient(
    135deg,
    var(--amber-950) 0%,
    var(--amber-700) 100%
  );
}

:root[data-theme="dark"] .almost-full .event-card {
  /* Use dark card background instead of white */
  background: var(--color-bg-card);
}

:root[data-theme="dark"] .almost-full .event-card:hover {
  background: var(--color-bg-elevated);
}

:root[data-theme="dark"] .almost-full-header {
  color: var(--white);
}

/* Dark mode: Alerts Email Preview overrides */
:root[data-theme="dark"] .alerts-email-preview-card {
  background: linear-gradient(
    135deg,
    var(--blue-950) 0%,
    var(--slate-800) 100%
  );
  border-color: var(--surface-info-border);
}

:root[data-theme="dark"] .alerts-email-preview-header {
  background: var(--color-bg-card);
  border-color: var(--color-border);
}

:root[data-theme="dark"] .alerts-email-preview-event {
  background: var(--color-bg-elevated);
  border-left-color: var(--color-info);
}

/* Base Styles */
* {
  box-sizing: border-box;
}

html {
  overflow-x: clip; /* Prevent horizontal scroll on mobile (more reliable than hidden) */
}

/* Skip Navigation Link (Accessibility) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-2) var(--space-4);
  text-decoration: none;
  font-weight: var(--weight-medium);
  z-index: 100;
  border-radius: 0 0 4px;
}

.skip-link:focus {
  top: 0;
}

body {
  font-family: var(--font-sans);
  margin: 0;
  padding: 0;
  padding-top: calc(
    var(--header-height) + var(--content-spacing-top)
  ); /* Fixed header + content spacing */

  background-color: var(--color-bg-page);
  background-image: var(--background-image);
  background-repeat: repeat;
  background-attachment: fixed;
  color: var(--color-text-primary);
  line-height: var(--leading-normal); /* 1.5 */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip; /* Prevent horizontal scroll without breaking position: sticky */
}

.container {
  max-width: 900px;
  width: 100%;
  flex: 1 0 auto;
  margin: 0 auto;
  padding: var(--space-4);
}

.container:has(> .footer:last-child) {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - (var(--header-height) + var(--content-spacing-top)));
}

/* App Header */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
  margin: 0;
  padding: 0;

  /* GPU-accelerated transform for smooth animation */
  will-change: transform;
  transform: translateY(0);
}

/* Smart header: hidden state (scrolling down) */
.app-header.header--hidden {
  transform: translateY(-100%);
}

/* Smart header: smooth transition (respects reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  .app-header {
    transition: transform 200ms ease-out;
  }
}

/* Smart header: no transition for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .app-header {
    transition: none;
  }
}

/* Smart header: keep visible when mobile keyboard is open */
.app-header.header--keyboard-open {
  transform: translateY(0) !important;
}

.header-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) var(--space-4) var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-align: left;
  flex: 1;
  min-width: 0;
}

/* Home Link - Clickable logo to reset filters */
.home-link {
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  transition: opacity var(--transition-base);
  border-radius: 4px;
  color: inherit;
}

.home-link:hover {
  opacity: 0.8;
}

.home-link:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 4px;
}

.app-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-3);
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: 1;
  margin: 0;
  color: inherit;
  font-family: Righteous, sans-serif;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0;
}

.app-logo {
  height: 2.25rem;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  transform: translateY(2px);
}

.beta-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  margin-left: 0;
  border-radius: 999px;
  background: var(--amber-950);
  color: var(--gold-200);
  border: 1px solid var(--amber-700);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: all var(--transition-base);
  cursor: pointer;
}

.beta-badge:hover {
  background: var(--amber-700);
  color: var(--gold-50);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
}

.beta-badge:focus-visible {
  outline: 2px solid var(--gold-200);
  outline-offset: 2px;
}

:root[data-theme="dark"] .app-header {
  background: var(--color-bg-dark);
  border-bottom: 1px solid var(--color-border);
  color: var(--white);
}

:root[data-theme="dark"] .app-logo {
  filter: brightness(0) invert(1);
}

.home-link:hover .app-logo {
  animation: bounce 0.6s ease-in-out;
}

.match-count-header {
  display: none;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 var(--space-2);
}

@media (width >= 768px) {
  .match-count-header {
    display: block;
  }
}

.app-tagline {
  display: none;
}

.header-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  color: var(--color-icon);
}

/* Filter Sections */
.filters-section {
  margin-top: 0;
  margin-bottom: 0;
}

/* Tablet+: restore margins */
@media (width >= 768px) {
  .filters-section {
    margin-top: var(--space-4); /* 16px */
    margin-bottom: var(--space-6); /* 24px */
  }
}

/* Filter Columns - Mobile: Stack, Desktop: 2-column grid */
.filter-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-3); /* 12px between filter groups */
}

.filter-column--primary {
  /* Left column: Clubs + Game Settings */
}

.filter-column--secondary {
  /* Right column: Time + Weekdays */
}

/* Game Settings Section - Groups related filters */
.filter-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-3); /* 12px */
}

.filter-section--game-settings {
  /* Styling for game settings group (level, type, category) */
}

.filter-section__heading {
  font-size: var(--text-xs); /* 12px */
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-tertiary); /* Gray */
  margin: var(--space-4) 0 var(--space-2); /* 16px top, 8px bottom */
  padding: 0 var(--space-2); /* Align with filter group content */
}

/* Filter Subsections - for grouped filters within a section */
.filter-subsection {
  margin-bottom: var(--space-4); /* 16px between subsections */
}

.filter-subsection:last-child {
  margin-bottom: 0;
}

.filter-subsection__label {
  font-size: var(--text-xs); /* 12px */
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-tertiary); /* Gray #9ca3af */
  margin: 0 0 var(--space-2); /* 8px bottom margin */
  padding: 0;
}

/* Desktop: 3-column grid layout with expanded filters by default */
@media (width >= 1024px) {
  .filters-section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-4); /* 16px between columns */
    align-items: start;
  }

  /* Loading element spans full width and doesn't affect grid when hidden */
  .clubs-loading {
    grid-column: 1 / -1;
  }

  .clubs-loading[style*="display: none"] {
    display: none !important;
  }

  /* Filter columns layout */
  .filter-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
  }

  /* Hide section heading on desktop - groups are visually clear */
  .filter-section__heading {
    display: none;
  }
}

/* ============================================
   COLLAPSIBLE FILTER GROUPS
   ============================================ */

.filter-group {
  margin-bottom: var(--space-3); /* Compact 12px spacing */
}

.collapsible-filter {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  overflow: hidden;
  margin-bottom: var(--space-3);
}

.filter-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-card);
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background-color 0.2s ease;
}

.filter-group-header:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: -2px;
}

.filter-header-content {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  min-width: 0;
}

.filter-title-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.filter-group-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.filter-summary {
  font-size: var(--text-sm);
  color: var(--color-primary-hover);
  font-weight: var(--weight-medium);
  margin-left: var(--space-1);
}

.filter-summary:empty {
  display: none;
}

/* Mobile: Stack clubs filter summary below title */
@media (width <= 767px) {
  :is(
      .filter-group-header--clubs,
      .filter-group-header--gameSettings,
      .filter-group-header--when
    )
    .filter-title-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  :is(
      .filter-group-header--clubs,
      .filter-group-header--gameSettings,
      .filter-group-header--when
    )
    .filter-summary {
    margin-left: 0;
    font-size: 12px;
  }
}

.chevron-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-icon);
  transition: transform 0.2s ease;
}

.filter-group-header[aria-expanded="false"] .chevron-icon {
  transform: rotate(-90deg);
}

/* Desktop: Hide chevron and disable header interaction (filters always expanded) */
@media (width >= 1024px) {
  .filter-group-header {
    pointer-events: none;
    cursor: default;
  }

  .filter-group-header .chevron-icon {
    display: none;
  }

  .filter-group-content {
    max-height: none !important;
    opacity: 1 !important;
  }
}

.filter-group-content {
  padding: 0 var(--space-4) var(--space-4);
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    opacity 0.2s ease;
}

.filter-group-content.collapsed {
  max-height: 0 !important;
  padding: 0 var(--space-4);
  opacity: 0;
}

.section-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-icon);
}

/* Legacy filter label - kept for backwards compatibility */
.filter-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin: 0 0 var(--space-3);
}

/* ============================================
   ENHANCED CHIP & BUTTON STYLES
   ============================================ */

/* Club Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 0;
  min-height: 40px;
  align-items: flex-start;
}

button.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--space-3) var(--space-5);
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  font-family: inherit;
  white-space: nowrap;
}

button.chip:hover {
  background: var(--hover-bg-subtle);
  border-color: var(--hover-border-accent);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgb(0 0 0 / 5%);
}

button.chip.active {
  background: var(--color-primary-hover);
  color: var(--white);
  border-color: var(--color-primary-hover);
  font-weight: var(--weight-semibold);
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgb(16 185 129 / 25%);
}

button.chip:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

/* Distance badge inside chip */
.chip-distance {
  margin-left: var(--space-2);
  padding-left: var(--space-2);
  border-left: 1px solid var(--border);
  font-size: var(--text-sm);
  font-weight: var(--weight-normal);
  color: var(--text-muted);
  opacity: 0.8;
}

button.chip.active .chip-distance {
  color: rgb(255 255 255 / 80%);
  border-color: rgb(255 255 255 / 30%);
}

/* View all clubs button */
.view-all-clubs-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-muted);
  font-weight: var(--weight-medium);
}

.view-all-clubs-btn:hover {
  background: var(--bg-hover);
  border-color: var(--color-primary);
  color: var(--text-primary);
}

.view-all-clubs-btn svg {
  flex-shrink: 0;
}

/* Small loading spinner for buttons */
.loading-spinner-small {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================
   LOCATION SELECTOR STYLES
   ============================================ */

.location-selector {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

/* Settings Row - Compact Country/City selectors */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border: none;
  border-radius: var(--radius-lg);
  background: var(--surface-neutral-bg);
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
  transition: background-color var(--transition-base);
  text-align: left;
}

.settings-row:hover {
  background: var(--surface-neutral-hover);
}

.settings-row:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

.settings-row__left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.settings-row__icon {
  color: var(--color-icon);
  flex-shrink: 0;
}

.settings-row__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.settings-row__right {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.settings-row__flag {
  font-size: var(--text-base);
  line-height: 1;
}

.settings-row__value {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
}

.settings-row__chevron {
  color: var(--color-icon);
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.settings-row[aria-expanded="true"] .settings-row__chevron {
  transform: rotate(90deg);
}

/* Disabled state for Country/City rows when GPS not active */
.settings-row--disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}

.settings-row--disabled:hover {
  background: var(--surface-neutral-bg);
}

/* FindNearMe Row - contains button and inline notification */
.find-near-me-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-1);
  min-height: 48px;
}

/* Inline location notification */
.location-notification {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  opacity: 0;
  transition: opacity var(--transition-base);
  flex: 1 1 auto;
  min-width: 0;
}

.location-notification--visible {
  opacity: 1;
}

.location-notification--success {
  color: var(--surface-success-text);
}

.location-notification--error {
  color: var(--text-secondary);
}

/* Hint text below GPS button */
.location-hint {
  margin: 0;
  padding: 0 var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* Hidden country select for programmatic access */
.country-select.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Legacy country-select - kept for JS compatibility */
.country-select {
  width: 100%;
  max-width: 280px;
  min-height: 44px;
  padding: var(--space-3) var(--space-4);
  padding-right: var(--space-10);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background-color: var(--bg-card);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.country-select:hover {
  border-color: var(--color-primary);
}

.country-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgb(16 185 129 / 15%);
}

/* City chips container */
.city-chips {
  margin-top: var(--space-2);
}

/* City chip - inactive state: soft filled surface */
.city-chip {
  background: var(--surface-neutral-bg-strong);
  border-color: var(--surface-neutral-border);
  color: var(--text-primary);
}

.city-chip:hover {
  background: var(--surface-neutral-hover);
  border-color: var(--surface-neutral-border-strong);
}

/* City chip - active state */
.city-chip.active {
  background: var(--color-primary-hover);
  color: var(--white);
  border-color: var(--color-primary-hover);
}

/* FindNearMe Button - Tertiary pill style */
.find-near-me-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-primary);
  border-radius: 999px;
  background: transparent;
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.find-near-me-btn:hover {
  background: var(--color-primary);
  color: var(--white);
}

.find-near-me-btn:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

.find-near-me-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.find-near-me-btn__icon {
  flex-shrink: 0;
  display: none;
}

.find-near-me-btn__icon--default {
  display: block;
}

/* FindNearMe button states */
.find-near-me-btn[data-state="loading"] {
  background: var(--surface-neutral-bg);
  border-color: var(--surface-neutral-border);
  color: var(--text-secondary);
  pointer-events: none;
}

.find-near-me-btn[data-state="loading"] .find-near-me-btn__icon--default {
  display: none;
}

.find-near-me-btn[data-state="loading"] .find-near-me-btn__icon--loading {
  display: block;
  animation: spin 1s linear infinite;
}

.find-near-me-btn[data-state="success"] {
  background: var(--surface-success-bg);
  border-color: var(--surface-success-border);
  color: var(--surface-success-text);
}

.find-near-me-btn[data-state="success"] .find-near-me-btn__icon--default {
  display: none;
}

.find-near-me-btn[data-state="success"] .find-near-me-btn__icon--success {
  display: block;
}

.find-near-me-btn[data-state="error"] {
  background: var(--surface-neutral-bg);
  border-color: var(--surface-neutral-border);
  color: var(--text-secondary);
}

.find-near-me-btn[data-state="error"] .find-near-me-btn__icon--default {
  display: none;
}

.find-near-me-btn[data-state="error"] .find-near-me-btn__icon--error {
  display: block;
}

/* Legacy detect-location-btn - kept for backwards compatibility */
.detect-location-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.detect-location-btn:hover {
  background: var(--hover-bg-subtle);
  color: var(--color-primary-hover);
}

.detect-location-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.detect-location-btn svg {
  flex-shrink: 0;
}

.detect-location-btn .spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(2px);
  }

  25% {
    transform: translateY(-8px);
  }

  50% {
    transform: translateY(2px);
  }

  75% {
    transform: translateY(-4px);
  }
}

.location-empty {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-style: italic;
  margin: var(--space-2) 0;
}

/* Location label - used for Clubs section */
.location-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.location-label .location-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.clubs-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.clubs-section .location-label {
  margin-bottom: var(--space-1);
}

/* Level Filter Buttons */
.level-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 0;
  overflow: auto visible;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   SHARED FILTER PILL BUTTON BASE
   Used by: .level-btn, .type-btn, .category-btn, .quick-availability-btn, .time-btn
   ========================================================================== */

.filter-pill-btn,
.level-btn,
.type-btn,
.category-btn,
.quick-availability-btn,
.time-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: 44px;
  padding: var(--space-3) var(--space-5);
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  font-family: inherit;
  white-space: nowrap;
}

.filter-pill-btn:hover,
.level-btn:hover,
.type-btn:hover,
.category-btn:hover,
.quick-availability-btn:hover,
.time-btn:hover {
  background: var(--hover-bg-subtle);
  border-color: var(--hover-border-accent);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgb(0 0 0 / 5%);
}

.filter-pill-btn.active,
.level-btn.active,
.type-btn.active,
.category-btn.active,
.quick-availability-btn.active,
.time-btn.active {
  background: var(--color-primary-hover);
  color: var(--white);
  border-color: var(--color-primary-hover);
  font-weight: var(--weight-semibold);
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgb(16 185 129 / 25%);
}

.filter-pill-btn:focus-visible,
.level-btn:focus-visible,
.type-btn:focus-visible,
.category-btn:focus-visible,
.quick-availability-btn:focus-visible,
.time-btn:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

/* Level button specific: has SVG icons */
.level-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* "My Level" personalized filter button */
.level-btn--my-level {
  border-color: var(--color-primary);
  color: var(--color-primary);
  gap: var(--space-2);
}

.level-btn--my-level:hover {
  background: var(--surface-success-bg);
  border-color: var(--color-primary-hover);
  color: var(--color-primary-hover);
}

.level-btn--my-level.active {
  background: var(--color-primary-hover);
  color: var(--color-text-inverse);
  border-color: var(--color-primary-hover);
}

/* Recommended badge on event cards */
.detail-item.detail-recommended {
  background: var(--surface-success-bg);
  border-color: var(--surface-success-border);
  color: var(--surface-success-text);
}

/* ============================================
   Bookmark / Save Button
   ============================================ */

/* ── Base bookmark button (all surfaces) ─────────────────── */
.btn-bookmark {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--color-text-tertiary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 200ms ease,
    background 200ms ease;
}

.btn-bookmark .bookmark-icon-filled {
  display: none;
}

.btn-bookmark .bookmark-icon-outline {
  display: block;
}

@media (hover: hover) {
  .btn-bookmark:hover {
    background: var(--surface-neutral-bg);
    color: var(--color-primary);
  }
}

.btn-bookmark:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

/* ── Active / "Saved" state ─── */
.btn-bookmark--active {
  color: var(--color-primary);
}

.btn-bookmark--active .bookmark-icon-filled {
  display: block;
}

.btn-bookmark--active .bookmark-icon-outline {
  display: none;
}

@media (hover: hover) {
  .btn-bookmark--active:hover {
    background: var(--surface-error-bg);
    color: var(--color-error);
  }
}

/* ── Bookmark spring animation ─── */
@keyframes bookmark-fill {
  0% {
    transform: scale(1);
  }

  30% {
    transform: scale(0.8);
  }

  60% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

.btn-bookmark--animating {
  animation: bookmark-fill 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Card variant — inline inside the RSVP social bar ─── */
.btn-bookmark--card {
  position: relative;
  top: auto;
  right: auto;
  width: 36px;
  height: 36px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Remove extra header padding — bookmark is no longer overlapping */
.event-card .event-card-header {
  padding-right: 0;
}

/* ── Detail page variant — inside actions row, not absolute ─── */
.btn-bookmark--detail {
  position: relative;
  top: auto;
  right: auto;
  width: auto;
  height: auto;
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full, 999px);
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  font-family: inherit;
  color: var(--color-text-secondary);
}

.btn-bookmark--detail .bookmark-label {
  display: inline;
}

.btn-bookmark--detail .bookmark-icon-outline,
.btn-bookmark--detail .bookmark-icon-filled {
  width: 16px;
  height: 16px;
}

@media (hover: hover) {
  .btn-bookmark--detail:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--surface-success-bg);
  }
}

.btn-bookmark--detail.btn-bookmark--active {
  border-color: var(--color-primary);
  background: var(--surface-success-bg);
  color: var(--color-primary);
}

@media (hover: hover) {
  .btn-bookmark--detail.btn-bookmark--active:hover {
    border-color: var(--color-error);
    background: var(--surface-error-bg);
    color: var(--color-error);
  }
}

/* ── Interested count in RSVP bar ─── */
.rsvp-bar-interested-count {
  color: var(--color-primary);
  font-weight: var(--weight-medium);
}

/* ============================================
   RSVP / "I'm Going" Button
   ============================================ */

/* ── RSVP Social Bar (homepage cards) ────────────────────── */
.event-rsvp-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-neutral-bg);
  border-radius: 10px;
  border: 1px solid var(--color-border);
  margin-top: var(--space-3);
  min-height: 40px;
}

/* Skeleton pulse while bar content loads */
.event-rsvp-bar--loading {
  position: relative;
  overflow: hidden;
}

.event-rsvp-bar--loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgb(from var(--color-text-tertiary) r g b / 6%) 50%,
    transparent 100%
  );
  animation: rsvp-bar-shimmer 1.4s ease-in-out infinite;
}

@keyframes rsvp-bar-shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.event-rsvp-bar .attendee-stack-mini {
  margin-left: 0;
  flex-shrink: 0;
}

.rsvp-bar-text {
  flex: 1;
  min-width: 0;
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: var(--leading-tight);
}

.rsvp-bar-text strong {
  color: var(--color-text-primary);
  font-weight: var(--weight-semibold);
}

/* ---- Base RSVP button ---- */
.btn-rsvp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 5px 14px;
  border: 1.5px solid var(--color-primary);
  border-radius: 999px;
  background: transparent;
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  font-family: inherit;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 200ms ease,
    border-color 200ms ease,
    color 200ms ease,
    box-shadow 200ms ease,
    transform 120ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) {
  .btn-rsvp:hover {
    background: var(--surface-success-bg);
    box-shadow: 0 0 0 3px rgb(16 185 129 / 10%);
  }
}

.btn-rsvp:active {
  transform: scale(0.93);
}

.btn-rsvp:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

.btn-rsvp:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ---- Active / "Going" state ---- */
.btn-rsvp--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-inverse);
  animation: rsvp-pop 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes rsvp-pop {
  0% {
    transform: scale(0.85);
  }

  50% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

.btn-rsvp--active .rsvp-icon {
  color: var(--color-text-inverse);
}

/* Hover on active: show "Leave" intent */
@media (hover: hover) {
  .btn-rsvp--active:hover {
    background: var(--color-error);
    border-color: var(--color-error);
    color: var(--color-text-inverse);
    box-shadow: 0 0 0 3px rgb(239 68 68 / 12%);
  }

  .btn-rsvp--active:hover .rsvp-icon {
    color: var(--color-text-inverse);
  }

  /* Swap "Going ✓" → "Leave" on hover */
  .btn-rsvp--active:hover .rsvp-label {
    font-size: 0;
  }

  .btn-rsvp--active:hover .rsvp-label::after {
    content: "Leave";
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
  }
}

/* ---- RSVP icon (checkmark) ---- */
.rsvp-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  transition: color var(--transition-base);
}

/* ---- Attendee count badge ---- */
.rsvp-count {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  white-space: nowrap;
  font-weight: var(--weight-medium);
}

.rsvp-count:empty {
  display: none;
}

/* ---- Detail-page variant (larger, more prominent) ---- */
.btn-rsvp--detail {
  min-height: 44px;
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-base);
  gap: var(--space-2);
}

.btn-rsvp--detail .rsvp-icon {
  width: 16px;
  height: 16px;
}

/* ── Detail-page Social Proof Bar ────────────────────────── */
.event-rsvp-bar--detail {
  padding: var(--space-3) var(--space-4);
  min-height: 52px;
  border-radius: 12px;
}

.rsvp-bar-text--detail {
  font-size: var(--text-sm);
}

.attendee-stack-mini--detail .attendee-avatar-mini {
  width: 28px;
  height: 28px;
  margin-left: -7px;
  border-width: 2px;
}

.attendee-stack-mini--detail .attendee-avatar-mini:first-child {
  margin-left: 0;
}

.attendee-stack-mini--detail .attendee-avatar-mini--initials {
  font-size: 10px;
}

/* ---- Event detail page actions row ---- */
.event-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
  align-items: center;
}

.btn-secondary-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color var(--transition-base),
    color var(--transition-base),
    background var(--transition-base);
}

@media (hover: hover) {
  .btn-secondary-action:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--surface-success-bg);
  }
}

.btn-secondary-action:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

.btn-secondary-action svg {
  flex-shrink: 0;
}

/* ============================================
   Attendee Avatars (Event Detail Page)
   ============================================ */

.attendee-list {
  margin-top: var(--space-3);
}

.attendee-stack {
  display: flex;
  align-items: center;
}

.attendee-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--color-bg-card);
  object-fit: cover;
  margin-left: -8px;
  position: relative;
  flex-shrink: 0;
}

.attendee-avatar:first-child {
  margin-left: 0;
}

/* "You" highlight ring on event detail avatars */
.attendee-avatar--you {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary);
}

.attendee-avatar-wrapper {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-left: -8px;
}

.attendee-avatar-wrapper:first-child {
  margin-left: 0;
}

.attendee-avatar-wrapper .attendee-avatar {
  margin-left: 0;
}

.attendee-you-label {
  display: block;
  margin-top: var(--space-1);
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  line-height: 1;
  text-align: center;
  user-select: none;
}

.attendee-avatar--initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  user-select: none;
}

.attendee-avatar--overflow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  user-select: none;
}

.attendee-names {
  margin: var(--space-2) 0 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-normal);
}

/* ── Mini Avatar Stack (Homepage Cards) ──────────────────── */

.attendee-stack-mini {
  display: inline-flex;
  align-items: center;
  margin-left: var(--space-2);
  vertical-align: middle;
}

.attendee-avatar-mini {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--color-bg-card);
  object-fit: cover;
  margin-left: -6px;
  flex-shrink: 0;
}

.attendee-avatar-mini:first-child {
  margin-left: 0;
}

/* "You" highlight ring on homepage card mini avatars */
.attendee-avatar-mini--you {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1.5px var(--color-primary);
}

.attendee-avatar-mini--initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: 9px;
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  user-select: none;
}

.attendee-avatar-mini--cartoon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-card);
  overflow: hidden;
  padding: 0;
}

.attendee-avatar-mini--cartoon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ============================================
   Upcoming Events (Profile)
   ============================================ */

/* ── My Events Section (Profile) ─────────────────────────── */

.my-events-section {
  margin-bottom: var(--space-4);
}

.my-events-count {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-primary);
  background: rgb(from var(--color-primary) r g b / 10%);
  padding: 2px var(--space-2);
  border-radius: var(--radius-full, 99px);
  margin-left: var(--space-2);
  vertical-align: middle;
}

.my-events-tabs {
  display: flex;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-1);
}

.my-events-tab {
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md, 8px) var(--radius-md, 8px) 0 0;
  position: relative;
  transition: color var(--transition-base);
}

.my-events-tab:hover {
  color: var(--color-text-primary);
}

.my-events-tab--active {
  color: var(--color-primary);
}

.my-events-tab--active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: var(--space-2);
  right: var(--space-2);
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px 2px 0 0;
}

.my-events-panel {
  min-height: 60px;
}

.my-events-loading {
  text-align: center;
  padding: var(--space-4);
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
}

.my-events-group {
  margin-bottom: var(--space-3);
}

.my-events-group-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-tertiary);
  margin: 0 0 var(--space-2) 0;
  padding: 0;
}

.my-events-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.my-event-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
  text-decoration: none;
  color: inherit;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.my-event-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.my-event-card--past {
  opacity: 0.75;
}

.my-event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md, 8px);
  background: var(--color-bg-page);
  flex-shrink: 0;
}

.my-event-day {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  text-transform: uppercase;
}

.my-event-datenum {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.my-event-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.my-event-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-event-meta {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.my-event-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.my-event-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: var(--weight-medium);
  padding: 1px 6px;
  border-radius: var(--radius-full, 99px);
  line-height: 1.4;
}

.my-event-badge--category {
  background: rgb(from var(--color-info) r g b / 12%);
  color: var(--color-info);
}

.my-event-badge--level {
  background: rgb(from var(--color-primary) r g b / 12%);
  color: var(--color-primary);
}

.my-event-badge--type {
  background: rgb(from var(--color-warning) r g b / 12%);
  color: var(--color-warning);
}

.my-event-footer {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: 4px;
}

.my-event-going {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}

.my-event-going:empty {
  display: none;
}

.my-event-chevron {
  flex-shrink: 0;
  color: var(--color-text-tertiary);
  margin-top: var(--space-1);
}

/* Wrapper keeps card + RSVP bar flush with a single continuous border */
.my-event-card-wrapper {
  display: flex;
  flex-direction: column;
}

.my-event-card-wrapper:has(.my-event-card--has-bar) {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.my-event-card-wrapper:has(.my-event-card--has-bar):hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* When card has a bar below, remove its own border (wrapper handles it) */
.my-event-card--has-bar {
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
}

.my-event-card--has-bar:hover {
  border: none;
  box-shadow: none;
}

/* Profile RSVP bar: sits below the card link */
.event-rsvp-bar--profile {
  margin-top: 0;
  margin-bottom: 0;
  border: none;
  border-top: 1px solid var(--color-border);
  border-radius: 0;
}

/* Suppress pop animation on profile cards (they load pre-active) */
.event-rsvp-bar--profile .btn-rsvp--active {
  animation: none;
}

/* Empty state */
.my-events-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-6) var(--space-4);
  color: var(--color-text-tertiary);
}

.my-events-empty svg {
  margin-bottom: var(--space-3);
  opacity: 0.5;
}

.my-events-empty-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-1) 0;
}

.my-events-empty-text {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-3) 0;
  max-width: 260px;
}

.my-events-empty-hint {
  text-align: center;
  padding: var(--space-4);
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
}

.my-events-browse-btn {
  font-size: var(--text-xs);
}

.my-events-show-more {
  text-align: center;
  padding: var(--space-2);
  color: var(--color-text-tertiary);
  font-size: var(--text-xs);
}

/* ── Legacy upcoming-events (kept for compat, to be removed) ─ */
.upcoming-events-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.upcoming-event-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
  text-decoration: none;
  color: inherit;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.upcoming-event-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.upcoming-event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md, 8px);
  background: var(--color-bg-page);
}

.upcoming-event-day {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  text-transform: uppercase;
}

.upcoming-event-datenum {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.upcoming-event-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.upcoming-event-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upcoming-event-meta {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.upcoming-event-chevron {
  flex-shrink: 0;
  color: var(--color-text-tertiary);
}

/* Type Filter Container */
.type-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 0;
}

/* Category Filter Container */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 0;
}

/* ============================================
   QUICK AVAILABILITY FILTER (OR logic pills)
   ============================================ */

.quick-availability-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 0;
}

/* Time of Day Filter Container */
.time-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 0;
}

/* ============================================
   WEEKDAY SEGMENTED CONTROL
   ============================================ */

.weekday-segmented-control {
  display: flex;
  gap: 0;
  margin-top: 4px;
  margin-bottom: 0;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card);
}

.weekday-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 44px;
  padding: var(--space-2) var(--space-1);
  border: none;
  border-right: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  font-family: inherit;
  position: relative;
}

.weekday-btn:last-child {
  border-right: none;
}

.weekday-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.weekday-btn.active {
  background: var(--color-primary-hover);
  color: var(--white);
  font-weight: var(--weight-bold);
  z-index: 1;
}

.weekday-btn:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: -2px;
  z-index: 2;
}

/* Responsive day labels */
.weekday-abbr {
  display: none;
}

.weekday-full {
  display: inline;
}

@media (width <= 480px) {
  .weekday-abbr {
    display: inline;
  }

  .weekday-full {
    display: none;
  }

  .weekday-btn {
    padding: var(--space-2) var(--space-1);
    font-size: var(--text-xs);
  }
}

/* Legacy weekday filter - kept for backwards compatibility */
.weekday-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
}

/* ============================================
   DATE FILTER (Airbnb-inspired)
   ============================================ */

.date-filter {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: relative;
}

.date-range-inputs {
  display: flex;
  align-items: flex-end;
  width: 100%;
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  transition: all var(--transition-base);
  overflow: hidden;
}

.date-range-inputs:hover {
  border-color: var(--color-text-secondary);
  box-shadow: 0 2px 8px rgb(0 0 0 / 8%);
}

.date-range-inputs:focus-within {
  border-color: var(--color-text-primary);
  box-shadow: 0 0 0 2px rgb(17 24 39 / 15%);
}

.date-input-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  min-height: 56px;
  position: relative;
}

.date-range-divider {
  width: 1px;
  height: 32px;
  background-color: var(--color-border);
  align-self: center;
  margin: 0;
}

.date-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.date-input {
  width: 100%;
  padding: 0;
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  color: var(--color-text-primary);
  background-color: transparent;
  border: none;
  transition: all var(--transition-base);
  cursor: pointer;
}

.date-input:hover {
  color: var(--color-text-primary);
}

.date-input:focus {
  outline: none;
}

.date-input::placeholder {
  color: var(--color-text-tertiary);
  font-weight: var(--weight-normal);
}

/* Date input value styling */
.date-input::-webkit-datetime-edit {
  color: var(--color-text-primary);
}

.date-input::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* Clear date button - Airbnb style */
.clear-date-btn {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  background-color: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  text-decoration: underline;
  align-self: flex-start;
}

.clear-date-btn:hover {
  background-color: var(--bg-hover);
}

.clear-date-btn:active {
  transform: scale(0.98);
}

.clear-date-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ============================================
   CALENDAR PICKER (Airbnb-style)
   ============================================ */

.date-range-trigger {
  display: flex;
  align-items: stretch;
  width: 100%;
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  transition: all var(--transition-base);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
}

.date-range-trigger:hover {
  border-color: var(--color-text-secondary);
  box-shadow: 0 2px 8px rgb(0 0 0 / 8%);
}

.date-range-trigger:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.date-trigger-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  min-height: 56px;
}

.date-trigger-divider {
  width: 1px;
  background-color: var(--color-border);
  align-self: stretch;
}

.date-trigger-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.date-trigger-value {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
}

.date-trigger-value.has-date {
  color: var(--color-text-primary);
  font-weight: var(--weight-medium);
}

/* Calendar picker popup */
.calendar-picker {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  width: calc(100% - var(--space-8));
  max-width: 700px;
  max-height: calc(100vh - var(--space-8));
  overflow-y: auto;
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow:
    0 4px 24px rgb(0 0 0 / 12%),
    0 8px 48px rgb(0 0 0 / 8%);
}

/* Backdrop for calendar picker */
.calendar-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background-color: rgb(0 0 0 / 30%);
}

.calendar-picker-content {
  padding: var(--space-5);
}

.calendar-months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.calendar-month {
  min-width: 0;
}

.calendar-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  padding: 0 var(--space-1);
}

.calendar-month-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  text-align: center;
  flex: 1;
}

.calendar-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--color-text-primary);
  transition: background-color var(--transition-base);
}

.calendar-nav-btn:hover {
  background-color: var(--bg-hover);
}

.calendar-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.calendar-nav-spacer {
  width: 32px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  margin-bottom: var(--space-2);
}

.calendar-weekdays span {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-tertiary);
  text-align: center;
  padding: var(--space-2) 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  border-radius: 50%;
  margin: 2px 0;
}

.calendar-day:hover:not(
    :disabled,
    .calendar-day--selected,
    .calendar-day--in-range
  ) {
  background-color: var(--bg-hover);
}

.calendar-day:disabled {
  color: var(--color-text-tertiary);
  opacity: 0.4;
  cursor: not-allowed;
}

.calendar-day--empty {
  visibility: hidden;
}

.calendar-day--today {
  font-weight: var(--weight-semibold);
}

.calendar-day--today::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background-color: var(--color-text-primary);
  border-radius: 50%;
}

.calendar-day--selected {
  background-color: var(--color-text-primary);
  color: var(--color-bg-card);
  font-weight: var(--weight-semibold);
}

.calendar-day--selected::after {
  display: none;
}

.calendar-day--in-range {
  background-color: var(--bg-hover);
  border-radius: 0;
}

.calendar-day--range-start {
  border-radius: 50% 0 0 50%;
}

.calendar-day--range-end {
  border-radius: 0 50% 50% 0;
}

.calendar-day--range-start.calendar-day--range-end {
  border-radius: 50%;
}

/* Calendar footer (quick select + actions) */
.calendar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.calendar-quick-select {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.calendar-quick-btn {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  background-color: transparent;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.calendar-quick-btn:hover {
  background-color: var(--bg-hover);
  border-color: var(--color-text-secondary);
}

.calendar-quick-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.calendar-quick-btn.active {
  background-color: var(--color-text-primary);
  color: var(--color-bg-card);
  border-color: var(--color-text-primary);
}

/* Calendar actions */
.calendar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.calendar-clear-btn {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  background: transparent;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  transition: all var(--transition-base);
}

.calendar-clear-btn:hover {
  background-color: var(--bg-hover);
  border-radius: 8px;
}

.calendar-close-btn {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-bg-card);
  background-color: var(--color-text-primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-base);
}

.calendar-close-btn:hover {
  opacity: 0.9;
}

/* Mobile responsive calendar */
@media (width <= 640px) {
  .calendar-picker {
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }

  .calendar-picker-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: var(--space-4);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .calendar-months {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    flex: 1;
  }

  .calendar-month {
    position: relative;
  }

  .calendar-month[data-month-offset="0"] .calendar-nav-spacer,
  .calendar-month[data-month-offset="1"] .calendar-nav-spacer {
    display: none;
  }

  .calendar-month[data-month-offset="0"] .calendar-month-header,
  .calendar-month[data-month-offset="1"] .calendar-month-header {
    justify-content: center;
  }

  .calendar-month[data-month-offset="0"] .calendar-nav-btn,
  .calendar-month[data-month-offset="1"] .calendar-nav-btn {
    position: absolute;
    top: 0;
  }

  .calendar-month[data-month-offset="0"] .calendar-prev {
    left: 0;
  }

  .calendar-month[data-month-offset="1"] .calendar-next {
    right: 0;
  }

  .calendar-footer {
    flex-wrap: wrap;
    gap: var(--space-2);
    flex-shrink: 0;
  }

  .calendar-quick-select {
    flex: 1;
    min-width: 0;
  }

  .calendar-actions {
    flex-shrink: 0;
  }

  .calendar-close-btn {
    padding: var(--space-2) var(--space-4);
  }

  .date-trigger-section {
    padding: var(--space-2) var(--space-3);
    min-height: 48px;
  }
}

@media (width <= 640px) {
  .date-range-inputs {
    flex-direction: column;
    align-items: stretch;
  }

  .date-range-divider {
    width: 100%;
    height: 1px;
    margin: 0;
  }
}

@media (width <= 640px) {
  .date-range-inputs {
    flex-direction: column;
  }
}

/* ============================================
   ACTIVE FILTERS CHIPS (in preview header)
   ============================================ */

.active-filters-chips {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;

  /* flex: 1; */
  min-width: 0;
}

.active-filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 32px;
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
  background: var(--color-primary-hover);
  color: var(--color-text-inverse);
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.active-filter-chip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  background: rgb(255 255 255 / 20%);
  border: none;
  border-radius: 50%;
  color: var(--color-text-inverse);
  cursor: pointer;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.active-filter-chip button:hover {
  background: rgb(255 255 255 / 30%);
}

.active-filter-chip button:focus-visible {
  outline: 2px solid var(--color-text-inverse);
  outline-offset: 1px;
}

.active-filter-chip button svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.5;
}

.clear-all-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 32px;
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-3);
  background: var(--color-error);
  border: 1px solid var(--color-error);
  border-radius: 999px;
  color: var(--color-text-inverse);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.clear-all-btn.visible {
  display: inline-flex;
}

.clear-all-btn svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  background: rgb(255 255 255 / 20%);
  border-radius: 50%;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
  stroke-width: 2.5;
}

.clear-all-btn:hover {
  background: var(--red-700);
  border-color: var(--red-700);
  color: var(--color-text-inverse);
}

.clear-all-btn:hover svg {
  background: rgb(255 255 255 / 30%);
}

.clear-all-btn:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

/* Loading State for Clubs */
.clubs-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: var(--space-2);
  padding: var(--space-8) 0;
}

.loading-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: var(--weight-medium);
  margin: 0;
  text-align: center;
}

/* Screen reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================================================================
   LEGACY FILTER BAR (DORMANT CSS)
   TODO: Remove in future cleanup - replaced by filter-sheet.css
   Estimated lines: ~10
   ========================================================================== */
.filter-bar {
  display: none;
}

button#btnFilter {
  display: none;
}

/* END LEGACY FILTER BAR */

#status {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

#status .error {
  color: var(--error);
  font-weight: 500;
}

/* Preview Header with Active Filters */
#previewHeader {
  margin-bottom: var(--space-5); /* 20px */
  padding: var(--space-4); /* 16px */
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border);
}

#matchCount {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: var(--space-2); /* 8px */
}

#filterSummary {
  display: block;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-3); /* 12px */
}

#filterSummary:empty {
  display: none;
}

/* Preview header row for filters and clear button */
.preview-header-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Active filter chips inside preview header */
#previewHeader .active-filters-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.preview-header-row .active-filters-chips {
  margin-bottom: 0;
}

#previewHeader .active-filters-chips:empty {
  margin-bottom: 0;
}

/* ==========================================================================
   ALERTS BUTTON (TEMPORARILY HIDDEN)
   TODO: Restore when alerts feature is ready
   Styles kept for future use - button hidden via display:none
   ========================================================================== */

/* Alerts button in preview header - HIDDEN until feature is complete */
.alerts-btn-header {
  /* Temporarily hidden - remove this line to restore */
  display: none !important;

  /* Original styles preserved below */

  /* display: inline-flex; */
  align-items: center;
  gap: var(--space-2);
  height: 40px;
  padding: 0 var(--space-4);
  background: var(--surface-info-bg);
  border: 1px solid var(--surface-info-border);
  border-radius: 999px;
  color: var(--surface-info-text);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: var(--space-3);
}

.alerts-btn-header img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  filter: invert(19%) sepia(95%) saturate(1819%) hue-rotate(211deg)
    brightness(92%) contrast(92%);
}

.alerts-btn-header:hover {
  background: color-mix(
    in srgb,
    var(--surface-info-bg) 88%,
    var(--color-bg-card) 12%
  );
  border-color: color-mix(
    in srgb,
    var(--surface-info-border) 80%,
    var(--surface-info-text) 20%
  );
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgb(from var(--surface-info-text) r g b / 10%);
}

.alerts-btn-header:focus-visible {
  outline: 2px solid var(--color-info);
  outline-offset: 2px;
}

/* Alerts enabled state */
.alerts-btn-header.alerts-enabled {
  background: var(--surface-success-bg);
  border-color: var(--surface-success-border);
  color: var(--surface-success-text);
}

.alerts-btn-header.alerts-enabled img {
  filter: invert(61%) sepia(59%) saturate(426%) hue-rotate(95deg)
    brightness(92%) contrast(86%);
}

.alerts-btn-header.alerts-enabled:hover {
  background: color-mix(
    in srgb,
    var(--surface-success-bg) 85%,
    var(--color-bg-card) 15%
  );
  border-color: color-mix(
    in srgb,
    var(--surface-success-border) 80%,
    var(--color-primary-hover) 20%
  );
  box-shadow: 0 2px 4px rgb(from var(--color-primary) r g b / 10%);
}

.alerts-btn-header .alerts-btn-enabled {
  display: none;
}

/* Events sort info text */
.events-sort-info {
  display: none;
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

@media (width >= 768px) {
  .events-sort-info {
    display: block;
    margin-bottom: 1em;
    margin-top: 0;
  }
}

/* Mobile: Stack clear all button at bottom, full width */
@media (width <= 767px) {
  .preview-header-row {
    flex-direction: column;
    align-items: stretch;
  }

  #previewHeader .active-filters-chips {
    margin-bottom: 8px;
  }

  #previewHeader .clear-all-btn {
    width: 100%;
  }

  .alerts-btn-header {
    width: 100%;
    justify-content: center;
  }
}

/* Happening Soon Section */
.happening-soon {
  margin-bottom: var(--space-10); /* 40px */
  padding: var(--space-5); /* 20px */
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-accent) 100%
  );
  box-shadow: var(--shadow-md);
  overflow: clip; /* Clip horizontal bleed on mobile; dropdowns contained */
  position: relative; /* Create stacking context */
  z-index: 10; /* Ensure section and dropdowns appear above other content */
  isolation: isolate; /* Create independent stacking context for children */

  /* Mobile: full-width edge-to-edge (compensate for container padding) */
  margin-left: calc(-1 * var(--space-4));
  margin-right: calc(-1 * var(--space-4));
  border-radius: 0;
}

/* Tablet+: restore contained layout */
@media (width >= 768px) {
  .happening-soon {
    overflow: visible; /* Allow dropdowns on tablet+ */
    margin-left: 0;
    margin-right: 0;
    border-radius: 16px;
  }
}

.happening-header {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-inverse);
  margin: 0 0 var(--space-4); /* 16px */
  display: flex;
  align-items: center;
  gap: var(--space-2); /* 8px */
}

.happening-header svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: currentcolor;
}

.happening-subtitle {
  font-size: 0.875rem;
  color: rgb(from var(--color-text-inverse) r g b / 90%);
  margin: 0 0 var(--space-4); /* 16px */
  display: none; /* Hidden per feedback */
}

.happening-soon .events-list {
  gap: var(--space-4); /* 16px */
  position: relative; /* Establish positioning context */
  z-index: 1; /* Above section background */
}

.happening-soon .event-card {
  background: rgb(255 255 255 / 95%);
  backdrop-filter: blur(10px);
  position: relative; /* Required for z-index */
  z-index: 1; /* Base z-index for cards */
}

/* Boost z-index for happening-soon cards with open dropdowns */
.happening-soon .event-card.has-open-dropdown {
  z-index: 100; /* Much higher than siblings to appear above show-more button */
}

@media (hover: hover) {
  .happening-soon .event-card:hover {
    box-shadow: var(--hover-shadow);
    border-color: var(--brand-primary);
    background: rgb(255 255 255 / 100%);
    transform: translateY(-2px);
  }
}

/* ============================================
   Horizontal Scroll Variant (mobile only)
   Usage: Add .happening-soon--horizontal to section
   
   Best practices applied:
   - Single row layout (not stacked)
   - ~85% viewport width cards with peek of next card
   - Scroll-snap for smooth stopping
   - Max 45-50% screen height per card
   - Hidden scrollbar for clean look
   ============================================ */
.happening-soon--horizontal .events-list {
  flex-direction: row;
  overflow: auto clip;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--space-5);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;

  /* Extend to full width for edge-to-edge scroll */
  margin-left: calc(-1 * var(--space-5));
  margin-right: calc(-1 * var(--space-5));
  padding-left: var(--space-5);
  padding-right: var(--space-5);
  padding-bottom: var(--space-2); /* Extra space for shadows */
}

.happening-soon--horizontal .events-list::-webkit-scrollbar {
  display: none;
}

.happening-soon--horizontal .event-card {
  flex: 0 0 auto;

  /* 85% viewport width minus section padding, shows ~15% peek of next card */
  width: calc(85vw - var(--space-5) * 2);
  min-width: calc(85vw - var(--space-5) * 2);
  max-width: 320px; /* Cap max width for larger phones */
  scroll-snap-align: start;
}

/* Very small screens: wider cards, smaller peek */
@media (width < 360px) {
  .happening-soon--horizontal .event-card {
    width: calc(90vw - var(--space-5) * 2);
    min-width: calc(90vw - var(--space-5) * 2);
  }
}

/* Wide phones (380-767px): larger cards for better screen utilization */
@media (380px <= width < 768px) {
  .happening-soon--horizontal .event-card {
    max-width: 360px;
  }
}

/* Tablet+: revert to vertical layout */
@media (width >= 768px) {
  .happening-soon--horizontal .events-list {
    flex-direction: column;
    overflow-x: visible;
    scroll-snap-type: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
  }

  .happening-soon--horizontal .event-card {
    width: auto;
    min-width: 0;
    max-width: none;
    scroll-snap-align: unset;
  }
}

/* Almost Full Section (Urgency) */
.almost-full {
  margin-bottom: var(--space-10); /* 40px */
  padding: var(--space-5); /* 20px */
  background: linear-gradient(
    135deg,
    var(--color-warning) 0%,
    var(--amber-700) 100%
  ); /* Amber gradient for urgency */

  box-shadow: var(--shadow-md);
  overflow: clip; /* Clip horizontal bleed on mobile; dropdowns contained */
  position: relative; /* Create stacking context */
  z-index: 9; /* Below happening-soon but above club sections */
  isolation: isolate; /* Create independent stacking context for children */

  /* Mobile: full-width edge-to-edge (compensate for container padding) */
  margin-left: calc(-1 * var(--space-4));
  margin-right: calc(-1 * var(--space-4));
  border-radius: 0;
}

/* Tablet+: restore contained layout */
@media (width >= 768px) {
  .almost-full {
    overflow: visible; /* Allow dropdowns on tablet+ */
    margin-left: 0;
    margin-right: 0;
    border-radius: 16px;
  }
}

.almost-full-header {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-inverse);
  margin: 0 0 var(--space-4); /* 16px */
  display: flex;
  align-items: center;
  gap: var(--space-2); /* 8px */
}

.almost-full-header svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: currentcolor;
}

.almost-full .events-list {
  gap: var(--space-4); /* 16px */
  position: relative; /* Establish positioning context */
  z-index: 1; /* Above section background */
}

.almost-full .event-card {
  background: rgb(255 255 255 / 95%);
  backdrop-filter: blur(10px);
  position: relative; /* Required for z-index */
  z-index: 1; /* Base z-index for cards */
}

/* Boost z-index for almost-full cards with open dropdowns */
.almost-full .event-card.has-open-dropdown {
  z-index: 100; /* Much higher than siblings to appear above show-more button */
}

@media (hover: hover) {
  .almost-full .event-card:hover {
    box-shadow: var(--hover-shadow);
    border-color: var(--color-warning);
    background: rgb(255 255 255 / 100%);
    transform: translateY(-2px);
  }
}

/* Horizontal scroll variant for almost-full (mobile only) */
.almost-full--horizontal .events-list {
  flex-direction: row;
  overflow: auto clip;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--space-5);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;

  /* Extend to full width for edge-to-edge scroll */
  margin-left: calc(-1 * var(--space-5));
  margin-right: calc(-1 * var(--space-5));
  padding-left: var(--space-5);
  padding-right: var(--space-5);
  padding-bottom: var(--space-2); /* Extra space for shadows */
}

.almost-full--horizontal .events-list::-webkit-scrollbar {
  display: none;
}

.almost-full--horizontal .event-card {
  flex: 0 0 auto;
  width: calc(85vw - var(--space-5) * 2);
  min-width: calc(85vw - var(--space-5) * 2);
  max-width: 320px; /* Cap max width for larger phones */
  scroll-snap-align: start;
}

/* Very small screens: wider cards, smaller peek */
@media (width < 360px) {
  .almost-full--horizontal .event-card {
    width: calc(90vw - var(--space-5) * 2);
    min-width: calc(90vw - var(--space-5) * 2);
  }
}

/* Wide phones (380-767px): larger cards for better screen utilization */
@media (380px <= width < 768px) {
  .almost-full--horizontal .event-card {
    max-width: 360px;
  }
}

/* Tablet+: revert to vertical layout */
@media (width >= 768px) {
  .almost-full--horizontal .events-list {
    flex-direction: column;
    overflow-x: visible;
    scroll-snap-type: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
  }

  .almost-full--horizontal .event-card {
    width: auto;
    min-width: 0;
    max-width: none;
    scroll-snap-align: unset;
  }
}

/* ============================================
   My Games Section (logged-in user's RSVPs + friends' games)
   Horizontal scroll strip at top of homepage
   ============================================ */
#myGamesSection {
  margin-bottom: var(--space-6); /* 24px */
}

.my-games-group {
  margin-bottom: var(--space-5); /* 20px */
}

.my-games-group:last-child {
  margin-bottom: 0;
}

.my-games-header {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-3); /* 12px */
  display: flex;
  align-items: center;
  gap: var(--space-2); /* 8px */
}

.my-games-header svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-primary);
}

.my-games-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 var(--space-2); /* 8px */
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-xs); /* 12px */
  font-weight: var(--weight-semibold);
  line-height: 1;
}

/* Favorites toggle inside Friends' Games header */
.my-games-fav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full, 999px);
  background: var(--color-bg-card);
  color: var(--color-text-tertiary);
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.my-games-fav-toggle:hover {
  color: var(--color-warning);
  border-color: var(--color-warning);
}

.my-games-fav-toggle.filter-active {
  background: var(--color-warning);
  border-color: var(--color-warning);
  color: var(--white);
}

.my-games-fav-toggle.filter-active:hover {
  background: color-mix(in srgb, var(--color-warning) 85%, black);
  border-color: color-mix(in srgb, var(--color-warning) 85%, black);
}

.my-games-empty-hint {
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
  padding: var(--space-3) 0;
}

.my-games-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  gap: var(--space-3); /* 12px */
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-2); /* Shadow space */
  padding-right: var(--space-4); /* Prevent last card from being clipped */
}

.my-games-list::-webkit-scrollbar {
  display: none;
}

.my-games-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  width: calc(80vw - var(--space-5) * 2);
  min-width: calc(80vw - var(--space-5) * 2);
  max-width: 280px;
  scroll-snap-align: start;
}

/* Very small screens */
@media (width < 360px) {
  .my-games-card {
    width: calc(85vw - var(--space-5) * 2);
    min-width: calc(85vw - var(--space-5) * 2);
  }
}

/* Wide phones */
@media (380px <= width < 768px) {
  .my-games-card {
    max-width: 300px;
  }
}

/* Tablet+: multi-column grid instead of scroll */
@media (width >= 768px) {
  .my-games-list {
    flex-wrap: wrap;
    overflow-x: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }

  .my-games-card {
    width: calc(33.333% - var(--space-3));
    min-width: 220px;
    max-width: none;
    scroll-snap-align: unset;
  }
}

.my-games-card__link {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  height: 100%;
  cursor: pointer;
  overflow: hidden;
}

@media (hover: hover) {
  .my-games-card__link:hover {
    box-shadow: var(--hover-shadow);
    border-color: var(--brand-primary);
    transform: translateY(-2px);
  }
}

/* Top section: event info (no date column) */
.my-games-card__body {
  display: flex;
  padding: var(--space-4); /* 16px - match event card */
  flex: 1;
}

/* Bottom section: friends + join (matches event-rsvp-bar pattern) */
.my-games-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2); /* 8px */
  padding: var(--space-2) var(--space-4); /* 8px 16px */
  border-top: 1px solid var(--color-border);
  background: var(--surface-neutral-bg);
  border-radius: 0 0 12px 12px;
  min-height: 40px;
}

.my-games-card__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-1); /* 4px */
  min-width: 0; /* Allow text truncation */
  flex: 1;
}

.my-games-card__title {
  font-size: var(--text-base); /* 16px - match event-title */
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: var(--space-0-5); /* 2px - breathing room after title */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.my-games-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-1); /* 4px */
  font-size: var(--text-sm); /* 14px - match event card meta */
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-games-card__icon {
  flex-shrink: 0;
  color: var(--color-icon);
}

.my-games-card__time {
  font-size: var(--text-sm); /* 14px - match event-datetime */
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: var(--space-1); /* 4px - space before pills */
}

/* Pills row: availability + type + level */
.my-games-card__pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1); /* 4px */
  margin-top: var(--space-1);
}

.my-games-card__pills .event-availability {
  font-size: 11px;
  padding: 2px var(--space-2); /* 2px 8px */
}

/* Compact pills for type & level */
.my-games-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: var(--weight-medium);
  padding: 2px var(--space-2); /* 2px 8px */
  border-radius: var(--radius-full, 99px);
  line-height: 1.4;
  white-space: nowrap;
}

/* Level pill — neutral */
.my-games-pill--level {
  background: var(--surface-neutral-bg);
  border: 1px solid var(--surface-neutral-border);
  color: var(--surface-neutral-text);
}

/* Type pill — default neutral, color-coded by data-type */
.my-games-pill--type {
  background: var(--surface-neutral-bg);
  border: 1px solid var(--surface-neutral-border);
  color: var(--surface-neutral-text);
}

/* Americano — Blue */
.my-games-pill--type[data-type="americano"] {
  background: var(--surface-info-bg);
  border-color: var(--surface-info-border);
  color: var(--surface-info-text);
}

/* Social — Yellow */
.my-games-pill--type[data-type="social"] {
  background: var(--surface-warning-bg);
  border-color: var(--surface-warning-border);
  color: var(--surface-warning-text);
}

/* Tournament — Gold */
.my-games-pill--type[data-type="tournament"] {
  background: var(--surface-warning-bg);
  border-color: var(--surface-warning-border);
  color: var(--surface-warning-text);
}

/* King of the Court — Red */
.my-games-pill--type[data-type="king-of-the-court"] {
  background: var(--surface-error-bg);
  border-color: var(--surface-error-border);
  color: var(--surface-error-text);
}

/* Queen of the Court — Pink */
.my-games-pill--type[data-type="queen-of-the-court"] {
  background: var(--surface-pink-bg);
  border-color: var(--surface-pink-border);
  color: var(--surface-pink-text);
}

/* Coaching — Green */
.my-games-pill--type[data-type="coaching"] {
  background: var(--surface-success-bg);
  border-color: var(--surface-success-border);
  color: var(--surface-success-text);
}

/* Join button in card actions */
.my-games-card__actions {
  flex-shrink: 0;
}

.btn-rsvp--compact {
  min-height: 30px;
  padding: 4px 12px;
  font-size: var(--text-xs);
}

/* Friends info on card */
.my-games-friends {
  display: flex;
  align-items: center;
  gap: var(--space-2); /* 8px */
  min-width: 0;
  flex: 1;
}

.my-games-friends__avatars {
  display: flex;
  flex-shrink: 0;
}

.my-games-friends__avatars > *:not(:first-child) {
  margin-left: -8px;
}

.my-games-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  object-fit: cover;
}

.my-games-avatar--initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: 12px;
  font-weight: var(--weight-semibold);
}

.my-games-friends__label {
  font-size: var(--text-xs); /* 12px */
  color: var(--color-text-secondary);
  line-height: var(--leading-tight);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-games-friends__label strong {
  color: var(--color-text-primary);
  font-weight: var(--weight-semibold);
}

/* Loading shimmer for My Games */
.my-games-loading {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) 0;
}

.my-games-shimmer {
  flex: 0 0 auto;
  width: 220px;
  height: 80px;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    var(--color-bg-page) 0%,
    var(--color-border) 50%,
    var(--color-bg-page) 100%
  );
  background-size: 200% 100%;
  animation: my-games-shimmer 1.5s infinite;
}

@keyframes my-games-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Dark theme overrides for My Games */
:root[data-theme="dark"] .my-games-card__footer {
  background: var(--surface-neutral-bg);
}

/* Club Sections */
.club-section {
  margin-bottom: var(--space-8); /* 32px */
  padding: var(--space-5); /* 20px */
  background: var(--color-bg-card);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  overflow: visible; /* Allow dropdowns to overflow */
}

.club-header {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-4); /* 16px */
  display: flex;
  flex-direction: row;
  gap: var(--space-3); /* 12px */
  align-items: center;
  justify-content: space-between;
}

.club-header-text {
  display: flex;
  align-items: center;
  gap: 4px; /* Reduced from 8px for tighter icon spacing */
  position: relative; /* For dropdown positioning */
}

.club-header-distance {
  font-size: var(--text-sm); /* 14px */
  font-weight: var(--weight-normal);
  color: var(--color-text-tertiary);
  margin-left: var(--space-1); /* 4px */
}

.location-icon {
  flex-shrink: 0;
  color: var(--color-icon); /* Grey color for all icons */
}

.club-header .location-icon {
  width: 20px;
  height: 20px;
  margin-top: -2px; /* Fine-tune vertical alignment with text */
}

.detail-club .location-icon {
  width: 16px;
  height: 16px;
  margin-right: 2px; /* Reduced from 4px for tighter spacing */
  vertical-align: text-bottom;
}

.level-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--color-icon); /* Grey color for all icons */
  margin-right: 2px; /* Reduced from 4px for tighter spacing */
}

.club-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1); /* 4px - space for arrow */
  min-height: 44px;
  padding: var(--space-2) var(--space-4); /* 8px 16px - pill style */
  border: 1px solid var(--border);
  border-radius: 999px; /* Full pill shape */
  background: var(--bg-card);
  font-size: var(--text-sm); /* 14px */
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
}

.club-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--color-icon);
}

.club-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

/* Club Location Pill - Inline expandable distance pill */
.club-location-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: var(--space-2);
  padding: 0.25rem 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.15s ease;
  vertical-align: middle;
}

.club-location-pill:hover {
  background: var(--bg-hover);
  border-color: var(--color-primary);
  color: var(--text-secondary);
}

.club-location-pill .location-chevron {
  transition: transform 0.2s ease;
  color: var(--color-icon);
}

.club-location-pill[aria-expanded="true"] .location-chevron {
  transform: rotate(180deg);
}

.club-location-distance {
  font-size: var(--text-xs);
}

/* Location icon when GPS not available */
.location-pill-icon {
  width: 0.875rem;
  height: 0.875rem;
  color: var(--color-icon);
}

/* Club location dropdown - positioned below header */
.club-location-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  min-width: 280px;
  margin-top: var(--space-2);
  padding: var(--space-3);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.club-location-dropdown[hidden] {
  display: none;
}

/* Legacy club location details */
.club-location-details {
  margin: var(--space-2) 0 var(--space-3);
}

.club-location-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 36px;
}

.club-location-toggle:hover {
  background: var(--bg-hover);
  border-color: var(--color-primary);
  color: var(--text-primary);
}

.club-location-toggle .location-chevron {
  transition: transform 0.2s ease;
}

.club-location-toggle.expanded .location-chevron,
.club-location-toggle[aria-expanded="true"] .location-chevron {
  transform: rotate(180deg);
}

.club-location-label {
  font-size: var(--text-sm);
}

/* Mobile: Stack club header with location pill below */
@media (width <= 640px) {
  .club-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .club-header .club-link {
    display: none;
  }

  /* Hide desktop show-more-stack on mobile */
  .show-more-stack {
    display: none !important;
  }

  .club-location-pill {
    margin-left: 0;
    margin-top: var(--space-1);
  }
}

/* Desktop: Hide mobile actions container */
@media (width > 640px) {
  .club-actions-mobile {
    display: none !important;
  }
}

/* Mobile club actions container - horizontal layout with show more and view all */
.club-actions-mobile {
  display: flex;
  flex-direction: row;
  gap: var(--space-3);
  margin-top: var(--space-4);
  margin-bottom: 8px;
  align-items: flex-start;
}

/* Mobile show-more stack wrapper - matches desktop show-more-stack */
.show-more-stack-mobile {
  position: relative;
  display: inline-block;
  margin-bottom: 8px;
  isolation: isolate;
  overflow: visible;
}

/* ==========================================================================
   SHARED STACKED CARD EFFECT (used by show-more-stack, past-events-stack)
   Creates the visual "cards stacked behind" effect
   ========================================================================== */

.show-more-stack-mobile::before,
.show-more-stack-mobile::after,
.show-more-stack::before,
.show-more-stack::after,
.past-events-stack::before,
.past-events-stack::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 4px;
  right: 4px;
  height: 100%;
  background: var(--stacked-card-bg, var(--surface-neutral-border));
  border: 1px solid var(--border);
  border-radius: 999px;
  z-index: -1;
  transition: opacity var(--transition-base);
  opacity: 0;
  pointer-events: none;
}

.show-more-stack-mobile::after,
.show-more-stack::after,
.past-events-stack::after {
  bottom: -8px;
  left: 8px;
  right: 8px;

  --stacked-card-bg: var(--surface-neutral-border-strong);

  z-index: -2;
}

/* Past events uses different colors */
.past-events-stack::before {
  --stacked-card-bg: var(--surface-neutral-bg);
}

.past-events-stack::after {
  --stacked-card-bg: var(--surface-neutral-hover);
}

/* Show stacked effect only for 2+ items (badge-style) */
.show-more-stack-mobile.badge-style::before,
.show-more-stack-mobile.badge-style::after,
.show-more-stack.badge-style::before,
.show-more-stack.badge-style::after,
.past-events-stack.badge-style::before,
.past-events-stack.badge-style::after {
  opacity: 1;
}

/* Hide stacked effect when expanded */
.past-events-stack.expanded::before,
.past-events-stack.expanded::after {
  opacity: 0;
}

.club-link-mobile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
}

.club-link-mobile:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.club-link-mobile svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--color-icon);
}

/* Events List */
.events-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3); /* 12px */
  overflow: visible; /* Allow dropdowns to overflow */
}

/* Hidden event cards */
.event-hidden {
  display: none;
}

/* Event Card */
.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-4); /* 16px - follows design system */
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  position: relative; /* Establish positioning context for dropdown */
  overflow: visible; /* Allow dropdowns to overflow */
}

/* Boost z-index when dropdown is open to appear above sibling cards and show-more buttons */
.event-card.has-open-dropdown {
  z-index: 99999; /* Match join dropdown z-index to ensure proper stacking */
}

@media (hover: hover) {
  .event-card:hover {
    box-shadow: var(--hover-shadow);
    border-color: var(--brand-primary);
    transform: translateY(-2px);
  }

  /* Disable hover on expandable cards - the toggle button handles interaction */
  .event-card-expandable:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--border);
    transform: none;
  }
}

/* Event Card Header with Availability Badge */
.event-card-header {
  display: flex;
  align-items: flex-start; /* Changed from center to flex-start for top alignment */
  justify-content: space-between;
  gap: var(--space-3); /* 12px - space between title and badge */
  margin-bottom: var(--space-2); /* 8px - follows design system */
  flex-wrap: wrap;
}

.event-availability {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1); /* 4px - icon + text spacing */
  padding: var(--space-1) var(--space-3); /* 4px 12px - compact badge */
  border-radius: 999px; /* Full pill shape */
  font-size: var(--text-xs); /* 12px - badge typography */
  font-weight: var(--weight-medium);
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
}

.event-availability svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--color-icon);
}

/* Availability Badge States */
.avail-open {
  background: var(--surface-success-bg);
  color: var(--surface-success-text);
  border-color: var(--surface-success-border);
}

.avail-almost {
  background: var(--surface-warning-bg);
  color: var(--surface-warning-text);
  border-color: var(--surface-warning-border);
}

.avail-full {
  background: var(--surface-error-bg);
  color: var(--surface-error-text);
  border-color: var(--surface-error-border);
}

/* Alias for backward compatibility - low availability uses warning styling */
.avail-low {
  background: var(--surface-warning-bg);
  color: var(--surface-warning-text);
  border-color: var(--surface-warning-border);
}

.event-title {
  font-size: var(--text-lg); /* 18px - consistent */
  font-weight: 700; /* Bold for titles */
  color: var(--text-primary);
  line-height: 1.4;
  flex: 1;
}

.event-datetime {
  font-size: var(--text-base); /* 16px - consistent */
  color: var(--text-secondary);
  margin-bottom: var(--space-3); /* 12px - space after header */
  font-weight: 400; /* Regular weight */
}

.event-details {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3); /* 12px - follows design system */
  margin-bottom: var(--space-3); /* 12px - follows design system */
}

.detail-item {
  font-size: var(--text-sm); /* 14px - consistent */
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-1); /* 4px - tighter spacing for icon+text */
  font-weight: 400; /* Regular weight for consistency */
}

/* === Expandable Event Card === */
.event-card-expandable {
  padding: 0; /* Remove default padding, handled by inner elements */
  overflow: visible; /* Allow dropdown menu to be visible */
  border-radius: 12px; /* Ensure rounded corners are clipped properly */
}

.event-card-expandable > * {
  border-radius: inherit; /* Inherit border radius for proper clipping */
}

/* Card toggle button - the clickable header area */
.event-card-toggle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-4);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background var(--transition-base);
  border-top-left-radius: 12px; /* Only round top corners */
  border-top-right-radius: 12px; /* Only round top corners */
}

/* Add bottom border when expanded to create separation line */
.event-card-expandable.expanded .event-card-toggle {
  border-bottom: 1px solid var(--border);
  border-bottom-left-radius: 0; /* Square bottom corners when expanded */
  border-bottom-right-radius: 0; /* Square bottom corners when expanded */
}

@media (hover: hover) {
  .event-card-toggle:hover {
    background: var(--bg-hover);
  }
}

.event-card-toggle:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: -2px;
}

/* Summary content in collapsed state */
.event-card-summary {
  flex: 1;
  min-width: 0; /* Allow text truncation */
  text-align: left;
}

.event-card-expandable .event-card-header {
  margin-bottom: var(--space-1);
}

.event-card-expandable .event-datetime {
  margin-bottom: var(--space-2);
}

/* Compact meta info in collapsed state */
.event-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-1);
}

.event-summary-meta .detail-item {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3); /* 4px 12px */
  background: var(--bg-card);
  border-radius: 999px; /* Full pill shape */
  border: 1px solid var(--border);
  white-space: nowrap;
}

/* Color-coded pill variants for detail items */

/* Location pill - neutral slate colors */
.detail-pill--location,
.detail-item.detail-club-summary {
  background: var(--surface-neutral-bg);
  border-color: var(--surface-neutral-border);
  color: var(--surface-neutral-text);
}

/* Level pill - neutral white/gray */
.detail-pill--level,
.detail-item.detail-level {
  background: var(--surface-neutral-bg);
  border-color: var(--surface-neutral-border);
  color: var(--surface-neutral-text);
}

/* Event type pills with color coding */

/* Americano - Blue */

.detail-item.detail-type[data-type="americano"],
.detail-pill--americano {
  background: var(--surface-info-bg);
  border-color: var(--surface-info-border);
  color: var(--surface-info-text);
}

/* Social - Yellow */
.detail-item.detail-type[data-type="social"],
.detail-pill--social {
  background: var(--surface-warning-bg);
  border-color: var(--surface-warning-border);
  color: var(--surface-warning-text);
}

/* Tournament - Gold */
.detail-item.detail-type[data-type="tournament"],
.detail-pill--tournament {
  background: var(--surface-warning-bg);
  border-color: var(--surface-warning-border);
  color: var(--surface-warning-text);
}

/* King of the Court - Red */
.detail-item.detail-type[data-type="king-of-the-court"],
.detail-pill--king-of-the-court {
  background: var(--surface-error-bg);
  border-color: var(--surface-error-border);
  color: var(--surface-error-text);
}

/* Queen of the Court - Pink */
.detail-item.detail-type[data-type="queen-of-the-court"],
.detail-pill--queen-of-the-court {
  background: var(--surface-pink-bg);
  border-color: var(--surface-pink-border);
  color: var(--surface-pink-text);
}

/* Coaching - Green */
.detail-item.detail-type[data-type="coaching"],
.detail-pill--coaching {
  background: var(--surface-success-bg);
  border-color: var(--surface-success-border);
  color: var(--surface-success-text);
}

/* Category pills */

/* Mixed */

.detail-pill--mixed {
  background: var(--surface-success-bg);
  border-color: var(--surface-success-border);
  color: var(--surface-success-text);
}

/* Women only */

.detail-pill--women-only {
  background: var(--surface-pink-bg);
  border-color: var(--surface-pink-border);
  color: var(--surface-pink-text);
}

/* Men only */

.detail-pill--men-only {
  background: var(--surface-info-bg);
  border-color: var(--surface-info-border);
  color: var(--surface-info-text);
}

/* Recurring badge in collapsed card */
.detail-item.detail-recurring {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: var(--surface-info-bg);
  border: 1px solid var(--surface-info-border);
  color: var(--surface-info-text);
  padding: var(--space-0-5) var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
}

.detail-item.detail-recurring img {
  opacity: 0.8;
}

.detail-item.detail-recurring svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* Chevron rotation */
.event-card-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--transition-base);
  margin-top: var(--space-1);
}

.event-card-expandable.expanded .event-card-chevron {
  transform: rotate(180deg);
}

/* Expanded details section */
.event-card-details {
  background: var(--bg-page);
  animation: expand-card var(--transition-slow) ease-out;
  border-bottom-left-radius: 12px; /* Match card radius for bottom corners */
  border-bottom-right-radius: 12px; /* Match card radius for bottom corners */
  overflow: visible; /* Allow dropdown to overflow */
}

.event-card-details[hidden] {
  display: none;
}

@keyframes expand-card {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.event-details-content {
  padding: var(--space-4);
  position: relative; /* Establish positioning context for dropdown */
}

/* Pills container in expanded view */
.event-details-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

/* Base pill style for expanded view */
.detail-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.detail-pill svg {
  flex-shrink: 0;
  color: var(--color-icon);
}

/* Linked pills (event type → type page, club → club page) */

a.detail-pill--link {
  text-decoration: none;
  cursor: pointer;
  transition: opacity var(--transition-fast, 0.15s);
}

a.detail-pill--link:hover {
  opacity: 0.8;
}

/* Location/Club pill - neutral slate */
.detail-pill--location {
  background: var(--surface-neutral-bg);
  border-color: var(--surface-neutral-border);
  color: var(--surface-neutral-text);
}

.detail-pill--location .location-icon {
  color: var(--color-icon);
}

/* Expandable location pill */
.location-pill-expandable {
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.location-pill-expandable:hover {
  background: var(--surface-neutral-hover);
  border-color: var(--surface-neutral-border-strong);
}

.location-pill-expandable .location-pill-summary {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.location-pill-expandable .location-name {
  font-weight: var(--weight-medium);
}

.location-pill-expandable .location-distance {
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  font-weight: var(--weight-normal);
}

.location-pill-expandable .location-chevron {
  margin-left: 0.125rem;
  transition: transform 0.2s ease;
  color: var(--color-icon);
}

.location-pill-expandable.expanded .location-chevron {
  transform: rotate(180deg);
}

/* Location pill expanded details */
.location-pill-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  margin-top: 0.5rem;
  background: var(--surface-neutral-bg);
  border: 1px solid var(--surface-neutral-border);
  border-radius: var(--radius-lg);
}

.location-pill-details[hidden] {
  display: none;
}

/* Google Maps link */
.location-maps-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
  line-height: 1.4;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
  min-height: 1.75rem;
}

.location-maps-link:hover {
  color: var(--text-primary);
}

.location-maps-link svg {
  flex-shrink: 0;
  color: var(--color-icon);
}

.location-maps-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
}

.location-maps-external-icon {
  flex-shrink: 0;
  width: 0.95rem;
  height: 0.95rem;
  color: var(--color-icon);
}

/* Transit info */
.location-transit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  line-height: 1.4;
}

.location-transit:first-of-type {
  margin-top: 0.25rem;
}

.location-transit .transit-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.2;
}

.location-transit img.transit-icon {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
}

.location-transit .transit-text {
  line-height: 1.4;
}

/* Transit container in location pill dropdown */
.location-transit-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.location-transit-loading {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  text-align: center;
  padding: var(--space-2) 0;
}

.location-transit-empty,
.location-transit-error {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  text-align: center;
  padding: var(--space-2) 0;
}

.location-transit-error {
  color: var(--color-error);
}

/* Individual transit item (BTS/MRT station) */
.location-transit-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: 1.4;
}

.transit-logo {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
}

/* BTS logo has specific styling */
.transit-logo--bts {
  /* BTS colors are already in the SVG */
}

/* MRT logo has specific styling */
.transit-logo--mrt {
  /* MRT colors are already in the SVG */
}

.transit-station-name {
  font-weight: var(--weight-medium);
}

/* Walking/bike distance container */
.location-transit-distances {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}

.transit-distance {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.transit-distance svg {
  flex-shrink: 0;
  color: var(--color-icon);
}

/* Price pill - neutral gray */
.detail-pill--price {
  background: var(--surface-neutral-bg);
  border-color: var(--surface-neutral-border);
  color: var(--surface-neutral-text);
}

/* Make price icon light/white in dark mode */
:root[data-theme="dark"] .detail-pill--price img {
  filter: invert(1) brightness(1.2);
}

/* Type pills in expanded view - inherit same color coding as collapsed */
.detail-pill--type[data-type="americano"] {
  background: var(--surface-info-bg);
  border-color: var(--surface-info-border);
  color: var(--surface-info-text);
}

.detail-pill--type[data-type="social"] {
  background: var(--surface-warning-bg);
  border-color: var(--surface-warning-border);
  color: var(--surface-warning-text);
}

.detail-pill--type[data-type="tournament"] {
  background: var(--surface-warning-bg);
  border-color: var(--surface-warning-border);
  color: var(--surface-warning-text);
}

.detail-pill--type[data-type="king-of-the-court"] {
  background: var(--surface-error-bg);
  border-color: var(--surface-error-border);
  color: var(--surface-error-text);
}

.detail-pill--type[data-type="queen-of-the-court"] {
  background: var(--surface-pink-bg);
  border-color: var(--surface-pink-border);
  color: var(--surface-pink-text);
}

.detail-pill--type[data-type="coaching"] {
  background: var(--surface-success-bg);
  border-color: var(--surface-success-border);
  color: var(--surface-success-text);
}

/* Category pills in expanded view */
.detail-pill--category[data-category="mixed"] {
  background: var(--surface-success-bg);
  border-color: var(--surface-success-border);
  color: var(--surface-success-text);
}

.detail-pill--category[data-category="women-only"],
.detail-pill--category[data-category="women"] {
  background: var(--surface-pink-bg);
  border-color: var(--surface-pink-border);
  color: var(--surface-pink-text);
}

.detail-pill--category[data-category="men-only"],
.detail-pill--category[data-category="men"] {
  background: var(--surface-info-bg);
  border-color: var(--surface-info-border);
  color: var(--surface-info-text);
}

/* Detail rows in expanded view */
.detail-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.detail-row svg {
  flex-shrink: 0;
  width: 16px;
  color: var(--color-icon);
}

.detail-row strong {
  color: var(--text-primary);
}

/* Event actions in expanded view */
.event-card-details .event-actions {
  margin-top: var(--space-3);
}

/* Slots pill color variants in expanded view */
.detail-pill--slots-open {
  background: var(--surface-success-bg);
  border-color: var(--surface-success-border);
  color: var(--surface-success-text);
}

.detail-pill--slots-almost {
  background: var(--surface-warning-bg);
  border-color: var(--surface-warning-border);
  color: var(--surface-warning-text);
}

.detail-pill--slots-full {
  background: var(--surface-error-bg);
  border-color: var(--surface-error-border);
  color: var(--surface-error-text);
}

.detail-pill--slots-neutral {
  background: var(--surface-neutral-bg);
  border-color: var(--surface-neutral-border);
  color: var(--surface-neutral-text);
}

/* Recurring indicator pill - purple */
.detail-pill--recurring {
  background: var(--surface-info-bg);
  border-color: var(--surface-info-border);
  color: var(--surface-info-text);
}

.detail-pill--recurring img {
  opacity: 0.8;
}

.detail-pill--recurring svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Make recurring icon light/white in dark mode */
:root[data-theme="dark"] .detail-pill--recurring img {
  filter: invert(1) brightness(1.2);
}

/* One-time indicator pill - neutral slate */
.detail-pill--one-time {
  background: var(--surface-neutral-bg);
  border-color: var(--surface-neutral-border);
  color: var(--surface-neutral-text);
}

.detail-pill--one-time img {
  opacity: 0.7;
}

/* View event details link in expanded card */
.event-detail-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: color var(--transition-base);
}

.event-detail-link:hover {
  color: var(--color-primary-hover);
}

.event-detail-link svg {
  transition: transform var(--transition-base);
}

.event-detail-link:hover svg {
  transform: translateX(2px);
}

/* Description detail row in expanded view - moved to bottom */
.detail-description {
  align-items: flex-start;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}

.detail-description span {
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}

/* Club summary in collapsed view (for Happening Soon section) */
.detail-club-summary {
  background: var(--bg-hover);
  padding: var(--space-1) var(--space-2);
  border-radius: 4px;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
}

.detail-club-summary .location-icon {
  color: var(--text-secondary);
}

/* Desktop: expand to show more horizontal space */
@media (width >= 768px) {
  .event-card-expandable.expanded {
    grid-column: span 1; /* Keep same size in grid */
  }

  .event-details-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
  }

  .event-card-details .event-actions {
    flex-direction: row;
  }
}

/* Event Actions */
.event-actions-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: var(--space-3); /* 12px - follows design system */
  margin-bottom: var(--space-2); /* 8px - follows design system */
  display: flex;
  align-items: center;
  gap: var(--space-2); /* 8px - follows design system */
}

.event-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2); /* 8px - follows design system */
  margin-top: var(--space-3); /* 12px - follows design system */
}

.event-signup {
  display: flex;
  flex-direction: column;
  gap: var(--space-2); /* 8px - follows design system */
  margin-top: var(--space-2); /* 8px - follows design system */
}

.signup-row {
  display: flex;
  align-items: center;
  gap: var(--space-3); /* 12px gap between label and pills */
  flex-wrap: wrap;
}

.signup-text {
  font-size: var(--text-sm); /* 14px - consistent */
  color: var(--text-secondary);
  margin: 0;
  line-height: var(--leading-normal);
  white-space: nowrap;
}

.signup-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2); /* 8px gap between pills */
}

.signup-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1); /* 4px - icon + text spacing */
  min-height: 36px;
  padding: var(--space-2) var(--space-3); /* 8px 12px */
  border: 1px solid var(--color-border);
  border-radius: 999px; /* Full pill shape */
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: var(--text-sm); /* 14px */
  font-weight: var(--weight-medium);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition-base);
  font-family: inherit;
}

.signup-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.signup-pill:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.signup-pill:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

.signup-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: var(--weight-medium);
  transition: all var(--transition-base);
  border-radius: 2px;
  padding: 0 2px;
}

.signup-link:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

.signup-link:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

.btn-calendar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2); /* 8px - icon + text spacing */
  min-height: 44px;
  padding: var(--space-3) var(--space-4); /* 12px 16px */
  border: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
}

.btn-calendar svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-google {
  background: var(--brand-primary);
  color: var(--color-text-inverse);
}

.btn-google:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-google:active {
  transform: scale(0.98);
}

.btn-google:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

.btn-ics {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-ics:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary-hover);
}

.btn-ics:active {
  transform: scale(0.98);
}

.btn-ics:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

.btn-signup {
  background: var(--brand-primary);
  color: var(--white);
}

.btn-signup:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-signup:active {
  transform: scale(0.98);
}

.btn-signup:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

.signup-icon-mobile {
  flex-shrink: 0;
  opacity: 1;
  filter: brightness(0) invert(1);
}

/* Report Issue Link */
.report-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  min-height: 44px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition-base);
  border-radius: 4px;
}

.report-link:hover {
  color: var(--color-warning);
  background: rgb(245 158 11 / 10%);
  text-decoration: underline;
}

/* ===== Series Card Styles ===== */

/* Series card modifier */
.event-card.event-series {
  border-left: 3px solid var(--surface-info-border);
}

/* Series pattern display in collapsed view */
.series-pattern {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--text-primary);
  font-weight: var(--weight-medium);
}

.series-pattern img {
  opacity: 0.8;
}

.series-time {
  color: var(--text-secondary);
}

/* Skeleton loading state for series instances */
.series-instance--skeleton {
  pointer-events: none;
}

.series-instance--skeleton .series-instance-pill {
  background: var(--surface-tertiary);
  color: transparent;
  border-color: transparent;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* Instance list header */
.series-instances-header {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}

/* Instance list container */
.series-instances-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-3) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Individual instance row - minimal wrapper */
.series-instance {
  display: block;
}

/* Past instance styling */
.series-instance--past {
  opacity: 0.5;
  pointer-events: none;
}

/* Button-style pill for instance (link or span) */
.series-instance-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border-radius: 9999px;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  border: 1px solid;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.1s ease;
}

.series-instance-pill:hover {
  transform: scale(1.01);
}

.series-instance-pill:active {
  transform: scale(0.99);
}

/* External link icon in instance pills */
.series-instance-icon {
  flex-shrink: 0;
  opacity: 0.8;
}

.series-instance-pill:hover .series-instance-icon {
  opacity: 1;
}

/* Color variants for instance pills */
.series-instance-pill.avail-open {
  background: var(--surface-success-bg);
  border-color: var(--surface-success-border);
  color: var(--surface-success-text);
}

.series-instance-pill.avail-open:hover {
  background: var(--color-success-100, var(--surface-success-bg));
  border-color: var(--color-success-300, var(--surface-success-border));
}

.series-instance-pill.avail-almost {
  background: var(--surface-warning-bg);
  border-color: var(--surface-warning-border);
  color: var(--surface-warning-text);
}

.series-instance-pill.avail-almost:hover {
  background: var(--color-warning-100, var(--surface-warning-bg));
  border-color: var(--color-warning-300, var(--surface-warning-border));
}

.series-instance-pill.avail-full {
  background: var(--surface-error-bg);
  border-color: var(--surface-error-border);
  color: var(--surface-error-text);
}

/* Disabled state for pills without signup link */
.series-instance-pill--disabled {
  cursor: default;
  opacity: 0.7;
}

.series-instance-pill--disabled:hover {
  transform: none;
}

/* Series instance highlight animation (when navigating from fallback pill) */
.series-instance--highlight .series-instance-pill {
  animation: highlight-flash 2s ease-out;
}

@keyframes highlight-flash {
  0%,
  15% {
    box-shadow: 0 0 0 3px var(--color-primary);
  }

  100% {
    box-shadow: none;
  }
}

/* Fallback pill button for alternative available date */
.series-fallback-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-0-5) var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  cursor: pointer;
  border: 1px solid;
  transition:
    background-color 0.15s ease,
    transform 0.1s ease;
}

.series-fallback-pill:hover {
  transform: scale(1.02);
}

.series-fallback-pill:active {
  transform: scale(0.98);
}

/* Fallback pill color variants (match availability badge colors) */
.series-fallback-pill.avail-open {
  background: var(--surface-success-bg);
  border-color: var(--surface-success-border);
  color: var(--surface-success-text);
}

.series-fallback-pill.avail-almost {
  background: var(--surface-warning-bg);
  border-color: var(--surface-warning-border);
  color: var(--surface-warning-text);
}

/* "All upcoming full" indicator */
.series-all-full {
  display: inline-flex;
  align-items: center;
  padding: var(--space-0-5) var(--space-2);
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
}

/* Compact signup button for instance rows */
.series-instance-signup {
  padding: var(--space-1) var(--space-3);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.series-instance-signup:hover {
  background: var(--color-primary-hover);
}

/* ===== End Series Card Styles ===== */

/* Show More Button - Pill Style to Match Design */
.show-more-stack {
  position: relative;
  display: inline-block;
  margin-top: var(--space-4); /* 16px top margin */
  margin-bottom: 8px; /* Space for stacked cards below */
  isolation: isolate;
  overflow: visible; /* Allow calendar dropdowns to overflow */
}

/* Stacked card ::before/::after styles are defined in SHARED STACKED CARD EFFECT section */

.btn-show-more {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2); /* 8px - icon + text spacing */
  min-height: 44px;
  padding: var(--space-3) var(--space-5); /* 12px 20px */
  border: 1px solid var(--border);
  border-radius: 999px; /* Full pill shape */
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: var(--text-sm); /* 14px */
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
}

.btn-show-more svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-primary);
}

.btn-show-more:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

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

.btn-show-more:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

/* Desktop: Show More and Past Events buttons side by side */
@media (width >= 768px) {
  .club-section .show-more-stack,
  .club-section .past-events-stack {
    display: inline-block;
    vertical-align: top;
    margin-right: var(--space-3); /* 12px gap between buttons */
  }

  /* When expanded, make the list full width on new row */
  .club-section .past-events-stack.expanded {
    display: block; /* Change to block to force list on new row */
    width: 100%;
  }

  .club-section .past-events-stack.expanded .past-events-header {
    display: inline-flex; /* Keep header as inline pill */
  }
}

/* Past Events Stack - Collapsible Section */
.past-events-stack {
  position: relative;
  margin-top: var(--space-4); /* 16px */
  margin-bottom: 8px; /* Space for stacked cards below */
  isolation: isolate; /* Create stacking context */
}

/* Stacked card ::before/::after styles are defined in SHARED STACKED CARD EFFECT section */

/* Past events header button - styled to match btn-show-more */
.past-events-header {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2); /* 8px - icon + text spacing */
  min-height: 44px;
  padding: var(--space-3) var(--space-5); /* 12px 20px */
  border: 1px solid var(--border);
  border-radius: 999px; /* Full pill shape */
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: var(--text-sm); /* 14px */
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
}

.past-events-header:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.past-events-header:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

.past-events-label {
  display: flex;
  align-items: center;
  gap: var(--space-2); /* 8px */
}

.past-events-label svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
}

/* Chevron icon */
.past-events-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--transition-base);
}

.past-events-stack.expanded .past-events-chevron {
  transform: rotate(180deg);
}

/* Past events list - hidden by default, uses same grid as events-list */
.past-events-list.events-list {
  display: none;
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0; /* 16px top margin */
  gap: 12px;
}

.past-events-stack.expanded .past-events-list.events-list {
  display: flex;
  flex-direction: column;
  animation: slide-down var(--transition-slow) ease-out;
}

/* Desktop: past events in grid like regular events */
@media (width >= 768px) {
  .past-events-stack.expanded .past-events-list.events-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4); /* 16px */
    align-items: start;
  }
}

@media (width >= 1280px) {
  .past-events-stack.expanded .past-events-list.events-list {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6); /* 24px */
  }
}

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Condensed event card for past events */
.event-card-condensed {
  padding: var(--space-3) var(--space-4); /* 12px 16px */
  border-bottom: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--space-2); /* 8px */
}

.event-card-condensed:last-child {
  border-bottom: none;
}

.condensed-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-1); /* 4px */
}

.condensed-title {
  font-size: var(--text-sm); /* 14px */
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  line-height: var(--leading-tight);
}

.condensed-datetime {
  font-size: var(--text-xs); /* 12px */
  color: var(--text-muted);
}

.condensed-club {
  font-size: var(--text-xs); /* 12px */
  color: var(--text-muted);
}

/* Condensed signup section */
.condensed-signup {
  display: flex;
  align-items: center;
  gap: var(--space-2); /* 8px */
  flex-wrap: wrap;
}

.condensed-signup-label {
  font-size: var(--text-xs); /* 12px */
  color: var(--text-muted);
}

.signup-pills-condensed {
  gap: var(--space-1); /* 4px */
}

.signup-pill-condensed {
  padding: var(--space-1) var(--space-2); /* 4px 8px */
  font-size: var(--text-xs); /* 12px */
  gap: var(--space-1); /* 4px */
}

/* Legacy past event styling (for full event cards if needed) */
.event-past {
  opacity: 0.6;
}

/* Full event styling - subtle de-emphasis for easier scanning */
.event-full {
  opacity: 0.7;
  border-color: var(--surface-error-border);
  background: color-mix(
    in srgb,
    var(--surface-error-bg) 30%,
    var(--color-bg-card) 70%
  );
}

.event-full:hover {
  opacity: 0.85;
  border-color: color-mix(
    in srgb,
    var(--surface-error-border) 80%,
    var(--surface-error-text) 20%
  );
}

/* ============================================
   EMPTY STATE WITH SUGGESTIONS
   ============================================ */

.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-4);
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-4);
  color: var(--text-muted);
}

.empty-state h3 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin: 0 0 var(--space-3);
}

.empty-state p {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin: 0 0 var(--space-4);
  line-height: 1.5;
}

.empty-state-suggestions {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-5);
  text-align: left;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.empty-state-suggestions li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

.empty-state-suggestions li::before {
  content: "•";
  color: var(--color-primary);
  font-weight: bold;
  flex-shrink: 0;
}

.empty-state-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--space-3) var(--space-5);
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.empty-state-btn:hover {
  background: var(--bg-hover);
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgb(0 0 0 / 5%);
}

.empty-state-btn:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

/* Filter impact suggestions (empty state) */
.filter-impact-suggestions {
  width: 100%;
  max-width: 340px;
  margin: var(--space-4) 0;
  text-align: left;
}

.filter-impact-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

.filter-impact-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.filter-impact-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  text-align: left;
}

.filter-impact-btn:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-primary);
}

.filter-impact-btn:active {
  transform: scale(0.98);
}

.filter-impact-count {
  color: var(--color-primary);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
  margin-left: var(--space-2);
}

.filter-impact-btn--clear-all {
  margin-top: var(--space-2);
  border-style: dashed;
  color: var(--color-text-secondary);
}

.filter-impact-btn--clear-all:hover {
  color: var(--color-text-primary);
}

/* Empty state hint (when no impact suggestions) */
.empty-state-hint {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  color: var(--color-text-secondary);
  font-size: var(--text-base);
}

/* Results fade transition */
#eventsWrap {
  transition: opacity 0.2s ease;
}

#eventsWrap.fading {
  opacity: 0;
}

/* ============================================
   CLUBS OVERVIEW PAGE
   ============================================ */

.clubs-page {
  padding-top: var(--space-8);
  padding-bottom: var(--space-12);
}

.clubs-page__header {
  margin-bottom: var(--space-8);
}

.clubs-page__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 var(--space-2);
}

.clubs-page__subtitle {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  margin: 0;
  max-width: 480px;
}

.clubs-page__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (width >= 600px) {
  .clubs-page__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (width >= 1024px) {
  .clubs-page__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.clubs-page__loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-12) 0;
  color: var(--color-text-secondary);
}

.clubs-page__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-12) 0;
  color: var(--color-text-secondary);
}

.clubs-card {
  position: relative;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.clubs-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgb(0 0 0 / 6%);
}

.clubs-card__link {
  text-decoration: none;
  display: block;
}

.clubs-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.clubs-card__header {
  padding: var(--space-4) var(--space-5) 0;
}

.clubs-card__name {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

/* Stats row (Design B pattern) */
.clubs-card__stats {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
}

.clubs-card__stat {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.clubs-card__stat strong {
  font-weight: 600;
  color: var(--color-text-primary);
}

.clubs-card__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--color-text-tertiary);
}

/* Next event panel */
.clubs-card__event {
  padding: var(--space-4) var(--space-5);
  background: var(--color-bg-page);
  border-top: 1px solid var(--color-border);
}

.clubs-card__event--empty {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  font-style: italic;
}

.clubs-card__event-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-tertiary);
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.clubs-card__event-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 var(--space-2);
}

.clubs-card__event-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.clubs-card__event-meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

/* Links row (filter tags + map) */
.clubs-card__links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--color-border);
}

.clubs-card__tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full, 99px);
  border: 1px solid var(--color-border);
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
  white-space: nowrap;
}

.clubs-card__tag:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.clubs-card__tag--map {
  margin-left: auto;
  color: var(--color-text-tertiary);
  border-color: transparent;
}

.clubs-card__tag--map:hover {
  color: var(--color-text-primary);
  border-color: transparent;
}

/* Footer — Design D (Until style): full-width black, multi-column SEO links */
.footer {
  /* Break out of .container */
  margin-block-start: var(--space-16);
  margin-inline: calc(-50vw + 50%);
  width: 100vw;
  padding: var(--space-16) var(--space-6) var(--space-8);
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  font-size: var(--text-sm);
}

body > .footer:last-child,
.container > .footer:last-child {
  margin-block-start: auto;
}

/* Remove container bottom padding so footer sits flush at bottom */
.container:has(> .footer:last-child) {
  padding-bottom: 0;
}

.footer__inner {
  max-width: 1280px;
  margin: 0 auto;
}

/* Main grid: stacked on mobile, side-by-side on desktop */
.footer__main {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--color-footer-border);
}

/* Brand column */
.footer__brand-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: Righteous, sans-serif;
  font-size: var(--text-2xl);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--color-footer-heading);
  line-height: 1;
  margin: 0 0 var(--space-3);
}

.footer__brand-logo {
  height: 2.25rem;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  transform: translateY(2px);
}

.footer__brand-desc {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-footer-text);
  max-width: 320px;
}

/* Link columns */
.footer__columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
  align-items: start;
}

.footer__col-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-footer-heading);
  margin-bottom: var(--space-2);
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin: 0;
}

.footer__links a {
  color: var(--color-footer-text);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color 0.15s ease;
  line-height: 2;
  display: block;
}

.footer__links a:hover {
  color: var(--color-footer-link-hover);
}

.footer__view-all {
  display: inline-block;
  margin-top: var(--space-2);
  color: var(--color-footer-muted);
  font-size: var(--text-xs);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer__view-all:hover {
  color: var(--color-footer-link-hover);
}

/* Bottom bar: copyright + theme toggle + legal */
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-6);
  font-size: var(--text-xs);
  color: var(--color-footer-muted);
}

.footer__bottom-right {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.footer__bottom-links {
  display: flex;
  gap: var(--space-4);
}

.footer__bottom-links a {
  color: var(--color-footer-muted);
  font-size: var(--text-xs);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer__bottom-links a:hover {
  color: var(--color-footer-text);
}

/* Footer theme toggle (dark variant) */
.footer .theme-toggle {
  background: var(--color-footer-bg);
  border-color: var(--color-footer-border);
}

.footer .theme-toggle-btn {
  color: var(--color-footer-muted);
}

.footer .theme-toggle-btn:hover {
  background: var(--color-footer-border);
  color: var(--color-footer-text);
}

.footer .theme-toggle-btn.active {
  background: var(--color-footer-border);
  color: var(--color-footer-heading);
}

/* ============================================
   MY ALERTS PAGE
   ============================================ */

.my-alerts-page {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
}

.my-alerts-header {
  margin-bottom: var(--space-8);
}

.my-alerts-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-4);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.my-alerts-back:hover {
  background: var(--color-bg-page);
  color: var(--color-text-primary);
  border-color: var(--color-text-secondary);
}

.my-alerts-back svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.my-alerts-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 2rem;
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin: 0;
}

.my-alerts-title svg {
  width: 32px;
  height: 32px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.my-alerts-content {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-8);
}

.my-alerts-empty {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.my-alerts-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-5);
  color: var(--color-text-tertiary);
}

.my-alerts-empty h2 {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-4) 0;
}

.my-alerts-empty p {
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0 0 var(--space-4) 0;
}

.my-alerts-features {
  text-align: left;
  margin: var(--space-5) 0;
  padding: var(--space-4);
  background: var(--color-bg-page);
  border-radius: 8px;
  list-style: none;
}

.my-alerts-features li {
  position: relative;
  padding-left: var(--space-6);
  margin-bottom: var(--space-3);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.my-alerts-features li:last-child {
  margin-bottom: 0;
}

.my-alerts-features li::before {
  content: "✓";
  position: absolute;
  left: var(--space-2);
  color: var(--color-primary);
  font-weight: var(--weight-bold);
}

.my-alerts-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  font-family: inherit;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  box-shadow: 0 2px 4px rgb(16 185 129 / 20%);
  margin-top: var(--space-5);
}

.my-alerts-cta:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgb(16 185 129 / 30%);
}

.my-alerts-cta:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

@media (width <= 640px) {
  .my-alerts-page {
    padding: var(--space-4) var(--space-3);
  }

  .my-alerts-content {
    padding: var(--space-5);
  }

  .my-alerts-title {
    font-size: 1.5rem;
  }

  .my-alerts-title svg {
    width: 28px;
    height: 28px;
  }
}

/* Action pill buttons (calendar actions) */
.action-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2); /* 8px */
  padding: 10px 16px;
  border-radius: 20px;
  min-height: 48px;
  font-size: var(--text-sm); /* 14px */
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: all var(--transition-base);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  border: 1px solid transparent;
}

.action-pill img {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* Make action pill icons light/white in dark mode */
:root[data-theme="dark"] .action-pill--calendar img,
:root[data-theme="dark"] .action-pill--share img {
  filter: invert(1) brightness(1.2);
}

/* Join pill - Light green full-width */
.action-pill--join {
  display: flex; /* Override inline-flex from base class */
  width: 100%;
  max-width: none; /* Override any max-width constraints */
  justify-content: center;
  background: var(--color-primary-light);
  color: var(--color-primary-hover);
  border-color: var(--color-primary);
  font-weight: var(--weight-semibold);
  min-height: 48px;
  padding: var(--space-3) var(--space-4); /* 12px 16px */
}

.action-pill--join:hover {
  background: color-mix(
    in srgb,
    var(--color-primary-light) 75%,
    var(--color-primary) 25%
  );
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.action-pill--join:active {
  transform: translateY(0);
}

.action-pill--join:focus-visible {
  outline: 2px solid var(--color-primary-hover);
  outline-offset: 2px;
}

.action-pill--join img {
  width: 20px;
  height: 20px;

  /* Match icon color to text color for visual consistency */
  filter: invert(35%) sepia(71%) saturate(1000%) hue-rotate(125deg)
    brightness(95%) contrast(95%);
  opacity: 0.9;
}

/* Join dropdown container */
.join-dropdown {
  position: relative;
  display: block;
  width: 100%;
}

/* Calendar dropdown container */
.calendar-dropdown {
  position: relative;
  display: inline-block;
  flex: 1; /* Allow calendar to grow and fill space */
  min-width: 0; /* Allow flex shrinking */
}

/* Calendar pill - Sky blue accent */
.action-pill--calendar {
  background: var(--surface-info-bg);
  color: var(--surface-info-text);
  border-color: var(--surface-info-border);
}

.action-pill--calendar:hover {
  background: color-mix(
    in srgb,
    var(--surface-info-bg) 80%,
    var(--surface-info-border) 20%
  );
  border-color: color-mix(
    in srgb,
    var(--surface-info-border) 80%,
    var(--surface-info-text) 20%
  );
  transform: translateY(-1px);
}

.action-pill--calendar:focus-visible {
  outline: 2px solid var(--color-info);
  outline-offset: 2px;
}

/* Dropdown chevron icon */
.dropdown-chevron {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  transition: transform var(--transition-base);
}

.calendar-dropdown-trigger[aria-expanded="true"] .dropdown-chevron {
  transform: rotate(180deg);
}

/* Calendar dropdown menu */
.calendar-dropdown-menu {
  position: absolute; /* Changed back to absolute */
  top: calc(100% + var(--space-2)); /* 8px below button */
  left: 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 10%),
    0 2px 4px -1px rgb(0 0 0 / 6%);
  min-width: 200px;
  z-index: 100000; /* Very high z-index to appear above all content including stacking contexts */
  overflow: hidden;
  animation: dropdown-slide-in var(--transition-base);
}

@keyframes dropdown-slide-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Calendar option items */
.calendar-option {
  display: flex;
  align-items: center;
  gap: var(--space-3); /* 12px */
  width: 100%;
  padding: var(--space-3) var(--space-4); /* 12px 16px */
  min-height: 44px;
  border: none;
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.calendar-option:hover {
  background: var(--color-bg-page);
}

.calendar-option:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
  background: var(--color-bg-page);
}

.calendar-option .calendar-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  opacity: 0.6; /* Make all calendar icons grey */
  filter: grayscale(100%); /* Convert to grayscale */
}

/* Make calendar dropdown icons light/white in dark mode */
:root[data-theme="dark"] .calendar-option .calendar-icon {
  filter: grayscale(100%) invert(1) brightness(1.2);
  opacity: 0.8;
}

/* Join dropdown menu (reuses calendar dropdown pattern) */
.join-dropdown-menu {
  position: absolute;
  top: calc(100% + var(--space-2)); /* 8px below button */
  left: 0;
  right: 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow:
    0 10px 25px -5px rgb(0 0 0 / 25%),
    0 8px 10px -6px rgb(0 0 0 / 20%);
  z-index: 100000; /* Very high to appear above everything */
  overflow: hidden;
  animation: dropdown-slide-in var(--transition-base);
  min-width: 100%; /* Match trigger button width */
}

/* Join option items */
.join-option {
  display: flex;
  align-items: center;
  gap: var(--space-3); /* 12px */
  width: 100%;
  padding: var(--space-3) var(--space-4); /* 12px 16px */
  min-height: 44px;
  border: none;
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.join-option:hover {
  background: var(--color-bg-page);
}

.join-option:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
  background: var(--color-bg-page);
}

.join-option .join-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

/* Make join dropdown icons light/white in dark mode */
:root[data-theme="dark"] .join-option .join-icon {
  filter: invert(1) brightness(1.2);
}

/* Share dropdown (reuses calendar dropdown pattern) */
.share-dropdown {
  position: relative;
  display: inline-block;
  flex: 1; /* Allow share to grow */
  min-width: 0; /* Allow flex shrinking */
}

.share-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  min-height: 44px;
}

.share-dropdown-trigger .dropdown-chevron {
  flex-shrink: 0;
  color: currentcolor;
  transition: transform var(--transition-base);
}

.share-dropdown-trigger[aria-expanded="true"] .dropdown-chevron {
  transform: rotate(180deg);
}

/* Share dropdown menu */
.share-dropdown-menu {
  position: absolute;
  top: calc(100% + var(--space-2)); /* 8px below button */
  left: 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 10%),
    0 2px 4px -1px rgb(0 0 0 / 6%);
  min-width: 200px;
  z-index: 100000; /* Very high z-index to appear above all content */
  overflow: hidden;
  animation: dropdown-slide-in var(--transition-base);
}

/* Share option items */
.share-option {
  display: flex;
  align-items: center;
  gap: var(--space-3); /* 12px */
  width: 100%;
  padding: var(--space-3) var(--space-4); /* 12px 16px */
  min-height: 44px;
  border: none;
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.share-option:hover {
  background: var(--color-bg-page);
}

.share-option:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
  background: var(--color-bg-page);
}

.share-option svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-text-secondary);
}

/* Make share dropdown icons lighter in dark mode */
:root[data-theme="dark"] .share-option svg {
  color: var(--color-text-primary);
}

/* Native share option with separator */
.share-option--native {
  border-top: 1px solid var(--color-border);
}

/* Share Preview Modal */
.share-preview-modal {
  position: fixed;
  inset: 0;
  background: var(--overlay-heavy);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.share-preview-modal.visible {
  opacity: 1;
}

.share-preview-content {
  background: var(--color-bg-card);
  border-radius: 16px;
  padding: var(--space-6);
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  box-shadow:
    0 20px 25px -5px rgb(0 0 0 / 20%),
    0 10px 10px -5px rgb(0 0 0 / 10%);
  animation: modal-slide-up var(--transition-base);
}

@keyframes modal-slide-up {
  from {
    opacity: 0;
    transform: translateY(32px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.share-preview-image {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 10%);
}

.share-preview-buttons {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}

.btn-preview-cancel,
.btn-preview-share {
  padding: var(--space-3) var(--space-5);
  min-height: 44px;
  border-radius: 8px;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  font-family: inherit;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  border: none;
}

.btn-preview-cancel {
  background: var(--color-bg-page);
  color: var(--color-text-secondary);
}

.btn-preview-cancel:hover {
  background: var(--color-border);
  transform: translateY(-1px);
}

.btn-preview-cancel:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

.btn-preview-share {
  background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
  color: var(--white);
  box-shadow: 0 4px 6px -1px rgb(131 58 180 / 30%);
}

.btn-preview-share:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px -2px rgb(131 58 180 / 40%);
}

.btn-preview-share:focus-visible {
  outline: 2px solid #833ab4;
  outline-offset: 2px;
}

/* Mobile responsive */
@media (width <= 640px) {
  .share-preview-content {
    padding: var(--space-4);
    gap: var(--space-4);
  }

  .share-preview-buttons {
    flex-direction: column-reverse;
  }

  .btn-preview-cancel,
  .btn-preview-share {
    width: 100%;
  }
}

/* ============================================
   ALERTS MODAL - Bottom sheet on mobile, centered on desktop
   ============================================ */

.alerts-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-end; /* Mobile: bottom sheet */
  justify-content: center;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-base),
    visibility var(--transition-base);
}

/* Desktop: centered modal */
@media (width >= 480px) {
  .alerts-modal {
    align-items: center;
    padding: var(--space-4);
  }
}

.alerts-modal-visible {
  opacity: 1;
  visibility: visible;
}

.alerts-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-medium);
  backdrop-filter: blur(8px);
}

.alerts-modal-content {
  position: relative;
  background: var(--color-bg-card);
  width: 100%;
  max-width: 100%;
  max-height: 90vh;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  border-radius: 20px 20px 0 0;
  box-shadow:
    0 -10px 25px -5px rgb(0 0 0 / 15%),
    0 -4px 6px -2px rgb(0 0 0 / 5%);
  transform: translateY(100%);
  transition: transform 300ms ease;
}

.alerts-modal-visible .alerts-modal-content {
  transform: translateY(0);
}

/* Desktop: centered with scale animation */
@media (width >= 480px) {
  .alerts-modal-content {
    max-width: 480px;
    border-radius: 16px;
    box-shadow:
      0 20px 25px -5px rgb(0 0 0 / 20%),
      0 10px 10px -5px rgb(0 0 0 / 10%);
    transform: translateY(20px) scale(0.95);
  }

  .alerts-modal-visible .alerts-modal-content {
    transform: translateY(0) scale(1);
  }
}

/* Drag handle for mobile */
.alerts-modal-handle {
  display: flex;
  justify-content: center;
  padding: var(--space-3) 0 var(--space-2);
  cursor: grab;
  flex-shrink: 0;
  touch-action: none;
  user-select: none;
}

.alerts-modal-handle::before {
  content: "";
  width: 36px;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
}

/* Hide handle on desktop */
@media (width >= 480px) {
  .alerts-modal-handle {
    display: none;
  }
}

/* Dragging state */
.alerts-modal--dragging .alerts-modal-content {
  transition: none;
}

.alerts-modal--dragging .alerts-modal-backdrop {
  transition: none;
}

.alerts-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.alerts-modal-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin: 0;
}

.alerts-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.alerts-modal-close:hover {
  background: var(--color-bg-page);
  color: var(--color-text-primary);
}

.alerts-modal-close:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

.alerts-modal-body {
  padding: var(--space-5);
  overflow-y: auto;
}

/* Beta testing notice */
.alerts-beta-notice {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: linear-gradient(
    135deg,
    var(--surface-warning-bg) 0%,
    color-mix(in srgb, var(--surface-warning-bg) 90%, var(--color-warning) 10%)
      100%
  );
  border: 1px solid var(--surface-warning-border);
  border-radius: 8px;
  margin-bottom: var(--space-5);
  color: var(--surface-warning-text);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.alerts-beta-notice svg {
  color: var(--color-warning);
}

.alerts-modal-description {
  margin: 0 0 var(--space-4) 0;
  color: var(--color-text-secondary);
  font-size: var(--text-base);
  line-height: 1.5;
}

.alerts-filter-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--color-bg-page);
  border-radius: 8px;
  margin-bottom: var(--space-5);
}

.alert-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 28px;
  padding: 0 var(--space-3);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  white-space: nowrap;
}

.alerts-no-filters {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-style: italic;
}

/* Email preview section */
.alerts-email-preview {
  margin: var(--space-5) 0 var(--space-6) 0;
}

.alerts-email-preview-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

.alerts-email-preview-card {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgb(59 130 246 / 8%);
}

.alerts-email-preview-header {
  padding: var(--space-4);
  background: white;
  border-bottom: 1px solid #e0e7ff;
}

.alerts-email-preview-header strong {
  font-size: var(--text-base);
  color: var(--color-text-primary);
}

.alerts-email-preview-content {
  padding: var(--space-4);
}

.alerts-email-preview-event {
  padding: var(--space-3);
  background: white;
  border-radius: 6px;
  margin-bottom: var(--space-2);
  border-left: 3px solid #3b82f6;
}

.alerts-email-preview-event:last-of-type {
  margin-bottom: var(--space-3);
}

.alerts-email-preview-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.alerts-email-preview-meta {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.alerts-email-preview-more {
  font-size: var(--text-xs);
  color: var(--color-info);
  font-weight: var(--weight-medium);
  font-style: italic;
  padding-left: var(--space-3);
}

@media (width <= 640px) {
  .alerts-email-preview-card {
    font-size: 0.9rem;
  }
}

.alerts-form-group {
  margin-bottom: var(--space-4);
}

.alerts-form-group:last-child {
  margin-bottom: 0;
}

.alerts-form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}

.alerts-form-input,
.alerts-form-select {
  width: 100%;
  min-height: 44px;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-family: inherit;
  color: var(--color-text-primary);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.alerts-form-input:hover,
.alerts-form-select:hover {
  border-color: var(--color-primary);
}

.alerts-form-input:focus,
.alerts-form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgb(16 185 129 / 10%);
}

.alerts-form-input::placeholder {
  color: var(--color-text-tertiary);
}

/* Frequency radio buttons */
.alerts-frequency-options {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.alerts-frequency-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.alerts-frequency-option:hover {
  border-color: var(--color-info);
  background: var(--surface-info-bg);
}

.alerts-frequency-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.alerts-frequency-option input[type="radio"]:checked + .alerts-frequency-label {
  color: var(--surface-info-text);
  font-weight: var(--weight-semibold);
}

.alerts-frequency-option
  input[type="radio"]:checked
  ~ .alerts-frequency-label::before {
  content: "";
  position: absolute;
  inset: -2px;
  border: 2px solid var(--color-info);
  border-radius: 8px;
  background: var(--surface-info-bg);
  z-index: -1;
}

.alerts-frequency-option:has(input[type="radio"]:checked) {
  border-color: var(--color-info);
  background: var(--surface-info-bg);
}

.alerts-frequency-label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

@media (width <= 640px) {
  .alerts-frequency-options {
    flex-direction: column;
  }
}

.alerts-modal-footer {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-5);
  border-top: 1px solid var(--color-border);
}

.alerts-btn {
  flex: 1;
  min-height: 44px;
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  font-family: inherit;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  border: none;
}

.alerts-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.alerts-btn-secondary {
  background: var(--color-bg-page);
  color: var(--color-text-secondary);
}

.alerts-btn-secondary:hover:not(:disabled) {
  background: var(--color-border);
  transform: translateY(-1px);
}

.alerts-btn-secondary:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

.alerts-btn-primary {
  background: var(--color-primary);
  color: var(--white);
  box-shadow: 0 2px 4px rgb(16 185 129 / 20%);
}

.alerts-btn-primary:hover:not(:disabled) {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgb(16 185 129 / 30%);
}

.alerts-btn-primary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Mobile responsive */
@media (width <= 640px) {
  .alerts-modal {
    padding: var(--space-3);
  }

  .alerts-modal-content {
    max-height: 95vh;
  }

  .alerts-modal-header,
  .alerts-modal-body,
  .alerts-modal-footer {
    padding: var(--space-4);
  }

  .alerts-modal-footer {
    flex-direction: column-reverse;
  }

  .alerts-btn {
    width: 100%;
  }
}

/* Download pill - Violet accent */
.action-pill--download {
  background: var(--surface-purple-bg);
  color: var(--surface-purple-text);
  border-color: var(--surface-purple-border);
}

.action-pill--download:hover {
  background: color-mix(
    in srgb,
    var(--surface-purple-bg) 75%,
    var(--surface-purple-border) 25%
  );
  border-color: var(--surface-purple-border);
  transform: translateY(-1px);
}

.action-pill--download:focus-visible {
  outline: 2px solid var(--surface-purple-text);
  outline-offset: 2px;
}

/* Share pill - Cyan accent */
.action-pill--share {
  background: var(--surface-cyan-bg);
  color: var(--surface-cyan-text);
  border-color: var(--surface-cyan-border);
  flex: 1; /* Grow to fill remaining space */
  justify-content: center; /* Center content */
}

.action-pill--share:hover {
  background: color-mix(
    in srgb,
    var(--surface-cyan-bg) 75%,
    var(--surface-cyan-border) 25%
  );
  border-color: var(--surface-cyan-border);
  transform: translateY(-1px);
}

.action-pill--share:focus-visible {
  outline: 2px solid var(--surface-cyan-text);
  outline-offset: 2px;
}

/* Error Messages */
.error {
  color: var(--error);
}

/* Responsive Design - Tablet & Desktop */
@media (width >= 600px) {
  body {
    --content-spacing-top: var(
      --space-5
    ); /* 20px on larger mobile/small tablet */
  }

  h1 {
    font-size: var(--text-3xl); /* 30px on larger screens */
  }

  .header-icon {
    width: 40px;
    height: 40px;
  }

  .event-actions {
    flex-direction: row;
  }

  .btn-calendar {
    flex: 1;
  }

  .event-signup {
    flex-direction: row;
  }

  .btn-signup {
    flex: 1;
  }

  .footer__columns {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (width >= 768px) {
  .footer__main {
    grid-template-columns: 1.5fr 2fr;
  }
}

@media (width >= 768px) {
  .events-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4); /* 16px */
    align-items: start; /* Prevent cards from stretching to match row height */
  }

  .club-header {
    font-size: var(--text-xl); /* 20px */
  }

  body {
    --content-spacing-top: var(--space-2); /* 24px on tablet */
  }
}

@media (width >= 1024px) {
  .events-list {
    gap: var(--space-6); /* Increase gap to 24px on larger screens */
  }

  body {
    --content-spacing-top: var(--space-2); /* 32px on desktop */
  }
}

/* Wide Desktop - 3 Column Layout */
@media (width >= 1280px) {
  .container {
    max-width: 1280px; /* Prevent cards from getting too wide */
    margin-left: auto;
    margin-right: auto;
  }

  .events-list {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6); /* 24px gap between cards */
    align-items: start; /* Prevent cards from stretching to match row height */
  }

  body {
    --content-spacing-top: var(
      --space-4
    ); /* 40px on ultra-wide for generous margins */
  }
}

/* Focus Visible for Accessibility */
:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Print Styles */
@media print {
  .filters-section,
  .footer {
    display: none;
  }

  .event-card {
    break-inside: avoid;
  }
}

/* === New Action Button Hierarchy === */

/* Action buttons container */
.event-actions--redesign {
  display: flex !important;
  flex-flow: column nowrap !important;
  gap: var(--space-3); /* 12px */
  margin-top: var(--space-4); /* 16px */ /* Never allow wrapping to row */
  align-items: stretch !important; /* Stretch children to full width */
}

/* Join action row - full width container for join button/dropdown */
.join-action-row {
  width: 100% !important;
  display: block !important;
  flex: 0 0 100% !important; /* Force full width, no shrinking */
  min-width: 100% !important; /* Additional safeguard */
  max-width: 100% !important; /* Prevent overflow */
}

/* Primary action button (Join via App) */
.btn-action--primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2); /* 8px */
  min-height: 48px;
  padding: var(--space-3) var(--space-5); /* 12px 20px */
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border: none;
  border-radius: 8px;
  font-size: var(--text-base); /* 16px */
  font-weight: var(--weight-semibold);
  text-decoration: none;
  transition: all var(--transition-base);
  cursor: pointer;
  font-family: inherit;
  width: 100%; /* Full width */
}

.btn-action--primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

.btn-action--primary:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

.btn-action__icon {
  flex-shrink: 0;
  filter: var(--icon-filter-white); /* White icon */
}

.btn-action__text {
  flex: 1;
  text-align: center;
}

.btn-action__arrow {
  flex-shrink: 0;
  filter: var(--icon-filter-white); /* White arrow */
}

/* Secondary action button (Join via Web) */
.btn-action--secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2); /* 8px */
  min-height: 44px;
  padding: var(--space-3) var(--space-5); /* 12px 20px */
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  border-radius: 8px;
  font-size: var(--text-base); /* 16px */
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: all var(--transition-base);
  cursor: pointer;
  font-family: inherit;
  width: 100%; /* Full width */
}

.btn-action--secondary:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary-hover);
  color: var(--color-primary-hover);
  transform: translateY(-1px);
}

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

.btn-action--secondary:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

.btn-action--secondary .btn-action__icon {
  filter: none; /* Keep icon color */
}

/* Tertiary actions container */
.tertiary-actions {
  display: flex !important;
  gap: var(--space-3); /* 12px - spacing between calendar and share */
  margin-top: 0;
  overflow: visible; /* Allow dropdown to overflow */
  width: 100% !important; /* Force full width on own row */
  flex: 0 0 100% !important; /* Prevent inline placement with join button */
  flex-shrink: 0 !important; /* Never shrink */
  min-width: 100% !important; /* Additional constraint */
  max-width: 100% !important; /* Prevent overflow */
}

/* Stacked layout (iPhone Safari / Desktop) */
.tertiary-actions--stacked {
  flex-direction: column;
  align-items: flex-start;
}

/* Inline layout (Android / iPhone Chrome) */
.tertiary-actions--inline {
  flex-flow: row wrap;
  align-items: center;
}

/* Desktop: Calendar and Share each take 50% width */
@media (width >= 600px) {
  .tertiary-actions--inline > * {
    flex: 1 1 calc(50% - var(--space-3) / 2); /* 50% minus half the gap */
    min-width: 0;
  }

  .tertiary-actions--inline .action-pill {
    width: 100%;
    justify-content: center;
  }
}

/* Make tertiary action buttons full-width on mobile */
@media (width < 600px) {
  .tertiary-actions--inline {
    flex-direction: column;
  }

  .tertiary-actions--inline > * {
    width: 100%;
    flex: 0 0 auto;
  }

  .tertiary-actions--inline .action-pill {
    width: 100%;
    flex: 0 0 auto;
    justify-content: center;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .footer__bottom-right {
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-between;
  }
}

/* === Toast Notifications === */
.toast {
  position: fixed;
  bottom: var(
    --toast-bottom,
    var(--space-6)
  ); /* 24px default, raised when feedback bar visible */

  left: 50%;
  transform: translateX(-50%) translateY(100px);
  display: flex;
  align-items: center;
  gap: var(--space-2); /* 8px */
  padding: var(--space-3) var(--space-5); /* 12px 20px */
  background: var(--text-primary);
  color: var(--white);
  border-radius: 8px;
  box-shadow:
    0 4px 12px rgb(0 0 0 / 15%),
    0 0 0 1px rgb(0 0 0 / 10%);
  font-size: var(--text-sm); /* 14px */
  font-weight: var(--weight-medium);
  opacity: 0;
  transition:
    opacity var(--transition-base),
    transform var(--transition-base),
    bottom var(--transition-base);
  z-index: 10002; /* Above feedback sticky (9999), feedback sheet (10001), and alerts (10000) */
  pointer-events: none;
}

.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.toast__icon svg {
  color: currentcolor;
}

.toast__message {
  line-height: var(--leading-normal);
}

/* Toast variants */
.toast--success {
  background: var(--color-success);
}

.toast--error {
  background: var(--color-error);
}

.toast--info {
  background: var(--color-info);
}

/* Mobile: Make toast responsive */
@media (width <= 600px) {
  .toast {
    left: var(--space-4);
    right: var(--space-4);
    transform: translateX(0) translateY(100px);
    max-width: calc(100% - var(--space-8));
  }

  .toast--visible {
    transform: translateX(0) translateY(0);
  }
}

/* Push toast above feedback sticky bar when it's visible */
.feedback-sticky--visible ~ .toast,
body:has(.feedback-sticky--visible) .toast {
  --toast-bottom: 80px; /* Clear the ~56px sticky bar + spacing */
}

/* =====================================================
   AUTH BUTTON & MODAL STYLES
   ===================================================== */

/* Header Theme Toggle - positioned left of auth button */
.header-theme-toggle {
  display: none; /* Hidden on mobile by default */
}

/* Desktop: Show header theme toggle when not logged in */
@media (width >= 768px) {
  .header-theme-toggle {
    display: flex;
    align-items: center;
  }

  /* Hide when user is signed in (toggle moves to menu) */
  .header-theme-toggle--hidden {
    display: none;
  }
}

/* Header theme toggle styling adjustments for dark header */
.header-theme-toggle .theme-toggle {
  background: rgb(255 255 255 / 10%);
  border-color: rgb(255 255 255 / 20%);
}

.header-theme-toggle .theme-toggle-btn {
  color: rgb(255 255 255 / 70%);
}

.header-theme-toggle .theme-toggle-btn:hover {
  background: rgb(255 255 255 / 15%);
  color: var(--white);
}

.header-theme-toggle .theme-toggle-btn.active {
  background: rgb(255 255 255 / 25%);
  color: var(--white);
  box-shadow: none;
}

/* Auth Menu Theme Toggle Item */
.auth-menu-theme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  gap: var(--space-3);
}

.auth-menu-theme-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
}

.auth-menu-theme .theme-toggle {
  flex-shrink: 0;
}

/* Auth Button */
.auth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  min-height: 44px;
  background: var(--white);
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--slate-800);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

/* Desktop: Match height with theme toggle */
@media (width >= 768px) {
  .auth-button {
    height: 44px;
    padding: 0 var(--space-4);
  }
}

.auth-button:hover {
  background: rgb(from var(--white) r g b / 90%);
}

.auth-button:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* Auth Avatar */
.auth-avatar {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--white);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  overflow: hidden;
  flex-shrink: 0;
}

.auth-avatar svg {
  color: var(--slate-800);
  width: 20px;
  height: 20px;
}

.auth-avatar--cartoon {
  background: none;
  padding: 0;
}

.auth-avatar--cartoon svg {
  width: 100%;
  height: 100%;
}

.auth-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Auth Button Text */
.auth-button-text {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

/* Mobile: hide text, show only avatar when signed in */
@media (width <= 768px) {
  .auth-button--signed-in .auth-button-text {
    display: none;
  }
}

/* Signed in state */
.auth-button--signed-in {
  background: transparent;
  color: var(--white);
  border: none;
  padding: 0;
}

.auth-button--signed-in:hover {
  background: rgb(255 255 255 / 10%);
  border-color: rgb(255 255 255 / 50%);
}

.auth-button--signed-in .auth-avatar {
  display: flex;
}

@media (width >= 768px) {
  .auth-button--signed-in {
    padding: var(--space-2) var(--space-3);
    gap: var(--space-2);
  }
}

/* Auth Menu Wrapper - position relative for dropdown */
.auth-menu-wrapper {
  position: relative;
  flex-shrink: 0;
}

/* Auth Menu Dropdown */
.auth-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: var(--space-2);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  min-width: 250px;
  box-shadow: 0 10px 25px -5px rgb(0 0 0 / 15%);
  z-index: 1000;
}

.auth-menu-item {
  display: flex;
  flex-direction: column;
}

/* Auth Menu User Info Section */
.auth-menu-user-info {
  padding: var(--space-4);
  background: var(--color-bg-page);
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Auth Menu Avatar */
.auth-menu-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  overflow: hidden;
}

.auth-menu-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-menu-avatar--cartoon {
  background: none;
}

.auth-menu-avatar--cartoon svg {
  width: 100%;
  height: 100%;
}

.auth-menu-user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-menu-user-name {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.auth-menu-user-email {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.auth-menu-profile-link {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition-base);
}

.auth-menu-profile-link:hover {
  color: var(--color-primary);
}

.auth-menu-profile-button {
  display: block;
  width: 100%;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--text-primary);
  text-align: center;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  border-radius: 6px;
  text-decoration: none;
  transition: all var(--transition-base);
}

.auth-menu-profile-button:hover {
  background: var(--bg-hover);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.auth-menu-link,
.auth-menu-button {
  padding: var(--space-3) var(--space-4);
  border: none;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.auth-menu-link:hover,
.auth-menu-button:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--color-primary);
}

.auth-menu-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-menu-divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-2) 0;
}

/* Auth Menu Sign Out link */
.auth-menu-link--signout {
  color: var(--color-text-secondary);
  gap: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  margin: var(--space-2) var(--space-3);
  justify-content: center;
  font-size: var(--text-sm);
}

.auth-menu-link--signout:hover {
  color: var(--color-error);
  border-color: var(--color-error);
  background: rgb(239 68 68 / 6%);
}

/* Auth Menu Promo (logged-out state) */
.auth-menu-promo {
  padding: var(--space-4) var(--space-5);
}

.auth-menu-promo__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-3);
}

.auth-menu-promo__list {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.auth-menu-promo__list li {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.auth-menu-promo__list li svg {
  flex-shrink: 0;
  position: relative;
  top: 2px;
}

.auth-menu-promo__cta {
  display: block;
  width: 100%;
  padding: var(--space-3);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border: none;
  border-radius: 8px;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: background-color var(--transition-fast);
}

.auth-menu-promo__cta:hover {
  background: var(--color-primary-hover);
}

.auth-menu-promo__note {
  margin: var(--space-2) 0 0;
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  text-align: center;
}

.theme-icons {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.theme-label {
  flex: 1;
}

.badge-coming {
  display: inline-block;
  font-size: var(--text-xs);
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: var(--space-1) var(--space-2);
  border-radius: 4px;
  font-weight: var(--weight-semibold);
  margin-left: auto;
}

.badge-warning {
  display: inline-block;
  font-size: var(--text-xs);
  background: var(--surface-warning-bg);
  color: var(--surface-warning-text);
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--surface-warning-border);
  border-radius: 4px;
  font-weight: var(--weight-semibold);
  margin-left: auto;
}

/* Auth Modal */

/* Auth Modal - Bottom sheet on mobile, centered on desktop */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end; /* Mobile: bottom sheet */
  justify-content: center;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-base),
    visibility var(--transition-base);
}

/* Desktop: centered modal */
@media (width >= 480px) {
  .auth-modal {
    align-items: center;
    padding: var(--space-4);
  }
}

.auth-modal.modal--visible {
  opacity: 1;
  visibility: visible;
}

/* Auth Modal Backdrop */
.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-light);
  backdrop-filter: blur(4px);
}

/* Auth Modal Content - the sheet/panel */
.auth-modal-content {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: 90vh;
  max-height: 90dvh;
  background: var(--color-bg-card);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 -10px 25px -5px rgb(0 0 0 / 15%),
    0 -4px 6px -2px rgb(0 0 0 / 5%);
  transform: translateY(100%);
  transition: transform 300ms ease;
}

.auth-modal.modal--visible .auth-modal-content {
  transform: translateY(0);
}

/* Desktop: centered with scale animation */
@media (width >= 480px) {
  .auth-modal-content {
    max-width: 400px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 25%);
    transform: translateY(20px) scale(0.95);
  }

  .auth-modal.modal--visible .auth-modal-content {
    transform: translateY(0) scale(1);
  }
}

/* Drag handle for mobile */
.auth-modal-handle {
  display: flex;
  justify-content: center;
  padding: var(--space-3) 0 var(--space-2);
  cursor: grab;
  flex-shrink: 0;
  touch-action: none;
  user-select: none;
}

.auth-modal-handle::before {
  content: "";
  width: 36px;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
}

/* Hide handle on desktop */
@media (width >= 480px) {
  .auth-modal-handle {
    display: none;
  }
}

/* Dragging state - disable transitions for smooth gesture tracking */
.auth-modal--dragging .auth-modal-content {
  transition: none;
}

.auth-modal--dragging .auth-modal-backdrop {
  transition: none;
}

/* Auth Modal Body - scrollable content */
.auth-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 var(--space-5) var(--space-5);
  padding-bottom: max(var(--space-5), env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}

/* Desktop: restore original padding */
@media (width >= 480px) {
  .auth-modal-body {
    padding: var(--space-8);
    padding-top: var(--space-6);
  }
}

.modal-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: all var(--transition-base);
  z-index: 1;
}

/* Desktop: adjust close button position */
@media (width >= 480px) {
  .modal-close {
    top: var(--space-4);
  }
}

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

.auth-modal-title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-2);
  text-align: center;
}

.auth-modal-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-6);
  text-align: center;
}

/* Auth Buttons */
.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
}

.auth-btn--google {
  background: var(--white);
  border: 1px solid var(--color-border);
  color: var(--slate-800);
}

.auth-btn--google:hover {
  background: var(--slate-100);
  border-color: var(--color-text-secondary);
}

/* Dark mode: Google button stays light for brand recognition */
:root[data-theme="dark"] .auth-btn--google {
  background: var(--white);
  border-color: var(--color-border);
  color: var(--slate-800);
}

:root[data-theme="dark"] .auth-btn--google:hover {
  background: var(--slate-100);
  border-color: var(--white);
}

/* Apple button — Apple HIG mandates black bg, white text/icon */
.auth-btn--apple {
  background: #000;
  color: #fff;
  border: 1px solid #000;
}

.auth-btn--apple:hover {
  background: #333;
  border-color: #333;
}

/* Dark mode: Apple button uses white-on-black (Apple HIG alternate) */
:root[data-theme="dark"] .auth-btn--apple {
  background: #fff;
  color: #000;
  border-color: #fff;
}

:root[data-theme="dark"] .auth-btn--apple:hover {
  background: var(--slate-200);
  border-color: var(--slate-200);
}

/* Divider between auth buttons */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-4) 0;
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.auth-btn--primary {
  background: var(--color-primary);
  color: var(--white);
}

.auth-btn--primary:hover {
  background: var(--hover-bg-primary);
}

.auth-btn--loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Auth Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-6) 0;
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* Auth Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.auth-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
}

.auth-input {
  padding: var(--space-3);
  font-size: var(--text-base);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg-page);
  color: var(--color-text-primary);
  transition:
    border-color var(--transition-base),
    background-color var(--transition-base);
}

/* Dark mode: Input uses elevated bg for better contrast against card */
:root[data-theme="dark"] .auth-input {
  background: var(--color-bg-elevated);
  border-color: var(--color-bg-hover);
}

.auth-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

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

.auth-error {
  font-size: var(--text-sm);
  color: var(--color-error);
  padding: var(--space-2) var(--space-3);
  background: rgb(239 68 68 / 10%);
  border-radius: 6px;
}

/* Auth Footer */
.auth-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.auth-link {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: var(--text-sm);
  cursor: pointer;
  padding: var(--space-1);
}

.auth-link:hover {
  text-decoration: underline;
}

/* Email auth hidden - Google only for now
   To re-enable: remove this rule and enable Email/Password in Firebase Console */
.auth-modal .auth-divider,
.auth-modal .auth-form,
.auth-modal .auth-footer {
  display: none;
}

/* =====================================================
   PROFILE PAGE STYLES
   ===================================================== */

.profile-main {
  min-height: 60vh;
}

/* Loading State */
.profile-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-16) var(--space-4);
  color: var(--color-text-secondary);
}

/* ── Standard Bouncing Ball Loader ──────────────────────────── */
.loading-ball {
  font-size: 2rem;
  line-height: 1;
  animation: loading-bounce 0.6s ease-in-out infinite alternate;
}

/* Compact variant for inline / search contexts */
.loading-ball--sm {
  font-size: 1.25rem;
}

@keyframes loading-bounce {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-14px);
  }
}

/* Not Signed In State */
.profile-not-signed-in {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-4);
}

.profile-empty-state {
  text-align: center;
  max-width: 400px;
}

.profile-empty-state svg {
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-4);
}

.profile-empty-state h2 {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-2);
}

.profile-empty-state p {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-6);
}

/* Profile Content */
.profile-content {
  max-width: 600px;
  margin: 0 auto;
}

/* Profile Header Section */
.profile-header-section {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--color-bg-card);
  border-radius: 12px;
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.profile-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--white);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  overflow: hidden;
  border: none;
  box-shadow: none;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  box-shadow: none;
}

.profile-avatar--initials {
  background: var(--color-primary);
}

.profile-avatar-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-base);
}

.profile-avatar-edit:hover {
  background: var(--bg-hover);
  border-color: var(--color-primary);
}

.profile-avatar-edit svg {
  color: var(--color-text-secondary);
}

.profile-header-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-1);
}

.profile-email {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 0;
}

/* Profile Completeness Bar */
.profile-completeness {
  background: var(--color-bg-card);
  border-radius: 12px;
  padding: var(--space-4) var(--space-6);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-4);
}

.profile-completeness__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.profile-completeness__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
}

.profile-completeness__percent {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
}

.profile-completeness__track {
  width: 100%;
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}

.profile-completeness__fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 3px;
  transition: width 400ms ease;
}

.profile-completeness__hint {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin: var(--space-2) 0 0;
}

.profile-completeness__hint-icon {
  color: var(--color-primary);
  font-weight: var(--weight-semibold);
}

.profile-completeness__hint-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 44px;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: var(--weight-medium);
  transition: opacity var(--transition-base);
}

.profile-completeness__hint-link:hover,
.profile-completeness__hint-link:active {
  opacity: 0.8;
}

.profile-completeness__hint-link svg {
  flex-shrink: 0;
}

.profile-completeness__hint-arrow {
  margin-left: var(--space-half, 2px);
}

/* Auto-save Status Indicator */
.profile-autosave-status {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2);
  margin-bottom: var(--space-2);
  border-radius: 8px;
  transition: opacity var(--transition-base);
}

.profile-autosave-text {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}

.profile-autosave-status--saving .profile-autosave-text {
  color: var(--color-text-tertiary);
}

.profile-autosave-status--saved .profile-autosave-text {
  color: var(--color-success);
}

.profile-autosave-status--error .profile-autosave-text {
  color: var(--color-error);
}

/* Profile Form */
.profile-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-top: var(--space-6);
}

.profile-section {
  background: var(--color-bg-card);
  border-radius: 12px;
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: calc(var(--header-height) + 72px);
}

.profile-section-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.profile-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.profile-section-header .profile-section-title {
  margin: 0;
  padding: 0;
  border: none;
}

.profile-section-link {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-primary);
  text-decoration: none;
  transition: opacity var(--transition-base);
}

.profile-section-link:hover {
  opacity: 0.8;
}

/* Profile section description text */
.profile-section-description {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: calc(-1 * var(--space-2)) 0 var(--space-4);
  line-height: var(--leading-normal);
}

/* Profile Link Rows (navigation to sub-pages) */
.profile-link-rows {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* ── Match Highlight Cards (Profile) ── */

.match-highlights {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.match-highlight-card-wrapper {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
  background: var(--color-bg-card);
  overflow: hidden;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.match-highlight-card-wrapper:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.match-highlight-card-wrapper .match-highlight-card {
  border: none;
  border-radius: 0;
}

.match-highlight-card-wrapper .match-highlight-card:hover {
  box-shadow: none;
}

.match-highlight-card {
  display: block;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
  color: inherit;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.match-highlight-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.match-highlight-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.match-highlight-card__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-tertiary);
}

.match-highlight-card--next .match-highlight-card__label {
  color: var(--color-primary);
}

.match-highlight-card__countdown,
.match-highlight-card__ago {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-tertiary);
}

.match-highlight-card--next .match-highlight-card__countdown {
  color: var(--color-primary);
}

.match-highlight-card__body {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.match-highlight-card__date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md, 8px);
  background: var(--color-bg-page);
  flex-shrink: 0;
}

.match-highlight-card__day {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  text-transform: uppercase;
}

.match-highlight-card--past .match-highlight-card__day {
  color: var(--color-text-secondary);
}

.match-highlight-card__datenum {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.match-highlight-card__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.match-highlight-card__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-highlight-card__meta {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.match-highlight-card__chevron {
  flex-shrink: 0;
  color: var(--color-text-tertiary);
}

.match-highlight-card--past {
  opacity: 0.8;
}

/* Score row on last-played match highlight card */
.match-highlight-card__score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  margin-top: var(--space-2);
  border-top: 1px solid var(--color-border);
}

.match-highlight-card__score-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.match-highlight-card__score-action {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-primary);
  cursor: pointer;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full, 999px);
  transition: background var(--transition-base);
}

.match-highlight-card__score-action:hover {
  background: var(
    --color-primary-subtle,
    rgb(from var(--color-primary) r g b / 8%)
  );
}

/* ── Log Score Button (shared) ── */

.btn-log-score {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-primary);
  background: none;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-full, 999px);
  padding: var(--space-2) var(--space-3);
  min-height: 44px;
  cursor: pointer;
  transition:
    background var(--transition-base),
    color var(--transition-base);
  white-space: nowrap;
}

.btn-log-score:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn-log-score--cta {
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-4);
}

/* Scored state — replaces Log Score after a score is saved */
.btn-log-score--scored {
  color: var(--color-success);
  border-color: var(--color-success);
  background: rgb(from var(--color-success) r g b / 8%);
  cursor: default;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

/* Score bar scored state — remove border and adjust padding */
.my-event-score-bar--scored {
  border-top: none;
  padding: 0 var(--space-3) var(--space-2);
  justify-content: center;
}

/* ── Mini Scoreboard (Tennis-style) ─────────────────────────────── */

.mini-scoreboard {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 240px;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  background: var(--color-bg-card);
}

.mini-scoreboard__badge {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-success);
  text-align: center;
}

.mini-scoreboard__row {
  display: flex;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.mini-scoreboard__row:first-child {
  border-bottom: 1px solid var(--color-border-subtle, var(--color-border));
}

.mini-scoreboard__row--winner {
  color: var(--color-text-primary);
  font-weight: var(--weight-semibold);
}

.mini-scoreboard__name {
  flex-shrink: 0;
  min-width: 36px;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.mini-scoreboard__sets {
  display: flex;
  gap: 1px;
  margin-left: auto;
}

.mini-scoreboard__set {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  background: var(--color-bg-page);
  border-radius: 3px;
}

.mini-scoreboard__set--won {
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
}

.mini-scoreboard__indicator {
  width: 12px;
  font-size: 8px;
  color: var(--color-success);
  text-align: center;
  flex-shrink: 0;
}

@media (width >= 480px) {
  .mini-scoreboard {
    max-width: 300px;
  }

  .mini-scoreboard__name {
    max-width: 140px;
  }
}

/* Scoreboard inside event detail page */
.event-score-cta .mini-scoreboard {
  max-width: 280px;
  margin: 0 auto;
}

/* Recent match scores — scoreboard in list row */
.recent-match__scoreboard {
  flex-shrink: 0;
}

/* Score bar on past event cards in My Games */
.my-event-score-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: var(--space-2) var(--space-4);
  border-top: 1px solid var(--color-border);
}

/* ── Score CTA on Event Detail Page (past events) ── */

.event-score-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-bg-page);
  border-radius: var(--radius-lg, 12px);
  border: 1px dashed var(--color-border);
}

.event-score-cta__text {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.event-score-cta__text svg {
  flex-shrink: 0;
  color: var(--color-primary);
}

.profile-link-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4);
  text-decoration: none;
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border);
  transition: background-color var(--transition-base);
  cursor: pointer;
}

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

a.profile-link-row:hover,
a.profile-link-row:active {
  background: var(--color-bg-hover);
}

.profile-link-row--static {
  cursor: default;
}

.profile-link-row__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--color-bg-page);
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.profile-link-row__label {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  flex: 1;
  min-width: 0;
}

.profile-link-row__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 var(--space-2);
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  flex-shrink: 0;
}

.profile-link-row__preview {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  flex-shrink: 0;
  margin-left: auto;
}

.profile-link-row__chevron {
  color: var(--color-text-tertiary);
  flex-shrink: 0;
  margin-left: auto;
}

.profile-link-row__badge + .profile-link-row__chevron {
  margin-left: 0;
}

/* Collapsible Profile Sections */
.profile-section--collapsible {
  padding: 0;
}

.profile-section__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-4) var(--space-6);
  border: none;
  border-radius: 12px;
  background: none;
  cursor: pointer;
  text-align: left;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--transition-base);
}

.profile-section__toggle:hover {
  background: var(--color-bg-hover);
}

.profile-section__toggle:hover .profile-section__chevron {
  color: var(--color-primary);
}

.profile-section__toggle:active {
  background: var(--color-border);
}

.profile-section__toggle .profile-section-title {
  margin: 0;
  padding: 0;
  border: none;
  font-size: var(--text-base);
  pointer-events: none;
}

.profile-section__chevron {
  color: var(--color-text-tertiary);
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.profile-section__toggle[aria-expanded="true"] .profile-section__chevron {
  transform: rotate(180deg);
}

/* Per-section save status indicator */
.profile-section__save-status {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  margin-left: auto;
  margin-right: var(--space-2);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
}

.profile-section__save-status--saving {
  opacity: 1;
  color: var(--color-text-tertiary);
}

.profile-section__save-status--saved {
  opacity: 1;
  color: var(--color-success);
}

.profile-section__save-status--error {
  opacity: 1;
  color: var(--color-error);
}

.profile-section__body {
  padding: 0 var(--space-6) var(--space-6);
}

.profile-section__body[hidden] {
  display: none;
}

/* Profile preference chips (for clubs & event types) */
.profile-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.profile-chips-loading {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  margin: 0;
}

/* Preferences deep-link CTA */
.profile-preferences-cta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-md, 10px);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  transition:
    background var(--transition-base),
    transform var(--transition-base);
}

.profile-preferences-cta:hover,
.profile-preferences-cta:active {
  background: var(--color-primary-hover);
}

.profile-preferences-cta:active {
  transform: scale(0.98);
}

.profile-preferences-cta svg:first-child {
  flex-shrink: 0;
}

.profile-preferences-cta svg:last-child {
  margin-left: auto;
  flex-shrink: 0;
  opacity: 0.7;
}

.profile-chip {
  display: inline-flex;
  cursor: pointer;
  user-select: none;
}

.profile-chip input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.profile-chip-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 40px;
  padding: var(--space-2) var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.profile-chip-label:hover {
  background: var(--hover-bg-subtle);
  border-color: var(--hover-border-accent);
}

.profile-chip input[type="checkbox"]:checked + .profile-chip-label {
  background: var(--color-primary-hover);
  color: var(--color-text-inverse);
  border-color: var(--color-primary-hover);
  font-weight: var(--weight-semibold);
}

.profile-chip input[type="checkbox"]:focus-visible + .profile-chip-label {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

/* My Players Summary */
.my-players-summary {
  min-height: 60px;
}

.my-players-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  color: var(--color-text-tertiary);
}

.my-players-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

@media (width >= 768px) {
  .my-players-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
  }
}

a.my-player-item,
button.my-player-item {
  text-decoration: none;
  color: inherit;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  width: 100%;
}

.my-player-item {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-bg-page);
  border-radius: 8px;
  transition: background var(--transition-base);
}

.my-player-item:hover {
  background: var(--bg-hover);
}

.my-player-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.my-player-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.my-player-avatar-initials {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
}

.my-player-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.my-player-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
}

.my-player-level {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.my-player-star {
  color: var(--color-warning);
  flex-shrink: 0;
}

/* My Players Empty State */
.my-players-empty {
  text-align: center;
  padding: var(--space-2) 0;
}

.my-players-empty-text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-3);
}

.my-players-search-wrapper {
  position: relative;
  margin-bottom: var(--space-2);
}

.my-players-search-wrapper .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-tertiary);
  pointer-events: none;
}

.my-players-search-input {
  padding-left: 40px !important;
}

.my-players-search-results {
  text-align: left;
}

.my-players-search-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: var(--space-2);
  transition: all var(--transition-base);
  text-align: left;
}

.my-players-search-result:hover {
  background: var(--bg-hover);
  border-color: var(--color-primary);
}

.my-players-search-result .result-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.my-players-search-result .result-avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-elevated);
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}

.my-players-search-result .result-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  flex: 1;
  min-width: 0;
}

.my-players-search-result .result-level {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.my-players-error {
  font-size: var(--text-sm);
  color: var(--color-error);
  text-align: center;
  padding: var(--space-4);
}

.search-loading-text,
.search-error-text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  text-align: center;
  padding: var(--space-2);
}

.search-error-text {
  color: var(--color-error);
}

/* Player Detail Modal */
#playerDetailModal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--overlay-light);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  padding: var(--space-4);
}

#playerDetailModal.modal--visible {
  opacity: 1;
  visibility: visible;
}

.player-detail-modal-content {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--color-bg-card);
  border-radius: 16px;
  padding: var(--space-6);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 25%);
  transform: translateY(20px);
  transition: transform var(--transition-base);
}

#playerDetailModal.modal--visible .player-detail-modal-content {
  transform: translateY(0);
}

.player-detail-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  color: var(--color-text-secondary);
}

.player-detail-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.player-detail-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.player-detail-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-detail-avatar-initials {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
}

.player-detail-header-info {
  flex: 1;
  min-width: 0;
}

.player-detail-name-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.player-detail-name {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin: 0;
}

.player-detail-favorite-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--color-text-tertiary);
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.player-detail-favorite-btn:hover {
  background: var(--bg-hover);
  color: var(--color-warning);
}

.player-detail-favorite-btn--active {
  color: var(--color-warning);
}

.player-detail-section {
  margin-bottom: var(--space-5);
}

.player-detail-section-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 var(--space-3);
}

.player-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.player-detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-detail-label {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}

.player-detail-value {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
}

.player-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.player-detail-empty {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  font-style: italic;
}

.player-detail-actions {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.player-detail-actions .btn {
  width: 100%;
  justify-content: center;
}

/* Player upcoming games in detail modal */
.player-upcoming-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.player-upcoming-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-base);
}

.player-upcoming-card:hover {
  border-color: var(--color-primary);
  background: var(--color-bg-elevated);
}

.player-upcoming-card--hidden {
  display: none;
}

.player-upcoming-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
  flex-shrink: 0;
}

.player-upcoming-day {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  text-transform: uppercase;
}

.player-upcoming-datenum {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.player-upcoming-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.player-upcoming-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-upcoming-meta {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.player-upcoming-show-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-4);
  margin-top: var(--space-1);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
}

.player-upcoming-show-more:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Form Elements */
.form-group {
  margin-bottom: var(--space-4);
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.form-input,
.form-select {
  width: 100%;
  padding: var(--space-3);
  font-size: var(--text-base);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  transition: border-color var(--transition-base);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form-input:disabled {
  background: var(--color-bg-page);
  color: var(--color-text-secondary);
  cursor: not-allowed;
  opacity: 0.8;
}

.birth-date-mobile {
  display: none;
}

.birth-date-mobile__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.birth-date-mobile__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.birth-date-mobile__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
}

.birth-date-mobile__select {
  min-height: 44px;
}

@media (width <= 820px) {
  .profile-mobile-dob .form-input--birth-date {
    display: none;
  }

  .profile-mobile-dob .birth-date-mobile {
    display: block;
  }
}

/* Select-specific dropdown arrow - see My Players section for full styling */

/* Radio Group */
.form-radio-group {
  display: flex;
  gap: var(--space-4);
}

.form-radio {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.form-radio input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.form-radio-label {
  font-size: var(--text-base);
  color: var(--color-text-primary);
}

/* Checkbox */
.form-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.form-checkbox-label {
  font-size: var(--text-base);
  color: var(--color-text-primary);
}

/* Toggle Switch (iOS-style) */
.form-toggle-row {
  margin-top: var(--space-2);
}

.form-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.form-toggle__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.form-toggle__track {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 24px;
  border-radius: 999px;
  background: var(--color-border);
  transition: background-color var(--transition-base);
  flex-shrink: 0;
}

.form-toggle__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-bg-card);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base);
}

.form-toggle__input:checked + .form-toggle__track {
  background: var(--color-primary);
}

.form-toggle__input:checked + .form-toggle__track .form-toggle__thumb {
  transform: translateX(16px);
}

.form-toggle__input:focus-visible + .form-toggle__track {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.form-toggle__label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* Input with icon prefix */
.form-input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input-icon {
  position: absolute;
  left: var(--space-3);
  color: var(--color-text-tertiary);
  pointer-events: none;
  flex-shrink: 0;
}

.form-input--with-icon {
  padding-left: calc(var(--space-3) + 18px + var(--space-2));
}

/* Profile Stats */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-stat-value {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
}

.profile-stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* Profile Actions */
.profile-actions {
  display: flex;
  gap: var(--space-3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  min-height: 44px;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  text-decoration: none;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--white);
  flex: 1;
}

.btn--primary:hover {
  background: var(--hover-bg-primary);
}

.btn--primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

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

.btn--secondary:hover {
  background: var(--hover-bg-subtle);
  color: var(--color-text-primary);
}

/* Footer Link */
.footer-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--hover-transition);
}

.footer-link:hover {
  color: var(--color-primary);
}

/* Theme Toggle Segmented Control */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--color-bg-page);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  padding: 4px;
  gap: 2px;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.theme-toggle-btn:hover {
  background: var(--color-bg-card-hover, rgb(0 0 0 / 5%));
  color: var(--color-text-primary);
}

.theme-toggle-btn.active {
  background: var(--slate-200);
  color: var(--color-text-primary);
  box-shadow: 0 1px 3px rgb(0 0 0 / 10%);
}

.theme-toggle-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.theme-toggle-btn svg {
  flex-shrink: 0;
}

/* Hide system theme button (kept in code but not displayed) */
.theme-toggle-btn[data-theme-mode="system"] {
  display: none;
}

/* Dark mode adjustments for theme toggle */
[data-theme="dark"] .theme-toggle-btn:hover {
  background: rgb(255 255 255 / 10%);
}

[data-theme="dark"] .theme-toggle-btn.active {
  background: rgb(255 255 255 / 15%);
}

.footer-meta {
  display: none;
  gap: 12px;
  align-items: center;
}

.footer-version {
  color: var(--color-footer-muted);
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-version:hover {
  color: var(--color-footer-text);
}

.badge-new {
  display: none;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--white);
  background: var(--brand-primary);
  border-radius: 999px;
}

.whats-new-hero {
  margin: 12px 0 20px;
  display: grid;
  gap: 8px;
}

.whats-new-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.whats-new-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (width >= 768px) {
  .whats-new-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 8px;
}

.feature-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 16px;
}

.feature-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  display: grid;
  gap: 6px;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid var(--border-subtle);
  display: grid;
  gap: 12px;
}

.timeline-item {
  position: relative;
  padding-left: 16px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--brand-primary);
  border-radius: 50%;
  left: -6px;
  top: 6px;
  box-shadow: 0 0 0 4px var(--bg-page);
}

.timeline-item strong {
  display: block;
  color: var(--text-primary);
}

.timeline-item span {
  color: var(--text-secondary);
  font-size: 14px;
}

.footer-link:hover {
  text-decoration: underline;
}

/* Mobile adjustments */
@media (width <= 600px) {
  .profile-header-section {
    flex-direction: column;
    text-align: center;
  }

  .profile-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
  }

  .profile-stat-value {
    font-size: var(--text-xl);
  }

  .profile-actions {
    flex-direction: column;
  }

  .btn--secondary {
    order: 1;
  }
}

/* =====================================================
   MY PLAYERS PAGE STYLES
   ===================================================== */

.my-players-main {
  min-height: 60vh;
}

.players-content {
  max-width: 800px;
  margin: 0 auto;
}

.players-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
}

.players-header h2 {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  margin: 0;
}

/* Search and Filter Bar */
.players-filter-bar {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.search-input-wrapper {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-tertiary);
  pointer-events: none;
}

.search-input {
  padding-left: calc(var(--space-3) + 18px + var(--space-2));
}

.search-input::-webkit-search-cancel-button {
  cursor: pointer;
}

.favorites-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}

.favorites-toggle.filter-active {
  background: var(--color-warning);
  border-color: var(--color-warning);
  color: var(--white);
}

.favorites-toggle.filter-active:hover {
  background: color-mix(in srgb, var(--color-warning) 85%, black);
  border-color: color-mix(in srgb, var(--color-warning) 85%, black);
}

.favorites-toggle.filter-active svg {
  fill: currentcolor;
}

/* Tag Chips in Modal */
.tag-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: 16px;
  font-size: var(--text-sm);
}

.tag-chip-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  margin-left: var(--space-1);
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--color-primary);
  font-size: var(--text-base);
  line-height: 1;
  transition: background var(--transition-base);
}

.tag-chip-remove:hover {
  background: rgb(0 0 0 / 10%);
}

/* Form Select - dropdown arrow styling */
.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: calc(var(--space-3) + 16px);
}

/* Form Error */
.form-error {
  color: var(--color-error);
  font-size: var(--text-sm);
  margin-top: var(--space-1);
}

.form-input--error {
  border-color: var(--color-error);
}

.form-input--error:focus {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgb(239 68 68 / 10%);
}

/* Players List Grid */
.players-list {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Player Card */
.player-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-4);
  transition: box-shadow var(--transition-base);
}

.player-card:hover {
  box-shadow: var(--hover-shadow);
}

.player-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-3);
  gap: var(--space-3);
}

/* Player Avatar */
.player-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.player-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-avatar-initials {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
}

.player-info {
  flex: 1;
  min-width: 0;
}

.player-name {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin: 0 0 var(--space-1);
  color: var(--color-text-primary);
}

.player-level {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.player-instagram {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast, 100ms);
  flex-shrink: 0;
  margin-left: var(--space-1);
}

.player-instagram:hover,
.player-instagram:focus-visible {
  color: var(--color-text-primary);
}

.player-instagram svg {
  display: block;
}

/* Favorite Button */
.favorite-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--color-text-tertiary);
  transition: all var(--transition-base);
}

.favorite-btn:hover {
  background: var(--bg-hover);
  color: var(--color-warning);
}

.favorite-btn--active {
  color: var(--color-warning);
}

/* Player Tags */
.player-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
}

.player-tag {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-2);
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: 4px;
}

/* Player Card Actions */
.player-card-actions {
  display: flex;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.btn-player-action {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: all var(--transition-base);
}

.btn-player-action:hover {
  background: var(--bg-hover);
  color: var(--color-text-primary);
}

.btn-player-action--whatsapp {
  background: #25d366;
  border-color: #25d366;
  color: var(--white);
}

.btn-player-action--whatsapp:hover {
  background: #1fb855;
  color: var(--white);
}

.btn-player-action--remove {
  margin-left: auto;
}

.btn-player-action--remove:hover {
  border-color: var(--color-error);
  color: var(--color-error);
  background: transparent;
}

/* Players Empty State */
.players-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-4);
  text-align: center;
  color: var(--color-text-secondary);
}

.players-empty-state svg {
  margin-bottom: var(--space-4);
  color: var(--color-text-tertiary);
}

.players-empty-state p {
  margin: 0 0 var(--space-4);
}

/* Player Modal */
.player-modal-content {
  width: 100%;
  max-width: 420px;
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  margin: 0 0 var(--space-6);
}

.player-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-top: var(--space-1);
}

.player-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.player-form-actions-right {
  display: flex;
  gap: var(--space-2);
}

.btn--danger {
  background: transparent;
  color: var(--color-error);
  border: 1px solid var(--color-error);
}

.btn--danger:hover {
  background: var(--color-error);
  color: var(--white);
}

/* Player Modal - Bottom sheet on mobile, centered on desktop */
.player-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end; /* Mobile: bottom sheet */
  justify-content: center;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-base),
    visibility var(--transition-base);
}

/* Desktop: centered modal */
@media (width >= 480px) {
  .player-modal {
    align-items: center;
    padding: var(--space-4);
  }
}

.player-modal.modal--visible {
  opacity: 1;
  visibility: visible;
}

/* Player Modal Backdrop */
.player-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-light);
  backdrop-filter: blur(4px);
}

/* Player Modal Content */
.player-modal .modal-content {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: 90vh;
  max-height: 90dvh;
  background: var(--color-bg-card);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 -10px 25px -5px rgb(0 0 0 / 15%),
    0 -4px 6px -2px rgb(0 0 0 / 5%);
  transform: translateY(100%);
  transition: transform 300ms ease;
}

.player-modal.modal--visible .modal-content {
  transform: translateY(0);
}

/* Desktop: centered with scale animation */
@media (width >= 480px) {
  .player-modal .modal-content {
    max-width: 420px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 25%);
    transform: translateY(20px) scale(0.95);
  }

  .player-modal.modal--visible .modal-content {
    transform: translateY(0) scale(1);
  }
}

/* Drag handle for mobile */
.player-modal-handle {
  display: flex;
  justify-content: center;
  padding: var(--space-3) 0 var(--space-2);
  cursor: grab;
  flex-shrink: 0;
  touch-action: none;
  user-select: none;
}

.player-modal-handle::before {
  content: "";
  width: 36px;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
}

/* Hide handle on desktop */
@media (width >= 480px) {
  .player-modal-handle {
    display: none;
  }
}

/* Dragging state */
.player-modal--dragging .modal-content {
  transition: none;
}

.player-modal--dragging .player-modal-backdrop {
  transition: none;
}

/* Player Modal Body - scrollable content */
.player-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 var(--space-5) var(--space-5);
  padding-bottom: max(var(--space-5), env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}

/* Desktop: restore original padding */
@media (width >= 480px) {
  .player-modal-body {
    padding: var(--space-6);
  }
}

/* Players Header Actions */
.players-header-actions {
  display: flex;
  gap: var(--space-2);
}

@media (width <= 480px) {
  .players-header-actions {
    flex-direction: column;
  }

  .players-header-actions .btn {
    justify-content: center;
  }
}

/* Player Search Modal - Bottom sheet on mobile, centered on desktop */
.player-search-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end; /* Mobile: bottom sheet */
  justify-content: center;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-base),
    visibility var(--transition-base);
}

/* Desktop: centered modal */
@media (width >= 480px) {
  .player-search-modal {
    align-items: flex-start;
    padding: var(--space-4);
    padding-top: 10vh;
    overflow-y: auto;
  }
}

.player-search-modal.modal--visible {
  opacity: 1;
  visibility: visible;
}

/* Player Search Modal Backdrop */
.player-search-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-light);
  backdrop-filter: blur(4px);
}

.player-search-modal-content {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: 85vh;
  max-height: 85dvh;
  background: var(--color-bg-card);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 -10px 25px -5px rgb(0 0 0 / 15%),
    0 -4px 6px -2px rgb(0 0 0 / 5%);
  transform: translateY(100%);
  transition: transform 300ms ease;
}

.player-search-modal.modal--visible .player-search-modal-content {
  transform: translateY(0);
}

/* Desktop: centered with scale animation */
@media (width >= 480px) {
  .player-search-modal-content {
    max-width: 480px;
    max-height: none;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 25%);
    transform: translateY(20px) scale(0.95);
  }

  .player-search-modal.modal--visible .player-search-modal-content {
    transform: translateY(0) scale(1);
  }
}

/* Drag handle for mobile */
.player-search-modal-handle {
  display: flex;
  justify-content: center;
  padding: var(--space-3) 0 var(--space-2);
  cursor: grab;
  flex-shrink: 0;
  touch-action: none;
  user-select: none;
}

.player-search-modal-handle::before {
  content: "";
  width: 36px;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
}

/* Hide handle on desktop */
@media (width >= 480px) {
  .player-search-modal-handle {
    display: none;
  }
}

/* Dragging state */
.player-search-modal--dragging .player-search-modal-content {
  transition: none;
}

.player-search-modal--dragging .player-search-modal-backdrop {
  transition: none;
}

/* Player Search Modal Body */
.player-search-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 var(--space-5) var(--space-5);
  padding-bottom: max(var(--space-5), env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}

@media (width >= 480px) {
  .player-search-modal-body {
    padding: var(--space-6);
  }
}

/* Search Results */
.search-results {
  min-height: 100px;
  max-height: 50vh;
  overflow-y: auto;
  margin: var(--space-4) 0;
}

.search-hint {
  text-align: center;
  color: var(--color-text-tertiary);
  padding: var(--space-6) 0;
  margin: 0;
}

.search-result-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: 8px;
  transition: background var(--transition-base);
}

.search-result-card:hover {
  background: var(--bg-hover);
}

.search-result-card + .search-result-card {
  border-top: 1px solid var(--color-border);
}

.search-result-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.search-result-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-tertiary);
  color: var(--color-text-tertiary);
}

.search-result-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.search-result-name {
  display: inline;
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-name-row {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  overflow: hidden;
}

.search-result-level {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.search-result-add {
  flex-shrink: 0;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
}

.search-result-add:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Search Loading */
.search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4);
  color: var(--color-text-secondary);
}

/* Search Error */
.search-error {
  background: rgb(239 68 68 / 10%);
  color: var(--color-error);
  padding: var(--space-3);
  border-radius: 8px;
  font-size: var(--text-sm);
  margin-top: var(--space-3);
}

/* Header Navigation */
.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: 6px;
  transition: all var(--transition-base);
}

.nav-link:hover {
  color: var(--color-text-primary);
  background: var(--bg-hover);
}

.nav-link--active {
  color: var(--color-primary);
}

@media (width <= 600px) {
  .header-nav {
    display: none;
  }
}

/* ============================================================
   Location Permission Modal
   ============================================================ */
.location-permission-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  z-index: 1000;
  animation: fade-in var(--transition-fast);
}

@media (width >= 480px) {
  .location-permission-modal {
    align-items: center;
    padding: var(--space-4);
  }
}

.location-permission-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-medium);
  backdrop-filter: blur(4px);
}

.location-permission-content {
  position: relative;
  background: var(--color-bg-card);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 100%;
  padding: var(--space-6);
  text-align: center;
  box-shadow:
    0 -10px 25px -5px rgb(0 0 0 / 15%),
    0 -4px 6px -2px rgb(0 0 0 / 5%);
  animation: slide-up var(--transition-base);
}

@media (width >= 480px) {
  .location-permission-content {
    border-radius: 16px;
    max-width: 340px;
    box-shadow:
      0 20px 25px -5px rgb(0 0 0 / 20%),
      0 10px 10px -5px rgb(0 0 0 / 10%);
    animation: modal-slide-up var(--transition-base);
  }
}

.location-permission-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-4);
  position: relative;
}

.location-permission-icon svg {
  fill: var(--color-text-tertiary);
  position: relative;
  z-index: 1;
  animation: icon-pop 0.3s ease-out 0.8s;
}

.location-permission-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-primary);
  clip-path: inset(100% 0 0 0);
  animation: fill-reveal 0.5s ease-out 0.3s forwards;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 94'%3E%3Cpath d='M35,0.125 C16.047,0.125 0.625,15.547 0.625,34.5 C0.625,51.969 28.156,88.008 31.297,92.059 C32.184,93.204 33.551,93.875 35,93.875 C36.449,93.875 37.817,93.204 38.703,92.059 C41.844,88.008 69.375,51.969 69.375,34.5 C69.375,15.547 53.953,0.125 35,0.125 Z M35,51.687 C25.523,51.687 17.812,43.976 17.812,34.499 C17.812,25.022 25.523,17.311 35,17.311 C44.477,17.311 52.188,25.022 52.188,34.499 C52.188,43.976 44.477,51.687 35,51.687 Z'/%3E%3C/svg%3E")
    center / 28px 38px no-repeat;
  z-index: 2;
}

@keyframes fill-reveal {
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes icon-pop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

.location-permission-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-3);
}

.location-permission-text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0 0 var(--space-5);
}

.location-permission-actions {
  display: flex;
  gap: var(--space-3);
}

.location-permission-cancel,
.location-permission-confirm {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border-radius: 8px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.location-permission-cancel {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

.location-permission-cancel:hover {
  background: var(--color-bg-page);
  color: var(--color-text-primary);
}

.location-permission-confirm {
  background: var(--color-primary);
  border: none;
  color: var(--white);
}

.location-permission-confirm:hover {
  background: var(--color-primary-hover);
}

/* ============================================================
   Country Selector Modal - Already bottom sheet, adding handle
   ============================================================ */
.country-selector-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 10002; /* Above feedback widget (10001) */
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-base),
    visibility var(--transition-base);
}

.country-selector-modal--visible {
  opacity: 1;
  visibility: visible;
}

@media (width >= 480px) {
  .country-selector-modal {
    align-items: center;
    padding: var(--space-4);
  }
}

.country-selector-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-light);
  backdrop-filter: blur(4px);
}

.country-selector-content {
  position: relative;
  background: var(--color-bg-card);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 100%;
  max-height: 80vh;
  max-height: 80dvh;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 -10px 25px -5px rgb(0 0 0 / 15%),
    0 -4px 6px -2px rgb(0 0 0 / 5%);
  transform: translateY(100%);
  transition: transform 300ms ease;
}

.country-selector-modal--visible .country-selector-content {
  transform: translateY(0);
}

@media (width >= 480px) {
  .country-selector-content {
    max-width: 400px;
    border-radius: 16px;
    box-shadow:
      0 20px 25px -5px rgb(0 0 0 / 20%),
      0 10px 10px -5px rgb(0 0 0 / 10%);
    transform: translateY(20px) scale(0.95);
  }

  .country-selector-modal--visible .country-selector-content {
    transform: translateY(0) scale(1);
  }
}

/* Drag handle for mobile */
.country-selector-handle {
  display: flex;
  justify-content: center;
  padding: var(--space-3) 0 var(--space-2);
  cursor: grab;
  flex-shrink: 0;
  touch-action: none;
  user-select: none;
}

.country-selector-handle::before {
  content: "";
  width: 36px;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
}

/* Hide handle on desktop */
@media (width >= 480px) {
  .country-selector-handle {
    display: none;
  }
}

/* Dragging state */
.country-selector-modal--dragging .country-selector-content {
  transition: none;
}

.country-selector-modal--dragging .country-selector-backdrop {
  transition: none;
}

.country-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.country-selector-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin: 0;
}

.country-selector-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-icon);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.country-selector-close:hover {
  background: var(--bg-hover);
  color: var(--color-text-primary);
}

.country-selector-list {
  display: flex;
  flex-direction: column;
  padding: var(--space-2);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.country-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--text-base);
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast);
}

.country-option:hover {
  background: var(--bg-hover);
}

.country-option:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: -2px;
}

.country-option--selected {
  background: var(--surface-success-bg);
  color: var(--surface-success-text);
}

.country-option--selected:hover {
  background: var(--surface-success-bg);
}

.country-option__flag {
  font-size: var(--text-xl);
  line-height: 1;
}

.country-option__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-icon);
}

.country-option--selected .country-option__icon {
  color: var(--surface-success-text);
}

.country-option__name {
  flex: 1;
}

.country-option__check {
  color: var(--color-success);
  flex-shrink: 0;
}

/* Coming soon state for unavailable options */
.country-option--coming-soon {
  opacity: 0.6;
  cursor: not-allowed;
}

.country-option--coming-soon:hover {
  background: transparent;
}

.country-option__badge {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  background: var(--surface-neutral-bg);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
  margin-left: auto;
}

@keyframes slide-up {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ============================================
   SHARED BOTTOM SHEET / MODAL COMPONENT
   ============================================
   A unified modal system that adapts to screen size:
   - Mobile (< 480px): Bottom sheet with slide-up, drag handle
   - Desktop (≥ 480px): Centered modal with scale animation
   
   Usage:
   1. Add .modal-overlay for the container
   2. Add .modal-overlay--visible to show
   3. Use .modal-backdrop for the dark overlay
   4. Use .modal-sheet for the content panel
   5. Add .modal-sheet__handle for swipe-to-dismiss on mobile
   ============================================ */

/* Base overlay - covers viewport, flex container */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end; /* Mobile: bottom sheet */
  justify-content: center;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-base),
    visibility var(--transition-base);
}

.modal-overlay--visible {
  opacity: 1;
  visibility: visible;
}

/* Desktop: centered modal */
@media (width >= 480px) {
  .modal-overlay {
    align-items: center;
    padding: var(--space-4);
  }
}

/* Backdrop - dark overlay behind content */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-light);
  backdrop-filter: blur(4px);
}

/* Heavy backdrop variant for emphasis */
.modal-backdrop--heavy {
  background: var(--overlay-medium);
  backdrop-filter: blur(8px);
}

/* Sheet content panel - the actual modal box */
.modal-sheet {
  position: relative;
  background: var(--color-bg-card);
  width: 100%;
  max-width: 100%;
  max-height: 90vh;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  border-radius: 20px 20px 0 0;
  box-shadow:
    0 -10px 25px -5px rgb(0 0 0 / 15%),
    0 -4px 6px -2px rgb(0 0 0 / 5%);
  transform: translateY(100%);
  transition: transform 300ms ease;
}

.modal-overlay--visible .modal-sheet {
  transform: translateY(0);
}

/* Desktop: centered with different animation */
@media (width >= 480px) {
  .modal-sheet {
    max-width: 420px;
    border-radius: 16px;
    box-shadow:
      0 20px 25px -5px rgb(0 0 0 / 20%),
      0 10px 10px -5px rgb(0 0 0 / 10%);
    transform: translateY(20px) scale(0.95);
  }

  .modal-overlay--visible .modal-sheet {
    transform: translateY(0) scale(1);
  }
}

/* Size variants */
.modal-sheet--sm {
  max-width: 340px;
}

.modal-sheet--md {
  max-width: 420px;
}

.modal-sheet--lg {
  max-width: 540px;
}

.modal-sheet--full {
  max-width: 100%;
}

@media (width >= 480px) {
  .modal-sheet--sm {
    max-width: 340px;
  }

  .modal-sheet--md {
    max-width: 420px;
  }

  .modal-sheet--lg {
    max-width: 540px;
  }
}

/* Drag handle - shown on mobile for swipe gesture hint */
.modal-sheet__handle {
  display: flex;
  justify-content: center;
  padding: var(--space-3) 0 var(--space-2);
  cursor: grab;
  flex-shrink: 0;
  touch-action: none;
  user-select: none;
}

.modal-sheet__handle::before {
  content: "";
  width: 36px;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
}

/* Hide handle on desktop */
@media (width >= 480px) {
  .modal-sheet__handle {
    display: none;
  }
}

/* Dragging state - disable transitions for smooth gesture */
.modal-overlay--dragging .modal-sheet {
  transition: none;
}

.modal-overlay--dragging .modal-backdrop {
  transition: none;
}

/* Header section */
.modal-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

/* No handle variant - add top padding when handle is hidden */
.modal-sheet--no-handle .modal-sheet__header {
  padding-top: var(--space-5);
}

@media (width >= 480px) {
  .modal-sheet__header {
    padding-top: var(--space-5);
  }
}

.modal-sheet__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin: 0;
}

.modal-sheet__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.modal-sheet__close:hover {
  background: var(--bg-hover);
  color: var(--color-text-primary);
}

.modal-sheet__close:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

/* Body section - scrollable content area */
.modal-sheet__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5);
  -webkit-overflow-scrolling: touch;
}

/* Footer section - fixed at bottom */
.modal-sheet__footer {
  padding: var(--space-4) var(--space-5);
  padding-bottom: max(var(--space-4), env(safe-area-inset-bottom));
  flex-shrink: 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-card);
}

/* Footer button layout */
.modal-sheet__actions {
  display: flex;
  gap: var(--space-3);
}

.modal-sheet__actions--stacked {
  flex-direction: column;
}

@media (width < 480px) {
  .modal-sheet__actions {
    flex-direction: column-reverse;
  }
}

/* ============================================
   FLOATING FILTER BUTTON (Mobile Only)
   ============================================ */

.floating-filter-btn {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 1000;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: var(--white);
  border: none;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  font-family: inherit;
  cursor: pointer;
  box-shadow:
    0 4px 12px rgb(0 0 0 / 15%),
    0 2px 4px rgb(0 0 0 / 10%);
  opacity: 0;
  visibility: hidden;
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.3s ease,
    visibility 0.3s ease,
    background-color 0.15s ease;
}

.floating-filter-btn:hover {
  background: var(--hover-bg-primary);
}

.floating-filter-btn:active {
  transform: translateX(-50%) translateY(0) scale(0.96);
}

.floating-filter-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.floating-filter-btn__text {
  white-space: nowrap;
}

.floating-filter-btn__events {
  white-space: nowrap;
}

.floating-filter-btn__divider {
  opacity: 0.6;
}

.floating-filter-btn__count {
  display: none;
  min-width: 28px;
  height: 28px;
  padding: 0 var(--space-2);
  background: var(--white);
  color: var(--color-primary);
  border-radius: 999px;
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  line-height: 28px;
  text-align: center;
}

.floating-filter-btn__count.has-count {
  display: inline-block;
}

.floating-filter-btn__arrow {
  flex-shrink: 0;
  animation: bounce-up 1.5s ease-in-out infinite;
}

@keyframes bounce-up {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

/* Discovery mode: pulse animation to draw attention */
.floating-filter-btn.is-discovery {
  animation: discovery-pulse 2s ease-in-out 3;
}

@keyframes discovery-pulse {
  0%,
  100% {
    box-shadow:
      0 4px 12px rgb(0 0 0 / 15%),
      0 2px 4px rgb(0 0 0 / 10%);
  }

  50% {
    box-shadow:
      0 4px 12px rgb(0 0 0 / 15%),
      0 2px 4px rgb(0 0 0 / 10%),
      0 0 0 8px rgb(16 185 129 / 25%);
  }
}

/* Show only on mobile */
@media (width <= 767px) {
  .floating-filter-btn {
    display: flex;
  }
}

/* ============================================================
   Action Sheet - Mobile-only bottom sheet for action menus
   ============================================================ */
.action-sheet {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100001; /* Above dropdowns */
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-base),
    visibility var(--transition-base);
}

.action-sheet--visible {
  opacity: 1;
  visibility: visible;
}

.action-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-light);
  backdrop-filter: blur(4px);
}

.action-sheet-content {
  position: relative;
  background: var(--color-bg-card);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 100%;
  max-height: 70vh;
  max-height: 70dvh;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 -10px 25px -5px rgb(0 0 0 / 15%),
    0 -4px 6px -2px rgb(0 0 0 / 5%);
  padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 300ms ease;
  overflow: hidden;
}

.action-sheet--visible .action-sheet-content {
  transform: translateY(0);
}

/* Dragging state - disable transitions */
.action-sheet--dragging .action-sheet-content {
  transition: none;
}

.action-sheet--dragging .action-sheet-backdrop {
  transition: none;
}

/* Drag handle */
.action-sheet-handle {
  display: flex;
  justify-content: center;
  padding: var(--space-3) 0 var(--space-2);
  cursor: grab;
  flex-shrink: 0;
  touch-action: none;
  user-select: none;
}

.action-sheet-handle::before {
  content: "";
  width: 36px;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
}

/* Title */
.action-sheet-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  text-align: center;
  margin: 0;
  padding: 0 var(--space-5) var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Options list */
.action-sheet-options {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Individual option */
.action-sheet-option {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  min-height: 56px;
  border: none;
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--text-base);
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.action-sheet-option:hover,
.action-sheet-option:focus-visible {
  background: var(--color-bg-hover);
  outline: none;
}

.action-sheet-option:active {
  background: var(--color-bg-active);
}

/* Option icon */
.action-sheet-option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--color-icon);
}

.action-sheet-option-icon img,
.action-sheet-option-icon svg {
  width: 24px;
  height: 24px;
}

/* Profile photo icon variant */
.action-sheet-option-icon--photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
}

.action-sheet-option-icon--photo img {
  width: 40px;
  height: 40px;
  object-fit: cover;
}

/* Option text container (for label + subtitle) */
.action-sheet-option-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 2px;
}

/* Option label */
.action-sheet-option-label {
  flex: 1;
  font-weight: var(--weight-medium);
}

/* Option subtitle */
.action-sheet-option-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-weight: var(--weight-normal);
}

/* Option badges */
.action-sheet-option-badge {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.action-sheet-option-badge--warning {
  background: rgb(245 158 11 / 15%);
  color: color-mix(in srgb, var(--color-warning) 70%, black);
  border: 1px solid rgb(245 158 11 / 30%);
}

.action-sheet-option-badge--coming {
  background: rgb(16 185 129 / 15%);
  color: var(--color-primary);
  border: 1px solid rgb(16 185 129 / 30%);
}

.action-sheet-option-badge--default {
  background: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
}

/* Disabled option state */
.action-sheet-option--disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.action-sheet-option--disabled .action-sheet-option-label {
  color: var(--color-text-tertiary);
}

.action-sheet-option--disabled:hover,
.action-sheet-option--disabled:focus-visible {
  background: transparent;
}

/* Divider (group separator) */
.action-sheet-divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-2) var(--space-5);
}

/* Cancel button */
.action-sheet-cancel {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--space-2) var(--space-4) 0;
  padding: var(--space-4);
  min-height: 52px;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  font-family: inherit;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.action-sheet-cancel:hover,
.action-sheet-cancel:focus-visible {
  background: var(--color-bg-hover);
  outline: none;
}

/* ==========================================================================
   PERFORMANCE & ACCESSIBILITY OPTIMIZATIONS
   ========================================================================== */

/* Respect user's motion preferences for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Lazy render off-screen event cards for better performance */
.event-card:nth-child(n + 8) {
  content-visibility: auto;
  contain-intrinsic-size: 0 180px; /* Approximate card height */
}

/* Lazy render off-screen horizontal scroll items */
.happening-soon .event-card:nth-child(n + 4) {
  content-visibility: auto;
  contain-intrinsic-size: 280px 180px;
}

.action-sheet-cancel:active {
  background: var(--color-bg-active);
}

/* ===================================================================
   DASHBOARD — Club Owner Dashboard
   =================================================================== */

.dashboard-container {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-4);
}

/* Dashboard Header */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.dashboard-header h1 {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  margin: 0;
  color: var(--color-text-primary);
}

.dashboard-user-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-success-bg);
  border: 1px solid var(--surface-success-border);
  border-radius: 20px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--surface-success-text);
}

/* Success Banner (shows after first event submission) */
.dashboard-success-banner {
  background: var(--surface-success-bg);
  border: 2px solid var(--surface-success-border);
  border-radius: 12px;
  padding: var(--space-5);
  margin-bottom: var(--space-6);
  text-align: center;
}

.dashboard-success-banner-icon {
  font-size: 3rem;
  margin-bottom: var(--space-2);
}

.dashboard-success-banner h2 {
  font-size: var(--text-xl);
  margin: 0 0 var(--space-2);
  color: var(--surface-success-text);
}

.dashboard-success-banner p {
  color: var(--color-text-secondary);
  margin: 0;
}

/* Quick Actions */
.dashboard-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.dashboard-quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 150ms ease;
  text-decoration: none;
  color: inherit;
}

.dashboard-quick-action:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgb(from var(--color-primary) r g b / 15%);
  transform: translateY(-2px);
}

.dashboard-quick-action-icon {
  font-size: 1.75rem;
}

.dashboard-quick-action-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  text-align: center;
}

/* Section Headers */
.dashboard-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.dashboard-section-header h2 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin: 0;
  color: var(--color-text-primary);
}

.dashboard-section-header a {
  font-size: var(--text-sm);
  color: var(--color-primary);
  text-decoration: none;
}

.dashboard-section-header a:hover {
  text-decoration: underline;
}

/* Stats Grid */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

@media (width <= 600px) {
  .dashboard-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dashboard-stat-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-4);
  text-align: center;
}

.dashboard-stat-value {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
}

.dashboard-stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Dashboard Tabs */
.dashboard-tabs {
  display: flex;
  gap: var(--space-1);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
}

.dashboard-tab {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
}

.dashboard-tab:hover {
  color: var(--color-text-primary);
}

.dashboard-tab.active {
  color: var(--color-primary);
}

.dashboard-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px 1px 0 0;
}

.dashboard-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: var(--space-1);
  font-size: 11px;
  font-weight: var(--weight-bold);
  border-radius: 9px;
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

/* ============================================================
   Dashboard Event Card (expanded) — mobile-first
   ============================================================ */
.dashboard-event-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.dashboard-event-card--highlighted {
  border-color: var(--color-primary);
  box-shadow:
    0 0 0 1px var(--color-primary),
    var(--shadow-sm);
}

/* Top row: status badge + action buttons */
.dashboard-event-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.dashboard-event-card__actions {
  display: flex;
  gap: var(--space-2);
}

/* Status badges */
.dashboard-event-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  border-radius: 999px;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.dashboard-event-badge--pending {
  background: var(--surface-warning-bg);
  color: var(--surface-warning-text);
  border: 1px solid var(--surface-warning-border);
}

.dashboard-event-badge--approved {
  background: var(--surface-success-bg);
  color: var(--surface-success-text);
  border: 1px solid var(--surface-success-border);
}

.dashboard-event-badge--cancelled {
  background: var(--surface-error-bg);
  color: var(--surface-error-text);
  border: 1px solid var(--surface-error-border);
}

/* Title */
.dashboard-event-card__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-1);
  line-height: 1.3;
}

/* Date + time */
.dashboard-event-card__datetime {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-1);
}

/* Club name with pin icon */
.dashboard-event-card__club {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-3);
}

.dashboard-event-card__club svg {
  flex-shrink: 0;
  color: var(--color-text-tertiary);
}

/* Pill row */
.dashboard-event-card__pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

/* View event link */
.dashboard-event-card__link {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-primary);
  text-decoration: none;
  padding: var(--space-2) 0;
  transition: color 150ms ease;
}

.dashboard-event-card__link:hover {
  color: var(--color-primary-hover);
}

/* ============================================================
   Dashboard pills (shared by card + list)
   ============================================================ */
.dashboard-pill {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border-radius: 999px;
  line-height: 1.4;
  white-space: nowrap;
}

.dashboard-pill--neutral {
  background: var(--color-bg-hover);
  color: var(--color-text-secondary);
}

/* Slots availability pills */
.dashboard-pill--open {
  background: var(--surface-success-bg);
  color: var(--surface-success-text);
}

.dashboard-pill--warning {
  background: var(--surface-warning-bg);
  color: var(--surface-warning-text);
}

.dashboard-pill--full {
  background: var(--surface-error-bg);
  color: var(--surface-error-text);
}

/* Type pills — color-coded to match main event cards */
.dashboard-pill--type[data-type="americano"] {
  background: var(--surface-info-bg);
  color: var(--surface-info-text);
}

.dashboard-pill--type[data-type="social"] {
  background: var(--surface-warning-bg);
  color: var(--surface-warning-text);
}

.dashboard-pill--type[data-type="tournament"] {
  background: var(--surface-warning-bg);
  color: var(--surface-warning-text);
}

.dashboard-pill--type[data-type="mixicano"] {
  background: var(--surface-info-bg);
  color: var(--surface-info-text);
}

/* ============================================================
   Dashboard Action Button (replaces emoji icon-btn)
   ============================================================ */
.dashboard-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 150ms ease;
  padding: 0;
}

.dashboard-action-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-bg-hover);
}

.dashboard-action-btn--danger:hover {
  border-color: var(--color-error);
  color: var(--color-error);
  background: var(--surface-error-bg);
}

.dashboard-action-btn svg {
  display: block;
}

/* ============================================================
   Dashboard Event List (compact items) — mobile-first
   ============================================================ */
.dashboard-events-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.dashboard-event-list-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  transition: border-color 150ms ease;
}

.dashboard-event-list-item:hover {
  border-color: var(--color-primary);
}

.dashboard-event-list-item--cancelled {
  opacity: 0.6;
}

/* Date block */
.dashboard-list-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
  padding: var(--space-2);
  background: var(--color-bg-hover);
  border-radius: 8px;
}

.dashboard-list-day {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  line-height: 1;
}

.dashboard-list-month {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  margin-top: 2px;
}

/* Info block */
.dashboard-list-info {
  flex: 1;
  min-width: 0;
}

.dashboard-list-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-list-meta {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin: 0;
}

/* Action buttons in list */
.dashboard-list-actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* Tips Section */
.dashboard-tips-section {
  background: var(--surface-info-bg);
  border: 1px solid var(--surface-info-border);
  border-radius: 12px;
  padding: var(--space-4);
  margin-bottom: var(--space-6);
}

.dashboard-tips-section h3 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--surface-info-text);
  margin: 0 0 var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.dashboard-tips-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.dashboard-tips-list li {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  padding-left: var(--space-5);
  position: relative;
}

.dashboard-tips-list li::before {
  content: "\1F4A1";
  position: absolute;
  left: 0;
}

/* Templates Grid */
.dashboard-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.dashboard-template-card {
  padding: var(--space-4);
  background: var(--color-bg-card);
  border: 1px dashed var(--color-border);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 150ms ease;
}

.dashboard-template-card:hover {
  border-style: solid;
  border-color: var(--color-primary);
}

.dashboard-template-card-icon {
  font-size: 2rem;
  margin-bottom: var(--space-2);
}

.dashboard-template-card-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-1);
}

.dashboard-template-card-desc {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin: 0;
}

/* Dashboard Empty State */
.dashboard-empty-state {
  text-align: center;
  padding: var(--space-8);
  background: var(--color-bg-card);
  border: 2px dashed var(--color-border);
  border-radius: 12px;
  margin-bottom: var(--space-6);
}

.dashboard-empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--space-3);
}

.dashboard-empty-state h3 {
  font-size: var(--text-lg);
  margin: 0 0 var(--space-2);
  color: var(--color-text-primary);
}

.dashboard-empty-state p {
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-4);
}

/* Dashboard Tab Content */
.dashboard-tab-content {
  display: none;
}

.dashboard-tab-content.active {
  display: block;
}

/* Confirm dialog */
.dashboard-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgb(from var(--color-text-primary) r g b / 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-4);
}

.dashboard-confirm-dialog {
  background: var(--color-bg-card);
  border-radius: 12px;
  padding: var(--space-6);
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.dashboard-confirm-dialog h3 {
  font-size: var(--text-lg);
  margin: 0 0 var(--space-2);
  color: var(--color-text-primary);
}

.dashboard-confirm-dialog p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-5);
}

.dashboard-confirm-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
}

/* Not Authorized Gate */
.dashboard-not-authorized {
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

.dashboard-not-authorized svg {
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-4);
}

.dashboard-not-authorized h2 {
  font-size: var(--text-xl);
  margin: 0 0 var(--space-2);
  color: var(--color-text-primary);
}

.dashboard-not-authorized p {
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-4);
  max-width: 400px;
  margin-inline: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Admin Panel
   ═══════════════════════════════════════════════════════════════════════════ */

.admin-container {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-4);
}

.admin-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-4);
}

.admin-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin: 0;
}

/* Search */
.admin-search-bar {
  margin-bottom: var(--space-3);
}

/* Role filter bar */
.admin-filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.admin-filter-bar__label {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  font-weight: var(--weight-semibold);
  margin-right: var(--space-1);
}

.admin-filter-btn {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  font-family: inherit;
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    color var(--transition-fast),
    background var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.admin-filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.admin-filter-btn--active {
  background: var(--surface-success-bg);
  border-color: var(--color-primary);
  color: var(--color-primary);
  font-weight: var(--weight-semibold);
}

/* Sort bar */
.admin-sort-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.admin-sort-bar__label {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  font-weight: var(--weight-medium);
  margin-right: var(--space-1);
}

.admin-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  font-family: inherit;
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    color var(--transition-fast),
    background var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.admin-sort-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.admin-sort-btn--active {
  background: var(--surface-success-bg);
  border-color: var(--surface-success-border);
  color: var(--surface-success-text);
  font-weight: var(--weight-semibold);
}

/* Sort direction arrow */
.admin-sort-btn--active::after {
  content: "↑";
  font-size: 0.65rem;
  opacity: 0.7;
}

.admin-sort-btn--active[data-dir="desc"]::after {
  content: "↓";
}

/* Star / favorite button */
.admin-star-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-tertiary);
  cursor: pointer;
  flex-shrink: 0;
  transition:
    color var(--transition-fast),
    background var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.admin-star-btn:hover {
  color: var(--color-warning);
  background: var(--surface-warning-bg);
}

.admin-star-btn--active {
  color: var(--color-warning);
}

/* Subtle highlight for starred rows */
.admin-user-row--starred {
  border-color: var(--surface-warning-border);
  background: color-mix(
    in srgb,
    var(--surface-warning-bg) 30%,
    var(--color-bg-card) 70%
  );
}

/* Section dividers between starred & all users */
.admin-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.admin-section--starred {
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}

.admin-section__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-1);
  padding: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
}

.admin-section--starred .admin-section__header {
  color: var(--color-warning);
}

.admin-section__count {
  font-weight: 400;
  color: var(--color-text-tertiary);
  font-size: 0.7rem;
}

/* User date info */
.admin-user-row__dates {
  font-size: 0.65rem;
  color: var(--color-text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* User rows */
.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.admin-user-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.15s ease;
}

.admin-user-row:hover {
  box-shadow: var(--shadow-sm);
}

.admin-user-row__info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
}

.admin-user-row__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.admin-user-row__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-user-row__name {
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-row__email {
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-row__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.admin-user-row__clubs {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-row__auto {
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: var(--weight-semibold);
}

/* Inline row actions (role select + auto-approve toggle + edit button) */
.admin-user-row__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  margin-left: auto;
}

/* Inline role select */
.admin-inline-role {
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  font-size: var(--text-xs);
  font-family: inherit;
  cursor: pointer;
  min-width: 100px;
  transition: border-color var(--transition-fast);
}

.admin-inline-role:hover,
.admin-inline-role:focus {
  border-color: var(--color-primary);
  outline: none;
}

/* Inline auto-approve toggle switch */
.admin-inline-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.admin-inline-toggle__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.admin-inline-toggle__track {
  position: relative;
  width: 34px;
  height: 18px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.admin-inline-toggle__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: var(--color-bg-card);
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: 0 1px 2px rgb(0 0 0 / 15%);
}

.admin-inline-toggle__input:checked + .admin-inline-toggle__track {
  background: var(--color-primary);
}

.admin-inline-toggle__input:checked + .admin-inline-toggle__track::after {
  transform: translateX(16px);
}

.admin-inline-toggle__input:focus-visible + .admin-inline-toggle__track {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.admin-inline-toggle__label {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  white-space: nowrap;
  user-select: none;
}

/* Role badges */
.admin-role-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.admin-role-badge--user {
  background: var(--color-bg-page);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.admin-role-badge--organizer {
  background: var(--color-info-bg, rgb(from var(--color-info) r g b / 10%));
  color: var(--color-info);
}

.admin-role-badge--club {
  background: var(
    --color-primary-bg,
    rgb(from var(--color-primary) r g b / 10%)
  );
  color: var(--color-primary);
}

.admin-role-badge--admin {
  background: var(
    --color-warning-bg,
    rgb(from var(--color-warning) r g b / 10%)
  );
  color: var(--color-warning);
}

/* Edit button */
.admin-edit-btn {
  flex-shrink: 0;
}

/* Empty states */
.admin-empty {
  text-align: center;
  color: var(--color-text-secondary);
  padding: var(--space-8) var(--space-4);
}

.admin-empty-inline {
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
  font-style: italic;
}

/* Event rows */
.admin-events-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.admin-event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: opacity 0.3s ease;
}

.admin-event-row__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
  flex: 1;
}

.admin-event-row__name {
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  font-size: var(--text-sm);
}

.admin-event-row__meta {
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
}

.admin-event-row__actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* Modal */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.admin-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgb(from var(--color-text-primary) r g b / 50%);
}

.admin-modal__content {
  position: relative;
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}

.admin-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.admin-modal__header h3 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
}

.admin-modal__close {
  background: none;
  border: none;
  font-size: var(--text-xl);
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: var(--space-1);
  line-height: 1;
}

.admin-modal__close:hover {
  color: var(--color-text-primary);
}

.admin-modal__body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.admin-modal__user-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-bg-page);
  border-radius: var(--radius-lg);
}

.admin-modal__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.admin-modal__name {
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin: 0;
}

.admin-modal__email {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  margin: 0;
}

.admin-modal__uid {
  color: var(--color-text-tertiary);
  font-size: var(--text-xs);
  font-family: monospace;
  margin: 0;
  word-break: break-all;
}

.admin-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-4);
  border-top: 1px solid var(--color-border);
}

/* Club chips in modal */
.admin-club-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.admin-club-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  background: var(
    --color-primary-bg,
    rgb(from var(--color-primary) r g b / 10%)
  );
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}

.admin-club-chip__remove {
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  font-size: var(--text-sm);
  line-height: 1;
  padding: 0;
  opacity: 0.7;
}

.admin-club-chip__remove:hover {
  opacity: 1;
}

/* Toggle label */
.admin-toggle-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--color-text-primary);
}

.admin-toggle-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}

/* Small button variant */
.btn--sm {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  min-height: 32px;
}

.btn--danger {
  background: var(--color-error);
  color: var(--color-text-inverse);
  border: none;
}

.btn--danger:hover {
  opacity: 0.9;
}

/* Tab content */
.admin-tab-content {
  padding-top: var(--space-4);
}

/* Mobile responsive */
@media (width <= 600px) {
  .admin-user-row {
    flex-wrap: wrap;
  }

  .admin-user-row__actions {
    width: 100%;
    justify-content: flex-end;
    padding-top: var(--space-2);
  }

  .admin-user-row__meta {
    width: 100%;
    justify-content: flex-start;
    padding-top: var(--space-2);
  }

  .admin-edit-btn {
    margin-left: auto;
  }

  .admin-inline-role {
    min-width: 90px;
  }

  .admin-event-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-event-row__actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ===================================================================
   MOBILE TAB BAR — Contextual bottom navigation
   Shown on non-filter pages (event, profile, submit, etc.)
   Hidden on homepage/filters (filter bar occupies that space)
   Desktop: always hidden
   =================================================================== */

.mobile-tab-bar {
  display: none; /* Hidden by default (desktop) */
}

@media (width < 768px) {
  .mobile-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    height: 56px;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--color-bg-card);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -1px 8px rgb(0 0 0 / 6%);
  }

  /* Bottom padding so page content isn't hidden behind the tab bar */
  body.has-mobile-tab-bar .container,
  body.has-mobile-tab-bar main {
    padding-bottom: calc(56px + env(safe-area-inset-bottom) + var(--space-4));
  }

  /* Hide footer on mobile when tab bar is present */
  body.has-mobile-tab-bar .footer {
    display: none;
  }
}

/* Individual tab */
.mobile-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 2px;
  padding: var(--space-1) 0;
  text-decoration: none;
  color: var(--color-text-tertiary);
  transition: color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
}

.mobile-tab:hover {
  color: var(--color-text-secondary);
}

.mobile-tab--active {
  color: var(--color-primary);
}

.mobile-tab__label {
  font-size: 10px;
  font-weight: var(--weight-medium);
  line-height: 1;
  letter-spacing: 0.01em;
}

.mobile-tab__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.mobile-tab__avatar--cartoon {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mobile-tab__avatar--cartoon svg {
  width: 100%;
  height: 100%;
}

/* ═══════════════════════════════════════════════════════════════════
   MY GAMES PAGE — standalone page styles
   ═══════════════════════════════════════════════════════════════════ */

.my-games-main {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-3);
  padding-bottom: calc(var(--space-8) + 64px); /* account for mobile tab bar */
}

/* Page header */
.my-games-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.my-games-page-title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.my-games-page-actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

.my-games-page-actions .btn-label {
  display: none;
}

@media (width >= 480px) {
  .my-games-page-actions .btn-label {
    display: inline;
  }
}

/* Next game countdown hero */
.my-games-next-hero {
  background: var(--color-bg-card);
  border: 1px solid rgb(from var(--color-primary) r g b / 25%);
  border-radius: var(--radius-lg, 12px);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.my-games-next-hero__content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.my-games-next-hero__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
}

.my-games-next-hero__countdown {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
}

.my-games-next-hero__title {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Last match banner ─────────────────────────────────────────────── */
.my-games-last-match {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
  padding: var(--space-3) var(--space-4);
  padding-right: var(--space-10, 40px);
  margin-bottom: var(--space-4);
  animation: lastMatchSlideIn 0.3s ease-out;
}

.my-games-last-match--needs-score {
  border-color: rgb(from var(--color-warning) r g b / 40%);
  background: rgb(from var(--color-warning) r g b / 5%);
}

.my-games-last-match--dismissing {
  animation: lastMatchSlideOut 0.25s ease-in forwards;
}

@keyframes lastMatchSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes lastMatchSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.my-games-last-match__dismiss {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: var(--radius-full, 99px);
  background: transparent;
  color: var(--color-text-tertiary);
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.my-games-last-match__dismiss:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-secondary);
}

.my-games-last-match__content {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.my-games-last-match__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-tertiary);
}

.my-games-last-match--needs-score .my-games-last-match__label {
  color: var(--color-warning);
}

.my-games-last-match__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-games-last-match__meta {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-games-last-match__action {
  flex-shrink: 0;
}

/* Countdown badge on event cards */
.my-event-countdown {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: var(--weight-semibold);
  padding: 1px 6px;
  margin-left: var(--space-1);
  border-radius: var(--radius-full, 99px);
  background: rgb(from var(--color-primary) r g b / 10%);
  color: var(--color-primary);
  vertical-align: middle;
  line-height: 1.4;
}

.my-event-countdown--today {
  background: rgb(from var(--color-warning) r g b / 12%);
  color: var(--color-warning);
  animation: countdown-pulse 2s ease-in-out infinite;
}

@keyframes countdown-pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

/* Card removal animation */
.my-event-card--removing {
  animation: card-slide-out 0.3s ease-out forwards;
}

@keyframes card-slide-out {
  to {
    opacity: 0;
    transform: translateX(100%);
    max-height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
  }
}

/* Past event filters */
.my-games-filters {
  margin-bottom: var(--space-3);
}

.my-games-filter-row {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-1);
  scrollbar-width: none;
}

.my-games-filter-row::-webkit-scrollbar {
  display: none;
}

.my-games-filter-select {
  appearance: none;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full, 99px);
  padding: var(--space-1) var(--space-3) var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
}

.my-games-filter-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgb(from var(--color-primary) r g b / 20%);
}

.my-games-filter-status {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-top: var(--space-1);
  padding-left: var(--space-1);
}

/* Friends game card wrapper */
.my-games-friend-card {
  margin-bottom: var(--space-2);
}

.my-games-friend-card .my-event-card {
  cursor: pointer;
}

/* Friends filter bar (favorites toggle) */
.my-games-friends-filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

/* Friends bar inside cards */
.my-games-friends-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: 4px;
}

.my-games-friends-bar .my-games-friends__avatars {
  display: flex;
  flex-shrink: 0;
}

.my-games-friends-bar .my-games-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--color-bg-card);
  object-fit: cover;
}

.my-games-friends-bar .my-games-avatar + .my-games-avatar {
  margin-left: -6px;
}

.my-games-friends-bar .my-games-avatar--initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: var(--weight-semibold);
  background: var(--color-bg-page);
  color: var(--color-text-secondary);
}

.my-games-friends-bar .my-games-friends__label {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-games-friends-bar .my-games-friends__label strong {
  color: var(--color-text-secondary);
  font-weight: var(--weight-medium);
}

/* Join button in friend cards */
.my-games-friend-card .btn-rsvp {
  flex-shrink: 0;
  margin-left: auto;
  align-self: center;
}

/* ═══════════════════════════════════════════════════════════════════
   Gamification Section — Player Stats, Leaderboard, Badges
   ═══════════════════════════════════════════════════════════════════ */

.gamification-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

/* ── Player Profile Card ──────────────────────────────────────────── */

.gf-profile-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
  padding: var(--space-5);
  overflow: hidden;
}

.gf-profile-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.gf-profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-primary);
  flex-shrink: 0;
}

.gf-profile-avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(from var(--color-primary) r g b / 12%);
  color: var(--color-primary);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
}

.gf-profile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.gf-profile-name {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gf-profile-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.gf-profile-level {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px var(--space-2);
  background: rgb(from var(--color-primary) r g b / 10%);
  color: var(--color-primary);
  border-radius: var(--radius-full, 99px);
  font-size: 11px;
  font-weight: var(--weight-semibold);
}

/* Stat rings grid */
.gf-stat-rings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

@media (width >= 480px) {
  .gf-stat-rings {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (width >= 360px) and (width < 480px) {
  .gf-stat-rings {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gf-stat-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  text-align: center;
}

.gf-ring-wrap {
  position: relative;
  width: 64px;
  height: 64px;
}

.gf-ring-svg {
  width: 64px;
  height: 64px;
  transform: rotate(-90deg);
}

.gf-ring-track {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 5;
}

.gf-ring-fill {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.gf-ring-fill--primary {
  stroke: var(--color-primary);
}

.gf-ring-fill--warning {
  stroke: var(--color-warning);
}

.gf-ring-fill--info {
  stroke: var(--color-info);
}

.gf-ring-fill--error {
  stroke: var(--color-error);
}

.gf-ring-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
}

.gf-ring-label {
  font-size: 11px;
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  line-height: 1.2;
}

/* Comparison tag beneath ring */
.gf-ring-compare {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: var(--weight-semibold);
  padding: 1px var(--space-1);
  border-radius: var(--radius-full, 99px);
  line-height: 1.4;
}

.gf-ring-compare--up {
  color: var(--color-primary);
  background: rgb(from var(--color-primary) r g b / 10%);
}

.gf-ring-compare--down {
  color: var(--color-text-tertiary);
  background: var(--color-bg-page);
}

.gf-ring-compare--neutral {
  color: var(--color-text-tertiary);
  background: var(--color-bg-page);
}

/* ── Mini Leaderboard ─────────────────────────────────────────────── */

.gf-leaderboard {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
}

.gf-leaderboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.gf-leaderboard-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.gf-leaderboard-pills {
  display: flex;
  gap: var(--space-1);
}

.gf-leaderboard-pill {
  padding: 3px var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full, 99px);
  background: transparent;
  font-size: 11px;
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--transition-fast, 100ms),
    color var(--transition-fast, 100ms),
    border-color var(--transition-fast, 100ms);
}

.gf-leaderboard-pill:hover {
  border-color: var(--color-text-tertiary);
}

.gf-leaderboard-pill--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-inverse);
}

.gf-leaderboard-pill--active:hover {
  border-color: var(--color-primary-hover, var(--color-primary));
}

.gf-leaderboard-period-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-page);
}

.gf-leaderboard-pills--period {
  justify-content: center;
}

.gf-leaderboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gf-leaderboard-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast, 100ms);
}

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

.gf-leaderboard-row--you {
  background: rgb(from var(--color-primary) r g b / 6%);
}

.gf-leaderboard-rank {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: var(--weight-bold);
  flex-shrink: 0;
}

.gf-leaderboard-rank--gold {
  background: rgb(from var(--color-warning) r g b / 15%);
  color: var(--color-warning);
}

.gf-leaderboard-rank--silver {
  background: var(--color-bg-page);
  color: var(--color-text-secondary);
}

.gf-leaderboard-rank--bronze {
  background: var(--color-bg-page);
  color: var(--color-text-tertiary);
}

.gf-leaderboard-rank--default {
  background: transparent;
  color: var(--color-text-tertiary);
}

.gf-leaderboard-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.gf-leaderboard-avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
}

.gf-leaderboard-name {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gf-leaderboard-name--you {
  font-weight: var(--weight-bold);
  color: var(--color-primary);
}

.gf-leaderboard-score {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  white-space: nowrap;
}

.gf-leaderboard-unit {
  font-size: 11px;
  font-weight: var(--weight-normal);
  color: var(--color-text-tertiary);
  margin-left: 2px;
}

.gf-leaderboard-gap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-1) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.gf-leaderboard-gap-dots {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  letter-spacing: 2px;
}

/* Scope bar (Everyone / Friends toggle) */
.gf-leaderboard-scope-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-card);
}

.gf-leaderboard-scope {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full, 99px);
  background: transparent;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--transition-fast, 100ms),
    color var(--transition-fast, 100ms),
    border-color var(--transition-fast, 100ms);
}

.gf-leaderboard-scope:hover {
  border-color: var(--color-text-tertiary);
}

.gf-leaderboard-scope--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-inverse);
}

.gf-leaderboard-scope--active:hover {
  border-color: var(--color-primary-hover, var(--color-primary));
}

.gf-leaderboard-scope svg {
  flex-shrink: 0;
}

/* Friends empty state */
.gf-leaderboard-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
  text-align: center;
}

.gf-leaderboard-empty-icon {
  font-size: var(--text-xl);
}

.gf-leaderboard-empty-text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.gf-leaderboard-empty-text a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: var(--weight-medium);
}

.gf-leaderboard-empty-text a:hover {
  text-decoration: underline;
}

/* ── Achievement Badges ───────────────────────────────────────────── */

.gf-badges {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
}

.gf-badges-header {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.gf-badges-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.gf-badges-count {
  font-size: 11px;
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  background: rgb(from var(--color-primary) r g b / 10%);
  padding: 1px var(--space-2);
  border-radius: var(--radius-full, 99px);
}

.gf-badges-scroll {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gf-badges-scroll::-webkit-scrollbar {
  display: none;
}

.gf-badge {
  flex-shrink: 0;
  width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
  scroll-snap-align: start;
  transition: transform var(--transition-base, 150ms);
}

.gf-badge:hover {
  transform: translateY(-2px);
}

.gf-badge-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 22px;
  background: rgb(from var(--color-primary) r g b / 10%);
  border: 2px solid var(--color-primary);
  transition: transform var(--transition-base, 150ms);
}

.gf-badge--locked .gf-badge-icon {
  background: var(--color-bg-page);
  border-color: var(--color-border);
  filter: grayscale(1);
  opacity: 0.5;
}

.gf-badge-name {
  font-size: 11px;
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  line-height: 1.2;
}

.gf-badge--locked .gf-badge-name {
  color: var(--color-text-tertiary);
}

.gf-badge-desc {
  font-size: 10px;
  color: var(--color-text-secondary);
  line-height: 1.3;
}

.gf-badge--locked .gf-badge-desc {
  color: var(--color-text-tertiary);
}

/* Badge progress bar */
.gf-badge-progress {
  width: 100%;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: auto;
}

.gf-badge-progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 2px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.gf-badge--locked .gf-badge-progress-fill {
  background: var(--color-text-tertiary);
}

/* Unlocked badge entrance animation */
@keyframes gf-badge-pop {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }

  60% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.gf-badge--unlocked .gf-badge-icon {
  animation: gf-badge-pop 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* ── Responsive adjustments ───────────────────────────────────────── */

@media (width >= 480px) {
  .gf-badge {
    width: 130px;
  }
}

@media (width >= 768px) {
  .gf-badges-scroll {
    flex-wrap: wrap;
    overflow-x: visible;
    scroll-snap-type: none;
  }

  .gf-badge {
    flex: 0 0 calc((100% - var(--space-3) * 4) / 5);
    width: auto;
    min-width: 100px;
    scroll-snap-align: unset;
  }
}

@media (width >= 1024px) {
  .gf-badge {
    flex: 0 0 calc((100% - var(--space-3) * 5) / 6);
  }
}

/* Geo tags (countries played in) */
.gf-geo-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.gf-geo-tags__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gf-geo-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px var(--space-2);
  background: rgb(from var(--color-primary) r g b / 8%);
  border: 1px solid rgb(from var(--color-primary) r g b / 15%);
  border-radius: var(--radius-full, 99px);
  font-size: 11px;
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════
   Stats Tab — Hero, Timeline, Club Breakdown, Records
   ═══════════════════════════════════════════════════════════════════ */

/* ── Profile Link Row Mini Stat Pills ─────────────────────────────── */

.profile-link-row__stat-pills {
  display: inline-flex;
  gap: var(--space-1);
  align-items: center;
}

.stat-mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px var(--space-2);
  border-radius: var(--radius-full, 99px);
  font-size: 11px;
  font-weight: var(--weight-semibold);
  background: var(--color-bg-page);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  white-space: nowrap;
}

.stat-mini-pill--accent {
  background: rgb(from var(--color-warning) r g b / 10%);
  border-color: rgb(from var(--color-warning) r g b / 20%);
  color: var(--color-warning);
}

/* ── Stats Hero Summary ───────────────────────────────────────────── */

.stats-hero {
  background: linear-gradient(
    135deg,
    rgb(from var(--color-primary) r g b / 6%) 0%,
    rgb(from var(--color-info) r g b / 4%) 100%
  );
  border: 1px solid rgb(from var(--color-primary) r g b / 12%);
  border-radius: var(--radius-lg, 12px);
  padding: var(--space-5);
  text-align: center;
  margin-bottom: var(--space-4);
}

.stats-hero__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
}

.stats-hero__summary {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

.stats-hero__highlights {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.stats-hero__chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full, 99px);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.stats-hero__chip--primary {
  background: rgb(from var(--color-primary) r g b / 10%);
  color: var(--color-primary);
}

.stats-hero__chip--warning {
  background: rgb(from var(--color-warning) r g b / 10%);
  color: var(--color-warning);
}

.stats-hero__chip--info {
  background: rgb(from var(--color-info) r g b / 10%);
  color: var(--color-info);
}

/* ── Match Score Stats Card ───────────────────────────────────────── */

.match-score-stats {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.match-score-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-1);
  padding: var(--space-4);
}

.match-score-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-2);
  border-radius: var(--radius-md, 8px);
  background: var(--color-bg-page);
}

.match-score-stat-card__value {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-primary);
}

.match-score-stat-card--won .match-score-stat-card__value {
  color: var(--color-success);
}

.match-score-stat-card--lost .match-score-stat-card__value {
  color: var(--color-error);
}

.match-score-stat-card--rate .match-score-stat-card__value {
  color: var(--color-primary);
}

.match-score-stat-card__label {
  font-size: var(--text-2xs, 10px);
  font-weight: var(--weight-medium);
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Recent Match Scores List ─────────────────────────────────────── */

.recent-match-scores {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.recent-match-scores__list {
  padding: var(--space-2) 0;
}

.recent-match-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  transition: background var(--transition-base);
  cursor: pointer;
}

.recent-match-row:hover,
.recent-match-row:focus-visible {
  background: var(--color-bg-hover, var(--color-bg-elevated));
}

.recent-match-row:not(:last-child) {
  border-bottom: 1px solid var(--color-border-subtle, var(--color-border));
}

.recent-match__result {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md, 8px);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  flex-shrink: 0;
}

.recent-match__result--win {
  background: rgb(from var(--color-success) r g b / 12%);
  color: var(--color-success);
}

.recent-match__result--loss {
  background: rgb(from var(--color-error) r g b / 12%);
  color: var(--color-error);
}

.recent-match__details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.recent-match__event {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-match__score {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-secondary);
}

.recent-match__set {
  font-weight: var(--weight-bold);
}

.recent-match__set--win {
  color: var(--color-success);
}

.recent-match__set--loss {
  color: var(--color-error);
}

.recent-match__teams {
  color: var(--color-text-tertiary);
  font-weight: var(--weight-normal, 400);
}

/* Scored score bar - clickable */
.my-event-score-bar--scored:hover {
  opacity: 0.85;
}

.recent-match__date {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── Stats Section Headers ────────────────────────────────────────── */

.stats-section-header {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.stats-section-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
}

.stats-section-title svg {
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

/* ── Activity Timeline Bar Chart ──────────────────────────────────── */

.stats-timeline {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.stats-timeline__chart {
  display: flex;
  align-items: flex-end;
  gap: var(--space-1);
  padding: var(--space-4);
  padding-top: var(--space-6);
  height: 140px;
}

.stats-timeline__col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  height: 100%;
  justify-content: flex-end;
}

.stats-timeline__bar-wrap {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
}

.stats-timeline__bar {
  width: 80%;
  max-width: 32px;
  border-radius: var(--space-1) var(--space-1) 0 0;
  background: var(--color-primary);
  min-height: 2px;
  transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-timeline__bar--current {
  background: rgb(from var(--color-primary) r g b / 50%);
  border: 1px dashed var(--color-primary);
  border-bottom: none;
}

.stats-timeline__bar-value {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
}

.stats-timeline__label {
  font-size: 10px;
  font-weight: var(--weight-medium);
  color: var(--color-text-tertiary);
  white-space: nowrap;
}

/* ── Club Breakdown ───────────────────────────────────────────────── */

.stats-clubs {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.stats-clubs__list {
  padding: var(--space-3) var(--space-4);
}

.stats-club-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
}

.stats-club-row + .stats-club-row {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-3);
  margin-top: var(--space-1);
}

.stats-club-row__rank {
  width: 20px;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--color-text-tertiary);
  text-align: center;
  flex-shrink: 0;
}

.stats-club-row__name {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  width: 120px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-club-row__bar {
  flex: 1;
  height: 8px;
  background: var(--color-bg-page);
  border-radius: var(--radius-full, 99px);
  overflow: hidden;
}

.stats-club-row__fill {
  height: 100%;
  border-radius: var(--radius-full, 99px);
  background: var(--color-primary);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-club-row__count {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-text-secondary);
  min-width: 24px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Personal Records ─────────────────────────────────────────────── */

.stats-records {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.stats-records__list {
  padding: var(--space-3) var(--space-4);
}

.stats-record {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
}

.stats-record + .stats-record {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-3);
  margin-top: var(--space-1);
}

.stats-record__icon {
  font-size: var(--text-lg);
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.stats-record__info {
  flex: 1;
  min-width: 0;
}

.stats-record__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
}

.stats-record__value {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

/* ── Stats Empty State ────────────────────────────────────────────── */

.stats-empty {
  text-align: center;
  padding: var(--space-10) var(--space-4);
}

.stats-empty__icon {
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-3);
}

.stats-empty__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.stats-empty__text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
  line-height: var(--leading-normal);
}

/* ── Stats Section (standalone below tabs) ────────────────────────── */

.my-games-stats-section {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.my-games-stats-section .gf-profile-card,
.my-games-stats-section .gf-leaderboard,
.my-games-stats-section .gf-badges {
  margin-bottom: var(--space-4);
}

/* ── Reduced Motion ───────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .stats-timeline__bar,
  .stats-club-row__fill {
    transition: none;
  }
}

/* ── Avatar Picker ──────────────────────────────────────────────── */

.avatar-picker {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-2) 0;
}

.avatar-picker__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-bg-page);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.avatar-picker__item:hover {
  border-color: var(--color-primary);
}

.avatar-picker__item--selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgb(from var(--color-primary) r g b / 25%);
}

.avatar-picker__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-picker__svg {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-picker__svg svg {
  width: 100%;
  height: 100%;
}

/* ── Avatar Picker Bottom Sheet ─────────────────────────────────── */

.avatar-sheet {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 200ms ease,
    visibility 200ms ease;
}

.avatar-sheet--visible {
  opacity: 1;
  visibility: visible;
}

.avatar-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-light);
  backdrop-filter: blur(4px);
}

.avatar-sheet__content {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: 70vh;
  max-height: 70dvh;
  background: var(--color-bg-card);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 -10px 25px -5px rgb(0 0 0 / 15%),
    0 -4px 6px -2px rgb(0 0 0 / 5%);
  transform: translateY(100%);
  transition: transform 300ms ease;
}

.avatar-sheet--visible .avatar-sheet__content {
  transform: translateY(0);
}

/* Desktop: centered modal */
@media (width >= 480px) {
  .avatar-sheet {
    align-items: center;
    padding: var(--space-4);
  }

  .avatar-sheet__content {
    max-width: 400px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 25%);
    transform: translateY(20px) scale(0.95);
  }

  .avatar-sheet--visible .avatar-sheet__content {
    transform: translateY(0) scale(1);
  }
}

.avatar-sheet__handle {
  display: flex;
  justify-content: center;
  padding: var(--space-3) 0 0;
  flex-shrink: 0;
}

.avatar-sheet__handle::before {
  content: "";
  width: 36px;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
}

@media (width >= 480px) {
  .avatar-sheet__handle {
    display: none;
  }
}

.avatar-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-5) var(--space-2);
  flex-shrink: 0;
}

.avatar-sheet__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin: 0;
}

.avatar-sheet__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--color-bg-page);
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: background var(--transition-base);
}

.avatar-sheet__close:hover {
  background: var(--bg-hover);
}

.avatar-sheet__body {
  padding: var(--space-2) var(--space-5) var(--space-5);
  padding-bottom: max(var(--space-5), env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Larger avatars inside the sheet */
.avatar-picker--sheet {
  gap: var(--space-3);
  justify-content: center;
}

.avatar-picker--sheet .avatar-picker__item {
  width: 64px;
  height: 64px;
}

.avatar-picker--sheet .avatar-picker__svg {
  width: 50px;
  height: 50px;
}

/* Upload photo button in picker */
.avatar-picker__upload {
  border-style: dashed;
  border-color: var(--color-border);
  color: var(--color-text-tertiary);
  transition:
    border-color var(--transition-base),
    color var(--transition-base);
}

.avatar-picker__upload:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.avatar-picker__upload--loading {
  pointer-events: none;
  opacity: 0.6;
}

.avatar-picker__spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Score Entry Bottom Sheet ───────────────────────────────────── */

.score-sheet {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 200ms ease,
    visibility 200ms ease;
}

.score-sheet--visible {
  opacity: 1;
  visibility: visible;
}

.score-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-light);
  backdrop-filter: blur(4px);
}

.score-sheet__content {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: 85vh;
  max-height: 85dvh;
  background: var(--color-bg-card);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 -10px 25px -5px rgb(0 0 0 / 15%),
    0 -4px 6px -2px rgb(0 0 0 / 5%);
  transform: translateY(100%);
  transition: transform 300ms ease;
}

.score-sheet--visible .score-sheet__content {
  transform: translateY(0);
}

@media (width >= 480px) {
  .score-sheet {
    align-items: center;
    padding: var(--space-4);
  }

  .score-sheet__content {
    max-width: 420px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 25%);
    transform: translateY(20px) scale(0.95);
  }

  .score-sheet--visible .score-sheet__content {
    transform: translateY(0) scale(1);
  }
}

.score-sheet__handle {
  display: flex;
  justify-content: center;
  padding: var(--space-3) 0 0;
  flex-shrink: 0;
}

.score-sheet__handle::before {
  content: "";
  width: 36px;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
}

@media (width >= 480px) {
  .score-sheet__handle {
    display: none;
  }
}

.score-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-5) var(--space-2);
  flex-shrink: 0;
}

.score-sheet__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin: 0;
}

.score-sheet__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--color-bg-page);
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: background var(--transition-base);
}

.score-sheet__close:hover {
  background: var(--bg-hover);
}

.score-sheet__body {
  padding: var(--space-2) var(--space-5) var(--space-4);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Event banner at top of score sheet */
.score-sheet__event-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg-page);
  border-radius: var(--radius-md, 8px);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.score-sheet__event-banner svg {
  flex-shrink: 0;
  color: var(--color-text-tertiary);
  margin-top: 2px;
}

.score-sheet__event-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.score-sheet__event-meta {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}

/* ── Team Players Section ── */

.score-sheet__teams {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.score-sheet__team {
  flex: 1;
  min-width: 0;
}

.score-sheet__team-vs {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  padding-top: 0;
  align-self: flex-start;
  line-height: 1;
  margin-top: 2px;
  flex-shrink: 0;
}

.score-sheet__team-players {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Player slot (container for either a chip or search input) */
.score-player-slot {
  min-height: 40px;
  display: flex;
  align-items: center;
}

.score-player-slot--you {
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  background: rgb(from var(--color-primary) r g b / 6%);
  border-radius: var(--radius-md, 8px);
  border: 1px solid rgb(from var(--color-primary) r g b / 15%);
}

.score-player-slot__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-player-slot__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.score-player-slot__initials {
  font-size: 11px;
  font-weight: var(--weight-bold);
  color: var(--color-primary);
}

.score-player-slot__name {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Search input in slot */
.score-player-search-wrap {
  width: 100%;
  position: relative;
}

.score-player-search {
  width: 100%;
  padding: var(--space-1) var(--space-2) var(--space-1) var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  background: var(--color-bg-page);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md, 8px);
  outline: none;
  transition: border-color var(--transition-base);
}

.score-player-search-wrap::before {
  content: "";
  position: absolute;
  left: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: var(--color-text-tertiary);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E")
    center/contain no-repeat;
  pointer-events: none;
  z-index: 1;
}

.score-player-search::placeholder {
  color: var(--color-text-tertiary);
  font-weight: var(--weight-medium);
}

.score-player-search:focus {
  border-style: solid;
  border-color: var(--color-primary);
}

/* Dropdown with search results */
.score-player-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  margin-top: 2px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.score-player-dropdown__header {
  font-size: 10px;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-tertiary);
  padding: var(--space-2) var(--space-2) var(--space-1);
  border-top: 1px solid var(--color-border);
}

.score-player-dropdown__header:first-child {
  border-top: none;
}

.score-player-dropdown__loading,
.score-player-dropdown__empty {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  padding: var(--space-3) var(--space-2);
  text-align: center;
}

.score-player-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2);
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-base);
}

.score-player-option:hover {
  background: var(--color-bg-hover, rgb(0 0 0 / 4%));
}

.score-player-option__avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgb(from var(--color-primary) r g b / 10%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.score-player-option__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.score-player-option__initials {
  font-size: 10px;
  font-weight: var(--weight-bold);
  color: var(--color-primary);
}

.score-player-option__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.score-player-option__name {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.score-player-option__source {
  font-size: 10px;
  color: var(--color-text-tertiary);
  line-height: 1.3;
}

.score-player-option__level {
  font-weight: var(--weight-semibold);
  color: var(--color-text-secondary);
}

.score-player-option__badge {
  font-size: 10px;
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  flex-shrink: 0;
  padding: 1px var(--space-1);
  background: rgb(from var(--color-primary) r g b / 10%);
  border-radius: var(--radius-sm, 4px);
}

/* Custom "Add player" option at bottom of dropdown */
.score-player-option--custom {
  border-top: 1px solid var(--color-border);
}

.score-player-option--custom .score-player-option__avatar {
  background: rgb(from var(--color-primary) r g b / 15%);
}

.score-player-option--custom .score-player-option__name {
  color: var(--color-primary);
  font-weight: var(--weight-semibold);
}

/* Selected player chip */
.score-player-chip {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  background: var(--color-bg-page);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full, 999px);
  max-width: 100%;
}

.score-player-chip__initials {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgb(from var(--color-primary) r g b / 12%);
  color: var(--color-primary);
  font-size: 10px;
  font-weight: var(--weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.score-player-chip__photo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.score-player-chip__name {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score-player-chip__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--color-text-tertiary);
  cursor: pointer;
  font-size: var(--text-sm);
  line-height: 1;
  flex-shrink: 0;
  transition: color var(--transition-base);
}

.score-player-chip__remove:hover {
  color: var(--color-error);
}

/* Section labels inside score sheet */
.score-sheet__section-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-2);
}

.score-sheet__format-group,
.score-sheet__sets-group {
  border: none;
  padding: 0;
  margin: 0;
}

/* Format chips (Sets / Americano / Tiebreak) */
.score-sheet__format-chips {
  display: flex;
  gap: var(--space-2);
}

.score-format-chip {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-align: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full, 999px);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition:
    background var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base);
}

.score-format-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.score-format-chip--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-inverse);
}

.score-format-chip--active:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: var(--color-text-inverse);
}

/* Set score rows */
.score-sheet__sets {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.score-set-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.score-set-row__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-tertiary);
  min-width: 40px;
  flex-shrink: 0;
}

.score-set-row__inputs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
}

.score-set-input-group {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex: 1;
}

.score-set-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg-page);
  color: var(--color-text-secondary);
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background var(--transition-base),
    border-color var(--transition-base);
  line-height: 1;
  user-select: none;
}

.score-set-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.score-set-btn:active {
  background: var(--color-bg-hover);
}

.score-set-input {
  width: 100%;
  min-width: 0;
  max-width: 48px;
  text-align: center;
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-primary);
  background: var(--color-bg-page);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
  padding: var(--space-1) var(--space-2);
  transition: border-color var(--transition-base);
  appearance: textfield;
}

.score-set-input::-webkit-outer-spin-button,
.score-set-input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.score-set-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.score-set-row__dash {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  flex-shrink: 0;
}

/* Set row disabled (match decided before this set) */
.score-set-row--disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* Set row with invalid score (visual hint) */
.score-set-row--invalid .score-set-input {
  border-color: var(--color-error);
}

/* Add set button */
.score-sheet__add-set {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1) 0;
  transition: opacity var(--transition-base);
}

.score-sheet__add-set:hover {
  opacity: 0.8;
}

/* Winner toggle buttons */
.score-sheet__winner-row {
  display: flex;
  gap: var(--space-2);
}

.score-winner-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  cursor: pointer;
  font-size: var(--text-sm);
  transition:
    background var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base);
}

.score-winner-btn:hover {
  border-color: var(--color-primary);
}

.score-winner-btn--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-inverse);
}

.score-winner-btn__icon {
  font-size: var(--text-base);
}

.score-winner-btn__label {
  font-weight: var(--weight-medium);
}

/* Encouragement nudge */
.score-sheet__nudge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin: 0;
}

.score-sheet__nudge svg {
  flex-shrink: 0;
}

/* Footer with save button */
.score-sheet__footer {
  padding: var(--space-3) var(--space-5);
  padding-bottom: max(var(--space-4), env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}

.score-sheet__save {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-inverse);
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-lg, 12px);
  cursor: pointer;
  transition:
    background var(--transition-base),
    opacity var(--transition-base);
}

.score-sheet__save:hover:not(:disabled) {
  background: var(--color-primary-hover);
}

.score-sheet__save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Profile Nationality Flag ───────────────────────────────────── */

.profile-nationality-flag {
  font-size: var(--text-lg);
  margin-left: var(--space-2);
  vertical-align: middle;
}

/* ── Profile Preview Card ───────────────────────────────────────── */

.profile-preview-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-4);
  margin: var(--space-3) 0 var(--space-4);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-sm, 0 1px 2px rgb(0 0 0 / 5%));
  position: sticky;
  top: var(--header-height);
  z-index: 10;
  transition:
    padding 250ms ease,
    margin 250ms ease,
    border-radius 250ms ease,
    border-color 250ms ease,
    box-shadow 250ms ease,
    top 200ms ease-out;
}

/* Compact state when stuck to top – break out to full viewport width */
.profile-preview-card--stuck {
  padding: var(--space-3) var(--space-4);
  margin-left: calc(-1 * var(--space-4));
  margin-right: calc(-1 * var(--space-4));
  margin-bottom: var(--space-4);
  margin-top: var(--space-4) !important;
  border-radius: 0;
  border-left-color: transparent;
  border-right-color: transparent;
  box-shadow: var(--shadow-md, 0 4px 6px rgb(0 0 0 / 10%));
}

/* Follow smart header hide/show */
.header--hidden ~ .container .profile-preview-card {
  top: 0;
}

.profile-preview-card--stuck .profile-preview-card__avatar {
  width: 32px;
  height: 32px;
}

.profile-preview-card--stuck .profile-preview-card__meta {
  flex-direction: row;
  gap: var(--space-2);
}

.profile-preview-card--stuck .profile-preview-card__since::before {
  content: "·";
  margin-right: var(--space-1);
}

.profile-preview-card--stuck .profile-preview-card__edit {
  width: 18px;
  height: 18px;
}

/* Header variant: full-width, no top margin */
.profile-preview-card--header {
  margin-top: 0;
}

/* Avatar wrapper for edit button overlay */
.profile-preview-card__avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.profile-preview-card__edit {
  position: absolute;
  bottom: -4px;
  right: -4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--color-bg-card);
  border: 1.5px solid var(--color-border);
  border-radius: 50%;
  cursor: pointer;
  padding: 10px;
  box-sizing: content-box;
  margin: -10px;
  transition:
    all var(--transition-base),
    width 250ms ease,
    height 250ms ease;
}

.profile-preview-card__edit:hover {
  background: var(--bg-hover);
  border-color: var(--color-primary);
}

.profile-preview-card__edit svg {
  color: var(--color-text-secondary);
}

.profile-preview-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    width 250ms ease,
    height 250ms ease;
}

.profile-preview-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-preview-card__svg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-preview-card__svg svg {
  width: 100%;
  height: 100%;
}

.profile-preview-card__initials {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-text-secondary);
}

.profile-preview-card__info {
  flex: 1;
  min-width: 0;
}

.profile-preview-card__name {
  display: block;
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-preview-card__flag {
  font-size: var(--text-base);
  margin-left: var(--space-1);
}

.profile-preview-card__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
  transition: gap 250ms ease;
}

.profile-preview-card__level,
.profile-preview-card__since {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.profile-preview-card__certified {
  display: inline-flex;
  align-items: center;
  color: var(--color-primary);
  vertical-align: middle;
  margin-left: 2px;
}

.profile-preview-card__level-prompt {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

.profile-preview-card__level-prompt:hover {
  text-decoration: underline;
}

/* ── Cartoon Avatar in Profile Header ───────────────────────────── */

.profile-avatar--cartoon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar--cartoon svg {
  width: 100%;
  height: 100%;
}

/* ── Cartoon Avatar in Gamification Profile Card ────────────────── */

.gf-profile-avatar--cartoon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.gf-profile-avatar--cartoon svg {
  width: 100%;
  height: 100%;
}

.gf-profile-flag {
  font-size: var(--text-base);
  margin-left: var(--space-1);
}

/* ── Cartoon Avatar & Flag in Leaderboard ───────────────────────── */

.gf-leaderboard-avatar--cartoon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.gf-leaderboard-avatar--cartoon svg {
  width: 100%;
  height: 100%;
}

.gf-leaderboard-flag {
  font-size: var(--text-sm);
  margin-left: var(--space-1);
}

/* ── Form Hint ──────────────────────────────────────────────────── */

.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-2);
}

/* ═══════════════════════════════════════════════════════════════════
   Player Profile Deep-Click — Bottom Sheet (Mobile) + Side Panel (Desktop)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Overlay ──────────────────────────────────────────────────────── */

.pp-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 200ms ease,
    visibility 200ms ease;
}

.pp-overlay--open {
  opacity: 1;
  visibility: visible;
}

.pp-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 50%);
  backdrop-filter: blur(2px);
}

/* ── Bottom Sheet (Mobile default) ────────────────────────────────── */

.pp-sheet {
  position: relative;
  background: var(--color-bg-card);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-height: 88vh;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 300ms cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -4px 24px rgb(0 0 0 / 15%);
  overflow: hidden;
}

.pp-overlay--open .pp-sheet {
  transform: translateY(0);
}

.pp-sheet--dragging {
  transition: none;
}

.pp-sheet__handle {
  display: flex;
  justify-content: center;
  padding: var(--space-3) 0 var(--space-1);
  cursor: grab;
  flex-shrink: 0;
  touch-action: none;
  user-select: none;
}

.pp-sheet__handle::before {
  content: "";
  width: 36px;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
}

.pp-sheet__body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 var(--space-5) var(--space-5);
  flex: 1;
}

/* ── Profile Hero ─────────────────────────────────────────────────── */

.pp-hero {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.pp-hero__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--color-border);
}

.pp-hero__avatar--cartoon {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pp-hero__avatar--cartoon svg {
  width: 100%;
  height: 100%;
}

.pp-hero__avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-page);
  color: var(--color-text-secondary);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
}

.pp-hero__info {
  flex: 1;
  min-width: 0;
}

.pp-hero__name {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.pp-hero__flag {
  font-size: var(--text-base);
}

.pp-hero__instagram {
  display: inline-flex;
  align-items: center;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast, 100ms);
  flex-shrink: 0;
}

.pp-hero__instagram:hover,
.pp-hero__instagram:focus-visible {
  color: var(--color-text-primary);
}

.pp-hero__instagram svg {
  display: block;
}

.pp-hero__level {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px var(--space-2);
  background: rgb(from var(--color-primary) r g b / 10%);
  color: var(--color-primary);
  border-radius: var(--radius-full, 99px);
  font-size: 11px;
  font-weight: var(--weight-semibold);
  margin-top: 2px;
}

.pp-hero__level--certified::after {
  content: "✓";
  margin-left: 2px;
}

.pp-hero__meta {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-top: 2px;
}

/* ── Add to My Players Button ─────────────────────────────────────── */

.pp-add-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-2);
  border: none;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--color-primary);
  border-radius: var(--radius-md, 8px);
  transition: background var(--transition-fast, 100ms);
  margin-left: auto;
  min-width: 48px;
}

.pp-add-player:hover:not(:disabled) {
  background: rgb(from var(--color-primary) r g b / 8%);
}

.pp-add-player:active:not(:disabled) {
  background: rgb(from var(--color-primary) r g b / 14%);
}

.pp-add-player__label {
  font-size: 10px;
  font-weight: var(--weight-semibold);
  line-height: 1;
}

.pp-add-player__icon--check {
  display: none;
}

.pp-add-player--saved {
  color: var(--color-primary);
  cursor: default;
  opacity: 0.8;
}

.pp-add-player--saved .pp-add-player__icon--add {
  display: none;
}

.pp-add-player--saved .pp-add-player__icon--check {
  display: block;
}

.pp-add-player--loading {
  opacity: 0.5;
  pointer-events: none;
}

@keyframes pp-spin {
  to {
    transform: rotate(360deg);
  }
}

.pp-add-player--loading .pp-add-player__icon--add {
  animation: pp-spin 0.8s linear infinite;
}

/* ── Quick Stats ──────────────────────────────────────────────────── */

.pp-quick-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.pp-quick-stats__pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full, 99px);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  background: var(--color-bg-page);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  white-space: nowrap;
}

.pp-quick-stats__pill--accent {
  background: rgb(from var(--color-warning) r g b / 10%);
  border-color: rgb(from var(--color-warning) r g b / 20%);
  color: var(--color-warning);
}

/* ── Section Headers ──────────────────────────────────────────────── */

.pp-section-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

/* ── Comparison Bars (Face-to-Face) ───────────────────────────────── */

.pp-comparison {
  margin-bottom: var(--space-5);
}

.pp-comparison__row {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2) 0;
}

.pp-comparison__row + .pp-comparison__row {
  border-top: 1px solid var(--color-border);
}

.pp-comparison__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pp-comparison__bar-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 28px;
}

.pp-comparison__value {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  min-width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.pp-comparison__value--them {
  color: var(--color-text-primary);
}

.pp-comparison__value--you {
  color: var(--color-primary);
}

.pp-comparison__bars {
  flex: 1;
  display: flex;
  align-items: center;
  height: 20px;
  gap: 2px;
}

.pp-comparison__bar {
  height: 100%;
  border-radius: var(--space-1);
  min-width: 2px;
  transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.pp-comparison__bar--them {
  margin-left: auto;
  border-radius: var(--space-1) 0 0 var(--space-1);
}

.pp-comparison__bar--you {
  border-radius: 0 var(--space-1) var(--space-1) 0;
}

.pp-comparison__bar--winning {
  opacity: 1;
}

.pp-comparison__bar--losing {
  opacity: 0.4;
}

.pp-comparison__bar--tie {
  opacity: 0.7;
}

.pp-comparison__vs {
  font-size: 10px;
  font-weight: var(--weight-bold);
  color: var(--color-text-tertiary);
  flex-shrink: 0;
}

.pp-comparison__winner {
  font-size: 10px;
  font-weight: var(--weight-semibold);
  text-align: center;
  margin-top: 2px;
}

.pp-comparison__winner--you {
  color: var(--color-primary);
}

.pp-comparison__winner--them {
  color: var(--color-text-tertiary);
}

.pp-comparison__winner--tie {
  color: var(--color-text-tertiary);
}

/* ── Radar Chart (Desktop Only) ───────────────────────────────────── */

.pp-radar {
  display: none;
  margin-bottom: var(--space-5);
}

.pp-radar__chart {
  width: 100%;
  max-width: 240px;
  margin: 0 auto;
  display: block;
}

.pp-radar__grid {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 0.5;
}

.pp-radar__axis {
  stroke: var(--color-border);
  stroke-width: 0.5;
}

.pp-radar__label {
  font-size: 10px;
  fill: var(--color-text-secondary);
  text-anchor: middle;
  dominant-baseline: middle;
}

.pp-radar__area {
  stroke-width: 2;
  stroke-linejoin: round;
  transition: all 800ms ease-in-out;
}

.pp-radar__area--them {
  fill: rgb(from var(--color-warning) r g b / 15%);
  stroke: var(--color-warning);
}

.pp-radar__area--you {
  fill: rgb(from var(--color-primary) r g b / 15%);
  stroke: var(--color-primary);
}

.pp-radar__legend {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-3);
}

.pp-radar__legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
}

.pp-radar__legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pp-radar__legend-dot--them {
  background: var(--color-warning);
}

.pp-radar__legend-dot--you {
  background: var(--color-primary);
}

/* ── Achievements (in profile panel) ──────────────────────────────── */

.pp-achievements {
  margin-bottom: var(--space-5);
}

.pp-achievements__scroll {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  overflow-x: visible;
  padding-bottom: var(--space-1);
}

.pp-achievements__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.pp-achievements__group-label {
  font-size: 11px;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pp-achievements__group-label--them {
  color: var(--color-warning);
}

.pp-achievements__group-label--shared {
  color: var(--color-primary);
}

.pp-achievements__group-label--you {
  color: var(--color-primary);
  opacity: 0.7;
}

.pp-achievements__group-label--locked {
  color: var(--color-text-tertiary);
}

.pp-achievements__group-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.pp-achievements__scroll::-webkit-scrollbar {
  display: none;
}

.pp-achievements__badge {
  flex-shrink: 0;
  width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}

.pp-achievements__badge-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 18px;
  background: rgb(from var(--color-primary) r g b / 10%);
  border: 2px solid var(--color-primary);
}

.pp-achievements__badge--locked .pp-achievements__badge-icon {
  background: var(--color-bg-page);
  border-color: var(--color-border);
  filter: grayscale(1);
  opacity: 0.4;
}

.pp-achievements__badge-name {
  font-size: 10px;
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  line-height: 1.2;
}

.pp-achievements__badge--locked .pp-achievements__badge-name {
  color: var(--color-text-tertiary);
}

.pp-achievements__badge-tag {
  font-size: 9px;
  font-weight: var(--weight-semibold);
  padding: 1px var(--space-1);
  border-radius: var(--radius-full, 99px);
  white-space: nowrap;
}

.pp-achievements__badge-tag--yours {
  color: var(--color-primary);
  background: rgb(from var(--color-primary) r g b / 10%);
}

.pp-achievements__badge-tag--theirs {
  color: var(--color-warning);
  background: rgb(from var(--color-warning) r g b / 10%);
}

/* ── Common Ground ────────────────────────────────────────────────── */

.pp-common-ground {
  margin-bottom: var(--space-5);
}

.pp-common-ground__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.pp-common-ground__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg-page);
  border-radius: var(--radius-md, 8px);
  line-height: var(--leading-normal, 1.5);
}

.pp-common-ground__icon {
  flex-shrink: 0;
  font-size: var(--text-base);
}

/* ── Close Button ─────────────────────────────────────────────────── */

.pp-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-4);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--color-bg-page);
  border-radius: 50%;
  color: var(--color-text-secondary);
  cursor: pointer;
  z-index: 1;
  transition: background var(--transition-fast, 100ms);
}

.pp-close:hover {
  background: var(--color-bg-hover, var(--color-border));
}

/* ── Leaderboard row clickable ────────────────────────────────────── */

.gf-leaderboard-row--clickable {
  cursor: pointer;
  transition: background var(--transition-fast, 100ms);
}

.gf-leaderboard-row--clickable:hover {
  background: var(--color-bg-hover, rgb(0 0 0 / 3%));
}

.gf-leaderboard-row--clickable.gf-leaderboard-row--you:hover {
  background: rgb(from var(--color-primary) r g b / 10%);
}

/* ── Desktop: Side Panel ──────────────────────────────────────────── */

@media (width >= 768px) {
  .pp-overlay {
    justify-content: stretch;
    flex-direction: row;
  }

  .pp-sheet {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 420px;
    max-height: none;
    border-radius: 0;
    transform: translateX(100%);
    transition: transform 250ms ease-out;
    box-shadow: -4px 0 24px rgb(0 0 0 / 12%);
  }

  .pp-overlay--open .pp-sheet {
    transform: translateX(0);
  }

  .pp-sheet__handle {
    display: none;
  }

  .pp-sheet__body {
    padding: var(--space-5) var(--space-6);
  }

  /* Show radar chart on desktop */
  .pp-radar {
    display: block;
  }

  /* Show close button on desktop */
  .pp-close {
    display: flex;
  }

  .pp-achievements__badge {
    width: 80px;
  }
}

@media (width >= 1024px) {
  .pp-sheet {
    width: 480px;
  }

  .pp-radar__chart {
    max-width: 260px;
  }
}

/* ── Reduced Motion ───────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .pp-sheet,
  .pp-overlay,
  .pp-overlay__backdrop,
  .pp-comparison__bar,
  .pp-radar__area {
    transition: none;
  }
}

/* ── Legal Pages ─────────────────────────────────────────────────── */

.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4) var(--space-12);
}

.legal-page h1 {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
}

.legal-updated {
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-8);
}

.legal-page section {
  margin-bottom: var(--space-6);
}

.legal-page h2 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.legal-page h3 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-top: var(--space-3);
  margin-bottom: var(--space-1);
}

.legal-page p,
.legal-page li {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.legal-page ul {
  padding-left: var(--space-5);
  margin-bottom: var(--space-3);
}

.legal-page li {
  margin-bottom: var(--space-1);
}

.legal-page a {
  color: var(--color-primary);
  text-decoration: underline;
}

.legal-page a:hover {
  color: var(--color-primary-hover);
}

/* ── Footer Legal Links ──────────────────────────────────────────── */

.footer-legal {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  padding-top: var(--space-3);
}

.footer-legal a {
  color: var(--color-footer-muted);
  font-size: 12px;
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--color-footer-text);
}

/* ── Loading Skeleton Cards ──────────────────────────────────────── */

.skeleton-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4) 0;
}

.skeleton-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-4);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-card__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.skeleton-card__row:last-child {
  margin-bottom: 0;
}

.skeleton-card__circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-border);
  flex-shrink: 0;
}

.skeleton-card__line {
  height: 14px;
  border-radius: 6px;
  background: var(--color-border);
}

.skeleton-card__line--short {
  width: 40%;
}

.skeleton-card__line--medium {
  width: 65%;
}

.skeleton-card__line--long {
  width: 90%;
}

.skeleton-card__tags {
  display: flex;
  gap: var(--space-2);
}

.skeleton-card__tag {
  width: 60px;
  height: 24px;
  border-radius: 999px;
  background: var(--color-border);
}

/* ── Empty State Illustration ────────────────────────────────────── */

.empty-state-illustration {
  font-size: 48px;
  line-height: 1;
  margin-bottom: var(--space-4);
}

/* ── Scroll-to-Top Button ────────────────────────────────────────── */

.scroll-to-top {
  position: fixed;
  bottom: 80px;
  right: var(--space-4);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 8px rgb(0 0 0 / 10%);
  color: var(--color-text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
  z-index: 100;
}

.scroll-to-top--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Push scroll-to-top above consent banner */
body:has(.consent-banner--visible) .scroll-to-top {
  bottom: 140px;
}

/* On mobile, also clear the tab bar */
@media (width < 768px) {
  body.has-mobile-tab-bar .scroll-to-top {
    bottom: 140px;
  }

  body.has-mobile-tab-bar:has(.consent-banner--visible) .scroll-to-top {
    bottom: 196px;
  }
}

.scroll-to-top:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

.scroll-to-top:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

/* ── Pull-to-Refresh Indicator ───────────────────────────────────── */

.pull-to-refresh {
  text-align: center;
  overflow: hidden;
  height: 0;
  transition: height 0.2s ease;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.pull-to-refresh--active {
  height: 48px;
}

.pull-to-refresh__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: ptr-spin 0.6s linear infinite;
}

@keyframes ptr-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   Club Detail Page (Design B — Two-Column)
   ========================================================================== */

.club-detail-page {
  padding-bottom: var(--space-8);
}

/* Loading & not-found states */
.club-detail-loading {
  text-align: center;
  padding: var(--space-16) var(--space-4);
}

.club-detail-loading .loading-ball {
  display: inline-block;
  margin-bottom: var(--space-4);
}

.club-detail-not-found {
  text-align: center;
  padding: var(--space-16) var(--space-4);
}

.club-detail-not-found h2 {
  font-size: var(--text-xl);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.club-detail-not-found p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

.btn-browse-clubs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  border-radius: 8px;
  text-decoration: none;
  min-height: 44px;
}

.btn-browse-clubs:hover {
  background: var(--color-primary-hover);
}

/* Breadcrumb */
.cdb__breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-4);
}

.cdb__breadcrumb a {
  color: var(--color-text-secondary);
  text-decoration: none;
}

.cdb__breadcrumb a:hover {
  color: var(--color-primary);
}

.cdb__breadcrumb-sep {
  font-size: var(--text-xs);
}

.cdb__breadcrumb-current {
  color: var(--color-text-primary);
  font-weight: var(--weight-medium);
}

/* Header */
.cdb__header {
  margin-bottom: var(--space-5);
}

.cdb__name {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 var(--space-2);
}

.cdb__pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.cdb__pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  padding: var(--space-1) var(--space-3);
  border-radius: 9999px;
  background: var(--color-bg-page);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

/* Two-column layout */
.cdb__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (width >= 768px) {
  .cdb__layout {
    grid-template-columns: 280px 1fr;
  }

  .cdb__sidebar {
    order: -1;
  }
}

/* Sidebar */
.cdb__sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.cdb__card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-5);
}

.cdb__card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 var(--space-3);
}

/* Collapsible sidebar cards (mobile) */
.cdb__card--collapsible {
  list-style: none;
}

.cdb__card--collapsible > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.cdb__card--collapsible > summary > svg {
  flex-shrink: 0;
  color: var(--color-text-tertiary);
}

.cdb__card-title-text {
  flex: 1;
}

.cdb__card--collapsible > summary::-webkit-details-marker {
  display: none;
}

.cdb__card--collapsible > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-text-tertiary);
  border-bottom: 2px solid var(--color-text-tertiary);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.cdb__card--collapsible[open] > summary::after {
  transform: rotate(-135deg);
}

.cdb__card--collapsible > .cdb__card-body {
  margin-top: var(--space-3);
}

/* Desktop: always open, hide chevron */
@media (width >= 768px) {
  .cdb__card--collapsible > summary {
    pointer-events: none;
    cursor: default;
  }

  .cdb__card--collapsible > summary::after {
    display: none;
  }

  .cdb__card--collapsible > .cdb__card-body {
    display: block !important;
  }
}

.cdb__detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.cdb__detail-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.cdb__detail-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-page);
  border-radius: 8px;
  color: var(--color-text-tertiary);
  flex-shrink: 0;
}

.cdb__detail-value {
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
}

.cdb__detail-label {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}

.cdb__detail-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: var(--weight-medium);
}

.cdb__detail-link:hover {
  text-decoration: underline;
}

.cdb__map-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3);
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  text-decoration: none;
  min-height: 44px;
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}

.cdb__map-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.cdb__about-text {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0;
}

/* Main events column */
.cdb__main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.cdb__section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.cdb__section-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.cdb__count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 var(--space-2);
  border-radius: 9999px;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-xs);
  font-weight: 600;
  margin-left: var(--space-2);
  vertical-align: middle;
}

.cdb__no-events {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
}

/* Event cards */
.cdb__event-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-4) var(--space-5);
  text-decoration: none;
  display: block;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.cdb__event-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgb(0 0 0 / 6%);
}

.cdb__event-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.cdb__event-card-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.cdb__event-card-type {
  flex-shrink: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  border-radius: 4px;
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.cdb__event-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.cdb__event-card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.cdb__event-card-slots {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.cdb__event-card-slots strong {
  color: var(--color-primary);
  font-weight: 600;
}

/* Filter tags */
.cdb__filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.cdb__filter-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  padding: var(--space-1) var(--space-3);
  border-radius: 99px;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  text-decoration: none;
  min-height: 32px;
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}

.cdb__filter-tag:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.cdb__filter-tag--active {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* View all bottom link */
.cdb__view-all-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-primary);
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  min-height: 44px;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.cdb__view-all-bottom:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

/* ==========================================================================
   Type Detail Page (tp__)
   Reuses cdb__ components for cards, breadcrumbs, filters.
   Only adds type-specific hero, stats, and layout overrides.
   ========================================================================== */

.type-detail-page {
  padding-bottom: var(--space-8);
}

.type-detail-loading {
  text-align: center;
  padding: var(--space-16) var(--space-4);
  color: var(--color-text-tertiary);
}

.type-detail-not-found {
  text-align: center;
  padding: var(--space-16) var(--space-4);
}

.type-detail-not-found h2 {
  font-size: var(--text-xl);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-2);
}

.type-detail-not-found p {
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-6);
}

.tp__hero {
  margin-bottom: var(--space-4);
}

.tp__hero-text {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: var(--space-2) 0 0;
  max-width: 640px;
}

.tp__stats {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-5);
}

.tp__stat {
  font-weight: var(--weight-medium);
}

.tp__stat-sep {
  color: var(--color-text-tertiary);
}

.tp__events {
  max-width: 640px;
}

.tp__filter-section {
  margin-bottom: var(--space-4);
}

.tp__filter-title {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-tertiary);
  margin: 0 0 var(--space-2);
}

.tp__filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* Nearby clubs (sidebar card) */
.cdb__nearby-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.cdb__nearby-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-bg-page);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.cdb__nearby-card:hover {
  background: var(--color-primary-light);
}

.cdb__nearby-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
}

.cdb__nearby-dist {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────
   Account Preview — logged-out user promotion
   ───────────────────────────────────────────────── */

.account-preview .my-games-card__link {
  cursor: pointer;
}

/* Subtle "example" overlay — signals this is a preview */
.account-preview {
  position: relative;
}

.account-preview-collapsible {
  margin: var(--space-4) 0 var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-bg-card);
  overflow: hidden;
}

.account-preview-summary {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4);
  cursor: pointer;
}

.account-preview-summary::-webkit-details-marker {
  display: none;
}

.account-preview-summary__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}

.account-preview-summary__meta {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.account-preview-body {
  padding: 0 var(--space-4) var(--space-4);
}

/* Inline CTA button below the preview cards */
.account-preview-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: var(--space-4);
  margin-top: var(--space-4);
  background: var(--surface-success-bg);
  border: 1px solid var(--surface-success-border);
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.account-preview-cta:hover {
  box-shadow: var(--shadow-sm);
}

.account-preview-cta__text {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
}

.account-preview-cta__sub {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-top: 2px;
}

/* ─── Sign-up Bottom Sheet ─── */

.signup-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 40%);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.signup-sheet-backdrop--visible {
  opacity: 1;
  pointer-events: auto;
}

.signup-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-bg-card);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 24px rgb(0 0 0 / 12%);
  padding: var(--space-4) var(--space-5) var(--space-8);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  max-width: 480px;
  margin: 0 auto;
}

.signup-sheet--open {
  transform: translateY(0);
}

.signup-sheet__handle {
  width: 36px;
  height: 4px;
  border-radius: 99px;
  background: var(--color-text-tertiary);
  opacity: 0.4;
  margin: 0 auto var(--space-4);
}

.signup-sheet__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-2);
  text-align: center;
}

.signup-sheet__sub {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-5);
  text-align: center;
  line-height: var(--leading-normal);
}

.signup-sheet__benefits {
  list-style: none;
  margin: 0 0 var(--space-5);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.signup-sheet__benefits li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
}

.signup-sheet__benefits svg {
  flex-shrink: 0;
  color: var(--color-primary);
}

.signup-sheet__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border: none;
  border-radius: 999px;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  font-family: inherit;
  cursor: pointer;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}

.signup-sheet__btn:hover {
  background: var(--color-primary-hover);
}

.signup-sheet__fine {
  display: block;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-top: var(--space-3);
}

/* ============================================
   Delete Account - Danger Zone & Modal
   ============================================ */

.profile-section--danger {
  margin-top: var(--space-8);
  padding: var(--space-4);
  border: 1px solid var(--color-error);
  border-radius: var(--radius-lg);
  background: var(--color-bg-card);
}

.profile-section--danger .profile-section__title {
  color: var(--color-error);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
}

.profile-section--danger .profile-section__desc {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
  line-height: 1.5;
}

/* Delete confirmation modal */
.delete-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-base),
    visibility var(--transition-base);
}

.delete-modal.modal--visible {
  opacity: 1;
  visibility: visible;
}

.delete-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 50%);
}

.delete-modal__content {
  position: relative;
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-xl);
}

.delete-modal__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-error);
  margin-bottom: var(--space-2);
}

.delete-modal__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-4);
}

.delete-modal__confirm-prompt {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.delete-modal__input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-base);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-page);
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

.delete-modal__input:focus {
  outline: 2px solid var(--color-error);
  outline-offset: -1px;
  border-color: var(--color-error);
}

.delete-modal__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}

.delete-modal__actions .btn {
  min-width: 100px;
}

.delete-modal__actions .btn--danger:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================
   Level Picker Sheet
   Bottom-sheet on mobile, centered overlay on desktop
   (mirrors feedback-sheet pattern)
   ============================================ */

.level-picker-sheet {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 150ms ease,
    visibility 150ms ease;
}

.level-picker-sheet--visible {
  opacity: 1;
  visibility: visible;
}

.level-picker-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 60%);
  backdrop-filter: blur(4px);
}

.level-picker-sheet__content {
  position: relative;
  background: var(--color-bg-card);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-height: 85vh;
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 300ms ease;
  box-shadow: 0 -4px 24px rgb(0 0 0 / 15%);
}

.level-picker-sheet--visible .level-picker-sheet__content {
  transform: translateY(0);
}

.level-picker-sheet--dragging .level-picker-sheet__content {
  transition: none;
}

.level-picker-sheet--dragging .level-picker-sheet__backdrop {
  transition: none;
}

/* Drag handle */
.level-picker-sheet__handle {
  display: flex;
  justify-content: center;
  padding: var(--space-3) 0 var(--space-2);
  cursor: grab;
  flex-shrink: 0;
  touch-action: none;
  user-select: none;
}

.level-picker-sheet__handle::before {
  content: "";
  width: 36px;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
}

/* Header */
.level-picker-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-5) var(--space-4);
  flex-shrink: 0;
}

.level-picker-sheet__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin: 0;
}

.level-picker-sheet__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--color-bg-page);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: background var(--transition-fast);
}

.level-picker-sheet__close:hover {
  background: var(--color-border);
}

/* Level options list */
.level-picker-sheet__body {
  flex: 1;
  overflow-y: auto;
  padding: 0 var(--space-5);
  padding-bottom: max(var(--space-5), env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}

.level-picker-sheet__option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-4);
  background: none;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  color: var(--color-text-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast);
  min-height: 52px;
}

.level-picker-sheet__option:hover {
  background: var(--color-bg-page);
}

.level-picker-sheet__option:active {
  transform: scale(0.98);
}

.level-picker-sheet__option[aria-selected="true"] {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

.level-picker-sheet__option-emoji {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.level-picker-sheet__option-label {
  flex: 1;
}

.level-picker-sheet__option-name {
  display: block;
  font-weight: var(--weight-semibold);
}

.level-picker-sheet__option-range {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-weight: var(--weight-normal);
  margin-top: 2px;
}

.level-picker-sheet__option-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.level-picker-sheet__option[aria-selected="true"]
  .level-picker-sheet__option-check {
  opacity: 1;
}

/* Desktop overlay */
@media (width >= 768px) {
  .level-picker-sheet {
    justify-content: center;
    align-items: center;
  }

  .level-picker-sheet__content {
    max-width: 420px;
    max-height: 75vh;
    border-radius: 20px;
    transform: translateY(32px) scale(0.95);
    opacity: 0;
    transition:
      transform var(--transition-slow),
      opacity var(--transition-slow);
  }

  .level-picker-sheet--visible .level-picker-sheet__content {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  .level-picker-sheet__body {
    padding-bottom: var(--space-5);
  }
}

/* Dark mode */
:root[data-theme="dark"] .level-picker-sheet__content {
  box-shadow: 0 -4px 24px rgb(0 0 0 / 40%);
}

:root[data-theme="dark"] .level-picker-sheet__option:hover {
  background: rgb(255 255 255 / 5%);
}

/* ========================================================================
   Add to Home Screen Banner
   ======================================================================== */
.a2hs-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  background: linear-gradient(
    145deg,
    var(--color-bg-card) 0%,
    var(--color-bg-page) 100%
  );
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl, 18px);
  box-shadow:
    0 8px 24px rgb(0 0 0 / 9%),
    0 2px 6px rgb(0 0 0 / 6%);
  position: relative;
  animation: a2hs-slide-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
}

@keyframes a2hs-slide-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.a2hs-banner--hiding {
  animation: a2hs-slide-out 0.2s ease-in forwards;
}

@keyframes a2hs-slide-out {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.a2hs-banner__close {
  position: absolute;
  top: var(--space-1);
  right: var(--space-1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: none;
  color: var(--color-text-tertiary);
  cursor: pointer;
  border-radius: var(--radius-full, 50%);
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.a2hs-banner__close:hover {
  background: var(--color-bg-hover, rgb(0 0 0 / 5%));
  color: var(--color-text-secondary);
}

.a2hs-banner__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 25%);
}

.a2hs-banner__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.a2hs-banner__content {
  flex: 1;
  min-width: 0;
  padding-right: calc(var(--space-6) + var(--space-2));
}

.a2hs-banner__title {
  display: block;
  font-size: var(--text-base);
  font-weight: var(--weight-bold, 700);
  letter-spacing: -0.015em;
  color: var(--color-text-primary);
  line-height: 1.2;
}

.a2hs-banner__desc {
  margin: var(--space-1) 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.35;
}

.a2hs-banner__share-icon {
  display: block;
  vertical-align: middle;
  color: var(--color-primary);
  flex-shrink: 0;
  animation: a2hs-share-bob 1.6s ease-in-out infinite;
}

@keyframes a2hs-share-bob {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

.a2hs-banner__instruction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3em;
  height: 1.3em;
  margin: 0 2px;
  vertical-align: -0.2em;
}

.a2hs-banner__add-label {
  color: var(--color-text-primary);
  font-weight: var(--weight-semibold, 600);
}

.a2hs-banner__install-btn {
  flex-shrink: 0;
  align-self: center;
  padding: var(--space-2) var(--space-5);
  border: none;
  border-radius: var(--radius-pill, 999px);
  background: var(--color-primary);
  color: var(--color-text-inverse, #fff);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold, 600);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
  min-height: 44px;
}

.a2hs-banner__install-btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

@media (width < 430px) {
  .a2hs-banner {
    gap: var(--space-2);
    padding: var(--space-3);
  }

  .a2hs-banner__title {
    font-size: var(--text-sm);
  }

  .a2hs-banner__desc {
    font-size: var(--text-xs);
  }

  .a2hs-banner__content {
    padding-right: var(--space-6);
  }

  .a2hs-banner__install-btn {
    padding-inline: var(--space-4);
    font-size: var(--text-sm);
  }
}

@media (prefers-reduced-motion: reduce) {
  .a2hs-banner,
  .a2hs-banner__share-icon,
  .a2hs-banner__install-btn {
    animation: none;
    transition: none;
    transform: none;
  }
}

/* ============================================
   Tracking Consent Banner
   ============================================ */

.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-card);
  border-top: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  transform: translateY(100%);
  transition: transform var(--transition-base);
}

.consent-banner--visible {
  transform: translateY(0);
}

.consent-banner__text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.4;
  flex: 1;
  margin: 0;
}

.consent-banner__link {
  color: var(--color-primary);
  text-decoration: underline;
}

.consent-banner__actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

.consent-banner__btn {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.consent-banner__btn--accept {
  background: var(--color-primary);
  color: var(--white);
}

.consent-banner__btn--accept:hover {
  background: var(--color-primary-hover);
}

.consent-banner__btn--deny {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.consent-banner__btn--deny:hover {
  background: var(--hover-bg-subtle);
}

@media (width < 480px) {
  .consent-banner {
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-3);
    padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom));
  }

  .consent-banner__actions {
    justify-content: flex-end;
  }
}

/* Push feedback sticky bar above consent banner when both visible */
body:has(.consent-banner--visible) .feedback-sticky {
  bottom: 56px;
  transition: bottom var(--transition-base);
}

/* Extra footer padding so fixed bottom overlays don't cover footer content */
body:has(.consent-banner--visible) .footer {
  padding-bottom: 112px;
}

/* Feedback sticky is only visible on desktop (≥768px) */
@media (width >= 768px) {
  body:has(.feedback-sticky--visible) .footer {
    padding-bottom: 112px;
  }

  /* When both consent banner and feedback are visible, need even more space */
  body:has(.consent-banner--visible):has(.feedback-sticky--visible) .footer {
    padding-bottom: 172px;
  }
}

/* On mobile, push consent banner above the tab bar */
@media (width < 768px) {
  body.has-mobile-tab-bar .consent-banner {
    bottom: 56px;
  }
}

/* ============================================
   Report Event Modal
   ============================================ */

.report-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-base),
    visibility var(--transition-base);
}

.report-modal.modal--visible {
  opacity: 1;
  visibility: visible;
}

.report-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 50%);
}

.report-modal__content {
  position: relative;
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-xl);
}

.report-modal__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
}

.report-modal__reasons {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.report-modal__reason {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  background: var(--color-bg-page);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.report-modal__reason:hover {
  border-color: var(--color-primary);
}

.report-modal__reason input[type="radio"] {
  accent-color: var(--color-primary);
}

.report-modal__note {
  width: 100%;
  min-height: 60px;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-page);
  color: var(--color-text-primary);
  resize: vertical;
  margin-bottom: var(--space-4);
  font-family: inherit;
}

.report-modal__note:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: -1px;
  border-color: var(--color-primary);
}

.report-modal__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}

.report-modal__actions .btn {
  min-width: 90px;
}

.report-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  cursor: pointer;
  background: none;
  border: none;
  padding: var(--space-1) 0;
  transition: color var(--transition-fast);
}

.report-link:hover {
  color: var(--color-text-secondary);
}

/* ── Homepage SEO Content Block ──────────────────────────────────── */

.seo-content {
  max-width: 640px;
  margin: var(--space-8) auto var(--space-4);
  padding: var(--space-6) var(--space-4);
  border-top: 1px solid var(--color-border);
}

.seo-content__heading {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
}

.seo-content__text {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

.seo-content__text:last-child {
  margin-bottom: 0;
}

.seo-content__text a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.seo-content__text a:hover {
  color: var(--color-primary-hover);
}

/* ── Type Page Explainer ─────────────────────────────────────────── */

.tp__explainer {
  max-width: 640px;
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.tp__explainer-heading {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

.tp__explainer-body p {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

.tp__explainer-cta {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  margin-top: var(--space-4);
}

.tp__explainer-cta a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tp__explainer-cta a:hover {
  color: var(--color-primary-hover);
}

/* ── Category page: event card types + related categories ──────── */

.cdb__event-card-types {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.cdb__event-card-type-link {
  flex-shrink: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  border-radius: 4px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  text-decoration: none;
}

.cdb__event-card-type-link:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.tp__related {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.tp__related-heading {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-3);
}

.tp__related-links {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.tp__related-link {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: var(--transition-fast);
}

.tp__related-link:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-light);
}

/* ── FAQ Components (shared between type pages and FAQ page) ───── */

.tp__faq {
  margin-top: var(--space-5);
}

.tp__faq-item,
.faq__item {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: var(--space-2);
  overflow: hidden;
}

.tp__faq-question,
.faq__question {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  cursor: pointer;
  list-style: none;
}

.tp__faq-question::-webkit-details-marker,
.faq__question::-webkit-details-marker {
  display: none;
}

.tp__faq-question::marker,
.faq__question::marker {
  content: "";
}

.tp__faq-answer,
.faq__answer {
  padding: 0 var(--space-4) var(--space-4);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.faq__answer a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.faq__answer a:hover {
  color: var(--color-primary-hover);
}

/* ── FAQ Page ────────────────────────────────────────────────────── */

.content-page {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4) var(--space-12);
}

.faq {
  margin-top: var(--space-4);
}

.faq__heading {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.faq__intro {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

.faq__section {
  margin-bottom: var(--space-6);
}

.faq__section-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
}

.faq__footer {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.faq__footer p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.faq__footer a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.faq__footer a:hover {
  color: var(--color-primary-hover);
}

/* ── Guide Page ──────────────────────────────────────────────────── */

.guide {
  margin-top: var(--space-4);
}

.guide__header {
  margin-bottom: var(--space-6);
}

.guide__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.guide__subtitle {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.guide__toc {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-8);
}

.guide__toc-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.guide__toc-list {
  list-style: decimal;
  padding-left: var(--space-5);
  margin: 0;
}

.guide__toc-list li {
  font-size: var(--text-sm);
  line-height: 1.8;
}

.guide__toc-list a {
  color: var(--color-primary);
  text-decoration: none;
}

.guide__toc-list a:hover {
  text-decoration: underline;
}

.guide__section {
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.guide__section:last-of-type {
  border-bottom: none;
}

.guide__section h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
}

.guide__section h3 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
}

.guide__section h3 a {
  color: var(--color-primary);
  text-decoration: none;
}

.guide__section h3 a:hover {
  text-decoration: underline;
}

.guide__section p {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

.guide__list {
  list-style: disc;
  padding-left: var(--space-5);
  margin-bottom: var(--space-4);
}

.guide__list li {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.guide__tips {
  list-style: decimal;
  padding-left: var(--space-5);
  margin-bottom: var(--space-4);
}

.guide__tips li {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

.guide__format,
.guide__club {
  margin-bottom: var(--space-4);
}

.guide__pricing {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.guide__price-item {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-3) var(--space-4);
}

.guide__price-item h3 {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-1);
}

.guide__price-item p {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0;
}

.guide__cta {
  margin-top: var(--space-4);
}

.guide__cta-link {
  display: inline-block;
  padding: var(--space-3) var(--space-5);
  background: var(--color-primary);
  color: var(--color-text-inverse, #fff);
  border-radius: 8px;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  transition: background var(--transition-fast);
}

.guide__cta-link:hover {
  background: var(--color-primary-hover);
}

.guide__footer {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.guide__footer p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.guide__footer a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.guide__footer a:hover {
  color: var(--color-primary-hover);
}

/* ==========================================================================
   Club page – guide CTA card
   ========================================================================== */

.cdb__guide-cta {
  padding: var(--space-4);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
  text-align: center;
}

.cdb__guide-cta-text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
  line-height: 1.5;
}

.cdb__guide-cta-link {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold, 600);
  color: var(--color-primary);
  text-decoration: none;
}

.cdb__guide-cta-link:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

/* Club about section links */

.cdb__about-text a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cdb__about-text a:hover {
  color: var(--color-primary-hover);
}

/* ==========================================================================
   Area landing pages
   ========================================================================== */

.area__header {
  margin-bottom: var(--space-4);
}

.area__title {
  font-size: var(--text-2xl, 1.75rem);
  font-weight: var(--weight-semibold, 600);
  color: var(--color-text-primary);
  line-height: 1.2;
}

.area__intro {
  margin-bottom: var(--space-8);
}

.area__intro-text {
  font-size: var(--text-base, 1rem);
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-3);
}

.area__section-title {
  font-size: var(--text-lg, 1.125rem);
  font-weight: var(--weight-semibold, 600);
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

/* Club cards grid */

.area__clubs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

@media (width >= 640px) {
  .area__clubs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (width >= 960px) {
  .area__clubs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.area__club-card {
  display: block;
  padding: var(--space-4);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
  text-decoration: none;
  transition: border-color var(--transition-fast, 0.15s);
}

.area__club-card:hover {
  border-color: var(--color-primary);
}

.area__club-name {
  font-size: var(--text-base, 1rem);
  font-weight: var(--weight-semibold, 600);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.area__club-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.area__club-pill {
  display: inline-block;
  font-size: var(--text-xs, 0.75rem);
  color: var(--color-text-tertiary, var(--color-text-secondary));
  background: var(--color-bg-page);
  border-radius: var(--radius-md, 8px);
  padding: 2px var(--space-2);
}

/* Event cards grid */

.area__events {
  margin-top: var(--space-8);
  margin-bottom: var(--space-8);
}

.area__events-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

@media (width >= 640px) {
  .area__events-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.area__event-card {
  display: block;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
  text-decoration: none;
  transition: border-color var(--transition-fast, 0.15s);
}

.area__event-card:hover {
  border-color: var(--color-primary);
}

.area__event-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.area__event-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold, 600);
  color: var(--color-text-primary);
}

.area__event-type {
  font-size: var(--text-xs, 0.75rem);
  color: var(--color-primary);
  white-space: nowrap;
}

.area__event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--text-xs, 0.75rem);
  color: var(--color-text-secondary);
}

/* View all + transport + related */

.area__view-all {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold, 600);
  color: var(--color-primary);
  text-decoration: none;
}

.area__view-all:hover {
  text-decoration: underline;
}

.area__transport {
  margin-bottom: var(--space-8);
}

.area__transport-text {
  font-size: var(--text-base, 1rem);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.area__related {
  margin-bottom: var(--space-8);
}

.area__related-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.area__related-link {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  text-decoration: none;
  transition: border-color var(--transition-fast, 0.15s);
}

.area__related-link:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.area__guide-cta {
  padding: var(--space-4);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
  text-align: center;
  margin-bottom: var(--space-8);
}

.area__guide-cta p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.area__guide-cta a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.area__guide-cta a:hover {
  color: var(--color-primary-hover);
}
