/* Account progression and shared lobby surfaces. Gameplay is intentionally scoped out. */
body:not([data-theme="light"]) {
  --lobby-panel: rgba(13, 17, 27, 0.88);
  --lobby-raised: rgba(22, 29, 46, 0.78);
  --lobby-line: rgba(255, 255, 255, 0.08);
  --lobby-line-hover: rgba(255, 255, 255, 0.18);
  --lobby-ink: #f8fafc;
  --lobby-muted: #94a3b8;
  --lobby-subtle: #64748b;
  --lobby-glow: rgba(56, 189, 248, 0.25);
  --lobby-card: rgba(255, 255, 255, 0.035);
  --lobby-card-hover: rgba(255, 255, 255, 0.065);
  --lobby-inner-bevel: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
body[data-theme="light"] {
  --lobby-panel: #ffffff;
  --lobby-raised: #f8fafc;
  --lobby-line: #e2e8f0;
  --lobby-ink: #0f172a;
  --lobby-muted: #64748b;
}

/* Document-level scrolling for lobby surfaces */
html:not(.in-game),
html:has(body:not(.in-game)) {
  height: auto !important;
  min-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
}
body:not(.in-game) {
  height: auto !important;
  min-height: 100% !important;
  overflow-y: visible !important;
  overflow-x: hidden !important;
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch;
}
html.in-game,
body.in-game {
  height: 100% !important;
  overflow: hidden !important;
  touch-action: none !important;
}

.account-level {
  display:inline-flex; align-items:center; justify-content:center; width:max-content;
  padding:4px 9px; border:1px solid #38bdf84d; border-radius:7px;
  color:var(--highlight); background:#38bdf80d; font-size:.75rem; font-weight:800;
  line-height:1.2; white-space:nowrap; letter-spacing:.035em; font-variant-numeric:tabular-nums;
}
.account-progress-panel {
  padding:16px 18px; margin:0 0 16px; text-align:left; border:1px solid var(--lobby-line);
  background:linear-gradient(115deg,#38bdf812,transparent),var(--lobby-panel); border-radius:16px;
  color:var(--lobby-ink);
}
.account-progress-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:.82rem; color:var(--lobby-muted); }
.account-progress-values { display:flex; align-items:baseline; gap:7px; margin:8px 0; flex-wrap:wrap; }
.account-progress-values strong { font-size:1.6rem; letter-spacing:-.04em; }
.account-progress-values span,.account-progress-panel small { color:var(--lobby-muted); font-size:.8rem; }
.account-progress-panel progress { display:block; appearance:none; width:100%; height:7px; margin:8px 0 10px; border:0; border-radius:8px; overflow:hidden; background:var(--lobby-line); }
.account-progress-panel progress::-webkit-progress-bar { background:var(--lobby-line); }
.account-progress-panel progress::-webkit-progress-value { background:linear-gradient(90deg,#38bdf8,#818cf8); border-radius:8px; }
.account-progress-panel progress::-moz-progress-bar { background:linear-gradient(90deg,#38bdf8,#818cf8); }
.account-xp-result { font-size:1.15rem; font-weight:750; color:var(--highlight); margin:8px 0; }
.account-unsynced { color:var(--lobby-muted); text-align:center; font-size:.85rem; }
body:not(.in-game) .app-header {
  position:relative; top:auto; box-sizing:border-box; width:100%; height:auto!important; min-height:64px;
  padding:10px max(24px,calc((100vw - 1360px)/2));
  background:var(--lobby-panel); border-bottom:1px solid var(--lobby-line); gap:24px;
  box-shadow:0 12px 40px #00000012;
}
.app-header .header-right,.app-header .auth-group { flex-wrap:wrap; gap:10px; min-width:0; }
.app-header .user-badge-pill {
  display: inline-flex;
  align-items: center !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  padding: 4px 14px 4px 6px !important;
  gap: 8px !important;
  border-radius: 14px !important;
  max-width: 280px !important;
  background: var(--lobby-raised) !important;
  border: 1px solid var(--lobby-line) !important;
  overflow: visible !important;
  position: relative !important;
  box-sizing: border-box !important;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.app-header .user-badge-pill.hidden,
.app-header .user-badge-pill[style*="display: none"],
.app-header .user-badge-pill[style*="display:none"] {
  display: none !important;
}
.app-header #btn-open-auth.hidden,
.app-header #btn-open-auth[style*="display: none"],
.app-header #btn-open-auth[style*="display:none"] {
  display: none !important;
}
.app-header .user-badge-pill:hover {
  border-color: var(--highlight) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}
.header-avatar-stage {
  width: 44px !important;
  height: 44px !important;
  flex: 0 0 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  overflow: visible !important;
}
.header-avatar-stage:is(:has(.frame-champion-crown), .has-champion-crown) {
  width: 72px !important;
  height: 44px !important;
  flex-basis: 72px !important;
}
.header-avatar-stage::before,
.header-avatar-stage::after,
.app-header .user-badge-pill::before,
.app-header .user-badge-pill::after {
  content: none !important;
  display: none !important;
}
.app-header .icon-user-container {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  flex: 0 0 36px !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
}
.header-player-identity {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: flex-start !important;
  gap: 2px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
}
.app-header .user-badge-pill #username-span {
  display: block !important;
  font-size: 0.86rem !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  color: var(--lobby-ink) !important;
  max-width: 150px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.app-header .user-badge-pill .account-level {
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  padding: 1px 6px !important;
  line-height: 1.2 !important;
  border-radius: 5px !important;
  flex-shrink: 0 !important;
  letter-spacing: 0.03em !important;
  align-self: flex-start !important;
  margin: 0 !important;
}
.app-header .nav-btn { min-height:44px; min-width:44px; border-radius:12px; }
body:not(.in-game) #menu-layer,
body:not(.in-game) .song-selection {
  position: relative !important;
  inset: auto !important;
  height: auto !important;
  min-height: calc(100dvh - 100px) !important;
  overflow: visible !important;
  padding: 32px max(24px, calc((100vw - 1360px) / 2)) 48px;
  box-sizing: border-box;
  display: block !important;
}
#menu-layer > .shimmer-text {
  width: 100%;
  text-align: left;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0 0 24px;
  line-height: 1.15;
  background: linear-gradient(135deg, #ffffff 30%, #38bdf8 75%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 14px rgba(56, 189, 248, 0.2));
  text-shadow: none;
  animation: none;
}
body[data-theme="light"] #menu-layer > .shimmer-text,
body[data-theme="light"] .shimmer-text {
  background: linear-gradient(135deg, #0f172a 30%, #0284c7 75%, #4f46e5 100%) !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  filter: none !important;
}
.song-catalog-container { width: 100%; max-width: none; padding: 0; height: auto; overflow: visible; }
.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--lobby-line);
  margin-bottom: 20px;
  gap: 14px;
  flex-wrap: wrap;
}
.catalog-stats-badge {
  padding: 6px 16px !important;
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 999px !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lobby-muted);
  font-size: 0.86rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
#catalog-passed-count { font-weight: 750; color: #38bdf8; }
.catalog-toolbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.catalog-toolbar-actions .btn-shop-toolbar {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  border-radius: 12px !important;
  color: var(--lobby-ink) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.catalog-toolbar-actions .btn-shop-toolbar:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  transform: translateY(-1px);
}
.catalog-toolbar-actions #btn-open-shop {
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.28) !important;
  background: rgba(245, 158, 11, 0.07) !important;
}
.catalog-toolbar-actions #btn-open-shop:hover {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25) !important;
}
.catalog-toolbar-actions #btn-open-customization {
  color: #c084fc !important;
  border-color: rgba(192, 132, 252, 0.28) !important;
  background: rgba(192, 132, 252, 0.07) !important;
}
.catalog-toolbar-actions #btn-open-customization:hover {
  background: rgba(192, 132, 252, 0.15) !important;
  border-color: rgba(192, 132, 252, 0.5) !important;
  box-shadow: 0 4px 16px rgba(192, 132, 252, 0.25) !important;
}
.catalog-toolbar-actions #btn-open-leaderboard {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  border-radius: 12px !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #6366f1 0%, #0284c7 60%, #38bdf8 100%) !important;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 18px !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.catalog-toolbar-actions #btn-open-leaderboard:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 22px rgba(56, 189, 248, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}
.catalog-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding: 2px;
  background: none;
  border: 0;
}
.catalog-filter-bar .filter-chip {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: var(--lobby-muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-size: 0.84rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.catalog-filter-bar .filter-chip:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
}
.catalog-filter-bar .filter-chip.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(129, 140, 248, 0.15)) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
  color: #38bdf8 !important;
  box-shadow: 0 2px 12px rgba(56, 189, 248, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}
.catalog-controls-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  gap: 12px;
  margin-bottom: 24px;
}
.catalog-controls-row .search-container { max-width: none; margin: 0; width: 100%; position: relative; }
.catalog-controls-row input,
.catalog-controls-row select {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
  color: var(--lobby-ink);
  font-size: 0.88rem;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.catalog-controls-row input:focus,
.catalog-controls-row select:focus {
  border-color: #38bdf8;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
#menu-layer .song-grid,
body:not(.in-game) .song-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
  padding: 0 0 44px;
  max-height: none !important;
  overflow: visible !important;
}
#menu-layer .song-grid:after,
.song-grid:after { display: none !important; }
#menu-layer .song-card {
  padding: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}
#menu-layer .song-card:hover {
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 20px -4px rgba(56, 189, 248, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
#menu-layer .spotify-cover-wrap {
  margin: 0;
  aspect-ratio: 1.52;
  border-radius: 19px 19px 0 0;
  box-shadow: none;
  isolation: isolate;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
#menu-layer .spotify-cover-wrap:after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(7, 9, 14, 0.1) 0%, rgba(7, 9, 14, 0.65) 100%);
  pointer-events: none;
}
#menu-layer .spotify-card-info {
  padding: 16px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#menu-layer .spotify-track-title {
  color: var(--lobby-ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
  letter-spacing: -0.01em;
}
#menu-layer .spotify-track-artist {
  color: var(--lobby-muted);
  font-size: 0.82rem;
  margin: 4px 0 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#menu-layer .spotify-track-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 10px;
  margin-top: auto;
}
#menu-layer .spotify-play-btn {
  opacity: 0.92;
  transform: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, opacity 0.2s ease;
  z-index: 5;
}
#menu-layer .song-card:hover .spotify-play-btn {
  opacity: 1;
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
:is(button,input,select,[role="button"],.song-card):focus-visible { outline: 2px solid var(--highlight) !important; outline-offset: 4px; }
.user-profile-card { background:radial-gradient(ellipse at 50% 0,#38bdf815,transparent 260px),var(--lobby-panel)!important; }
.user-profile-card .profile-stat-box { background:var(--lobby-raised); border-color:var(--lobby-line); }
.user-profile-card .user-profile-rank-badge { align-self:center; margin:0; }
.user-profile-card .avatar-action-btn { min-width:44px; min-height:44px; }
.leaderboard-modal .lb-limit-btn { min-height:44px; min-width:44px; }
.leaderboard-modal .podium-player-details { gap:5px; }
.leaderboard-modal .podium-avatar-stage:has(.frame-champion-crown) { min-height:165px; }
.leaderboard-modal .podium-player-details .account-level { margin-bottom:4px; }
.leaderboard-modal .lb-player-info .account-level { font-size:.7rem; padding:3px 6px; }
.leaderboard-modal .lb-player-name { overflow-wrap:anywhere; }
.leaderboard-modal .lb-avatar-stage { min-width:80px; min-height:80px; }
.leaderboard-modal .lb-avatar-stage:has(.frame-champion-crown) { min-width:126px; min-height:126px; }
.leaderboard-modal .lb-avatar-mini { width:44px!important; height:44px!important; flex:0 0 44px!important; }
@media(min-width:1600px) { #menu-layer .song-grid { grid-template-columns:repeat(5,minmax(0,1fr)); } }
@media(max-width:900px) {
  body:not(.in-game) .app-header { padding:10px 20px; gap:12px; flex-wrap:wrap; }
  body:not(.in-game) #menu-layer { padding:24px 20px 32px; }
  .catalog-toolbar { align-items:flex-start; }
  .catalog-toolbar-actions { flex-wrap:wrap; }
  .leaderboard-modal .podium-avatar-stage:has(.frame-champion-crown) { min-height:155px; }
}
@media(max-width:600px) {
  body:not(.in-game) .app-header {
    padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: auto !important;
    background: rgba(7, 9, 14, 0.88) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--lobby-line);
  }
  .app-header .header-left { width: 100%; display: flex; justify-content: space-between; align-items: center; }
  .app-header .logo-title { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.06em; margin: 0; }
  .app-header .header-right { width: 100%; }
  .app-header .auth-group { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
  body:not(.in-game) .user-badge-pill {
    flex: 1 1 auto;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 52px !important;
    padding: 4px 12px 4px 8px !important;
    display: inline-flex;
    align-items: center !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    border-radius: 14px !important;
  }
  body:not(.in-game) .user-badge-pill.hidden,
  body:not(.in-game) .user-badge-pill[style*="display: none"],
  body:not(.in-game) .user-badge-pill[style*="display:none"] {
    display: none !important;
  }
  body:not(.in-game) .user-badge-pill #username-span {
    display: block !important;
    max-width: 155px !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: var(--lobby-ink) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  body:not(.in-game) .user-badge-pill .icon-user-container {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
  }
  .app-header #btn-open-admin { grid-column: auto; }
  body:not(.in-game) #menu-layer { padding: 18px 14px max(24px, env(safe-area-inset-bottom)); }
  #menu-layer > .shimmer-text { font-size: 1.55rem; margin-bottom: 16px; font-weight: 800; }
  .catalog-toolbar { gap: 14px; padding-bottom: 16px; margin-bottom: 12px; }
  .catalog-toolbar-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px; }
  .catalog-toolbar-actions #btn-open-leaderboard { grid-column: 1 / -1; height: 42px; }
  .catalog-filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    gap: 6px;
  }
  .catalog-filter-bar::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
  .catalog-filter-bar .filter-chip { flex: 0 0 auto; min-height: 38px; padding: 6px 14px; font-size: 0.82rem; }
  .catalog-controls-row { grid-template-columns: 1fr; gap: 8px; margin-bottom: 16px; }
  .catalog-controls-row select { min-height: 44px; }
  #menu-layer .song-grid, .song-grid { grid-template-columns: 1fr !important; gap: 12px !important; max-height: none !important; padding: 0 0 30px !important; }
  #menu-layer .song-grid::after, .song-grid::after { display: none !important; }
  #menu-layer .song-card, .song-card {
    display: grid !important;
    grid-template-columns: 114px minmax(0, 1fr) !important;
    border-radius: 18px !important;
    min-height: 136px !important;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.035) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    overflow: hidden !important;
  }
  #menu-layer .spotify-cover-wrap, .spotify-cover-wrap {
    height: 100% !important;
    aspect-ratio: auto !important;
    padding: 8px !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  #menu-layer .spotify-card-info, .spotify-card-info {
    padding: 12px 14px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-width: 0 !important;
  }
  #menu-layer .spotify-track-title, .spotify-track-title {
    font-size: 0.98rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    min-height: 0 !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  #menu-layer .spotify-track-artist, .spotify-track-artist { font-size: 0.8rem !important; white-space: normal !important; margin: 3px 0 8px !important; }
  #menu-layer .spotify-track-footer, .spotify-track-footer { border-top: 1px solid rgba(255, 255, 255, 0.07) !important; padding-top: 6px !important; }
  #menu-layer .spotify-cover-art, .spotify-cover-art { opacity: 0.7 !important; display: flex !important; align-items: center !important; justify-content: center !important; }
  #menu-layer .spotify-vinyl-disc, .spotify-vinyl-disc { width: 56px !important; height: 56px !important; }
  #menu-layer .spotify-play-btn, .spotify-play-btn {
    opacity: 1 !important;
    transform: none !important;
    width: 36px !important;
    height: 36px !important;
    right: 8px !important;
    bottom: 8px !important;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.5) !important;
  }
  .leaderboard-modal .lb-podium-container { flex-wrap: wrap; gap: 8px !important; align-items: stretch !important; }
  .leaderboard-modal .podium-card.podium-rank-1 { order: 0 !important; flex: 0 0 100% !important; margin: 0 !important; padding: 10px 12px !important; }
  .leaderboard-modal .podium-card.podium-rank-2,.leaderboard-modal .podium-card.podium-rank-3 { flex:1 1 0!important; padding:10px 8px 0!important; }
  .leaderboard-modal .podium-rank-1 .podium-avatar { width:58px!important; height:58px!important; }
  .leaderboard-modal .podium-rank-1 .podium-avatar.frame-champion-crown::before { inset: -60% !important; }
  .leaderboard-modal .podium-rank-1 .podium-avatar-stage { height:110px!important; min-height:110px!important; }
  .leaderboard-modal .podium-rank-1 .podium-avatar-stage:has(.frame-champion-crown) { min-height:135px!important; }
  .leaderboard-modal .podium-rank-2 .podium-avatar,.leaderboard-modal .podium-rank-3 .podium-avatar { width:48px!important; height:48px!important; }
  .leaderboard-modal .podium-rank-2 .podium-avatar-stage,.leaderboard-modal .podium-rank-3 .podium-avatar-stage { height:95px!important; min-height:95px!important; }
  .leaderboard-modal .podium-avatar-stage:has(.frame-champion-crown) { min-height:135px!important; }
  .leaderboard-modal .podium-card .podium-name { font-size:.95rem!important; white-space:normal!important; overflow-wrap:anywhere; }
  .leaderboard-modal .podium-title-badge { font-size:.7rem; white-space:normal!important; }
  .leaderboard-modal .podium-tier-label { font-size:.65rem; }
  .leaderboard-modal .podium-card .podium-score { font-size:1.1rem!important; line-height:1.3; }
  .leaderboard-modal .podium-card .podium-levels { font-size:.72rem; }
  .leaderboard-modal .lb-table thead { display:none!important; }
  .leaderboard-modal .lb-table,.leaderboard-modal .lb-table tbody { display:block!important; }
  .leaderboard-modal .lb-table .lb-player-row { display:grid!important; grid-template-columns:36px minmax(0,1fr); margin:10px 0; padding:10px; border:1px solid var(--lobby-line); border-radius:14px; background:var(--lobby-raised); }
  .leaderboard-modal .lb-table td { display:block!important; background:none!important; border:0!important; padding:0!important; }
  .leaderboard-modal .lb-col-rank { grid-row:1/3; align-self:center; }
  .leaderboard-modal .lb-table .lb-col-player { grid-column:2; }
  .leaderboard-modal .lb-player-cell { gap:12px!important; }
  .leaderboard-modal .lb-avatar-stage { width:80px!important; height:80px!important; flex:0 0 80px!important; }
  .leaderboard-modal .lb-avatar-stage:has(.frame-champion-crown) { width:126px!important; height:126px!important; flex-basis:126px!important; }
  .leaderboard-modal .lb-player-name { font-size:.95rem!important; }
  .leaderboard-modal .lb-player-title-box .user-title-badge { font-size:.72rem!important; white-space:normal!important; max-width:none!important; }
  .leaderboard-modal .lb-table .lb-col-levels { grid-column:2; text-align:left!important; padding-top:6px!important; }
  .leaderboard-modal .lb-stat-levels-sub { display:inline!important; margin-right:4px; margin-left:0!important; font-size:.8rem; }
  .leaderboard-modal .lb-table .lb-col-score { grid-column:2; text-align:left!important; padding-top:5px!important; }
  .leaderboard-modal .lb-score-val { font-size:1.05rem!important; }
}
@media(prefers-reduced-motion:reduce) { #menu-layer .song-card { transition:none; } }

/* ==========================================
   TITLE TIER SYSTEM (TROPHY BADGES)
   ========================================== */
.user-title-badge.title-tier-common,
.podium-title-badge.title-tier-common {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.user-title-badge.title-tier-thematic,
.podium-title-badge.title-tier-thematic {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(99, 102, 241, 0.18));
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.user-title-badge.title-tier-rare,
.podium-title-badge.title-tier-rare {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(236, 72, 153, 0.18));
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.user-title-badge.title-tier-elite,
.podium-title-badge.title-tier-elite {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(168, 85, 247, 0.22), rgba(56, 189, 248, 0.22));
  color: #fef08a;
  border: 1px solid rgba(251, 191, 36, 0.6);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.35), inset 0 0 8px rgba(251, 191, 36, 0.2);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

/* ==========================================
   CUSTOMIZATION SHOWCASE PEDESTAL & TABS
   ========================================== */
.customization-modal-card {
  max-width: 940px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.customization-nav-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--lobby-line);
  padding-bottom: 12px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.cust-main-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--lobby-line);
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cust-main-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.16);
}

.cust-main-tab.active {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.cust-showcase-pedestal {
  position: relative;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88) 0%, rgba(11, 18, 33, 0.96) 100%);
  border: 1px solid var(--lobby-line);
  border-radius: 18px;
  padding: 18px 28px;
  margin-bottom: 16px;
  overflow: visible;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.cust-showcase-aura {
  position: absolute;
  top: 50%;
  left: 98px;
  transform: translate(-50%, -50%);
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(24px);
}

.cust-showcase-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  position: relative;
  z-index: 1;
}

.cust-showcase-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 140px;
  width: 140px;
  position: relative;
}

.cust-showcase-avatar-stage {
  width: 140px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
  margin: 0 auto;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cust-showcase-avatar-stage.has-champion-crown {
  height: 96px;
}

.cust-showcase-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  margin: 0 auto;
  overflow: visible;
}

.cust-showcase-avatar .avatar-photo,
.cust-showcase-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.cust-showcase-avatar-fallback,
.cust-showcase-avatar .avatar-letter {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  font-size: 1.6rem;
  font-weight: 800;
  color: #38bdf8;
  line-height: 1;
}

.cust-pedestal-base {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -2px;
  width: 100%;
}

.cust-pedestal-ring {
  width: 86px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.75) 0%, rgba(56, 189, 248, 0.15) 70%, transparent 100%);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.6);
  margin: 0 auto;
}

.cust-pedestal-plate {
  width: 104px;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  margin-top: 1px;
  margin-left: auto;
  margin-right: auto;
}

.cust-showcase-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cust-showcase-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cust-showcase-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  font-weight: 600;
}

.cust-showcase-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cust-showcase-title-row {
  display: flex;
  align-items: center;
  margin-top: 2px;
}

.cust-showcase-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.cust-showcase-hint {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.4;
}

.cust-showcase-apply-btn {
  padding: 6px 18px;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: 8px;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #fff;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}

/* ==========================================
   FRAMES & TITLES MODERNIZED GRIDS & CARDS
   ========================================== */
.cust-collection-heading {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin: 16px 0 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.cust-frame-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--lobby-line);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}

.cust-frame-card:hover {
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background: rgba(30, 41, 59, 0.5);
}

.cust-frame-card.equipped {
  border-color: rgba(34, 197, 94, 0.6);
  background: rgba(34, 197, 94, 0.06);
}

.cust-frame-card.previewing {
  border-color: rgba(56, 189, 248, 0.8);
  background: rgba(56, 189, 248, 0.1);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
}

.cust-frame-card.locked {
  opacity: 0.65;
}

.cust-frame-preview-stage {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.cust-frame-preview-stage.has-champion-crown {
  width: 74px;
  flex-basis: 74px;
}

.cust-frame-mini-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.cust-frame-mini-avatar .avatar-photo,
.cust-mini-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.cust-mini-avatar-initial,
.cust-frame-mini-avatar .avatar-letter {
  font-size: 0.95rem;
  font-weight: 700;
  color: #94a3b8;
}

.cust-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.cust-status-badge.equipped {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.cust-status-badge.unlocked {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.cust-status-badge.locked {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

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

.cust-trophy-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--lobby-line);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}

.cust-trophy-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(30, 41, 59, 0.5);
}

.cust-trophy-card.equipped {
  border-color: rgba(34, 197, 94, 0.6);
  background: rgba(34, 197, 94, 0.05);
}

.cust-trophy-card.previewing {
  border-color: rgba(56, 189, 248, 0.8);
  background: rgba(56, 189, 248, 0.08);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.cust-trophy-card.locked {
  opacity: 0.65;
}

.cust-trophy-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cust-trophy-tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

.cust-trophy-tier-pill.tier-elite {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.45);
}

.cust-trophy-tier-pill.tier-rare {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.cust-trophy-tier-pill.tier-thematic {
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.cust-trophy-tier-pill.tier-common {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.cust-trophy-badge-stage {
  padding: 4px 0;
}

.cust-trophy-desc {
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================
   FRIENDS MODAL & PLAYER CARDS
   ========================================== */
.friends-modal-card {
  max-width: 680px;
  width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.friend-player-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--lobby-line);
  border-radius: 14px;
  margin-bottom: 10px;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.friend-player-card:hover {
  background: rgba(30, 41, 59, 0.65);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

.friend-avatar-stage {
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.friend-player-card.has-champion-crown .friend-avatar-stage {
  width: 78px;
  flex-basis: 78px;
}

.friend-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
}

.friend-avatar .avatar-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.friend-avatar .avatar-letter {
  font-size: 1.1rem;
  font-weight: 700;
  color: #38bdf8;
}

.friend-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.friend-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.friend-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.friend-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.friend-stat-levels-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: 6px;
  padding: 2px 7px;
}

.friend-status-quote {
  font-size: 0.74rem;
  color: #94a3b8;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.friend-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.friend-actions .modern-btn {
  padding: 6px 10px;
  border-radius: 8px;
}

.friend-request-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--lobby-line);
  border-radius: 14px;
  margin-bottom: 10px;
}

.friend-request-details {
  flex: 1;
  min-width: 0;
}

.friend-req-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 2px;
}

.friend-request-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.friends-empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: #94a3b8;
  gap: 12px;
}

.friends-empty-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.friends-empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f8fafc;
}

.friends-empty-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  max-width: 280px;
  line-height: 1.4;
}

/* ==========================================
   RESPONSIVE ADAPTATIONS (MOBILE / TABLET)
   ========================================== */
@media (max-width: 640px) {
  .cust-showcase-pedestal {
    padding: 10px 16px;
    margin-bottom: 12px;
    border-radius: 14px;
    overflow: visible;
  }
  .cust-showcase-inner {
    flex-direction: row !important;
    align-items: center;
    gap: 16px;
    text-align: left;
  }
  .cust-showcase-stage {
    flex: 0 0 76px;
    width: 76px;
    min-width: 76px;
    margin: 0;
  }
  .cust-showcase-avatar-stage {
    width: 76px;
    height: 60px;
  }
  .cust-showcase-avatar-stage.has-champion-crown {
    width: 76px !important;
    height: 60px !important;
  }
  .cust-showcase-avatar {
    width: 44px;
    height: 44px;
  }
  .cust-showcase-avatar-fallback,
  .cust-showcase-avatar .avatar-letter {
    font-size: 1.15rem;
  }
  .cust-pedestal-base {
    display: none !important;
  }
  .cust-showcase-aura {
    left: 54px;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 86px;
    height: 86px;
    filter: blur(14px);
  }
  .cust-showcase-details {
    flex: 1;
    min-width: 0;
    gap: 2px;
  }
  .cust-showcase-badge-row {
    gap: 6px;
    justify-content: flex-start;
  }
  .cust-showcase-tag {
    font-size: 0.62rem;
  }
  .cust-showcase-name {
    font-size: 1.05rem;
    line-height: 1.2;
  }
  .cust-showcase-title-row {
    margin-top: 1px;
    justify-content: flex-start;
  }
  .cust-showcase-title-row .user-title-badge {
    font-size: 0.72rem;
    padding: 2px 7px;
  }
  .cust-showcase-status-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-align: left;
    margin-top: 3px;
    padding-top: 4px;
  }
  .cust-showcase-hint {
    font-size: 0.72rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
  }
  .cust-showcase-apply-btn {
    padding: 3px 12px;
    font-size: 0.76rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  /* Global Modal Overlay & Dialogs Full-Width Adaptation on Mobile */
  .modal-overlay {
    padding: 6px !important;
    padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)) !important;
  }
  .admin-modal-content,
  .friends-modal-card,
  .customization-modal-card,
  .leaderboard-modal {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }

  /* 1. Mobile Customization Modal */
  .customization-modal-card {
    height: calc(100dvh - 12px) !important;
    max-height: calc(100dvh - 12px) !important;
    padding: 14px 10px !important;
    border-radius: 16px !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .cust-tab-pane {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .customization-nav-tabs {
    display: flex !important;
    flex-direction: row !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-bottom: 10px !important;
    margin-bottom: 12px !important;
    flex-shrink: 0 !important;
  }
  .cust-main-tab {
    flex: 1 1 0 !important;
    justify-content: center !important;
    padding: 8px 6px !important;
    font-size: 0.82rem !important;
    gap: 6px !important;
    white-space: nowrap !important;
  }
  .cust-frames-grid,
  .cust-titles-grid,
  .shop-themes-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .cust-frame-card,
  .cust-trophy-card,
  .shop-theme-card {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 2. Mobile Friends Modal & Cards */
  .friends-modal-card {
    height: calc(100dvh - 12px) !important;
    max-height: calc(100dvh - 12px) !important;
    padding: 14px 10px !important;
    border-radius: 16px !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .friends-list-container,
  #friends-list-container {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .friend-player-card {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 6px 10px !important;
    padding: 10px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 14px !important;
  }
  .friend-avatar-stage {
    grid-row: 1 / 3 !important;
    grid-column: 1 !important;
    width: 56px !important;
    height: 56px !important;
    flex: 0 0 56px !important;
  }
  .friend-player-card.has-champion-crown .friend-avatar-stage {
    width: 74px !important;
    flex-basis: 74px !important;
  }
  .friend-avatar {
    width: 42px !important;
    height: 42px !important;
  }
  .friend-details {
    grid-row: 1 !important;
    grid-column: 2 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
  }
  .friend-name-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
  }
  .friend-name {
    font-size: 0.92rem !important;
    max-width: 130px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  .friend-actions {
    grid-row: 1 !important;
    grid-column: 3 !important;
    display: flex !important;
    gap: 6px !important;
    align-self: center !important;
  }
  .friend-actions .modern-btn {
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
  }
  .friend-badges-row {
    grid-row: 2 !important;
    grid-column: 2 / 4 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    margin-top: 2px !important;
  }
  .friend-status-quote {
    grid-row: 3 !important;
    grid-column: 2 / 4 !important;
    font-size: 0.72rem !important;
    margin-top: 2px !important;
  }

  /* 3. Mobile Admin Modal */
  .admin-modal-content {
    height: calc(100dvh - 12px) !important;
    max-height: calc(100dvh - 12px) !important;
    border-radius: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  .admin-sticky-header {
    flex-shrink: 0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    padding: 12px 14px !important;
    background: var(--surface-color, #0b1324) !important;
    border-bottom: 1px solid var(--surface-border, rgba(255,255,255,0.1)) !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }
  .admin-modal-scroll-area {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 12px 10px 24px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .admin-autobot-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    box-sizing: border-box !important;
  }
  .admin-autobot-banner .admin-bot-btn {
    width: 100% !important;
    justify-content: center !important;
  }
  .admin-tabs {
    flex-direction: row !important;
    gap: 6px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .admin-tab-btn {
    padding: 8px 12px !important;
    font-size: 0.82rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  .admin-card {
    padding: 14px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .admin-spotify-box {
    padding: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .admin-spotify-input-row {
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .admin-spotify-btn {
    width: 100% !important;
    justify-content: center !important;
  }
  .admin-grid,
  .admin-grid-tracks,
  .admin-grid-2col,
  .admin-grid-3col {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 4. Mobile Leaderboard Modal — entire modal scrolls; sticky header+filters, Top 3 scrolls naturally with rows */
  .leaderboard-modal {
    padding: 0 10px 14px 10px !important;
    height: calc(100dvh - 12px) !important;
    max-height: calc(100dvh - 12px) !important;
    border-radius: 18px !important;
    display: block !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
    box-sizing: border-box !important;
  }
  .leaderboard-modal .lb-sticky-top {
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    margin: 0 -10px 10px -10px !important;
    padding: 0 10px 8px 10px !important;
    background: #0b1324 !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-top-left-radius: 18px !important;
    border-top-right-radius: 18px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  }
  body[data-theme="light"] .leaderboard-modal .lb-sticky-top {
    background: #ffffff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  }
  .leaderboard-modal .lb-sticky-top .lb-header-row,
  .leaderboard-modal .lb-header-row {
    position: static !important;
    margin: 0 !important;
    padding: 12px 4px 6px 4px !important;
    background: transparent !important;
    border-bottom: none !important;
    box-shadow: none !important;
  }
  .leaderboard-modal .lb-sticky-top .lb-limit-bar,
  .leaderboard-modal .lb-limit-bar {
    margin: 0 !important;
    padding: 2px 4px 4px 4px !important;
    border: none !important;
    background: transparent !important;
  }
  /* Podium: natural height, scrolls along with the table */
  .leaderboard-modal .lb-podium-container {
    flex-shrink: 1 !important;
    padding: 0 2px !important;
    margin: 6px auto 14px !important;
    overflow: visible !important;
    max-height: none !important;
    align-items: flex-end !important;
  }
  .leaderboard-modal .podium-rank-1 .podium-avatar-stage {
    height: 72px !important;
  }
  .leaderboard-modal .podium-rank-2 .podium-avatar-stage,
  .leaderboard-modal .podium-rank-3 .podium-avatar-stage {
    height: 58px !important;
  }
  .leaderboard-modal .podium-rank-1 {
    padding: 8px 4px 0 4px !important;
  }
  .leaderboard-modal .podium-rank-2,
  .leaderboard-modal .podium-rank-3 {
    padding: 6px 3px 0 3px !important;
  }
  .leaderboard-modal .podium-rank-1 .podium-pedestal-base {
    height: 24px !important;
  }
  .leaderboard-modal .podium-rank-2 .podium-pedestal-base,
  .leaderboard-modal .podium-rank-3 .podium-pedestal-base {
    height: 18px !important;
  }
  /* Table wrapper is part of single scroll flow */
  .leaderboard-modal .lb-content-wrapper {
    flex: none !important;
    overflow: visible !important;
    min-height: 0 !important;
    padding: 0 !important;
  }
  .leaderboard-modal .lb-scroll-area {
    max-height: none !important;
    overflow: visible !important;
    flex: none !important;
  }
}
