
/* The HTML [hidden] attribute is supposed to render an element as
   display:none via the user-agent stylesheet, but any author rule
   that sets `display:` on the same element wins by specificity.
   Enforcing it with !important so a <button hidden> stays hidden no
   matter what (e.g. nav items gated to specific tiers). */
[hidden] { display: none !important; }

:root {
  --gold:        #D8B45A;
  --gold-bright: #f0cc6e;
  --gold-dim:    rgba(216,180,90,0.12);
  --gold-glow:   rgba(216,180,90,0.25);
  --bg:          #07080c;
  --card:        rgba(255,255,255,0.032);
  --card2:       rgba(255,255,255,0.055);
  --border:      rgba(255,255,255,0.07);
  --border-gold: rgba(216,180,90,0.28);
  --text:        #fff;
  --muted:       rgba(255,255,255,0.38);
  --silver:      #a8a8b8;
  --bronze:      #c87a3a;
  --usa:         #2A398D;
  --canada:      #E61D25;
  --mexico:      #3CAC3B;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Barlow', -apple-system, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 120% 55% at 50% -5%,  rgba(216,180,90,0.07) 0%, transparent 55%),
    radial-gradient(ellipse 50%  40% at 8%   90%, rgba(42,57,141,0.05)  0%, transparent 60%),
    radial-gradient(ellipse 40%  35% at 92%  70%, rgba(230,29,37,0.04)  0%, transparent 55%);
  pointer-events: none;
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  opacity: 0.5; pointer-events: none;
}

/* ── Header ── */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 62px;
  background: rgba(7,8,12,0.88);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 0.5px solid var(--border);
}
header::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--usa) 0%, var(--usa) 33%, var(--mexico) 33%, var(--mexico) 66%, var(--canada) 66%, var(--canada) 100%);
}
.hdrInner {
  max-width: 1100px; height: 62px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.hdrLeft { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.hdrLogo { height: 32px; width: auto; opacity: 0.92; }
.hdrDiv  { width: 1px; height: 24px; background: var(--border); }
.hdrSiteName { font-family: 'Barlow Condensed', sans-serif; font-size: 15px; font-weight: 800; letter-spacing: .08em; color: rgba(255,255,255,0.88); }
.hdrSiteSub  { font-size: 10px; font-weight: 500; color: var(--muted); letter-spacing: .04em; }
.hdrRight { display: flex; align-items: center; gap: 10px; }

/* Free-tier Upgrade pill (hidden unless tier === 'free') */
.hdrUpgradePill {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  background: rgba(216,180,90,0.08);
  border: 1px solid rgba(216,180,90,0.38);
  border-radius: 999px;
  color: #D8B45A;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.hdrUpgradePill:hover { background: rgba(216,180,90,0.16); border-color: rgba(216,180,90,0.60); transform: translateY(-1px); }
.hdrUpgradePill[hidden] { display: none !important; }
@media (max-width: 480px) {
  .hdrUpgradePill { padding: 6px 10px; font-size: 10px; }
}

/* ── Matching menu from bracket.html ── */
.hdrMenu { position: relative; }
.hdrMenuBtn {
  all: unset;
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px 0 10px; height: 36px; border-radius: 999px; cursor: pointer;
  background: rgba(216,180,90,0.10); border: 0.5px solid rgba(216,180,90,0.30);
  color: rgba(255,255,255,0.85); font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  transition: background 160ms ease, border-color 160ms ease; white-space: nowrap;
}
.hdrMenuBtn:hover { background: rgba(216,180,90,0.18); border-color: rgba(216,180,90,0.55); }
.hdrMenuIcon { display: flex; flex-direction: column; gap: 3.5px; flex-shrink: 0; }
.hdrMenuIcon span {
  display: block; height: 1.5px; border-radius: 2px;
  background: #D8B45A; transition: width 160ms ease;
}
.hdrMenuIcon span:nth-child(1) { width: 14px; }
.hdrMenuIcon span:nth-child(2) { width: 10px; }
.hdrMenuIcon span:nth-child(3) { width: 14px; }
.hdrMenuBtn:hover .hdrMenuIcon span { width: 14px; }
.hdrDropdown {
  display: none; position: absolute; top: calc(100% + 10px); right: 0;
  background: rgba(10,12,18,0.98); border: 0.5px solid rgba(255,255,255,0.10);
  border-radius: 16px; padding: 8px; min-width: 200px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.70), 0 0 0 0.5px rgba(216,180,90,0.08);
  backdrop-filter: blur(24px); z-index: 200;
}
.hdrDropdown.open { display: block; animation: dropIn 160ms cubic-bezier(.22,.68,0,1.2); }
@keyframes dropIn {
  from { opacity:0; transform:translateY(-8px) scale(0.97); }
  to   { opacity:1; transform:translateY(0)   scale(1); }
}
.hdrDropItem {
  all: unset; display: block; width: 100%; box-sizing: border-box;
  padding: 10px 14px; text-align: left; font-family: 'Barlow', sans-serif;
  font-size: 13px; font-weight: 600; letter-spacing: .01em;
  color: rgba(255,255,255,0.65); cursor: pointer; border-radius: 10px;
  transition: background 120ms ease, color 120ms ease;
}
.hdrDropItem:hover { background: rgba(255,255,255,0.06); color: #fff; }
.hdrDropItem.gold { color: #D8B45A; font-weight: 700; letter-spacing: .02em; }
.hdrDropItem.gold:hover { background: rgba(216,180,90,0.10); color: #e8c96a; }
.hdrDropItem.danger { color: rgba(255,90,90,0.75); }
.hdrDropItem.danger:hover { background: rgba(255,60,60,0.08); color: #ff6060; }
.hdrDropSep { height: 0.5px; background: rgba(255,255,255,0.07); margin: 6px 8px; }
@media (max-width: 640px) {
  .hdrMenuLabel { display: none; }
  .hdrMenuBtn { padding: 0 10px; gap: 0; }
}

/* ── Layout ── */
main { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 90px 20px 80px; }

/* ── Hero ── */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 44px; flex-wrap: wrap; }
.heroLeft { flex: 1; min-width: 200px; }
.heroBadge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--gold-dim); border: 0.5px solid var(--border-gold);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}
.pulseDot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.7)} }
.heroTitle {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(42px, 7vw, 72px);
  font-weight: 900; letter-spacing: -.01em; line-height: .92;
  color: #fff; text-transform: uppercase;
}
.heroTitle em { color: var(--gold); font-style: normal; }
.heroSub { margin-top: 10px; font-size: 14px; color: var(--muted); font-weight: 500; line-height: 1.5; }

/* ── Podium ── */
.podiumSection { margin-bottom: 32px; display: none; }
.podiumSection.visible { display: block; }
.sectionLabel { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; gap: 10px; align-items: flex-end; }
.podCard {
  border-radius: 18px; overflow: hidden; position: relative;
  background: var(--card); border: 0.5px solid var(--border);
  text-align: center; padding: 20px 14px 18px;
  transition: transform 200ms; animation: cardIn 500ms ease both;
}
.podCard:hover { transform: translateY(-4px); }
@keyframes cardIn { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }
.podCard.rank1 {
  border-color: var(--border-gold);
  background: linear-gradient(160deg, rgba(216,180,90,0.08) 0%, var(--card) 60%);
  padding-top: 28px;
}
.podCard.rank1::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 90% 50% at 50% 0%, rgba(216,180,90,0.14), transparent 65%);
  pointer-events: none;
}
.podCard.rank2 { animation-delay: 80ms; }
.podCard.rank3 { animation-delay: 160ms; }
.podMedal { font-size: 26px; margin-bottom: 10px; display: block; }
.podAvatar {
  width: 52px; height: 52px; border-radius: 50%;
  margin: 0 auto 10px; background: var(--card2); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 900; color: var(--muted);
}
.rank1 .podAvatar { border-color: rgba(216,180,90,0.55); color: var(--gold); background: var(--gold-dim); }
.rank2 .podAvatar { border-color: rgba(168,168,184,0.45); color: var(--silver); }
.rank3 .podAvatar { border-color: rgba(200,122,58,0.40); color: var(--bronze); }
.podName { font-family: 'Barlow Condensed', sans-serif; font-size: 17px; font-weight: 800; letter-spacing: .02em; color: #fff; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.podChamp { font-size: 11px; color: var(--muted); margin-bottom: 14px; min-height: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.podScore { font-family: 'Barlow Condensed', sans-serif; font-size: 32px; font-weight: 900; color: var(--gold); line-height: 1; }
.rank2 .podScore { color: var(--silver); font-size: 26px; }
.rank3 .podScore { color: var(--bronze); font-size: 24px; }
.podScoreLabel { font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }

/* ── Controls ── */
.controls { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.searchWrap { flex: 1; min-width: 180px; position: relative; }
.searchWrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); opacity: 0.3; pointer-events: none; }
.searchInput {
  all: unset; display: block; width: 100%; box-sizing: border-box;
  padding: 10px 14px 10px 38px;
  background: var(--card); border: 0.5px solid var(--border);
  border-radius: 10px; font-family: 'Barlow', sans-serif; font-size: 13px; color: #fff;
  transition: border-color 150ms;
}
.searchInput::placeholder { color: var(--muted); }
.searchInput:focus { border-color: var(--border-gold); outline: none; }
.ctrlBtn {
  all: unset; cursor: pointer; padding: 9px 15px; border-radius: 10px;
  font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: var(--card); border: 0.5px solid var(--border); color: var(--muted);
  transition: all 140ms; white-space: nowrap;
}
.ctrlBtn:hover, .ctrlBtn.active { border-color: var(--border-gold); color: var(--gold); background: var(--gold-dim); }
.refreshBtn {
  all: unset; cursor: pointer; display: flex; align-items: center; gap: 6px;
  padding: 9px 15px; border-radius: 10px;
  font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: var(--card); border: 0.5px solid var(--border); color: var(--muted);
  transition: all 140ms;
}
.refreshBtn:hover { border-color: var(--border-gold); color: var(--gold); }
.refreshIcon { display: flex; transition: transform 600ms ease; }
.refreshBtn.spinning .refreshIcon { transform: rotate(360deg); }

/* ── Table ── */
.lbCard { background: var(--card); border: 0.5px solid var(--border); border-radius: 18px; overflow: hidden; }
.lbHead {
  display: grid; grid-template-columns: 48px 180px 1fr 140px 80px;
  padding: 10px 20px;
  background: rgba(255,255,255,0.018); border-bottom: 0.5px solid var(--border);
  font-family: 'Barlow Condensed', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.lbRow {
  display: grid; grid-template-columns: 48px 180px 1fr 140px 80px;
  padding: 12px 20px; align-items: center; border-bottom: 0.5px solid var(--border);
  transition: background 110ms; animation: rowIn 280ms ease both;
}
.lbRow:last-child { border-bottom: none; }
.lbRow:hover { background: rgba(255,255,255,0.022); }
.lbRow.isYou { background: rgba(216,180,90,0.06) !important; border-left: 2.5px solid var(--gold); }
@keyframes rowIn { from{opacity:0;transform:translateX(-6px)} to{opacity:1;transform:translateX(0)} }

/* Wraps the rank badge + the movement arrow underneath it so they
   stack within the existing 48px rank column without forcing a new
   grid column. */
.rankCell {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px;
}
.rankBadge {
  width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 800;
  background: var(--card2); color: var(--muted);
}
/* Movement arrows — diff against the previous page-load's snapshot. */
.lbMove {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 9px; font-weight: 800; letter-spacing: 0.04em;
  line-height: 1; padding: 2px 5px; border-radius: 5px;
  white-space: nowrap;
}
.lbMove--up   { color: rgba(60,210,80,0.95); background: rgba(60,210,80,0.12); }
.lbMove--down { color: rgba(255,90,90,0.92); background: rgba(255,90,90,0.10); }
.lbMove--flat { color: rgba(255,255,255,0.30); padding: 2px 0; }
.rankBadge.gold   { background: rgba(216,180,90,0.18); color: var(--gold); }
.rankBadge.silver { background: rgba(168,168,184,0.14); color: var(--silver); }
.rankBadge.bronze { background: rgba(200,122,58,0.14);  color: var(--bronze); }

.playerCell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.playerAvatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--card2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 800; color: var(--muted);
}
.playerInfo { min-width: 0; }
.playerName { font-size: 14px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.youTag {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 9px; font-weight: 800; letter-spacing: .10em; text-transform: uppercase;
  color: var(--gold); background: var(--gold-dim); border: 0.5px solid var(--border-gold);
  padding: 1px 6px; border-radius: 999px; flex-shrink: 0;
}
.playerPicks { font-size: 11px; color: var(--muted); margin-top: 1px; }
.champCell { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.50); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 10px; }
.bracketNameCell {
  font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.80);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-right: 12px;
}
.scoreCell { text-align: right; }
.scoreNum { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 900; color: var(--gold); line-height: 1; }
.scoreSub { font-size: 9px; font-weight: 700; letter-spacing: .10em; text-transform: uppercase; color: var(--muted); }

/* ── Skeleton ── */
.skeletonRow {
  display: grid; grid-template-columns: 48px 180px 1fr 140px 80px;
  padding: 14px 20px; align-items: center; border-bottom: 0.5px solid var(--border);
  animation: rowIn 200ms ease both;
}
.skel {
  background: linear-gradient(90deg, var(--card) 25%, var(--card2) 50%, var(--card) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 5px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Empty / Error ── */
.emptyState { padding: 72px 24px; text-align: center; }
.emptyIcon  { font-size: 44px; margin-bottom: 16px; display: block; }
.emptyTitle { font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 700; color: rgba(255,255,255,0.38); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.emptyText  { font-size: 13px; color: var(--muted); }

/* ── Pagination ── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 18px; }
.pageBtn {
  all: unset; cursor: pointer; width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 700;
  background: var(--card); border: 0.5px solid var(--border); color: var(--muted); transition: all 130ms;
}
.pageBtn:hover:not(:disabled), .pageBtn.active { background: var(--gold-dim); border-color: var(--border-gold); color: var(--gold); }
.pageBtn:disabled { opacity: 0.28; cursor: default; pointer-events: none; }
.pageEllipsis { color: var(--muted); line-height: 36px; padding: 0 2px; }

.lastUpdated { text-align: center; margin-top: 20px; font-size: 11px; color: var(--muted); }

/* ── Responsive ── */
@media (max-width: 640px) {
  .hdrSiteName, .hdrDiv { display: none; }
  .hdrLogo { height: 28px; }
  .heroTitle { font-size: 44px; }
  .podium { grid-template-columns: 1fr 1.08fr 1fr; gap: 6px; }
  .podCard { padding: 14px 8px; border-radius: 14px; }
  .podAvatar { width: 40px; height: 40px; font-size: 16px; }
  .podScore { font-size: 24px; }
  .rank2 .podScore, .rank3 .podScore { font-size: 20px; }
  .lbHead, .lbRow, .skeletonRow { grid-template-columns: 44px 120px 1fr 64px; }
  .lbHead > *:nth-child(4), .lbRow > *:nth-child(4), .skeletonRow > *:nth-child(4) { display: none; }
  .scoreNum { font-size: 18px; }
  .playerAvatar { width: 28px; height: 28px; font-size: 11px; }
}

/* ── User KPI Card ── */
.userCard {
  margin-bottom: 28px;
  border-radius: 18px;
  border: 1px solid rgba(216,180,90,0.45);
  background: linear-gradient(135deg, rgba(216,180,90,0.07) 0%, rgba(216,180,90,0.03) 60%, rgba(7,8,12,0) 100%);
  box-shadow: 0 0 0 1px rgba(216,180,90,0.10), 0 8px 40px rgba(216,180,90,0.08), inset 0 1px 0 rgba(216,180,90,0.15);
  overflow: hidden;
  position: relative;
}
/* subtle gold shimmer line at top */
.userCard::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216,180,90,0.60), transparent);
}
.userCardInner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 28px; gap: 20px; flex-wrap: wrap;
}
.userCardLeft {
  display: flex; align-items: center; gap: 16px; min-width: 0;
}
.userCardAvatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: rgba(216,180,90,0.12);
  border: 1.5px solid rgba(216,180,90,0.40);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px; font-weight: 900; color: var(--gold);
}
.userCardInfo { min-width: 0; }
.userCardName {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px; font-weight: 900; letter-spacing: .02em;
  color: #fff; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.userCardSub {
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(216,180,90,0.55); margin-top: 4px;
}
.userCardKpis {
  display: flex; align-items: center; gap: 0;
  flex-shrink: 0;
}
.userKpi {
  text-align: center; padding: 4px 28px;
}
.userKpiNum {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 34px; font-weight: 900; letter-spacing: -.01em;
  color: var(--gold); line-height: 1;
}
.userKpiLabel {
  font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(216,180,90,0.50); margin-top: 4px;
}
.userKpiDivider {
  width: 1px; height: 44px;
  background: rgba(216,180,90,0.20);
  flex-shrink: 0;
}

/* "Share Bracket" CTA on the user card — present for any logged-in user with a bracket. */
.userCardShare {
  display: inline-flex; align-items: center; gap: 8px;
  margin-left: auto; flex-shrink: 0;
  padding: 9px 16px;
  background: rgba(216,180,90,0.10);
  border: 1px solid rgba(216,180,90,0.32);
  border-radius: 999px;
  color: #D8B45A;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.userCardShare:hover {
  background: rgba(216,180,90,0.18);
  border-color: rgba(216,180,90,0.55);
  transform: translateY(-1px);
}
.userCardShare svg { flex-shrink: 0; }

@media (max-width: 640px) {
  .userCardInner { padding: 18px 18px; gap: 16px; }
  .userCardAvatar { width: 42px; height: 42px; font-size: 17px; }
  .userCardName { font-size: 18px; }
  .userKpi { padding: 4px 16px; }
  .userKpiNum { font-size: 26px; }
  .userKpiLabel { font-size: 9px; }
  .userCardShare { padding: 8px 12px; font-size: 11px; }
}
@media (max-width: 400px) {
  .userCardLeft { width: 100%; }
  .userCardKpis { width: 100%; justify-content: space-around; padding-top: 4px; }
  .userKpi { padding: 4px 10px; }
  .userCardShare { width: 100%; justify-content: center; margin-left: 0; }
}

/* ── Shop Perk Card ── */
.shopPerkCard {
  margin-bottom: 28px;
  border-radius: 18px;
  background: rgba(255,255,255,0.032);
  border: 0.5px solid var(--border);
  overflow: hidden;
  position: relative;
}

/* Header row: icon + title + shop link */
.shopPerkHeader {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 24px 0;
}
.shopPerkIcon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: rgba(216,180,90,0.08);
  border: 0.5px solid rgba(216,180,90,0.18);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
}
.shopPerkMeta { flex: 1; min-width: 0; }
.shopPerkLabel {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(216,180,90,0.55); margin-bottom: 2px;
}
.shopPerkTitle {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px; font-weight: 800; letter-spacing: .01em; color: #fff;
  line-height: 1.15;
}
.shopPerkLink {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 10px 18px; border-radius: 12px;
  background: rgba(216,180,90,0.10); border: 0.5px solid rgba(216,180,90,0.25);
  color: var(--gold); font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
  min-height: 44px; /* Apple HIG: 44pt min touch target */
  transition: background 150ms ease, border-color 150ms ease;
}
.shopPerkLink:hover {
  background: rgba(216,180,90,0.18); border-color: rgba(216,180,90,0.45);
}

/* Code rows container */
.shopCodesWrap {
  padding: 16px 24px 20px;
  display: flex; flex-direction: column; gap: 8px;
}

/* Individual code row */
.shopCodeRow {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px;
  background: rgba(0,0,0,0.20);
  border: 0.5px solid rgba(255,255,255,0.06);
  border-radius: 14px;
}
.shopCodeRow--expired { opacity: 0.40; }
.shopCodeLeft { min-width: 0; flex: 1; }
.shopCodeTag {
  font-size: 10px; font-weight: 600; letter-spacing: .04em;
  color: var(--muted); margin-bottom: 4px;
}
.shopCodeBracket {
  font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.45);
  margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 200px;
}
.shopCodeVal {
  font-family: 'SF Mono', ui-monospace, 'Fira Code', 'Consolas', monospace;
  font-size: 16px; font-weight: 700; letter-spacing: .08em; color: var(--gold);
  line-height: 1;
}
.shopCodeVal--expired {
  color: var(--muted); text-decoration: line-through;
}
.shopCodeExpiredTag {
  font-family: 'Barlow', sans-serif;
  font-size: 10px; font-weight: 700;
  color: rgba(255,90,90,0.70);
  background: rgba(255,90,90,0.08);
  padding: 2px 8px; border-radius: 6px; margin-left: 8px;
  vertical-align: middle; text-decoration: none; display: inline-block;
}

/* Copy button — 44pt min touch target per Apple HIG */
.shopCopyBtn {
  all: unset; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 72px; min-height: 44px;
  padding: 0 16px; border-radius: 12px;
  font-family: 'Barlow', sans-serif;
  font-size: 13px; font-weight: 700;
  background: rgba(216,180,90,0.10); border: 0.5px solid rgba(216,180,90,0.22);
  color: var(--gold); white-space: nowrap; flex-shrink: 0;
  transition: background 150ms ease, border-color 150ms ease, transform 100ms ease;
}
.shopCopyBtn:hover {
  background: rgba(216,180,90,0.18); border-color: rgba(216,180,90,0.45);
}
.shopCopyBtn:active { transform: scale(0.96); }
.shopCopyBtn--copied {
  background: rgba(60,172,59,0.10); border-color: rgba(60,172,59,0.25);
  color: #5dbb5c;
}
.shopCopyBtn svg { flex-shrink: 0; }

/* Metadata line below code */
.shopCodeMeta {
  font-size: 12px; color: var(--muted); padding: 0 4px;
  line-height: 1.4;
}

/* "Coming soon" / unavailable state */
.shopPerkUnavailable {
  padding: 16px 24px 20px;
  font-size: 13px; color: var(--muted); line-height: 1.5;
}

@media (max-width: 640px) {
  .shopPerkHeader { padding: 16px 18px 0; gap: 12px; }
  .shopPerkIcon { width: 36px; height: 36px; border-radius: 10px; }
  .shopPerkTitle { font-size: 16px; }
  .shopPerkLink { padding: 8px 14px; font-size: 11px; min-height: 40px; }
  .shopCodesWrap { padding: 14px 18px 16px; }
  .shopCodeRow { padding: 12px 14px; }
  .shopCodeVal { font-size: 14px; }
  .shopCopyBtn { min-width: 64px; min-height: 40px; padding: 0 14px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .shopCopyBtn { transition: none; }
}

/* ── Auth gate removed ── */
#mainContent { opacity: 1; }

/* ── Footer ── */
.footer {
  max-width: 1400px;
  margin: 80px auto 0;
  padding: 60px 24px 40px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.08);
}
.social-icons { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; }
.social-icon {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.10); border-radius: 50%;
  color: rgba(255,255,255,.38); transition: all 300ms ease; text-decoration: none;
}
.social-icon:hover { background: rgba(216,180,90,.10); border-color: rgba(216,180,90,.30); color: #D8B45A; transform: translateY(-3px); }
.social-icon svg { width: 20px; height: 20px; }
.footer-brand { font-size: 20px; font-weight: 900; letter-spacing: 0.1em; color: #D8B45A; margin: 0 0 8px; }
.footer-disclaimer { font-size: 12px; color: rgba(255,255,255,.38); margin: 0 0 20px; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 24px; margin-bottom: 16px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,.38); text-decoration: none; transition: color 0.2s ease; }
.footer-links a:hover { color: #D8B45A; }
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.3); margin: 0; }
