/* ══════════════════════════════════════════════════════════════════
   OpenJio Golf – Styles
   "Quiet Luxury" Design System · Dark/Light Mode · Modular
   ══════════════════════════════════════════════════════════════════ */

/* ── Design Tokens ──────────────────────────────────────────────── */
:root {
  /* Neutral */
  --bg-base: #0d0f12;
  --bg-surface: #161a20;
  --bg-elevated: #1e2530;
  --bg-glass: rgba(30, 37, 48, .72);

  /* Brand (Muted Emerald / Sage)  */
  --accent: #4ade80;
  /* bright green accent */
  --accent-dim: #22c55e;
  --accent-glow: rgba(74, 222, 128, .18);
  --accent-text: #86efac;
  --gold: #f5c842;
  --silver: #94a3b8;
  --bronze: #cd7f32;
  --red-score: #f87171;
  --blue-score: #60a5fa;

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;

  /* Borders */
  --border: rgba(255, 255, 255, .07);
  --border-hover: rgba(255, 255, 255, .15);

  /* Radius */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .45);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .55);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .7);

  /* Nav */
  --nav-h: 68px;
  --topbar-h: 60px;

  /* Typography */
  --font-body: 'Inter', system-ui, sans-serif;
  --font-display: 'Syne', system-ui, sans-serif;
  --font-section: 'Outfit', system-ui, sans-serif;
}

/* Light Mode Overrides */
[data-theme="light"] {
  --bg-base: #f0f4f8;
  --bg-surface: #ffffff;
  --bg-elevated: #e8edf3;
  --bg-glass: rgba(255, 255, 255, .85);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: rgba(0, 0, 0, .08);
  --border-hover: rgba(0, 0, 0, .18);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .1);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .12);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .18);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}

a {
  color: var(--accent-text);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Utility ────────────────────────────────────────────────────── */
.hidden {
  display: none !important;
}

.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

.flex {
  display: flex;
}

.gap-8 {
  gap: 8px;
}

.center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Splash Screen ─────────────────────────────────────────────── */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(ellipse at 50% 40%, #0a1f14 0%, #050810 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: splashFadeOut .5s ease 2.2s forwards;
}

.splash-logo {
  text-align: center;
}

.splash-icon {
  font-size: 64px;
  animation: floatIn .6s cubic-bezier(.34, 1.56, .64, 1) both;
  display: block;
  margin-bottom: 12px;
}

.splash-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.2rem);
  color: var(--text-primary);
  animation: floatIn .6s .2s cubic-bezier(.34, 1.56, .64, 1) both;
}

.splash-subtitle {
  color: var(--accent-text);
  font-size: .95rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-top: 6px;
  animation: floatIn .6s .35s cubic-bezier(.34, 1.56, .64, 1) both;
}

.splash-loader {
  margin-top: 36px;
  animation: floatIn .4s .5s both;
}

.splash-loader span {
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 99px;
  margin: 0 auto;
  animation: loadGrow 1.5s .6s ease-in-out forwards;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

@keyframes loadGrow {
  from {
    width: 40px;
  }

  to {
    width: 160px;
  }
}

@keyframes splashFadeOut {
  from {
    opacity: 1;
    pointer-events: all;
  }

  to {
    opacity: 0;
    pointer-events: none;
    display: none;
  }
}

/* ── Top Bar ────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
}

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

.topbar-logo {
  font-family: 'Syne', system-ui, sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text-primary);
  white-space: nowrap;
  transition: color .18s, opacity .18s;
  user-select: none;
}

.topbar-logo:hover {
  color: var(--accent);
  opacity: .9;
}

.trip-badge {
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  font-size: .72rem;
  padding: 3px 10px;
  border-radius: 99px;
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
}

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

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(.97);
}

.btn-primary {
  background: var(--accent);
  color: #0d0f12;
  box-shadow: 0 0 18px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-dim);
  box-shadow: 0 0 28px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent-dim);
}

.btn-outline:hover {
  background: var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

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

.btn-green {
  background: #16a34a;
  color: #fff;
}

.btn-green:hover {
  background: #15803d;
}

.btn-sm {
  padding: 6px 12px;
  font-size: .8rem;
}

.btn-danger {
  background: #dc2626;
  color: #fff;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  font-size: 1rem;
  transition: all .18s;
}

.icon-btn:hover {
  background: var(--border-hover);
  color: var(--text-primary);
}

/* ── User Avatar ────────────────────────────────────────────────── */
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  color: #0d0f12;
  cursor: pointer;
  transition: transform .18s;
  overflow: hidden;
}

.user-avatar:hover {
  transform: scale(1.08);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── App Layout ─────────────────────────────────────────────────── */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.main-content {
  flex: 1;
  padding: 24px 20px;
  padding-bottom: calc(var(--nav-h) + 24px);
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* ── Tab Sections ───────────────────────────────────────────────── */
.tab-section {
  display: none;
  animation: fadeInUp .35s ease;
}

.tab-section.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

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

/* ── Section Headers ────────────────────────────────────────────── */
.section-header {
  margin-bottom: 24px;
}

.section-title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -.02em;
  background: linear-gradient(120deg, var(--text-primary) 60%, var(--accent-text));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-sub {
  color: var(--text-muted);
  font-size: .85rem;
  margin-top: 4px;
}

/* ── Cards ──────────────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 16px;
  transition: border-color .2s, box-shadow .2s;
}

.card:hover {
  border-color: var(--border-hover);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.card-header h3 {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-icon {
  font-size: 1.2rem;
}

.card-edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: .95rem;
  padding: 4px;
  border-radius: 6px;
  transition: all .18s;
}

.card-edit-btn:hover {
  background: var(--border);
  color: var(--text-primary);
}

/* ── Planning Grid ──────────────────────────────────────────────── */
.planning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

/* ── Weather Widget ─────────────────────────────────────────────── */
.weather-widget {
  background: linear-gradient(135deg, #0a2540 0%, #0d3b2e 100%);
  border: 1px solid rgba(74, 222, 128, .2);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.weather-widget::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 222, 128, .12), transparent 70%);
}

.weather-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.weather-loc {
  color: var(--accent-text);
  font-size: .8rem;
  font-weight: 600;
}

.weather-date-badge {
  font-family: 'Outfit', sans-serif;
  color: var(--gold);
  font-size: .78rem;
  font-weight: 600;
  background: rgba(245, 200, 66, .1);
  border: 1px solid rgba(245, 200, 66, .25);
  padding: 3px 9px;
  border-radius: 99px;
  margin-top: 4px;
  display: inline-block;
}

.weather-summary-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.weather-temp {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.weather-icon {
  font-size: 1.8rem;
}

.weather-detail {
  color: var(--text-secondary);
  font-size: .82rem;
}

.weather-period-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--accent-text);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-top: 4px;
}

/* ── Hourly Strip ────────────────────────────────────────────────── */
.hourly-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scroll-snap-type: x mandatory;
}

.hourly-strip::-webkit-scrollbar {
  height: 3px;
}

.hourly-strip::-webkit-scrollbar-thumb {
  background: rgba(74, 222, 128, .3);
  border-radius: 99px;
}

.hour-card {
  flex-shrink: 0;
  scroll-snap-align: start;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  min-width: 64px;
  text-align: center;
  transition: all .2s;
}

.hour-card.golf-hour {
  background: rgba(74, 222, 128, .1);
  border-color: rgba(74, 222, 128, .25);
}

.hc-time {
  font-size: .68rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.hc-icon {
  font-size: 1.3rem;
  margin-bottom: 2px;
}

.hc-temp {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.hc-rain {
  font-size: .68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.hc-rain.rain-high {
  color: #60a5fa;
}

.hc-rain.rain-med {
  color: #93c5fd;
}

.hc-wind {
  font-size: .62rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.hc-loading {
  color: var(--text-muted);
  font-size: .8rem;
  padding: 10px;
}

/* ── Itinerary / Carpool / Rules Lists ──────────────────────────── */
.itinerary-list,
.carpool-list,
.rules-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.itinerary-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border-radius: var(--r-sm);
  transition: background .18s;
}

.itinerary-item:hover {
  background: var(--bg-elevated);
}

.itinerary-time {
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
  min-width: 52px;
}

.itinerary-text {
  flex: 1;
  font-size: .875rem;
  color: var(--text-secondary);
}

.item-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: .8rem;
  padding: 2px;
  opacity: 0;
  transition: opacity .18s;
}

.itinerary-item:hover .item-delete-btn {
  opacity: 1;
}

.carpool-car {
  background: var(--bg-elevated);
  border-radius: var(--r-sm);
  padding: 10px 14px;
}

.carpool-driver {
  font-weight: 600;
  font-size: .875rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.carpool-passengers {
  font-size: .8rem;
  color: var(--text-secondary);
  padding-left: 20px;
}

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-elevated);
  border-radius: var(--r-sm);
}

.rule-dot {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
}

.rule-text {
  font-size: .875rem;
  color: var(--text-secondary);
  flex: 1;
}

/* ── Quick Links ────────────────────────────────────────────────── */
.quick-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qlink {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  font-size: .875rem;
  transition: all .18s;
  text-decoration: none;
}

.qlink:hover {
  background: var(--accent-glow);
  color: var(--accent);
  text-decoration: none;
}

/* ── Scorer Toolbar ─────────────────────────────────────────────── */
.scorer-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 20px;
}

.flight-selector,
.course-selector {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label {
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.select-control {
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: .875rem;
  cursor: pointer;
  transition: border-color .18s;
  outline: none;
  min-width: 140px;
}

.select-control:hover,
.select-control:focus {
  border-color: var(--accent-dim);
}

.hole-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.hole-indicator {
  font-size: .9rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.hole-indicator strong {
  color: var(--text-primary);
}

/* ── Hole Banner ────────────────────────────────────────────────── */
.hole-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}

.hole-info {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 200px;
}

.hole-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hs-label {
  font-size: .7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: .05em;
}

.hs-val {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ── Bird's Eye SVG ─────────────────────────────────────────────── */
.birds-eye-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.birds-eye {
  width: 200px;
  height: 120px;
  border-radius: var(--r-md);
  background: #0f2d1a;
  border: 1px solid rgba(74, 222, 128, .2);
}

.birds-eye-label {
  font-size: .68rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .07em;
}

/* ── Score Entry Grid ───────────────────────────────────────────── */
.score-entry-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.player-score-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 16px;
  transition: all .2s;
}

.player-score-row:hover {
  border-color: var(--border-hover);
}

.player-avatar-mini {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  color: #0d0f12;
}

.player-name-mini {
  flex: 1;
  font-size: .9rem;
  font-weight: 500;
}

.player-hcp-mini {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.score-display-btn {
  min-width: 80px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  transition: all .18s;
  text-align: center;
}

.score-display-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.score-display-btn.scored {
  background: var(--accent-glow);
  border-color: var(--accent-dim);
}

.score-vs-par {
  font-size: .8rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  min-width: 36px;
  text-align: center;
}

.vp-eagle {
  background: #1e3a5f;
  color: var(--blue-score);
}

.vp-birdie {
  background: #1a3a2a;
  color: var(--accent);
}

.vp-par {
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.vp-bogey {
  background: #3a2020;
  color: var(--red-score);
}

.vp-double {
  background: #4a1515;
  color: #fca5a5;
}

.vp-worse {
  background: #3d0d0d;
  color: #f87171;
}

/* ── Bounty ─────────────────────────────────────────────────────── */
.bounty-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.bounty-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all .2s;
}

.bounty-item.claimed {
  border-color: var(--accent-dim);
  background: var(--accent-glow);
}

.bounty-icon {
  font-size: 1.5rem;
}

.bounty-name {
  font-weight: 600;
  font-size: .875rem;
}

.bounty-pts {
  font-size: .75rem;
  color: var(--accent);
  font-weight: 600;
}

.bounty-claimer {
  font-size: .78rem;
  color: var(--text-muted);
}

.bounty-claim-btn {
  background: var(--accent);
  color: #0d0f12;
  border: none;
  border-radius: var(--r-sm);
  padding: 7px;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s;
  margin-top: auto;
}

.bounty-claim-btn:hover {
  background: var(--accent-dim);
}

.bounty-claimed-label {
  background: var(--bg-glass);
  color: var(--accent);
  border-radius: var(--r-sm);
  padding: 7px;
  font-size: .78rem;
  font-weight: 600;
  text-align: center;
}

/* ── Scorecard Table ────────────────────────────────────────────── */
.scorecard-table-wrap {
  overflow-x: auto;
}

.scorecard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8rem;
}

.scorecard-table th,
.scorecard-table td {
  padding: 7px 10px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.scorecard-table th {
  font-size: .7rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-elevated);
}

.scorecard-table td.player-col {
  text-align: left;
  font-weight: 600;
}

.scorecard-table tr:last-child td {
  border-bottom: none;
}

.sc-birdie {
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 700;
  border-radius: 4px;
}

.sc-eagle {
  background: #1e3a5f;
  color: var(--blue-score);
  font-weight: 700;
  border-radius: 4px;
}

.sc-bogey {
  color: var(--red-score);
}

.sc-total {
  font-weight: 700;
  color: var(--text-primary);
}

/* ── Podium ─────────────────────────────────────────────────────── */
.podium-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 24px;
  padding: 20px 0;
}

.podium-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 140px;
}

.podium-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: #0d0f12;
  border: 3px solid transparent;
  position: relative;
}

.podium-crown {
  position: absolute;
  top: -18px;
  font-size: 1.1rem;
}

.podium-name {
  font-size: .8rem;
  font-weight: 600;
  text-align: center;
}

.podium-pts {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

.podium-base {
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  width: 100%;
  text-align: center;
  padding: 8px 4px;
  font-size: .75rem;
  font-weight: 700;
  color: #0d0f12;
}

.p1 .podium-base {
  height: 70px;
  background: var(--gold);
}

.p2 .podium-base {
  height: 52px;
  background: var(--silver);
}

.p3 .podium-base {
  height: 40px;
  background: var(--bronze);
}

.p1 .podium-avatar {
  border-color: var(--gold);
  background: linear-gradient(135deg, #f5c842, #e09b1a);
}

.p2 .podium-avatar {
  border-color: var(--silver);
  background: linear-gradient(135deg, #94a3b8, #64748b);
}

.p3 .podium-avatar {
  border-color: var(--bronze);
  background: linear-gradient(135deg, #cd7f32, #a0522d);
}

/* ── Leaderboard Table ──────────────────────────────────────────── */
.leaderboard-table-wrap {
  overflow-x: auto;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.leaderboard-table th {
  padding: 10px 14px;
  text-align: center;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.leaderboard-table td {
  padding: 12px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.leaderboard-table td.name-col {
  text-align: left;
  font-weight: 600;
}

.leaderboard-table tr:hover td {
  background: var(--bg-elevated);
}

.leaderboard-table tr:last-child td {
  border-bottom: none;
}

.rank-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
}

.rank-1 {
  background: var(--gold);
  color: #0d0f12;
}

.rank-2 {
  background: var(--silver);
  color: #0d0f12;
}

.rank-3 {
  background: var(--bronze);
  color: #fff;
}

.rank-n {
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.total-pts {
  font-weight: 700;
  color: var(--accent);
  font-size: 1rem;
}

/* ── Credit Breakdown ───────────────────────────────────────────── */
.credit-breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.credit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border-radius: var(--r-sm);
  font-size: .85rem;
  color: var(--text-secondary);
}

.cr-badge {
  font-size: .78rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  min-width: 36px;
  text-align: center;
}

.badge-gold {
  background: rgba(245, 200, 66, .15);
  color: var(--gold);
  border: 1px solid var(--gold);
}

.badge-silver {
  background: rgba(148, 163, 184, .15);
  color: var(--silver);
  border: 1px solid var(--silver);
}

.badge-bronze {
  background: rgba(205, 127, 50, .15);
  color: var(--bronze);
  border: 1px solid var(--bronze);
}

.badge-green {
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid var(--accent-dim);
}

.badge-blue {
  background: rgba(96, 165, 250, .15);
  color: var(--blue-score);
  border: 1px solid var(--blue-score);
}

/* ── Photo Vault ────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  margin-bottom: 20px;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.upload-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.upload-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.upload-sub {
  font-size: .82rem;
  color: var(--accent);
  margin-top: 4px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.photo-item {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg-elevated);
  cursor: pointer;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}

.photo-item:hover img {
  transform: scale(1.05);
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 10px;
  opacity: 0;
  transition: opacity .2s;
}

.photo-item:hover .photo-overlay {
  opacity: 1;
}

.photo-uploader {
  font-size: .72rem;
  color: #fff;
  font-weight: 600;
}

.photo-pts {
  font-size: .68rem;
  color: var(--accent);
}

.photo-reaction-row {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
}

.react-btn {
  background: var(--bg-glass);
  border: none;
  border-radius: 99px;
  padding: 3px 7px;
  font-size: .75rem;
  cursor: pointer;
  color: var(--text-primary);
  transition: all .18s;
  backdrop-filter: blur(6px);
}

.react-btn:hover {
  transform: scale(1.1);
}

/* ── Post-Round ─────────────────────────────────────────────────── */
.post-round-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.mvp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.mvp-card {
  flex: 1;
  min-width: 140px;
  background: var(--bg-elevated);
  border-radius: var(--r-md);
  padding: 14px;
  text-align: center;
}

.mvp-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.mvp-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.mvp-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

/* ── Modals ─────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: backdropIn .2s;
}

@keyframes backdropIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 440px;
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalSlideUp .28s cubic-bezier(.34, 1.56, .64, 1);
}

.modal-wide {
  max-width: 680px;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(.97);
  }

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

.modal-header {
  display: flex;
  align-items: center;
  padding: 18px 20px 0;
  gap: 10px;
}

.modal-header h3 {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
}

.modal-body {
  padding: 16px 20px;
}

.modal-footer {
  padding: 0 20px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.modal-textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: .9rem;
  padding: 10px;
  resize: vertical;
  outline: none;
  transition: border-color .18s;
}

.modal-textarea:focus {
  border-color: var(--accent-dim);
}

.modal-score-entry .modal {
  max-width: 360px;
}

/* ── Score Entry Widget ─────────────────────────────────────────── */
.score-entry-widget {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sew-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sew-label {
  font-size: .9rem;
  color: var(--text-secondary);
}

.sew-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-elevated);
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  overflow: hidden;
}

.stepper-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.3rem;
  padding: 8px 16px;
  cursor: pointer;
  line-height: 1;
  transition: background .15s;
}

.stepper-btn:hover {
  background: var(--border);
}

.stepper-val {
  min-width: 40px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.vs-par-badge {
  font-size: 1.1rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 99px;
  min-width: 60px;
  text-align: center;
}

.vs-par-badge.E {
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.vs-par-badge.B {
  background: var(--accent-glow);
  color: var(--accent);
}

.vs-par-badge.Eg {
  background: #1e3a5f;
  color: var(--blue-score);
}

.vs-par-badge.Alb {
  background: #0e2338;
  color: #93c5fd;
}

.vs-par-badge.Bo {
  background: #3a2020;
  color: var(--red-score);
}

.vs-par-badge.db {
  background: #4a1515;
  color: #fca5a5;
}

/* ── Bounty modal ───────────────────────────────────────────────── */
.bounty-modal-desc {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.bounty-proof-zone {
  background: var(--bg-elevated);
  border: 2px dashed var(--border);
  border-radius: var(--r-md);
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
}

.bounty-proof-zone:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.bounty-camera-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

.bounty-proof-zone p {
  font-size: .85rem;
  color: var(--text-muted);
}

#bounty-photo-preview img {
  max-width: 100%;
  border-radius: var(--r-sm);
}

/* ── Modal Add ──────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.form-input {
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: .9rem;
  outline: none;
  width: 100%;
  transition: border-color .18s;
}

.form-input:focus {
  border-color: var(--accent-dim);
}

/* ── Bottom Navigation ──────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--nav-h);
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--r-md);
  color: var(--text-muted);
  transition: all .2s;
  flex: 1;
}

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

.nav-btn.active {
  color: var(--accent);
}

.nav-icon {
  font-size: 1.3rem;
}

.nav-label {
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .03em;
}

.nav-btn.active .nav-icon {
  filter: drop-shadow(0 0 6px var(--accent));
}

/* ── Toast Notifications ────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 18px;
  font-size: .875rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  animation: toastIn .3s cubic-bezier(.34, 1.56, .64, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 300px;
}

.toast.success {
  border-color: var(--accent-dim);
}

.toast.error {
  border-color: var(--red-score);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

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

/* ── Course Layout Modal ────────────────────────────────────────── */
.course-overview-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 4px;
  font-size: .72rem;
}

.cog-cell {
  background: var(--bg-elevated);
  border-radius: 4px;
  padding: 5px 3px;
  text-align: center;
}

.cog-hole {
  color: var(--text-muted);
  font-size: .65rem;
}

.cog-par {
  font-weight: 700;
  color: var(--text-primary);
}

.cog-yd {
  color: var(--accent-text);
}

/* ── Share Card ─────────────────────────────────────────────────── */
#share-modal-body canvas {
  border-radius: var(--r-md);
  max-width: 100%;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hole-banner {
    flex-direction: column;
  }

  .birds-eye-container {
    align-self: center;
  }

  .podium-wrap {
    gap: 6px;
  }

  .podium-slot {
    max-width: 100px;
  }

  .podium-avatar {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
  }

  .planning-grid {
    grid-template-columns: 1fr;
  }

  .weather-widget {
    flex-direction: column;
    gap: 8px;
  }
}

/* ── Scrollbar ──────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* ── Input range ────────────────────────────────────────────────── */
input[type="range"] {
  accent-color: var(--accent);
}

/* ── Flight List (Planning Hub) ─────────────────────────────────── */
.flight-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.flight-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.flight-players {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.flight-player-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 99px;
  border: 1.5px solid;
  background: var(--bg-elevated);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all .18s;
  /* Force strong contrast regardless of theme */
  text-shadow: none;
}

.flight-player-chip:hover {
  background: var(--bg-glass);
}

.fpc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fpc-hcp {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-secondary);
  opacity: .9;
}

.linked-badge {
  font-size: .68rem;
  background: var(--accent-glow);
  color: var(--accent);
  border-radius: 99px;
  padding: 1px 6px;
  font-weight: 600;
  margin-left: 2px;
}

/* ── Roster Tab ──────────────────────────────────────────────────── */
.roster-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.roster-card:last-child {
  border-bottom: none;
}

.roster-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  color: #0d0f12;
}

.roster-info {
  flex: 1;
  min-width: 0;
}

.roster-name {
  font-weight: 600;
  font-size: .9rem;
}

.roster-meta {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.roster-linked {
  font-size: .72rem;
  color: var(--accent);
  margin-top: 3px;
}

.roster-unlinked {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 3px;
}

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

.select-sm {
  min-width: 80px !important;
  padding: 5px 8px !important;
  font-size: .78rem !important;
}

/* ── Flight Breakdown ────────────────────────────────────────────── */
.flight-breakdown-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.flight-breakdown-row:last-child {
  border-bottom: none;
}

.flight-badge-lg {
  font-size: .78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}

.flight-members {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.member-chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px 12px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Remove responsive override that broke vertical weather layout ─ */
@media (max-width: 600px) {
  .flight-list {
    gap: 10px;
  }

  .nav-label {
    font-size: .6rem;
  }
}

/* ── Long-Press / Hold-to-Edit Feedback ─────────────────────────── */
.lp-target {
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s;
}

@keyframes lpPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, .5);
    background: rgba(74, 222, 128, .05);
  }

  60% {
    box-shadow: 0 0 0 10px rgba(74, 222, 128, 0);
    background: rgba(74, 222, 128, .12);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
    background: rgba(74, 222, 128, .06);
  }
}

.lp-active {
  animation: lpPulse .55s ease forwards !important;
}

.lp-hint {
  font-size: .62rem;
  color: var(--text-muted);
  letter-spacing: .05em;
  text-align: right;
  margin-top: 6px;
  margin-bottom: -4px;
}

/* ── Pairs ───────────────────────────────────────────────────────── */
.pair-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.pair-row:last-child {
  border-bottom: none;
}

.pair-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: .83rem;
  font-weight: 500;
  color: var(--text-primary);
}

.pair-link {
  font-size: 1rem;
}

/* ── Shuffle Confirm animation ───────────────────────────────────── */
@keyframes shufflePop {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.05) rotate(-2deg);
  }

  70% {
    transform: scale(.97) rotate(1deg);
  }

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

.shuffle-pop {
  animation: shufflePop .4s ease;
}

/* ── Stableford: Scoring Mode Toggle ───────────────────────────── */
.scoring-mode-toggle {
  display: flex;
  gap: 0;
  border-radius: 99px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
}

.mode-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 7px 14px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-body);
  transition: all .2s;
  white-space: nowrap;
  letter-spacing: .02em;
}

.mode-toggle-btn:hover {
  color: var(--text-secondary);
}

.mode-toggle-btn.active {
  background: var(--accent);
  color: #0d0f12;
  box-shadow: 0 0 14px var(--accent-glow);
}

/* ── Stableford: Point Badges ───────────────────────────────────── */
.stab-pts-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  min-width: 44px;
  text-align: center;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.4;
}

.stab-pts-great {
  background: linear-gradient(135deg, rgba(74, 222, 128, .25), rgba(96, 165, 250, .2));
  color: var(--accent);
  border: 1px solid rgba(74, 222, 128, .5);
  box-shadow: 0 0 8px rgba(74, 222, 128, .2);
}

.stab-pts-par {
  background: rgba(74, 222, 128, .1);
  color: var(--accent-text);
  border: 1px solid rgba(74, 222, 128, .25);
}

.stab-pts-bogey {
  background: rgba(148, 163, 184, .1);
  color: var(--silver);
  border: 1px solid rgba(148, 163, 184, .25);
}

.stab-pts-zero {
  background: rgba(248, 113, 113, .08);
  color: var(--red-score);
  border: 1px solid rgba(248, 113, 113, .2);
  opacity: .7;
}

.stab-strokes {
  font-size: .7rem;
  color: var(--text-muted);
  margin-left: 3px;
}

/* ── Stableford: Score Modal preview row ────────────────────────── */
.sew-stab-row {
  flex-direction: column;
  gap: 8px;
  align-items: flex-start !important;
  background: var(--bg-elevated);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  border: 1px solid var(--border);
  min-height: 44px;
}

.sew-stab-row:empty {
  display: none !important;
}

/* ── Stableford: Leaderboard card accents ───────────────────────── */
.stab-lb-card {
  border-color: rgba(74, 222, 128, .15);
  background: linear-gradient(135deg, var(--bg-surface), rgba(74, 222, 128, .03));
}

.stab-lb-card .card-header h3 {
  background: linear-gradient(90deg, var(--text-primary) 50%, var(--accent-text));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stab-info-badge {
  font-size: .72rem;
  font-weight: 600;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 99px;
  padding: 2px 9px;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Stableford: Total cell in scorecard ────────────────────────── */
.stab-total-cell {
  font-weight: 700;
  color: var(--accent);
}

.stab-total-cell .sc-birdie {
  color: var(--accent);
}

.stab-total-cell .sc-eagle {
  color: var(--blue-score);
}

/* ── Badge: purple (social challenges) ─────────────────────────── */
.badge-purple {
  background: rgba(167, 139, 250, .15);
  color: #a78bfa;
  border: 1px solid #a78bfa;
}

/* ── Social Card ────────────────────────────────────────────────── */
.social-card {
  border-color: rgba(167, 139, 250, .2);
  background: linear-gradient(135deg, var(--bg-surface), rgba(167, 139, 250, .03));
}

.social-card-sub {
  font-size: .8rem;
  color: var(--text-muted);
  margin: -6px 0 14px;
}

.social-progress-badge {
  font-size: .72rem;
  font-weight: 600;
  background: rgba(167, 139, 250, .15);
  color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, .35);
  border-radius: 99px;
  padding: 2px 9px;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Social Challenge Items ─────────────────────────────────────── */
.social-challenge-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  transition: background .18s;
}

.social-challenge-item:last-child {
  border-bottom: none;
}

.social-challenge-item:hover {
  background: rgba(255, 255, 255, .015);
}

.sc-claimed {
  opacity: .75;
}

.sc-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.sc-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

.sc-info {
  flex: 1;
  min-width: 0;
}

.sc-name {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.sc-desc {
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
}

.sc-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.sc-pts-badge {
  font-size: .82rem;
  font-weight: 700;
  background: rgba(167, 139, 250, .15);
  color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, .35);
  border-radius: 99px;
  padding: 2px 9px;
  white-space: nowrap;
}

.sc-claim-btn {
  background: rgba(167, 139, 250, .12);
  border: 1.5px solid rgba(167, 139, 250, .35);
  color: #a78bfa;
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-size: .78rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.sc-claim-btn:hover {
  background: rgba(167, 139, 250, .25);
  border-color: #a78bfa;
  box-shadow: 0 0 12px rgba(167, 139, 250, .2);
}

.sc-claimed-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .75rem;
  font-weight: 600;
  border: 1.5px solid;
  border-radius: 99px;
  padding: 4px 10px;
  white-space: nowrap;
}

/* ── Bounty desc note (golf) ────────────────────────────────────── */
.bounty-pts-note {
  font-size: .72rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 2px;
}

/* ── Mobile-first: generous touch targets ───────────────────────── */
@media (max-width: 768px) {
  .roster-card {
    min-height: 58px;
    padding: 14px;
  }

  .itinerary-item {
    min-height: 44px;
    padding: 12px 14px;
  }

  .carpool-car {
    padding: 14px;
    cursor: pointer;
  }

  .rule-item {
    min-height: 44px;
    padding: 10px 14px;
    cursor: pointer;
  }

  .bounty-claim-btn {
    min-height: 48px;
    font-size: .9rem;
  }

  .score-display-btn {
    min-height: 52px;
    min-width: 72px;
    font-size: 1.05rem;
  }

  .stepper-btn {
    padding: 14px 22px;
    font-size: 1.5rem;
  }

  .nav-btn {
    padding: 10px 2px;
    min-width: 0;
  }

  .nav-icon {
    font-size: 1.2rem;
  }

  .card {
    padding: 16px 14px;
  }

  .btn-sm {
    padding: 8px 14px;
    font-size: .82rem;
  }

  .modal {
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    max-height: 85dvh;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .eh-events-grid {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════════════
   Events Hub
   ══════════════════════════════════════════════════════════════════ */

.events-hub {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
  overflow-x: hidden;
}

/* ── Header ────────────────────────────────────────────────────── */
.eh-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 60px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
}

.eh-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eh-logo {
  font-size: 1.4rem;
}

.eh-brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text-primary);
}

.eh-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Hero ──────────────────────────────────────────────────────── */
.eh-hero {
  position: relative;
  padding: 56px 28px 44px;
  text-align: center;
  overflow: hidden;
}

.eh-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(74, 222, 128, .12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 20% 100%, rgba(96, 165, 250, .08) 0%, transparent 60%);
  pointer-events: none;
}

.eh-tagline {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  animation: floatIn .5s .1s both;
}

.eh-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -.03em;
  background: linear-gradient(120deg, var(--text-primary) 40%, var(--accent-text) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: floatIn .5s .2s both;
}

/* ── Events Grid ───────────────────────────────────────────────── */
.eh-events-wrap {
  flex: 1;
  padding: 0 24px 40px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.eh-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ── Event Card ────────────────────────────────────────────────── */
.eh-event-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: transform .22s, box-shadow .22s, border-color .22s;
  animation: floatIn .45s both;
  cursor: pointer;
}

.eh-event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, .55);
  border-color: var(--border-hover);
}

/* Gradient banner at top */
.eh-card-banner {
  height: 110px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eh-card-banner-emoji {
  font-size: 3.5rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .4));
  position: relative;
  z-index: 1;
}

.eh-card-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, var(--bg-surface) 100%);
}

/* Status badge overlay */
.eh-status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
}

.eh-status-badge.upcoming {
  background: rgba(74, 222, 128, .18);
  color: var(--accent);
  border: 1px solid var(--accent-dim);
}

.eh-status-badge.live {
  background: rgba(248, 113, 113, .2);
  color: #f87171;
  border: 1px solid #f87171;
  animation: pulse-badge 1.5s infinite;
}

.eh-status-badge.completed {
  background: rgba(148, 163, 184, .12);
  color: var(--silver);
  border: 1px solid var(--silver);
}

@keyframes pulse-badge {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .6;
  }
}

/* Card body */
.eh-card-body {
  padding: 0 18px 20px;
}

.eh-card-name {
  font-family: var(--font-section);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -.01em;
}

.eh-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.eh-card-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .75rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border-radius: 99px;
  padding: 3px 10px;
}

.eh-card-chip svg {
  width: 12px;
  height: 12px;
  opacity: .7;
}

/* Enter button */
.eh-card-enter {
  width: 100%;
  background: var(--accent);
  color: #0d0f12;
  border: none;
  border-radius: var(--r-md);
  padding: 12px;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.eh-card-enter:hover {
  background: var(--accent-dim);
  transform: scale(1.01);
}

.eh-card-enter.coming-soon {
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* ── Create New Trip Button ─────────────────────────────────────── */
.eh-create-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  background: transparent;
  border: 2px dashed var(--border);
  border-radius: var(--r-xl);
  padding: 22px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .22s;
}

.eh-create-btn:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
  background: var(--accent-glow);
}

.eh-create-plus {
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1;
  transition: transform .2s;
}

.eh-create-btn:hover .eh-create-plus {
  transform: rotate(90deg);
}

/* ── Footer ────────────────────────────────────────────────────── */
.eh-footer {
  text-align: center;
  padding: 20px;
  font-size: .75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* Gradient palettes per event */
.eh-banner-green {
  background: linear-gradient(135deg, #0a2218 0%, #064e3b 100%);
}

.eh-banner-blue {
  background: linear-gradient(135deg, #0a1a2e 0%, #1e3a5f 100%);
}

.eh-banner-gold {
  background: linear-gradient(135deg, #1a1200 0%, #4a3500 100%);
}

.eh-banner-purple {
  background: linear-gradient(135deg, #1a0a2e 0%, #3b1f6e 100%);
}

.eh-banner-red {
  background: linear-gradient(135deg, #1f0a0a 0%, #5c1212 100%);
}

/* ── Admin Badge ────────────────────────────────────────────────── */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  background: linear-gradient(135deg, rgba(245, 200, 66, .18), rgba(245, 200, 66, .08));
  border: 1px solid rgba(245, 200, 66, .4);
  color: var(--gold);
  letter-spacing: .04em;
  animation: adminGlow 2.5s ease-in-out infinite;
}

@keyframes adminGlow {

  0%,
  100% {
    box-shadow: 0 0 0 rgba(245, 200, 66, 0);
  }

  50% {
    box-shadow: 0 0 10px rgba(245, 200, 66, .3);
  }
}

/* ── Admin-only elements: hide for players ──────────────────────── */
/* Applied via JS: body.player-mode [data-admin-only] { display:none } */
body.player-mode [data-admin-only] {
  display: none !important;
}

/* ── Player Welcome Overlay ─────────────────────────────────────── */
.player-welcome {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(5, 8, 16, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: backdropIn .3s;
}

.pw-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 36px 28px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: modalSlideUp .4s cubic-bezier(.34, 1.56, .64, 1);
  position: relative;
  overflow: hidden;
}

.pw-card::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(74, 222, 128, .1), transparent 70%);
  pointer-events: none;
}

.pw-emoji {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 8px;
  animation: floatIn .5s .1s both;
}

.pw-event-name {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  animation: floatIn .5s .15s both;
}

.pw-greeting {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text-primary);
  margin-bottom: 16px;
  animation: floatIn .5s .2s both;
}

.pw-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
  animation: floatIn .5s .25s both;
}

.pw-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 5px 14px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.pw-chip.highlight {
  background: var(--accent-glow);
  border-color: var(--accent-dim);
  color: var(--accent);
}

.pw-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  animation: floatIn .5s .3s both;
}

.pw-actions .btn {
  flex: 1;
  padding: 14px;
  font-size: .9rem;
}

.pw-skip {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: .82rem;
  cursor: pointer;
  padding: 4px;
  transition: color .18s;
  animation: floatIn .5s .35s both;
}

.pw-skip:hover {
  color: var(--text-secondary);
}

/* Events Hub admin row on event cards */
.eh-card-admin-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.eh-card-admin-btn {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 600;
  padding: 7px;
  cursor: pointer;
  transition: all .18s;
}

.eh-card-admin-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(245, 200, 66, .08);
}

/* ── Splash Powered By ──────────────────────────────────────────── */
.splash-poweredby {
  margin-top: 20px;
  font-size: .72rem;
  color: var(--text-muted);
  letter-spacing: .05em;
  animation: floatIn .5s .7s both;
}

.splash-poweredby a {
  color: var(--accent);
  text-decoration: none;
}

/* ── Organiser / Admin Row List ─────────────────────────────────── */
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-elevated);
  border-radius: var(--r-sm);
  padding: 10px 14px;
}

.admin-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #e09b1a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  color: #0d0f12;
  flex-shrink: 0;
}

.admin-name {
  flex: 1;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.admin-role-badge {
  font-size: .68rem;
  font-weight: 700;
  background: rgba(245, 200, 66, .12);
  border: 1px solid rgba(245, 200, 66, .3);
  color: var(--gold);
  border-radius: 99px;
  padding: 2px 8px;
  letter-spacing: .05em;
}

/* ── Permission Toggles ─────────────────────────────────────────── */
.perm-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity .15s;
}

.perm-row:last-child {
  border-bottom: none;
}

.perm-row:hover {
  opacity: .85;
}

.perm-text {
  flex: 1;
}

.perm-label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.perm-sub {
  font-size: .75rem;
  color: var(--text-muted);
}

.perm-toggle {
  width: 44px;
  height: 24px;
  border-radius: 99px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  position: relative;
  flex-shrink: 0;
  transition: background .2s, border-color .2s;
}

.perm-toggle.on {
  background: var(--accent);
  border-color: var(--accent-dim);
}

.perm-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform .2s, background .2s;
}

.perm-toggle.on .perm-knob {
  transform: translateX(20px);
  background: #0d0f12;
}

/* ── Multi-Day Selector ─────────────────────────────────────────── */
.day-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.day-selector::-webkit-scrollbar {
  display: none;
}

.day-selector-label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
  flex-shrink: 0;
}

.day-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 18px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .2s;
  font-family: var(--font-body);
}

.day-pill:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.day-pill.active {
  background: var(--accent);
  color: #0d0f12;
  border-color: var(--accent-dim);
  box-shadow: 0 0 16px var(--accent-glow);
}

.day-pill-date {
  font-size: .65rem;
  font-weight: 500;
  opacity: .7;
}

/* ══════════════════════════════════════════════════════════════════
   Comprehensive Light Mode Component Overrides
   All hardcoded dark-background components need these fixes
   ══════════════════════════════════════════════════════════════════ */

/* Weather Widget */
[data-theme="light"] .weather-widget {
  background: linear-gradient(135deg, #dbeafe 0%, #dcfce7 100%);
  border-color: rgba(34, 197, 94, .3);
}

[data-theme="light"] .weather-loc {
  color: #15803d;
}

[data-theme="light"] .weather-temp {
  color: #0f172a;
}

[data-theme="light"] .weather-detail {
  color: #475569;
}

[data-theme="light"] .weather-period-label {
  color: #15803d;
}

/* Hour Cards */
[data-theme="light"] .hour-card {
  background: rgba(0, 0, 0, .04);
  border-color: rgba(0, 0, 0, .1);
}

[data-theme="light"] .hour-card.golf-hour {
  background: rgba(34, 197, 94, .12);
  border-color: rgba(34, 197, 94, .3);
}

[data-theme="light"] .hc-time {
  color: #64748b;
}

[data-theme="light"] .hc-temp {
  color: #0f172a;
}

[data-theme="light"] .hc-rain {
  color: #64748b;
}

[data-theme="light"] .hc-wind {
  color: #64748b;
}

/* Bird's Eye */
[data-theme="light"] .birds-eye {
  background: #d1fae5;
  border-color: rgba(34, 197, 94, .3);
}

/* Score Entry Grid */
[data-theme="light"] .player-score-row {
  background: #ffffff;
  border-color: rgba(0, 0, 0, .1);
}

[data-theme="light"] .score-display-btn {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, .12);
  color: #0f172a;
}

[data-theme="light"] .score-display-btn.scored {
  background: rgba(34, 197, 94, .12);
  border-color: rgba(34, 197, 94, .4);
}

/* Bounty Items */
[data-theme="light"] .bounty-item {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, .1);
}

[data-theme="light"] .bounty-item.claimed {
  background: rgba(34, 197, 94, .12);
  border-color: rgba(34, 197, 94, .3);
}

/* Roster Cards */
[data-theme="light"] .roster-card {
  border-color: rgba(0, 0, 0, .08);
}

[data-theme="light"] .roster-name {
  color: #0f172a;
}

[data-theme="light"] .roster-meta {
  color: #475569;
}

/* Leaderboard & Scorecard */
[data-theme="light"] .leaderboard-table tr:hover td {
  background: #f1f5f9;
}

[data-theme="light"] .scorecard-table th {
  background: #f1f5f9;
}

/* Modals */
[data-theme="light"] .modal {
  background: #ffffff;
}

[data-theme="light"] .modal-textarea {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, .12);
  color: #0f172a;
}

[data-theme="light"] .form-input {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, .12);
  color: #0f172a;
}

[data-theme="light"] .select-control {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, .12);
  color: #0f172a;
}

/* Flight list chips in light mode */
[data-theme="light"] .flight-player-chip {
  background: #f8fafc;
}

[data-theme="light"] .fpc-hcp {
  color: #475569;
}

[data-theme="light"] .member-chip {
  background: #f1f5f9;
}

/* Score vs par badges */
[data-theme="light"] .vp-par {
  background: #e2e8f0;
  color: #475569;
}

[data-theme="light"] .vp-birdie {
  background: #dcfce7;
  color: #15803d;
}

[data-theme="light"] .vp-eagle {
  background: #dbeafe;
  color: #1d4ed8;
}

[data-theme="light"] .vp-bogey {
  background: #fee2e2;
  color: #dc2626;
}

[data-theme="light"] .vp-double {
  background: #fecaca;
  color: #b91c1c;
}

/* Itinerary / carpool / rules items */
[data-theme="light"] .itinerary-item,
[data-theme="light"] .carpool-car,
[data-theme="light"] .rule-item {
  background: #f1f5f9;
}

[data-theme="light"] .itinerary-text,
[data-theme="light"] .rule-text {
  color: #334155;
}

/* Sew stepper */
[data-theme="light"] .sew-stepper {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, .12);
}

[data-theme="light"] .stepper-btn {
  color: #0f172a;
}

[data-theme="light"] .stepper-val {
  color: #0f172a;
}

/* Toast */
[data-theme="light"] .toast {
  background: #1e293b;
  color: #f1f5f9;
}

/* Player welcome & admin panel */
[data-theme="light"] .pw-card {
  background: #ffffff;
}

[data-theme="light"] .pw-chip {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, .1);
  color: #0f172a;
}

[data-theme="light"] .admin-row {
  background: #f1f5f9;
}

[data-theme="light"] .perm-toggle {
  background: #e2e8f0;
  border-color: rgba(0, 0, 0, .15);
}

/* Events Hub in light mode */
[data-theme="light"] .eh-event-card {
  background: #ffffff;
}

[data-theme="light"] .eh-card-body {
  color: #0f172a;
}

[data-theme="light"] .eh-card-chip {
  background: #f1f5f9;
  color: #475569;
}

[data-theme="light"] .eh-create-btn {
  border-color: rgba(0, 0, 0, .15);
  color: #64748b;
}

[data-theme="light"] .day-pill {
  background: #f1f5f9;
  color: #475569;
}

/* ── My Events strip (signed-in users) ──────────────────────────── */
#eh-my-events {
  padding: 0 20px 4px;
  max-width: 960px;
  margin: 0 auto;
}

.eh-my-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.eh-my-title {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.eh-my-sub {
  font-size: .75rem;
  color: var(--text-muted);
  opacity: .7;
}

.eh-my-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.eh-my-strip::-webkit-scrollbar {
  display: none;
}

.eh-my-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 16px;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s;
  text-align: left;
  font-family: var(--font-body);
  min-width: 160px;
}

.eh-my-pill:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 0 16px var(--accent-glow);
}

.eh-my-emoji {
  font-size: 1.4rem;
}

.eh-my-name {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.eh-my-status {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ── Join Event Bar ─────────────────────────────────────────────── */
.join-event-bar {
  position: sticky;
  bottom: 70px;
  /* above bottom-nav */
  left: 0;
  right: 0;
  z-index: 300;
  margin: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--accent-dim);
  border-radius: var(--r-lg);
  box-shadow: 0 4px 24px rgba(74, 222, 128, .15), var(--shadow-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: slideUpIn .35s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes slideUpIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

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

.join-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.join-bar-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.join-bar-title {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.join-bar-sub {
  font-size: .74rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Date Picker theming ────────────────────────────────────────── */
input[type="date"] {
  color-scheme: dark;
}

[data-theme="light"] input[type="date"] {
  color-scheme: light;
}
/* ------------------------------------------------------------------
   Course Picker Overlay
   ------------------------------------------------------------------ */
.course-picker-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg-base);
  display: flex; flex-direction: column;
  animation: fadeInFast .2s ease;
}
@keyframes fadeInFast { from { opacity: 0; } to { opacity: 1; } }
.cp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
}
.cp-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--text-primary); margin: 0; }
.cp-search-wrap { padding: 14px 20px 0; display: flex; flex-direction: column; gap: 12px; }
.cp-search {
  width: 100%; box-sizing: border-box;
  background: var(--bg-elevated); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); color: var(--text-primary);
  font-family: var(--font-body); font-size: .9rem; padding: 10px 14px;
  outline: none; transition: border-color .18s;
}
.cp-search:focus { border-color: var(--accent-dim); }
.cp-region-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.cp-region-tabs::-webkit-scrollbar { display: none; }
.cp-tab {
  padding: 6px 14px; border-radius: 99px; border: 1.5px solid var(--border);
  background: transparent; color: var(--text-secondary);
  font-size: .8rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  font-family: var(--font-body); transition: all .18s;
}
.cp-tab.active, .cp-tab:hover { background: var(--accent); color: #0d0f12; border-color: var(--accent-dim); }
.cp-list { flex: 1; overflow-y: auto; padding: 14px 20px 32px; display: flex; flex-direction: column; gap: 10px; }
.cp-empty { text-align: center; color: var(--text-muted); padding: 48px 0; font-size: .9rem; }
.cp-club-card { border: 1.5px solid var(--border); border-radius: var(--r-md); overflow: hidden; transition: border-color .18s; }
.cp-club-card.expanded { border-color: var(--accent-dim); }
.cp-club-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 16px; cursor: pointer;
  background: var(--bg-surface); transition: background .15s;
}
.cp-club-header:hover { background: var(--bg-elevated); }
.cp-club-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.cp-club-flag { font-size: 1.5rem; flex-shrink: 0; }
.cp-club-name { font-size: .9rem; font-weight: 700; color: var(--text-primary); }
.cp-club-loc  { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
.cp-club-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.cp-layout-count { font-size: .74rem; color: var(--text-muted); white-space: nowrap; }
.cp-chevron { font-size: 1.2rem; color: var(--text-muted); transition: transform .2s; }
.cp-club-card.expanded .cp-chevron { transform: rotate(90deg); }
.cp-layouts { border-top: 1px solid var(--border); background: var(--bg-elevated); display: flex; flex-direction: column; }
.cp-layout-btn {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px; border: none; border-bottom: 1px solid var(--border);
  background: transparent; width: 100%; cursor: pointer; text-align: left;
  font-family: var(--font-body); transition: background .15s;
}
.cp-layout-btn:last-child { border-bottom: none; }
.cp-layout-btn:hover { background: rgba(74,222,128,.08); }
.cp-lay-left  { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.cp-lay-name  { font-size: .87rem; font-weight: 600; color: var(--text-primary); }
.cp-lay-note  { font-size: .72rem; color: var(--accent); }
.cp-lay-right { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.cp-lay-stat  {
  font-size: .72rem; font-weight: 700; background: var(--bg-surface);
  border: 1px solid var(--border); color: var(--text-secondary);
  padding: 2px 7px; border-radius: 99px;
}
.cp-lay-par { color: var(--accent); border-color: var(--accent-dim); background: var(--accent-glow); }
.nc-course-chip {
  font-size: .83rem; background: var(--accent-glow); border: 1.5px solid var(--accent-dim);
  color: var(--text-primary); border-radius: var(--r-sm); padding: 8px 12px; margin-bottom: 4px; line-height: 1.5;
}

/* -- Demo Event Badge --------------------------------------------- */
.eh-demo-badge {
  display: inline-block;
  font-size: .64rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(251,146,60,.12);
  border: 1px solid rgba(251,146,60,.3);
  color: #fb923c;
  border-radius: 99px;
  padding: 2px 8px;
  margin-bottom: 6px;
}
