* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

button, a, input, select, textarea, [role="button"] {
  touch-action: manipulation;
}

body {
  background: #0d1117;
  color: #e6edf3;
  font-family: 'Segoe UI', system-ui, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
  overscroll-behavior: none;
}

.hidden { display: none !important; }

/* ============================================================
   Écran de connexion
   ============================================================ */

#loginScreen {
  position: fixed; inset: 0;
  background: rgba(5,8,14,0.96);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
}

.login-box {
  text-align: center;
  background: #161b22;
  padding: 40px 44px;
  border-radius: 18px;
  border: 1px solid #30363d;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  width: 360px;
}

.login-box-wide {
  width: 820px;
  max-width: calc(100vw - 48px);
}

/* ── Track controls (recherche + tri) ───────────────────────── */
.track-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.track-search-input {
  flex: 1;
  min-width: 140px;
  padding: 8px 12px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  color: #e6edf3;
  font-size: .85rem;
  outline: none;
  transition: border-color .15s;
}
.track-search-input:focus { border-color: #2baa9e; }
.track-search-input::placeholder { color: #484f58; }
.track-sort-btns { display: flex; gap: 6px; flex-shrink: 0; }
.track-sort-btn {
  padding: 6px 12px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 20px;
  color: #8b949e;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.track-sort-btn:hover { border-color: #484f58; color: #e6edf3; }
.track-sort-btn.active { background: #2baa9e; border-color: #2baa9e; color: #fff; }

.track-grid-empty {
  grid-column: 1 / -1;
  color: #484f58;
  font-size: .84rem;
  padding: 16px 0;
  text-align: center;
}
.track-grid-section-label {
  grid-column: 1 / -1;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: #484f58;
  padding: 8px 0 2px;
  border-top: 1px solid #21262d;
  margin-top: 4px;
}

/* ── Track grid ──────────────────────────────────────────────── */
.track-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-height: min(380px, calc(100vh - 360px));
  overflow-y: auto;
  scrollbar-gutter: stable;
  margin-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: #30363d transparent;
}
.track-grid::-webkit-scrollbar { width: 8px; }
.track-grid::-webkit-scrollbar-track { background: transparent; }
.track-grid::-webkit-scrollbar-thumb { background: #30363d; border-radius: 4px; }

.track-card {
  background: #0d1117;
  border: 2px solid #21262d;
  border-radius: 12px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s, transform .1s, box-shadow .15s;
  text-align: left;
  user-select: none;
}
.track-card:hover {
  border-color: #444d56;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.45);
}
.track-card.selected {
  border-color: #2baa9e;
  box-shadow: 0 0 0 1px rgba(43,170,158,0.25), 0 4px 18px rgba(43,170,158,0.18);
}

.track-card-canvas {
  width: 100%;
  height: auto;
  display: block;
}

.track-card-info {
  padding: 5px 8px 8px;
  border-top: 1px solid #21262d;
}
.track-card.selected .track-card-info { border-top-color: rgba(43,170,158,0.25); }

.track-card-name {
  font-size: .8rem;
  font-weight: 700;
  color: #e6edf3;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-card.selected .track-card-name { color: #2baa9e; }

.card-lb-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .65rem;
  line-height: 1.5;
}
.card-lb-rank { width: 16px; flex-shrink: 0; font-size: .65rem; }
.card-lb-name {
  flex: 1; color: #8b949e;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-lb-time {
  font-family: 'Consolas', monospace;
  color: #8b949e; white-space: nowrap; font-size: .65rem;
}
.card-lb-row.card-lb-me .card-lb-name,
.card-lb-row.card-lb-me .card-lb-time { color: #2baa9e; }
.card-lb-sep {
  color: #484f58; font-size: .58rem; letter-spacing: 2px;
  padding: 0 0 0 20px; line-height: 1.4;
}
.card-lb-loading, .card-lb-empty { font-size: .67rem; color: #484f58; }

@media (max-width: 860px) {
  .track-grid { grid-template-columns: repeat(2, 1fr); max-height: min(340px, calc(100vh - 320px)); }
}
@media (max-width: 560px) {
  .track-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; max-height: min(300px, calc(100vh - 300px)); }
  .track-card-name { font-size: .72rem; }
  .login-box-wide { padding: 24px 18px; }
  .track-controls { gap: 8px; }
  .track-sort-btn { padding: 5px 9px; font-size: .7rem; min-height: 36px; }
  .track-search-input { font-size: 1rem; }
}

.subtitle { color: #8b949e; font-size: 0.94rem; margin-bottom: 20px; text-align: center; }

.create-layout {
  display: grid;
  grid-template-columns: 1.2fr .95fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 14px;
}

.track-preview-panel {
  background:
    radial-gradient(circle at top left, rgba(43,170,158,.15), transparent 42%),
    linear-gradient(160deg, #11161d, #0b1016);
  border: 1px solid #2d3540;
  border-radius: 18px;
  padding: 14px;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

#trackPreviewCanvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid #2b313b;
  background: #091017;
}

.preview-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.preview-caption strong {
  color: #f6f7fb;
  font-size: 1rem;
}

.preview-caption span {
  color: #8b949e;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.create-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.track-picker {
  text-align: left;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 16px;
}

.track-picker label {
  display: block;
  font-size: .78rem;
  color: #8b949e;
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.track-picker select {
  width: 100%;
  padding: 10px 12px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  color: #e6edf3;
  font-size: .95rem;
  outline: none;
}

.track-summary {
  margin-top: 8px;
  min-height: 52px;
  color: #8b949e;
  font-size: .84rem;
  line-height: 1.45;
}

.track-summary strong { color: #2baa9e; font-weight: 700; }

/* Bouton créer */
#createRoomBtn {
  width: 100%; padding: 13px;
  background: #2baa9e; color: #fff;
  font-size: 1rem; font-weight: 700;
  border: none; border-radius: 50px; cursor: pointer;
  transition: background .15s, transform .1s;
  letter-spacing: .4px; margin-bottom: 16px;
}
#createRoomBtn:hover  { background: #229990; }
#createRoomBtn:active { transform: scale(.97); }

/* ── Track select modal (change track in lobby) ─────────────── */
.track-select-box {
  width: min(880px, calc(100vw - 32px));
  padding: 28px 32px 24px;
  height: min(700px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.track-select-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #e6edf3;
  margin: 0 0 14px;
  text-align: center;
  letter-spacing: .3px;
}
.track-select-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 14px;
  flex-shrink: 0;
}
.track-select-box .track-grid {
  flex: 1;
  min-height: 0;
  max-height: none;
}

.change-track-btn {
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  background: none;
  border: 1px solid #30363d;
  border-radius: 20px;
  color: #8b949e;
  font-size: .82rem;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.change-track-btn:hover { color: #c9d1d9; border-color: #484f58; background: #161b22; }

/* Séparateur */
.or-sep {
  position: relative; text-align: center; margin: 12px 0;
  color: #484f58; font-size: .8rem;
}
.or-sep::before, .or-sep::after {
  content: ''; position: absolute; top: 50%;
  width: 38%; height: 1px; background: #21262d;
}
.or-sep::before { left: 0; }
.or-sep::after  { right: 0; }

/* Ligne code + bouton rejoindre */
.code-row {
  display: flex; gap: 8px;
}
.code-row input {
  flex: 1; padding: 11px 12px;
  background: #0d1117; border: 2px solid #30363d;
  border-radius: 50px; color: #e6edf3; font-size: .95rem; outline: none;
  transition: border-color .2s; text-transform: uppercase; letter-spacing: 2px;
}
.code-row input:focus { border-color: #2baa9e; }
.code-row button {
  padding: 11px 16px; background: #21262d; border: 2px solid #30363d;
  border-radius: 50px; color: #e6edf3; font-size: 1.1rem; cursor: pointer;
  transition: background .15s;
}
.code-row button:hover { background: #30363d; }

/* Room badge */
.room-badge {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; background: #0d1117; border: 1px solid #30363d;
  border-radius: 8px; padding: 8px 14px; margin-bottom: 18px;
  font-size: .9rem;
}
.room-label { color: #8b949e; }
.room-badge strong { font-size: 1.2rem; letter-spacing: 3px; color: #2baa9e; }

/* Champ pseudo */
#nameInput {
  display: block; width: 100%; padding: 12px 16px;
  background: #0d1117; border: 2px solid #30363d;
  border-radius: 50px; color: #e6edf3; font-size: 1.05rem;
  margin-bottom: 14px; outline: none; transition: border-color .2s;
}
#nameInput:focus { border-color: #2baa9e; }
#nameInput[readonly] {
  color: #8b949e;
  cursor: default;
  border-color: #21262d;
  background: #0d1117;
}
#nameInput[readonly]:focus { border-color: #21262d; }

/* Bouton rejoindre */
#joinBtn {
  width: 100%; padding: 13px;
  background: #2baa9e; color: #fff;
  font-size: 1rem; font-weight: 700;
  border: none; border-radius: 50px; cursor: pointer;
  transition: background .15s, transform .1s;
}
#joinBtn:hover  { background: #229990; }
#joinBtn:active { transform: scale(.97); }
#joinBtn:disabled { opacity: .5; cursor: default; }

.hint { color: #484f58; font-size: .78rem; margin-top: 14px; }

.secondary-action {
  width: 100%;
  margin-top: 12px;
  padding: 11px 14px;
  background: transparent;
  border: 1px solid #30363d;
  border-radius: 50px;
  color: #c9d1d9;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.secondary-action:hover {
  background: #21262d;
  border-color: #3b434d;
  color: #fff;
}

.back-home-btn {
  border-color: #2baa9e;
  color: #2baa9e;
}
.back-home-btn:hover {
  background: rgba(43,170,158,0.12);
  border-color: #2baa9e;
  color: #2baa9e;
}

/* Bouton icône */
.icon-btn {
  background: none; border: none; cursor: pointer;
  font-size: 1rem; padding: 2px 6px; border-radius: 5px;
  transition: background .15s; color: #8b949e;
}
.icon-btn:hover { background: #21262d; color: #e6edf3; }

/* ============================================================
   Layout jeu
   ============================================================ */

#gameContainer { display: flex; gap: 14px; align-items: flex-start; }

#gameCanvas {
  display: block; border-radius: 10px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5); outline: none;
}

/* ============================================================
   Sidebar
   ============================================================ */

#sidebar {
  width: 186px; background: #161b22;
  border: 1px solid #30363d; border-radius: 12px;
  padding: 14px; flex-shrink: 0;
}

.room-header {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px; padding-bottom: 10px;
  border-bottom: 1px solid #21262d;
}
.room-id-display { flex: 1; }
.room-label { font-size: .72rem; color: #484f58; display: block; }
#sidebarRoomCode {
  font-size: .95rem; font-weight: 700; letter-spacing: 2px; color: #2baa9e;
}

#raceStatus {
  font-size: .78rem; color: #8b949e; margin-bottom: 10px; min-height: 15px;
}

.track-chip {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 9px 10px;
  margin-bottom: 12px;
}

.track-chip strong {
  display: block;
  color: #e6edf3;
  font-size: .88rem;
  margin-top: 2px;
}

.sidebar-back-btn {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: .82rem;
  padding: 9px 10px;
}

/* Contrôles hôte */
#hostControls { margin-bottom: 12px; }


.race-btns { display: flex; flex-direction: column; gap: 6px; }

#raceBtn {
  width: 100%; padding: 8px;
  background: #2baa9e; color: #fff;
  font-weight: 700; font-size: .82rem;
  border: none; border-radius: 50px; cursor: pointer;
  transition: background .15s, transform .1s;
}
#raceBtn:hover:not(:disabled) { background: #229990; }
#raceBtn:active:not(:disabled){ transform: scale(.97); }
#raceBtn:disabled { opacity: .45; cursor: default; }
#raceBtn.btn-reset { background: #2baa9e; }
#raceBtn.btn-reset:hover:not(:disabled) { background: #229990; }

#pauseBtn {
  width: 100%; padding: 7px;
  background: #b45309; color: #fff;
  font-weight: 600; font-size: .82rem;
  border: none; border-radius: 50px; cursor: pointer;
  transition: background .15s;
}
#pauseBtn:hover { background: #d97706; }
#pauseBtn.btn-resume { background: #2baa9e; }
#pauseBtn.btn-resume:hover { background: #229990; }

#restartBtn {
  width: 100%; padding: 7px;
  background: #7c3aed; color: #fff;
  font-weight: 600; font-size: .82rem;
  border: none; border-radius: 50px; cursor: pointer;
  transition: background .15s;
}
#restartBtn:hover { background: #6d28d9; }
#restartBtn:active { transform: scale(.97); }

/* Titre pilotes */
#sidebar h2 {
  font-size: .92rem; color: #2baa9e;
  margin: 12px 0 8px; padding-bottom: 8px;
  border-top: 1px solid #21262d; padding-top: 12px;
  letter-spacing: .3px;
}

/* Liste joueurs */
.player-entry {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 5px; border-radius: 6px;
  font-size: .82rem; margin-bottom: 3px;
}
.player-entry.me { background: rgba(43,170,158,0.12); }

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

.pname {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.player-entry.me .pname { color: #2baa9e; font-weight: 600; }

.pinfo { font-size: .73rem; color: #8b949e; white-space: nowrap; margin-left: auto; }

/* Contrôles clavier */
#controls {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid #21262d;
}
#controls h3 {
  font-size: .78rem; color: #8b949e; margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: .7px;
}
.key-row {
  font-size: .75rem; color: #6e7681; margin-bottom: 5px;
  display: flex; align-items: center; gap: 4px;
}
kbd {
  display: inline-block; padding: 1px 5px;
  background: #21262d; border: 1px solid #30363d;
  border-bottom-width: 2px; border-radius: 4px;
  font-size: .7rem; font-family: monospace; color: #c9d1d9;
}

/* ============================================================
   HUD
   ============================================================ */

#hud {
  position: fixed; bottom: 24px;
  left: calc(50% - 413px);
  pointer-events: none;
}

/* Bandeau HUD mobile — caché sur desktop */
.mobile-race-hud  { display: none; }
.mobile-emote-bar { display: none; }
#speedometer {
  background: rgba(13,17,23,.85); border: 1px solid #30363d;
  border-radius: 10px; padding: 8px 18px;
  font-size: 1.6rem; font-weight: 700; color: #2baa9e;
  backdrop-filter: blur(4px); min-width: 90px; text-align: center;
}
.unit { font-size: .7rem; color: #8b949e; font-weight: 400; margin-left: 3px; }

/* ============================================================
   Toast
   ============================================================ */

.toast {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%);
  background: rgba(22,27,34,.95); border: 1px solid #30363d;
  border-radius: 10px; padding: 10px 20px;
  font-size: .9rem; color: #2baa9e;
  z-index: 300; pointer-events: none;
  transition: opacity .4s;
}
.toast-out { opacity: 0; }

/* ── Join notification ────────────────────────────────────── */
.join-notif {
  position: fixed; top: 18px; left: 50%;
  transform: translateX(-50%) translateY(-56px);
  background: rgba(13,17,23,0.93);
  border: 1px solid rgba(43,170,158,0.38);
  border-radius: 24px; padding: 7px 18px 7px 10px;
  display: flex; align-items: center; gap: 9px;
  font-size: .88rem; color: #c9d1d9;
  z-index: 700; pointer-events: none;
  opacity: 0; white-space: nowrap;
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 28px rgba(0,0,0,0.45);
  transition: transform .38s cubic-bezier(0.34,1.46,0.64,1), opacity .3s;
}
.join-notif-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.join-notif-hide {
  opacity: 0;
  transform: translateX(-50%) translateY(-14px);
  transition: transform .35s ease-in, opacity .3s ease-in;
}
.join-notif-dot {
  width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 0 5px currentColor;
}
.join-notif-name { color: #e6edf3; }

/* ── Achievement notification dot ─────────────────────────── */
.ach-notif-dot {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 3px; border-radius: 9px;
  background: #f0a500; color: #1a0800;
  font-size: 10px; font-weight: 800; line-height: 1;
  vertical-align: middle;
}
.ach-notif-dot.hidden { display: none; }
#openProfileFromBar, #openSocialBtn { position: relative; overflow: visible; }
#achBadgeNav   { position: absolute; top: -6px; right: -6px; pointer-events: none; }
#socialNavBadge { position: absolute; top: -6px; right: -6px; pointer-events: none; }

.social-online-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: #1d3a2e; color: #5cd68c;
  font-size: 10px; font-weight: 700; line-height: 1;
  vertical-align: middle; margin-left: 3px;
}
.social-online-badge.hidden { display: none; }
#achBadgeMobile        { position: absolute; top: 4px; right: 6px; pointer-events: none; font-size: 9px; min-width: 15px; height: 15px; }
#socialMobileNavBadge  { position: absolute; top: 4px; right: 6px; pointer-events: none; font-size: 9px; min-width: 15px; height: 15px; }
#achBadgeTab   { margin-left: 5px; }
.profile-tab   { position: relative; }

/* ── Achievement claimable toast (clickable) ──────────────── */
.ach-toast {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%);
  background: rgba(24,14,2,.97); border: 1px solid #f0a500;
  border-radius: 10px; padding: 10px 20px;
  font-size: .88rem; color: #f0b429;
  z-index: 300; cursor: pointer;
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  transition: opacity .4s;
  box-shadow: 0 0 18px rgba(240,165,0,.22);
}
.ach-toast:hover { border-color: #ffd700; }
.ach-toast-cta { color: #2baa9e; font-weight: 700; }
.ach-toast-out { opacity: 0; pointer-events: none; }

/* ============================================================
   Home header (logo + titre + user bar)
   ============================================================ */

.home-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}

.home-brand {
  display: flex; flex-direction: column; align-items: center;
  flex: 1;
}

.home-logo-svg {
  display: block; width: 80px; height: 60px; margin-bottom: 6px;
}

.home-brand h1 {
  font-size: 2.1rem; font-weight: 800; color: #2baa9e; margin-bottom: 0;
}

/* Desktop: user-bar stays top-right inside the header */
.user-bar {
  display: flex; align-items: center; justify-content: flex-end;
  min-height: 28px; flex-shrink: 0;
}

/* Bottom nav + admin bar — hidden on desktop */
.mobile-bottom-nav { display: none; }
.mobile-admin-bar  { display: none; }

#userBarLoggedIn {
  display: flex; align-items: center; gap: 8px; font-size: .82rem;
}

#userBarName { color: #e6edf3; font-weight: 600; }

.home-footer-links {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 10px;
  margin-top: 22px; padding: 14px 0 8px;
  border-top: 1px solid #21262d;
}

/* Style pour Éditeur, Classement et Communauté (comme le bouton Événement) */
.feature-btn {
  color: #8b949e !important; /* Couleur du texte par défaut de l'événement */
  border-color: #30363d !important; /* Couleur de la bordure par défaut de l'événement */
  background: transparent !important; /* S'assurer qu'il est transparent */
  font-weight: 600 !important; /* Poids de police de l'événement */
  animation: none !important; /* Pas d'animation par défaut */
}
.feature-btn:hover { /* Reprendre le hover de l'événement */
  color: #8b949e !important;
  border-color: #484f58 !important;
  background: #161b22 !important;
}

/* Onboarding */
.onboarding-box { text-align: center; width: 460px; padding: 80px 60px; } 
.ob-title { color: #2baa9e; margin-bottom: 45px; font-size: 1.8rem; font-weight: 800; } 
.ob-text { color: #8b949e; margin-bottom: 28px; line-height: 1.7; font-size: 1.05rem; } 
.ob-actions { display: flex; flex-direction: column; gap: 16px; margin-top: 50px; }

.footer-link-btn {
  background: none; border: 1px solid #30363d; border-radius: 20px;
  color: #6e7681; font-size: .8rem; padding: 7px 18px;
  cursor: pointer; transition: color .15s, border-color .15s, background .15s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 5px;
}
.footer-link-btn:hover { color: #c9d1d9; border-color: #484f58; background: #161b22; }
.footer-link-btn-active {
  color: #ffd700 !important; border-color: rgba(255,215,0,0.4) !important;
  background: rgba(255,215,0,0.07) !important;
  animation: pulse-daily 2s ease-in-out infinite;
}

#openEventBtn.footer-link-btn-active {
  color: #2baa9e !important;
  border-color: rgba(43,170,158,.45) !important;
  background: rgba(43,170,158,.10) !important;
  animation: pulse-event 2s ease-in-out infinite;
}

@keyframes pulse-event {
  0%, 100% { box-shadow: 0 0 0 0 rgba(43,170,158,0); }
  50%       { box-shadow: 0 0 0 4px rgba(43,170,158,0.15); }
}
@keyframes pulse-daily {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,215,0,0); }
  50%       { box-shadow: 0 0 0 4px rgba(255,215,0,0.15); }
}

.auth-link-btn {
  background: none; border: 1px solid #30363d; border-radius: 20px;
  color: #8b949e; font-size: .78rem; padding: 4px 12px; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
  white-space: nowrap;
}
.auth-link-btn:hover { color: #e6edf3; border-color: #484f58; background: #161b22; }

/* ============================================================
   Modals
   ============================================================ */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.72);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
  backdrop-filter: blur(3px);
}

.modal-box {
  background: #161b22; border: 1px solid #30363d;
  border-radius: 18px; padding: 32px 36px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
}

.lb-modal-box { width: 520px; max-width: 95vw; max-height: 85vh; display: flex; flex-direction: column; padding: 24px; }

.lb-scroll-area { flex: 1; overflow-y: auto; display: flex; flex-direction: column; padding-right: 2px; }
.global-lb-list { display: flex; flex-direction: column; gap: 6px; padding-right: 2px; }

.glb-row {
  display: flex; align-items: center; gap: 12px;
  background: #0d1117; border: 1px solid #21262d; border-radius: 10px;
  padding: 10px 14px;
}
.glb-row-me { border-color: #2baa9e; background: rgba(43,170,158,0.06); }

.glb-rank {
  width: 32px; font-weight: 800; font-size: 1.1rem; color: #484f58; text-align: center;
}
.glb-rank.gold   { color: #ffd700; }
.glb-rank.silver { color: #c0c0c0; }
.glb-rank.bronze { color: #cd7f32; }

.glb-name {
  flex: 1; display: flex; align-items: center; gap: 10px;
  font-weight: 700; color: #e6edf3; font-size: 0.95rem;
}

.glb-stats {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
}

.glb-points {
  font-size: 0.9rem; font-weight: 800; color: #58a6ff;
}

.glb-tracks {
  font-size: 0.68rem; color: #8b949e; text-transform: uppercase; letter-spacing: 0.5px;
}

/* Tabs du modal classement */
.lb-modal-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.lb-modal-tab {
  flex: 1; padding: 6px 0; font-size: .8rem; font-weight: 600;
  border: 1px solid #30363d; border-radius: 50px;
  background: transparent; color: #8b949e; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.lb-modal-tab.active { background: #1d3a2e; color: #5cd68c; border-color: #2baa9e; }
.lb-modal-tab:not(.active):hover { background: #21262d; color: #c9d1d9; }

/* Palmarès des saisons */
.season-palmares { display: flex; flex-direction: column; gap: 10px; }
.palmares-season { background: #0d1117; border: 1px solid #21262d; border-radius: 10px; padding: 12px 14px; }
.palmares-season-label { font-size: .78rem; color: #8b949e; font-weight: 700; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .5px; }
.palmares-winners { display: flex; flex-direction: column; gap: 6px; }
.palmares-winner { display: flex; align-items: center; gap: 8px; background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 7px 12px; }
.palmares-medal { font-size: 1.2rem; line-height: 1; width: 22px; text-align: center; flex-shrink: 0; }
.palmares-name { font-size: .9rem; font-weight: 700; color: #e6edf3; }
.palmares-season--active { border-color: #2baa9e55; }
.palmares-active-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #5cd68c; margin-right: 6px; box-shadow: 0 0 5px #5cd68c; animation: pulse-dot .9s ease-in-out infinite alternate; vertical-align: middle; }
@keyframes pulse-dot { from { opacity: .5; } to { opacity: 1; } }
.palmares-winner--locked { opacity: .6; }

/* Auth modal */
.auth-box { width: 340px; }

.auth-tabs {
  display: flex; margin-bottom: 22px;
  border-bottom: 1px solid #21262d;
}

.auth-tab {
  flex: 1; padding: 10px; background: none; border: none;
  color: #8b949e; font-size: .92rem; font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}
.auth-tab.active { color: #2baa9e; border-bottom-color: #2baa9e; }

.auth-panel input[type="text"],
.auth-panel input[type="email"],
.auth-panel input[type="password"] {
  display: block; width: 100%; padding: 11px 16px;
  background: #0d1117; border: 2px solid #30363d;
  border-radius: 50px; color: #e6edf3; font-size: .95rem;
  margin-bottom: 10px; outline: none; transition: border-color .2s;
}
.auth-panel input:focus { border-color: #2baa9e; }

.auth-error {
  color: #e74c3c; font-size: .8rem; min-height: 16px;
  margin: -4px 0 8px 4px;
}

.auth-submit {
  width: 100%; padding: 12px; background: #2baa9e; color: #fff;
  font-size: .96rem; font-weight: 700; border: none; border-radius: 50px;
  cursor: pointer; transition: background .15s, transform .1s; margin-bottom: 6px;
}
.auth-submit:hover { background: #229990; }
.auth-submit:active { transform: scale(.97); }
.auth-submit:disabled { opacity: .5; cursor: default; }

.auth-guest {
  display: block; width: 100%; padding: 10px; background: none;
  border: 1px solid #30363d; border-radius: 50px; color: #8b949e;
  font-size: .85rem; cursor: pointer; transition: background .15s, color .15s;
  margin-top: 6px; text-align: center;
}
.auth-guest:hover { background: #21262d; color: #e6edf3; }

/* OTP verification panel */
.otp-header { text-align: center; margin-bottom: 18px; }
.otp-title   { font-size: 1rem; font-weight: 700; color: #e6edf3; margin-bottom: 6px; }
.otp-subtitle { font-size: .84rem; color: #8b949e; }
.otp-subtitle strong { color: #c9d1d9; }

.otp-code-input {
  display: block; width: 100%;
  padding: 14px 16px;
  background: #0d1117; border: 2px solid #30363d;
  border-radius: 50px; color: #e6edf3;
  font-size: 1.6rem; font-family: 'Consolas', monospace;
  letter-spacing: 10px; text-align: center;
  margin-bottom: 10px; outline: none;
  transition: border-color .2s;
}
.otp-code-input:focus { border-color: #2baa9e; }
.otp-code-input::placeholder { letter-spacing: 6px; font-size: 1rem; color: #484f58; }

.otp-back-btn { font-size: .78rem; opacity: .6; margin-top: 2px; }

.auth-forgot-link {
  display: block; width: 100%; background: none; border: none;
  color: #484f58; font-size: .78rem; cursor: pointer;
  text-align: center; padding: 6px 0 0;
  transition: color .15s;
}
.auth-forgot-link:hover { color: #8b949e; }

/* Profile modal */
.profile-box {
  width: 640px;
  max-width: calc(100vw - 32px);
  padding: 28px 32px;
  display: flex; flex-direction: column; gap: 0;
  max-height: calc(100vh - 48px);
  overflow: hidden; /* le scroll est sur .profile-panel-content, pas la boîte */
}

/* Tous les panneaux (profil, boutique, succès, stats) scrollent */
.profile-panel-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

/* Header row: identity + balance */
.profile-header {
  display: flex; align-items: center; justify-content: space-between;
  background: #0d1117; border: 1px solid #21262d;
  border-radius: 10px; padding: 10px 16px; margin-bottom: 16px; gap: 12px;
}

.profile-identity {
  display: flex; align-items: center; gap: 10px; min-width: 0;
}

.profile-color-dot {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.2);
}

.profile-identity span { font-size: .95rem; font-weight: 600; color: #e6edf3; }

.profile-balance { display: flex; gap: 8px; flex-shrink: 0; }

.balance-chip {
  display: flex; align-items: center; gap: 5px;
  background: #161b22; border: 1px solid #30363d;
  border-radius: 20px; padding: 4px 12px;
  font-size: .85rem; font-weight: 700; color: #e6edf3;
}

.balance-chip.balance-gems { border-color: #6e40c9; color: #b09aff; }

/* Tabs */
.profile-tabs {
  display: flex; margin-bottom: 16px;
  border-bottom: 1px solid #21262d;
}

.profile-tab {
  flex: 1; padding: 9px; background: none; border: none;
  color: #8b949e; font-size: .9rem; font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}
.profile-tab.active { color: #2baa9e; border-bottom-color: #2baa9e; }

.profile-section {
  margin-bottom: 16px;
}

.profile-preview {
  display: flex; flex-direction: column; gap: 10px;
  background: #0d1117; border: 1px solid #21262d;
  border-radius: 14px; padding: 12px;
}

.profile-preview canvas {
  width: 100%; max-width: 100%; border-radius: 12px;
  background: #090b10; display: block;
}

.profile-preview .preview-caption {
  display: flex; justify-content: space-between; gap: 12px;
  align-items: center; color: #c9d1d9; font-size: .85rem;
}

.profile-preview .preview-caption strong {
  color: #e6edf3;
}

/* ── Emote picker (profile) ─────────────────────────────────── */

.section-hint {
  font-size: .72rem; color: #484f58;
  margin-left: 6px; font-weight: 400; text-transform: none; letter-spacing: 0;
}

.emote-assign-hint {
  font-size: .72rem; color: #484f58;
  margin-bottom: 10px; margin-top: 2px;
}

.emote-slots-row {
  display: flex; gap: 8px; margin-bottom: 10px;
}

.emote-slot-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 6px 4px;
  background: #0d1117; border: 2px solid #21262d; border-radius: 10px;
  cursor: pointer; transition: border-color .15s, background .15s;
  outline: none; min-width: 0;
}
.emote-slot-btn:hover { border-color: #30363d; background: #161b22; }
.emote-slot-btn.active {
  border-color: #2baa9e;
  background: rgba(43,170,158,0.08);
}

.emote-slot-label {
  font-size: .65rem; color: #8b949e; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
}

.emote-slot-icon {
  font-size: 1.4rem; line-height: 1; min-height: 1.4rem;
  display: flex; align-items: center; justify-content: center;
}

.emote-owned-grid {
  display: flex; flex-wrap: wrap; gap: 6px;
}

.emote-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 20px;
  background: #0d1117; border: 1px solid #30363d;
  cursor: pointer; transition: border-color .15s, background .15s, transform .12s;
  font-size: .8rem; color: #c9d1d9; outline: none; white-space: nowrap;
  user-select: none;
}
.emote-chip:hover { background: #161b22; border-color: #8b949e; transform: scale(1.04); }
.emote-chip.selected {
  border-color: #2baa9e; background: rgba(43,170,158,0.1);
  color: #e6edf3;
}
.emote-chip .chip-emoji { font-size: 1.1rem; line-height: 1; }
.emote-chip .chip-remove {
  font-size: .7rem; color: #484f58; margin-left: 2px;
  transition: color .12s;
}
.emote-chip.selected .chip-remove { color: #8b949e; }
.emote-chip.selected .chip-remove:hover { color: #e6edf3; }

/* ── Social modal standalone ─────────────────────────────────── */
.social-box {
  width: 700px; max-width: calc(100vw - 32px);
  height: 78vh; max-height: 680px;
  display: flex; flex-direction: column; overflow: hidden;
}
.social-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.social-title { font-size: 1.05rem; font-weight: 800; color: #e6edf3; }
.close-modal-x {
  background: none; border: none; color: #8b949e; font-size: 1.1rem;
  cursor: pointer; padding: 4px 8px; border-radius: 6px;
  transition: color .15s;
}
.close-modal-x:hover { color: #e6edf3; }
.social-add-btn {
  padding: 8px 14px; background: #2baa9e; border: none; border-radius: 8px;
  color: #fff; font-weight: 700; font-size: .85rem; cursor: pointer;
  white-space: nowrap; transition: background .15s;
}
.social-add-btn:hover { background: #239e92; }

.social-tabs {
  display: flex; gap: 8px; margin-bottom: 16px;
}

.social-tab {
  flex: 1; padding: 10px 12px; background: none; border: 1px solid transparent;
  border-radius: 12px; color: #8b949e; font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}

.social-tab.active {
  background: #112127; color: #2baa9e; border-color: #2baa9e;
}

.social-tab-panel {
  flex: 1; overflow-y: auto; min-height: 0;
}
/* Le panneau chat ne doit pas défiler lui-même — c'est la liste de messages qui défile */
#socialChatPanel {
  overflow: hidden; display: flex; flex-direction: column;
}

.social-chat-shell {
  flex: 1; min-height: 0;
  display: flex; gap: 10px;
}

.social-conversations-column {
  width: 220px; flex-shrink: 0;
  background: #0d1117; border: 1px solid #21262d;
  border-radius: 14px; padding: 10px;
  overflow-y: auto; min-height: 0;
}

.social-messages-column {
  flex: 1; min-width: 0;
  background: #0d1117; border: 1px solid #21262d;
  border-radius: 14px; padding: 12px;
  display: flex; flex-direction: column; min-height: 0;
}

.social-friend-list,
.social-conversations-list,
.social-request-list,
.social-messages-list {
  display: grid; gap: 6px;
}

.social-request-item,
.social-conversation-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 12px 14px; background: #0f151d;
  border: 1px solid #21262d; border-radius: 14px;
}

.social-request-item span,
.social-conversation-item span {
  display: inline-flex; gap: 8px; align-items: center;
}

/* Friend item — nouvelle mise en page */
.social-friend-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; background: #0f151d;
  border: 1px solid #21262d; border-radius: 10px;
  transition: border-color .15s;
}
.social-friend-item:hover { border-color: #30363d; }

.social-friend-car-dot {
  width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.12);
}

.social-presence-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.social-presence-dot.online  { background: #5cd68c; box-shadow: 0 0 4px #5cd68c80; }
.social-presence-dot.racing  { background: #f0b84f; box-shadow: 0 0 4px #f0b84f80; }
.social-presence-dot.offline { background: #30363d; }

.social-friend-info {
  flex: 1; min-width: 0;
}
.social-friend-info .pub-profile-name-btn {
  display: block; text-align: left; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.social-friend-info strong { font-size: .86rem; }
.sfi-rank { font-size: .72rem; font-weight: 600; color: #2baa9e; opacity: .8; margin-left: 5px; }

.social-friend-status {
  font-size: .72rem; margin-top: 1px; display: block;
}

.social-friend-actions {
  display: flex; gap: 6px; flex-shrink: 0;
}

.social-chat-btn {
  padding: 4px 9px; background: #141c27;
  border: 1px solid #2baa9e50; border-radius: 7px;
  color: #2baa9e; font-size: .78rem; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.social-chat-btn:hover { background: #112127; border-color: #2baa9e; }

/* Compteur amis en ligne */
.social-friends-counter {
  font-size: .78rem; color: #8b949e; padding: 0 2px 6px;
  display: flex; align-items: center; gap: 6px;
}
.social-friends-counter .sfc-online { color: #5cd68c; font-weight: 700; }
.social-friends-counter .sfc-sep { color: #30363d; }

.social-status {
  font-size: .82rem; color: #8b949e;
}

.social-status.online   { color: #5cd68c; }
.social-status.offline  { color: #7a7d88; }
.social-status.racing   { color: #f0b84f; }
.social-status.pending  { color: #8b949e; font-style: italic; }

.social-request-row,
.social-message-row {
  display: flex; gap: 10px; margin-bottom: 14px;
}

.social-request-row input,
.social-message-row input {
  flex: 1; padding: 12px 14px; background: #0d1117;
  border: 1px solid #30363d; border-radius: 50px; color: #e6edf3;
  outline: none;
}

.social-message-row {
  flex-shrink: 0; margin-bottom: 0; margin-top: 8px;
}

.social-message-row button {
  min-width: 44px; padding: 8px 12px;
}

.social-conversation-item {
  cursor: pointer; padding: 8px 10px; font-size: .83rem;
}

.social-conversation-item small {
  display: block; font-size: .72rem; color: #8b949e;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px;
}

.social-conversation-item.active {
  border-color: #2baa9e; background: #112127;
}
.conv-hint { color: #484f58 !important; font-style: italic; }
.conv-no-msg { opacity: .75; }

.social-chat-header {
  flex-shrink: 0; margin-bottom: 8px;
  display: flex; align-items: center; gap: 10px;
  color: #e6edf3; font-weight: 700; font-size: .9rem;
  overflow: hidden;
}

.social-chat-back-btn {
  display: none;
  flex-shrink: 0; align-items: center; gap: 6px;
  background: none; border: 1px solid #30363d;
  border-radius: 10px; color: #8b949e;
  padding: 6px 12px; font-size: .82rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.social-chat-back-btn:active { background: #21262d; }

.social-messages-list {
  flex: 1; overflow-y: auto; min-height: 0;
  display: flex; flex-direction: column; gap: 8px;
}

.social-message {
  max-width: 80%; padding: 10px 14px; border-radius: 16px;
  line-height: 1.4; font-size: .92rem;
}

.social-message.sent {
  background: #1d3a2e; color: #c8f4d9; align-self: flex-end;
}

.social-message.received {
  background: #131d28; color: #d5e0f0; align-self: flex-start;
}

.social-message small {
  display: block; margin-top: 4px; font-size: .75rem; color: #8b949e;
}

.section-label {
  font-size: .72rem; color: #8b949e;
  text-transform: uppercase; letter-spacing: .7px; margin-bottom: 10px;
}

.color-picker-label {
  font-size: .72rem; color: #8b949e;
  text-transform: uppercase; letter-spacing: .7px; margin-bottom: 12px;
}

.shop-earn-hint {
  font-size: .78rem; color: #8b949e; line-height: 1.5;
  background: rgba(43,170,158,0.07); border: 1px solid rgba(43,170,158,0.2);
  border-radius: 8px; padding: 9px 12px; margin-bottom: 14px;
}
.shop-earn-hint strong { color: #e6edf3; }

/* Shop sub-tabs */
.shop-tabs {
  display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px;
}

.shop-tab {
  flex: 1 1 auto; padding: 8px 10px; background: #0d1117;
  border: 1px solid #30363d; border-radius: 8px;
  color: #8b949e; font-size: .82rem; font-weight: 700;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
  text-align: center; white-space: nowrap;
}
.shop-tab:hover { background: #161b22; color: #e6edf3; }
.shop-tab.active {
  background: rgba(43,170,158,0.12);
  border-color: rgba(43,170,158,0.4);
  color: #2baa9e;
}

/* Shop panel */
.shop-section { margin-bottom: 18px; }

.shop-section-title {
  font-size: .8rem; color: #8b949e;
  text-transform: uppercase; letter-spacing: .6px;
  margin-bottom: 10px; font-weight: 700;
}

.shop-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}

.shop-card {
  background: #0d1117; border: 1px solid #30363d;
  border-radius: 12px; padding: 12px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  transition: border-color .15s;
}
.shop-card:hover { border-color: #484f58; }
.shop-card.shop-owned { border-color: rgba(43,170,158,0.5); }

.shop-preview {
  width: 48px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.shop-item-name {
  font-size: .78rem; font-weight: 600; color: #c9d1d9;
  text-align: center; white-space: nowrap;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.shop-item-type {
  font-size: .65rem; font-weight: 600; letter-spacing: .4px;
  color: #e8a87c; border: 1px solid rgba(232,168,124,.4);
  border-radius: 4px; padding: 1px 6px;
}

.shop-buy-btn {
  width: 100%; padding: 5px 8px;
  background: #2baa9e; color: #fff;
  font-size: .75rem; font-weight: 700; border: none;
  border-radius: 20px; cursor: pointer;
  transition: background .15s;
}
.shop-buy-btn:hover:not(:disabled) { background: #229990; }
.shop-buy-btn:disabled {
  background: rgba(43,170,158,0.25); color: #2baa9e;
  cursor: default;
}


/* Admin button */
.admin-btn { color: #f59e0b !important; border-color: rgba(245,158,11,0.4) !important; }
.admin-btn:hover { background: rgba(245,158,11,0.1) !important; border-color: #f59e0b !important; }

/* Admin modal */
.admin-box {
  width: 680px; max-width: 96vw;
  max-height: 88vh; display: flex; flex-direction: column;
  padding: 0; overflow: hidden;
}
.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 0; flex-shrink: 0;
}
.admin-title { font-size: 1.1rem; font-weight: 700; color: #f59e0b; margin: 0; }
.admin-close-btn {
  background: none; border: none; color: #8b949e; font-size: 1rem;
  cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.admin-close-btn:hover { background: #21262d; color: #e6edf3; }
.admin-tabs {
  display: flex; gap: 4px; padding: 12px 20px 0; flex-shrink: 0;
  border-bottom: 1px solid #21262d; margin-bottom: 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab {
  padding: 8px 14px; background: none; border: none;
  color: #8b949e; font-size: .84rem; font-weight: 600;
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: color .15s, border-color .15s;
  white-space: nowrap; flex-shrink: 0;
}
.admin-tab:hover { color: #e6edf3; }
.admin-tab.active { color: #f59e0b; border-bottom-color: #f59e0b; }
.admin-panel-content {
  flex: 1; overflow-y: auto; padding: 16px 20px 20px;
}

/* Stats */
.admin-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px;
}
.admin-stat-card {
  background: #0d1117; border: 1px solid #21262d; border-radius: 10px;
  padding: 12px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.asc-val { font-size: 1.3rem; font-weight: 800; color: #f59e0b; }
.asc-label { font-size: .7rem; color: #8b949e; text-align: center; }
.admin-top-section { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-section-label { font-size: .72rem; color: #8b949e; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; font-weight: 700; }
.admin-top-list { display: flex; flex-direction: column; gap: 5px; }
.admin-top-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #0d1117; border: 1px solid #21262d; border-radius: 8px; font-size: .83rem; }
.atr-rank { color: #8b949e; width: 22px; flex-shrink: 0; }
.atr-name { flex: 1; color: #c9d1d9; font-weight: 600; }
.atr-val  { color: #f59e0b; font-weight: 700; }

/* Rooms */
.admin-refresh-btn {
  padding: 6px 14px; background: #21262d; border: 1px solid #30363d;
  border-radius: 8px; color: #c9d1d9; font-size: .82rem; font-weight: 600;
  cursor: pointer; margin-bottom: 12px; transition: background .15s;
}
.admin-refresh-btn:hover { background: #2d333b; }
.admin-rooms-list { display: flex; flex-direction: column; gap: 8px; }
.admin-room-card { background: #0d1117; border: 1px solid #21262d; border-radius: 10px; padding: 12px 14px; }
.arc-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.arc-id { font-size: .9rem; font-weight: 700; color: #e6edf3; font-family: monospace; }
.arc-state { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; }
.arc-state.lobby    { background: rgba(43,170,158,0.15); color: #2baa9e; }
.arc-state.countdown{ background: rgba(241,196,15,0.15); color: #f1c40f; }
.arc-state.racing   { background: rgba(231,76,60,0.15);  color: #e74c3c; }
.arc-state.finished { background: rgba(139,148,158,0.15); color: #8b949e; }
.arc-event { font-size: .68rem; background: rgba(168,85,247,0.2); color: #a855f7; padding: 2px 7px; border-radius: 20px; font-weight: 700; }
.arc-meta { font-size: .78rem; color: #8b949e; margin-bottom: 8px; }
.arc-players { display: flex; flex-wrap: wrap; gap: 5px; }
.arc-player { font-size: .72rem; color: #fff; padding: 2px 8px; border-radius: 20px; font-weight: 600; }

/* Users */
.admin-search-row { display: flex; gap: 8px; margin-bottom: 12px; }
.admin-search-input {
  flex: 1; padding: 8px 12px; background: #0d1117; border: 1px solid #30363d;
  border-radius: 8px; color: #e6edf3; font-size: .88rem; outline: none;
}
.admin-search-input:focus { border-color: #f59e0b; }
.admin-users-list { display: flex; flex-direction: column; gap: 6px; }
.admin-user-row {
  display: flex; align-items: center; justify-content: space-between;
  background: #0d1117; border: 1px solid #21262d; border-radius: 10px; padding: 10px 14px;
}
.admin-user-row.banned { border-color: rgba(231,76,60,0.4); background: rgba(231,76,60,0.05); }
.aur-info { display: flex; flex-direction: column; gap: 3px; }
.aur-name { font-size: .9rem; font-weight: 700; color: #e6edf3; }
.aur-stats { font-size: .74rem; color: #8b949e; }
.aur-ban-btn {
  padding: 5px 12px; border: 1px solid #e74c3c; border-radius: 8px;
  background: transparent; color: #e74c3c; font-size: .78rem; font-weight: 700;
  cursor: pointer; transition: background .15s; white-space: nowrap;
}
.aur-ban-btn:hover { background: rgba(231,76,60,0.15); }
.aur-ban-btn.unban { border-color: #2baa9e; color: #2baa9e; }
.aur-ban-btn.unban:hover { background: rgba(43,170,158,0.15); }
.aur-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.aur-delete-btn {
  padding: 5px 10px; border: 1px solid #484f58; border-radius: 8px;
  background: transparent; color: #484f58; font-size: .82rem;
  cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.aur-delete-btn:hover { border-color: #e74c3c; color: #e74c3c; background: rgba(231,76,60,0.1); }
.admin-empty { color: #8b949e; font-size: .85rem; text-align: center; padding: 20px 0; }

/* Gem packs (recharge tab) */
.shop-recharge-intro {
  font-size: .85rem; color: #8b949e; text-align: center; margin-bottom: 18px;
}
.gem-packs {
  display: flex; gap: 12px; justify-content: center;
}
.gem-pack {
  position: relative;
  flex: 1; max-width: 160px;
  background: #0d1117; border: 1px solid #21262d;
  border-radius: 16px; padding: 20px 12px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: border-color .2s, box-shadow .2s;
}
.gem-pack:hover { border-color: #a855f7; box-shadow: 0 0 16px rgba(168,85,247,0.2); }
.gem-pack-popular {
  border-color: rgba(168,85,247,0.5);
  background: linear-gradient(160deg, #0d1117, #120c1e);
  box-shadow: 0 0 18px rgba(168,85,247,0.18);
}
.gem-pack-badge {
  position: absolute; top: -11px;
  background: linear-gradient(135deg, #7c3aed, #c026d3);
  color: #fff; font-size: .68rem; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  white-space: nowrap;
}
.gem-pack-icon {
  font-size: 1.8rem; line-height: 1;
  white-space: nowrap; letter-spacing: 2px;
}
.gem-pack-name { font-size: .8rem; font-weight: 700; color: #c9d1d9; }
.gem-pack-amount { font-size: 1rem; font-weight: 700; color: #a855f7; }
.gem-pack-price {
  font-size: 1.15rem; font-weight: 800; color: #e6edf3;
  margin-top: 2px;
}
.gem-pack-btn {
  width: 100%; padding: 7px 0; margin-top: 4px;
  background: linear-gradient(135deg, #7c3aed, #c026d3);
  color: #fff; font-size: .78rem; font-weight: 700;
  border: none; border-radius: 20px; cursor: pointer;
  transition: opacity .15s;
}
.gem-pack-btn:hover { opacity: .85; }
.shop-recharge-notice {
  font-size: .72rem; color: #484f58; text-align: center; margin-top: 18px;
}

/* Premium badge option in profile picker */
.badge-option-premium {
  background-image: linear-gradient(135deg, var(--badge-bg-from, rgba(80,0,120,0.6)), var(--badge-bg-to, rgba(40,0,80,0.4)));
  border-color: rgba(160,80,255,0.4) !important;
  box-shadow: 0 0 8px rgba(160,80,255,0.2);
}
.badge-option-premium.selected {
  box-shadow: 0 0 12px rgba(200,100,255,0.5);
}

.color-grid {
  display: grid; grid-template-columns: repeat(auto-fill, 38px);
  gap: 8px; margin-bottom: 6px;
}

.color-swatch {
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  border: 3px solid transparent; position: relative;
  transition: transform .15s, border-color .15s, box-shadow .15s;
  outline: none;
}
.color-swatch.locked {
  opacity: 0.38; cursor: not-allowed;
}
.color-swatch.locked::after {
  content: '🔒';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 9px; line-height: 1; pointer-events: none;
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.selected {
  border-color: #fff; transform: scale(1.1);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}

.color-section-label {
  grid-column: 1 / -1;
  font-size: .72rem; font-weight: 700; letter-spacing: .6px;
  color: #ffd700; text-transform: uppercase;
  margin-top: 4px; margin-bottom: -2px;
}

.color-hint {
  font-size: .73rem; color: #484f58;
  text-align: center; margin-bottom: 18px;
}

.profile-actions { display: flex; gap: 8px; margin-bottom: 0; }
.profile-actions button:first-child {
  flex: 1; padding: 11px; background: #2baa9e; color: #fff;
  font-size: .9rem; font-weight: 700; border: none; border-radius: 50px;
  cursor: pointer; transition: background .15s;
}
.profile-actions button:first-child:hover { background: #229990; }
.profile-actions .secondary-action { flex: 1; }

.push-notif-section { margin-top: 18px; }
.push-notif-hint { font-size: .78rem; color: #8b949e; margin: 4px 0 10px; }
.push-notif-btn {
  width: 100%; padding: 10px 16px;
  border: none; border-radius: 50px;
  font-size: .88rem; font-weight: 700; cursor: pointer;
  transition: background .15s, opacity .15s;
}
.push-notif-btn[data-state="loading"] { background: #21262d; color: #8b949e; cursor: default; }
.push-notif-btn[data-state="inactive"] { background: #1d3a2e; color: #5cd68c; }
.push-notif-btn[data-state="inactive"]:hover { background: #1e4433; }
.push-notif-btn[data-state="active"] { background: #2d1f1f; color: #e06c6c; }
.push-notif-btn[data-state="active"]:hover { background: #3a2020; }
.push-notif-btn[data-state="denied"] { background: #21262d; color: #8b949e; cursor: default; }

/* Sidebar user section */
.sidebar-user {
  padding-bottom: 10px; margin-bottom: 10px;
  border-bottom: 1px solid #21262d;
}

.sidebar-profile-btn {
  display: flex; align-items: center; gap: 7px; width: 100%;
  padding: 7px 8px; background: rgba(43,170,158,0.08);
  border: 1px solid rgba(43,170,158,0.2); border-radius: 8px;
  color: #e6edf3; font-size: .82rem; cursor: pointer;
  transition: background .15s, border-color .15s; text-align: left;
}
.sidebar-profile-btn:hover {
  background: rgba(43,170,158,0.15); border-color: rgba(43,170,158,0.4);
}

.sidebar-profile-icon { margin-left: auto; font-size: .8rem; color: #484f58; }

/* ============================================================
   Leaderboard (sidebar)
   ============================================================ */

.sidebar-lb h3 {
  font-size: .72rem; color: #8b949e;
  text-transform: uppercase; letter-spacing: .7px;
  padding-top: 12px; border-top: 1px solid #21262d;
  margin-bottom: 6px;
}

.sidebar-lb-tabs {
  display: flex; gap: 4px; margin-bottom: 7px;
}
.sidebar-lb-tab {
  flex: 1; padding: 4px 0; font-size: .7rem; font-weight: 600;
  border: 1px solid #30363d; border-radius: 50px;
  background: transparent; color: #8b949e; cursor: pointer;
  transition: background .15s, color .15s;
}
.sidebar-lb-tab.active { background: #1d3a2e; color: #5cd68c; border-color: #2baa9e; }
.sidebar-lb-tab:not(.active):hover { background: #21262d; color: #c9d1d9; }

.sidebar-lb-row {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 3px; font-size: .75rem;
  border-bottom: 1px solid #12161c;
}
.sidebar-lb-row.lb-me .sidebar-lb-name { color: #2baa9e; font-weight: 700; }
.sidebar-lb-separator { text-align: center; color: #484f58; font-size: .65rem; letter-spacing: 3px; padding: 2px 0; }

.sidebar-lb-rank {
  width: 18px; text-align: center; flex-shrink: 0;
  font-size: .72rem; color: #484f58;
}
.sidebar-lb-name {
  flex: 1; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: #c9d1d9;
}
.sidebar-lb-time {
  font-family: 'Consolas', monospace; font-size: .72rem;
  color: #6e7681; white-space: nowrap;
}
.sidebar-lb-empty { font-size: .74rem; color: #484f58; padding: 4px 0; }

#sidebarCampaignMedals { margin-top: 8px; border-top: 1px solid #21262d; padding-top: 8px; }
.sidebar-cpg-label { font-size: .68rem; color: #8b949e; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 4px; font-weight: 700; }
.sidebar-cpg-row { font-size: .78rem; padding: 2px 0; font-weight: 600; }
.sidebar-cpg-row.gold   { color: #ffd700; }
.sidebar-cpg-row.silver { color: #c0c0c0; }
.sidebar-cpg-row.bronze { color: #cd7f32; }

/* Campaign result toast */
.campaign-toast {
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%) translateY(-20px);
  display: flex; align-items: center; gap: 12px;
  background: #161b22; border: 2px solid #30363d; border-radius: 16px;
  padding: 14px 20px; z-index: 99999; opacity: 0;
  transition: opacity .35s, transform .35s; pointer-events: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.8); min-width: 240px;
}
.campaign-toast.campaign-toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.campaign-toast.campaign-toast-gold   { border-color: #ffd700; }
.campaign-toast.campaign-toast-silver { border-color: #c0c0c0; }
.campaign-toast.campaign-toast-bronze { border-color: #cd7f32; }
.cpg-toast-icon  { font-size: 2.2rem; line-height: 1; }
.cpg-toast-title { font-weight: 800; font-size: 1rem; color: #e6edf3; }
.cpg-toast-sub   { font-size: .78rem; color: #ffd700; margin-top: 2px; font-weight: 600; }

/* ============================================================
   Badge & Trail pickers (profile modal)
   ============================================================ */

.badge-grid {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px;
}

.badge-option {
  padding: 4px 10px; border-radius: 20px; cursor: pointer;
  font-size: .75rem; font-weight: 700; border: 2px solid transparent;
  transition: transform .15s, border-color .15s, box-shadow .15s;
  letter-spacing: .3px; outline: none;
}
.badge-option:hover:not(.locked) { transform: scale(1.07); }
.badge-option.locked { opacity: 0.38; cursor: not-allowed; }
.badge-option.selected {
  box-shadow: 0 0 0 2px rgba(255,255,255,0.2);
  transform: scale(1.05);
}

.trail-grid {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px;
}

.trail-swatch {
  width: 42px; height: 28px; border-radius: 8px; cursor: pointer;
  border: 3px solid transparent;
  transition: transform .15s, border-color .15s, box-shadow .15s;
  outline: none; flex-shrink: 0;
}
.trail-swatch:hover:not(.locked) { transform: scale(1.12); }
.trail-swatch.locked { opacity: 0.38; cursor: not-allowed; position: relative; }
.trail-swatch.locked::after {
  content: '🔒';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px; pointer-events: none;
}
.trail-swatch.selected {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.25);
  transform: scale(1.08);
}

/* ============================================================
   Daily reward
   ============================================================ */

.daily-box {
  width: 420px; max-width: calc(100vw - 32px); text-align: center;
}

.daily-title {
  font-size: 1.2rem; font-weight: 800; color: #ffd700; margin-bottom: 20px;
}

.daily-streak-row {
  display: flex; gap: 6px; justify-content: center; margin-bottom: 16px;
  flex-wrap: wrap;
}

.daily-chip {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 8px; border-radius: 10px; min-width: 48px;
  background: #0d1117; border: 1px solid #21262d;
  transition: transform .15s;
}

.daily-chip-day  { font-size: .7rem; font-weight: 700; color: #484f58; text-transform: uppercase; }
.daily-chip-gems { font-size: .72rem; color: #8b949e; }

.daily-chip-done {
  background: rgba(43,170,158,0.1); border-color: rgba(43,170,158,0.3);
}
.daily-chip-done .daily-chip-day  { color: #2baa9e; }
.daily-chip-done .daily-chip-gems { color: #2baa9e; }

.daily-chip-current {
  background: rgba(255,215,0,0.1); border-color: rgba(255,215,0,0.5);
  box-shadow: 0 0 12px rgba(255,215,0,0.2); transform: scale(1.08);
}
.daily-chip-current .daily-chip-day  { color: #ffd700; }
.daily-chip-current .daily-chip-gems { color: #ffd700; font-weight: 700; }

.daily-status-msg {
  font-size: .84rem; color: #8b949e; min-height: 18px; margin-bottom: 8px;
}

/* ── Daily Premium row ───────────────────────────────────────── */
.daily-premium-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 12px; padding: 10px 14px;
  background: linear-gradient(135deg, rgba(40,28,2,.9), rgba(24,16,2,.9));
  border: 1px solid rgba(255,215,0,.35); border-radius: 10px;
}
.daily-premium-locked { opacity: .55; }
.daily-premium-info { display: flex; align-items: center; gap: 10px; }
.daily-premium-icon {
  font-size: 1.3rem; color: #ffd700;
  text-shadow: 0 0 8px rgba(255,215,0,.6);
}
.daily-premium-label {
  display: block; font-size: .78rem; font-weight: 700;
  color: #ffd700; text-transform: uppercase; letter-spacing: .5px;
}
.daily-premium-reward { display: block; font-size: .82rem; color: #e6edf3; margin-top: 1px; }
.daily-premium-btn {
  flex-shrink: 0; padding: 6px 14px; border-radius: 8px; font-size: .82rem; font-weight: 700;
  background: linear-gradient(135deg, #b8860b, #ffd700); color: #1a0800;
  border: none; cursor: pointer; transition: opacity .15s;
  white-space: nowrap;
}
.daily-premium-btn:disabled { opacity: .5; cursor: default; }
.daily-premium-btn-locked {
  background: rgba(255,255,255,.08); color: #8b949e; border: 1px solid #30363d;
}

/* ── Premium : pseudo doré dans les menus ────────────────────── */
.premium-name-gold {
  background: linear-gradient(90deg, #ffd700 20%, #fff8c0 48%, #ffd700 52%, #ffd700 80%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
  text-shadow: none !important;
  animation: premiumShimmer 3.5s ease-in-out infinite;
}
@keyframes premiumShimmer {
  0%   { background-position: 120% center; }
  50%  { background-position: -30% center; }
  100% { background-position: 120% center; }
}

/* ── Premium nav indicator ───────────────────────────────────── */
.premium-nav-dot { display: none !important; }

/* ── Profile: bandeau premium ────────────────────────────────── */
.profile-premium-banner {
  display: flex; align-items: center; gap: 8px;
  margin: -4px 0 10px;
  padding: 8px 14px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(30,20,2,.9), rgba(18,12,2,.9));
  border: 1px solid rgba(255,215,0,.5);
  box-shadow: 0 0 12px rgba(255,215,0,.1);
  font-size: .82rem; font-weight: 700; color: #ffd700;
}
.ppb-icon { font-size: 1rem; text-shadow: 0 0 8px rgba(255,215,0,.8); }
.ppb-countdown {
  margin-left: auto; font-size: .75rem; color: #c9a227; font-weight: 600;
}

/* ── Shop: Premium tab ────────────────────────────────────────── */
.shop-tab-premium { color: #ffd700 !important; }
.shop-tab-premium.active { border-bottom-color: #ffd700 !important; color: #ffd700 !important; }

/* ── Shop: Événements tab ──────────────────────────────────────── */
.shop-tab-event { color: #e8a87c; }
.shop-tab-event.active { border-bottom-color: #e8a87c !important; color: #e8a87c !important; }
.shop-tab-event-active {
  position: relative;
}
.shop-tab-event-active::after {
  content: ''; position: absolute; top: 5px; right: 5px;
  width: 6px; height: 6px;
  background: #e8a87c; border-radius: 50%;
  animation: event-pulse 1.4s ease-in-out infinite;
}
@keyframes event-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

/* Panel événements */
.shop-event-empty {
  text-align: center; color: #888; padding: 40px 20px;
  font-size: 14px; font-style: italic;
}
.shop-event-theme { margin-bottom: 24px; }
.shop-event-theme-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; margin-bottom: 12px;
  background: rgba(232,168,124,0.08);
  border-left: 3px solid #e8a87c;
  border-radius: 0 8px 8px 0;
}
.set-icon  { font-size: 20px; }
.set-name  { font-weight: 600; color: #e8a87c; flex: 1; }
.set-dates { font-size: 11px; color: #888; }
.set-limited {
  font-size: 10px; font-weight: 700; letter-spacing: .5px;
  color: #e8a87c; border: 1px solid #e8a87c;
  border-radius: 4px; padding: 1px 6px;
}

/* ── Admin: Seasonal panel ─────────────────────────────────────── */
.seasonal-admin-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px; flex-wrap: wrap;
}
.sar-type  { font-size: 18px; flex-shrink: 0; }
.sar-info  { display: flex; flex-direction: column; flex: 1; min-width: 140px; }
.sar-item-id { font-size: 13px; font-weight: 600; color: #e8a87c; }
.sar-theme   { font-size: 11px; color: #888; }
.sar-toggle-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: #ccc; cursor: pointer;
}
.sar-dates {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11px; color: #aaa;
}
.sar-dates input[type="date"] {
  background: #2a2a2a; border: 1px solid #444; color: #ddd;
  border-radius: 4px; padding: 2px 6px; font-size: 11px;
}
.sar-arrow { color: #888; font-size: 14px; }
.sar-save-btn {
  background: #e8a87c; color: #111; border: none;
  border-radius: 6px; padding: 5px 12px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  transition: opacity .15s;
}
.sar-save-btn:hover { opacity: .85; }

/* ── Admin: Seasonal theme cards ───────────────────────────────── */
.seasonal-theme-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(232,168,124,0.2);
  border-radius: 12px; padding: 16px; margin-bottom: 14px;
}

/* Admin — season cards */
.admin-season-card { background: #161b22; border: 1px solid #30363d; border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.admin-season-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.admin-season-name { font-weight: 700; font-size: .95rem; color: #e6edf3; }
.admin-season-status { font-size: .78rem; font-weight: 700; }
.admin-season-dates { font-size: .75rem; color: #8b949e; margin-bottom: 12px; }
.admin-season-badges { display: flex; flex-direction: column; gap: 8px; }
.admin-season-badge { display: flex; align-items: center; gap: 10px; border: 1px solid; border-radius: 10px; padding: 8px 12px; }
.asb-emoji { font-size: 1.4rem; flex-shrink: 0; }
.asb-info { display: flex; flex-direction: column; gap: 2px; }
.asb-id { font-size: .8rem; font-weight: 700; }
.asb-badge-id { font-size: .68rem; color: #484f58; font-family: monospace; }
.asb-winner { font-size: .78rem; font-weight: 600; color: #5cd68c; }
.stc-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.stc-icon { font-size: 22px; }
.stc-name { font-size: 15px; font-weight: 700; color: #e8a87c; flex: 1; }
.stc-toggle {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: #ccc; cursor: pointer;
}
.stc-toggle input[type="checkbox"] { cursor: pointer; }
.stc-toggle-text { min-width: 40px; }
.stc-items {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.2); border-radius: 8px;
}
.stc-item {
  font-size: 12px; color: #aaa;
  background: rgba(255,255,255,0.05);
  border-radius: 6px; padding: 4px 10px;
}
.stc-item b { color: #ccc; }
.stc-dates-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.stc-dates-label { font-size: 12px; color: #888; }
.stc-dates-row input[type="date"] {
  background: #2a2a2a; border: 1px solid #444; color: #ddd;
  border-radius: 6px; padding: 4px 8px; font-size: 12px;
}
.stc-save { margin-left: auto; }

/* ── Shop preview modal ─────────────────────────────────────── */
#shopPreviewModal { z-index: 1000; }
.shop-preview-box { max-width: 320px; padding: 20px; text-align: center; }
.shop-preview-sub {
  font-size: .72rem; color: #666; text-transform: uppercase;
  letter-spacing: 1px; margin: 0 0 10px;
}
#shopPreviewCanvas {
  border-radius: 10px; border: 1px solid rgba(255,255,255,0.07);
  display: block; margin: 0 auto 12px; background: #0e0e1a;
  max-width: 100%;
}
.shop-preview-title { font-size: 1.1rem; font-weight: 700; color: #eee; margin: 0 0 4px; }
.shop-preview-price-line { font-size: 1rem; color: #f0c040; font-weight: 600; margin: 0 0 16px; }
.shop-preview-btns { display: flex; gap: 10px; }
.shop-preview-btns > * { flex: 1; }

.premium-offer-card, .premium-active-card {
  margin: 8px 0; padding: 20px;
  background: linear-gradient(135deg, rgba(30,20,2,.95), rgba(18,12,2,.95));
  border: 1.5px solid rgba(255,215,0,.5); border-radius: 14px;
  box-shadow: 0 0 24px rgba(255,215,0,.08);
}
.premium-offer-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 18px;
}
.premium-offer-icon {
  font-size: 2.4rem; color: #ffd700;
  text-shadow: 0 0 16px rgba(255,215,0,.7);
}
.premium-offer-title { font-size: 1.05rem; font-weight: 800; color: #ffd700; }
.premium-offer-price { font-size: 1.5rem; font-weight: 800; color: #e6edf3; margin-top: 2px; }
.premium-offer-price span { font-size: .85rem; color: #8b949e; font-weight: 400; }

.premium-active-badge {
  display: inline-block; padding: 4px 14px; border-radius: 20px;
  background: linear-gradient(135deg, #b8860b, #ffd700); color: #1a0800;
  font-size: .82rem; font-weight: 800; letter-spacing: .5px;
  text-transform: uppercase; margin-bottom: 10px;
}
.premium-active-expires { font-size: .8rem; color: #8b949e; margin-bottom: 14px; }
.premium-manage-hint { font-size: .75rem; color: #484f58; margin-top: 12px; }
.premium-manage-hint a { color: #8b949e; }

.premium-perks-list {
  list-style: none; padding: 0; margin: 0 0 16px;
  display: flex; flex-direction: column; gap: 8px;
  text-align: left;
}
.premium-perks-list li { font-size: .85rem; color: #c9d1d9; padding-left: 2px; }

.premium-subscribe-btn {
  width: 100%; padding: 12px; border-radius: 10px; font-size: .95rem; font-weight: 800;
  background: linear-gradient(135deg, #b8860b, #ffd700, #b8860b);
  background-size: 200% 100%; color: #1a0800; border: none; cursor: pointer;
  transition: background-position .3s, box-shadow .2s;
  box-shadow: 0 0 16px rgba(255,215,0,.25);
}
.premium-subscribe-btn:hover {
  background-position: right center;
  box-shadow: 0 0 24px rgba(255,215,0,.4);
}
.premium-sub-notice {
  font-size: .72rem; color: #484f58; text-align: center; margin-top: 10px;
}

.reward-notif-box {
  width: 460px;
  max-width: calc(100vw - 32px);
}

.reward-notif-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #2baa9e;
  margin-bottom: 8px;
}

.reward-notif-sub {
  color: #8b949e;
  font-size: .86rem;
  margin-bottom: 12px;
}

.reward-notif-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.reward-notif-item {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 10px;
  padding: 9px 11px;
}

.reward-notif-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.reward-notif-kind {
  font-size: .78rem;
  color: #c9d1d9;
  font-weight: 700;
}

.reward-notif-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

.reward-notif-label {
  font-size: .73rem;
  color: #8b949e;
}

.reward-notif-value {
  font-size: .78rem;
  color: #e6edf3;
  font-weight: 700;
}

.reward-notif-rank {
  font-size: .78rem;
  color: #2baa9e;
  font-weight: 700;
}

.reward-notif-amount {
  font-size: .83rem;
  color: #e6edf3;
  font-weight: 700;
}

/* ============================================================
   Podium
   ============================================================ */

.podium-box {
  width: 460px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px); overflow-y: auto;
  text-align: center;
}

.podium-title {
  font-size: 1.3rem; font-weight: 800; color: #2baa9e; margin-bottom: 18px;
}

.podium-entry {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px; margin-bottom: 7px;
  background: #0d1117; border: 1px solid #21262d;
  animation: slideIn .25s ease both;
}
.podium-entry:nth-child(1) { animation-delay: .05s; }
.podium-entry:nth-child(2) { animation-delay: .10s; }
.podium-entry:nth-child(3) { animation-delay: .15s; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.podium-entry.podium-me {
  border-color: rgba(43,170,158,0.45);
  background: rgba(43,170,158,0.08);
}

.podium-medal { font-size: 1.3rem; width: 30px; flex-shrink: 0; text-align: center; }
.podium-name  { flex: 1; font-size: .92rem; font-weight: 600; text-align: left; }
.podium-time  { font-family: 'Consolas', monospace; font-size: .85rem; color: #8b949e; white-space: nowrap; }

.podium-coins-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,200,0,0.1); border: 1px solid rgba(255,200,0,0.3);
  border-radius: 20px; padding: 8px 18px; margin: 12px 0 0;
  font-size: .95rem; font-weight: 700; color: #ffd700;
}

/* ============================================================
   Leaderboard inline (homepage)
   ============================================================ */

.home-lb {
  margin-top: 10px;
  border-top: 1px solid #2d3540;
  padding-top: 8px;
}

.home-lb-title {
  font-size: .7rem; font-weight: 700; color: #8b949e;
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 5px;
}

.home-lb .lb-row {
  padding: 4px 8px;
  margin-bottom: 2px;
  gap: 7px;
}

.home-lb .lb-rank { font-size: .78rem; width: 22px; }
.home-lb .lb-name { font-size: .78rem; }
.home-lb .lb-time { font-size: .74rem; }
.home-lb .dot     { width: 8px !important; height: 8px !important; }
.home-lb .lb-loading, .home-lb .lb-empty { padding: 6px 0; font-size: .76rem; }

.lb-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px; margin-bottom: 4px;
  background: #0d1117; border: 1px solid #21262d;
}
.lb-row-me { border-color: rgba(43,170,158,0.4); background: rgba(43,170,158,0.07); }
.lb-separator { text-align: center; color: #484f58; font-size: .7rem; letter-spacing: 3px; padding: 2px 0; }

.lb-rank  { width: 28px; text-align: center; flex-shrink: 0; font-size: .85rem; color: #8b949e; }
.lb-name  { flex: 1; font-size: .88rem; font-weight: 600; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-time  { font-family: 'Consolas', monospace; font-size: .82rem; color: #8b949e; white-space: nowrap; }
.lb-row-me .lb-name { color: #2baa9e; }

.lb-loading, .lb-empty { color: #484f58; font-size: .84rem; padding: 16px 0; }

/* ============================================================
   Stats profil
   ============================================================ */

.stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 6px;
}

.stat-card {
  background: #0d1117; border: 1px solid #21262d; border-radius: 12px;
  padding: 16px 12px; text-align: center;
  display: flex; flex-direction: column; gap: 4px;
}

.stat-value {
  font-size: 2rem; font-weight: 800; color: #e6edf3; line-height: 1;
}
.stat-value.stat-gold   { color: #ffd700; }
.stat-value.stat-silver { color: #c0c0c0; }
.stat-value.stat-bronze { color: #cd7f32; }
.stat-value.stat-teal   { color: #2baa9e; }

.stat-label {
  font-size: .72rem; color: #8b949e; text-transform: uppercase; letter-spacing: .6px;
}

.stat-card-sm { padding: 10px 8px; }
.stat-card-sm .stat-value { font-size: 1.5rem; }

.stats-medals-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px;
}

/* ── Campaign ─────────────────────────────────────────────── */
.campaign-box { max-height: 80vh; overflow-y: auto; }

.campaign-timer {
  text-align: center; font-size: .82rem; color: #8b949e; margin: -4px 0 12px;
}

.campaign-tracks { display: flex; flex-direction: column; gap: 8px; }

.campaign-track-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #0d1117; border: 1px solid #21262d; border-radius: 10px; padding: 10px 12px;
}

.campaign-track-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }

.campaign-medal { font-size: 1.6rem; flex-shrink: 0; }

.campaign-track-name { font-weight: 700; font-size: .9rem; color: #e6edf3; }

.campaign-thresholds { font-size: .72rem; color: #8b949e; margin-top: 2px; }

.campaign-best { font-size: .75rem; color: #2baa9e; margin-top: 2px; }

.campaign-play-btn {
  flex-shrink: 0; padding: 7px 14px;
  background: #2baa9e; color: #fff;
  border: none; border-radius: 50px; cursor: pointer;
  font-weight: 700; font-size: .82rem;
  transition: background .15s;
}
.campaign-play-btn:hover { background: #229990; }

.campaign-reward-banner {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,215,0,0.08); border: 1px solid rgba(255,215,0,0.3);
  border-radius: 10px; padding: 10px 14px; margin-top: 10px;
  font-size: .85rem; color: #ffd700; font-weight: 600;
}
.campaign-reward-banner.campaign-reward-claimed { color: #2baa9e; border-color: rgba(43,170,158,0.3); background: rgba(43,170,158,0.08); }

.stats-track-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; border-radius: 8px; margin-bottom: 4px;
  background: #0d1117; border: 1px solid #21262d;
}
.stats-track-name { font-size: .85rem; color: #c9d1d9; }
.stats-track-time { font-family: 'Consolas', monospace; font-size: .82rem; color: #2baa9e; font-weight: 700; }

/* ── Public profile modal ─────────────────────────────────── */
.pub-profile-box {
  width: 400px; max-width: calc(100vw - 32px);
  max-height: 88vh; overflow-y: auto;
  display: flex; flex-direction: column;
  padding: 24px 28px 20px;
}

.pub-profile-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}

.pub-profile-identity {
  display: flex; align-items: center; gap: 10px;
}

.pub-profile-name {
  font-size: 1.15rem; font-weight: 800; color: #e6edf3;
}

.pub-profile-rank {
  font-size: .85rem; font-weight: 700; color: #2baa9e;
  background: #112127; border: 1px solid #2baa9e40;
  border-radius: 8px; padding: 2px 8px; white-space: nowrap;
}
.pub-profile-rank.hidden { display: none; }

#pubProfileCanvas {
  width: 100%; border-radius: 12px;
  background: #071014; display: block;
}

.glb-row { cursor: pointer; transition: background .12s; }
.glb-row:hover { background: rgba(43,170,158,0.07); border-radius: 8px; }

.pub-profile-name-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  color: inherit; font: inherit; text-align: left;
  transition: color .15s;
}
.pub-profile-name-btn:hover { color: #2baa9e; }

/* ── Pub profile : emote strip ───────────────────────────── */

.pub-emote-strip {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 0 2px;
}

.pub-emote-pill {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px 4px 7px;
  background: #0d1117; border: 1px solid #30363d;
  border-radius: 20px; font-size: .78rem; color: #c9d1d9;
  user-select: none;
}

.pub-emote-pill-premium {
  background: rgba(30,30,58,0.85);
  border-color: var(--glow, rgba(168,85,247,0.5));
  box-shadow: 0 0 6px var(--glow, rgba(168,85,247,0.3));
  color: #e6edf3;
}

.pub-emote-emoji { font-size: 1.1rem; line-height: 1; }
.pub-emote-name  { font-size: .72rem; color: #8b949e; }
.pub-emote-pill-premium .pub-emote-name { color: #c9d1d9; }

/* ============================================================
   Volume control
   ============================================================ */

#volumeControl {
  position: fixed; bottom: 18px; right: 18px; z-index: 9999;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}

#volumeBtn {
  width: 40px; height: 40px; border-radius: 50%;
  background: #161b22; border: 1px solid #30363d;
  font-size: 1.1rem; cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: border-color .15s, background .15s;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
#volumeBtn:hover { background: #21262d; border-color: #2baa9e; }

#volumePopover {
  background: #161b22; border: 1px solid #30363d; border-radius: 12px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.5); min-width: 190px;
}
#volumePopover.hidden { display: none; }

.vol-row {
  display: flex; align-items: center; gap: 8px;
}

.vol-icon { font-size: .95rem; flex-shrink: 0; width: 20px; text-align: center; }

#volumeSlider {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 4px; border-radius: 2px;
  background: #21262d; outline: none; cursor: pointer;
}
#volumeSlider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px;
  border-radius: 50%; background: #2baa9e; cursor: pointer;
  border: 2px solid #0d1117;
}
#volumeSlider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: #2baa9e; cursor: pointer; border: 2px solid #0d1117;
}

#volumeLabel {
  font-size: .78rem; font-weight: 700; color: #e6edf3;
  min-width: 34px; text-align: right;
}

/* ============================================================
   Achievements
   ============================================================ */

#achievementsList {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 420px; overflow-y: auto; padding-right: 4px;
}

.ach-card {
  display: flex; align-items: center; gap: 12px;
  background: #0d1117; border: 1px solid #21262d; border-radius: 12px;
  padding: 14px 14px; opacity: .55; transition: opacity .2s, border-color .2s;
}

.ach-card.ach-unlocked {
  opacity: 1; border-color: #f0b429;
  box-shadow: 0 0 8px rgba(240,180,41,.18);
}

.ach-card.ach-claimed {
  opacity: 1; border-color: #21262d;
}

.ach-emoji { font-size: 2rem; flex-shrink: 0; width: 40px; text-align: center; }

.ach-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }

.ach-title { font-size: .9rem; font-weight: 700; color: #e6edf3; margin: 0; }
.ach-desc  { font-size: .78rem; color: #8b949e; margin: 0; }

.ach-progress-bar {
  height: 5px; background: #21262d; border-radius: 3px; overflow: hidden; margin-top: 2px;
}
.ach-progress-fill { height: 100%; background: #2baa9e; border-radius: 3px; transition: width .4s; }

.ach-progress-txt { font-size: .72rem; color: #484f58; margin: 2px 0 0; }

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

.ach-reward { font-size: .82rem; font-weight: 700; color: #ffd700; white-space: nowrap; }

.ach-claimed-badge {
  font-size: .72rem; color: #2baa9e; font-weight: 700;
}

.ach-claim-btn {
  font-size: .78rem; font-weight: 700; padding: 5px 12px; border-radius: 8px;
  background: linear-gradient(135deg,#f0b429,#e07b00); color: #000; border: none; cursor: pointer;
  white-space: nowrap;
}
.ach-claim-btn:disabled { opacity: .5; cursor: default; }

/* ============================================================
   Event modal
   ============================================================ */

/* Desktop : les 2 événements côte à côte */
.event-box { max-width: 900px; width: 94vw; }

.events-container {
  display: flex; gap: 16px; align-items: flex-start;
}

.event-panel {
  flex: 1; min-width: 0;
  background: #0d1117; border: 1px solid #21262d; border-radius: 14px;
  overflow: hidden;
}

.event-panel-header {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: #161b22; border: none; cursor: pointer;
  color: #e6edf3; font-size: .92rem; font-weight: 700; text-align: left;
  border-bottom: 1px solid #21262d;
}
.event-panel-header:hover { background: #1c2230; }
.event-panel-chevron { font-size: 1rem; color: #8b949e; transition: transform .2s; display: inline-block; }
.event-panel:not(.collapsed) .event-panel-chevron { transform: rotate(90deg); }

.event-panel-body { padding: 14px; }
.event-panel.collapsed .event-panel-body { display: none; }

.event-modal-title {
  font-size: 1.15rem; font-weight: 800; color: #e6edf3;
  text-align: center; margin-bottom: 14px;
}

.event-info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px;
}

.event-info-item {
  background: #0d1117; border: 1px solid #21262d; border-radius: 10px;
  padding: 10px 14px; display: flex; flex-direction: column; gap: 3px;
}

.event-info-label {
  font-size: .7rem; color: #8b949e; text-transform: uppercase; letter-spacing: .5px;
}

.event-info-val {
  font-size: .95rem; font-weight: 700; color: #e6edf3;
}

.event-timer { color: #f0b429; }
.event-best  { color: #2baa9e; }

.event-play-btn {
  width: 100%; margin-bottom: 16px;
  background: linear-gradient(135deg, #2baa9e, #1d7a72) !important;
}
.event-play-btn:disabled { opacity: .5; cursor: default; }

/* Event leaderboard */
.event-lb { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; }

.event-lb-header {
  display: grid; grid-template-columns: 28px 1fr 90px;
  padding: 4px 10px; color: #8b949e; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .5px;
}

.event-lb-row {
  display: grid; grid-template-columns: 28px 1fr 90px;
  align-items: center; gap: 6px;
  padding: 8px 10px; border-radius: 8px;
  background: #0d1117; border: 1px solid #21262d;
  font-size: .85rem;
}

.event-lb-row.event-lb-me {
  border-color: #2baa9e; background: rgba(43,170,158,.08);
}

.event-lb-separator {
  text-align: center;
  color: #484f58;
  font-size: .65rem;
  letter-spacing: 3px;
  padding: 2px 0;
}

.event-lb-rank { font-weight: 800; color: #8b949e; text-align: center; font-size: .8rem; }
.event-lb-rank.gold   { color: #ffd700; }
.event-lb-rank.silver { color: #c0c0c0; }
.event-lb-rank.bronze { color: #cd7f32; }

.event-lb-name {
  display: flex; align-items: center; gap: 7px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.event-lb-name .dot { flex-shrink: 0; }

.event-lb-time {
  font-family: 'Consolas', monospace; font-size: .83rem;
  font-weight: 700; color: #2baa9e; text-align: right;
}

.event-lb-empty { color: #484f58; font-size: .84rem; padding: 12px 0; text-align: center; }

/* Rewards info block */
.event-rewards-info {
  background: #0d1117; border: 1px solid #21262d; border-radius: 10px;
  padding: 10px 14px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px;
}
.event-rewards-title {
  font-size: .7rem; color: #8b949e; text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 2px;
}
.event-reward-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .82rem; color: #c9d1d9;
}
.event-reward-row span:first-child { font-weight: 600; }
.event-reward-row span:last-child  { font-weight: 700; color: #e6edf3; }
.event-reward-participation { border-top: 1px solid #21262d; padding-top: 6px; margin-top: 2px; color: #8b949e; }
.event-reward-participation span:last-child { color: #8b949e; }

/* ── Vote modal (post test-race) ───────────────────────────── */
.vote-box {
  width: min(92vw, 420px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.vote-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #7c3aed;
  margin-bottom: 2px;
}

.vote-time {
  font-size: .9rem;
  color: #c9d1d9;
}

.vote-question {
  font-size: .95rem;
  color: #e6edf3;
}

.vote-hint {
  font-size: .75rem;
  color: #8b949e;
  margin-top: -4px;
}

.vote-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.vote-btn {
  padding: 10px 20px;
  border: 1px solid #30363d;
  border-radius: 10px;
  background: #21262d;
  color: #c9d1d9;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.vote-btn:active { transform: scale(.96); }
.vote-btn.yes:hover  { background: rgba(43,170,158,.2); border-color: #2baa9e; color: #2baa9e; }
.vote-btn.no:hover   { background: rgba(231,76,60,.15);  border-color: #e74c3c; color: #e74c3c; }
.vote-btn.skip       { font-size: .8rem; font-weight: 400; color: #8b949e; }
.vote-btn.skip:hover { color: #c9d1d9; border-color: #484f58; }

/* ── Beta circuits modal ───────────────────────────────────── */
.beta-box {
  width: min(92vw, 560px);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.beta-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #7c3aed;
  margin-bottom: 4px;
}

.beta-subtitle {
  font-size: .82rem;
  color: #8b949e;
  margin-bottom: 14px;
}

.beta-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.beta-loading, .beta-empty {
  color: #8b949e;
  font-size: .85rem;
  text-align: center;
  padding: 20px 0;
}

.beta-circuit-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 12px 14px;
}

.bcc-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.bcc-name {
  font-size: .95rem;
  font-weight: 700;
  color: #e6edf3;
}

.bcc-author {
  font-size: .75rem;
  color: #8b949e;
}

.bcc-votes {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: .8rem;
  color: #8b949e;
  margin-bottom: 10px;
}

.bcc-yes  { color: #2baa9e; font-weight: 600; }
.bcc-no   { color: #e74c3c; font-weight: 600; }
.bcc-myvote { font-style: italic; }

.bcc-actions {
  display: flex;
  gap: 8px;
}

.bcc-btn {
  padding: 6px 12px;
  border: 1px solid #30363d;
  border-radius: 7px;
  background: #21262d;
  color: #c9d1d9;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.bcc-btn:hover { background: #2d333b; border-color: #484f58; }
.bcc-btn.vote-yes.active { background: rgba(43,170,158,.2); border-color: #2baa9e; color: #2baa9e; }
.bcc-btn.vote-no.active  { background: rgba(231,76,60,.15);  border-color: #e74c3c; color: #e74c3c; }
.bcc-btn.try-btn { background: #7c3aed22; border-color: #7c3aed; color: #a78bfa; }
.bcc-btn.try-btn:hover { background: #7c3aed44; }

/* ── Admin circuits panel ──────────────────────────────────── */
.admin-circuits-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-circuit-card {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 12px 14px;
}

.admin-circuit-logo-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid #21262d;
}
.admin-circuit-logo-row:last-child { border-bottom: none; }
.acl-name { font-size: .82rem; color: #e6edf3; min-width: 100px; flex-shrink: 0; }
.acl-input {
  flex: 1; background: #0d1117; border: 1px solid #30363d; border-radius: 6px;
  color: #e6edf3; font-size: .78rem; padding: 5px 8px;
}
.acl-save-btn {
  background: #2baa9e; color: #fff; border: none; border-radius: 6px;
  padding: 5px 12px; font-size: .78rem; cursor: pointer; white-space: nowrap;
  flex-shrink: 0;
}
.acl-save-btn:hover { background: #229990; }

.acc-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.acc-name {
  font-size: .95rem;
  font-weight: 700;
  color: #e6edf3;
}

.acc-author {
  font-size: .75rem;
  color: #8b949e;
}

.acc-votes {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
  font-size: .8rem;
}

.acc-status {
  padding: 1px 7px;
  border-radius: 10px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.acc-status-pending  { background: rgba(241,196,15,.15);  color: #f1c40f; }
.acc-status-approved { background: rgba(43,170,158,.15);  color: #2baa9e; }
.acc-status-rejected { background: rgba(231,76,60,.12);   color: #e74c3c; }

.acc-vote-yes { color: #2baa9e; font-weight: 600; }
.acc-vote-no  { color: #e74c3c; font-weight: 600; }

.acc-actions {
  display: flex;
  gap: 8px;
}

.acc-btn {
  padding: 5px 12px;
  border: 1px solid #30363d;
  border-radius: 7px;
  background: #21262d;
  color: #c9d1d9;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.acc-btn.approve:hover { background: rgba(43,170,158,.2); border-color: #2baa9e; color: #2baa9e; }
.acc-btn.reject:hover  { background: rgba(231,76,60,.15);  border-color: #e74c3c; color: #e74c3c; }
.acc-btn.try:hover     { background: #7c3aed22; border-color: #7c3aed; color: #a78bfa; }

@media (max-width: 900px) {
  .login-box-wide {
    width: min(94vw, 620px);
    padding: 30px 24px;
  }

  .create-layout {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════
   Mobile / PWA
   ═══════════════════════════════════════════════════════════ */

/* ── D-pad ───────────────────────────────────────────────── */
#mobileControls {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 8px 20px 12px;
  pointer-events: none;
  z-index: 600;
  touch-action: none;
}

@media (pointer: fine) {
  #mobileControls { display: none !important; }
}

.dpad-cluster {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

#dpadAccel { flex-direction: column; }

.dpad-btn {
  width: 96px;
  height: 96px;
  background: rgba(13,17,23,0.72);
  border: 2px solid rgba(43,170,158,0.35);
  border-radius: 20px;
  color: rgba(230,237,243,0.75);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: none;
  backdrop-filter: blur(6px);
  transition: background .08s, border-color .08s;
}
.dpad-btn svg {
  width: 52px; height: 52px;
  pointer-events: none;
}

.dpad-btn.dpad-stack { height: 74px; }

.dpad-btn.pressed,
.dpad-btn:active {
  background: rgba(43,170,158,0.28);
  border-color: #2baa9e;
  color: #e6edf3;
}

.dpad-emotes {
  display: flex; gap: 6px;
  pointer-events: auto;
  align-self: flex-end;
  padding-bottom: 4px;
}

.emote-dpad-btn {
  width: 52px; height: 52px;
  background: rgba(13,17,23,0.72);
  border: 2px solid rgba(43,170,158,0.25);
  border-radius: 14px;
  color: rgba(230,237,243,0.85);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
  user-select: none; touch-action: none;
  backdrop-filter: blur(6px);
  transition: background .08s, border-color .08s, transform .1s;
}
.emote-dpad-btn:active {
  background: rgba(43,170,158,0.22);
  border-color: #2baa9e;
  transform: scale(0.92);
}

/* ═══════════════════════════════════════════════════════════
   @media (pointer: coarse) — tout le reste du mobile
   ═══════════════════════════════════════════════════════════ */
@media (pointer: coarse) {

  /* ── Body ────────────────────────────────────────────── */
  body { overflow: auto; display: block; min-height: 100dvh; }

  /* ── Inputs : font-size ≥ 1rem pour éviter le zoom iOS ─ */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="number"],
  input[type="tel"],
  input,
  textarea,
  select {
    font-size: 1rem !important;
  }

  /* ── Touch targets : hauteur minimum 44px ────────────── */
  .track-sort-btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .mobile-nav-btn { min-height: 44px; }
  .auth-submit    { min-height: 48px; }
  .auth-guest     { min-height: 44px; }
  .auth-tab       { min-height: 44px; }

  /* ── Écran login ─────────────────────────────────────── */
  #loginScreen {
    align-items: flex-start;
    justify-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0;
  }

  .login-box-wide,
  .login-box {
    width: 100%;
    max-width: 100%;
    padding: 14px 14px calc(72px + env(safe-area-inset-bottom, 8px));
    box-sizing: border-box;
    border-radius: 0;
    border: none;
    box-shadow: none;
    min-height: 100dvh;
  }

  /* ── Momentum scroll + overscroll sur les conteneurs ─── */
  .profile-panel-content,
  #sidebar.race-drawer-mode,
  .track-grid,
  .social-messages-list,
  .social-conversations-list {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  #joinView { margin-top: 15vh; min-height: auto; }

  /* ── Header compact ──────────────────────────────────── */
  .home-header {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #21262d;
  }

  .home-brand {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex: 1;
  }

  .home-logo-svg { width: 36px; height: 27px; margin-bottom: 0; }

  .home-brand h1 { font-size: 1rem; margin-bottom: 0; text-align: left; }

  .subtitle { display: none; }

  .user-bar { display: none; }

  /* ── Mise en page create ─────────────────────────────── */
  .create-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* Sélecteur de circuit en premier, puis prévisualisation */
  .create-controls { order: 1; }
  .track-preview-panel { order: 2; }

  .track-summary { display: none; }

  #trackPreviewCanvas {
    width: 100%;
    max-height: 170px;
    height: auto;
    object-fit: cover;
  }

  .preview-caption { margin-top: 8px; }

  #createRoomBtn {
    font-size: 1.05rem;
    padding: 15px;
    border-radius: 14px;
  }

  .code-row input { font-size: 1rem; }

  .track-select-box { width: 100vw; height: 100dvh; border-radius: 0; padding: 20px 16px 16px; }

  /* ── Footer links : cachés sur mobile ────────────────── */
  .home-footer-links { display: none; }

  /* ── Bottom nav ──────────────────────────────────────── */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #161b22;
    border-top: 1px solid #30363d;
    padding: 6px 0 env(safe-area-inset-bottom, 10px);
    z-index: 201;
  }
  /* En mode app installée (standalone) : marge supplémentaire en bas */
  @media (display-mode: standalone) {
    .mobile-bottom-nav { padding-bottom: max(env(safe-area-inset-bottom, 0px), 16px); }
    #mobileControls { padding-bottom: 34px; }
  }

  .mobile-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    color: #8b949e;
    cursor: pointer;
    padding: 6px 4px;
    font-size: inherit;
    transition: color .15s;
    position: relative;
  }
  .mobile-nav-btn:active,
  .mobile-nav-btn.mobile-nav-active { color: #2baa9e; }

  .mobile-nav-icon  { font-size: 1.3rem; line-height: 1; }
  .mobile-nav-label { font-size: .75rem; font-weight: 600; letter-spacing: .02em; }

  .mobile-nav-btn.mobile-nav-locked { opacity: .35; }

  /* Barre admin mobile */
  .mobile-admin-bar {
    gap: 8px;
    padding: 8px 0 0;
    margin-top: 4px;
    border-top: 1px solid #21262d;
  }
  .mobile-admin-btn {
    flex: 1; padding: 8px 6px;
    background: #0d1117; border: 1px solid #30363d;
    border-radius: 10px; color: #8b949e;
    font-size: .72rem; font-weight: 600; cursor: pointer;
    text-align: center; text-decoration: none;
    display: flex; align-items: center; justify-content: center; gap: 4px;
  }
  .mobile-admin-btn.admin-btn { color: #f59e0b; border-color: rgba(245,158,11,0.3); }

  /* Pastille "récompense dispo" */
  .mobile-nav-btn .nav-badge {
    position: absolute; top: 4px; right: calc(50% - 14px);
    width: 8px; height: 8px; border-radius: 50%;
    background: #f59e0b; border: 2px solid #161b22;
  }
  .mobile-nav-btn.mobile-nav-reward-active {
    animation: none;
    font-weight: 700;
  }
  #mobileNavDaily.mobile-nav-reward-active {
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.38);
    background: rgba(255, 215, 0, 0.09);
    box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.12);
  }
  #mobileNavEvent.mobile-nav-reward-active {
    color: #2baa9e;
    border-color: rgba(43, 170, 158, 0.42);
    background: rgba(43, 170, 158, 0.10);
    box-shadow: inset 0 0 0 1px rgba(43, 170, 158, 0.14);
  }

  /* ── Profil ──────────────────────────────────────────── */
  .profile-box {
    overflow: hidden !important;
    height: calc(100dvh - 48px);
    max-height: calc(100dvh - 48px);
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    padding: 14px 12px 12px;
    margin: 24px 0;
    border-radius: 18px 18px 0 0;
  }

  .profile-header { flex-wrap: wrap; gap: 8px; }
  .profile-balance { flex-wrap: wrap; gap: 6px; }

  .profile-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }
  .profile-tab { flex-shrink: 0; font-size: .8rem; padding: 9px 12px; min-height: 44px; display: flex; align-items: center; justify-content: center; }

  .profile-actions {
    position: sticky; bottom: 0;
    background: #161b22;
    padding: 10px 0 4px; margin-top: 8px;
    border-top: 1px solid #21262d; z-index: 5;
  }

  /* ── Vue course ──────────────────────────────────────── */
  #gameContainer { flex-direction: column; align-items: center; gap: 0; }

  #gameCanvas {
    width: min(100vw, calc(100dvh - 218px - env(safe-area-inset-bottom, 0px))) !important;
    height: min(100vw, calc(100dvh - 218px - env(safe-area-inset-bottom, 0px))) !important;
    border-radius: 0;
  }

  /* Bandeau HUD : collé sous le canvas, géré par JS (display none/flex) */
  .mobile-race-hud {
    position: relative;
    width: 100%;
    height: 48px;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    background: rgba(13,17,23,0.92);
    border-top: 1px solid #30363d;
    pointer-events: none;
  }
  .mobile-hud-lap {
    font-size: .88rem; font-weight: 700; color: #e6edf3;
    min-width: 90px;
  }
  .mobile-hud-speed {
    font-size: 1.1rem; font-weight: 800; color: #2baa9e;
    text-align: center;
  }
  .mobile-hud-unit { font-size: .65rem; font-weight: 600; color: #8b949e; }
  .mobile-hud-timer {
    font-family: 'Consolas', monospace;
    font-size: .9rem; font-weight: 700; color: #e6edf3;
    min-width: 90px; text-align: right;
  }

  /* Barre d'emotes mobile (sous le HUD vitesse) */
  .mobile-emote-bar {
    width: 100%; height: 50px;
    align-items: center; justify-content: center; gap: 10px;
    padding: 5px 16px;
    background: rgba(13,17,23,0.92);
    border-top: 1px solid #21262d;
  }
  .mobile-emote-bar .emote-dpad-btn {
    width: 40px; height: 40px;
    font-size: 1.3rem; border-radius: 12px;
  }

  /* Cacher le HUD desktop et le compteur canvas sur mobile */
  #hud { display: none; }

  /* Sidebar normale (lobby / fin de course) */
  #sidebar {
    width: 100%; max-width: none;
    border-radius: 0; border-left: none; border-right: none;
    margin-bottom: 130px;
    transition: none;
  }

  /* Sidebar en mode drawer */
  #sidebar.race-drawer-mode {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    max-height: 78vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 20px 20px 0 0;
    border: 1px solid #30363d;
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 16px);
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.32,.72,0,1);
    z-index: 700;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
  }
  #sidebar.race-drawer-mode.race-drawer-open {
    transform: translateY(0);
  }

  /* Backdrop */
  #raceDrawerBackdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 650;
  }
  #raceDrawerBackdrop.visible { display: block; }

  /* Bouton ☰ toggle */
  .race-menu-toggle {
    position: fixed;
    top: 12px; left: 12px;
    z-index: 680;
    width: 42px; height: 42px;
    background: rgba(22,27,34,0.88);
    border: 1px solid #30363d;
    border-radius: 12px;
    color: #e6edf3;
    font-size: 1.15rem;
    align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  }
  .race-menu-toggle:active { background: #21262d; }

  #volumeControl { bottom: auto !important; top: 12px; right: 12px; }

  /* ── Modals ──────────────────────────────────────────── */
  .modal-box { width: min(96vw, 480px); max-height: 88vh; overflow-y: auto; }

  /* ── Modals profil public + social : bottom sheet ───── */
  #publicProfileModal { align-items: flex-end; }
  .pub-profile-box {
    width: 100vw; max-width: 100vw;
    max-height: 90dvh; border-radius: 22px 22px 0 0;
    padding: 20px 16px 20px; margin: 0;
  }
  #socialModal { align-items: flex-end; }
  .social-box {
    width: 100vw; max-width: 100vw;
    height: 90dvh; max-height: 90dvh;
    border-radius: 22px 22px 0 0;
    padding: 20px 16px 16px;
    margin: 0;
    overflow: hidden;
  }
  .social-tabs { gap: 6px; margin-bottom: 10px; }
  .social-tab  { padding: 10px 8px; font-size: .82rem; }

  /* Conversations : items plus grands, faciles à taper */
  .social-conversation-item { padding: 16px 14px; font-size: .9rem; }
  .social-conversation-item small { max-width: none; font-size: .78rem; }

  /* Friends : touch targets plus grands */
  .social-friend-item { padding: 12px 14px; min-height: 52px; }
  .social-chat-btn { padding: 8px 14px; font-size: .88rem; }
  .social-friends-counter { font-size: .85rem; padding-bottom: 12px; }

  /* Chat : une vue à la fois */
  .social-chat-shell { flex-direction: column; gap: 0; }

  .social-conversations-column {
    width: 100%; flex: 1; border-radius: 12px;
  }
  /* par défaut : liste conversations visible, panel messages caché */
  .social-chat-shell .social-messages-column { display: none; }

  /* quand chat-open : inverser */
  .social-chat-shell.chat-open .social-conversations-column { display: none; }
  .social-chat-shell.chat-open .social-messages-column {
    display: flex; flex: 1; min-height: 0;
  }

  /* Bouton retour visible sur mobile */
  .social-chat-back-btn { display: inline-flex; }

  /* Agrandir la zone de saisie */
  .social-message-row input { padding: 14px 16px; font-size: .95rem; }
  .social-message-row button { padding: 10px 16px; }
}

/* Fallback max-width pour appareils ne reportant pas pointer:coarse */
@media (max-width: 900px) {
  #volumeControl {
    bottom: auto !important;
    top: 12px;
    right: 12px;
  }
}

/* Mobile : événements en accordion vertical */
@media (pointer: coarse) {
  .events-container { flex-direction: column; gap: 10px; }
  .event-box        { max-width: 100%; }
}

/* Tablette (iPad) : boutons D-pad plus grands */
@media (pointer: coarse) and (min-width: 600px) {
  .dpad-btn            { width: 130px; height: 130px; font-size: 2.6rem; border-radius: 26px; }
  .dpad-btn.dpad-stack { height: 100px; }
  .emote-dpad-btn      { width: 70px; height: 70px; font-size: 1.9rem; border-radius: 18px; }
}

/* ── Editor return sidebar button ───────────────────────── */
.editor-return-btn {
  display: block; width: 100%; text-align: center;
  padding: 9px; margin-bottom: 10px;
  background: #1d3a2e; color: #5cd68c;
  border: 1px solid #2baa9e; border-radius: 8px;
  font-size: .84rem; font-weight: 700; text-decoration: none;
  transition: background .15s;
}
.editor-return-btn:hover { background: #1e4433; }
.editor-return-btn.hidden { display: none; }

/* ── Editor return banner ────────────────────────────────── */
#editorReturnBanner {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: #161b22; border: 1px solid #30363d; border-radius: 14px;
  padding: 12px 20px; display: flex; align-items: center; gap: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,.5); z-index: 9999;
  font-size: .88rem; color: #c9d1d9;
}
#editorReturnBanner a {
  background: #1d3a2e; color: #5cd68c;
  padding: 7px 14px; border-radius: 50px;
  font-weight: 700; font-size: .82rem; text-decoration: none;
  white-space: nowrap;
}
#editorReturnBanner a:hover { background: #1e4433; }

/* ── PWA : bannière mise à jour ──────────────────────────── */
#pwaUpdateBanner {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: #1c2a1e;
  border-bottom: 2px solid #2baa9e;
  color: #e6edf3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  padding-top: calc(9px + env(safe-area-inset-top, 0px));
  font-size: .84rem;
  z-index: 99999;
}
#pwaUpdateBanner button {
  background: #2baa9e; color: #fff;
  border: none; border-radius: 6px;
  padding: 5px 14px; font-size: .82rem; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}

/* ── PWA : bannière installation ─────────────────────────── */
#pwaInstallBanner {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  left: 12px; right: 12px;
  background: #161b22;
  border: 1px solid #2baa9e55;
  border-radius: 14px;
  color: #e6edf3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  z-index: 9998;
  box-shadow: 0 4px 24px #0009;
  animation: pwaSlideUp .3s ease;
}
@keyframes pwaSlideUp {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.pwa-install-icon { font-size: 1.6rem; line-height: 1; }
.pwa-install-text { flex: 1; min-width: 0; }
.pwa-install-text strong { display: block; font-size: .86rem; }
.pwa-install-text span   { font-size: .74rem; color: #8b949e; }
.pwa-install-actions {
  display: flex; flex-direction: column; align-items: stretch;
  gap: 4px; flex-shrink: 0;
}
.pwa-install-btn {
  background: #2baa9e; color: #fff;
  border: none; border-radius: 8px;
  padding: 7px 13px; font-size: .82rem; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.pwa-install-close {
  background: none; border: none; color: #8b949e;
  font-size: .74rem; cursor: pointer; padding: 3px;
  text-align: center;
}
.pwa-install-close:hover { color: #c9d1d9; }

/* ── PWA : modal iOS instructions ───────────────────────── */
#iosInstallModal .modal-box { max-width: 330px; }
.ios-install-steps { list-style: none; margin: 14px 0 0; }
.ios-install-steps li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0; font-size: .86rem; line-height: 1.45;
  border-bottom: 1px solid #21262d;
}
.ios-install-steps li:last-child { border-bottom: none; }
.ios-step-num {
  width: 22px; height: 22px; background: #2baa9e;
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: .72rem; font-weight: 700;
  flex-shrink: 0; margin-top: 2px;
}

/* ── Push notification banner ─────────────────────────────── */
#pushBanner {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #161b22; border: 1px solid #30363d; border-radius: 14px;
  padding: 12px 14px; display: flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,.5); z-index: 9999;
  max-width: 380px; width: calc(100vw - 32px);
  opacity: 0; transition: opacity .25s, transform .25s;
}
#pushBanner.push-banner-in { opacity: 1; transform: translateX(-50%) translateY(0); }
.push-banner-text { font-size: .82rem; color: #c9d1d9; flex: 1; line-height: 1.3; }
.push-banner-yes {
  background: #1d3a2e; color: #5cd68c; border: none; border-radius: 50px;
  padding: 7px 14px; font-size: .8rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.push-banner-yes:hover { background: #1e4433; }
.push-banner-no {
  background: transparent; color: #8b949e; border: none;
  padding: 7px 8px; font-size: .8rem; cursor: pointer; white-space: nowrap;
}
.push-banner-no:hover { color: #c9d1d9; }
