/* ============================================================
   FAIRWAY OPEN — THE GOLF COMMUNITY
   Design system: Fairway luxury meets social openness
   ============================================================ */

:root {
  --green-deep:   #0F2118;
  --green-mid:    #1C3A2A;
  --green-light:  #4A7A5C;
  --green-pale:   #E8F0EB;
  --gold:         #B8952A;
  --gold-light:   #D4B84A;
  --gold-dim:     rgba(184,149,42,0.12);
  --cream:        #F5F0E8;
  --cream-dark:   #EDE6D6;
  --white:        #FFFEFB;
  --text-primary: #1C3A2A;
  --text-secondary:#6A7770;
  --text-muted:   #8B9990;
  --text-light:   #8BAF8F;
  --border:       rgba(184,149,42,0.2);
  --border-soft:  rgba(28,58,42,0.08);
  --red:          #c0392b;
  --red-light:    #fdf0ef;
  --blue:         #2980b9;
  --blue-light:   #eef5fb;
  --orange:       #e67e22;
  --radius:       0px;
  --radius-sm:    0px;
  --radius-lg:    0px;
  --shadow-sm:    0 2px 12px rgba(0,0,0,0.06);
  --shadow-md:    0 4px 24px rgba(0,0,0,0.10);
  --shadow-lg:    0 8px 40px rgba(0,0,0,0.14);
  --nav-height:   56px;
  --tab-height:   68px;
  --safe-top:     env(safe-area-inset-top, 0px);
  --safe-bottom:  env(safe-area-inset-bottom, 0px);
}

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

button, input, select, textarea, label {
  font-family: 'DM Sans', sans-serif;
}

/* ── Prevent iOS keyboard zoom ─────────────────────────────── */
input, select, textarea {
  font-size: 16px !important;
  touch-action: manipulation;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation;
}

html, body {
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}

/* ─── SCREENS ─────────────────────────────────────────────── */
.screen {
  display: none;
  flex-direction: column;
  height: 100dvh;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: var(--cream);
}
.screen.active { display: flex; }

.screen-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 20px 100px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.screen-body::-webkit-scrollbar { display: none; }

/* ─── AUTH ─────────────────────────────────────────────────── */
#screen-auth {
  max-width: none;
  background: var(--green-deep);
}
.auth-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(180deg, rgba(15,33,24,0.82) 0%, rgba(15,33,24,0.95) 100%),
    url('https://images.unsplash.com/photo-1587174486073-ae5e5cff23aa?w=800&q=80') center/cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  z-index: 100;
}

.auth-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(184,149,42,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.auth-content {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.auth-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 12px;
}

.auth-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 44px;
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.04em;
  line-height: 1;
}

.auth-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 400;
  font-style: italic;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 28px;
  max-width: 280px;
}

.auth-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(184,149,42,0.25);
  border-radius: var(--radius);
  padding: 28px 24px;
  width: 100%;
  backdrop-filter: blur(16px);
}

.auth-card h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 4px;
}

.auth-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
}

.auth-error {
  font-size: 13px;
  color: #ff6b6b;
  margin: 0 0 12px;
  min-height: 0;
}

.auth-error:empty {
  display: none;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(184,149,42,0.2);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: rgba(255,255,255,0.3); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--gold); }

.form-row {
  display: flex;
  gap: 12px;
}
.form-row .form-group { flex: 1; min-width: 0; }

/* Autocomplete dropdown */
.autocomplete-dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 100;
  background: var(--card, #fff);
  border: 1px solid var(--border-soft);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  -webkit-overflow-scrolling: touch;
}
.autocomplete-dropdown.show { display: block; }
.autocomplete-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.1s;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:active { background: rgba(0,0,0,0.04); }
.autocomplete-item.empty {
  color: var(--text-muted);
  font-size: 13px;
  cursor: default;
}
.autocomplete-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, var(--text-primary));
}
.autocomplete-item-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.auth-link {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  text-align: center;
  margin-top: 16px;
}
.auth-link a { color: var(--gold-light); text-decoration: none; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.12);
}
.auth-divider span {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.btn-social {
  width: 100%;
  padding: 13px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.btn-social:active { background: rgba(255,255,255,0.08); }

/* ─── BUTTONS ──────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--gold);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary:active { background: var(--gold-light); transform: scale(0.98); }

.btn-outline {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-outline:active { background: var(--gold-dim); }

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-sm.gold { background: var(--gold); color: var(--white); }
.btn-sm.gold:active { background: var(--gold-light); }
.btn-sm.outline { background: transparent; color: var(--gold); border: 1px solid var(--border); }
.btn-sm.green { background: var(--green-mid); color: var(--white); }

.btn-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-icon:active { background: var(--cream); }

.btn-follow {
  padding: 8px 20px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
.btn-follow.following {
  background: var(--green-pale);
  color: var(--green-mid);
}
.btn-follow.not-following {
  background: var(--gold);
  color: var(--white);
}

/* ─── TOP NAV ─────────────────────────────────────────────── */
.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  min-height: calc(var(--nav-height) + var(--safe-top));
  padding-top: var(--safe-top);
  background: var(--cream);
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
  z-index: 10;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--green-deep);
  letter-spacing: 0.02em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-bell {
  position: relative;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
}
.bell-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--cream);
}

.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--gold);
  cursor: pointer;
}
.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── SCREEN HEADER ───────────────────────────────────────── */
.screen-header {
  display: flex;
  align-items: center;
  padding: 0 20px;
  min-height: calc(var(--nav-height) + var(--safe-top));
  padding-top: var(--safe-top);
  background: var(--cream);
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
  gap: 14px;
}

.screen-header .back-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  margin-left: -6px;
}

.screen-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 500;
  flex: 1;
}

.screen-header .header-actions {
  display: flex;
  gap: 6px;
}

/* ─── BOTTOM TAB BAR ──────────────────────────────────────── */
.tab-bar {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  min-height: var(--tab-height);
  padding-bottom: var(--safe-bottom);
  background: var(--white);
  border-top: 1px solid var(--border-soft);
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  z-index: 100;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
  padding: 0;
}
.tab-item.active { color: var(--gold); }
.tab-item svg { width: 22px; height: 22px; }
.tab-item span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tab-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 18px);
  min-width: 16px;
  height: 16px;
  background: var(--red);
  color: var(--white);
  font-size: 9px;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ─── SECTION TITLES ──────────────────────────────────────── */
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 24px 0 12px;
}
.section-title:first-child { margin-top: 8px; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 12px;
}
.section-header:first-child { margin-top: 8px; }
.section-header h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 500;
}
.section-header a {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.02em;
}

/* ─── GREETING ────────────────────────────────────────────── */
.greeting-section {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.greeting-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.greeting-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 4px;
}
.handicap-badge {
  text-align: center;
  padding: 8px 14px;
  background: var(--green-deep);
  border: 1px solid rgba(184,149,42,0.25);
  flex-shrink: 0;
}
.handicap-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--gold);
}
.handicap-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--white);
}

/* ─── STORY-STYLE ACTIVE GOLFERS ──────────────────────────── */
.stories-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: none;
}
.stories-row::-webkit-scrollbar { display: none; }

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.story-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.story-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.story-avatar.live { border-color: var(--green-light); }
.story-name {
  font-size: 11px;
  color: var(--text-secondary);
  max-width: 64px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── FEED POSTS ──────────────────────────────────────────── */
.post-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}

.post-header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 12px;
}
.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.post-user-info { flex: 1; }
.post-username {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.post-meta {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.post-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}
.post-more {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
}

.post-body {
  padding: 0 16px 12px;
}
.post-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.post-text .hashtag { color: var(--gold); font-weight: 500; }
.post-text .mention { color: var(--green-light); font-weight: 500; }

.post-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.post-round-card {
  margin: 0 16px 12px;
  padding: 14px;
  background: var(--green-deep);
  border: 1px solid rgba(184,149,42,0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.prc-course {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
}
.prc-details {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}
.prc-score {
  text-align: center;
}
.prc-score-val {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 500;
  color: var(--gold);
  line-height: 1;
}
.prc-score-label {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.post-actions {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid var(--border-soft);
  gap: 20px;
}
.post-action {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
  padding: 0;
}
.post-action:active { color: var(--gold); }
.post-action.liked { color: var(--red); }
.post-action.liked svg { fill: var(--red); }
.post-action svg { width: 20px; height: 20px; }

/* ─── COMMENTS ───────────────────────────────────────────── */
.post-comments-section {
  border-top: 1px solid var(--border-soft);
}
.comments-list {
  padding: 8px 16px 0;
  max-height: 240px;
  overflow-y: auto;
}
.comment-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
}
.comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.comment-body {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-primary);
}
.comment-name {
  font-weight: 600;
}
.comment-text {
  color: var(--text-primary);
}
.comment-meta {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.comment-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border-soft);
}
.comment-input {
  flex: 1;
  border: 1px solid var(--border-soft);
  background: var(--cream);
  color: var(--text-primary);
  padding: 8px 12px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
}
.comment-input:focus {
  border-color: var(--gold);
}
.comment-send {
  background: none;
  border: none;
  color: var(--gold);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  padding: 0 4px;
}

/* ─── SEARCH BAR ──────────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--border-soft);
  padding: 10px 14px;
  margin-bottom: 16px;
}
.search-bar svg { flex-shrink: 0; color: var(--text-muted); }
.search-bar input {
  flex: 1;
  border: none;
  background: none;
  font-size: 16px;
  color: var(--text-primary);
  outline: none;
}
.search-bar input::placeholder { color: var(--text-muted); }

/* ─── COUNTY FILTER ──────────────────────────────────────── */
.county-filter-row {
  margin-bottom: 12px;
}
.county-filter-row select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-soft);
  background: var(--white);
  color: var(--text-primary);
  font-size: 16px;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  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='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.county-filter-row select:focus {
  outline: none;
  border-color: var(--green-primary);
}
.golfer-tag.county-tag {
  background: var(--green-light);
  color: var(--green-primary);
}

/* ─── FILTER CHIPS ────────────────────────────────────────── */
.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 16px;
  scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }

.filter-chip {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border-soft);
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  border-radius: var(--radius-sm);
}
.filter-chip.active {
  background: var(--green-deep);
  color: var(--white);
  border-color: var(--green-deep);
}
.filter-chip:active { transform: scale(0.96); }
.filter-chip.small {
  padding: 5px 12px;
  font-size: 11px;
}

/* ─── GOLFER CARDS (Find Golfers) ─────────────────────────── */
.golfer-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--border-soft);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.golfer-card:active { background: var(--cream); }

.golfer-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.golfer-info { flex: 1; min-width: 0; }
.golfer-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.golfer-detail {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.golfer-detail .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}
.golfer-tags {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.golfer-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  background: var(--gold-dim);
  color: var(--gold);
  letter-spacing: 0.03em;
}

.golfer-hcp {
  text-align: center;
  flex-shrink: 0;
}
.golfer-hcp-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.golfer-hcp-val {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--green-deep);
}

/* ─── PROFILE ─────────────────────────────────────────────── */
.profile-hero {
  text-align: center;
  padding: 20px 20px 0;
}
.profile-avatar-lg {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  object-fit: cover;
  margin-bottom: 12px;
}
.profile-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 2px;
}
.profile-handle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.profile-bio {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
  max-width: 300px;
  margin: 0 auto 16px;
}
.profile-location {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 16px;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 16px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 16px;
}
.profile-stat {
  text-align: center;
  cursor: pointer;
}
.profile-stat-val {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--text-primary);
}
.profile-stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.profile-actions {
  display: flex;
  gap: 10px;
  padding: 0 20px 16px;
}
.profile-actions .btn-follow { flex: 1; padding: 10px; font-size: 13px; }
.profile-actions .btn-icon { width: 42px; height: 42px; }

.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-soft);
}
.profile-tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  letter-spacing: 0.03em;
}
.profile-tab.active {
  color: var(--gold);
}
.profile-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--gold);
}

/* ─── GROUPS ──────────────────────────────────────────────── */
.group-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  margin-bottom: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}
.group-card:active { background: var(--cream); }

.group-cover {
  width: 100%;
  height: 100px;
  object-fit: cover;
}
.group-body {
  padding: 14px 16px;
}
.group-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 4px;
}
.group-meta {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.group-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.group-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--border-soft);
}
.group-members-row {
  display: flex;
  align-items: center;
}
.group-members-row img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--white);
  margin-left: -8px;
  object-fit: cover;
}
.group-members-row img:first-child { margin-left: 0; }
.group-member-count {
  font-size: 12px;
  color: var(--text-secondary);
  margin-left: 8px;
}

/* ─── MESSAGES ────────────────────────────────────────────── */
.chat-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
}
.chat-list-item:last-child { border-bottom: none; }

.chat-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  position: relative;
}

.chat-info { flex: 1; min-width: 0; }
.chat-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.chat-preview {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-preview.unread { color: var(--text-primary); font-weight: 500; }

.chat-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.chat-time {
  font-size: 11px;
  color: var(--text-muted);
}
.chat-unread-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
}

/* Chat thread */
.chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 100px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: none;
}
.chat-thread::-webkit-scrollbar { display: none; }

.chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.45;
}
.chat-bubble.sent {
  align-self: flex-end;
  background: var(--green-deep);
  color: var(--white);
}
.chat-bubble.received {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
}
.chat-bubble-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}
.chat-bubble.sent .chat-bubble-time { color: rgba(255,255,255,0.5); text-align: right; }

.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  padding-bottom: calc(12px + var(--safe-bottom));
  background: var(--white);
  border-top: 1px solid var(--border-soft);
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  z-index: 100;
}
.chat-input-bar input {
  flex: 1;
  padding: 10px 14px;
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: 16px;
  color: var(--text-primary);
  outline: none;
}
.chat-input-bar input::placeholder { color: var(--text-muted); }
.chat-send-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--white);
}

/* ─── COURSE CARDS ────────────────────────────────────────── */
.course-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  margin-bottom: 12px;
  overflow: hidden;
  cursor: pointer;
}
.course-card:active { background: var(--cream); }
.course-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.course-body {
  padding: 14px 16px;
}
.course-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 4px;
}
.course-location {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}
.course-stats-row {
  display: flex;
  gap: 16px;
}
.course-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}
.course-stat svg { width: 14px; height: 14px; }
.course-rating {
  color: var(--gold);
  font-weight: 600;
}

/* ─── EVENTS ──────────────────────────────────────────────── */
.event-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  margin-bottom: 12px;
  overflow: hidden;
  cursor: pointer;
}
.event-card:active { background: var(--cream); }
.event-header-row {
  display: flex;
  gap: 14px;
  padding: 16px;
}
.event-date-badge {
  width: 50px;
  height: 54px;
  background: var(--green-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.event-date-month {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-transform: uppercase;
}
.event-date-day {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--white);
  line-height: 1;
}
.event-info { flex: 1; }
.event-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.event-detail {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.event-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--border-soft);
}
.event-spots {
  font-size: 12px;
  color: var(--text-secondary);
}
.event-spots strong { color: var(--text-primary); }

/* ─── IMPROVEMENT HUB ─────────────────────────────────────── */
.tip-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  margin-bottom: 12px;
  overflow: hidden;
  cursor: pointer;
}
.tip-card:active { background: var(--cream); }
.tip-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--green-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tip-play-btn {
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
.tip-body {
  padding: 14px 16px;
}
.tip-category {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}
.tip-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.tip-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.tip-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.tip-detail-hero {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  margin-bottom: 16px;
}
.tip-detail-category {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.tip-detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}
.tip-detail-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
}
.tip-detail-body p {
  margin-bottom: 14px;
}
.tip-detail-body strong {
  font-weight: 600;
  color: var(--green-deep);
}

/* ─── ROUND TRACKER ───────────────────────────────────────── */
.round-summary-card {
  background: var(--green-deep);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid rgba(184,149,42,0.2);
}
.rsc-course {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 4px;
}
.rsc-date {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}
.rsc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.rsc-stat {
  text-align: center;
}
.rsc-stat-val {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--gold);
}
.rsc-stat-label {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rsc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.rsc-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.btn-icon-sm {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.btn-icon-sm:active { background: rgba(255,255,255,0.2); }
.btn-icon-sm.danger { color: #e57373; }
.btn-icon-sm.danger:active { background: rgba(229,115,115,0.15); }
.rsc-notes {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.4;
}

/* ─── SCORECARD GRID ──────────────────────────────────────── */
.scorecard-grid {
  background: var(--white);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  margin-bottom: 16px;
}
.sg-row {
  display: grid;
  grid-template-columns: 40px repeat(9, 1fr) 44px;
}
.sg-row.header {
  background: var(--green-deep);
}
.sg-cell {
  padding: 8px 4px;
  text-align: center;
  font-size: 12px;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.sg-row.header .sg-cell {
  color: rgba(255,255,255,0.6);
  font-weight: 600;
  font-size: 10px;
  border-color: rgba(255,255,255,0.1);
}
.sg-cell.par-row { font-weight: 500; color: var(--text-secondary); font-size: 11px; }
.sg-cell.score { font-weight: 700; }
.sg-cell.birdie { color: var(--red); }
.sg-cell.bogey { color: var(--blue); }
.sg-cell.eagle { color: var(--gold); }
.sg-cell.total {
  font-weight: 700;
  background: var(--cream);
}

/* ─── NOTIFICATIONS ───────────────────────────────────────── */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}
.notif-item:last-child { border-bottom: none; }
.notif-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.notif-content { flex: 1; }
.notif-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.45;
}
.notif-text strong { font-weight: 600; }
.notif-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  margin-top: 4px;
}

/* ─── SETTINGS ────────────────────────────────────────────── */
.settings-group {
  margin-bottom: 24px;
}
.settings-group-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.settings-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--border-soft);
  margin-bottom: -1px;
  cursor: pointer;
}
.settings-item:first-of-type { border-radius: var(--radius) var(--radius) 0 0; }
.settings-item:last-of-type { border-radius: 0 0 var(--radius) var(--radius); }
.settings-item svg { width: 20px; height: 20px; color: var(--text-secondary); flex-shrink: 0; }
.settings-item span { flex: 1; font-size: 14px; }
.settings-item .chevron { width: 16px; height: 16px; color: var(--text-muted); }

.settings-toggle {
  position: relative;
  width: 46px;
  height: 26px;
  background: var(--cream-dark);
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  flex-shrink: 0;
}
.settings-toggle.on { background: var(--gold); }
.settings-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: var(--white);
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.settings-toggle.on::after { transform: translateX(20px); }

/* ─── LEGAL CONTENT ──────────────────────────────────────── */
.legal-content {
  padding: 4px 0 32px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
}
.legal-content .legal-updated {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}
.legal-content h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 24px 0 8px;
}
.legal-content h3:first-of-type { margin-top: 0; }
.legal-content p { margin-bottom: 10px; }
.legal-content strong { color: var(--text-primary); }
.legal-content ul {
  margin: 0 0 10px 0;
  padding-left: 20px;
}
.legal-content li {
  margin-bottom: 6px;
}

/* ─── DELETE CONFIRM MODAL ───────────────────────────────── */
.delete-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.delete-confirm-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.delete-confirm-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.delete-confirm-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}
.delete-confirm-card .form-group { margin-bottom: 16px; }
.delete-confirm-card .form-group label {
  font-size: 12px;
  color: var(--text-muted);
}
.delete-confirm-card .btn-row {
  display: flex;
  gap: 10px;
}
.delete-confirm-card .btn-row button { flex: 1; }
.btn-danger {
  background: #a63d2f;
  color: #fff;
  border: none;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
}

/* ─── EMPTY STATES ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}
.empty-state svg { color: var(--text-muted); margin-bottom: 16px; }
.empty-state h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 260px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ─── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,33,24,0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.active { display: flex; }

.modal-sheet {
  width: 100%;
  max-width: 430px;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  padding-bottom: calc(24px + var(--safe-bottom));
  max-height: 85dvh;
  overflow-y: auto;
}
.modal-sheet .modal-handle {
  width: 36px;
  height: 4px;
  background: var(--cream-dark);
  border-radius: 2px;
  margin: 0 auto 20px;
}

/* ─── COMPOSE FAB ─────────────────────────────────────────── */
.fab {
  position: fixed;
  bottom: calc(var(--tab-height) + 16px);
  right: calc(50% - 215px + 20px);
  width: 52px;
  height: 52px;
  background: var(--gold);
  border: none;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 50;
  box-shadow: var(--shadow-md);
  color: var(--white);
  transition: all 0.2s;
}
.fab:active { transform: scale(0.92); }

/* ─── ONBOARDING ──────────────────────────────────────────── */
.onboard-step {
  display: none;
  flex-direction: column;
  padding: 32px 24px;
  height: 100%;
}
.onboard-step.active { display: flex; }
.onboard-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 32px;
}
.onboard-dot {
  flex: 1;
  height: 3px;
  background: var(--cream-dark);
  transition: background 0.3s;
}
.onboard-dot.done { background: var(--gold); }

.onboard-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 8px;
}
.onboard-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 28px;
}

.onboard-form .form-group label {
  color: var(--gold);
}
.onboard-form .form-group input,
.onboard-form .form-group select,
.onboard-form .form-group textarea {
  background: var(--white);
  color: var(--text-primary);
  border-color: var(--border-soft);
}
.onboard-form .form-group input::placeholder,
.onboard-form .form-group textarea::placeholder {
  color: var(--text-muted);
}
.onboard-form .form-group input:focus,
.onboard-form .form-group select:focus,
.onboard-form .form-group textarea:focus {
  border-color: var(--gold);
}

.onboard-interests {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.interest-chip {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border-soft);
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.interest-chip.selected {
  background: var(--green-deep);
  color: var(--white);
  border-color: var(--green-deep);
}

.onboard-footer {
  margin-top: auto;
  display: flex;
  gap: 12px;
}
.onboard-footer .btn-primary { flex: 1; }
.onboard-footer .btn-outline { flex: 0 0 auto; padding: 14px 24px; }

/* ─── INLINE FORM ─────────────────────────────────────────── */
.inline-form .form-group label {
  color: var(--gold);
}
.inline-form .form-group input,
.inline-form .form-group select,
.inline-form .form-group textarea {
  background: var(--white);
  color: var(--text-primary);
  border: 1px solid var(--border-soft);
}
.inline-form .form-group input::placeholder,
.inline-form .form-group textarea::placeholder {
  color: var(--text-muted);
}
.inline-form .form-group input:focus,
.inline-form .form-group select:focus,
.inline-form .form-group textarea:focus {
  border-color: var(--gold);
}

/* ─── LEADERBOARD TABLE ───────────────────────────────────── */
.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--border-soft);
  margin-bottom: -1px;
}
.lb-rank {
  width: 28px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
}
.lb-rank.top { color: var(--gold); }
.lb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.lb-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}
.lb-score {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--green-deep);
}
.lb-hcp {
  font-size: 12px;
  color: var(--text-secondary);
  width: 40px;
  text-align: right;
}

/* ─── STAT CARDS ──────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  padding: 16px;
  text-align: center;
}
.stat-card-val {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 500;
  color: var(--green-deep);
}
.stat-card-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 2px;
}
.stat-card-trend {
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
}
.stat-card-trend.up { color: var(--green-light); }
.stat-card-trend.down { color: var(--red); }

/* ─── HORIZONTAL SCROLL CARDS ─────────────────────────────── */
.h-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 16px;
  scrollbar-width: none;
}
.h-scroll::-webkit-scrollbar { display: none; }

.h-card {
  flex-shrink: 0;
  width: 200px;
  background: var(--white);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  cursor: pointer;
}
.h-card:active { background: var(--cream); }
.h-card-img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}
.h-card-body {
  padding: 10px 12px;
}
.h-card-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}
.h-card-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

/* ─── COMPOSE POST ────────────────────────────────────────── */
.compose-area {
  padding: 16px 0;
}
.compose-textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--border-soft);
  background: var(--white);
  padding: 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--text-primary);
  resize: none;
  outline: none;
}
.compose-textarea::placeholder { color: var(--text-muted); }
.compose-textarea:focus { border-color: var(--gold); }

.compose-tools {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.compose-tool {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--border-soft);
  cursor: pointer;
  color: var(--text-secondary);
}
.compose-tool:active { background: var(--cream); }

/* ─── POST LOCATION & TAGS ───────────────────────────────── */
.post-location-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--green-light);
  font-size: 12px;
  margin-left: 6px;
}
.post-tagged {
  font-size: 13px;
  color: var(--blue);
  margin-bottom: 4px;
}
.compose-search-item:hover {
  background: var(--cream) !important;
}

/* ─── DESKTOP SIDEBAR ─────────────────────────────────────── */
@media (min-width: 768px) {
  body {
    display: flex;
    overflow: hidden;
  }

  #desktop-sidebar {
    display: flex !important;
    flex-direction: column;
    width: 260px;
    height: 100dvh;
    background: var(--green-deep);
    border-right: 1px solid rgba(184,149,42,0.15);
    flex-shrink: 0;
    overflow-y: auto;
    scrollbar-width: none;
  }
  #desktop-sidebar::-webkit-scrollbar { display: none; }

  .ds-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px 20px;
  }
  .ds-brand-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 500;
    color: var(--white);
  }
  .ds-brand-sub {
    display: block;
    font-size: 10px;
    color: var(--gold);
    letter-spacing: 0.15em;
    text-transform: uppercase;
  }

  .ds-nav {
    flex: 1;
    padding: 0 12px;
  }
  .ds-nav-section {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    padding: 16px 12px 8px;
  }
  .ds-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
  }
  .ds-nav-item:hover { color: var(--white); background: rgba(255,255,255,0.05); }
  .ds-nav-item.active { color: var(--gold); background: rgba(184,149,42,0.1); }

  .ds-member {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
  }
  .ds-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
  }
  .ds-member-name {
    font-size: 13px;
    color: var(--white);
    font-weight: 500;
  }
  .ds-member-meta {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
  }

  .screen { max-width: 600px; }
  .tab-bar { max-width: 600px; }
  .chat-input-bar { max-width: 600px; }
  .fab { right: calc(50% - 300px + 20px); }
}

@media (max-width: 767px) {
  #desktop-sidebar { display: none !important; }
}

/* ─── UTILITIES ───────────────────────────────────────────── */
.hidden { display: none !important; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-secondary); }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

/* ─── FOURBALLS WIDGET (Feed) ──────────────────────────────── */
.fb-widget {
  background: var(--white);
  border: 1px solid var(--border-soft);
  margin-bottom: 18px;
  cursor: pointer;
  transition: all 0.2s;
}
.fb-widget:active { background: var(--cream); }
.fb-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.fb-widget-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 500;
}
.fb-widget-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-dim);
  padding: 3px 10px;
  letter-spacing: 0.02em;
}
.fb-widget-game {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.fb-widget-game:last-child { border-bottom: none; }
.fb-widget-date {
  width: 40px;
  text-align: center;
  flex-shrink: 0;
}
.fb-widget-day {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
}
.fb-widget-num {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  color: var(--text-primary);
}
.fb-widget-info { flex: 1; min-width: 0; }
.fb-widget-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.fb-widget-status {
  display: block;
  font-size: 11px;
  color: var(--gold);
  font-weight: 500;
}
.fb-widget-status.confirmed { color: var(--green-light); }

/* ─── FOURBALL REQUEST CARDS ──────────────────────────────── */
.fb-request-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  margin-bottom: 14px;
  overflow: hidden;
}
.fb-request-card.confirmed { border-left: 3px solid var(--green-light); }
.fb-request-card.past { opacity: 0.7; }

.fb-req-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.fb-req-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
}
.fb-req-badge.invite { background: var(--gold-dim); color: var(--gold); }
.fb-req-badge.confirmed { background: var(--green-pale); color: var(--green-mid); }
.fb-req-badge.past { background: var(--cream-dark); color: var(--text-muted); }
.fb-req-time {
  font-size: 11px;
  color: var(--text-muted);
}

.fb-req-body { padding: 14px 16px; }
.fb-req-info { margin-bottom: 14px; }
.fb-req-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
}
.fb-req-detail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.fb-req-detail svg { flex-shrink: 0; color: var(--text-muted); }

.fb-req-players {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fb-req-player {
  display: flex;
  align-items: center;
  gap: 10px;
}
.fb-req-player img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.fb-req-player-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.fb-req-player-hcp {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
}
.fb-req-player.empty-slot { opacity: 0.5; }
.fb-req-empty-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px dashed var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fb-req-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-soft);
}

/* ─── MATCHMAKING CTA ─────────────────────────────────────── */
.mm-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--green-deep);
  border: 1px solid rgba(184,149,42,0.25);
  margin-bottom: 18px;
  cursor: pointer;
  transition: all 0.2s;
}
.mm-cta:active { opacity: 0.9; }
.mm-cta svg { color: var(--gold); }
.mm-cta-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}
.mm-cta-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(184,149,42,0.12);
  flex-shrink: 0;
}
.mm-cta-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 2px;
}
.mm-cta-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  line-height: 1.3;
}

/* ─── MATCHMAKING ─────────────────────────────────────────── */
#screen-matchmaking {
  display: none;
  flex-direction: column;
}
#screen-matchmaking.active { display: flex; }
#screen-matchmaking .screen-body { padding-bottom: 20px; }
.mm-hero {
  text-align: center;
  padding: 16px 0 28px;
}
.mm-hero svg { margin-bottom: 12px; }
.mm-hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 8px;
}
.mm-hero-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 300px;
  margin: 0 auto;
}

.mm-group-size {
  display: flex;
  gap: 8px;
}
.mm-size-btn {
  flex: 1;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border-soft);
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  border-radius: var(--radius-sm);
}
.mm-size-btn.active {
  background: var(--green-deep);
  color: var(--white);
  border-color: var(--green-deep);
}

.mm-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.mm-results-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 500;
}
.mm-results-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.mm-match-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  margin-bottom: 14px;
  padding: 16px;
  position: relative;
}
.mm-match-card.best {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.mm-match-badge {
  position: absolute;
  top: -1px;
  right: 16px;
  background: var(--gold);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
}

.mm-match-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.mm-score-ring {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  margin-left: auto;
}
.mm-score-val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--gold);
}

.mm-match-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.mm-detail-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mm-detail-label {
  width: 80px;
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.mm-detail-bar {
  flex: 1;
  height: 4px;
  background: var(--cream-dark);
  overflow: hidden;
}
.mm-bar-fill {
  height: 100%;
  background: var(--gold);
  transition: width 0.6s ease;
}
.mm-detail-val {
  width: 70px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
  flex-shrink: 0;
}

.mm-match-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Fourball Builder — pinned to bottom of matchmaking screen */
.mm-fourball-builder {
  background: var(--green-deep);
  padding: 16px 20px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(184,149,42,0.25);
  flex-shrink: 0;
}
.mm-fourball-builder.hidden { display: none; }
.mm-fb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.mm-fb-header h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--white);
}
.mm-fb-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
}

.mm-fb-slots {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.mm-fb-slot {
  flex: 1;
  height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(184,149,42,0.2);
}
.mm-fb-slot.filled {
  background: rgba(184,149,42,0.1);
}
.mm-fb-slot.filled img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}
.mm-fb-slot.filled span {
  font-size: 10px;
  color: var(--gold);
  font-weight: 600;
}
.mm-fb-slot.empty {
  background: rgba(255,255,255,0.04);
  cursor: pointer;
}
.mm-fb-slot.empty svg {
  color: rgba(255,255,255,0.3);
}
.mm-fb-slot.empty span {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
}

.mm-fourball-builder .btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ─── MEDIA / IMAGE UPLOAD ───────────────────────────────── */
.chat-attach-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.chat-attach-btn:active { background: var(--cream); }

.chat-media-preview {
  display: none;
  padding: 12px 20px;
  background: var(--white);
  border-top: 1px solid var(--border-soft);
  position: fixed;
  bottom: 58px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  z-index: 99;
}
.chat-media-preview.active { display: flex; gap: 10px; flex-wrap: wrap; }
.media-thumb {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: var(--cream);
}
.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}
.media-thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(0,0,0,0.6);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  cursor: pointer;
  padding: 0;
}
.media-thumb-uploading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.compose-media-preview {
  display: none;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0;
}
.compose-media-preview.active { display: flex; }

.chat-bubble img.chat-image {
  max-width: 220px;
  max-height: 200px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  cursor: pointer;
  display: block;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox.active { display: flex; }
.lightbox-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 32px;
  cursor: pointer;
  z-index: 2001;
  line-height: 1;
}
.lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  cursor: default;
}

/* ─── PUSH BANNER ────────────────────────────────────────── */
.push-banner {
  position: fixed;
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: min(400px, calc(100% - 32px));
  background: var(--green-deep);
  border: 1px solid rgba(184,149,42,0.3);
  padding: 16px;
  z-index: 1000;
  transition: bottom 0.4s ease;
}
.push-banner.active {
  bottom: 80px;
}
.push-banner-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.push-banner-content svg { flex-shrink: 0; margin-top: 2px; }
.push-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.push-banner-text strong {
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
}
.push-banner-text span {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}
.push-banner-actions {
  display: flex;
  gap: 8px;
}
.push-banner-actions .btn-sm { flex: 1; }

/* ─── ANIMATIONS ──────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.3s ease; }

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.slide-up { animation: slideUp 0.3s ease; }

/* ── Content Moderation ─────────────────────────────────── */

.chat-bubble { position: relative; }
.chat-bubble-report {
  position: absolute;
  top: 4px;
  right: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  padding: 2px;
  border-radius: 4px;
}
.chat-bubble.sent .chat-bubble-report { right: auto; left: 4px; }
.chat-bubble:hover .chat-bubble-report { opacity: 0.5; }
.chat-bubble-report:hover { opacity: 1 !important; color: var(--gold); }

.chat-bubble.flagged {
  border: 1px dashed rgba(184, 149, 42, 0.4);
}

/* Report modal */
.report-modal-content,
.guidelines-modal-content {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  max-width: 420px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}
.report-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.report-modal-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.report-modal-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 16px;
}
.report-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.report-reason-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}
.report-reason-btn:hover { border-color: var(--gold); color: var(--gold); }
.report-reason-btn.active {
  background: rgba(184, 149, 42, 0.15);
  border-color: var(--gold);
  color: var(--gold);
  font-weight: 600;
}
.report-details {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--cream);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  resize: vertical;
  min-height: 60px;
}
.report-details::placeholder { color: var(--text-muted); }
.report-details:focus { outline: none; border-color: var(--gold); }
.report-note {
  font-size: 11px;
  color: var(--text-muted);
  margin: 12px 0 0;
  line-height: 1.5;
}

/* Profile dropdown */
.profile-actions { position: relative; }
.profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 4px;
  min-width: 180px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.16);
  display: none;
}
.profile-dropdown.active { display: block; }
.profile-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  cursor: pointer;
  border-radius: 8px;
  text-align: left;
}
.profile-dropdown button:hover { background: var(--cream); color: var(--text-primary); }

/* Toast notification */
/* ─── CONFIRM MODAL ──────────────────────────────────────── */
.confirm-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.confirm-box {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  max-width: 320px;
  width: 100%;
  text-align: center;
}
.confirm-box h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.confirm-box p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 20px;
  line-height: 1.4;
}
.confirm-actions {
  display: flex;
  gap: 12px;
}
.confirm-cancel {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--border-soft);
  background: var(--white);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
}
.confirm-action {
  flex: 1;
  padding: 12px;
  border: none;
  background: #c0392b;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
}

.mod-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--green-deep);
  color: var(--cream);
  padding: 12px 24px;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  border: 1px solid rgba(184, 149, 42, 0.3);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  max-width: 90%;
  text-align: center;
}
.mod-toast.active { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Community guidelines */
.guideline-section { margin-bottom: 20px; }
.guideline-section h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 6px;
}
.guideline-section p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}
.guidelines-body { padding-top: 12px; }

/* Blocked users */
.blocked-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}
.blocked-user-card:last-child { border-bottom: none; }
.blocked-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.blocked-user-info { flex: 1; min-width: 0; }
.blocked-user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.blocked-user-handle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.btn-unblock {
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--border-soft);
  border-radius: 20px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}
.btn-unblock:active {
  background: var(--bg-hover);
}

/* Event detail */
.event-detail-hero {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 20px;
}
.event-detail-date-badge {
  width: 56px;
  height: 56px;
  background: var(--green-deep);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.event-detail-date-badge .event-date-month {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
}
.event-detail-date-badge .event-date-day {
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.event-detail-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--green-deep);
  margin: 0 0 4px;
  line-height: 1.2;
}
.event-detail-creator {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}
.event-detail-info-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}
.event-detail-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.event-detail-info-item svg { flex-shrink: 0; margin-top: 2px; }
.event-detail-info-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.event-detail-info-val {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}
.event-detail-info-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 1px;
}
.event-detail-section {
  margin-bottom: 24px;
}
.event-detail-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--green-deep);
  margin: 0 0 10px;
}
.event-detail-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}
.event-detail-spots-bar {
  height: 8px;
  background: var(--cream);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.event-detail-spots-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 4px;
  transition: width 0.3s;
}
.event-detail-spots-text {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Event attendees */
.event-attendee {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
}
.event-attendee:last-child { border-bottom: none; }
.event-attendee-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.event-attendee-info { flex: 1; min-width: 0; }
.event-attendee-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.event-attendee-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Organiser badge */
.event-organiser-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--bg);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
}

/* Organiser action buttons */
.organiser-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.organiser-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s;
}

.organiser-btn:active {
  background: var(--card);
}

.organiser-btn.danger {
  color: #e53e3e;
  border-color: #e53e3e33;
}

.organiser-btn.danger:active {
  background: #e53e3e11;
}

/* Edit event modal */
#edit-event-modal,
#create-group-modal,
#edit-round-modal,
#edit-fourball-modal {
  z-index: 1100;
  align-items: center;
}

.edit-event-modal-content {
  background: var(--bg);
  border-radius: 16px;
  width: 92%;
  max-width: 440px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  -webkit-overflow-scrolling: touch;
}

.edit-event-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.edit-event-modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.edit-event-form .form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  margin-top: 12px;
}

.edit-event-form .form-label:first-child {
  margin-top: 0;
}

.edit-event-form .form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  -webkit-appearance: none;
  box-sizing: border-box;
}

.edit-event-form .form-input:focus {
  border-color: var(--gold);
  outline: none;
}

.edit-event-form textarea.form-input {
  resize: vertical;
  min-height: 70px;
}

.edit-event-form .form-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.edit-event-form .form-col {
  flex: 1;
}

.edit-event-form .form-col .form-label {
  margin-top: 0;
}
