/* ═══════════════════════════════════════════════════════════════════════════
   ELITE+ HOME PAGE OVERHAUL — v4.0
   Clarity · Hierarchy · Density · Premium Polish
   Fixes: grey-out contrast, page length, duplicate CTAs, dead empty states
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   § 1  CONTRAST & SURFACE HIERARCHY FIX
   Problem: Too much looks greyed-out / disabled
   Fix: Raise card surfaces, brighten text, separate active vs locked
   ═══════════════════════════════════════════════════════════════════════════ */

/* Stronger card surface — lifted from background */
.hp7-card {
  background:
    linear-gradient(160deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.015) 100%),
    rgba(16, 16, 22, .82) !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  box-shadow:
    0 4px 24px rgba(0,0,0,.28),
    0 1px 4px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.07),
    inset 0 -1px 0 rgba(0,0,0,.25) !important;
}

.hp7-card:hover {
  border-color: rgba(139, 92, 246, .25) !important;
  box-shadow:
    0 12px 48px rgba(0,0,0,.35),
    0 0 40px rgba(139, 92, 246, .08),
    inset 0 1px 0 rgba(255,255,255,.09),
    inset 0 -1px 0 rgba(0,0,0,.25) !important;
}

/* Featured / highlight cards get richer surface */
.hp7-card--highlight,
.hp7-card--ai-insight {
  background:
    linear-gradient(135deg, rgba(139,92,246,.06) 0%, rgba(245,158,11,.03) 50%, rgba(16,16,22,.88) 100%),
    rgba(18, 18, 24, .9) !important;
  border: 1px solid rgba(139, 92, 246, .2) !important;
}

/* Locked / coming-soon cards — clearly distinct */
.hp7-card--locked {
  opacity: .45 !important;
  background:
    linear-gradient(160deg, rgba(255,255,255,.02) 0%, rgba(255,255,255,.005) 100%),
    rgba(12, 12, 16, .7) !important;
  border: 1px dashed rgba(255, 255, 255, .06) !important;
  pointer-events: none;
  position: relative;
}
.hp7-card--locked::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(255,255,255,.008) 8px,
    rgba(255,255,255,.008) 16px
  );
  pointer-events: none;
}

/* ── Text Contrast Overhaul ── */
/* Card headings — bright and sharp */
.hp7-card-label h3 {
  color: #f4f4f5 !important;
  font-weight: 800 !important;
}

/* Primary body text in cards — much more readable */
.hp7-nba-reason,
.hp7-mission-desc,
.hp7-form-stat,
.hp7-feed-row span,
.hp7-season-top span,
.hp7-fitness-last,
.hp7-ach-body span,
.hp7-xp-total {
  color: #a1a1aa !important;
}

/* Supporting micro-labels — subtle but legible */
.hp7-stat-lbl,
.hp7-stat-sub,
.hp7-week-col-lbl,
.hp7-fitness-stat-lbl,
.hp7-xp-stat,
.hp7-streak-dot-day {
  color: #71717a !important;
}

/* Metric numbers — punchy and eye-catching */
.hp7-stat-val,
.hp7-fitness-stat-val,
.hp7-xp-lvl,
.hp7-ring-num,
.hp7-streak-count {
  color: #f4f4f5 !important;
}

/* Feed entries — actually readable */
.hp7-feed-row strong {
  color: #e4e4e7 !important;
}

/* Tags — slightly brighter text */
.hp7-tag {
  color: #c4b5fd !important;
  border-color: rgba(139, 92, 246, .18) !important;
  background: rgba(139, 92, 246, .10) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 2  HERO COMMAND CENTER
   Replaces empty Form Rating box with onboarding progress or week snapshot
   ═══════════════════════════════════════════════════════════════════════════ */

.hp7-hero {
  padding: 36px 40px 32px !important;
}

/* Hero subtitle — readable */
.hp7-subtitle {
  color: #a1a1aa !important;
  font-size: .82rem !important;
  line-height: 1.55 !important;
  max-width: 520px;
}

/* Remove harsh consistency badge for new users */
.hp7-consistency.low {
  background: rgba(139, 92, 246, .08) !important;
  color: #a78bfa !important;
  border-color: rgba(139, 92, 246, .15) !important;
}

/* Onboarding progress card (replaces hero badge for new users) */
.hp7-onboarding {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(139,92,246,.08) 0%, rgba(99,102,241,.04) 100%);
  border: 1px solid rgba(139, 92, 246, .15);
  min-width: 240px;
  max-width: 320px;
}

.hp7-onboarding-title {
  font-family: 'Montserrat', sans-serif;
  font-size: .72rem;
  font-weight: 700;
  color: #c4b5fd;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.hp7-onboarding-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.hp7-onboarding-pct {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  background: linear-gradient(135deg, #c4b5fd, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hp7-onboarding-bar {
  flex: 1;
  height: 6px;
  border-radius: 4px;
  background: rgba(63, 63, 70, .4);
  overflow: hidden;
}

.hp7-onboarding-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #a78bfa, #c4b5fd);
  transition: width 1s cubic-bezier(.4,0,.2,1);
}

.hp7-onboarding-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hp7-onboarding-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .68rem;
  color: #a1a1aa;
  font-weight: 500;
}

.hp7-onboarding-step.done {
  color: #4ade80;
}

.hp7-onboarding-step.done .hp7-onboarding-check {
  background: rgba(74, 222, 128, .15);
  border-color: rgba(74, 222, 128, .3);
  color: #4ade80;
}

.hp7-onboarding-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .6rem;
  background: rgba(63, 63, 70, .3);
  border: 1px solid rgba(63, 63, 70, .4);
  color: #52525b;
  flex-shrink: 0;
  font-weight: 700;
}

/* Week snapshot card (hero right side for active users) */
.hp7-week-snap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-width: 240px;
  max-width: 320px;
}

.hp7-week-snap-item {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  text-align: center;
  transition: all .2s;
}

.hp7-week-snap-item:hover {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(139, 92, 246, .2);
  transform: translateY(-2px);
}

.hp7-week-snap-val {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: #f4f4f5;
  line-height: 1.2;
}

.hp7-week-snap-lbl {
  font-size: .56rem;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 3  SMART STAT CARDS — Empty State Transformation
   Zero stats become onboarding-style "unlock" cards
   ═══════════════════════════════════════════════════════════════════════════ */

.hp7-stat-unlock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.hp7-stat-unlock-icon {
  font-size: 1.4rem;
  opacity: .6;
  margin-bottom: 2px;
}

.hp7-stat-unlock-text {
  font-size: .6rem;
  color: #71717a;
  font-weight: 600;
  line-height: 1.3;
}

.hp7-stat-unlock-label {
  font-size: .72rem;
  font-weight: 700;
  color: #a1a1aa;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 4  AI COACH INSIGHT — Premium Top-Level Card
   ═══════════════════════════════════════════════════════════════════════════ */

.hp7-card--ai-insight {
  position: relative;
  overflow: hidden;
}

.hp7-ai-glow {
  position: absolute;
  top: -40%;
  right: -30%;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,.12) 0%, rgba(99,102,241,.06) 40%, transparent 70%);
  pointer-events: none;
  filter: blur(30px);
  animation: hp-orb-drift 20s ease-in-out infinite;
}

.hp7-ai-content {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.hp7-ai-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(139,92,246,.2), rgba(99,102,241,.1));
  border: 1px solid rgba(139, 92, 246, .25);
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(139,92,246,.1);
}

.hp7-ai-body {
  flex: 1;
  min-width: 0;
}

.hp7-ai-label {
  font-family: 'Montserrat', sans-serif;
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  background: linear-gradient(135deg, #c4b5fd, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.hp7-ai-text {
  font-size: .78rem;
  color: #e4e4e7;
  line-height: 1.55;
  font-weight: 500;
}

.hp7-ai-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 14px;
  border-radius: 10px;
  background: rgba(139, 92, 246, .12);
  border: 1px solid rgba(139, 92, 246, .2);
  color: #c4b5fd;
  font-size: .64rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}

.hp7-ai-action:hover {
  background: rgba(139, 92, 246, .2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139,92,246,.15);
}

.hp7-ai-projected {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(74, 222, 128, .06);
  border: 1px solid rgba(74, 222, 128, .1);
  font-size: .6rem;
  color: #4ade80;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 5  MERGED "THIS WEEK" CARD
   Combines This Week + Streak + Training Volume into one dense card
   ═══════════════════════════════════════════════════════════════════════════ */

.hp7-unified-week {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.hp7-uw-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hp7-uw-streak-badge {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(245,158,11,.12), rgba(251,191,36,.06));
  border: 1px solid rgba(245, 158, 11, .2);
  flex-shrink: 0;
}

.hp7-uw-streak-num {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: #fbbf24;
  line-height: 1;
}

.hp7-uw-streak-lbl {
  font-size: .44rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #a1a1aa;
  font-weight: 600;
}

.hp7-uw-kpis {
  display: flex;
  gap: 20px;
  flex: 1;
}

.hp7-uw-kpi {
  display: flex;
  flex-direction: column;
}

.hp7-uw-kpi-val {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: #f4f4f5;
}

.hp7-uw-kpi-lbl {
  font-size: .52rem;
  color: #71717a;
  font-weight: 600;
}

/* Weekly strip */
.hp7-uw-strip {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 44px;
}

.hp7-uw-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hp7-uw-day-bar {
  width: 100%;
  border-radius: 4px 4px 2px 2px;
  background: rgba(63, 63, 70, .3);
  transition: all .3s;
  min-height: 8px;
}

.hp7-uw-day-bar.active {
  background: linear-gradient(180deg, #a78bfa 0%, #6366f1 100%);
  box-shadow: 0 0 8px rgba(139,92,246,.2);
}

.hp7-uw-day-bar.today {
  border: 1px solid rgba(245,158,11,.4);
}

.hp7-uw-day-bar.today.active {
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 0 8px rgba(245,158,11,.2);
}

.hp7-uw-day-lbl {
  font-size: .48rem;
  color: #52525b;
  font-weight: 600;
}

.hp7-uw-day-lbl.today {
  color: #fbbf24;
  font-weight: 700;
}

/* Streak actions row */
.hp7-uw-cta-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.hp7-uw-cta {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .06);
  color: #a1a1aa;
  font-size: .62rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}

.hp7-uw-cta:hover {
  background: rgba(139, 92, 246, .1);
  border-color: rgba(139, 92, 246, .2);
  color: #c4b5fd;
  transform: translateY(-1px);
}

.hp7-uw-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: .64rem;
  font-weight: 600;
}

.hp7-uw-status.active {
  background: rgba(74, 222, 128, .08);
  border: 1px solid rgba(74, 222, 128, .12);
  color: #4ade80;
}

.hp7-uw-status.urgent {
  background: rgba(245, 158, 11, .08);
  border: 1px solid rgba(245, 158, 11, .12);
  color: #fbbf24;
  animation: hp-urgency-throb 2s ease-in-out infinite;
}

.hp7-uw-status.start {
  background: rgba(139, 92, 246, .08);
  border: 1px solid rgba(139, 92, 246, .12);
  color: #c4b5fd;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 6  CURRENT FORM — Premium Empty State
   ═══════════════════════════════════════════════════════════════════════════ */

.hp7-form-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 0;
  text-align: center;
}

.hp7-form-empty-visual {
  position: relative;
  width: 120px;
  height: 120px;
}

.hp7-form-empty-ring {
  width: 100%;
  height: 100%;
}

.hp7-form-empty-ring circle {
  fill: none;
  stroke-width: 4;
}

.hp7-form-empty-ring .ring-bg {
  stroke: rgba(63, 63, 70, .25);
}

.hp7-form-empty-ring .ring-ghost {
  stroke: rgba(139, 92, 246, .1);
  stroke-dasharray: 12 8;
  animation: hp-ring-spin 20s linear infinite;
  transform-origin: center;
}

.hp7-form-empty-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hp7-form-empty-num {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: #3f3f46;
}

.hp7-form-empty-title {
  font-family: 'Montserrat', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  color: #d4d4d8;
}

.hp7-form-empty-desc {
  font-size: .68rem;
  color: #71717a;
  line-height: 1.5;
  max-width: 260px;
}

.hp7-form-empty-pills {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.hp7-form-empty-pill {
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(139, 92, 246, .06);
  border: 1px solid rgba(139, 92, 246, .1);
  color: #a1a1aa;
  font-size: .56rem;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 7  NEXT FIXTURE / SCHEDULE CARD
   ═══════════════════════════════════════════════════════════════════════════ */

.hp7-fixture {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.hp7-fixture-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(99,102,241,.04));
  border: 1px solid rgba(99, 102, 241, .2);
  flex-shrink: 0;
}

.hp7-fixture-days {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: #818cf8;
  line-height: 1;
}

.hp7-fixture-days-lbl {
  font-size: .44rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #71717a;
  font-weight: 600;
}

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

.hp7-fixture-title {
  font-weight: 700;
  font-size: .82rem;
  color: #e4e4e7;
  margin-bottom: 2px;
}

.hp7-fixture-meta {
  font-size: .62rem;
  color: #71717a;
  font-weight: 500;
}

.hp7-fixture-empty {
  text-align: center;
  padding: 16px 0;
}

.hp7-fixture-empty p {
  font-size: .68rem;
  color: #71717a;
  line-height: 1.5;
}

.hp7-fixture-empty strong {
  color: #818cf8;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 8  IMPROVED SEASON TARGETS
   ═══════════════════════════════════════════════════════════════════════════ */

.hp7-season-spotlight {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin-top: 10px;
  border-radius: 12px;
  background: rgba(245, 158, 11, .06);
  border: 1px solid rgba(245, 158, 11, .1);
}

.hp7-season-spotlight-icon {
  font-size: 1.1rem;
}

.hp7-season-spotlight-text {
  font-size: .66rem;
  color: #fbbf24;
  font-weight: 600;
}

/* Season bar fills — color by type */
.hp7-season-fill.goals { background: linear-gradient(90deg, rgba(139,92,246,.6), rgba(168,85,247,.8)) !important; }
.hp7-season-fill.assists { background: linear-gradient(90deg, rgba(245,158,11,.5), rgba(251,191,36,.7)) !important; }
.hp7-season-fill.matches { background: linear-gradient(90deg, rgba(99,102,241,.5), rgba(129,140,248,.7)) !important; }
.hp7-season-fill.wins { background: linear-gradient(90deg, rgba(74,222,128,.5), rgba(52,211,153,.7)) !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   § 9  COMPACT QUICK-LINKS (Replaces giant Explore grid)
   ═══════════════════════════════════════════════════════════════════════════ */

.hp7-quicklinks {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.hp7-quicklink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  color: #a1a1aa;
  font-size: .7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s;
  text-decoration: none;
  flex: 1;
  min-width: 140px;
  justify-content: center;
}

.hp7-quicklink:hover {
  background: rgba(139, 92, 246, .08);
  border-color: rgba(139, 92, 246, .2);
  color: #c4b5fd;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}

.hp7-quicklink--soon {
  opacity: .4;
  pointer-events: none;
}

.hp7-quicklink-icon {
  font-size: .9rem;
  opacity: .7;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 10  PERSONALIZED COACH NOTE (Replaces generic quote)
   ═══════════════════════════════════════════════════════════════════════════ */

.hp7-coach-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 4px 0;
}

.hp7-coach-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(245,158,11,.15), rgba(251,191,36,.08));
  border: 1px solid rgba(245, 158, 11, .2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.hp7-coach-body {
  flex: 1;
}

.hp7-coach-label {
  font-size: .56rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #fbbf24;
  margin-bottom: 4px;
}

.hp7-coach-text {
  font-size: .72rem;
  color: #d4d4d8;
  line-height: 1.55;
  font-weight: 500;
}

.hp7-coach-focus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(245, 158, 11, .08);
  border: 1px solid rgba(245, 158, 11, .12);
  color: #fbbf24;
  font-size: .6rem;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 11  RECENT ACTIVITY — Better Empty State
   ═══════════════════════════════════════════════════════════════════════════ */

.hp7-feed-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hp7-feed-preview-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, .06);
  background: rgba(255, 255, 255, .015);
}

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

.hp7-feed-preview-dot.match { background: #a78bfa; }
.hp7-feed-preview-dot.training { background: #4ade80; }
.hp7-feed-preview-dot.journal { background: #fbbf24; }

.hp7-feed-preview-text {
  font-size: .64rem;
  color: #52525b;
  font-style: italic;
}

.hp7-feed-hint {
  text-align: center;
  margin-top: 8px;
  font-size: .6rem;
  color: #3f3f46;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 12  MICRO-INTERACTIONS & REWARD ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Streak flame animation */
@keyframes hp7-flame {
  0%, 100% { transform: rotate(-2deg) scale(1); }
  25% { transform: rotate(2deg) scale(1.05); }
  50% { transform: rotate(-1deg) scale(1.02); }
  75% { transform: rotate(1.5deg) scale(1.04); }
}

.hp7-uw-streak-flame {
  display: inline-block;
  animation: hp7-flame 1.5s ease-in-out infinite;
  transform-origin: bottom center;
}

/* XP gain pop */
@keyframes hp7-xp-pop {
  0% { transform: scale(0.8) translateY(4px); opacity: 0; }
  50% { transform: scale(1.15) translateY(-2px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.hp7-xp-gain {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(168,85,247,.15), rgba(192,132,252,.08));
  border: 1px solid rgba(168, 85, 247, .25);
  color: #c4b5fd;
  font-size: .56rem;
  font-weight: 700;
  animation: hp7-xp-pop .5s cubic-bezier(.34,1.56,.64,1);
}

/* Progress bars animate in */
@keyframes hp7-bar-fill {
  from { width: 0; }
}

.hp7-season-fill,
.hp7-xp-fill,
.hp7-ach-pfill,
.hp7-onboarding-fill {
  animation: hp7-bar-fill 1.2s cubic-bezier(.4,0,.2,1);
}

/* Card hover lift with border brighten */
.hp7-card {
  transition: all .3s cubic-bezier(.4,0,.2,1) !important;
}

.hp7-card:hover {
  transform: translateY(-4px) !important;
}

/* Achievement unlock toast */
@keyframes hp7-toast-in {
  from { transform: translateY(20px) scale(.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.hp7-achievement-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(245,158,11,.15), rgba(16,16,22,.95));
  border: 1px solid rgba(245, 158, 11, .3);
  box-shadow: 0 8px 32px rgba(0,0,0,.4), 0 0 40px rgba(245,158,11,.1);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: hp7-toast-in .5s cubic-bezier(.34,1.56,.64,1);
  backdrop-filter: blur(20px);
}

.hp7-achievement-toast-icon {
  font-size: 1.4rem;
}

.hp7-achievement-toast-body {
  display: flex;
  flex-direction: column;
}

.hp7-achievement-toast-label {
  font-size: .52rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #fbbf24;
}

.hp7-achievement-toast-name {
  font-size: .78rem;
  font-weight: 700;
  color: #f4f4f5;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 13  TYPOGRAPHY HIERARCHY SHARPENING
   ═══════════════════════════════════════════════════════════════════════════ */

/* Hero name — bigger, bolder */
.hp7-title {
  font-size: clamp(2.2rem, 5vw, 3.2rem) !important;
  font-weight: 900 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.1 !important;
  color: #ffffff !important;
}

/* Section headings */
.hp7-card-head {
  margin-bottom: 12px !important;
}

/* Metric numbers should be JetBrains Mono for sharpness */
.hp7-stat-val,
.hp7-ring-num,
.hp7-uw-streak-num,
.hp7-uw-kpi-val,
.hp7-fixture-days,
.hp7-week-snap-val {
  font-feature-settings: 'tnum' 1;
}

/* Body copy — readable, not washed out */
.hp7-nba-reason,
.hp7-mission-desc,
.hp7-coach-text,
.hp7-ai-text {
  font-size: .72rem !important;
  line-height: 1.55 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 14  ACCENT COLOR DISCIPLINE
   Purple = system/progression/analytics
   Gold = action/priority/rewards
   Green = positive status
   Grey = locked/inactive ONLY
   ═══════════════════════════════════════════════════════════════════════════ */

/* Purple system elements */
.hp7-card-label .hp7-ic {
  color: #c4b5fd !important;
}

/* Gold action elements */
.hp7-act--gold {
  box-shadow:
    0 6px 24px rgba(245,158,11,.25),
    0 0 0 1px rgba(245,158,11,.3),
    inset 0 1px 0 rgba(255,255,255,.3) !important;
}

/* Green positive elements */
.hp7-feed-badge.W {
  background: rgba(74, 222, 128, .12) !important;
  color: #4ade80 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 15  GLOW DISCIPLINE
   Only primary CTA, hero, and one high-priority card get glow
   ═══════════════════════════════════════════════════════════════════════════ */

/* Remove ambient glow from regular cards */
.hp7-card::before {
  background: linear-gradient(160deg, rgba(255,255,255,.03), transparent 50%) !important;
}

/* Keep glow only on hero and highlight card */
.hp7-hero::before,
.hp7-card--highlight::before,
.hp7-card--ai-insight::before {
  background: linear-gradient(160deg, rgba(139,92,246,.06), rgba(245,158,11,.03), transparent 60%) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 16  RESPONSIVE OVERRIDES
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .hp7-hero {
    padding: 24px 20px 24px !important;
  }
  
  .hp7-hero-top {
    flex-direction: column !important;
    gap: 16px !important;
  }
  
  .hp7-onboarding,
  .hp7-week-snap {
    max-width: 100%;
    min-width: auto;
  }
  
  .hp7-uw-header {
    flex-wrap: wrap;
  }
  
  .hp7-uw-kpis {
    gap: 12px;
    flex-wrap: wrap;
  }
  
  .hp7-quicklinks {
    gap: 6px;
  }
  
  .hp7-quicklink {
    min-width: 100px;
    padding: 8px 12px;
    font-size: .62rem;
  }
  
  .hp7-ai-content {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  
  .hp7-fixture {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hp7-week-snap {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  
  .hp7-week-snap-val {
    font-size: 1rem;
  }
  
  .hp7-uw-cta-row {
    flex-direction: column;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 17  CONFETTI KEYFRAME (for V8 engine)
   ═══════════════════════════════════════════════════════════════════════════ */

@keyframes hp7confetti {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx), var(--dy)) rotate(720deg);
    opacity: 0;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 18  AI INSIGHT CARD (template-specific)
   ═══════════════════════════════════════════════════════════════════════════ */

.hp7-card--ai-insight {
  margin-bottom: 4px;
}

.hp7-card--ai-insight .hp7-card-head {
  margin-bottom: 8px !important;
}

.hp7-ai-insight-body {
  position: relative;
  z-index: 1;
}

.hp7-ai-insight-body p {
  font-size: .74rem;
  color: #d4d4d8;
  line-height: 1.6;
  font-weight: 500;
  margin: 0;
}

.hp7-tag--purple {
  background: rgba(139, 92, 246, .12) !important;
  color: #c4b5fd !important;
  border-color: rgba(139, 92, 246, .2) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 19  STAT CARD EMPTY HINTS
   ═══════════════════════════════════════════════════════════════════════════ */

.hp7-stat-empty-hint {
  font-size: .52rem;
  color: #52525b;
  font-weight: 500;
  margin-top: 4px;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 20  UNIFIED WEEK — Streak + Volume compact sections
   ═══════════════════════════════════════════════════════════════════════════ */

.hp7-uw-streak {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(245, 158, 11, .04);
  border: 1px solid rgba(245, 158, 11, .08);
}

.hp7-uw-streak-num {
  font-family: 'Montserrat', sans-serif;
  font-size: .88rem;
  font-weight: 800;
  line-height: 1;
}

.hp7-uw-streak-lbl {
  font-size: .56rem;
  color: #a1a1aa;
  font-weight: 500;
}

.hp7-uw-volume {
  display: flex;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(99, 102, 241, .04);
  border: 1px solid rgba(99, 102, 241, .08);
  margin-top: 8px;
}

.hp7-uw-vol-item {
  font-size: .56rem;
  color: #71717a;
  font-weight: 500;
}

.hp7-uw-vol-item span {
  color: #a1a1aa;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 21  QUICK LINKS GRID
   ═══════════════════════════════════════════════════════════════════════════ */

.hp7-quicklinks-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.hp7-quicklink-ic {
  font-size: .82rem;
  opacity: .7;
}

.hp7-quicklink-name {
  font-size: .66rem;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 22  FIXTURE CARD (template-specific)
   ═══════════════════════════════════════════════════════════════════════════ */

.hp7-card--fixture {
  background:
    linear-gradient(135deg, rgba(74,222,128,.04) 0%, rgba(16,16,22,.88) 100%),
    rgba(18, 18, 24, .9) !important;
  border-color: rgba(74, 222, 128, .12) !important;
}

.hp7-fixture-body {
  padding: 4px 0;
}

.hp7-fixture-opponent {
  font-family: 'Montserrat', sans-serif;
  font-size: .88rem;
  font-weight: 700;
  color: #e4e4e7;
  margin-bottom: 4px;
}

.hp7-fixture-meta {
  font-size: .62rem;
  color: #71717a;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 23  COACH NOTE CARD
   ═══════════════════════════════════════════════════════════════════════════ */

.hp7-card--coach {
  background:
    linear-gradient(135deg, rgba(245,158,11,.04) 0%, rgba(16,16,22,.88) 100%),
    rgba(18, 18, 24, .9) !important;
  border-color: rgba(245, 158, 11, .1) !important;
}

.hp7-coach-note p {
  font-size: .72rem;
  color: #d4d4d8;
  line-height: 1.55;
  font-weight: 500;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 24  FEED GHOST ROWS (empty state)
   ═══════════════════════════════════════════════════════════════════════════ */

.hp7-feed-empty-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hp7-feed-row--ghost {
  opacity: .4;
  pointer-events: none;
  border: 1px dashed rgba(255,255,255,.04);
  border-radius: 8px;
  padding: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 25  SEASON TARGETS EMPTY STATE
   ═══════════════════════════════════════════════════════════════════════════ */

.hp7-season-empty {
  text-align: center;
  padding: 20px 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 26  FORM EMPTY STATE (from template)
   ═══════════════════════════════════════════════════════════════════════════ */

.hp7-form-empty {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
}

.hp7-form-empty-ring {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  position: relative;
}

.hp7-form-empty-ring svg {
  width: 100%;
  height: 100%;
}

.hp7-form-empty-ring .hp7-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hp7-form-empty-text {
  flex: 1;
}

@keyframes hp-ring-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes hp-orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(15px, -10px) scale(1.05); }
  66% { transform: translate(-10px, 8px) scale(.97); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 27  ICON CONTAINER FIXES — border-radius clip + icon sizing
   ═══════════════════════════════════════════════════════════════════════════ */

/* Fix: .hp7-nav-ic must clip its content at its own border-radius.
   Without overflow:hidden the SVG corners bleed past the rounded edges,
   making the container look square despite border-radius: 11px. */
.hp7-nav-ic {
  overflow: hidden !important;
  flex-shrink: 0 !important;
  /* Ensure the box itself is a stable block so border-radius applies */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Constrain icon SVGs/i elements inside .hp7-nav-ic to stay within the box */
.hp7-nav-ic > svg.elite-icon,
.hp7-nav-ic > i.elite-icon,
.hp7-nav-ic > span.elite-icon-fallback {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  display: block !important;
  flex-shrink: 0 !important;
  overflow: visible;
}

/* Fix: uniform vertical centering on explore/nav cards — use center not flex-start
   so all icon containers sit at the same height regardless of content differences */
.hp7-nav-link {
  align-items: center !important;
}

/* Fix: card-label .hp7-ic also needs overflow:hidden so border-radius clips the icon */
.hp7-card-label .hp7-ic {
  overflow: hidden !important;
}

.hp7-card-label .hp7-ic > svg.elite-icon,
.hp7-card-label .hp7-ic > i.elite-icon,
.hp7-card-label .hp7-ic > span.elite-icon-fallback {
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  min-height: 15px !important;
  max-width: 15px !important;
  max-height: 15px !important;
  display: block !important;
  flex-shrink: 0 !important;
}

/* Fix: .hp7-quicklink-ic — proper sized icon container for the new quicklinks strip */
.hp7-quicklink-ic {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 7px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  opacity: 1 !important;
}

/* Constrain icons inside quicklink icon wrapper */
.hp7-quicklink-ic > svg.elite-icon,
.hp7-quicklink-ic > i.elite-icon,
.hp7-quicklink-ic > span.elite-icon-fallback {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  display: block !important;
  flex-shrink: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 28  EXPLORE HUB — Unified Tile Grid
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Grid ── */
.hp7-explore-hub {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

/* ── Tile Base ── */
.hp7-explore-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  min-height: 80px;
  border-radius: 16px;
  background: rgba(24, 24, 27, .7);
  border: 1px solid rgba(255, 255, 255, .08);
  cursor: pointer;
  transition: all .22s cubic-bezier(.4,0,.2,1);
  text-decoration: none;
  color: #cbd5e1;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
}
.hp7-explore-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
  border-radius: inherit;
}
.hp7-explore-tile:hover:not(.hp7-explore-tile--soon) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.hp7-explore-tile:hover::before { opacity: 1; }

/* ── Icon ── */
.hp7-explore-tile-ic {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  transition: transform .2s;
  line-height: 1;
}
.hp7-explore-tile:hover:not(.hp7-explore-tile--soon) .hp7-explore-tile-ic {
  transform: scale(1.1);
}

/* ── Body ── */
.hp7-explore-tile-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hp7-explore-tile-name {
  font-size: .82rem;
  font-weight: 720;
  color: #f4f4f5;
  line-height: 1.15;
  white-space: normal;
  word-break: break-word;
}
.hp7-explore-tile-desc {
  font-size: .65rem;
  color: #a1a1aa;
  line-height: 1.4;
  white-space: normal;
  word-break: break-word;
}

/* ── Arrow ── */
.hp7-explore-tile-arrow {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  color: #71717a;
  flex-shrink: 0;
  transition: transform .2s, color .2s;
  opacity: .6;
}
.hp7-explore-tile:hover:not(.hp7-explore-tile--soon) .hp7-explore-tile-arrow {
  transform: translateX(3px);
  opacity: 1;
}

/* ── Color Variants ── */
/* Analytics — Indigo */
.hp7-explore-tile--analytics {
  border-color: rgba(99,102,241,.15);
  background: linear-gradient(135deg, rgba(99,102,241,.07), rgba(24,24,27,.75));
}
.hp7-explore-tile--analytics:hover { border-color: rgba(99,102,241,.3); }
.hp7-explore-tile--analytics::before { background: radial-gradient(circle at 30% 50%, rgba(99,102,241,.08), transparent 70%); }
.hp7-explore-tile--analytics .hp7-explore-tile-ic { background: rgba(99,102,241,.14); border: 1px solid rgba(99,102,241,.2); color: #a5b4fc; }
.hp7-explore-tile--analytics .hp7-explore-tile-arrow { color: #a5b4fc; }

/* Goals — Violet */
.hp7-explore-tile--goals {
  border-color: rgba(167,139,250,.15);
  background: linear-gradient(135deg, rgba(167,139,250,.07), rgba(24,24,27,.75));
}
.hp7-explore-tile--goals:hover { border-color: rgba(167,139,250,.3); }
.hp7-explore-tile--goals::before { background: radial-gradient(circle at 30% 50%, rgba(167,139,250,.08), transparent 70%); }
.hp7-explore-tile--goals .hp7-explore-tile-ic { background: rgba(167,139,250,.14); border: 1px solid rgba(167,139,250,.2); color: #d8b4fe; }
.hp7-explore-tile--goals .hp7-explore-tile-arrow { color: #d8b4fe; }

/* Calendar — Amber */
.hp7-explore-tile--calendar {
  border-color: rgba(245,158,11,.14);
  background: linear-gradient(135deg, rgba(245,158,11,.06), rgba(24,24,27,.75));
}
.hp7-explore-tile--calendar:hover { border-color: rgba(245,158,11,.28); }
.hp7-explore-tile--calendar::before { background: radial-gradient(circle at 30% 50%, rgba(245,158,11,.06), transparent 70%); }
.hp7-explore-tile--calendar .hp7-explore-tile-ic { background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.18); color: #fcd34d; }
.hp7-explore-tile--calendar .hp7-explore-tile-arrow { color: #fcd34d; }

/* Recovery — Gold */
.hp7-explore-tile--recovery {
  border-color: rgba(251,191,36,.16);
  background: linear-gradient(135deg, rgba(251,191,36,.08), rgba(24,24,27,.75));
}
.hp7-explore-tile--recovery:hover { border-color: rgba(251,191,36,.3); }
.hp7-explore-tile--recovery::before { background: radial-gradient(circle at 30% 50%, rgba(251,191,36,.07), transparent 70%); }
.hp7-explore-tile--recovery .hp7-explore-tile-ic { background: rgba(251,191,36,.13); border: 1px solid rgba(251,191,36,.2); color: #fde68a; }
.hp7-explore-tile--recovery .hp7-explore-tile-arrow { color: #fde68a; }

/* Journal — Purple */
.hp7-explore-tile--journal {
  border-color: rgba(192,132,252,.16);
  background: linear-gradient(135deg, rgba(192,132,252,.07), rgba(24,24,27,.75));
}
.hp7-explore-tile--journal:hover { border-color: rgba(192,132,252,.3); }
.hp7-explore-tile--journal::before { background: radial-gradient(circle at 30% 50%, rgba(192,132,252,.07), transparent 70%); }
.hp7-explore-tile--journal .hp7-explore-tile-ic { background: rgba(192,132,252,.13); border: 1px solid rgba(192,132,252,.2); color: #e9d5ff; }
.hp7-explore-tile--journal .hp7-explore-tile-arrow { color: #e9d5ff; }

/* Community — Slate */
.hp7-explore-tile--community {
  border-color: rgba(148,163,184,.14);
  background: linear-gradient(135deg, rgba(148,163,184,.05), rgba(24,24,27,.75));
}
.hp7-explore-tile--community:hover:not(.hp7-explore-tile--soon) { border-color: rgba(148,163,184,.24); }
.hp7-explore-tile--community::before { background: radial-gradient(circle at 30% 50%, rgba(148,163,184,.05), transparent 70%); }
.hp7-explore-tile--community .hp7-explore-tile-ic { background: rgba(148,163,184,.10); border: 1px solid rgba(148,163,184,.16); color: #cbd5e1; }
.hp7-explore-tile--community .hp7-explore-tile-arrow { color: #94a3b8; }

/* ── Disabled / Coming Soon ── */
.hp7-explore-tile--soon {
  opacity: .65;
  cursor: not-allowed;
}
.hp7-explore-tile--soon:hover {
  transform: none !important;
  box-shadow: none !important;
}
.hp7-explore-tile--soon .hp7-explore-tile-name { color: #a1a1aa; }
.hp7-explore-tile--soon .hp7-explore-tile-arrow { color: #52525b; opacity: .5; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hp7-explore-hub {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 520px) {
  .hp7-explore-hub {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .hp7-explore-tile {
    min-height: 68px;
    padding: 14px 14px;
  }
  .hp7-explore-tile-ic {
    width: 36px;
    height: 36px;
    font-size: .95rem;
  }
  .hp7-explore-tile-name { font-size: .78rem; }
  .hp7-explore-tile-desc { font-size: .6rem; }
}
