@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@700&family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap');

:root {
  --st-surface-deep: #0c0d14;
  --st-surface: #12131a;
  --st-container: #1e1f27;
  --st-elevated: #1a1b26;
  --st-high: #292931;
  --st-highest: #34343c;
  --st-text: #e3e1ec;
  --st-muted: #c7c4d7;
  --st-outline: #918fa0;
  --st-primary: #4b45d2;
  --st-primary-soft: #c2c1ff;
  --st-purple: #8a2be2;
  --st-cyan: #00dbe9;
  --st-gold: #ffd700;
  --st-green: #00ff41;
  --st-red: #ff003c;
}

body.stitch-page {
  background:
    radial-gradient(circle at 15% 12%, rgba(0, 219, 233, 0.14), transparent 28%),
    radial-gradient(circle at 90% 8%, rgba(138, 43, 226, 0.18), transparent 30%),
    linear-gradient(135deg, #0c0d14 0%, #12131a 54%, #0d0e15 100%) !important;
  color: var(--st-text);
  font-family: Montserrat, sans-serif;
  overflow-x: hidden;
}

.stitch-page .material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal !important;
  font-style: normal !important;
  font-size: 24px;
  line-height: 1 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'liga';
  vertical-align: middle;
}

body.stitch-page::before,
body.stitch-page::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 999px;
  filter: blur(110px);
}

body.stitch-page::before {
  width: 38vw;
  height: 38vw;
  left: -12vw;
  top: -12vw;
  background: rgba(0, 219, 233, 0.12);
}

body.stitch-page::after {
  width: 46vw;
  height: 46vw;
  right: -18vw;
  bottom: -18vw;
  background: rgba(138, 43, 226, 0.16);
}

.stitch-page .pg-page {
  position: relative;
  z-index: 1;
  background: transparent !important;
  padding-top: 110px;
  padding-bottom: 80px;
}

.stitch-profile .pg-page,
.stitch-progress .pg-page,
.stitch-devices .pg-page {
  padding-top: 96px;
  padding-bottom: 0;
}

.stitch-page .pg-container {
  max-width: 1280px;
}

.stitch-page .pg-container,
.stitch-page .lb-header,
.stitch-page .pg-activity,
.stitch-page .pg-milestone,
.stitch-page .pg-stat-card,
.stitch-page .devices-hero,
.stitch-page .plan-card,
.stitch-page .device-card,
.stitch-page .subscribe-card,
.stitch-page .subscribe-feature,
.stitch-page .lb-share-modal,
.stitch-page .pg-share-modal {
  font-family: Montserrat, sans-serif;
}

.stitch-page .glass-panel,
.stitch-page .pg-stat-card,
.stitch-page .pg-milestone,
.stitch-page .pg-activity,
.stitch-page .pg-activity-item,
.stitch-page .pg-empty,
.stitch-page .plan-card,
.stitch-page .device-card,
.stitch-page .devices-hero,
.stitch-page .subscribe-card,
.stitch-page .subscribe-feature,
.stitch-page .lb-share-modal,
.stitch-page .pg-share-modal,
.stitch-leaderboard .pro-card,
.stitch-leaderboard .pro-row,
.stitch-leaderboard .gold-players-panel,
.stitch-leaderboard .lb-current-user {
  /* background: linear-gradient(135deg, rgba(26, 27, 38, 0.84), rgba(12, 13, 20, 0.94)); */
  /* border: 1px solid rgba(255, 255, 255, 0.09); */
  /* box-shadow: inset 0 0 20px rgba(255,255,255,0.02), 0 8px 32px rgba(0,0,0,0.4); */
  backdrop-filter: blur(16px);
}

.stitch-page .pg-stat-card:hover,
.stitch-page .pg-activity-item:hover,
.stitch-page .subscribe-feature:hover,
.stitch-page .device-card:hover,
.stitch-leaderboard .pro-card:hover,
.stitch-leaderboard .pro-row:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 219, 233, 0.34);
  box-shadow: 0 0 25px rgba(138,43,226,0.25), inset 0 0 15px rgba(0,219,233,0.08);
}

.stitch-page .pg-stat-card,
.stitch-page .pg-activity-item,
.stitch-page .subscribe-feature,
.stitch-page .device-card,
.stitch-leaderboard .pro-card,
.stitch-leaderboard .pro-row {
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease, background .3s ease;
}

/* Profile / Progress ultra profile */
.stitch-profile .pg-hero,
.stitch-progress .pg-hero {
  min-height: 260px;
  padding: 110px 28px 28px;
  margin-bottom: 24px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.1);
  background:
    linear-gradient(to top, rgba(12,13,20,.98), rgba(12,13,20,.75), rgba(138,43,226,.18)),
    radial-gradient(circle at 18% 18%, rgba(0,219,233,.18), transparent 30%),
    url('../images/progress/hero_player.png') center/cover;
  box-shadow: 0 0 30px rgba(138,43,226,.18);
}

.stitch-profile .pg-hero::after,
.stitch-progress .pg-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(138,43,226,.18), transparent 58%);
  pointer-events: none;
}

.stitch-profile .pg-hero-avatar,
.stitch-progress .pg-hero-avatar {
  position: relative;
  z-index: 1;
  width: 128px;
  height: 128px;
  margin: 0 0 14px;
  padding: 4px;
  background: linear-gradient(135deg, var(--st-cyan), var(--st-purple));
  box-shadow: 0 0 36px rgba(138,43,226,.55);
}

.stitch-profile .pg-hero h1,
.stitch-progress .pg-hero h1,
.stitch-profile .pg-rank-badge,
.stitch-progress .pg-rank-badge,
.stitch-profile .profile-gold-badge {
  position: relative;
  z-index: 1;
}

.stitch-profile .pg-hero h1,
.stitch-progress .pg-hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.6rem);
  line-height: 1;
  margin-bottom: 10px;
  color: #fff;
  text-shadow: 0 0 16px rgba(255,255,255,.25);
}

.stitch-profile .pg-stats,
.stitch-progress .pg-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stitch-profile .pg-stat-card,
.stitch-progress .pg-stat-card {
  border-radius: 18px;
  padding: 22px;
  text-align: left;
}

.stitch-profile .pg-stat-label,
.stitch-progress .pg-stat-label,
.stitch-profile .pg-activity h3,
.stitch-progress .pg-activity h3,
.stitch-profile .pg-milestone h3,
.stitch-progress .pg-milestone h3 {
  letter-spacing: .08em;
  text-transform: uppercase;
}

.stitch-profile .pg-stat-value,
.stitch-progress .pg-stat-value {
  color: #fff;
  text-shadow: 0 0 10px rgba(255,255,255,.18);
}

.stitch-profile .pg-progress-fill,
.stitch-progress .pg-progress-fill {
  background: linear-gradient(90deg, var(--st-primary), var(--st-purple), var(--st-cyan));
  box-shadow: 0 0 16px rgba(138,43,226,.7);
}

.stitch-profile .pg-activity,
.stitch-progress .pg-activity,
.stitch-profile .pg-milestone,
.stitch-progress .pg-milestone {
  border-radius: 18px;
}

/* Leaderboard gold edition */
.stitch-leaderboard .pg-container {
  max-width: 1200px;
}

.stitch-leaderboard .lb-header {
  min-height: 360px;
  border-radius: 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 28px;
  border: 1px solid rgba(255,255,255,.1);
  background:
    linear-gradient(to top, rgba(12,13,20,1), rgba(12,13,20,.45), rgba(12,13,20,.8)),
    url('../images/progress/hero_leaderboard.png') center/cover;
}

.stitch-leaderboard .lb-header h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
}

.stitch-leaderboard .lb-header h1::after {
  content: ' Rankings';
  color: var(--st-gold);
  text-shadow: 0 0 24px rgba(255,215,0,.45);
}

.stitch-leaderboard .lb-podium {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: end;
}

.stitch-leaderboard .pro-card {
  width: auto;
  border-radius: 28px;
  min-height: 300px;
}

.stitch-leaderboard .rank-1 {
  border-color: rgba(255,215,0,.4);
}

.stitch-leaderboard .rank-1 .pro-stat-val,
.stitch-leaderboard .rank-1 .pro-rank-title {
  color: var(--st-gold) !important;
}

.stitch-leaderboard .pro-table {
  max-width: none;
  padding: 8px;
  border-radius: 32px;
}

.stitch-leaderboard .pro-row {
  grid-template-columns: 80px 1fr 120px 120px;
  padding: 16px;
  border-radius: 22px;
}

/* Gold membership lounge */
.stitch-subscribe {
  background:
    linear-gradient(135deg, rgba(138,43,226,.26), rgba(18,19,26,.85), rgba(12,13,20,.96)),
    radial-gradient(circle at top, rgba(255,215,0,.16), transparent 52%) !important;
}

.stitch-subscribe .pg-container {
  max-width: 1280px;
}

.stitch-subscribe .subscribe-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 520px);
  gap: 48px;
  align-items: center;
}

.stitch-subscribe .subscribe-card {
  border-radius: 28px;
  padding: 34px;
  background: rgba(20,21,30,.42);
  border-color: rgba(255,215,0,.32);
  box-shadow: 0 8px 32px rgba(0,0,0,.5), inset 0 0 20px rgba(255,215,0,.05);
}

.stitch-subscribe .subscribe-card h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  text-shadow: 0 0 20px rgba(255,215,0,.22);
}

.stitch-subscribe .subscribe-price {
  color: #fff;
  text-shadow: 0 0 15px rgba(255,255,255,.25);
}

.stitch-subscribe .subscribe-btn,
.stitch-devices .gold-btn {
  background: linear-gradient(90deg, #ffd700, #ffdf33, #e6b800);
  box-shadow: 0 0 28px rgba(255,215,0,.36);
  transition: transform .25s ease, box-shadow .25s ease;
}

.stitch-subscribe .subscribe-btn:hover,
.stitch-devices .gold-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 42px rgba(255,215,0,.65);
}

.stitch-subscribe .subscribe-benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.stitch-subscribe .subscribe-feature:last-child {
  grid-column: 1 / -1;
}

/* Device management */
.stitch-devices .pg-container {
  max-width: 1040px;
}

.stitch-devices .devices-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 32px;
}

.stitch-devices .devices-hero {
  margin: 0;
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.stitch-devices .devices-hero h1 {
  color: var(--st-primary-soft);
}

.stitch-devices .devices-status {
  flex-direction: column;
  margin-top: 0;
}

.stitch-devices .status-pill {
  justify-content: space-between;
  border-radius: 12px;
}

.stitch-devices .devices-main-panel {
  border-radius: 24px;
  padding: 32px;
  background: linear-gradient(135deg, rgba(26, 27, 38, 0.84), rgba(12, 13, 20, 0.94));
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.stitch-devices .devices-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

@media (max-width: 900px) {
  .stitch-profile .pg-stats,
  .stitch-progress .pg-stats,
  .stitch-leaderboard .lb-podium,
  .stitch-subscribe .subscribe-shell,
  .stitch-devices .devices-layout {
    grid-template-columns: 1fr;
  }
  .stitch-leaderboard .pro-row { grid-template-columns: 50px 1fr 90px; }
  .stitch-leaderboard .row-time { display: none; }
}

@media (max-width: 640px) {
  .stitch-page .pg-page { padding-left: 12px !important; padding-right: 12px !important; }
  .stitch-profile .pg-hero,
  .stitch-progress .pg-hero { text-align: center; padding-top: 82px; }
  .stitch-profile .pg-hero-avatar,
  .stitch-progress .pg-hero-avatar { margin-left: auto; margin-right: auto; width: 96px; height: 96px; }
  .stitch-subscribe .subscribe-benefits { grid-template-columns: 1fr; }
}

/* Nexus user profile ultra edition */
.stitch-profile .nexus-shell,
.stitch-progress .nexus-shell {
  display: flex;
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  overflow: hidden;
}

.stitch-profile .nexus-main,
.stitch-progress .nexus-main {
  flex: 1;
  width: 100%;
  padding: 16px;
  overflow-y: auto;
}

.stitch-profile .nexus-hero,
.stitch-progress .nexus-hero {
  position: relative;
  width: 100%;
  min-height: 256px;
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 30px rgba(138, 43, 226, 0.15);
}

.stitch-profile .nexus-hero-bg,
.stitch-progress .nexus-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/progress/hero_player.png');
  background-size: cover;
  background-position: center;
  opacity: 0.6;
  mix-blend-mode: screen;
  transition: transform 0.7s ease;
}

.stitch-profile .nexus-hero:hover .nexus-hero-bg,
.stitch-progress .nexus-hero:hover .nexus-hero-bg {
  transform: scale(1.05);
}

.stitch-profile .nexus-hero-shade,
.stitch-progress .nexus-hero-shade {
  position: absolute;
  inset: 0;
  /* background:
    linear-gradient(to top, rgba(12, 13, 20, 1), rgba(12, 13, 20, 0.8), transparent),
    linear-gradient(to right, rgba(138, 43, 226, 0.2), transparent); */
}

.stitch-profile .nexus-hero-content,
.stitch-progress .nexus-hero-content {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  padding: 24px;
}

.stitch-profile .nexus-avatar-wrap,
.stitch-progress .nexus-avatar-wrap {
  position: relative;
  flex: 0 0 auto;
}

.stitch-profile .nexus-avatar-ring,
.stitch-progress .nexus-avatar-ring {
  width: 128px;
  height: 128px;
  padding: 4px;
  border-radius: 999px;
  background: linear-gradient(45deg, var(--st-cyan), var(--st-purple));
  box-shadow: 0 0 30px rgba(138, 43, 226, 0.6);
  transition: box-shadow 0.3s ease;
}

.stitch-profile .nexus-avatar-wrap:hover .nexus-avatar-ring,
.stitch-progress .nexus-avatar-wrap:hover .nexus-avatar-ring {
  box-shadow: 0 0 40px rgba(0, 219, 233, 0.8);
}

.stitch-profile .nexus-avatar-ring img,
.stitch-progress .nexus-avatar-ring img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
}

.stitch-profile .nexus-avatar-action,
.stitch-progress .nexus-avatar-action {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--st-highest);
  color: var(--st-text);
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.stitch-profile .nexus-avatar-action:hover,
.stitch-progress .nexus-avatar-action:hover {
  background: var(--st-cyan);
  color: var(--st-surface-deep);
  transform: translateY(-1px);
}

.stitch-profile .nexus-identity,
.stitch-progress .nexus-identity {
  flex: 1;
  padding-bottom: 8px;
}

.stitch-profile .nexus-identity h1,
.stitch-progress .nexus-identity h1 {
  margin: 0 0 4px;
  color: #fff;
  font-family: Montserrat, sans-serif;
  font-size: clamp(36px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.stitch-profile .nexus-badges,
.stitch-progress .nexus-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.stitch-profile .nexus-gold-badge,
.stitch-progress .nexus-gold-badge,
.stitch-profile .nexus-joined,
.stitch-progress .nexus-joined {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.stitch-profile .nexus-gold-badge,
.stitch-progress .nexus-gold-badge {
  color: var(--st-gold);
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.5);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.stitch-profile .nexus-joined,
.stitch-progress .nexus-joined {
  color: var(--st-muted);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stitch-profile .nexus-grid,
.stitch-progress .nexus-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.stitch-profile .nexus-stats,
.stitch-progress .nexus-stats {
  grid-column: span 8;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stitch-profile .nexus-stat,
.stitch-progress .nexus-stat,
.stitch-profile .nexus-milestone,
.stitch-progress .nexus-milestone,
.stitch-profile .nexus-activity-card,
.stitch-progress .nexus-activity-card,
.stitch-profile .nexus-empty-panel,
.stitch-progress .nexus-empty-panel {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, rgba(26, 27, 38, 0.85) 0%, rgba(12, 13, 20, 0.95) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 20px rgba(255,255,255,0.02), 0 8px 32px rgba(0,0,0,0.4);
}

.stitch-profile .nexus-stat::before,
.stitch-progress .nexus-stat::before,
.stitch-profile .nexus-milestone::before,
.stitch-progress .nexus-milestone::before,
.stitch-profile .nexus-activity-card::before,
.stitch-progress .nexus-activity-card::before,
.stitch-profile .nexus-empty-panel::before,
.stitch-progress .nexus-empty-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 2px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.6), rgba(0, 219, 233, 0.1), rgba(0, 219, 233, 0.6));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.stitch-profile .nexus-stat:hover::before,
.stitch-progress .nexus-stat:hover::before,
.stitch-profile .nexus-milestone:hover::before,
.stitch-progress .nexus-milestone:hover::before,
.stitch-profile .nexus-activity-card:hover::before,
.stitch-progress .nexus-activity-card:hover::before,
.stitch-profile .nexus-empty-panel:hover::before,
.stitch-progress .nexus-empty-panel:hover::before {
  opacity: 1;
}

.stitch-profile .nexus-stat,
.stitch-progress .nexus-stat {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border-radius: 12px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stitch-profile .nexus-stat:hover,
.stitch-progress .nexus-stat:hover,
.stitch-profile .nexus-activity-card:hover,
.stitch-progress .nexus-activity-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(138, 43, 226, 0.3), inset 0 0 15px rgba(0, 219, 233, 0.1);
}

.stitch-profile .nexus-stat-head,
.stitch-progress .nexus-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.stitch-profile .nexus-label,
.stitch-progress .nexus-label {
  color: var(--st-muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stitch-profile .nexus-stat-value,
.stitch-progress .nexus-stat-value {
  color: #fff;
  font-size: 32px;
  line-height: 40px;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.stitch-profile .nexus-stat-value.small,
.stitch-progress .nexus-stat-value.small {
  font-size: 24px;
  line-height: 32px;
}

.stitch-profile .nexus-unit,
.stitch-progress .nexus-unit {
  color: var(--st-cyan);
  font-size: 14px;
  margin-left: 4px;
}

.stitch-profile .nexus-icon-gold,
.stitch-progress .nexus-icon-gold { color: var(--st-gold); filter: drop-shadow(0 0 8px rgba(255,215,0,0.5)); }
.stitch-profile .nexus-icon-cyan,
.stitch-progress .nexus-icon-cyan { color: var(--st-cyan); filter: drop-shadow(0 0 8px rgba(0,219,233,0.5)); }
.stitch-profile .nexus-icon-primary,
.stitch-progress .nexus-icon-primary { color: var(--st-primary-soft); filter: drop-shadow(0 0 8px rgba(194,193,255,0.5)); }

.stitch-profile .nexus-rank-stat,
.stitch-progress .nexus-rank-stat { overflow: hidden; }

.stitch-profile .nexus-rank-watermark,
.stitch-progress .nexus-rank-watermark {
  position: absolute;
  right: -16px;
  bottom: -16px;
  color: var(--st-gold);
  opacity: 0.2;
  filter: blur(2px);
}

.stitch-profile .nexus-rank-watermark .material-symbols-outlined,
.stitch-progress .nexus-rank-watermark .material-symbols-outlined {
  font-size: 96px;
}

.stitch-profile .nexus-milestone,
.stitch-progress .nexus-milestone {
  grid-column: span 4;
  padding: 24px;
  border-radius: 12px;
  overflow: hidden;
}

.stitch-profile .nexus-milestone::after,
.stitch-progress .nexus-milestone::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: linear-gradient(to bottom left, rgba(138, 43, 226, 0.3), transparent);
  filter: blur(36px);
  transition: transform 0.7s ease;
}

.stitch-profile .nexus-milestone:hover::after,
.stitch-progress .nexus-milestone:hover::after {
  transform: scale(1.5);
  background: rgba(0, 219, 233, 0.2);
}

.stitch-profile .nexus-milestone h3,
.stitch-progress .nexus-milestone h3 {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  color: #fff;
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.stitch-profile .nexus-milestone-progress,
.stitch-progress .nexus-milestone-progress,
.stitch-profile .nexus-milestone p,
.stitch-progress .nexus-milestone p,
.stitch-profile .nexus-outline-btn,
.stitch-progress .nexus-outline-btn {
  position: relative;
  z-index: 1;
}

.stitch-profile .nexus-milestone-top,
.stitch-progress .nexus-milestone-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.stitch-profile .nexus-tier,
.stitch-progress .nexus-tier {
  color: #fff;
  font-size: 18px;
  line-height: 28px;
  font-weight: 500;
}

.stitch-profile .nexus-xp,
.stitch-progress .nexus-xp {
  color: var(--st-cyan);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 0 5px rgba(0, 219, 233, 0.3);
}

.stitch-profile .nexus-progress-track,
.stitch-progress .nexus-progress-track {
  height: 12px;
  width: 100%;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: var(--st-surface-deep);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.35);
}

.stitch-profile .nexus-progress-fill,
.stitch-progress .nexus-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(to right, var(--st-primary), var(--st-purple), var(--st-cyan));
  box-shadow: 0 0 10px rgba(138, 43, 226, 0.8);
  animation: nexus-pulse-glow 2s infinite alternate;
}

@keyframes nexus-pulse-glow {
  0% { box-shadow: 0 0 5px rgba(138, 43, 226, 0.5); }
  100% { box-shadow: 0 0 20px rgba(138, 43, 226, 1); }
}

.stitch-profile .nexus-milestone p,
.stitch-progress .nexus-milestone p {
  margin: 16px 0 24px;
  color: var(--st-muted);
  font-size: 14px;
  line-height: 22px;
}

.stitch-profile .nexus-outline-btn,
.stitch-progress .nexus-outline-btn {
  display: inline-flex;
  width: 91%;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 8px;
  border: 2px solid var(--st-purple);
  background: transparent;
  color: var(--st-purple);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 0 15px rgba(138, 43, 226, 0.2);
  transition: 0.3s ease;
}

.stitch-profile .nexus-outline-btn:hover,
.stitch-progress .nexus-outline-btn:hover {
  border-color: transparent;
  background: var(--st-purple);
  color: #fff;
  box-shadow: 0 0 30px rgba(138, 43, 226, 0.6);
}

.stitch-profile .nexus-activity,
.stitch-progress .nexus-activity {
  grid-column: span 12;
  margin-top: 16px;
}

.stitch-profile .nexus-section-title,
.stitch-progress .nexus-section-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.stitch-profile .nexus-section-title h2,
.stitch-progress .nexus-section-title h2 {
  margin: 0;
  color: #fff;
  font-size: 32px;
  line-height: 40px;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.stitch-profile .nexus-activity-grid,
.stitch-progress .nexus-activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.stitch-profile .nexus-activity-card,
.stitch-progress .nexus-activity-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-height: 120px;
  padding: 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stitch-profile .nexus-activity-icon,
.stitch-progress .nexus-activity-icon {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: linear-gradient(to bottom right, var(--st-elevated), var(--st-surface-deep));
  box-shadow: inset 0 0 15px rgba(0, 219, 233, 0.1);
}

.stitch-profile .nexus-activity-icon .material-symbols-outlined,
.stitch-progress .nexus-activity-icon .material-symbols-outlined {
  font-size: 36px;
}

.stitch-profile .nexus-activity-body,
.stitch-progress .nexus-activity-body {
  flex: 1;
  min-width: 0;
}

.stitch-profile .nexus-activity-body h4,
.stitch-progress .nexus-activity-body h4 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 28px;
  font-weight: 700;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
  text-transform: capitalize;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stitch-profile .nexus-activity-body p,
.stitch-progress .nexus-activity-body p {
  margin: 0 0 8px;
  color: rgba(0, 219, 233, 0.7);
  font-size: 14px;
  font-weight: 500;
}

.stitch-profile .nexus-activity-meta,
.stitch-progress .nexus-activity-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.stitch-profile .nexus-result,
.stitch-progress .nexus-result {
  padding: 2px 10px;
  border-radius: 4px;
  border: 1px solid rgba(0,255,65,0.3);
  background: rgba(0,255,65,0.1);
  color: var(--st-green);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 0 5px rgba(0,255,65,0.2);
}

.stitch-profile .nexus-points,
.stitch-progress .nexus-points {
  color: var(--st-muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
}

.stitch-profile .nexus-activity-time,
.stitch-progress .nexus-activity-time {
  flex: 0 0 auto;
  padding-top: 4px;
  color: rgba(199,196,215,0.7);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.stitch-profile .nexus-empty-panel,
.stitch-progress .nexus-empty-panel {
  grid-column: 1 / -1;
  padding: 28px;
  border-radius: 12px;
  text-align: center;
}

.stitch-profile .nexus-empty-panel h3,
.stitch-progress .nexus-empty-panel h3 {
  margin: 8px 0;
  color: #fff;
}

.stitch-profile .nexus-bottom-link,
.stitch-progress .nexus-bottom-link {
  margin: 24px 0 8px;
  text-align: center;
}

.stitch-profile .nexus-bottom-link a,
.stitch-progress .nexus-bottom-link a {
  color: var(--st-cyan);
  font-weight: 800;
  text-decoration: none;
}

.stitch-progress .nexus-devices-link {
  margin-left: 10px;
  color: var(--st-gold) !important;
}

@media (min-width: 768px) {
  .stitch-profile .nexus-main,
  .stitch-progress .nexus-main { padding: 48px 24px; }
}

@media (max-width: 980px) {
  .stitch-profile .nexus-stats,
  .stitch-progress .nexus-stats,
  .stitch-profile .nexus-milestone,
  .stitch-progress .nexus-milestone,
  .stitch-profile .nexus-activity,
  .stitch-progress .nexus-activity { grid-column: span 12; }

  .stitch-profile .nexus-activity-grid,
  .stitch-progress .nexus-activity-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .stitch-profile .nexus-hero,
  .stitch-progress .nexus-hero { min-height: 360px; }

  .stitch-profile .nexus-hero-content,
  .stitch-progress .nexus-hero-content {
    align-items: center;
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .stitch-profile .nexus-stats,
  .stitch-progress .nexus-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .stitch-profile .nexus-avatar-ring,
  .stitch-progress .nexus-avatar-ring { width: 104px; height: 104px; }
}

@media (max-width: 460px) {
  .stitch-profile .nexus-stats,
  .stitch-progress .nexus-stats { grid-template-columns: 1fr; }
  .stitch-profile .nexus-activity-card,
  .stitch-progress .nexus-activity-card { flex-direction: column;width: 83dvw !important; }
  .stitch-profile .nexus-activity-time,
  .stitch-progress .nexus-activity-time { padding-top: 0; }
}

/* Elite leaderboard gold edition */
.leaderboard-gold {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.leaderboard-gold .leaderboard-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.leaderboard-hero {
  position: relative;
  width: 100%;
  min-height: 450px;
  border-radius: 32px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 28px 80px rgba(0,0,0,0.45);
}

.leaderboard-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/progress/hero_leaderboard.png');
  background-size: cover;
  background-position: center;
  opacity: 0.6;
  mix-blend-mode: screen;
}

.leaderboard-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--st-surface-deep), rgba(12,13,20,0.4), transparent),
    linear-gradient(to right, rgba(12,13,20,0.8), transparent, rgba(12,13,20,0.8));
}

.leaderboard-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 32px;
  text-align: center;
}

.leaderboard-hero h1 {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(36px, 7vw, 64px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.leaderboard-gold-text {
  background: linear-gradient(to right, #ffd700, #ffa500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.leaderboard-hero p {
  max-width: 720px;
  margin: 0 auto;
  color: rgba(255,255,255,0.8);
  font-size: 18px;
  line-height: 28px;
  font-weight: 500;
}

.leaderboard-tabs {
  display: flex;
  justify-content: center;
  margin: 16px 0 8px;
}

.leaderboard-tabs-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(26, 27, 38, 0.4);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.leaderboard-tab-primary,
.leaderboard-tab-secondary,
.leaderboard-share-tab {
  border: 0;
  border-radius: 999px;
  padding: 12px 32px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.leaderboard-tab-primary {
  color: #fff;
  background: linear-gradient(to right, var(--st-purple), #4f49d6);
  box-shadow: 0 0 20px rgba(138,43,226,0.5);
}

.leaderboard-tab-secondary,
.leaderboard-share-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--st-muted);
  background: transparent;
}

.leaderboard-tab-secondary:hover,
.leaderboard-share-tab:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.leaderboard-podium-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding-top: 16px;
}

.leader-podium-card {
  position: relative;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 24px;
  padding: 24px;
  background: rgba(26, 27, 38, 0.4);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

.leader-podium-card:hover,
.leader-row:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.2);
}

.leader-podium-card.rank-1 {
  z-index: 2;
  transform: scale(1.05);
  border-radius: 40px;
  border-color: #f9d63b75;
}

.leader-podium-card.rank-1:hover { transform: scale(1.05) translateY(-4px); }
.leader-podium-card.rank-2,
.leader-podium-card.rank-3 { margin-top: 48px; }
.leader-podium-card.rank-2 { order: 1; }
.leader-podium-card.rank-1 { order: 2; }
.leader-podium-card.rank-3 { order: 3; }

.leader-podium-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--st-cyan), #3b82f6);
}
.rank-1 .leader-podium-line { height: 8px; background: linear-gradient(to right, #fde047, #eab308, #fde047); }
.rank-3 .leader-podium-line { background: linear-gradient(to right, var(--st-purple), #ec4899); }

.leader-podium-avatar {
  position: relative;
  z-index: 1;
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--st-cyan);
  background: var(--st-high);
  border: 4px solid var(--st-cyan);
  box-shadow: 0 0 20px rgba(0,219,233,0.4);
}

.rank-1 .leader-podium-avatar {
  width: 112px;
  height: 112px;
  margin-bottom: 24px;
  color: var(--st-gold);
  border: 5px solid var(--st-gold);
  box-shadow: 0 0 30px rgba(255,215,0,0.6);
}

.rank-3 .leader-podium-avatar {
  color: var(--st-purple);
  border-color: var(--st-purple);
  box-shadow: 0 0 20px rgba(138,43,226,0.5);
}

.leader-podium-avatar .material-symbols-outlined { font-size: 42px; }
.rank-1 .leader-podium-avatar .material-symbols-outlined { font-size: 64px; }

.leader-rank-dot {
  position: absolute;
  right: -10px;
  bottom: -10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: var(--st-surface-deep);
  background: var(--st-cyan);
  border: 3px solid var(--st-surface-deep);
  font-weight: 900;
}
.rank-1 .leader-rank-dot { width: 40px; height: 40px; background: var(--st-gold); font-size: 18px; }
.rank-3 .leader-rank-dot { color: #fff; background: var(--st-purple); }

.leader-podium-name {
  position: relative;
  z-index: 1;
  margin: 0 0 4px;
  color: #fff;
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  text-align: center;
}
.rank-1 .leader-podium-name { font-size: 36px; line-height: 40px; font-weight: 900; }

.leader-podium-tier {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
  color: var(--st-cyan);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.rank-1 .leader-podium-tier { color: var(--st-gold); margin-bottom: 24px; }
.rank-3 .leader-podium-tier { color: var(--st-purple); }

.leader-podium-points {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  font-weight: 900;
  font-size: 22px;
}
.rank-1 .leader-podium-points { color: var(--st-gold); background: rgba(255,215,0,0.1); border-color: rgba(255,215,0,0.2); font-size: 36px; }

.leaderboard-table {
  margin-top: 32px;
  padding: 8px;
  border-radius: 32px;
  background: rgba(26, 27, 38, 0.4);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.leader-table-head,
.leader-row {
  display: grid;
  grid-template-columns: 80px 1fr 120px 120px;
  gap: 16px;
  align-items: center;
}

.leader-table-head {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: var(--st-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.leader-row {
  margin: 8px 0;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.leader-row.lb-self {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,215,0,0.3);
  box-shadow: inset 0 0 20px rgba(255,215,0,0.05);
}

.leader-row-rank { text-align: center; color: var(--st-muted); font-size: 22px; font-weight: 800; }
.leader-row.lb-self .leader-row-rank { color: var(--st-gold); font-size: 26px; font-weight: 900; }
.leader-row-user { display: flex; align-items: center; gap: 16px; min-width: 0; }
.leader-row-avatar { width: 48px; height: 48px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.1); object-fit: cover; background: var(--st-highest); }
.leader-row.lb-self .leader-row-avatar { border: 2px solid rgba(255,215,0,0.5); }
.leader-row-name { min-width: 0; color: #fff; font-size: 18px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader-row-tier { display: flex; justify-content: flex-end; }
.leader-tier-pill { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.1); background: var(--st-highest); color: var(--st-muted); font-size: 12px; font-weight: 800; }
.leader-tier-pill.gold { color: var(--st-gold); background: rgba(255,215,0,0.2); border-color: rgba(255,215,0,0.5); }
.leader-row-points { text-align: right; color: var(--st-primary-soft); font-size: 22px; font-weight: 900; }
.leader-row.lb-self .leader-row-points { color: #fff; }

/* Premium gold membership lounge */
.gold-lounge {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  min-height: calc(100vh - 120px);
  margin: 0 auto;
  padding: 48px 24px;
  display: flex;
  align-items: center;
}

.gold-lounge-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom right, rgba(138,43,226,0.3), rgba(18,19,26,0.8), rgba(18,19,26,0.95)),
    radial-gradient(ellipse at top, rgba(255,215,0,0.15), transparent 45%),
    url('../images/progress/sub_background.png') center/cover;
  opacity: 0.95;
}

.gold-lounge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  align-items: center;
  width: 100%;
}

.gold-lounge-copy { display: flex; flex-direction: column; gap: 24px; }
.gold-kicker { display: inline-flex; align-items: center; gap: 8px; width: max-content; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255,215,0,0.4); background: rgba(41,41,49,0.5); color: var(--st-gold); font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; box-shadow: 0 0 15px rgba(255,215,0,0.2); animation: gold-float 6s ease-in-out infinite; }
@keyframes gold-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.gold-lounge h1 { margin: 0; color: #fff; font-size: clamp(36px, 6vw, 56px); line-height: 1.06; font-weight: 900; letter-spacing: -0.02em; text-shadow: 0 24px 50px rgba(0,0,0,0.45); }
.gold-glow { color: var(--st-gold); text-shadow: 0 0 20px rgba(255,215,0,0.6), 0 0 40px rgba(255,215,0,0.2); }
.gold-lounge-lead { max-width: 520px; color: var(--st-muted); font-size: 18px; line-height: 28px; font-weight: 500; }
.gold-benefit-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-top: 16px; }
.gold-feature-card { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: 12px; background: rgba(26,27,38,0.3); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 4px 24px rgba(0,0,0,0.3); transition: all 0.3s ease; }
.gold-feature-card:hover { border-color: rgba(255,215,0,0.6); background: rgba(26,27,38,0.55); }
.gold-feature-card.wide { grid-column: 1 / -1; }
.gold-feature-row { display: flex; align-items: center; gap: 20px; }
.gold-feature-icon { width: 52px; height: 52px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); background: linear-gradient(to bottom right, var(--st-highest), var(--st-surface-deep)); box-shadow: inset 0 2px 10px rgba(0,0,0,0.35); }
.gold-feature-card h3 { margin: 0; color: #fff; font-size: 24px; line-height: 32px; font-weight: 700; }
.gold-feature-card p { margin: 0; color: var(--st-muted); font-size: 16px; line-height: 24px; }
.gold-pricing-card { position: relative; overflow: hidden; padding: 32px; border-radius: 16px; background: rgba(20,21,30,0.4); backdrop-filter: blur(20px); border: 1px solid rgba(255,215,0,0.3); box-shadow: 0 8px 32px rgba(0,0,0,0.5), inset 0 0 20px rgba(255,215,0,0.05); }
.gold-pricing-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(to right, var(--st-gold), var(--st-purple), var(--st-cyan)); opacity: 0.8; }
.gold-price-head { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding-bottom: 24px; margin-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.gold-price-head h2 { margin: 0 0 4px; color: #fff; font-size: 32px; line-height: 40px; font-weight: 800; }
.gold-billed { color: var(--st-gold); font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.gold-price { color: #fff; font-size: 48px; line-height: 56px; font-weight: 900; text-shadow: 0 0 15px rgba(255,255,255,0.3); }
.gold-price span { margin-left: 4px; color: rgba(255,215,0,0.8); font-size: 16px; font-weight: 500; }
.gold-check-list { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 16px; padding: 0; margin: 0 0 32px; list-style: none; }
.gold-check-list li { display: flex; align-items: center; gap: 16px; color: rgba(255,255,255,0.9); font-size: 18px; line-height: 28px; font-weight: 500; }
.gold-check { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid rgba(0,255,65,0.3); background: rgba(0,255,65,0.2); color: var(--st-green); }
.gold-cta { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.2); background: linear-gradient(to right, #ffd700, #ffdf33, #e6b800); color: #0b0c10; font-size: 24px; line-height: 32px; font-weight: 800; text-decoration: none; box-shadow: 0 0 25px rgba(255,215,0,0.4); transition: all 0.3s ease; }
.gold-cta:hover { transform: translateY(-4px); box-shadow: 0 0 40px rgba(255,215,0,0.7); }
.gold-terms { position: relative; z-index: 1; margin: 20px 0 0; text-align: center; color: rgba(255,255,255,0.4); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

/* Device management content only */
.device-manager { position: relative; z-index: 1; width: 100%; max-width: 1024px; margin: 0 auto; padding: 48px 24px 80px; }
.device-manager-header { margin-bottom: 48px; text-align: center; }
.device-manager-header h1 { margin: 0 0 12px; color: var(--st-primary-soft); font-size: 32px; line-height: 40px; font-weight: 800; }
.device-manager-header p { margin: 0; color: var(--st-muted); font-size: 18px; line-height: 28px; font-weight: 500; }
.device-manager-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
.device-panel { border-radius: 16px; padding: 32px; background: var(--st-container); border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 24px 70px rgba(0,0,0,0.45); }
.device-status-panel { display: flex; flex-direction: column; gap: 32px; }
.device-panel h2 { margin: 0 0 8px; color: var(--st-text); font-size: 24px; line-height: 32px; font-weight: 700; }
.device-separator { height: 1px; width: 100%; margin: 20px 0; background: rgba(255,255,255,0.05); }
.device-status-stack { display: flex; flex-direction: column; gap: 24px; }
.device-label { display: block; margin-bottom: 8px; color: var(--st-outline); font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.device-value { color: var(--st-primary-soft); font-size: 18px; line-height: 28px; font-weight: 500; word-break: break-word; }
.device-status-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 8px; color: var(--st-red); background: rgba(255,0,60,0.1); border: 1px solid rgba(255,0,60,0.2); font-weight: 800; }
.device-status-badge.active { color: var(--st-green); background: rgba(0,255,65,0.1); border-color: rgba(0,255,65,0.25); }
.device-upgrade-card { position: relative; overflow: hidden; margin-top: auto; padding: 24px; border-radius: 12px; background: var(--st-elevated); border: 1px solid rgba(255,255,255,0.05); }
.device-upgrade-card h3 { position: relative; z-index: 1; margin: 0 0 12px; color: var(--st-gold); font-size: 24px; line-height: 32px; font-weight: 700; }
.device-upgrade-card p { position: relative; z-index: 1; margin: 0 0 24px; color: var(--st-muted); }
.device-gradient-btn { position: relative; z-index: 1; display: inline-flex; justify-content: center; padding: 16px; border: 0; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #4b45d2, #8a2be2); box-shadow: 0 0 10px rgba(75,69,210,0.3); font-size: 18px; font-weight: 800; text-decoration: none; cursor: pointer; }
.device-gradient-btn:hover { box-shadow: 0 0 20px rgba(138,43,226,0.6); }
.linked-devices-panel { display: flex; flex-direction: column; }
.linked-devices-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.device-link-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 8px; border: 1px solid rgba(194,193,255,0.2); background: rgba(194,193,255,0.1); color: var(--st-primary-soft); font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; }
.device-empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 0; text-align: center; }
.device-empty-icon { width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; margin-bottom: 24px; border-radius: 999px; background: var(--st-elevated); border: 1px solid rgba(255,255,255,0.05); box-shadow: inset 0 0 18px rgba(0,0,0,0.28); }
.device-empty-icon .material-symbols-outlined { color: var(--st-outline); font-size: 48px; font-variation-settings: 'wght' 300; }
.device-empty-state h3 { margin: 0 0 12px; color: var(--st-text); font-size: 24px; line-height: 32px; font-weight: 700; }
.device-empty-state p { max-width: 460px; margin: 0 auto; color: var(--st-muted); line-height: 24px; }
.device-list { display: flex; flex-direction: column; gap: 16px; }
.device-item { padding: 18px; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); }

@media (max-width: 900px) {
  .leaderboard-podium-grid,
  .gold-lounge-grid,
  .device-manager-grid { grid-template-columns: 1fr; }
  .leader-podium-card.rank-1,
  .leader-podium-card.rank-2,
  .leader-podium-card.rank-3 { order: initial; margin-top: 0; transform: none; }
  .leader-podium-card.rank-1:hover { transform: translateY(-4px); }
  .leader-table-head,
  .leader-row { grid-template-columns: 56px 1fr 110px; }
  .leader-table-head > :nth-child(3),
  .leader-row-tier { display: none; }
}

@media (max-width: 640px) {
  .leaderboard-gold,
  .gold-lounge,
  .device-manager { padding-left: 12px; padding-right: 12px; }
  .leaderboard-hero { min-height: 350px; }
  .leaderboard-tabs-inner { flex-direction: column; border-radius: 24px; width: 100%; }
  .leaderboard-tab-primary,
  .leaderboard-tab-secondary,
  .leaderboard-share-tab { width: 100%; justify-content: center; }
  .leader-table-head,
  .leader-row { grid-template-columns: 44px 1fr 84px; gap: 10px; }
  .leader-row-avatar { width: 40px; height: 40px; }
  .leader-row-name { font-size: 15px; }
  .leader-row-points { font-size: 16px; }
  .gold-benefit-grid { grid-template-columns: 1fr; }
  .gold-price-head { flex-direction: column; align-items: flex-start; }
  .linked-devices-head { flex-direction: column; align-items: flex-start; }
}

/* Final parity corrections for Stitch source layouts */
.stitch-profile .nexus-shell,
.stitch-progress .nexus-shell {
  max-width: 1280px !important;
  min-height: calc(100vh - 96px);
  overflow: visible !important;
}

.stitch-profile .nexus-main,
.stitch-progress .nexus-main {
  padding: 48px 24px !important;
}

.stitch-profile .nexus-hero,
.stitch-progress .nexus-hero {
  height: 256px !important;
  min-height: 256px !important;
  margin-bottom: 24px !important;
  border-radius: 12px !important;
}

.stitch-profile .nexus-hero-content,
.stitch-progress .nexus-hero-content {
  padding: 24px !important;
  align-items: flex-end !important;
  flex-direction: row !important;
  text-align: left !important;
}

.stitch-profile .nexus-avatar-ring,
.stitch-progress .nexus-avatar-ring {
  width: 128px !important;
  height: 128px !important;
}

.stitch-profile .nexus-grid,
.stitch-progress .nexus-grid {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 16px 24px !important;
}

.stitch-profile .nexus-stats,
.stitch-progress .nexus-stats {
  grid-column: span 8 / span 8 !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

.stitch-profile .nexus-milestone,
.stitch-progress .nexus-milestone {
  grid-column: span 4 / span 4 !important;
  align-self: stretch;
}

.stitch-profile .nexus-activity,
.stitch-progress .nexus-activity {
  grid-column: 1 / -1 !important;
  margin-top: 16px !important;
}

.stitch-profile .nexus-activity-grid,
.stitch-progress .nexus-activity-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

.stitch-profile .nexus-stat,
.stitch-progress .nexus-stat {
  min-height: 150px !important;
}

.stitch-devices {
  min-height: 100vh;
}

.stitch-devices .pg-page {
  min-height: calc(100vh - 96px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 24px 48px !important;
}

.stitch-devices .device-manager {
  width: 100% !important;
  max-width: 1024px !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

.stitch-devices .device-manager-header {
  margin-bottom: 48px !important;
}

.stitch-devices .device-manager-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 32px !important;
  align-items: stretch !important;
}

.stitch-devices .device-panel {
  background: var(--st-container) !important;
  border-radius: 16px !important;
  padding: 32px !important;
}

.stitch-devices .device-status-panel {
  grid-column: span 1 / span 1 !important;
}

.stitch-devices .linked-devices-panel {
  grid-column: span 2 / span 2 !important;
  min-height: 420px;
}

.stitch-devices .device-empty-state {
  min-height: 320px;
}

@media (max-width: 980px) {
  .stitch-profile .nexus-stats,
  .stitch-progress .nexus-stats,
  .stitch-profile .nexus-milestone,
  .stitch-progress .nexus-milestone,
  .stitch-profile .nexus-activity,
  .stitch-progress .nexus-activity {
    grid-column: 1 / -1 !important;
  }

  .stitch-devices .device-manager-grid {
    grid-template-columns: 1fr !important;
  }

  .stitch-devices .device-status-panel,
  .stitch-devices .linked-devices-panel {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 760px) {
  .stitch-profile .nexus-main,
  .stitch-progress .nexus-main {
    padding: 16px !important;
  }

  .stitch-profile .nexus-hero,
  .stitch-progress .nexus-hero {
    height: 360px !important;
    min-height: 360px !important;
  }

  .stitch-profile .nexus-hero-content,
  .stitch-progress .nexus-hero-content {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-end;
    text-align: center !important;
    gap: 16px !important;
  }

  .stitch-profile .nexus-avatar-ring,
  .stitch-progress .nexus-avatar-ring {
    width: 104px !important;
    height: 104px !important;
  }

  .stitch-profile .nexus-stats,
  .stitch-progress .nexus-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .stitch-profile .nexus-activity-grid,
  .stitch-progress .nexus-activity-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .stitch-profile .nexus-stats,
  .stitch-progress .nexus-stats {
    grid-template-columns: 1fr !important;
  }

  .stitch-devices .pg-page {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}
