/* ========================================================
   LUDO KING CLUB — MULTIPLAYER CASUAL TOURNAMENT STYLES
   ======================================================== */

:root {
  --bg-deep: #0A0F24;
  --bg-card: #111836;
  --bg-card-inner: #0E1430;
  --bg-input: #0A1024;
  --border-line: #1E2A4A;
  --border-glow: #6B4EFF;

  --gold: #F59E0B;
  --gold-glow: #FBBF24;
  --green: #10B981;
  --red: #EF4444;
  --blue: #3B82F6;
  --yellow: #EAB308;
  --purple: #8B5CF6;

  --text-main: #FFFFFF;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-main);
  /* r214: Fix refresh screen move - revert to r208 stable 100% height, no dvh that causes jump when browser UI hides/shows */
  padding: 0;
  margin: 0;
}

body.app-body {
  display: flex;
  justify-content: center;
  align-items: center;
  /* r214: Fix refresh move - r208 stable centered, no vh/dvh that causes jump */
  padding: 0;
  margin: 0;
}

/* App Shell (Mobile Game Viewport) - r214: r208 stable 100% height, no dvh jump */
.app-shell {
  width: 100%;
  max-width: 480px;
  height: 100%;
  max-height: 920px;
  display: flex;
  flex-direction: column;
  background: var(--bg-deep);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

/* r212: Telegram - keep centered, no stretch, no fullscreen — matches r208 visual that user said was correct */
html.in-telegram body.app-body {
  justify-content: center;
  align-items: center;
  padding: 0;
}
html.in-telegram .app-shell {
  max-width: 480px;
  max-height: 920px;
  height: 100%;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  border-radius: 0;
}
html.in-telegram.is-fullscreen body.app-body {
  justify-content: center;
  align-items: center;
  padding: 0;
}
html.in-telegram.is-fullscreen .app-shell {
  max-width: 480px;
  max-height: 920px;
  height: 100%;
  /* Use transform to make fixed children relative to app, not phone (per PR #2515 pattern) */
  position: relative;
}
html.in-telegram.is-fullscreen {
  /* When fullscreen, add top inset via CSS var with fallback */
}

/* ==========================================
   TOP HEADER
   ========================================== */
.app-header {
  height: 60px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  /* r212: Revert to r208 fixed visual - no safe-area extra top gap, user complained empty space at top */
  z-index: 50;
  flex-shrink: 0;
  box-sizing: border-box;
}

.player-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 3px 10px 3px 3px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(15,23,42,.55) 55%, rgba(76,29,149,.22));
  border: 1px solid rgba(196,181,253,.38);
  box-shadow:
    0 5px 0 rgba(49,46,129,.55),
    0 10px 18px rgba(0,0,0,.38),
    inset 0 1px 0 rgba(255,255,255,.22);
  transform: perspective(220px) rotateX(8deg);
  transform-style: preserve-3d;
  transition: transform .12s ease, box-shadow .12s ease;
}
.player-pill:active {
  transform: perspective(220px) rotateX(4deg) translateY(2px);
  box-shadow:
    0 2px 0 rgba(49,46,129,.55),
    0 6px 12px rgba(0,0,0,.3),
    inset 0 1px 0 rgba(255,255,255,.18);
}

.player-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(160deg, #E9D5FF, #7C3AED 60%, #4C1D95);
  border: 1px solid rgba(255,255,255,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  overflow: hidden;
  box-shadow:
    0 3px 0 rgba(30,27,75,.7),
    0 6px 10px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.4);
}

.player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.player-name {
  font-size: 13px;
  font-weight: 900;
  color: #FFF;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-uid-tag {
  font-size: 10px;
  color: #9AA3C7;
  font-weight: 800;
  font-family: monospace;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.token-balance-chip {
  background: rgba(107,78,255,0.12);
  border: 1px solid rgba(107,78,255,0.22);
  padding: 6px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: transform 0.1s;
}

.token-balance-chip:active {
  transform: scale(0.96);
}

.usdt-icon {
  font-size: 15px;
}

/* r115: coin icon */
.coin-ico { font-size: 1em; line-height: 1; vertical-align: -0.05em; display: inline-block; }
.usdt-logo {
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
  border-radius: 50%;
  object-fit: cover;
  background: #0B1220;
  display: inline-block;
}

.token-val {
  font-size: 13px;
  font-weight: 900;
  color: #FFF;
  font-family: monospace;
}

.token-curr {
  font-size: 8.5px; /* r94: fits "Virtual USDT" in the chip */
  color: var(--text-muted);
  font-weight: 800;
}

.btn-plus-icon {
  background: var(--green);
  color: #000;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  margin-left: 2px;
}

.btn-role-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #000;
  font-size: 11px;
  font-weight: 900;
  padding: 6px 11px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  white-space: nowrap;
  letter-spacing: 0.3px;
  transition: transform 0.15s ease;
}

.btn-role-switch:hover {
  transform: translateY(-1px);
}

.btn-role-switch:active {
  transform: scale(0.96);
}


.btn-sound-icon {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-line);
  color: #FFF;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
}

/* ==========================================
   MAIN CONTENT SCREENS
   ========================================== */
.app-content {
  flex: 1;
  position: relative;
  overflow: hidden;
  /* r212: Revert to r208 fixed visual - no safe-area */
  box-sizing: border-box;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  padding: 14px;
  /* r212: Revert to r208 - simple 14px padding, no extra bottom gap */
  overflow-y: auto;
  gap: 14px;
  box-sizing: border-box;
}

.screen.active {
  display: flex;
}

/* ==========================================
   TAB 1: LOBBY & ARENA STYLES
   ========================================== */
.hero-event-banner {
  background: linear-gradient(135deg, #1A1E3A 0%, #1F2344 100%);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.heb-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.heb-badge {
  align-self: flex-start;
  background: rgba(245, 158, 11, 0.25);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 9px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.heb-title {
  font-size: 17px;
  font-weight: 900;
  color: #FFF;
}

.heb-desc {
  font-size: 11px;
  color: #CBD5E1;
  line-height: 1.3;
}

.heb-badge-trophy {
  font-size: 38px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

.section-heading {
  font-size: 12px;
  font-weight: 900;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 2px;
}

.game-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mode-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-line);
  border-radius: 16px;
  padding: 14px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.mode-card.active {
  border-color: rgba(107,78,255,0.5);
  background: linear-gradient(145deg, #1A1E38 0%, #1F2344 100%);
  box-shadow: 0 4px 16px rgba(107,78,255,0.18);
}

.mc-icon {
  font-size: 24px;
}

.mc-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mc-title {
  font-size: 13px;
  font-weight: 900;
  color: #FFF;
}

.mc-sub {
  font-size: 10px;
  color: var(--text-muted);
}

.mc-check {
  position: absolute;
  top: 8px;
  right: 10px;
  color: var(--green);
  font-weight: 900;
  font-size: 12px;
  display: none;
}

.mode-card.active .mc-check {
  display: block;
}

/* Tier Rooms */
.tier-rooms-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.room-pill {
  background: var(--bg-card);
  border: 1.5px solid var(--border-line);
  border-radius: 14px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.room-pill.active {
  border-color: rgba(107,78,255,0.55);
  background: linear-gradient(145deg, #1E2142 0%, #25294E 100%);
  box-shadow: 0 4px 14px rgba(107,78,255,0.18);
  transform: translateY(-1px);
}

.rp-tag {
  font-size: 9px;
  font-weight: 900;
  color: var(--text-muted);
}

.room-pill.active .rp-tag {
  color: #A99CFF;
}

.rp-entry {
  font-size: 14px;
  font-weight: 900;
  color: #FFF;
}

.rp-prize {
  font-size: 9px;
  color: var(--green);
  font-weight: 800;
}

/* Match Calculation Box */
.match-summary-card {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-line);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.msc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
}

.msc-row strong {
  color: #FFF;
  font-weight: 800;
}

.msc-row.msc-fee {
  border-top: 1px solid #17213C;
  padding-top: 5px;
  font-size: 11px;
  color: var(--text-dim);
}

.color-gold { color: var(--gold) !important; }
.color-green { color: var(--green) !important; }
.color-blue { color: var(--blue) !important; }
.color-purple { color: #A78BFA !important; }

/* PLAY HERO BUTTON */
.btn-play-hero {
  background: linear-gradient(135deg, #059669 0%, #10B981 50%, #34D399 100%);
  color: #022C22;
  border: none;
  border-radius: 16px;
  padding: 16px;
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  transition: transform 0.1s;
  letter-spacing: 0.5px;
}

.btn-play-hero:active {
  transform: scale(0.98);
}

/* Lobby screen: app-like, no vertical scroll */
#screen-lobby {
  overflow-y: hidden;
  padding: 10px;
  gap: 8px;
}
#screen-lobby .hero-event-banner {
  padding: 10px 12px;
  border-radius: 14px;
}
#screen-lobby .heb-badge-trophy { font-size: 28px; }
#screen-lobby .heb-title { font-size: 14px; }
#screen-lobby .heb-desc { font-size: 10px; }
#screen-lobby .section-heading { font-size: 11px; margin-top: 0; }
#screen-lobby .game-mode-grid { gap: 8px; }
#screen-lobby .mode-card { padding: 10px; border-radius: 12px; gap: 8px; }
#screen-lobby .mc-icon { font-size: 20px; }
#screen-lobby .mc-title { font-size: 12px; }
#screen-lobby .mc-sub { font-size: 9px; }
#screen-lobby .room-pills-container { gap: 8px; }
#screen-lobby .room-pill { padding: 8px 4px; border-radius: 10px; gap: 2px; }
#screen-lobby .rp-entry { font-size: 12px; }
#screen-lobby .rp-prize { font-size: 8px; }
#screen-lobby .match-summary-card { padding: 8px 10px; border-radius: 10px; }
#screen-lobby .msc-row { font-size: 11px; padding: 3px 0; }
#screen-lobby .btn-play-hero {
  padding: 12px;
  font-size: 14px;
  border-radius: 12px;
  flex-shrink: 0;
}
/* Friends screen: also compact */
#screen-friends {
  overflow-y: auto;
  padding: 10px;
  gap: 8px;
}

.bph-icon {
  font-size: 22px;
}

/* ==========================================
   TAB 2: STORE
   ========================================== */
.token-balance-showcase {
  background:
    radial-gradient(circle at 50% 0%, rgba(107,78,255,0.16), transparent 40%),
    linear-gradient(145deg, #171C36 0%, #101534 100%);
  border: 1px solid rgba(107,78,255,0.14);
  border-radius: 20px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.05);
}

.tbs-lbl {
  font-size: 10px;
  font-weight: 700;
  color: #A99CFF;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(107,78,255,0.10);
  border: 1px solid rgba(107,78,255,0.16);
  padding: 3px 8px;
  border-radius: 999px;
}

.tbs-num-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tbs-icon {
  font-size: 28px;
}

.tbs-val {
  font-size: 34px;
  font-weight: 950;
  color: #F8C75B;
  font-family: monospace;
  letter-spacing: -1px;
  text-shadow: 0 2px 12px rgba(248,199,91,0.18);
}

.tbs-curr {
  font-size: 12px; /* r94: fits "Virtual USDT" */
  color: #FFF;
  font-weight: 800;
}

.player-uid-box {
  background: rgba(22,26,46,0.96);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(0,0,0,0.16);
}

.pub-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pub-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 800;
}

.pub-val {
  font-size: 15px;
  font-weight: 900;
  color: var(--gold);
  font-family: monospace;
}

.btn-copy-id {
  background: #6B4EFF;
  color: #FFF;
  border: none;
  font-size: 11px;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(107,78,255,0.28);
}


/* ==========================================
   TAB 3: PROFILE STYLES
   ========================================== */
.profile-header-card {
  background:
    radial-gradient(circle at 88% 12%, rgba(107,78,255,0.16), transparent 34%),
    linear-gradient(145deg, #171C36 0%, #101534 100%);
  border: 1px solid rgba(107,78,255,0.14);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.05);
}

.phc-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(145deg, #23284A, #1A1E38);
  border: 2px solid rgba(107,78,255,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(107,78,255,0.18);
}

.phc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phc-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.phc-name {
  font-size: 16px;
  font-weight: 900;
  color: #FFF;
}

.phc-email {
  font-size: 11px;
  color: var(--text-muted);
}

.phc-uid-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--gold);
}

.btn-copy-sm {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-line);
  color: #FFF;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ps-card {
  background: rgba(22,26,46,0.96);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.16);
}

.ps-lbl {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
}

.ps-val {
  font-size: 18px;
  font-weight: 900;
}

.payout-wallet-card {
  background: rgba(22,26,46,0.96);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 16px rgba(0,0,0,0.14);
}
.btn-logout-card {
  background: rgba(239, 68, 68, 0.10);
  color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, 0.22);
  padding: 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  margin-top: 10px;
  width: 100%;
}
/* ===== PROFILE GLOBAL — full redesign (not just polish) ===== */
.profile-global {
  gap: 14px;
  padding: 0 0 14px 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(107,78,255,0.08), transparent 42%),
    var(--bg-deep);
  overflow-y: auto;
}
.profile-hero {
  position: relative;
  overflow: visible;
  border-radius: 0 0 24px 24px;
  background: linear-gradient(145deg, #171C36 0%, #0F1330 70%, #0A0F24 100%);
  border: 1px solid rgba(107,78,255,0.14);
  border-top: 0;
  box-shadow: 0 10px 28px rgba(0,0,0,0.32);
  padding: 22px 16px 18px;
  margin-top: -1px;
}
.profile-hero-bg {
  position: absolute;
  inset: 0;
  border-radius: 0 0 24px 24px;
  background:
    radial-gradient(circle at 72% 18%, rgba(107,78,255,0.22), transparent 34%),
    radial-gradient(circle at 18% 92%, rgba(59,130,246,0.10), transparent 28%),
    linear-gradient(90deg, rgba(107,78,255,0.06), transparent 60%);
  pointer-events: none;
}
.profile-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.ph-hero-avatar-wrap {
  position: relative;
  cursor: pointer;
  display: inline-block;
}
.ph-hero-avatar {
  width: 78px;
  height: 78px;
  border-radius: 22px;
  background: linear-gradient(145deg, #23284A, #1A1E38);
  border: 3px solid rgba(107,78,255,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(107,78,255,0.22), inset 0 1px 0 rgba(255,255,255,0.06);
}
.ph-hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ph-hero-edit {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #6B4EFF;
  color: #FFF;
  border-radius: 50%;
  font-size: 13px;
  border: 2px solid #0F1330;
  box-shadow: 0 4px 12px rgba(107,78,255,0.32);
}
.ph-hero-name {
  font-size: 20px;
  font-weight: 950;
  color: #FFF;
  letter-spacing: -0.4px;
  margin-top: 4px;
}
.ph-hero-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 11px;
  color: #9AA3C7;
}
.ph-hero-email { color: #9AA3C7; font-size: 11px; }
.ph-hero-uid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 6px 10px;
  border-radius: 999px;
}
.ph-uid-label { font-size: 9px; font-weight: 800; color: #9AA3C7; letter-spacing: 0.8px; text-transform: uppercase; }
.ph-uid-val { font-family: monospace; font-size: 12px; font-weight: 900; color: #F8C75B; }
.ph-copy-btn {
  background: #6B4EFF;
  color: #FFF;
  border: none;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(107,78,255,0.28);
}
.btn-change-avatar-hero {
  margin-top: 8px;
  background: rgba(107,78,255,0.10);
  border: 1px solid rgba(107,78,255,0.18);
  color: #A99CFF;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.profile-stats-global {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 14px;
}
.psg-card {
  background: rgba(22,26,46,0.96);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.16);
}
.psg-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #6B4EFF, #8B7CF6);
  opacity: 0.9;
}
.psg-icon { font-size: 18px; }
.psg-lbl { font-size: 9px; font-weight: 800; color: #9AA3C7; text-transform: uppercase; letter-spacing: 0.6px; }
.psg-val { font-size: 18px; font-weight: 950; color: #FFF; display: flex; align-items: baseline; gap: 4px; }
.psg-val small { font-size: 10px; color: #9AA3C7; font-weight: 800; }
.psg-balance .psg-val { color: #F8C75B; }
.profile-wallet-card { margin: 0 14px; }
.history-card {
  margin: 0 14px;
  background: rgba(22,26,46,0.96);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.14);
}
.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.history-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
  color: #E2E8F0;
}
.history-title small { font-size: 10px; color: #64748B; font-weight: 700; margin-left: 4px; }
.history-refresh {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #9AA3C7;
  font-size: 10px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: none;
  overflow-y: visible;
}
.history-empty {
  text-align: center;
  padding: 18px 0;
  color: #64748B;
  font-size: 11px;
}
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 10px 12px;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.history-item:hover { border-color: rgba(107,78,255,0.14); transform: translateY(-1px); }
.history-item-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.history-item-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.history-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid transparent;
}
.history-badge-win { background: rgba(16,185,129,0.12); color: #6EE7B7; border-color: rgba(16,185,129,0.22); }
.history-badge-loss { background: rgba(239,68,68,0.10); color: #FCA5A5; border-color: rgba(239,68,68,0.18); }
.history-badge-dep { background: rgba(16,185,129,0.10); color: #10B981; border-color: rgba(16,185,129,0.18); }
.history-badge-wdr { background: rgba(239,68,68,0.10); color: #EF4444; border-color: rgba(239,68,68,0.18); }
.history-item-title { font-size: 11px; font-weight: 800; color: #E2E8F0; }
.history-item-sub { font-size: 10px; color: #94A3B8; }
.history-item-amt { font-size: 13px; font-weight: 950; white-space: nowrap; }
.history-amt-pos { color: #10B981; }
.history-amt-neg { color: #EF4444; }

/* ==========================================
   IN-GAME ARENA & LUDO BOARD
   ========================================= */
.game-hud-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 12px;
  padding: 8px 12px;
  flex-shrink: 0;
}

.btn-leave-hud {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.hud-room-tag {
  font-size: 10px;
  color: var(--text-muted);
  font-family: monospace;
}

.hud-pot-tag {
  font-size: 13px;
  color: var(--gold);
}

.hud-fee-tag {
  font-size: 10px;
  color: var(--text-dim);
}

/* Board Arena Wrapper */
.board-arena-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 440px;
  margin: 0 auto;
  background: #060914;
  border: 2px solid #1E284C;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.ludo-board-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.board-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.tokens-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* 4-Corner Pods */
.player-corner-pod {
  position: absolute;
  z-index: 10;
  background: rgba(11, 17, 38, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(4px);
  width: 38%;
}

.pod-sky, .pod-blue { top: 6px; left: 6px; border-color: rgba(56, 189, 248, 0.5); }
.pod-green { top: 6px; right: 6px; border-color: rgba(16, 185, 129, 0.5); }
.pod-red { bottom: 6px; left: 6px; border-color: rgba(239, 68, 68, 0.5); }
.pod-yellow { bottom: 6px; right: 6px; border-color: rgba(234, 179, 8, 0.5); }

.player-corner-pod.turn-active {
  border-color: #FFF !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
  animation: pulsePod 1s infinite alternate;
}
@keyframes pulsePod {
  from { transform: scale(1); }
  to { transform: scale(1.03); }
}

.pcp-avatar {
  font-size: 16px;
}

.pcp-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pcp-name {
  font-size: 10px;
  font-weight: 900;
  color: #FFF;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pcp-score {
  font-size: 9px;
  color: var(--gold);
}

.turn-timer-line {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2.5px;
  width: 0%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.5s linear;
}

/* Pawns */
.pawn {
  position: absolute;
  width: 5.9%;
  height: 5.9%;
  margin-left: -2.95%;
  margin-top: -2.95%;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.45), inset 0 -3px 4px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
  cursor: pointer;
  transition: left 0.12s linear, top 0.12s linear,
              width 0.15s ease, height 0.15s ease, margin 0.15s ease;
  z-index: 20;
}

/* Pawns sharing one cell (safe star / start cell): shrunk + fanned out by game.js */
.pawn.crowded {
  border-width: 1.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.42), inset 0 -2px 3px rgba(0, 0, 0, 0.25);
}
.pawn.crowded.movable {
  box-shadow: 0 0 10px #FFD700, inset 0 -2px 3px rgba(0, 0, 0, 0.25);
}


.pawn-sky, .pawn-blue { background: radial-gradient(circle at 32% 28%, #E0F5FF 0%, #38BDF8 45%, #075985 100%); }
.pawn-green { background: radial-gradient(circle at 32% 28%, #D8FFE9 0%, #22C55E 45%, #166534 100%); }
.pawn-red { background: radial-gradient(circle at 32% 28%, #FFE4E4 0%, #EF4444 45%, #991B1B 100%); }
.pawn-yellow { background: radial-gradient(circle at 32% 28%, #FFF7D6 0%, #FACC15 45%, #A16207 100%); }

.pawn.movable {
  animation: hopAnim 0.55s infinite alternate;
  border-color: #FFD700;
  box-shadow: 0 0 14px #FFD700, inset 0 -3px 4px rgba(0, 0, 0, 0.28);
  z-index: 30;
}
@keyframes hopAnim {
  from { transform: scale(1); }
  to { transform: scale(1.22) translateY(-9%); }
}

/* hop-by-hop travel effect */
.pawn.hop { animation: pawnHopAnim 0.17s ease; }
@keyframes pawnHopAnim {
  0% { transform: scale(1); }
  45% { transform: scale(1.26) translateY(-16%); }
  100% { transform: scale(1); }
}
.pawn.moving { z-index: 48; }

/* Game Controls Deck */
.game-controls-deck {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.turn-prompt-text {
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  color: var(--gold);
  min-height: 18px;
}

.dice-roll-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

/* 3D Dice */
.dice-box {
  width: 52px;
  height: 52px;
  background: #FFFFFF;
  border-radius: 12px;
  border: 2px solid #E2E8F0;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s;
}

.dice-box:active {
  transform: scale(0.92);
}

.dice-box.rolling {
  animation: rollShake 0.45s linear infinite;
}
@keyframes rollShake {
  0% { transform: rotate(0deg) scale(1.05); }
  25% { transform: rotate(90deg) scale(0.95); }
  50% { transform: rotate(180deg) scale(1.05); }
  75% { transform: rotate(270deg) scale(0.95); }
  100% { transform: rotate(360deg) scale(1.05); }
}

.dice-face {
  width: 100%;
  height: 100%;
  position: relative;
}

.dot {
  position: absolute;
  width: 9px;
  height: 9px;
  background: #0F172A;
  border-radius: 50%;
}

.dot-center { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.dot-top-left { top: 7px; left: 7px; }
.dot-top-right { top: 7px; right: 7px; }
.dot-bottom-left { bottom: 7px; left: 7px; }
.dot-bottom-right { bottom: 7px; right: 7px; }
.dot-mid-left { top: 50%; left: 7px; transform: translateY(-50%); }
.dot-mid-right { top: 50%; right: 7px; transform: translateY(-50%); }

.btn-roll-hero {
  background: linear-gradient(135deg, #059669 0%, #10B981 100%);
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-roll-hero:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #334155;
  color: #94A3B8;
  box-shadow: none;
}

.emotes-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.em-btn {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-line);
  color: #FFF;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

.chat-toast-msg {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--gold);
  min-height: 14px;
}

/* ==========================================
   BOTTOM NAVIGATION BAR
   ========================================== */
.bottom-nav-bar {
  height: 72px;
  /* r212: Revert to r208 fixed visual - 72px, no extra bottom gap */
  background: var(--bg-card);
  border-top: 1px solid var(--border-line);
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  flex-shrink: 0;
  z-index: 50;
  box-sizing: border-box;
}

.b-tab {
  position: relative;
  flex: 1;
  min-height: 64px;
  height: 100%;
  background: transparent;
  border: none;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 0 8px;
  cursor: pointer;
  transition: color 0.15s;
}

.b-tab.active {
  color: #8B7CF6;
}

.bt-icon {
  font-size: 20px;
  line-height: 1;
}

.bt-label {
  font-size: 11px;
  font-weight: 800;
}

/* ==========================================
   r178: COLOURFUL "4D" NAV ICON TILES
   The Reward screen's design language — a saturated gradient tile, a coloured
   glow, an inset top highlight for depth, and a light sheen that sweeps the
   active tab — applied to all five tabs so they read as one set. Every tab
   keeps its own hue, and the Home tab is no longer a differently sized "hero"
   button, which is what made the row look uneven.
   ========================================== */
.b-tab .bt-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  overflow: hidden;
  background: linear-gradient(180deg, #475569, #1E293B);
  box-shadow: 0 6px 14px rgba(2, 6, 23, .45), inset 0 1px 0 rgba(255, 255, 255, .22);
  filter: saturate(.8) brightness(.96);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
/* light sheen — the same idea as the Reward screen's rwSheen */
.b-tab .bt-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 36%, rgba(255, 255, 255, .45) 50%, transparent 64%);
  background-size: 260% 100%;
  opacity: 0;
  pointer-events: none;
}
.b-tab.active .bt-icon {
  filter: none;
  transform: translateY(-2px);
}
.b-tab.active .bt-icon::after {
  opacity: 1;
  animation: tabSheen 2.6s ease-in-out infinite;
}
.b-tab:active .bt-icon { transform: scale(.94); }
@keyframes tabSheen {
  0%   { background-position: 140% 0; }
  100% { background-position: -140% 0; }
}

.b-tab-friends .bt-icon {
  background: linear-gradient(180deg, #5EEAD4, #0D9488);
  box-shadow: 0 7px 16px rgba(13, 148, 136, .45), 0 0 15px rgba(94, 234, 212, .32), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.b-tab-friends.active { color: #5EEAD4; }

.b-tab-earn .bt-icon {
  background: linear-gradient(180deg, #FCD34D, #F59E0B);
  box-shadow: 0 7px 16px rgba(245, 158, 11, .45), 0 0 15px rgba(252, 211, 77, .32), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.b-tab-earn.active { color: #FCD34D; }

.b-tab-home .bt-icon {
  background: linear-gradient(180deg, #A78BFA, #6D28D9);
  box-shadow: 0 7px 16px rgba(109, 40, 217, .45), 0 0 15px rgba(167, 139, 250, .32), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.b-tab-home.active { color: #C4B5FD; }

.b-tab-reward .bt-icon {
  background: linear-gradient(180deg, #38BDF8, #2563EB);
  box-shadow: 0 7px 16px rgba(37, 99, 235, .45), 0 0 15px rgba(56, 189, 248, .32), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.b-tab-reward.active { color: #7DD3FC; }

/* Profile keeps the signed-in player's own photo (r174/r175), now framed by a
   gradient ring in the same tile language instead of a plain circle. */
.b-tab-profile .bt-icon {
  padding: 3px;
  background: linear-gradient(180deg, #7DD3FC, #6366F1);
  box-shadow: 0 7px 16px rgba(99, 102, 241, .45), 0 0 15px rgba(125, 211, 252, .32), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.b-tab-profile.active { color: #DDD6FE; }
.b-tab-profile .bt-icon img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  pointer-events: none;
  border: 1.5px solid rgba(7, 13, 27, .85);
}

@media (prefers-reduced-motion: reduce) {
  .bottom-nav-bar .bt-icon,
  .bottom-nav-bar .bt-icon::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================
   TELEGRAM AUTH MODAL GATE
   ========================================== */
.auth-gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 16, 0.94);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.auth-gate-overlay.active {
  display: flex;
}
html.boot-authed .auth-gate-overlay {
  display: none !important;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: linear-gradient(160deg, #101833 0%, #162044 100%);
  border: 1px solid #23315D;
  border-radius: 24px;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  animation: zoomAuth 0.25s ease-out;
}
@keyframes zoomAuth {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.brand-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.brand-dice-icon {
  font-size: 42px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}

.brand-title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.brand-title span {
  color: var(--green);
}

.brand-tagline {
  font-size: 12px;
  color: var(--text-muted);
}

.auth-perks {
  width: 100%;
  background: var(--bg-card-inner);
  border: 1px solid var(--border-line);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.perk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 800;
  color: #CBD5E1;
}

.perk-icon {
  font-size: 14px;
}


.setup-notice-badge {
  font-size: 11px;
  font-weight: 800;
  color: #F59E0B;
  margin-bottom: 4px;
}

.setup-notice-text {
  font-size: 10.5px;
  color: #CBD5E1;
  line-height: 1.4;
  margin: 0 0 8px 0;
}

.btn-admin-setup-link {
  display: inline-block;
  background: rgba(245, 158, 11, 0.2);
  color: #FCD34D;
  border: 1px solid rgba(245, 158, 11, 0.5);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-admin-setup-link:hover {
  background: rgba(245, 158, 11, 0.35);
  color: #FFF;
}

.btn-guest-connect {
  background: transparent;
  border: 1px solid var(--border-line);
  color: var(--text-muted);
  padding: 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-guest-connect:hover {
  color: #FFF;
  border-color: var(--gold);
}

.auth-status-text {
  font-size: 11px;
  color: var(--gold);
  font-weight: 800;
  min-height: 14px;
  text-align: center;
}

.auth-disclaimer {
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.35;
}

/* ==========================================
   MODALS (WAITING & VICTORY)
   ========================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 15, 0.88);
  backdrop-filter: blur(6px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.match-search-modal {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 20px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
}
/* ===== 4 LARGE PROFESSIONAL RESULT MODALS — Win / Loss / Life / Back ===== */
.result-modal {
  width: 100%;
  max-width: 420px;
  border-radius: 24px;
  padding: 28px 22px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.06);
}
.result-modal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% -10%, rgba(255,255,255,0.07), transparent 60%);
  pointer-events: none;
}
.modal-win {
  background: linear-gradient(145deg, #0F2A22 0%, #0A1F1A 55%, #0F2E1F 100%);
  border: 1.5px solid rgba(16,185,129,0.38);
  box-shadow: 0 24px 64px rgba(0,0,0,0.72), 0 0 42px rgba(16,185,129,0.16), inset 0 1px 0 rgba(255,255,255,0.07);
}
.modal-loss {
  background: linear-gradient(145deg, #1B1230 0%, #13102A 55%, #1A1435 100%);
  border: 1.5px solid rgba(139,92,246,0.32);
  box-shadow: 0 24px 64px rgba(0,0,0,0.72), 0 0 42px rgba(139,92,246,0.14), inset 0 1px 0 rgba(255,255,255,0.06);
}
.modal-life {
  background: linear-gradient(145deg, #2A0F14 0%, #1C0A0F 55%, #2E0F16 100%);
  border: 1.5px solid rgba(239,68,68,0.36);
  box-shadow: 0 24px 64px rgba(0,0,0,0.72), 0 0 42px rgba(239,68,68,0.15), inset 0 1px 0 rgba(255,255,255,0.06);
}
.modal-back {
  background: linear-gradient(145deg, #2A1F0A 0%, #1E1505 55%, #2E1F08 100%);
  border: 1.5px solid rgba(245,158,11,0.34);
  box-shadow: 0 24px 64px rgba(0,0,0,0.72), 0 0 42px rgba(245,158,11,0.13), inset 0 1px 0 rgba(255,255,255,0.06);
}
.result-confetti {
  position: absolute;
  inset: -20px;
  background:
    radial-gradient(circle at 15% 20%, rgba(251,191,36,0.18) 0 2px, transparent 3px),
    radial-gradient(circle at 85% 18%, rgba(16,185,129,0.16) 0 2px, transparent 3px),
    radial-gradient(circle at 30% 90%, rgba(56,189,248,0.13) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 70% 85%, rgba(251,146,60,0.13) 0 1.5px, transparent 2.5px);
  animation: confettiFloat 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes confettiFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.result-icon-wrap {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  position: relative;
  z-index: 1;
  border: 1.5px solid rgba(255,255,255,0.12);
}
.win-glow { background: radial-gradient(circle at 35% 30%, rgba(16,185,129,0.28), rgba(16,185,129,0.08) 70%); border-color: rgba(16,185,129,0.45); box-shadow: 0 0 28px rgba(16,185,129,0.35), inset 0 1px 0 rgba(255,255,255,0.18); animation: winPulse 1.6s ease-in-out infinite alternate; }
.loss-glow { background: radial-gradient(circle at 35% 30%, rgba(139,92,246,0.22), rgba(139,92,246,0.07) 70%); border-color: rgba(139,92,246,0.38); box-shadow: 0 0 24px rgba(139,92,246,0.28); }
.life-glow { background: radial-gradient(circle at 35% 30%, rgba(239,68,68,0.28), rgba(239,68,68,0.08) 70%); border-color: rgba(239,68,68,0.42); box-shadow: 0 0 28px rgba(239,68,68,0.32); animation: lifePulse 1.2s ease-in-out infinite alternate; }
.back-glow { background: radial-gradient(circle at 35% 30%, rgba(245,158,11,0.24), rgba(245,158,11,0.07) 70%); border-color: rgba(245,158,11,0.42); box-shadow: 0 0 24px rgba(245,158,11,0.26); }
@keyframes winPulse { from { transform: scale(1); } to { transform: scale(1.06); } }
@keyframes lifePulse { from { transform: scale(1); box-shadow: 0 0 28px rgba(239,68,68,0.32); } to { transform: scale(1.05); box-shadow: 0 0 36px rgba(239,68,68,0.42); } }

.result-kicker { font-size: 9.5px; font-weight: 950; letter-spacing: 1.8px; padding: 4px 10px; border-radius: 20px; z-index: 1; }
.kicker-win { color: #6EE7B7; background: rgba(16,185,129,0.14); border: 1px solid rgba(16,185,129,0.32); }
.kicker-loss { color: #C4B5FD; background: rgba(139,92,246,0.13); border: 1px solid rgba(139,92,246,0.28); }
.kicker-life { color: #FECACA; background: rgba(239,68,68,0.16); border: 1px solid rgba(239,68,68,0.32); }
.kicker-back { color: #FDE68A; background: rgba(245,158,11,0.14); border: 1px solid rgba(245,158,11,0.30); }

.result-title { font-size: 26px; font-weight: 950; letter-spacing: -0.5px; margin: 2px 0 0; z-index: 1; line-height: 1.1; }
.modal-win .result-title { color: #ECFDF5; text-shadow: 0 0 18px rgba(16,185,129,0.45); }
.modal-loss .result-title { color: #EDE9FE; }
.modal-life .result-title { color: #FEE2E2; }
.modal-back .result-title { color: #FFFBEB; }

.result-sub { font-size: 12.5px; font-weight: 600; line-height: 1.55; z-index: 1; margin: 0; }
.modal-win .result-sub { color: #A7F3D0; }
.modal-loss .result-sub { color: #DDD6FE; }
.modal-life .result-sub { color: #FECACA; }
.modal-back .result-sub { color: #FDE68A; }
.result-sub strong { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.victory-modal { /* keep legacy class for existing JS but now delegates to result-modal */
  width: 100%;
  max-width: 420px;
}

.radar-pulse-ring {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: radarPing 1.2s infinite ease-out;
}
@keyframes radarPing {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 16px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.radar-center {
  font-size: 26px;
}

.prize-tag {
  background: rgba(245, 158, 11, 0.2);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 12px;
  font-weight: 900;
  padding: 4px 12px;
  border-radius: 12px;
}

.btn-cancel-search {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-line);
  color: var(--red);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 4px;
}

/* Victory */
.trophy-bounce {
  font-size: 48px;
  animation: bounceTrophy 0.8s infinite alternate ease-in-out;
}
@keyframes bounceTrophy {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

.vic-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--gold);
}

.vic-winner {
  font-size: 13px;
  color: var(--text-muted);
}

.vic-stats-card {
  width: 100%;
  background: var(--bg-card-inner);
  border: 1px solid var(--border-line);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.vsc-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.vsc-net {
  border-top: 1px solid #1E284C;
  padding-top: 6px;
  font-weight: 900;
}

.btn-back-lobby {
  width: 100%;
  background: linear-gradient(135deg, #059669 0%, #10B981 100%);
  color: #000;
  border: none;
  padding: 13px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.btn-admin-portal-link {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #000;
  text-decoration: none;
  padding: 13px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-admin-portal-link:hover {
  opacity: 0.95;
}

/* Toast */
.app-toast {
  position: fixed;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: #0F172A;
  border: 1px solid var(--border-line);
  color: #FFF;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transition: all 0.2s;
  pointer-events: none;
  z-index: 10000;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.app-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Permanent Player Name System */
.badge-locked {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.btn-set-name-mini {
  display: inline-flex;
  align-items: center;
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.5);
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-set-name-mini:hover {
  background: rgba(245, 158, 11, 0.25);
  transform: translateY(-1px);
}

.name-modal-box {
  width: 100%;
  max-width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 20px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.nm-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.nm-title {
  font-size: 17px;
  font-weight: 900;
  color: #FFF;
  margin: 0 0 8px 0;
}

.nm-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 16px 0;
}

.nm-input-group {
  width: 100%;
  text-align: left;
  margin-bottom: 16px;
}

.nm-label {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 6px;
}

.nm-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid var(--border-line);
  color: #FFF;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  outline: none;
  transition: border-color 0.2s;
}

.nm-input:focus {
  border-color: var(--gold);
}

.nm-err {
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  min-height: 16px;
  margin-top: 6px;
}

.nm-buttons {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-nm-save {
  width: 100%;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #000;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-nm-save:hover {
  opacity: 0.95;
}

.btn-nm-cancel {
  width: 100%;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-line);
  padding: 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-nm-cancel:hover {
  color: #FFF;
  background: rgba(255, 255, 255, 0.05);
}

/* ==========================================
   AVATAR PICKER MODAL & CARDS
   ========================================== */
.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  margin: 12px 0;
}

@media (max-width: 380px) {
  .avatar-picker-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.avatar-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  user-select: none;
}

.avatar-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: #38BDF8;
  transform: translateY(-2px);
}

.avatar-card.active {
  background: rgba(56, 189, 248, 0.12);
  border-color: #38BDF8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
}

.avatar-card.active::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  background: #38BDF8;
  color: #000;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-card-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  margin-bottom: 6px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.45));
}

.avatar-card-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #F8FAFC;
  margin-bottom: 4px;
  text-align: center;
}

.avatar-gender-tag {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.avatar-gender-tag.tag-boy {
  background: rgba(59, 130, 246, 0.18);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.avatar-gender-tag.tag-girl {
  background: rgba(236, 72, 153, 0.18);
  color: #F472B6;
  border: 1px solid rgba(236, 72, 153, 0.4);
}

/* Payout Wallet Card */
.payout-wallet-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.pwc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.pwc-title {
  font-size: 13px;
  color: #FFF;
  font-weight: 800;
}

.pwc-method {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dim);
}

.pwc-account {
  font-size: 15px;
  font-weight: 900;
  color: var(--green);
  font-family: monospace;
  letter-spacing: 0.5px;
}

.pwc-sub {
  font-size: 10px;
  color: var(--text-dim);
  margin: 4px 0 0 0;
  line-height: 1.4;
}

.pwc-empty-msg {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0 0 10px 0;
}

.btn-bind-wallet {
  width: 100%;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10B981;
  padding: 10px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-bind-wallet:hover {
  background: rgba(16, 185, 129, 0.25);
  transform: translateY(-1px);
}

/* Bangladesh MFS Chip Badges */

.mfs-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
  user-select: none;
}

.mfs-chip:hover {
  transform: translateY(-1px);
}

.mfs-chip-icon {
  height: 16px;
  width: auto;
  max-width: 36px;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}

.mfs-logo-img {
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}

/* Legacy MFS chips removed — USDT only */

/* Modal MFS Visual Method Grid */
.mfs-select-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
  margin-bottom: 12px;
}

.mfs-select-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  user-select: none;
}

.mfs-select-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
}

.mfs-select-card.active {
  background: rgba(245, 158, 11, 0.12);
  border-color: #F59E0B;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.mfs-card-logo {
  height: 24px;
  width: auto;
  max-width: 65px;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

.mfs-card-title {
  font-size: 11px;
  font-weight: 800;
  color: #F1F5F9;
}


.btn-admin-portal-link {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, #3B82F6, #1D4ED8);
  color: #FFF;
  font-size: 13px;
  font-weight: 800;
  padding: 12px;
  border-radius: 12px;
  text-decoration: none;
  margin: 10px 0;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  transition: all 0.2s ease;
}
.btn-admin-portal-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* ==========================================
   HOME DASHBOARD & MODE PICKER
   r147 visual effects — same IDs / copy / buttons.
   Navy glass + cyan glow + gold coins + motion.
   ========================================== */
.home-screen {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  padding: 12px 14px 18px;
  gap: 12px;
  background:
    radial-gradient(ellipse 80% 50% at 80% -10%, rgba(0,152,234,0.28), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 30%, rgba(37,99,235,0.18), transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(248,199,91,0.08), transparent 50%),
    linear-gradient(180deg, #070B16 0%, #0A1020 55%, #070B16 100%);
}

.home-fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.home-fx-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}
.home-fx-orb-a {
  width: 220px; height: 220px; top: -70px; right: -80px;
  background: radial-gradient(circle, rgba(0,152,234,0.45), rgba(0,152,234,0) 70%);
  animation: homeOrbA 9s ease-in-out infinite;
}
.home-fx-orb-b {
  width: 160px; height: 160px; top: 38%; left: -70px;
  background: radial-gradient(circle, rgba(56,189,248,0.28), rgba(37,99,235,0) 70%);
  animation: homeOrbB 11s ease-in-out infinite;
}
.home-fx-orb-c {
  width: 120px; height: 120px; bottom: 8%; right: 12%;
  background: radial-gradient(circle, rgba(248,199,91,0.18), rgba(248,199,91,0) 70%);
  animation: homeOrbC 8s ease-in-out infinite;
}
.home-fx-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(125,211,252,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125,211,252,0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 20%, transparent 75%);
  opacity: .7;
}
@keyframes homeOrbA {
  0%,100% { transform: translate(0,0) scale(1); opacity: .9; }
  50% { transform: translate(-18px, 22px) scale(1.12); opacity: 1; }
}
@keyframes homeOrbB {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(24px, -16px) scale(1.15); }
}
@keyframes homeOrbC {
  0%,100% { transform: translate(0,0); opacity: .55; }
  50% { transform: translate(-12px, -20px); opacity: .9; }
}

.home-screen > :not(.home-fx) { position: relative; z-index: 1; }

.home-welcome-card {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  padding: 22px 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(125, 211, 252, 0.38);
  background:
    radial-gradient(circle at 88% 12%, rgba(0,152,234,0.32), transparent 38%),
    radial-gradient(circle at 8% 92%, rgba(37,99,235,0.22), transparent 36%),
    linear-gradient(165deg, rgba(18, 28, 48, 0.82), rgba(8, 14, 28, 0.92));
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255,255,255,0.05),
    0 0 42px rgba(0,152,234,0.18),
    inset 0 1px 0 rgba(255,255,255,0.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.home-welcome-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,0.16) 46%, transparent 58%);
  background-size: 220% 100%;
  animation: homeSheen 5.5s ease-in-out infinite;
}
@keyframes homeSheen {
  0% { background-position: 160% 0; opacity: .35; }
  45% { opacity: .8; }
  100% { background-position: -80% 0; opacity: .35; }
}
.home-welcome-card::after {
  content: "";
  position: absolute;
  width: 240px; height: 240px;
  right: -90px; bottom: -130px;
  border: 1.5px solid rgba(125, 211, 252, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 26px rgba(56,189,248,0.06), 0 0 0 52px rgba(56,189,248,0.03);
  pointer-events: none;
  animation: homeRipple 6s ease-in-out infinite;
}
@keyframes homeRipple {
  0%,100% { transform: scale(1); opacity: .7; }
  50% { transform: scale(1.08); opacity: 1; }
}

.home-welcome-copy {
  position: relative;
  z-index: 1;
  max-width: 74%;
}
.home-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #7DD3FC;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.6px;
  margin-bottom: 12px;
  text-transform: uppercase;
  background: rgba(0,152,234,0.16);
  border: 1px solid rgba(125, 211, 252, 0.38);
  padding: 5px 11px;
  border-radius: 999px;
  box-shadow: 0 0 16px rgba(0,152,234,0.22);
  animation: homeKickerGlow 2.8s ease-in-out infinite;
}
@keyframes homeKickerGlow {
  0%,100% { box-shadow: 0 0 10px rgba(0,152,234,0.16); }
  50% { box-shadow: 0 0 22px rgba(0,152,234,0.45); }
}
.home-welcome-copy h1 {
  font-size: 26px;
  line-height: 1.08;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  font-weight: 950;
  color: #F8FAFC;
  text-shadow: 0 2px 18px rgba(0,0,0,0.35);
}
.home-welcome-copy h1 span {
  color: #7DD3FC;
  background: linear-gradient(90deg, #E0F2FE, #7DD3FC 40%, #38BDF8 80%, #F8C75B);
  background-size: 180% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: homeNameShine 4.5s linear infinite;
}
@keyframes homeNameShine {
  0% { background-position: 0% 50%; }
  100% { background-position: 180% 50%; }
}
.home-welcome-copy p {
  color: #B7C9DC;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.5;
  max-width: 94%;
}

.home-dice-orb {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 14px;
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 420px;
  -webkit-perspective: 420px;
}
.home-dice-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(125,211,252,0.4);
  box-shadow: 0 0 18px rgba(0,152,234,0.4);
  animation: homeDicePulse 1.8s ease-out infinite;
}
.home-dice-scene {
  width: 54px;
  height: 54px;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  animation: homeDiceFloat 2.6s ease-in-out infinite;
}
.home-dice-cube {
  position: relative;
  width: 54px;
  height: 54px;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  animation: homeDiceTumble 2.8s linear infinite;
}
.home-dface {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, #FFFFFF, #E8EEF7 70%, #D5DEEA);
  border: 1px solid rgba(255,255,255,0.85);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(15,23,42,0.08);
  backface-visibility: hidden;
}
.home-dface i {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #12213A;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.25);
}
.home-dface i.c { top: 50%; left: 50%; transform: translate(-50%,-50%); }
.home-dface i.tl { top: 8px; left: 8px; }
.home-dface i.tr { top: 8px; right: 8px; }
.home-dface i.bl { bottom: 8px; left: 8px; }
.home-dface i.br { bottom: 8px; right: 8px; }
.home-dface i.ml { top: 50%; left: 8px; transform: translateY(-50%); }
.home-dface i.mr { top: 50%; right: 8px; transform: translateY(-50%); }
.home-dface.f1 { transform: rotateY(0deg) translateZ(27px); }
.home-dface.f2 { transform: rotateY(180deg) translateZ(27px); }
.home-dface.f3 { transform: rotateY(90deg) translateZ(27px); }
.home-dface.f4 { transform: rotateY(-90deg) translateZ(27px); }
.home-dface.f5 { transform: rotateX(90deg) translateZ(27px); }
.home-dface.f6 { transform: rotateX(-90deg) translateZ(27px); }
@keyframes homeDiceTumble {
  0%   { transform: rotateX(0deg) rotateY(0deg) rotateZ(8deg); }
  16%  { transform: rotateX(90deg) rotateY(40deg) rotateZ(-6deg); }
  33%  { transform: rotateX(180deg) rotateY(90deg) rotateZ(10deg); }
  50%  { transform: rotateX(270deg) rotateY(160deg) rotateZ(-4deg); }
  66%  { transform: rotateX(360deg) rotateY(230deg) rotateZ(12deg); }
  83%  { transform: rotateX(450deg) rotateY(300deg) rotateZ(-8deg); }
  100% { transform: rotateX(720deg) rotateY(360deg) rotateZ(8deg); }
}
@keyframes homeDiceFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes homeDicePulse {
  0% { transform: scale(.85); opacity: .85; }
  100% { transform: scale(1.28); opacity: 0; }
}
.home-stat-flash {
  animation: homeStatFlash .45s ease-out;
}
@keyframes homeStatFlash {
  0% { transform: scale(1.18); filter: brightness(1.4); }
  100% { transform: none; filter: none; }
}

.home-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 6px;
  gap: 6px;
  border-radius: 20px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  background: rgba(12, 18, 34, 0.72);
  box-shadow: 0 12px 28px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.home-stat-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 7px;
  padding: 10px 4px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
}
.home-stat-item:first-child {
  background: rgba(248,199,91,0.08);
  box-shadow: inset 0 0 0 1px rgba(248,199,91,0.18);
}
.home-stat-icon { font-size: 18px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4)); }
.home-stat-item:first-child .home-stat-icon { animation: homeCoinSpin 5s ease-in-out infinite; }
@keyframes homeCoinSpin {
  0%,80%,100% { transform: rotateY(0deg); }
  90% { transform: rotateY(180deg); }
}
.home-stat-item div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}
.home-stat-item small {
  color: #8BA3B8;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}
.home-stat-item strong {
  color: #F8FAFC;
  font-size: 14px;
  font-weight: 900;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-stat-item:first-child strong {
  color: #F8C75B;
  text-shadow: 0 0 12px rgba(248,199,91,0.45);
}

.home-section-heading {
  color: #7DD3FC;
  font-size: 10px;
  font-weight: 900;
  margin-top: 4px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 0 12px rgba(56,189,248,0.35);
}
.home-section-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(125,211,252,0.55), transparent);
}

.home-mode-grid {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.home-mode-card {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 92px;
  padding: 16px;
  border-radius: 20px;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.home-mode-card:active { transform: scale(0.985); }
.home-mode-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.14) 48%, transparent 62%);
  background-size: 220% 100%;
  animation: homeSheen 4.8s ease-in-out infinite;
}
.home-mode-quick {
  background:
    radial-gradient(circle at 0% 50%, rgba(0,152,234,0.32), transparent 42%),
    linear-gradient(165deg, rgba(18, 32, 54, 0.92), rgba(8, 16, 32, 0.96));
  border: 1.5px solid rgba(125, 211, 252, 0.42);
  box-shadow:
    0 16px 32px rgba(0,0,0,0.32),
    0 0 28px rgba(0,152,234,0.22),
    inset 0 1px 0 rgba(255,255,255,0.12);
  animation: homeCtaGlow 2.6s ease-in-out infinite;
}
@keyframes homeCtaGlow {
  0%,100% { box-shadow: 0 16px 32px rgba(0,0,0,0.32), 0 0 18px rgba(0,152,234,0.16), inset 0 1px 0 rgba(255,255,255,0.12); }
  50% { box-shadow: 0 16px 32px rgba(0,0,0,0.32), 0 0 36px rgba(0,152,234,0.42), inset 0 1px 0 rgba(255,255,255,0.16); }
}
.home-mode-friends {
  background:
    radial-gradient(circle at 0% 50%, rgba(37,99,235,0.28), transparent 42%),
    linear-gradient(165deg, rgba(12, 28, 48, 0.92), rgba(8, 16, 32, 0.96));
  border: 1.5px solid rgba(56, 189, 248, 0.34);
  box-shadow: 0 14px 28px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.08);
}

.home-mode-icon {
  position: relative;
  display: flex;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #4CC9F0, #0098EA);
  box-shadow: 0 10px 22px rgba(0, 152, 234, 0.45), 0 0 16px rgba(125,211,252,0.35);
  font-size: 24px;
  color: #041018;
  animation: homeIconBounce 2.8s ease-in-out infinite;
}
/* r175: Friends tile now speaks the same icon language as Quick Match
   (gradient tile + glow + bounce) with its own violet accent, so the two
   cards stay distinguishable. The previous override parked a 3D-render PNG
   on a flat dark square, which clashed with the app's emoji icon system. */
.home-mode-friends .home-mode-icon {
  background: linear-gradient(180deg, #A78BFA, #7C3AED);
  box-shadow: 0 10px 22px rgba(124, 58, 237, 0.45), 0 0 16px rgba(167, 139, 250, 0.35);
}
@keyframes homeIconBounce {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.05); }
}

.home-mode-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 1;
}
.home-mode-copy strong { font-size: 16.5px; font-weight: 950; letter-spacing: -0.3px; color: #F8FAFC; }
.home-mode-copy small { color: #A8BDD0; font-size: 11.5px; font-weight: 650; line-height: 1.4; }
.home-mode-arrow {
  color: #7DD3FC;
  font-size: 22px;
  line-height: 1;
  font-weight: 300;
  background: rgba(56,189,248,0.14);
  border: 1px solid rgba(125,211,252,0.28);
  width: 34px;
  height: 34px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 12px;
  flex-shrink:0;
  position: relative;
  z-index: 1;
  animation: homeArrowNudge 1.8s ease-in-out infinite;
}
@keyframes homeArrowNudge {
  0%,100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

.home-how-card {
  padding: 16px 14px 15px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.10);
  background:
    linear-gradient(165deg, rgba(18, 24, 38, 0.78), rgba(10, 16, 30, 0.88));
  box-shadow: 0 12px 24px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.home-how-title { color: #F1F5F9; font-size: 13px; font-weight: 900; margin-bottom: 14px; }
.home-how-steps { display: flex; align-items: center; justify-content: space-between; gap: 5px; color: #B7C9DC; font-size: 10px; font-weight: 800; }
.home-how-steps span { display: flex; flex: 1; align-items: center; gap: 5px; white-space: nowrap; }
.home-how-steps b {
  display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center;
  border-radius: 50%; color: #041018; background: linear-gradient(180deg, #4CC9F0, #0098EA); font-size: 11px;
  box-shadow: 0 0 12px rgba(0,152,234,0.45);
  animation: homeStepPulse 2.4s ease-in-out infinite;
}
.home-how-steps span:nth-child(3) b { animation-delay: .4s; }
.home-how-steps span:nth-child(5) b { animation-delay: .8s; }
@keyframes homeStepPulse {
  0%,100% { box-shadow: 0 0 8px rgba(0,152,234,0.3); transform: scale(1); }
  50% { box-shadow: 0 0 16px rgba(0,152,234,0.7); transform: scale(1.08); }
}
.home-how-steps i { color: #38BDF8; font-size: 15px; font-style: normal; opacity: .85; }
.home-outline-action {
  min-height: 42px;
  margin-bottom: 2px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 12px;
  background: transparent;
  color: #CBD5E1;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.home-outline-action:active { background: rgba(255,255,255,0.06); }
@media (prefers-reduced-motion: reduce) {
  .home-welcome-shine, .home-mode-shine, .home-dice-ring,
  .home-kicker, .home-welcome-copy h1 span,
  .home-mode-arrow, .home-how-steps b, .home-stat-item:first-child .home-stat-icon,
  .home-welcome-card::after, .home-stat-flash {
    animation: none !important;
  }
}

/* ==========================================
   SCREEN TOP BAR & PRIVATE ROOMS
   ========================================== */
.screen-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 25px;
  margin-bottom: -2px;
}
.screen-topbar strong { color: #F8FAFC; font-size: 15px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.screen-topbar-spacer { flex: 1 1 auto; min-width: 4px; }
.screen-topbar .play-manage-btn, .screen-topbar .friends-count, .screen-topbar .flobby-bet, .screen-topbar .screen-back-btn { flex-shrink: 0; }
.screen-back-btn {
  justify-self: start;
  padding: 6px 14px;
  border: 1px solid rgba(147, 197, 253, 0.3);
  border-radius: 8px;
  background: rgba(147, 197, 253, 0.08);
  color: #93C5FD;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.screen-back-btn:active { color: #FFF; background: rgba(147, 197, 253, 0.18); }

/* ==========================================
   FRIENDS (r101 pro) + ONLINE DRAWER
   ========================================== */
.friends-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.55), rgba(30, 27, 75, 0.6) 55%, rgba(16, 24, 51, 0.94));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.friends-hero-icon { font-size: 36px; line-height: 1; filter: drop-shadow(0 2px 8px rgba(16, 185, 129, 0.5)); }
.friends-hero h2 { font-size: 16px; margin-bottom: 5px; letter-spacing: 0.2px; }
.friends-hero p { color: #A7F3D0; font-size: 11px; font-weight: 600; line-height: 1.4; }
.friends-count { color: var(--text-dim); font-size: 11px; font-weight: 800; }

.friends-panel {
  padding: 14px 13px;
  margin-bottom: 12px;
  border: 1px solid var(--border-line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 40%), var(--bg-card);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.friends-panel-title { color: #F8FAFC; font-size: 13px; font-weight: 900; margin-bottom: 12px; letter-spacing: 0.2px; }
.friends-sub { color: var(--text-muted); font-size: 10px; font-weight: 800; margin: 8px 0 6px; text-transform: uppercase; letter-spacing: 0.6px; }
.friends-sub:first-of-type { margin-top: 0; }

.friends-uid-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  margin-bottom: 10px;
  border: 1px dashed rgba(16, 185, 129, 0.45);
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.07);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
}
.friends-uid-row strong { color: #6EE7B7; font-family: monospace; font-size: 13px; letter-spacing: 1px; }
.friends-uid-row button { padding: 6px 11px; border: 1px solid rgba(16,185,129,0.5); border-radius: 8px; background: linear-gradient(180deg, rgba(16,185,129,0.2), rgba(16,185,129,0.08)); color: #A7F3D0; font-size: 10px; font-weight: 900; cursor: pointer; transition: transform 0.12s; }
.friends-uid-row button:active { transform: scale(0.94); }

.friends-search-row { display: flex; gap: 8px; margin-bottom: 10px; }
.friends-search-input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border-line);
  border-radius: 10px;
  outline: none;
  background: var(--bg-input);
  color: #FFF;
  font-size: 13px;
  font-weight: 700;
}
.friends-search-input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15); }
.friends-search-btn {
  flex-shrink: 0;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #6B4EFF, #8B7CF6);
  color: #FFF;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(107, 78, 255, 0.35);
  transition: transform 0.12s, box-shadow 0.12s;
}
.friends-search-btn:active { transform: scale(0.95); box-shadow: 0 2px 8px rgba(107, 78, 255, 0.3); }

.fr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px;
  border-bottom: 1px solid var(--border-line);
  border-radius: 8px;
  transition: background 0.12s;
}
.fr-row:last-child { border-bottom: 0; }
.fr-row:hover { background: rgba(255, 255, 255, 0.025); }
.fr-avatar {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(16, 185, 129, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.09);
}
.fr-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.fr-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fr-meta strong { color: #F1F5F9; font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-meta small { color: var(--text-muted); font-size: 10px; font-weight: 600; }
.fr-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #A9B6CC;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  padding: 14px 10px;
}
.drawer-list .fr-empty::before { content: "👥"; font-size: 20px; opacity: .85; }
.ff-rooms .fr-empty::before { content: "🎪"; font-size: 20px; opacity: .85; }
.ff-rooms .fr-empty { padding: 12px 6px; }

.fr-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 5px; vertical-align: 1px; }
.fr-lobby-tag { font-size: 11px; margin-left: 3px; vertical-align: 0; } /* r110: in-a-lobby badge */
.fr-on { background: #10B981; box-shadow: 0 0 7px rgba(16, 185, 129, 0.95); }
.fr-off { background: #475569; }
.fr-busy { background: #F59E0B; box-shadow: 0 0 7px rgba(245, 158, 11, 0.95); }

/* Pro buttons: gradients, glow, tactile press */
.fr-btn {
  flex-shrink: 0;
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2px;
  cursor: pointer;
  border: 1px solid var(--border-line);
  background: rgba(255, 255, 255, 0.06);
  color: #E2E8F0;
  transition: transform 0.12s, box-shadow 0.12s, opacity 0.12s;
}
.fr-btn:active { transform: scale(0.93); }
.fr-accept, .fr-add { border: 0; background: linear-gradient(135deg, #059669, #10B981); color: #FFF; box-shadow: 0 3px 12px rgba(16, 185, 129, 0.35); }
.fr-decline, .fr-remove { border-color: rgba(239,68,68,0.45); background: linear-gradient(180deg, rgba(239,68,68,0.16), rgba(239,68,68,0.06)); color: #FCA5A5; }
.fr-cancel { border-color: rgba(245,158,11,0.45); background: linear-gradient(180deg, rgba(245,158,11,0.16), rgba(245,158,11,0.06)); color: #FDE68A; }
.fr-duel { border: 0; background: linear-gradient(135deg, #6B4EFF, #A855F7); color: #FFF; font-size: 14px; padding: 6px 10px; box-shadow: 0 3px 12px rgba(139, 92, 246, 0.4); }
.fr-disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }
.fr-pill { flex-shrink: 0; color: var(--text-muted); font-size: 10px; font-weight: 800; }

.bt-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 22px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 9px;
  background: linear-gradient(135deg, #EF4444, #F97316);
  color: #FFF;
  font-size: 10px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
}

/* Floating friends (r177: circular teal tile + glow — the app's icon language) */
#friends-fab {
  position: fixed;
  right: 12px;
  bottom: 88px;
  z-index: 800;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid rgba(45, 212, 191, 0.5);
  background: linear-gradient(180deg, #2DD4BF, #0D9488);
  box-shadow:
    0 8px 18px rgba(13, 148, 136, 0.4),
    0 0 16px rgba(45, 212, 191, 0.35);
  color: #04211E;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s;
}
#friends-fab:active { transform: scale(0.94); }
body.in-game #friends-fab { display: none !important; }
#screen-play.active ~ #friends-fab,
body:has(#screen-play.active) #friends-fab { display: none !important; }
.fab-req {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #EF4444;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0B1020;
}
.fab-icon { font-size: 24px; line-height: 1; }
.fab-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 11px;
  background: linear-gradient(135deg, #F59E0B, #F97316);
  color: #1C0A00;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0B1020;
}

/* Slide-in drawer */
#friends-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 895;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
#friends-drawer-backdrop.open { opacity: 1; pointer-events: all; }
#friends-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  width: min(300px, 86vw);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #14161C 0%, #0C0E14 100%);
  border-left: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.55);
  transform: translateX(105%);
  transition: transform 0.25s ease;
}
#friends-drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 14px 12px;
  border-bottom: 1px solid var(--border-line);
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.35), transparent);
}
.drawer-head h3 { font-size: 13.5px; font-weight: 950; color: #F8FAFC; margin-bottom: 3px; letter-spacing: 1.2px; }
/* r179: the subtitle was #94A3B8 at 10px — too small and dim to read */
.drawer-head p {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #B6C3DA;
  font-size: 11px;
  font-weight: 800;
}
.ff-search { padding: 9px 12px 7px; }
.ff-search input {
  width: 100%;
  height: 38px;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,0.13);
  background: rgba(0,0,0,0.42);
  color: #F8FAFC;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 700;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.ff-search input::placeholder { color: #8798B4; }
.ff-search input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}
/* r179: the invite "+" is a real action, so it gets the app's gradient-tile
   language; the disabled state must read as "unavailable", not "broken". */
.dw-plus {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1px solid rgba(251, 191, 36, 0.38);
  background: linear-gradient(180deg, #FBBF24, #D97706);
  color: #1C0A00;
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
}
.dw-plus:active { transform: scale(0.9); }
.dw-plus:disabled {
  background: rgba(148, 163, 184, 0.10);
  border-color: rgba(148, 163, 184, 0.16);
  color: #8291AB;
  box-shadow: none;
  cursor: not-allowed;
}
.dw-plus.dw-on {
  background: linear-gradient(180deg, #FDE68A, #F59E0B);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
/* decline in the request row is not the same action as invite */
.dw-req .dw-plus[data-act="decline"] {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.34);
  color: #FCA5A5;
  box-shadow: none;
  font-size: 18px;
}
.dw-req .dw-plus[data-act="decline"]:active { transform: scale(0.9); }

.dw-ask {
  flex-shrink: 0;
  height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  border: 0;
  background: linear-gradient(135deg, #16A34A, #059669);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.12s, filter 0.12s;
}
.dw-ask:active { transform: scale(0.94); }

/* "Private" / "Full" / "IN" was a bare 16px label at 70% opacity — now a pill */
.dw-lock {
  flex-shrink: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 20px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #C3CEE2;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}

#btn-drawer-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #CBD5E1;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s, transform 0.12s;
}
#btn-drawer-close:hover { background: rgba(248, 113, 113, 0.16); border-color: rgba(248, 113, 113, 0.4); color: #FCA5A5; }
#btn-drawer-close:active { transform: scale(0.92); }

/* r179: "+ invite" is an action — make it look like one */
.dw-invite-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.32);
  color: #FCD34D;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* r179: the refresh control was an unlabelled ⟳ glyph in a 13px chip */
.ol-refresh {
  float: none;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 20px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: #7DD3FC;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.12s, transform 0.12s;
}
.ol-refresh:hover { background: rgba(56, 189, 248, 0.2); }
.ol-refresh:active { transform: scale(0.94); }
.ol-refresh-glyph { font-size: 13px; line-height: 1; }
/* r179: presence colours moved to the r179 block below (three clear states) */
#btn-drawer-close {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.drawer-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 8px 12px 12px;
}
.ff-rooms {
  flex: 0 1 auto;
  min-height: 0;
  max-height: 30vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 4px 10px 8px;
}
.dw-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  margin-bottom: 7px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
}
.dw-row:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.07); margin-bottom: 0; }
.dw-row:hover { background: rgba(255, 255, 255, 0.075); border-color: rgba(255, 255, 255, 0.12); }
.dw-row:active { transform: scale(0.995); }
.dw-dim { opacity: 0.78; }
.dw-dim:hover { background: rgba(255, 255, 255, 0.03); }

/* r179: presence must be readable at a glance. The old "offline" grey
   (#64748B on #0C0E14 ≈ 3.0:1) sat under WCAG AA and in-match fell into the
   same colour, so the two states were indistinguishable. */
.dw-row .fr-meta small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1.2;
}
.ff-dot { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; }
.dw-row .fr-meta small.ff-on { color: #4ADE80; }
.dw-row .fr-meta small.ff-on .ff-dot { background: #22C55E; box-shadow: 0 0 8px rgba(34, 197, 94, 0.95); animation: frPulse 2.4s ease-out infinite; }
.dw-row .fr-meta small.ff-match { color: #FBBF24; }
.dw-row .fr-meta small.ff-match .ff-dot { background: #F59E0B; box-shadow: 0 0 8px rgba(245, 158, 11, 0.9); }
.dw-row .fr-meta small.ff-off { color: #A9B6CC; }
.dw-row .fr-meta small.ff-off .ff-dot { background: #64748B; box-shadow: none; }
.dw-row .fr-meta small.ff-req { color: #FBBF24; }
.dw-row .fr-meta small.ff-req .ff-dot { background: #F59E0B; box-shadow: 0 0 8px rgba(245, 158, 11, 0.9); }
.dw-row .fr-meta strong { font-size: 12.5px; }
@media (prefers-reduced-motion: reduce) {
  .dw-row .fr-meta small .ff-dot { animation: none; }
}
.dw-check {
  flex-shrink: 0;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 2px solid #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: #FFF;
  transition: all 0.12s;
}
.dw-checked { border-color: #10B981; background: linear-gradient(135deg, #059669, #10B981); box-shadow: 0 2px 10px rgba(16, 185, 129, 0.5); }
.drawer-foot {
  padding: 12px 14px 16px;
  border-top: 1px solid var(--border-line);
  background: rgba(11, 16, 32, 0.92);
  backdrop-filter: blur(8px);
}
.drawer-size-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
#drawer-size-label { color: #E2E8F0; font-size: 12px; font-weight: 900; }
#drawer-prize-label { color: #FDE68A; font-size: 10px; font-weight: 800; text-align: right; }
.drawer-progress { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin: 6px 0; }
#drawer-progress-fill { height: 100%; width: 0%; border-radius: 4px; background: linear-gradient(90deg, #059669, #34D399); transition: width 0.3s; }
#drawer-waiting-text { color: #FDE68A; font-size: 11px; font-weight: 800; text-align: center; padding: 2px 0 4px; }

.ch-stake-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 6px; }
.ch-stake {
  min-height: 35px;
  border: 1.5px solid var(--border-line);
  border-radius: 9px;
  background: var(--bg-card);
  color: #E2E8F0;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.12s;
}
.ch-stake.active { border-color: #8B5CF6; background: linear-gradient(180deg, rgba(139,92,246,0.3), rgba(139,92,246,0.12)); color: #FFF; box-shadow: 0 2px 10px rgba(139, 92, 246, 0.35); }
.ch-waiting { color: #FDE68A; font-size: 11px; font-weight: 800; text-align: center; padding: 8px 4px; }

.fr-modal-row { display: flex; gap: 8px; margin-top: 12px; }
.fr-primary-btn {
  flex: 1;
  white-space: nowrap;
  min-height: 43px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #6B4EFF, #A855F7);
  color: #FFF;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
  transition: transform 0.12s, opacity 0.12s;
}
.fr-primary-btn:active { transform: scale(0.97); }
.fr-primary-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.fr-ghost-btn {
  flex: 1;
  white-space: nowrap;
  min-height: 43px;
  border: 1px solid var(--border-line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s;
}
.fr-ghost-btn:active { transform: scale(0.97); }
.fr-invite-from { color: #E2E8F0; font-size: 13px; font-weight: 700; text-align: center; margin: 4px 0; }
.fr-invite-from strong { color: #6EE7B7; }
.fr-invite-bet { color: #FDE68A; font-size: 12px; font-weight: 900; text-align: center; margin: 2px 0; }
.fr-invite-others { color: var(--text-muted); font-size: 11px; font-weight: 700; text-align: center; margin: 2px 0; }
.fr-invite-count { color: var(--text-muted); font-size: 11px; font-weight: 700; text-align: center; margin: 2px 0 4px; }
#modal-invite .usdm-head { flex-direction: column; text-align: center; gap: 8px; }
#modal-invite .nm-title { font-size: 17px; }
#invite-action-line { color: #CBD5E1; }


@media (max-width: 370px) {
  .home-welcome-copy h1 { font-size: 21px; }
  .home-dice-orb { right: 8px; width: 66px; height: 66px; }
  .home-dice-scene, .home-dice-cube { width: 46px; height: 46px; }
  .home-dface.f1 { transform: rotateY(0deg) translateZ(23px); }
  .home-dface.f2 { transform: rotateY(180deg) translateZ(23px); }
  .home-dface.f3 { transform: rotateY(90deg) translateZ(23px); }
  .home-dface.f4 { transform: rotateY(-90deg) translateZ(23px); }
  .home-dface.f5 { transform: rotateX(90deg) translateZ(23px); }
  .home-dface.f6 { transform: rotateX(-90deg) translateZ(23px); }
  .home-mode-icon { width: 46px; height: 46px; margin-right: 10px; }
  .home-mode-copy strong { font-size: 14.5px; }
  .home-mode-copy small { font-size: 10.5px; }
  .home-how-steps { font-size: 8.5px; }
  .home-how-steps b { width: 18px; height: 18px; }
}

/* ==========================================
   PROFESSIONAL TOURNAMENT ARENA REFRESH
   The match screen uses a focused table layout instead of the app shell chrome.
   ========================================== */
body.in-game .app-header,
body.in-game .bottom-nav-bar {
  display: none;
}

body.in-game .app-shell,
body.in-game .app-content {
  background: #070D1B;
}

.game-screen {
  padding: 10px 12px 18px;
  gap: 10px;
  background:
    radial-gradient(circle at 50% 8%, rgba(33, 66, 117, 0.18), transparent 37%),
    linear-gradient(180deg, #081225 0%, #070D1B 68%, #060A14 100%);
}

.game-hud-bar {
  min-height: 58px;
  padding: 8px 9px;
  border: 1px solid rgba(123, 153, 197, 0.2);
  border-radius: 16px;
  background: rgba(14, 27, 51, 0.92);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.btn-leave-hud {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 34px;
  padding: 0 9px 0 6px;
  border: 1px solid rgba(247, 113, 113, 0.3);
  border-radius: 10px;
  background: rgba(127, 29, 29, 0.18);
  color: #FDA4AF;
  font-size: 10px;
  font-weight: 900;
}

.hud-back-icon {
  color: #FCA5A5;
  font-size: 22px;
  font-weight: 300;
  line-height: 0.7;
}

.hud-center {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  line-height: 1;
}

.hud-kicker {
  color: #8EA5C7;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.5px;
}

.hud-pot-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #F8C75B;
  font-size: 14px;
  font-weight: 950;
}

.hud-pot-label {
  color: #9DB0CC;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.7px;
}

.hud-room-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #8EA5C7;
  font-size: 9px;
  font-family: monospace;
  letter-spacing: 0.3px;
}

.hud-room-label {
  color: #647B9E;
  font-family: inherit;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.8px;
}

.hud-right {
  display: flex;
  min-width: 58px;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.hud-fee-tag {
  color: #8EA5C7;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.hud-fee-tag span { color: #C4D2E7; }

.hud-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #6EE7B7;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.8px;
}

.hud-live-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12), 0 0 8px rgba(52, 211, 153, 0.7);
}

/* Player seats now sit outside the board so names and photos never cover the playfield. */
.board-arena-wrapper {
  display: flex;
  width: 100%;
  max-width: 460px;
  height: auto;
  aspect-ratio: auto;
  flex-direction: column;
  gap: 8px;
  margin: 0 auto;
  padding: 8px;
  overflow: visible;
  border: 1px solid rgba(106, 137, 182, 0.32);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(30, 52, 87, 0.76), rgba(9, 18, 35, 0.98)),
    #0B1529;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.game-seat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  width: 100%;
}

/* Same seat grid in every mode. Player presence is controlled by updateArenaPods.
   Keep diagonal seats in their actual board columns even when a seat is empty. */
.game-seat-row > .pod-red,.game-seat-row > .pod-sky{grid-column:1;grid-row:1}
.game-seat-row > .pod-green,.game-seat-row > .pod-yellow{grid-column:2;grid-row:1}

.ludo-board-container {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(193, 210, 232, 0.25);
  border-radius: 15px;
  background: #111D32;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34), inset 0 0 0 4px rgba(255, 255, 255, 0.025);
}

.board-svg { width: 100%; height: 100%; display: block; }

.player-corner-pod {
  position: relative !important;
  inset: auto !important;
  display: flex;
  align-items: center;
  width: auto;
  min-width: 0;
  min-height: 58px;
  padding: 8px 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 13px;
  background: rgba(12, 24, 45, 0.94);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.player-corner-pod::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 5px;
  background: currentColor;
  opacity: 0.9;
}

.pod-sky, .pod-blue { border-color: rgba(56, 189, 248, 0.46); color: #38BDF8; }
.pod-green { border-color: rgba(52, 211, 153, 0.46); color: #34D399; }
.pod-red { border-color: rgba(251, 113, 133, 0.46); color: #FB7185; }
.pod-yellow { border-color: rgba(250, 204, 21, 0.46); color: #FACC15; }

.player-corner-pod.turn-active {
  border-color: currentColor !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 18%, transparent), 0 7px 18px rgba(0, 0, 0, 0.28);
  animation: professionalSeatPulse 1.5s ease-in-out infinite alternate;
}

@keyframes professionalSeatPulse {
  from { transform: translateY(0); }
  to { transform: translateY(-2px); }
}

.pcp-avatar {
  display: flex;
  flex-shrink: 0;
  width: 35px;
  height: 35px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.09);
  color: #F8FAFC;
  font-size: 16px;
}

.pcp-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pcp-details { flex: 1; min-width: 0; gap: 4px; }
.pcp-name { color: #F8FAFC; font-size: 10px; font-weight: 900; }
.pcp-score { display: inline-flex; align-items: center; gap: 4px; color: #8298B8; font-size: 8px; font-weight: 800; letter-spacing: 0.3px; }
.pcp-score span { color: #8298B8; }
.pcp-score strong { color: currentColor; font-family: monospace; font-size: 10px; }
.pcp-you { display: none; align-self: flex-start; padding: 3px 5px; border: 1px solid currentColor; border-radius: 5px; color: currentColor; font-size: 7px; font-weight: 950; letter-spacing: 0.4px; }
.player-corner-pod.is-you .pcp-you { display: inline-flex; }

.turn-timer-line {
  right: 0;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.tokens-layer { position: absolute; inset: 0; pointer-events: none; }

/* Turn deck */
.game-controls-deck {
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(106, 137, 182, 0.3);
  border-radius: 17px;
  background: rgba(14, 27, 51, 0.95);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.turn-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  padding: 0 2px;
}

.turn-status-copy { display: flex; min-width: 0; align-items: center; gap: 7px; }
.turn-status-dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: #64748B; }
.turn-status-row.your-turn .turn-status-dot { background: #34D399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.13), 0 0 10px rgba(52, 211, 153, 0.7); }
.turn-status-row.opponent-turn .turn-status-dot { background: #FBBF24; }
.turn-prompt-text { min-height: 0; overflow: hidden; color: #C7D5E9; font-size: 12px; font-weight: 850; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.turn-status-row.your-turn .turn-prompt-text { color: #6EE7B7; }
.turn-countdown { min-width: 34px; color: #94A3B8; font-family: monospace; font-size: 11px; font-weight: 900; text-align: right; }
.turn-status-row.your-turn .turn-countdown { color: #F8C75B; }

.dice-roll-area { display: flex; align-items: center; justify-content: center; gap: 13px; }
.dice-box {
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  border: 1px solid #D9E2EF;
  border-radius: 17px;
  background: linear-gradient(145deg, #FFFFFF, #E8EEF7);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28), inset 0 1px 0 #FFFFFF;
}
.dice-box:active { transform: scale(0.95) rotate(-3deg); }
.dice-face { width: 100%; height: 100%; }
.dot { width: 10px; height: 10px; background: #12213A; box-shadow: inset 0 1px 1px rgba(255,255,255,0.2); }
.dot-top-left, .dot-top-right { top: 9px; }
.dot-bottom-left, .dot-bottom-right { bottom: 9px; }
.dot-top-left, .dot-bottom-left, .dot-mid-left { left: 9px; }
.dot-top-right, .dot-bottom-right, .dot-mid-right { right: 9px; }

.btn-roll-hero {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 62px;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  padding: 9px 14px;
  border: 1px solid rgba(52, 211, 153, 0.46);
  border-radius: 15px;
  background: linear-gradient(135deg, #0E8F71 0%, #16B981 100%);
  color: #031A13;
  text-align: left;
  box-shadow: 0 7px 16px rgba(16, 185, 129, 0.18), inset 0 1px 0 rgba(255,255,255,0.22);
}
.btn-roll-hero strong { font-size: 15px; font-weight: 950; line-height: 1.1; }
.roll-btn-kicker { color: rgba(3, 26, 19, 0.66); font-size: 8px; font-weight: 950; letter-spacing: 1.1px; }
.roll-btn-icon { position: absolute; align-self: flex-end; font-size: 24px; }
.btn-roll-hero:disabled { border-color: #33445D; background: #26364D; color: #9FB0C7; box-shadow: none; }
.btn-roll-hero:disabled .roll-btn-kicker { color: #8291A7; }

.quick-reaction-heading { display: flex; justify-content: space-between; padding: 0 2px; color: #8196B4; font-size: 9px; font-weight: 800; letter-spacing: 0.3px; }
.quick-reaction-heading span:last-child { color: #516783; font-size: 8px; font-weight: 700; }
.emotes-bar { justify-content: space-between; gap: 7px; }
.em-btn { display: flex; width: 42px; height: 34px; align-items: center; justify-content: center; padding: 0; border: 1px solid rgba(111, 143, 185, 0.25); border-radius: 10px; background: #0B172D; font-size: 16px; }
.em-btn:active { transform: translateY(1px) scale(0.95); border-color: #F8C75B; background: rgba(248, 199, 91, 0.1); }
.chat-toast-msg { min-height: 14px; color: #F8C75B; font-size: 10px; }

@media (max-width: 370px) {
  .game-screen { padding-right: 9px; padding-left: 9px; }
  .board-arena-wrapper { padding: 6px; gap: 6px; }
  .game-seat-row { gap: 6px; }
  .player-corner-pod { min-height: 51px; padding: 6px 7px; }
  .pcp-avatar { width: 30px; height: 30px; font-size: 14px; }
  .pcp-name { font-size: 9px; }
  .pcp-you { display: none !important; }
  .dice-box { width: 56px; height: 56px; }
  .btn-roll-hero { min-height: 56px; padding-right: 12px; padding-left: 12px; }
  .btn-roll-hero strong { font-size: 13px; }
  .roll-btn-icon { font-size: 20px; }
  .em-btn { width: 37px; height: 32px; }
}

/* Running-match exit confirmation */
.match-leave-modal {
  width: 100%;
  max-width: 342px;
  padding: 23px 19px 18px;
  border: 1px solid rgba(248, 199, 91, 0.35);
  border-radius: 20px;
  background: linear-gradient(145deg, #152541, #0C172C);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255,255,255,0.06);
  text-align: center;
}
.match-leave-icon { font-size: 31px; margin-bottom: 9px; }
.match-leave-kicker { color: #F8C75B; font-size: 8px; font-weight: 950; letter-spacing: 1.7px; }
.match-leave-modal h3 { margin: 8px 0 8px; color: #F8FAFC; font-size: 19px; font-weight: 950; }
.match-leave-modal p { color: #AFC0D8; font-size: 11px; font-weight: 600; line-height: 1.65; }
.match-leave-modal p strong { color: #FDA4AF; }
.match-leave-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.match-leave-actions button { min-height: 43px; border-radius: 11px; font-size: 11px; font-weight: 900; cursor: pointer; }
.btn-stay-match { border: 1px solid rgba(52, 211, 153, 0.45); background: rgba(16, 185, 129, 0.13); color: #6EE7B7; }
.btn-confirm-leave { border: 1px solid rgba(251, 113, 133, 0.42); background: rgba(127, 29, 29, 0.2); color: #FDA4AF; }
.match-leave-actions button:active { transform: scale(0.98); }


/* ===== LIFE SYSTEM (5 missed turns = forfeit) ===== */
.pcp-lives {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  min-height: 14px;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 1px;
}
.pcp-lives .life { opacity: 1; }
.pcp-lives .life.lost { opacity: 0.65; filter: grayscale(0.4); }

.player-corner-pod.disconnected .pcp-avatar {
  filter: grayscale(1) brightness(0.7);
}
.player-corner-pod.disconnected .pcp-name::after {
  content: ' ⏸';
}
.player-corner-pod.disconnected {
  opacity: 0.65;
}

.vic-reason {
  margin-top: 6px;
  font-size: 13px;
  color: #d9f2ff;
  opacity: 0.85;
  min-height: 16px;
}


/* ============================================================
   PER-PLAYER POD DICE (Ludo King style) — arena-20260918-r4
   Each player's pod holds its own dice. Pips inherit the pod's
   player color (currentColor). Right-side pods mirror so ALL
   dice sit on the inner edge facing the board center.
   ============================================================ */
.pod-green, .pod-yellow { flex-direction: row-reverse; }
.player-corner-pod.pod-green::before,
.player-corner-pod.pod-yellow::before { inset: 0 0 0 auto; }

.pod-dice {
  position: relative;
  flex-shrink: 0;
  align-self: center;
  width: 41px;
  height: 41px;
  margin-left: 8px;
  border-radius: 10px;
  background: linear-gradient(150deg, #FFFFFF 0%, #E2E8F0 55%, #C7D0DC 100%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  opacity: 0.55;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.pod-dice.pd-state-ready {
  opacity: 1;
  animation: podDiceBreath 1.4s ease-in-out infinite alternate;
}
.pod-dice.pd-state-rolled { opacity: 1; }
.pod-dice.pd-my {
  cursor: pointer;
  box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 55%, transparent), 0 0 12px color-mix(in srgb, currentColor 45%, transparent), 0 3px 8px rgba(0, 0, 0, 0.38);
}
.pod-dice.rolling {
  /* Continuous loop transform-only rotation = smooth on GPU, no layout churn;
     0.7s = game.js spinMs 700ms, so landing is exactly at 0 deg (no jitter) */
  animation: podDiceShake 0.7s cubic-bezier(0.35, 0.05, 0.65, 0.95) infinite;
  will-change: transform;
}
.pod-dice.pd-settle { animation: podDiceSettle 0.32s ease-out; box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 45%, transparent), 0 0 14px color-mix(in srgb, currentColor 38%, transparent), 0 3px 8px rgba(0, 0, 0, 0.38); }

@keyframes podDiceBreath {
  from { transform: scale(1); }
  to { transform: scale(1.07); }
}
/* shake stays INSIDE the pod bounds (small x/rotate, no big translate) */
@keyframes podDiceShake {
  0%   { transform: translateY(0)    rotate(0deg)   scale(1.02); }
  12%  { transform: translateY(-3px) rotate(-9deg)  scale(1.07) translateX(-2px); }
  25%  { transform: translateY(0)    rotate(-12deg) scale(1.05) translateX(-2px); }
  37%  { transform: translateY(-3px) rotate(8deg)   scale(1.07) translateX(2px); }
  50%  { transform: translateY(0)    rotate(12deg)  scale(1.04) translateX(2px); }
  62%  { transform: translateY(-2px) rotate(-7deg)  scale(1.06) translateX(-1px); }
  75%  { transform: translateY(0)    rotate(-4deg)  scale(1.04); }
  87%  { transform: translateY(-2px) rotate(5deg)   scale(1.05) translateX(1px); }
  100% { transform: translateY(0)    rotate(0deg)   scale(1.02); }
}
@keyframes podDiceSettle {
  0% { transform: scale(1.18) rotate(0deg); filter: brightness(1.3); }
  55% { transform: scale(0.96); filter: brightness(1); }
  100% { transform: scale(1); }
}

.pd-pip {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.4);
}
.pd-tl { top: 5px; left: 5px; }
.pd-tr { top: 5px; right: 5px; }
.pd-ml { top: 50%; left: 5px; transform: translateY(-50%); }
.pd-mr { top: 50%; right: 5px; transform: translateY(-50%); }
.pd-bl { bottom: 5px; left: 5px; }
.pd-br { bottom: 5px; right: 5px; }
.pd-c { top: 50%; left: 50%; transform: translate(-50%, -50%); }

@media (max-width: 480px) {
  .pod-dice { width: 34px; height: 34px; margin-left: 6px; border-radius: 8px; }
  .pd-pip { width:translateY(-50%); }
.pd-bl { bottom: 5px; left: 5px; }
.pd-br { bottom: 5px; right: 5px; }
.pd-c { top: 50%; left: 50%; transform: translate(-50%, -50%); }

@media (max-width: 480px) {
  .pod-dice { width: 34px; height: 34px; margin-left: 6px; border-radius: 8px; }
  .pd-pip { width: 5.5px; height: 5.5px; }
  .pd-tl, .pd-tr { top: 5px; }
  .pd-bl, .pd-br { bottom: 5px; }
  .pd-tl, .pd-bl, .pd-ml { left: 5px; }
  .pd-tr, .pd-br, .pd-mr { right: 5px; }
}


/* ===== #16: Ludo King UX — no separate roll button; tap YOUR glowing pod dice ===== */
.dice-roll-area { display: none !important; }


/* ============================================================
   LKB — owner's premium ludo board design (ludo-board-rings)
   namespaced to avoid collisions; gotis engine-aligned
   ============================================================ */
  .lkb-frame{
    width:100%;height:100%;border-radius:16px;padding:10px;
    background:
      repeating-linear-gradient(92deg,rgba(0,0,0,.03) 0px,transparent 2px,transparent 6px,rgba(255,255,255,.02) 7px),
      linear-gradient(145deg,#e8c090 0%,#b07d48 20%,#7a4820 50%,#5a2f12 75%,#8b5a2b 100%);
    box-shadow:
      inset 0 3px 6px rgba(255,255,255,.4),
      inset 0 -6px 14px rgba(0,0,0,.55),
      0 14px 36px rgba(0,0,0,.6),
      0 0 0 3px rgba(60,30,10,.5);
    position:relative;
  }
  .lkb-frame::before{
    content:'';position:absolute;inset:5px;border-radius:12px;
    border:2px solid rgba(0,0,0,.4);
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.12),inset 0 0 18px rgba(0,0,0,.3);
    pointer-events:none;
  }
  /* Board surface - warm rich cream */
  .lkb-board{
    width:100%;height:100%;
    background:
      radial-gradient(ellipse at 20% 20%,rgba(255,250,235,.4),transparent 50%),
      radial-gradient(ellipse at 80% 80%,rgba(230,200,160,.25),transparent 50%),
      linear-gradient(135deg,#fffdf5 0%,#f8efd9 100%);
    border-radius:8px;
    position:relative;overflow:hidden;
    box-shadow:inset 0 0 35px rgba(120,80,40,.22);
  }
  /* Wave lkbSheen across board surface */
  .lkb-board::before{
    content:'';position:absolute;inset:0;
    background:
      linear-gradient(105deg,transparent 40%,rgba(255,255,255,.25) 45%,transparent 50%,transparent 70%,rgba(255,255,255,.15) 75%,transparent 80%);
    background-size:250% 100%;
    animation:lkbSheen 8s ease-in-out infinite;
    pointer-events:none;z-index:20;
    border-radius:8px;
  }
  @keyframes lkbSheen{
    0%{background-position:200% 0;opacity:.4}
    50%{opacity:.7}
    100%{background-position:-100% 0;opacity:.4}
  }
  /* Grid cells positioned absolutely */
  .lkb-c{position:absolute;box-sizing:border-box}

  /* Home bases */
  .lkb-base{
    position:absolute;display:flex;align-items:center;justify-content:center;
    box-shadow:inset 0 0 35px rgba(0,0,0,.28);
  }
  .lkb-base-inner{
    width:70%;height:70%;
    background:
      radial-gradient(circle at 30% 25%,#ffffff 0%,#fffaf0 40%,#f0e2c5 100%);
    border-radius:10px;
    display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;
    padding:14%;gap:14%;
    box-shadow:
      0 5px 16px rgba(0,0,0,.5),
      0 0 0 2px rgba(0,0,0,.35),
      inset 0 2px 4px rgba(255,255,255,1),
      inset 0 -3px 6px rgba(0,0,0,.12);
  }
  .lkb-goti{border-radius:50%;position:relative;
    box-shadow:inset 0 -3px 6px rgba(0,0,0,.4),inset 0 2px 4px rgba(255,255,255,.55),0 2px 4px rgba(0,0,0,.3);
  }
  .lkb-goti::after{content:'';position:absolute;top:15%;left:20%;width:28%;height:28%;border-radius:50%;background:rgba(255,255,255,.6);filter:blur(1px)}

  /* Colors - richer, deeper, premium */
  .lkb-b-red{top:0;left:0;width:40%;height:40%;
    background:
      radial-gradient(ellipse at 30% 20%,rgba(255,120,120,.9) 0%,transparent 50%),
      radial-gradient(ellipse at 70% 80%,rgba(80,0,0,.35) 0%,transparent 50%),
      linear-gradient(135deg,#ff4d4d 0%,#dc0000 35%,#9a0000 70%,#5a0000 100%);
    border-right:3px solid #3d2208;border-bottom:3px solid #3d2208;
    box-shadow:inset 0 0 45px rgba(0,0,0,.45),inset 0 3px 0 rgba(255,200,200,.3);}
  .lkb-b-red .lkb-goti{background:radial-gradient(circle at 32% 28%,#ff9999,#880000 70%,#550000);border:2.5px solid #4a0000;
    box-shadow:inset 0 -4px 8px rgba(0,0,0,.5),inset 0 2px 5px rgba(255,255,255,.6),0 3px 6px rgba(0,0,0,.4)}

  .lkb-b-green{top:0;right:0;width:40%;height:40%;
    background:
      radial-gradient(ellipse at 70% 20%,rgba(100,255,150,.9) 0%,transparent 50%),
      radial-gradient(ellipse at 30% 80%,rgba(0,70,25,.35) 0%,transparent 50%),
      linear-gradient(225deg,#2be272 0%,#00a042 35%,#006e2c 70%,#004018 100%);
    border-left:3px solid #3d2208;border-bottom:3px solid #3d2208;
    box-shadow:inset 0 0 45px rgba(0,0,0,.45),inset 0 3px 0 rgba(200,255,220,.3);}
  .lkb-b-green .lkb-goti{background:radial-gradient(circle at 32% 28%,#7effaa,#007030 70%,#004018);border:2.5px solid #003d18;
    box-shadow:inset 0 -4px 8px rgba(0,0,0,.5),inset 0 2px 5px rgba(255,255,255,.6),0 3px 6px rgba(0,0,0,.4)}

  .lkb-b-yellow{bottom:0;right:0;width:40%;height:40%;
    background:
      radial-gradient(ellipse at 70% 80%,rgba(255,240,120,.9) 0%,transparent 50%),
      radial-gradient(ellipse at 30% 20%,rgba(120,70,0,.45) 0%,transparent 50%),
      linear-gradient(315deg,#ffdd2e 0%,#f8a800 35%,#cc7400 70%,#edbc18 100%);
    border-left:3px solid #3d2208;border-top:3px solid #3d2208;
    box-shadow:inset 0 0 45px rgba(0,0,0,.45),inset 0 3px 0 rgba(255,245,200,.3);}
  .lkb-b-yellow .lkb-goti{background:radial-gradient(circle at 32% 28%,#ffee70,#b56500 70%,#753a00);border:2.5px solid #5e2e00;
    box-shadow:inset 0 -4px 8px rgba(0,0,0,.5),inset 0 2px 5px rgba(255,255,255,.6),0 3px 6px rgba(0,0,0,.4)}

  .lkb-b-blue{bottom:0;left:0;width:40%;height:40%;
    background:
      radial-gradient(ellipse at 30% 80%,rgba(120,200,255,.9) 0%,transparent 50%),
      radial-gradient(ellipse at 70% 20%,rgba(0,40,90,.45) 0%,transparent 50%),
      linear-gradient(45deg,#42b4ff 0%,#006ed8 35%,#004aa0 70%,#002560 100%);
    border-right:3px solid #3d2208;border-top:3px solid #3d2208;
    box-shadow:inset 0 0 45px rgba(0,0,0,.45),inset 0 3px 0 rgba(200,230,255,.3);}
  .lkb-b-blue .lkb-goti{background:radial-gradient(circle at 32% 28%,#8dcbff,#004890 70%,#002555);border:2.5px solid #001a40;
    box-shadow:inset 0 -4px 8px rgba(0,0,0,.5),inset 0 2px 5px rgba(255,255,255,.6),0 3px 6px rgba(0,0,0,.4)}

  /* White track cells - richer depth */
  .lkb-track-cell{
    background:linear-gradient(145deg,#ffffff 0%,#f7efdd 50%,#ece0c6 100%);
    border:.5px solid rgba(139,90,43,.3);
    box-shadow:inset 0 1px 2px rgba(255,255,255,.8),inset 0 -1px 2px rgba(160,120,70,.15);
  }

  /* Finish center */
  .lkb-center{position:absolute;width:20%;height:20%;top:40%;left:40%;overflow:hidden;border-radius:2px}
  .lkb-center svg{width:100%;height:100%;display:block;filter:drop-shadow(0 2px 4px rgba(0,0,0,.3))}
  .lkb-crown{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:42%;height:42%;border-radius:50%;
    background:
      radial-gradient(circle at 35% 30%,#ffffff 0%,#fff9c4 15%,#ffd700 40%,#ff9800 70%,#e65100 100%);
    box-shadow:
      0 0 30px rgba(255,215,0,1),
      0 0 60px rgba(255,140,0,.7),
      0 0 90px rgba(255,60,0,.4),
      inset 0 -4px 8px rgba(120,50,0,.4),
      inset 0 3px 6px rgba(255,255,255,.8);
    z-index:5;animation:lkbPulse 2.8s ease-in-out infinite;
    border:2px solid rgba(255,255,255,.4);
  }
  .lkb-crown::after{
    content:'★';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
    font-size:14px;color:#fff8dc;
    text-shadow:0 0 6px rgba(255,200,0,.8),0 1px 2px rgba(0,0,0,.5);
  }
  @keyframes lkbPulse{
    0%,100%{box-shadow:0 0 30px rgba(255,215,0,1),0 0 60px rgba(255,140,0,.7),0 0 90px rgba(255,60,0,.4);transform:translate(-50%,-50%) scale(1)}
    50%{box-shadow:0 0 45px rgba(255,215,0,1),0 0 90px rgba(255,140,0,.9),0 0 120px rgba(255,60,0,.5),0 0 160px rgba(255,200,50,.3);transform:translate(-50%,-50%) scale(1.1)}
  }

  /* Safe star - 3D golden */
  .lkb-star-wrap{position:absolute;width:68%;height:68%;top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none;z-index:6;filter:drop-shadow(0 1px 1px rgba(0,0,0,.3))}
  .lkb-star-wrap.lkb-on-color svg .lkb-st-shine{stop-color:rgba(255,255,255,.9)}
  .lkb-star-wrap.lkb-on-white svg{filter:drop-shadow(0 1px 1px rgba(255,255,255,.6))}

  /* Arrow in home column - nice SVG glow */
  .lkb-arrow-wrap{position:absolute;pointer-events:none;z-index:6;
    filter:drop-shadow(0 2px 3px rgba(0,0,0,.5)) drop-shadow(0 0 6px rgba(255,255,255,.4));
    animation:lkbArrowpulse 2.2s ease-in-out infinite;
  }
  @keyframes lkbArrowpulse{
    0%,100%{opacity:.85;filter:drop-shadow(0 2px 3px rgba(0,0,0,.5)) drop-shadow(0 0 4px rgba(255,255,255,.3))}
    50%{opacity:1;filter:drop-shadow(0 2px 3px rgba(0,0,0,.5)) drop-shadow(0 0 10px rgba(255,255,255,.7))}
  }

  @media(max-width:420px){.lkb-crown::after{font-size:10px}.lkb-wrap{padding:10px;border-radius:18px}.lkb-frame{padding:7px}}

  /* Empty circular token slots: larger rings instead of raised pieces. */
  .lkb-base-inner{
    padding:8%;gap:12%;
  }
  .lkb-base .lkb-goti{
    width:100%;height:auto;aspect-ratio:1;
    align-self:center;justify-self:center;
    border-radius:50%;
    background:radial-gradient(circle at 40% 35%,#fffdf5 0%,#f4e7cc 100%);
    border:clamp(2px,0.7vw,4px) solid var(--ring-color);
    box-shadow:inset 0 1px 3px rgba(80,45,10,.16),0 1px 1px rgba(255,255,255,.7);
  }
  .lkb-base .lkb-goti::after{content:none}
  .lkb-b-red{--ring-color:#b50000}
  .lkb-b-green{--ring-color:#008338}
  .lkb-b-yellow{--ring-color:#c47b00}
  .lkb-b-blue{--ring-color:#0059b8}


  /* Brighter board finish; retain the existing geometry and markers. */
  .lkb-base{box-shadow:inset 0 2px 5px rgba(255,255,255,.4)}
  .lkb-b-red{background:linear-gradient(135deg,#ff7777,#f53642 65%,#e82535);box-shadow:inset 0 2px 5px #ffffff66}
  .lkb-b-green{background:linear-gradient(225deg,#68ef9a,#24c96b 65%,#14af55);box-shadow:inset 0 2px 5px #ffffff66}
  .lkb-b-yellow{background:linear-gradient(315deg,#fff080,#ffdb35 65%,#f5c518);box-shadow:inset 0 2px 5px #ffffff66}
  .lkb-b-blue{background:linear-gradient(45deg,#79d1ff,#339af5 65%,#2085e5);box-shadow:inset 0 2px 5px #ffffff66}
  .lkb-base-inner{background:linear-gradient(135deg,#ffffff,#fff9eb);box-shadow:0 2px 6px #00000024,inset 0 1px 2px white}
  .lkb-frame{background:linear-gradient(145deg,#f9dfb4,#dfad70 55%,#c98e50);box-shadow:inset 0 2px 4px #ffffff88,0 8px 22px #00000033}
  .lkb-board{background:#fffcf3;box-shadow:inset 0 0 12px #b9854014}
  .lkb-track-cell{background:linear-gradient(145deg,#ffffff,#fff8e9);box-shadow:inset 0 1px 1px white}
  .lkb-center svg{filter:none}


/* Keep the approved ring grid; yard tokens follow its centers. */
.lkb-center{z-index:4}
.lkb-pocket-mark{position:absolute;width:0;height:0;pointer-events:none}
.ludo-board-container #tokens-layer{z-index:25}

/* Player card: full-width name, avatar/dice row, compact life dots. */
.board-arena-wrapper .player-corner-pod{
  display:grid;grid-template-columns:minmax(0,1fr) 54px;
  grid-template-rows:18px 54px 10px;gap:4px 10px;
  min-height:112px;padding:10px;
}
.player-corner-pod .pcp-details{display:contents}
.player-corner-pod .pcp-name{
  grid-column:1 / -1;grid-row:1;max-width:100%;min-width:0;
  font-size:12px;line-height:18px;text-align:center;justify-self:stretch;
}
.player-corner-pod .pcp-avatar{
  grid-column:1;grid-row:2;width:42px;height:42px;justify-self:center;align-self:center;
}
.player-corner-pod .pod-dice{
  grid-column:2;grid-row:2;width:54px;height:54px;margin:0;
  justify-self:center;align-self:center;border-radius:12px;touch-action:manipulation;
}
.player-corner-pod .pcp-you{display:none}
.player-corner-pod .pcp-lives{
  grid-column:1;grid-row:3;display:flex;justify-self:center;align-self:center;
  gap:4px;min-height:8px;letter-spacing:0;
}
.player-corner-pod.pod-green,.player-corner-pod.pod-yellow{grid-template-columns:54px minmax(0,1fr)}
.pod-green .pcp-avatar,.pod-yellow .pcp-avatar,
.pod-green .pcp-lives,.pod-yellow .pcp-lives{grid-column:2}
.pod-green .pod-dice,.pod-yellow .pod-dice{grid-column:1}
.pcp-lives .life{display:block;width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:currentColor;opacity:1;box-shadow:0 0 3px currentColor}
.pcp-lives .life.lost{background:#344258;box-shadow:none;opacity:1;filter:none}
.pod-dice .pd-pip{width:7px;height:7px}
.pod-dice .pd-tl,.pod-dice .pd-tr{top:9px}
.pod-dice .pd-bl,.pod-dice .pd-br{bottom:9px}
.pod-dice .pd-tl,.pod-dice .pd-bl,.pod-dice .pd-ml{left:9px}
.pod-dice .pd-tr,.pod-dice .pd-br,.pod-dice .pd-mr{right:9px}
@media(max-width:360px){
  .board-arena-wrapper .player-corner-pod{padding:10px 7px;column-gap:6px;grid-template-columns:minmax(0,1fr) 48px}
  .board-arena-wrapper .pod-green,.board-arena-wrapper .pod-yellow{grid-template-columns:48px minmax(0,1fr)}
  .player-corner-pod .pod-dice{width:48px;height:48px}
}

.pd-unrolled{position:absolute;inset:0;display:grid;place-items:center;font-size:22px;font-weight:700;color:#64748b;pointer-events:none}


/* ============================================================
   USDT CRYPTO PAYMENTS — compact store cards + popup modals
   ============================================================ */

/* --- Store: compact action cards --- */
.usdt-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
@media (max-width: 430px) {
  .usdt-actions { grid-template-columns: 1fr; }
}
.usdt-action-card {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: linear-gradient(145deg, #1A1E38 0%, #161A2E 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 14px 14px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.22);
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.usdt-action-card:hover {
  transform: translateY(-1px);
  border-color: rgba(107,78,255,0.22);
  box-shadow: 0 10px 24px rgba(0,0,0,0.30);
}
.usdt-action-card:active { transform: translateY(0); }
.uac-ico {
  width: 44px; height: 44px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #6B4EFF, #8B7CF6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(107,78,255,0.28);
}
.uac-ico img { width: 78%; height: 78%; object-fit: contain; }
.uac-ico-emoji { font-size: 24px; line-height: 1; }
.uac-buy .uac-ico { background: linear-gradient(135deg, #7C3AED, #6B4EFF); }
.uac-redeem .uac-ico { background: linear-gradient(135deg, #0D9488, #10B981); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28); }
/* r98: player-to-player gifting */
.uac-gift .uac-ico { background: linear-gradient(135deg, #EC4899, #F43F5E); box-shadow: 0 4px 12px rgba(244, 63, 94, 0.28); }
.gift-verify { min-height: 18px; font-size: 12px; font-weight: 700; margin-top: 6px; }
.store-hero { text-align: center; padding: 4px 0 16px; }
.store-hero-badge { display: inline-block; background: rgba(107, 78, 255, 0.16); color: #A78BFA; border: 1px solid rgba(107, 78, 255, 0.35); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; padding: 4px 12px; border-radius: 999px; }
.store-hero-title { font-size: 22px; font-weight: 900; color: #fff; margin-top: 8px; }
.store-hero-sub { font-size: 12.5px; color: #94A3B8; margin-top: 4px; }
.usdm-ico-emoji { font-size: 22px; line-height: 1; }
.uac-body { display: block; min-width: 0; }
.uac-title { display: block; font-size: 12.5px; font-weight: 800; color: #E2E8F0; white-space: nowrap; }
.uac-sub { display: block; font-size: 9.5px; color: #94A3B8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uac-logos { display: flex; gap: 3px; margin-top: 5px; }
.uac-logos img {
  width: 16px; height: 16px;
  border-radius: 50%;
  object-fit: cover;
  background: #0B1220;
}
.uac-arrow { margin-left: auto; color: #9AA3C7; font-size: 18px; font-weight: 300; width: 28px; height: 28px; display:flex; align-items:center; justify-content:center; background: rgba(255,255,255,0.06); border-radius: 8px; flex-shrink: 0; }
.usdt-hint { margin: 8px 0 0; font-size: 9.5px; color: #64748B; text-align: center; letter-spacing: 0.2px; }

/* --- Modals: header + chain option cards --- */
.usdt-modal-box { max-width: 440px; background: linear-gradient(145deg, #171C36 0%, #101534 100%); border: 1px solid rgba(107,78,255,0.16); border-radius: 22px; box-shadow: 0 18px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06); }
.usdt-modal-box .nm-input { background: rgba(10,16,36,0.85); border: 1px solid rgba(107,78,255,0.14); }
.usdt-modal-box .nm-input:focus { border-color: #6B4EFF; box-shadow: 0 0 0 3px rgba(107,78,255,0.14); }
.usdt-modal-box .btn-nm-save { background: linear-gradient(135deg, #6B4EFF 0%, #8B7CF6 100%); color: #FFF; box-shadow: 0 6px 18px rgba(107,78,255,0.32); }
.usdt-modal-box .btn-nm-save:hover { opacity: 1; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(107,78,255,0.38); }
.usdt-modal-box .btn-nm-cancel { border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.04); }
.usdt-modal-box .btn-nm-cancel:hover { background: rgba(255,255,255,0.08); border-color: rgba(107,78,255,0.16); }
.usdm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.usdm-ico {
  width: 42px; height: 42px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #6B4EFF, #8B7CF6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(107,78,255,0.28);
  border: 1px solid rgba(255,255,255,0.10);
}
.usdm-ico img { width: 76%; height: 76%; object-fit: contain; }
.usdm-head .nm-title { margin: 0; font-size: 15px; }
.usdm-sub { margin: 2px 0 0; font-size: 10px; color: #94A3B8; line-height: 1.35; }
.usdm-close {
  margin-left: auto;
  width: 30px; height: 30px;
  background: rgba(148,163,184,0.10);
  border: 1px solid rgba(148,163,184,0.25);
  color: #CBD5E1;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  flex-shrink: 0;
}
.usdm-close:hover { background: rgba(239,68,68,0.15); color: #F87171; border-color: rgba(239,68,68,0.4); }

.chain-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chain-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: rgba(10,16,36,0.92);
  border: 1.5px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 10px 4px 8px;
  cursor: pointer;
  color: #CBD5E1;
  font-size: 9.5px;
  font-weight: 700;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.14s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.14);
}
.chain-opt img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #0B1220; }
.chain-opt:hover { border-color: rgba(107,78,255,0.32); }
.chain-opt.active {
  border-color: #6B4EFF;
  background: rgba(107,78,255,0.12);
  color: #A99CFF;
  box-shadow: 0 0 0 1px rgba(107,78,255,0.18), 0 4px 12px rgba(107,78,255,0.16);
}

/* --- Withdraw modal: saved wallet rows --- */
.usdt-wallet-list { display: flex; flex-direction: column; gap: 7px; }
.usdt-wallet-row {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(10,16,36,0.86);
  border: 1.5px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 9px 10px;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.usdt-wallet-row input { accent-color: #10B981; width: 15px; height: 15px; flex-shrink: 0; }
.usdt-wallet-row code { flex: 1; font-size: 10.5px; color: #E2E8F0; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.usdt-wallet-row.active { border-color: #6B4EFF; background: rgba(107,78,255,0.08); }
.usdt-wallet-row input { accent-color: #6B4EFF; }

.usdt-warn {
  font-size: 10.5px;
  color: #FBBF24;
  background: rgba(245,158,11,0.08);
  border: 1px dashed rgba(245,158,11,0.35);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 8px;
  line-height: 1.4;
}
.usdt-warn a { color: #FBBF24; font-weight: 700; }

/* --- Shared USDT form bits (inside modals) --- */
.usdt-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.q-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #CBD5E1;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.14s ease;
}
.q-chip:hover { border-color: rgba(107,78,255,0.22); background: rgba(107,78,255,0.10); color: #E2E8F0; transform: translateY(-1px); }
.q-chip.active { background: #6B4EFF; border-color: #6B4EFF; color: #FFF; box-shadow: 0 4px 12px rgba(107,78,255,0.28); }
.usdt-receive {
  font-size: 11px; color: #CBD5E1;
  background: rgba(107,78,255,0.08);
  border: 1px dashed rgba(107,78,255,0.22);
  padding: 7px 9px; border-radius: 8px;
  margin-top: 8px;
}
.usdt-receive strong { color: #A99CFF; }
.usdt-addr-box {
  background: rgba(10,16,36,0.92);
  border: 1px solid rgba(107,78,255,0.14);
  border-radius: 12px;
  padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.usdt-addr { font-size: 11px; color: #E2E8F0; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.usdt-copy-btn {
  align-self: flex-end;
  background: rgba(107,78,255,0.14);
  color: #A99CFF;
  border: 1px solid rgba(107,78,255,0.28);
  border-radius: 8px;
  font-size: 10.5px; font-weight: 800;
  padding: 5px 12px; cursor: pointer;
  transition: all 0.14s ease;
}
.usdt-copy-btn:hover { background: #6B4EFF; color: #FFF; border-color: #6B4EFF; }
.usdt-orders { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.usdt-order-row {
  display: flex; align-items: center; gap: 8px;
  background: rgba(15,23,42,0.50);
  border: 1px solid rgba(148,163,184,0.15);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 10.5px; color: #CBD5E1;
  flex-wrap: wrap;
}
.usdt-order-amt { font-weight: 800; color: #E2E8F0; }
.usdt-order-chain { text-transform: capitalize; color: #94A3B8; }
.usdt-order-note { flex: 1; min-width: 120px; color: #94A3B8; }
.usdt-tx-link { color: #34D399; text-decoration: none; }
.usdt-tx-link:hover { text-decoration: underline; }
.usdt-chip { font-size: 9.5px; font-weight: 800; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.usdt-chip-pending { background: rgba(245,158,11,0.15); color: #FBBF24; }
.usdt-chip-ok { background: rgba(16,185,129,0.15); color: #34D399; }
.usdt-chip-busy { background: rgba(59,130,246,0.15); color: #60A5FA; }
.usdt-chip-err { background: rgba(239,68,68,0.15); color: #F87171; }

/* Crypto wallet rows (Profile) */
.cw-row {
  display: flex; align-items: center; gap: 8px;
  background: rgba(15,23,42,0.55);
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 8px;
  padding: 7px 9px;
}
.cw-idx { font-size: 10px; font-weight: 800; color: #94A3B8; }
.cw-addr { flex: 1; font-size: 10.5px; color: #E2E8F0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.cw-actions { display: flex; gap: 4px; }
.cw-btn {
  background: rgba(148,163,184,0.10);
  border: 1px solid rgba(148,163,184,0.25);
  border-radius: 6px;
  font-size: 11px;
  padding: 3px 7px;
  cursor: pointer;
  color: #CBD5E1;
  flex-shrink: 0;
}
.cw-btn-del:hover { background: rgba(239,68,68,0.20); border-color: rgba(239,68,68,0.5); }

/* --- Wallet manager modal (profile popup) extras --- */
.wm-chain-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15,23,42,0.50);
  border: 1px solid rgba(148,163,184,0.15);
  border-radius: 8px;
  padding: 7px 10px;
  margin-bottom: 10px;
}
.wm-chain-strip img {
  width: 20px; height: 20px;
  border-radius: 50%;
  object-fit: cover;
  background: #0B1220;
}
.wm-chain-strip span { font-size: 9.5px; color: #94A3B8; margin-left: 2px; }
.wm-sublabel { font-size: 9.5px; color: #94A3B8; margin: 2px 0 6px; text-transform: uppercase; letter-spacing: .6px; }
.wm-chain-pick { margin-bottom: 10px; }
.wm-chain-badge {
  display: inline-flex; align-items: center; gap: 4px;
  flex-shrink: 0;
  padding: 2px 8px 2px 3px;
  border-radius: 999px;
  background: rgba(148,163,184,0.10);
  border: 1px solid rgba(148,163,184,0.22);
  font-size: 9px; font-weight: 700; color: #CBD5E1;
  letter-spacing: .2px; white-space: nowrap;
}
.wm-chain-badge img { width: 14px; height: 14px; border-radius: 50%; object-fit: cover; background: #0B1220; }
.wm-chain-any { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.25); color: #6EE7B7; }
.wm-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  color: #34D399;
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.30);
  padding: 1px 8px;
  border-radius: 99px;
  vertical-align: 1px;
}
.wm-empty {
  font-size: 10.5px;
  color: #94A3B8;
  background: rgba(15,23,42,0.50);
  border: 1px dashed rgba(148,163,184,0.25);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}
.wm-note {
  margin: 10px 0 0;
  font-size: 9.5px;
  color: #64748B;
  line-height: 1.45;
}


/* — Win/Defeat player badges — */
.vic-player-badge, .defeat-player-badge {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 12px;
  border-radius: 16px;
  z-index: 1;
}
.win-badge { background: rgba(16,185,129,0.09); border: 1px solid rgba(16,185,129,0.22); }
.defeat-player-badge { background: rgba(139,92,246,0.08); border: 1px solid rgba(139,92,246,0.20); }
.vic-avatar, .defeat-avatar { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; overflow: hidden; border: 2px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.06); }
.vic-name, .defeat-name { font-size: 15px; font-weight: 900; color: #FFF; }
.defeat-label { font-size: 10px; font-weight: 800; color: #A78BFA; letter-spacing: 0.6px; }
.victory-summary-card { width: 100%; background: rgba(0,0,0,0.22); border: 1px solid rgba(255,255,255,0.07); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; z-index: 1; }
.win-summary { border-color: rgba(16,185,129,0.18); }
.loss-summary { border-color: rgba(139,92,246,0.15); }
.vsc-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.vsc-row span { color: #94A3B8; font-weight: 600; }
.vsc-row strong { color: #F1F5F9; font-weight: 900; }
.vsc-net { border-top: 1px solid rgba(255,255,255,0.07); padding-top: 8px; margin-top: 2px; }
.win-net strong { color: #6EE7B7; font-size: 13.5px; }
.loss-net strong { color: #FCA5A5; }
.life-hearts { display: flex; gap: 6px; z-index: 1; }
.lh { font-size: 22px; filter: grayscale(1) opacity(0.45); }
.lh.lost { filter: none; opacity: 1; animation: heartBreak 0.5s ease; }
@keyframes heartBreak { 0% { transform: scale(1); } 50% { transform: scale(1.25); } 100% { transform: scale(1); } }
.life-stat-card { width: 100%; background: rgba(127,29,29,0.14); border: 1px solid rgba(239,68,68,0.22); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; z-index: 1; }
.life-net strong { color: #FCA5A5; }
.life-tip { font-size: 10.5px; color: #FECACA; opacity: 0.85; font-weight: 600; }
.back-warning-card { width: 100%; background: rgba(120,90,10,0.13); border: 1px solid rgba(245,158,11,0.20); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; z-index: 1; }
.back-row { display: flex; justify-content: space-between; align-items: center; font-size: 11px; gap: 10px; }
.back-row span { color: #AFC0D8; font-weight: 600; text-align: left; }
.back-row strong { color: #FDE68A; font-weight: 800; text-align: right; font-size: 10.5px; }
.back-net strong { color: #FCA5A5; }
.result-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; z-index: 1; margin-top: 2px; }
.result-actions:has(.btn-win:only-child), .result-actions:has(.btn-stay:only-child) { grid-template-columns: 1fr; }
.btn-result { min-height: 48px; border-radius: 14px; font-size: 13px; font-weight: 900; cursor: pointer; border: 1px solid rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; gap: 6px; transition: transform 0.12s, box-shadow 0.12s; }
.btn-result:active { transform: scale(0.97); }
.btn-win { background: linear-gradient(135deg, #10B981, #059669); color: #FFF; border-color: rgba(16,185,129,0.45); box-shadow: 0 8px 20px rgba(16,185,129,0.35); }
.btn-loss { background: rgba(255,255,255,0.07); color: #DDD6FE; border-color: rgba(139,92,246,0.28); }
.btn-retry { background: linear-gradient(135deg, #8B5CF6, #7C3AED); color: #FFF; border-color: rgba(139,92,246,0.45); box-shadow: 0 8px 20px rgba(139,92,246,0.30); }
.btn-life { background: rgba(255,255,255,0.07); color: #FECACA; border-color: rgba(239,68,68,0.28); }
.btn-retry-life { background: linear-gradient(135deg, #EF4444, #DC2626); color: #FFF; border-color: rgba(239,68,68,0.45); box-shadow: 0 8px 20px rgba(239,68,68,0.30); }
.btn-stay { background: linear-gradient(135deg, #10B981, #059669); color: #FFF; border-color: rgba(16,185,129,0.45); box-shadow: 0 8px 20px rgba(16,185,129,0.32); }
.btn-leave { background: rgba(127,29,29,0.22); color: #FCA5A5; border-color: rgba(239,68,68,0.35); }
@media (max-width: 380px) { .result-modal { max-width: 94vw; padding: 24px 16px; } .result-icon-wrap { width: 68px; height: 68px; font-size: 34px; } .result-title { font-size: 23px; } }

/* ===== r63: Phone + Password Auth ===== */
.phone-auth-box { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.auth-row { display: flex; gap: 8px; }
.auth-dial-select {
  background: rgba(15,23,42,0.75); color: #F8FAFC; border: 1px solid rgba(148,163,184,0.25);
  border-radius: 12px; padding: 0 10px; font-size: 14.5px; outline: none; min-width: 104px;
}
.auth-dial-select:focus { border-color: #38BDF8; }
.auth-input {
  flex: 1; width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.25); background: rgba(15,23,42,0.75);
  color: #F8FAFC; font-size: 15px; outline: none; box-sizing: border-box;
}
.auth-input:focus { border-color: #38BDF8; box-shadow: 0 0 0 3px rgba(56,189,248,0.15); }
.auth-input::placeholder { color: #64748B; }
.auth-actions { display: flex; gap: 10px; margin-top: 2px; }
.btn-auth-primary {
  flex: 1.15; padding: 13px 10px; border: none; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, #22C55E, #16A34A); color: #fff;
  font-weight: 800; font-size: 15px; letter-spacing: 0.2px;
}
.btn-auth-primary:hover { filter: brightness(1.08); }
.btn-auth-primary:active { transform: scale(0.98); }
.btn-auth-secondary {
  flex: 1; padding: 13px 10px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(56,189,248,0.45); background: rgba(56,189,248,0.1);
  color: #38BDF8; font-weight: 800; font-size: 15px;
}
.btn-auth-secondary:hover { background: rgba(56,189,248,0.18); }
.btn-auth-secondary:active { transform: scale(0.98); }
.btn-auth-primary:disabled, .btn-auth-secondary:disabled { opacity: 0.55; cursor: not-allowed; }
.auth-permanent-note {
  margin: 2px 0 0; font-size: 11px; color: #94A3B8; text-align: center; line-height: 1.4;
}
.auth-mode-toggle {
  margin: 2px 0 0; font-size: 13px; color: #94A3B8; text-align: center;
}
.auth-mode-toggle a {
  color: #38BDF8; font-weight: 700; text-decoration: none; cursor: pointer;
}
.auth-mode-toggle a:hover { text-decoration: underline; }

/* r70: admin panel entry (profile) — visible only for the admin account */
.btn-admin-panel {
  display: none; width: calc(100% - 8px); margin: 12px auto 0; padding: 13px 10px;
  border: none; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, #A78BFA, #6366F1); color: #fff;
  font-weight: 800; font-size: 14px; letter-spacing: .3px;
}
.btn-admin-panel:active { transform: scale(.98); }

/* ============ r102: FRIENDS PLAY HUB + TEAM 2v2 ============ */
.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mode-card {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 13px 6px 11px; border-radius: 14px; cursor: pointer;
  background: linear-gradient(160deg, rgba(56,189,248,.12), rgba(99,102,241,.10));
  border: 1.5px solid rgba(56,189,248,.28); color: #EAF2FF;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.mode-card:active { transform: scale(.96); }
.mode-card.active { border-color: #38BDF8; box-shadow: 0 0 0 1.5px rgba(56,189,248,.45), 0 6px 18px rgba(56,189,248,.25); }
.mode-ico { font-size: 24px; line-height: 1; }
.mode-card strong { font-x; cursor: pointer;
  background: linear-gradient(160deg, rgba(56,189,248,.12), rgba(99,102,241,.10));
  border: 1.5px solid rgba(56,189,248,.28); color: #EAF2FF;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.mode-card:active { transform: scale(.96); }
.mode-card.active { border-color: #38BDF8; box-shadow: 0 0 0 1.5px rgba(56,189,248,.45), 0 6px 18px rgba(56,189,248,.25); }
.mode-ico { font-size: 24px; line-height: 1; }
.mode-card strong { font-size: 13px; font-weight: 800; }
.mode-card small { font-size: 10.5px; color: #9FB3C8; text-align: center; line-height: 1.35; }
.op-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 12px; margin-bottom: 8px;
  background: rgba(34,197,94,.07); border: 1px solid rgba(34,197,94,.22);
}
.op-invite {
  margin-left: auto; border: none; border-radius: 10px; padding: 8px 13px;
  background: linear-gradient(135deg, #22C55E, #16A34A); color: #fff;
  font-weight: 800; font-size: 12.5px; cursor: pointer; flex-shrink: 0;
}
.op-invite:active { transform: scale(.95); }
.dw-tag { font-size: 9px; font-weight: 900; letter-spacing: .6px; color: #FBBF24; }
.fr-invite-teams {
  margin: 8px 0 0; padding: 9px 12px; border-radius: 11px; text-align: center;
  background: linear-gradient(135deg, rgba(56,189,248,.14), rgba(168,85,247,.14));
  border: 1px solid rgba(56,189,248,.35); color: #EAF2FF;
  font-size: 13px; font-weight: 700; line-height: 1.5;
}
.team-score-strip {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 5px 10px 7px; font-size: 12px; color: #CBD5E1;
}
.ts-team { background: rgba(15,23,42,.75); border: 1px solid rgba(148,163,184,.3); border-radius: 20px; padding: 3px 11px; white-space: nowrap; }
.ts-team b { color: #FBBF24; }
.ts-mine { border-color: rgba(56,189,248,.6); box-shadow: 0 0 10px rgba(56,189,248,.25); }
.ts-vs { font-weight: 900; color: #64748B; font-size: 11px; }

/* ==========================================
   R103: PLAY PAGE (arena design — distinct from the friends list)
   ========================================== */
/* r176: Friends List pill (play-screen topbar). Gradient + glow in the app's
   chip language, and a self-describing label instead of the bare "List". */
.play-manage-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(167, 139, 250, 0.45);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.30), rgba(124, 58, 237, 0.22));
  color: #EDE9FE;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: .2px;
  padding: 7px 14px 7px 11px;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.play-manage-btn:active { transform: scale(0.96); }
.play-manage-btn .pm-ico { font-size: 14px; line-height: 1; }
.play-lobby-banner {
  display: block;
  width: 100%;
  margin: 10px 0 0;
  padding: 12px;
  border: 1px solid rgba(251, 191, 36, 0.55);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(245, 158, 11, 0.1));
  color: #FDE68A;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  animation: playBannerPulse 1.6s ease-in-out infinite;
}
@keyframes playBannerPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(251, 191, 36, 0); }
  50% { box-shadow: 0 0 18px rgba(251, 191, 36, 0.45); }
}
.play-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(59, 130, 246, 0.16) 55%, rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.35);
  position: relative;
  overflow: hidden;
}
.play-hero::after {
  content: '⚔️👥🛡️';
  position: absolute;
  right: 10px;
  top: 8px;
  font-size: 24px;
  opacity: 0.14;
  pointer-events: none;
  z-index: 0;
  white-space: nowrap;
}
.play-hero > * { position: relative; z-index: 1; }
.play-hero > div { flex: 1; min-width: 0; }
.play-hero-icon { font-size: 40px; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.5)); }
.play-hero h2 { margin: 0; color: #F8FAFC; font-size: 18px; font-weight: 900; }
.play-hero p { margin: 3px 0 0; color: #BAE6FD; font-size: 11.5px; font-weight: 600; }
.play-panel {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
}
.play-panel-title { color: #7DD3FC; font-size: 13px; font-weight: 900; margin-bottom: 12px; letter-spacing: 0.4px; text-transform: uppercase; }
/* R104: one Create button (mode cards gone — Single/Team picked inside the lobby) */
.play-create-btn {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  margin: 12px 0;
  padding: 16px;
  border-radius: 17px;
  border: 1px solid rgba(52, 211, 153, 0.5);
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.65), rgba(12, 74, 110, 0.65));
  cursor: pointer;
  text-align: left;
  box-shadow: 0 5px 22px rgba(52, 211, 153, 0.25);
}
.play-create-btn:active { transform: scale(0.98); }
.pcb-ico { font-size: 34px; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.5)); }
.pcb-copy { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pcb-copy strong { color: #ECFDF5; font-size: 16px; font-weight: 900; }
.pcb-copy small { color: #6EE7B7; font-size: 11px; font-weight: 600; }
.pcb-arrow { color: #6EE7B7; font-size: 26px; font-weight: 900; }
/* R104: lobby Single/Team switcher (host taps, others watch) */
.flobby-mode-row { display: flex; gap: 9px; margin: 2px 0 6px; }
.fm-opt {
  flex: 1;
  padding: 11px 8px;
  border-radius: 13px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.78);
  color: #94A3B8;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.fm-opt.fm-on {
  color: #F8FAFC;
  border-color: #38BDF8;
  background: linear-gradient(135deg, rgba(12, 74, 110, 0.8), rgba(30, 27, 75, 0.8));
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
}
.fm-opt:disabled { cursor: not-allowed; }
/* r106: guests see the mode switch is host-locked (active mode stays glowing) */
.fm-opt:disabled:not(.fm-on) { opacity: 0.45; }
.flobby-need { color: #7DD3FC; font-size: 11px; font-weight: 700; margin: 0 2px 12px; }
/* r109: host entry picker inside the lobby */
.flobby-bet-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.bet-opt { padding: 10px 4px; border-radius: 12px; border: 1px solid rgba(148, 163, 184, 0.35); background: rgba(15, 23, 42, 0.78); color: #CBD5E1; font-weight: 800; font-size: 13px; }
.bet-opt.bet-on { color: #F8FAFC; border-color: #F59E0B; background: linear-gradient(135deg, rgba(120, 53, 15, 0.85), rgba(30, 27, 75, 0.85)); box-shadow: 0 0 14px rgba(245, 158, 11, 0.35); }
.play-link-card {
  display: block;
  width: 100%;
  padding: 13px;
  border-radius: 13px;
  border: 1px dashed rgba(196, 181, 253, 0.5);
  background: rgba(139, 92, 246, 0.08);
  color: #DDD6FE;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  margin-bottom: 14px;
}
.play-link-card:active { transform: scale(0.98); }

/* r138n: Play page = matchmaking lobby (FF START + squad slots) */
#screen-play {
  overflow-y: auto;
  padding: 10px 10px 8px;
  gap: 8px;
}
.play-mm-hero { margin-top: 8px; }
.play-mm-panel { margin-bottom: 8px; padding: 10px; }
#screen-play .section-heading { margin-top: 6px; }
/* r179: .ol-refresh is a flex chip everywhere now */
.play-start-dock {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: auto;
  padding: 8px 4px 4px;
  flex-shrink: 0;
}
.play-party-slots {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.play-slot {
  width: 46px;
  height: 52px;
  border-radius: 12px;
  border: 1.5px dashed rgba(251, 191, 36, 0.45);
  background: rgba(15, 23, 42, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
  color: #FDE68A;
  cursor: pointer;
  overflow: hidden;
}
.play-slot.filled {
  border-style: solid;
  border-color: rgba(251, 191, 36, 0.7);
  background: linear-gradient(180deg, #1E293B, #0F172A);
}
.play-slot .fr-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
}
.play-slot .fr-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.play-slot-plus { font-size: 22px; font-weight: 900; line-height: 1; color: #FBBF24; }
.play-slot-name {
  font-size: 8px;
  font-weight: 800;
  color: #E2E8F0;
  max-width: 44px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.play-start-btn {
  flex: 0 0 auto;
  min-width: 112px;
  height: 64px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #FBBF24 0%, #F59E0B 55%, #D97706 100%);
  color: #1C0A00;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45), inset 0 1px 0 rgba(255,255,255,0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  cursor: pointer;
  padding: 6px 14px;
}
.play-start-btn:active { transform: scale(0.97); }
.play-start-kicker {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.4px;
  opacity: 0.7;
}
.play-start-label {
  font-size: 20px;
  font-weight: 950;
  letter-spacing: 1.5px;
  line-height: 1;
}
.play-start-sub { font-size: 9px; font-weight: 800; opacity: 0.75; }
/* r176: Online-friends tile beside the Start Match CTA. Teal gradient + glow
   in the app's icon language, replacing the flat dark square that held the
   3D-render PNG. Height is auto so it stretches level with the hero button. */
.play-ff-icon {
  position: relative;
  width: 48px;
  height: auto;
  align-self: stretch;
  border-radius: 14px;
  border: 1.5px solid rgba(45, 212, 191, 0.5);
  background: linear-gradient(180deg, #2DD4BF, #0D9488);
  color: #04211E;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(13, 148, 136, 0.4), 0 0 16px rgba(45, 212, 191, 0.35);
  transition: transform 0.12s ease;
}
.play-ff-icon:active { transform: scale(0.94); }
.play-ff-glyph { font-size: 24px; line-height: 1; }
.play-ff-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: linear-gradient(135deg, #F59E0B, #F97316);
  color: #1C0A00;
  font-size: 10px;
  font-weight: 900;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid #0B1020;
}
.play-ff-manage {
  display: block;
  width: 100%;
  margin: 2px 0 4px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: #94A3B8;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  letter-spacing: 0.2px;
}
.play-ff-manage:active { color: #E2E8F0; }

/* R103: promo card on the friends list page -> play page */
.friends-play-promo {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 12px 0;
  padding: 13px 15px;
  border-radius: 15px;
  border: 1px solid rgba(52, 211, 153, 0.45);
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.6), rgba(8, 51, 68, 0.6));
  cursor: pointer;
  text-align: left;
}
.friends-play-promo:active { transform: scale(0.98); }
.fpp-ico { font-size: 28px; }
.fpp-copy { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.fpp-copy strong { color: #ECFDF5; font-size: 13.5px; font-weight: 900; }
.fpp-copy small { color: #6EE7B7; font-size: 11px; font-weight: 600; }
.fpp-arrow { color: #6EE7B7; font-size: 22px; font-weight: 900; }

/* ==========================================
   R103: FRIEND LOBBY (waiting room)
   ========================================== */
.flobby-bet {
  color: #FDE68A;
  font-size: 11.5px;
  font-weight: 900;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 999px;
  padding: 5px 11px;
  white-space: nowrap;
}
.flobby-sub { color: #94A3B8; font-size: 11.5px; font-weight: 700; margin: 10px 2px 12px; }
.flobby-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  margin-bottom: 9px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.flobby-badge {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 900;
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.flobby-host { color: #FDE68A; background: rgba(251, 191, 36, 0.15); border: 1px solid rgba(251, 191, 36, 0.5); }
.flobby-ready { color: #6EE7B7; background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.45); }
.flobby-wait { color: #94A3B8; background: rgba(148, 163, 184, 0.1); border: 1px solid rgba(148, 163, 184, 0.3); }
.flobby-teams { display: flex; align-items: stretch; gap: 6px; }
.flobby-team { flex: 1; border-radius: 15px; padding: 10px 7px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.flobby-team .flobby-slot {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 10px 6px 9px;
  margin-bottom: 0;
  position: relative;
}
.flobby-team .flobby-slot .fr-avatar { width: 44px; height: 44px; font-size: 24px; }
.flobby-team .flobby-slot .fr-meta { width: 100%; align-items: center; }
.flobby-team .flobby-slot .fr-meta strong { font-size: 11px; text-align: center; max-width: 100%; }
.flobby-team .flobby-slot .fr-meta small { font-size: 9px; }
.flobby-team .flobby-badge { margin-left: 0; font-size: 9px; padding: 4px 8px; }
.flobby-team .flobby-swap { position: absolute; top: 6px; right: 6px; padding: 4px 7px; font-size: 12px; }
.flobby-team-a { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.45); }
.flobby-team-b { background: rgba(244, 63, 94, 0.1); border: 1px solid rgba(244, 63, 94, 0.45); }
.flobby-team-title { text-align: center; font-size: 11px; font-weight: 900; color: #F8FAFC; margin-bottom: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flobby-vs { align-self: center; font-size: 11px; font-weight: 900; color: #64748B; flex-shrink: 0; }
.flobby-swap {
  flex-shrink: 0;
  border: 1px solid var(--border-line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  color: #E2E8F0;
  font-size: 14px;
  font-weight: 900;
  padding: 5px 9px;
  cursor: pointer;
}
.flobby-swap:active { transform: scale(0.94); }
.flobby-actions { display: flex; flex-direction: column; gap: 9px; margin: 12px 0 16px; }
.flobby-btn { width: 100%; flex: none; }
.fr-ready-btn {
  flex: none;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #059669, #34D399);
  color: #FFF;
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(52, 211, 153, 0.4);
}
.fr-ready-btn:active { transform: scale(0.97); }
.fr-start-btn {
  flex: none;
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #DC2626, #F59E0B);
  color: #FFF;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.8px;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(245, 158, 11, 0.45);
  animation: playBannerPulse 1.8s ease-in-out infinite;
}
.fr-start-btn:active { transform: scale(0.97); }

/* ================= r107: loading FX ================= */
/* Universal busy-button: spinner + dim + double-tap guard. */
.btn-busy { position: relative; pointer-events: none !important; opacity: 0.8; }
.busy-spin {
  display: inline-block;
  width: 0.95em; height: 0.95em;
  margin-right: 7px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: busyRot 0.7s linear infinite;
  vertical-align: -1px;
}
.btn-busy > .busy-spin:only-child { margin-right: 0; }
@keyframes busyRot { to { transform: rotate(360deg); } }
/* Skeleton shimmer rows for async lists (friends, search, inspect). */
.skel-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 8px;
  border-radius: 12px; background: rgba(30, 41, 59, 0.5);
  overflow: hidden; position: relative;
}
.skel-row::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(148, 163, 184, 0.18) 50%, transparent 80%);
  animation: skelSlide 1.3s ease-in-out infinite;
}
.skel-ava { width: 34px; height: 34px; border-radius: 50%; background: rgba(71, 85, 105, 0.7); flex: none; }
.skel-line { height: 11px; border-radius: 6px; background: rgba(71, 85, 105, 0.7); }
@keyframes skelSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
/* Screens glide in instead of hard-cutting. r213: Fix refresh screen move - remove translateY that caused jump for milliseconds */
.screen.active { animation: screenIn 0.22s ease-out; }
@keyframes screenIn { from { opacity: 0; } to { opacity: 1; } }

/* ================= r108: open lobbies + kick ================= */
/* r179: .ol-refresh styled with the drawer block above (labelled chip) */
.ol-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border-radius: 12px; background: rgba(30,41,59,.55); border: 1px solid rgba(148,163,184,.14); }
.ol-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ol-meta strong { color: #F8FAFC; font-size: 13px; font-weight: 900; }
.ol-meta small { color: #94A3B8; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ol-join { flex: none; background: linear-gradient(135deg,#16A34A,#059669); color: #fff; border: none; border-radius: 10px; padding: 9px 14px; font-size: 12px; font-weight: 900; cursor: pointer; }
.ol-join:disabled { opacity: .45; cursor: not-allowed; }
.ol-mine { background: linear-gradient(135deg,#0284C7,#4F46E5); }
.flobby-kick { flex: none; background: rgba(127,29,29,.5); border: 1px solid rgba(248,113,113,.4); border-radius: 9px; padding: 4px 7px; font-size: 11px; cursor: pointer; }

/* ── r111 ────────────────────────────────────────────────────────────────
   Friend lobby: presence clarity, join requests, Public/Private switch.
   ─────────────────────────────────────────────────────────────────────── */

/* "Online" must actually look online: the green dot breathes. */
@keyframes frPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,.55), 0 0 7px rgba(16,185,129,.95); }
  50%      { box-shadow: 0 0 0 4px rgba(16,185,129,0),  0 0 7px rgba(16,185,129,.95); }
}
.fr-on { animation: frPulse 2.4s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .fr-on { animation: none; } }

/* r113: JOIN a friend's public lobby straight from the Friends list. */
.fr-btn.fr-join-lobby { width: auto; padding: 0 12px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; }
/* ➕ Invite's sibling: 📨 request to join a friend's lobby. */
.fr-btn.fr-request, .fr-btn.fr-join-lobby {
  background: linear-gradient(135deg,#0EA5E9,#6366F1);
  border-color: rgba(56,189,248,.5);
  color: #fff;
  box-shadow: 0 3px 12px rgba(14,165,233,.35);
}
.fr-btn.fr-request:active { transform: scale(.95); }

/* Open Lobbies: a friend's lobby row + its REQUEST button. */
.ol-row.ol-friend { background: rgba(14,165,233,.10); border-color: rgba(56,189,248,.28); }
.ol-friendtag {
  display: inline-block; margin-left: 5px; padding: 1px 5px; border-radius: 6px;
  background: rgba(56,189,248,.18); border: 1px solid rgba(56,189,248,.35);
  color: #7DD3FC; font-size: 8px; font-weight: 900; letter-spacing: .4px; vertical-align: 1px;
}
.ol-request { background: linear-gradient(135deg,#0EA5E9,#6366F1); }

/* Public / Private switch — a real control, not a label that looks like one. */
.flobby-vis {
  margin: 2px 0 4px; padding: 11px 12px 10px; border-radius: 14px;
  background: rgba(15,23,42,.55); border: 1px solid rgba(148,163,184,.16);
}
.flobby-vis-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.flobby-vis-title { color: #F1F5F9; font-size: 12px; font-weight: 900; }
.flobby-vis-state {
  flex: none; padding: 2px 8px; border-radius: 999px; font-size: 8px; font-weight: 900; letter-spacing: .6px;
  background: rgba(148,163,184,.18); border: 1px solid rgba(148,163,184,.3); color: #CBD5E1;
}
.flobby-vis-state.on { background: rgba(16,185,129,.18); border-color: rgba(16,185,129,.45); color: #6EE7B7; }
.flobby-vis-track {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  padding: 4px; border-radius: 12px; background: rgba(2,6,23,.7);
  border: 1px solid rgba(148,163,184,.18); overflow: hidden;
}
.flobby-vis-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; right: 4px;
  border-radius: 9px;
  transition: left .24s cubic-bezier(.4,0,.2,1), right .24s cubic-bezier(.4,0,.2,1), background .24s, box-shadow .24s;
  pointer-events: none;
}
/* left/right (not transform) so the thumb always lands exactly on its half */
.vis-pub .flobby-vis-thumb { left: 4px; right: 50%; background: linear-gradient(135deg,#16A34A,#059669); box-shadow: 0 3px 12px rgba(22,163,74,.45); }
.vis-priv .flobby-vis-thumb { left: 50%; right: 4px; background: linear-gradient(135deg,#64748B,#334155); box-shadow: 0 3px 12px rgba(51,65,85,.5); }
.flobby-vis-opt {
  position: relative; z-index: 1; border: none; background: transparent; cursor: pointer;
  padding: 8px 6px; border-radius: 9px; font-size: 11px; font-weight: 900;
  color: #94A3B8; transition: color .2s; text-align: center;
}
span.flobby-vis-opt { cursor: default; }
.flobby-vis-opt.vis-on { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.flobby-vis-hint { margin-top: 8px; color: var(--text-muted); font-size: 10px; font-weight: 600; line-height: 1.45; }

/* Host's join-request queue inside the lobby. */
.flobby-reqs {
  margin-top: 4px; padding: 10px 11px; border-radius: 14px;
  background: rgba(14,165,233,.08); border: 1px solid rgba(56,189,248,.25);
  display: flex; flex-direction: column; gap: 8px;
}
.flobby-reqs-title { color: #BAE6FD; font-size: 11px; font-weight: 900; letter-spacing: .3px; }
.flobby-reqs-n {
  display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px;
  background: #0EA5E9; color: #04121F; font-size: 9px; font-weight: 900;
}
.flobby-req { display: flex; align-items: center; gap: 9px; }
.flobby-req-btn {
  flex: none; width: 30px; height: 30px; border-radius: 9px; cursor: pointer;
  font-size: 12px; font-weight: 900; display: grid; place-items: center;
  transition: transform .12s, box-shadow .12s;
}
.flobby-req-btn:active { transform: scale(.93); }
.flobby-req-ok { background: linear-gradient(135deg,#16A34A,#059669); border: 1px solid rgba(74,222,128,.5); color: #fff; box-shadow: 0 3px 10px rgba(22,163,74,.35); }
.flobby-req-no { background: rgba(127,29,29,.5); border: 1px solid rgba(248,113,113,.4); color: #FCA5A5; }


/* ── r114: tappable avatars → profile card ─────────────────────────────── */
.fr-avatar-tap { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.fr-avatar-tap:active { transform: scale(.92); }
.fr-avatar-tap:hover { box-shadow: 0 0 0 2px rgba(56,189,248,.55); }

/* r114: JOIN from the Online Friends drawer (Free Fire style) */
.dw-join {
  margin-left: auto; flex-shrink: 0;
  padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(56,189,248,.5);
  background: linear-gradient(135deg,#0EA5E9,#6366F1); color: #fff;
  font-size: .72rem; font-weight: 900; letter-spacing: .05em; cursor: pointer;
  box-shadow: 0 3px 12px rgba(14,165,233,.35); transition: transform .12s, opacity .12s;
}
.dw-join:active { transform: scale(.94); }
.dw-join:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
/* r179: .dw-lock styled as a readable pill in the drawer block above */

/* r114: profile card UID chip with real copy feedback */
.insp-uid-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(56,189,248,.10); border: 1px solid rgba(56,189,248,.35);
  padding: 5px 10px; border-radius: 8px; cursor: pointer; color: #38BDF8;
  font-family: inherit; transition: background .15s, border-color .15s, transform .12s, box-shadow .15s;
}
.insp-uid-chip:active { transform: scale(.96); }
.insp-uid-chip #insp-player-uid { font-size: 12.5px; font-weight: 800; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.insp-copy-label { font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 5px; background: rgba(56,189,248,.18); transition: background .15s, color .15s; }
.insp-uid-chip.insp-copied {
  background: rgba(16,185,129,.16); border-color: rgba(16,185,129,.7); color: #10B981;
  animation: inspCopyPulse .5s ease-out;
}
.insp-uid-chip.insp-copied .insp-copy-label { background: #10B981; color: #04150d; }
@keyframes inspCopyPulse {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,.65); }
  100% { box-shadow: 0 0 0 12px rgba(16,185,129,0); }
}

/* ===== r116: professional profile — quick action tiles + history popups ===== */
.profile-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 14px 0;
}
.pa-tile {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 14px 12px 12px;
  border-radius: 16px;
  background: rgba(22,26,46,0.96);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 16px rgba(0,0,0,0.16);
  cursor: pointer;
  color: #FFF;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.pa-tile::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #6B4EFF, #8B7CF6);
}
.pa-coins::before   { background: linear-gradient(90deg, #F8C75B, #F59E0B); }
.pa-matches::before { background: linear-gradient(90deg, #22D3EE, #3B82F6); }
.pa-gift::before    { background: linear-gradient(90deg, #F472B6, #EC4899); }
.pa-ton::before     { background: linear-gradient(90deg, #5EEAD4, #38BDF8); }
.pa-tile:hover  { transform: translateY(-2px); border-color: rgba(107,78,255,0.28); box-shadow: 0 10px 24px rgba(0,0,0,0.30); }
.pa-tile:active { transform: translateY(0); }
.pa-ico {
  width: 36px; height: 36px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; background: rgba(255,255,255,0.06); margin-bottom: 4px;
}
.pa-coins .pa-ico   { background: rgba(248,199,91,0.14); }
.pa-matches .pa-ico { background: rgba(34,211,238,0.14); }
.pa-gift .pa-ico    { background: rgba(244,114,182,0.16); }
.pa-ton .pa-ico     { background: rgba(94,234,212,0.14); }
.pa-title { font-size: 12px; font-weight: 900; line-height: 1.15; }
.pa-sub   { font-size: 9.5px; font-weight: 700; color: #9AA3C7; }
@media (max-width: 360px) {
  .profile-actions { grid-template-columns: 1fr 1fr; }
  .pa-gift { grid-column: span 2; }
}
.hist-modal-box { max-width: 460px; width: 100%; max-height: 82vh; display: flex; flex-direction: column; }
.hist-modal-box .usdm-head { margin-bottom: 10px; }
.hist-modal-refresh { margin-left: auto; padding: 6px 9px; font-size: 12px; line-height: 1; }
.hist-modal-box .usdm-close { margin-left: 6px; }
.hist-modal-list { overflow-y: auto; max-height: calc(82vh - 90px); padding-right: 2px; scrollbar-width: thin; }
.hist-modal-list::-webkit-scrollbar { width: 4px; }
.hist-modal-list::-webkit-scrollbar-thumb { background: rgba(107,78,255,0.35); border-radius: 4px; }
.profile-global .btn-logout-card { margin-top: 14px; }

/* ===== r117: profile redesign ===== */
.profile-hero { padding: 18px 16px 16px; }
.profile-hero-content { flex-direction: row; align-items: center; text-align: left; gap: 14px; flex-wrap: wrap; }
.ph-hero-avatar { width: 72px; height: 72px; border-radius: 20px; font-size: 32px; }
.ph-identity { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ph-name-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ph-hero-name { margin: 0; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-hero .btn-set-name-mini { padding: 2px 6px; font-size: 11px; border-radius: 8px; }
.ph-hero-email { font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-id-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.ph-id-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px; padding: 4px 8px 4px 9px; cursor: pointer; color: #FFF;
  transition: border-color .12s ease, background .12s ease;
}
.ph-id-chip:hover { border-color: rgba(107,78,255,0.35); background: rgba(107,78,255,0.10); }
.ph-id-chip.copied { border-color: rgba(34,197,94,0.6); background: rgba(34,197,94,0.14); }
.ph-id-k { font-size: 9px; font-weight: 900; color: #9AA3C7; letter-spacing: .6px; }
.ph-id-v { font-family: ui-monospace, monospace; font-size: 11.5px; font-weight: 900; color: #F8C75B; }
.ph-id-copy { font-size: 10px; opacity: .7; }
.profile-hero-content { flex-wrap: nowrap; }
.profile-hero .btn-admin-panel {
  display: none;
  width: auto;
  margin: 0 0 0 auto;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  border-radius: 999px;
  flex-shrink: 0;
  align-self: center;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #111;
  box-shadow: 0 3px 10px rgba(245,158,11,0.28);
}
.profile-hero .btn-admin-panel:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; }
#prof-role-panel-card[hidden] { display: none !important; }


.profile-stats-global { grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.psg-card { padding: 10px 6px 9px; align-items: center; text-align: center; gap: 4px; border-radius: 14px; }
.psg-card::before { height: 3px; }
.psg-body { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; }
.psg-icon { font-size: 16px; width: 30px; height: 30px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.psg-val { font-size: 15px; justify-content: center; }
.psg-lbl { font-size: 8.5px; letter-spacing: .4px; }
.psg-balance::before { background: linear-gradient(90deg, #F8C75B, #F59E0B); }
.psg-balance .psg-icon { background: rgba(248,199,91,0.14); }
.psg-balance .psg-val { color: #F8C75B; }
.psg-trophy::before { background: linear-gradient(90deg, #A78BFA, #6B4EFF); }
.psg-trophy .psg-icon { background: rgba(167,139,250,0.14); }
.psg-trophy .psg-val { color: #C4B5FD; }
.psg-matches::before { background: linear-gradient(90deg, #22D3EE, #3B82F6); }
.psg-matches .psg-icon { background: rgba(34,211,238,0.14); }
.psg-matches .psg-val { color: #67E8F9; }
.psg-winrate::before { background: linear-gradient(90deg, #4ADE80, #22C55E); }
.psg-winrate .psg-icon { background: rgba(74,222,128,0.14); }
.psg-winrate .psg-val { color: #86EFAC; }
@media (max-width: 360px) { .profile-stats-global { grid-template-columns: repeat(2, 1fr); } }

.gift-feature {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px; text-align: left;
  margin: 12px 14px 0; padding: 16px 14px; width: calc(100% - 28px);
  border-radius: 18px; cursor: pointer; color: #FFF;
  background: linear-gradient(135deg, #3B1D5E 0%, #6B2A7A 55%, #B03A7A 100%);
  border: 1px solid rgba(244,114,182,0.35);
  box-shadow: 0 12px 30px rgba(176,58,122,0.35), inset 0 1px 0 rgba(255,255,255,0.10);
  transition: transform .14s ease, box-shadow .14s ease;
}
.gift-feature:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(176,58,122,0.45); }
.gift-feature:active { transform: translateY(0); }
.gf-glow { position: absolute; right: -30px; top: -40px; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 65%); pointer-events: none; }
.gf-ico { width: 52px; height: 52px; border-radius: 16px; flex-shrink: 0; font-size: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.14); box-shadow: 0 6px 16px rgba(0,0,0,0.25); animation: gfPulse 2.4s ease-in-out infinite; }
@keyframes gfPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.gf-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; position: relative; }
.gf-title { font-size: 15px; font-weight: 950; letter-spacing: -0.2px; }
.gf-sub { font-size: 10.5px; font-weight: 700; color: rgba(255,255,255,0.78); }
.gf-cta { flex-shrink: 0; background: #FFF; color: #7A2A6A; font-size: 12px; font-weight: 950;
  padding: 8px 12px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0,0,0,0.25); position: relative; }

.profile-actions { grid-template-columns: 1fr 1fr; }

/* ===== r118: Rewards screen ===== */
.rewards-screen .token-balance-showcase { margin-bottom: 12px; }
.rw-card { position: relative; overflow: hidden; margin: 0 0 12px; padding: 14px; border-radius: 18px;
  background: rgba(22,26,46,0.96); border: 1px solid rgba(255,255,255,0.06); box-shadow: 0 6px 18px rgba(0,0,0,0.20); }
.rw-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.rw-daily::before { background: linear-gradient(90deg, #F8C75B, #F59E0B); }
.rw-video::before { background: linear-gradient(90deg, #22D3EE, #3B82F6); }
.rw-head { display: flex; align-items: center; gap: 12px; }
.rw-ico { width: 44px; height: 44px; border-radius: 14px; font-size: 22px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.06); }
.rw-daily .rw-ico { background: rgba(248,199,91,0.14); }
.rw-video .rw-ico { background: rgba(34,211,238,0.14); }
.rw-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rw-title { font-size: 14.5px; font-weight: 950; color: #FFF; }
.rw-sub { font-size: 10.5px; font-weight: 700; color: #9AA3C7; }
.rw-pill { font-size: 10px; font-weight: 900; padding: 4px 9px; border-radius: 999px; background: rgba(34,211,238,0.14); color: #67E8F9; border: 1px solid rgba(34,211,238,0.3); }
.rw-pill.done { background: rgba(255,255,255,0.06); color: #64748B; border-color: rgba(255,255,255,0.08); }
.rw-streak { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 12px 0; }
.rw-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px 6px; border-radius: 11px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); font-size: 9px; font-weight: 800; color: #9AA3C7; }
.rw-day b { font-size: 11px; color: #F8C75B; }
.rw-day.done { background: rgba(34,197,94,0.14); border-color: rgba(34,197,94,0.4); color: #86EFAC; }
.rw-day.done b { color: #86EFAC; }
.rw-day.today { background: rgba(248,199,91,0.16); border-color: #F59E0B; color: #FDE68A; box-shadow: 0 0 0 2px rgba(245,158,11,0.25); }
.rw-btn { width: 100%; margin-top: 10px; padding: 13px; border: none; border-radius: 14px; font-size: 14px; font-weight: 950; cursor: pointer; color: #FFF; transition: transform .12s ease, opacity .12s ease; }
.rw-btn:active { transform: scale(.98); }
.rw-btn:disabled { opacity: .5; cursor: not-allowed; }
.rw-btn-daily { background: linear-gradient(135deg, #F59E0B, #D97706); color: #1A1000; box-shadow: 0 8px 20px rgba(245,158,11,0.32); }
.rw-btn-video { background: linear-gradient(135deg, #2563EB, #06B6D4); box-shadow: 0 8px 20px rgba(37,99,235,0.32); }
.rw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rw-mini { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 13px 12px; border-radius: 16px; color: #FFF;
  background: rgba(22,26,46,0.96); border: 1px solid rgba(255,255,255,0.06); box-shadow: 0 4px 14px rgba(0,0,0,0.16); }
.rw-mini strong { font-size: 12.5px; font-weight: 900; }
.rw-mini span:last-child { font-size: 9.5px; font-weight: 700; color: #9AA3C7; }
.rw-mini-ico { font-size: 20px; margin-bottom: 4px; }
.rw-mini-btn { cursor: pointer; background: linear-gradient(135deg, #3B1D5E, #6B2A7A 60%, #B03A7A); border-color: rgba(244,114,182,0.35); }
.rw-mini-btn span:last-child { color: rgba(255,255,255,0.78); }
.rw-mini-btn:hover { transform: translateY(-1px); }
.ad-box { max-width: 380px; }
.ad-stage { position: relative; border-radius: 16px; padding: 26px 16px 18px; text-align: center; background: linear-gradient(145deg, #0B1020, #141A38); border: 1px solid rgba(255,255,255,0.06); }
.ad-tag { position: absolute; top: 8px; left: 10px; font-size: 9px; font-weight: 900; letter-spacing: .1em; color: #94A3B8; background: rgba(255,255,255,0.06); padding: 3px 7px; border-radius: 6px; }
.ad-visual { margin: 8px 0 16px; display: flex; justify-content: center; }
.ad-screen { position: relative; width: 168px; height: 96px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(160deg, #1E293B 0%, #0F172A 55%, #1E3A5F 100%);
  box-shadow: 0 12px 28px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.08); }
.ad-play { position: absolute; left: 50%; top: 50%; width: 0; height: 0; margin: -14px 0 0 -8px;
  border-style: solid; border-width: 14px 0 14px 24px; border-color: transparent transparent transparent rgba(255,255,255,.92);
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.4)); }
.ad-scan { position: absolute; inset: -40% 0 auto 0; height: 40%; background: linear-gradient(180deg, transparent, rgba(56,189,248,.18), transparent); animation: adScan 2.4s linear infinite; }
@keyframes adScan { to { transform: translateY(280%); } }
.ad-timer { height: 8px; border-radius: 6px; background: rgba(255,255,255,0.08); overflow: hidden; }
.ad-timer-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #22D3EE, #3B82F6); transition: width 1s linear; }
.ad-count { display: block; margin-top: 8px; font-size: 12px; font-weight: 800; color: #E2E8F0; }

/* ===== r119: Watch & Earn ===== */
.we-hero { position: relative; overflow: hidden; text-align: center; padding: 22px 16px 18px; border-radius: 22px; margin-bottom: 12px;
  background: linear-gradient(145deg, #0E1B3A 0%, #101534 60%, #1A1040 100%); border: 1px solid rgba(59,130,246,0.22); box-shadow: 0 12px 30px rgba(0,0,0,0.35); }
.we-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 10%, rgba(34,211,238,0.22), transparent 40%), radial-gradient(circle at 10% 90%, rgba(107,78,255,0.20), transparent 40%); pointer-events: none; }
.we-hero > * { position: relative; }
.we-badge { display: inline-block; font-size: 10px; font-weight: 900; letter-spacing: .14em; padding: 4px 12px; border-radius: 999px; background: rgba(34,211,238,0.14); color: #67E8F9; border: 1px solid rgba(34,211,238,0.35); }
.we-title { font-size: 21px; font-weight: 950; color: #FFF; margin-top: 10px; letter-spacing: -0.3px; }
.we-sub { font-size: 11px; font-weight: 700; color: #9AA3C7; margin-top: 6px; line-height: 1.45; }
.we-play { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 16px; border-radius: 20px; cursor: pointer; color: #FFF;
  background: linear-gradient(135deg, #2563EB 0%, #06B6D4 100%); border: none; box-shadow: 0 14px 34px rgba(37,99,235,0.40), inset 0 1px 0 rgba(255,255,255,0.18); transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease; }
.we-play:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(37,99,235,0.48); }
.we-play:active { transform: translateY(0); }
.we-play:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: 0 6px 16px rgba(0,0,0,0.25); }
.we-play-ico { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; font-size: 24px; display: inline-flex; align-items: center; justify-content: center; padding-left: 2px;
  background: rgba(255,255,255,0.18); box-shadow: 0 0 0 6px rgba(255,255,255,0.10); animation: gfPulse 2.2s ease-in-out infinite; }
.we-play-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.we-play-title { font-size: 17px; font-weight: 950; }
.we-play-sub { font-size: 11.5px; font-weight: 700; color: rgba(255,255,255,0.85); }
.we-play-sub b { font-size: 13px; color: #FDE68A; }
.we-play-cta { flex-shrink: 0; font-size: 11px; font-weight: 950; padding: 7px 12px; border-radius: 999px; background: #FFF; color: #1D4ED8; box-shadow: 0 4px 12px rgba(0,0,0,0.25); }
.we-play-cta.done { background: rgba(255,255,255,0.18); color: #FFF; }
.we-cooldown { position: relative; height: 26px; margin-top: 8px; border-radius: 10px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.06); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 800; color: #9AA3C7; }
.we-cooldown-fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(34,211,238,0.16); transition: width 1s linear; }
.we-cooldown span { position: relative; }
.we-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.we-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 11px 4px 9px; border-radius: 14px; background: rgba(22,26,46,0.96); border: 1px solid rgba(255,255,255,0.06); text-align: center; }
.we-stat-k { font-size: 8.5px; font-weight: 800; color: #9AA3C7; text-transform: uppercase; letter-spacing: .4px; }
.we-stat-v { font-size: 17px; font-weight: 950; color: #FFF; }
.we-stat-v.gold { color: #F8C75B; }
.we-stat-s { font-size: 8.5px; font-weight: 700; color: #64748B; }
@media (max-width: 360px) { .we-stats { grid-template-columns: repeat(2, 1fr); } }
/* r134: Reward tab cards (TON wallet + Coins→TON) */
.reward-card { margin-top: 12px; padding: 14px; border-radius: 16px; background: rgba(22,26,46,0.96); border: 1px solid rgba(255,255,255,0.06); }
.reward-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.reward-card-ico { width: 36px; height: 36px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; background: rgba(94,234,212,0.12); }
.reward-card-title { display: block; font-size: 13px; font-weight: 900; color: #F1F5F9; }
.reward-card-sub { display: block; font-size: 10px; font-weight: 700; color: #9AA3C7; margin-top: 2px; }
.we-progress-card { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(22,26,46,0.96); border: 1px solid rgba(255,255,255,0.06); }
.we-progress-head { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; color: #9AA3C7; margin-bottom: 8px; }
.we-progress-head strong { color: #FFF; }
.we-progress { height: 8px; border-radius: 6px; background: rgba(255,255,255,0.08); overflow: hidden; }
.we-progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, #22D3EE, #3B82F6); transition: width .4s ease; }
.we-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.we-how-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px dashed rgba(255,255,255,0.10); text-align: center; }
.we-how-item span { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 950; background: linear-gradient(135deg, #2563EB, #06B6D4); color: #FFF; }
.we-how-item p { font-size: 10px; font-weight: 700; color: #9AA3C7; line-height: 1.3; }
.we-how-item b { color: #FFF; }
.earn-screen { padding: 8px 12px 10px; overflow-y: auto; }
.earn-hero { text-align: center; padding: 14px 12px 10px; }
.earn-badge { display: inline-block; font-size: 10px; font-weight: 900; letter-spacing: .14em; padding: 4px 12px; border-radius: 999px; background: rgba(34,211,238,0.14); color: #67E8F9; border: 1px solid rgba(34,211,238,0.35); }
.earn-title { font-size: 20px; font-weight: 950; color: #FFF; margin: 8px 0 4px; }
.earn-sub { font-size: 11px; font-weight: 700; color: #9AA3C7; line-height: 1.4; }

/* r232: shared style for the app-wide value tagline (Home, Earn, Reward).
   Kept quiet enough not to compete with each screen's own heading. */
.ls-tagline {
  margin: 8px 0 0;
  padding: 9px 12px;
  font-size: 11.5px;
  line-height: 1.55;
  font-weight: 600;
  color: #C3CBEA;
  background: linear-gradient(180deg, rgba(56,189,248,.10), rgba(56,189,248,.04));
  border: 1px solid rgba(56,189,248,.22);
  border-radius: 12px;
}
.ls-tagline b { color: #7DD3FC; font-weight: 800; }

.earn-card { margin: 8px 0; padding: 10px 12px; border-radius: 16px; background: rgba(22,26,46,0.96); border: 1px solid rgba(255,255,255,0.07); }
.earn-card-muted { opacity: .92; }
.earn-card-h { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.earn-n { width: 22px; height: 22px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 950; background: #2563EB; color: #fff; flex-shrink: 0; }
.earn-card-h strong { display: block; font-size: 14px; color: #fff; }
.earn-card-h em { font-style: normal; font-size: 10.5px; color: #9AA3C7; font-weight: 700; }
.earn-note { margin: 8px 0 0; font-size: 10px; font-weight: 700; color: #64748B; line-height: 1.35; }
.earn-task-host { min-height: 44px; }
.earn-empty { margin: 0; font-size: 11px; font-weight: 700; color: #9AA3C7; line-height: 1.4; }
.earn-task-widget { display: block; --adsgram-task-font-size: 13px; --adsgram-task-icon-size: 36px; --adsgram-task-button-width: 88px; }
.earn-task-btn { display: inline-flex; align-items: center; justify-content: center; padding: 6px 10px; border-radius: 999px; background: #2563EB; color: #fff; font-size: 11px; font-weight: 900; }
.earn-task-done { color: #86EFAC; font-size: 11px; font-weight: 900; }
.earn-task-reward { color: #FDE68A; font-size: 11px; font-weight: 900; }
body.earn-web #earn-adsgram-units { display: none; }
body.earn-web #earn-web-soon { display: block; }
body:not(.earn-web) #earn-web-soon { display: none; }
body.earn-ad-lock .bottom-nav-bar,
body.earn-ad-lock .b-tab { pointer-events: none !important; }
body.earn-ad-lock .bottom-nav-bar { opacity: .35; }

/* r121: Telegram Mini App auth gate */
.tg-auth-box{display:flex;flex-direction:column;align-items:center;gap:12px;margin:18px 0 6px}
.btn-tg{display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;max-width:320px;padding:14px 18px;border-radius:14px;border:none;background:linear-gradient(135deg,#2AABEE,#229ED9);color:#fff;font-weight:800;font-size:16px;text-decoration:none;cursor:pointer;box-shadow:0 8px 24px rgba(34,158,217,.35)}
.btn-tg:active{transform:scale(.98)}
#btn-tg-retry{display:none;background:rgba(255,255,255,.08);box-shadow:none;font-size:14px;padding:10px 16px;width:auto}
.tg-auth-box.tg-failed #btn-tg-retry{display:inline-flex}
.tg-auth-box.tg-failed .tg-spinner{display:none}
.tg-spinner{width:34px;height:34px;border-radius:50%;border:3px solid rgba(255,255,255,.15);border-top-color:#2AABEE;animation:tgspin .9s linear infinite}
@keyframes tgspin{to{transform:rotate(360deg)}}
/* r209: old rule removed — now handled via .app-header padding-top + .app-shell 100dvh. Keeping body padding causes double offset in fullscreen. */

/* r128: dual login — auth divider + small notes for the browser gate */
.auth-divider{display:flex;align-items:center;gap:10px;color:#64748B;font-size:12px;width:100%;max-width:320px;margin:4px auto}
.auth-divider::before,.auth-divider::after{content:'';flex:1;height:1px;background:rgba(255,255,255,.12)}
.auth-small-note{color:#64748B;font-size:12px;margin:8px 0 0;text-align:center}

/* ===== r138: Reward tab — global English, clean cards ===== */
.rw-saved { margin-bottom: 10px; }
.rw-saved-label, .rw-empty { font-size: 11px; font-weight: 700; color: #94A3B8; margin-bottom: 6px; }
.rw-addr { font-size: 12px; font-weight: 800; color: #5EEAD4; word-break: break-all; background: rgba(94,234,212,.08); border: 1px solid rgba(94,234,212,.28); border-radius: 12px; padding: 10px 12px; letter-spacing: .01em; }
.rw-text-btn { margin-top: 8px; font-size: 11px; font-weight: 800; color: #94A3B8; background: none; border: none; cursor: pointer; padding: 0; }
.rw-text-btn:active { color: #E2E8F0; }
.rw-primary, .rw-claim, .rw-secondary { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; cursor: pointer; font-weight: 900; }
.rw-primary { padding: 14px 16px; font-size: 14px; border-radius: 14px; color: #042F2E; background: linear-gradient(135deg, #5EEAD4, #38BDF8); box-shadow: 0 10px 24px rgba(56,189,248,.28); }
.rw-primary:active { transform: scale(.98); }
.rw-primary-ico { display: inline-flex; }
.rw-hint { font-size: 11px; color: #64748B; margin: 8px 0 0; line-height: 1.45; }
.rw-manual { margin-top: 10px; }
.rw-manual summary { font-size: 11px; font-weight: 700; color: #64748B; cursor: pointer; list-style: none; }
.rw-manual summary::-webkit-details-marker { display: none; }
.rw-input { width: 100%; box-sizing: border-box; padding: 11px 13px; border-radius: 12px; border: 1px solid rgba(148,163,184,.25); background: rgba(2,6,23,.65); color: #F1F5F9; font-size: 13px; outline: none; margin-top: 8px; }
.rw-secondary { margin-top: 8px; padding: 11px; font-size: 13px; border-radius: 12px; color: #E2E8F0; background: rgba(255,255,255,.08); }
.rw-ratebox { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: linear-gradient(135deg, rgba(56,189,248,.10), rgba(99,102,241,.08)); border: 1px solid rgba(56,189,248,.28); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.rw-rate-copy { font-size: 11px; color: #94A3B8; font-weight: 700; line-height: 1.45; }
.rw-rate-you { text-align: right; }
.rw-rate-k { font-size: 10px; color: #94A3B8; font-weight: 700; }
.rw-rate-v { font-size: 16px; font-weight: 900; color: #F1F5F9; margin-top: 2px; }
.rw-rate-ton { font-size: 11px; color: #38BDF8; font-weight: 800; margin-top: 2px; }
.rw-claim { padding: 14px 16px; font-size: 14px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #38BDF8, #6366F1); box-shadow: 0 10px 24px rgba(99,102,241,.28); }
.rw-claim:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.rw-status { font-size: 11px; color: #94A3B8; margin-top: 8px; min-height: 14px; line-height: 1.4; }
.rw-hist-label { font-size: 11px; font-weight: 800; color: #94A3B8; margin: 16px 4px 8px; letter-spacing: .04em; text-transform: uppercase; }
.rw-hist { padding: 0 4px; }
.usdt-hint a { color: #94A3B8; text-decoration: underline; }

#friends-drawer .drawer-foot {
  background: #0A0C10;
  border-top: 1px solid rgba(251,191,36,0.2);
}
#btn-drawer-send {
  background: linear-gradient(180deg, #FBBF24, #D97706) !important;
  color: #1C0A00 !important;
  border-radius: 8px !important;
  font-size: 15px !important;
  letter-spacing: 1.4px !important;
  box-shadow: 0 4px 14px rgba(245,158,11,0.35) !important;
}

.ff-rooms-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 7px;
  color: #FBBF24;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  border-top: 1px solid rgba(255,255,255,0.09);
  background: rgba(251,191,36,0.05);
}
.ff-rooms { padding: 4px 10px 10px; max-height: 30vh; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ff-rooms .fr-empty { padding: 8px 4px; }
.ff-rooms .ol-row { margin-bottom: 6px; padding: 8px 10px; }

.play-idle {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 180px;
  padding: 12px 8px;
}
.play-idle-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}
.play-idle-step {
  background: rgba(22, 26, 46, 0.92);
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 16px;
  padding: 14px 8px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.22);
}
.play-idle-step span {
  width: 22px; height: 22px; margin: 0 auto 4px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FBBF24, #D97706);
  color: #1C0A00;
  font-size: 12px; font-weight: 950;
  display: flex; align-items: center; justify-content: center;
}
.play-idle-step strong { color: #F8FAFC; font-size: 13px; font-weight: 900; }
.play-idle-step small { color: #94A3B8; font-size: 10px; font-weight: 600; }
.play-idle-hint { color: #64748B; font-size: 11px; font-weight: 600; text-align: center; margin: 0; max-width: 280px; }
.play-lobby-stage { flex: 1; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding-bottom: 6px; }
.play-lobby-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.play-lobby-head strong { font-size: 15px; }
/* r179: .dw-ask styled as a green action chip in the drawer block above */
.ff-foot-hint {
  padding: 11px 12px 13px;
  color: #A9B6CC;
  font-size: 11.5px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.2px;
}
#screen-play { display: none; flex-direction: column; }
#screen-play.active { display: flex; }

/* r138r: one Squad board (not stacked idle + lobby) */
#screen-play.active { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.sq-board {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 10px 10px;
  border-radius: 20px;
  border: 1px solid rgba(107,78,255,0.16);
  background:
    radial-gradient(circle at 88% 8%, rgba(107,78,255,0.18), transparent 34%),
    radial-gradient(circle at 10% 90%, rgba(245,158,11,0.10), transparent 32%),
    linear-gradient(180deg, #171C36, #0F1330 70%, #0A0F24);
  box-shadow: 0 12px 32px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.05);
}
.sq-modes { display: flex; gap: 8px; }
.sq-modes .fm-opt { flex: 1; padding: 12px 8px; font-size: 13px; }
.sq-sub { color: #94A3B8; font-size: 11px; font-weight: 700; text-align: center; min-height: 16px; }
.sq-seats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  flex: 1;
  align-content: center;
  min-height: 120px;
}
.sq-seats .play-slot, .sq-seats .flobby-slot {
  width: auto;
  height: 88px;
  border-radius: 16px;
}
.sq-seats .fr-avatar { width: 40px; height: 40px; }
.sq-cta { display: flex; align-items: stretch; gap: 8px; }
.sq-start { flex: 1; min-height: 52px; font-size: 18px; letter-spacing: 2px; }
.sq-pending { min-height: 0; }
.sq-pending .fr-empty { display: none; }
.sq-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.sq-actions .flobby-btn, .sq-actions .fr-primary-btn, .sq-actions .fr-ghost-btn, .sq-actions .fr-start-btn, .sq-actions .fr-ready-btn {
  flex: 1 1 42%;
  min-height: 38px;
  margin: 0;
}
.sq-actions .flobby-vis { flex: 1 1 100%; }
.sq-actions .flobby-bet-row { flex: 1 1 100%; }

.flobby-need, .flobby-mode-row { display: contents; }
.sq-modes .flobby-need { display: none !important; }
.sq-chip {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(15,23,42,0.8);
  color: #E2E8F0;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.sq-chip.on { border-color: rgba(251,191,36,0.55); color: #FDE68A; }
.sq-chip.danger { color: #FCA5A5; }
.sq-start {
  background: linear-gradient(180deg, #FBBF24, #D97706) !important;
  color: #1C0A00 !important;
  box-shadow: 0 6px 18px rgba(245,158,11,0.4) !important;
}
.play-slot-x, .play-slot-swap {
  position: absolute;
  top: 2px;
  width: 18px; height: 18px;
  border: 0; border-radius: 50%;
  font-size: 10px;
  cursor: pointer;
  background: rgba(0,0,0,0.45);
  color: #fff;
}
.play-slot-x { right: 2px; }
.play-slot-swap { left: 2px; }
.play-slot { position: relative; }
.play-slot.team-A { border-color: #38BDF8; }
.play-slot.team-B { border-color: #F472B6; }
.drawer-reqs:empty { display: none; }
.sq-wait { display: inline-flex; }
.sq-wait .fr-avatar { width: 22px; height: 22px; }
#flobby-bet:empty, #flobby-bet[hidden] { display: none; }
.play-ff-icon .fab-req { left: auto; right: auto; top: -4px; left: -4px; }

#screen-play { overflow-y: auto; padding: 10px; gap: 6px; }
#screen-play .hero-event-banner { display: none; }
#screen-play .section-heading { font-size: 11px; margin-top: 2px; }
#screen-play .game-mode-grid { gap: 6px; }
#screen-play .mode-card {
  padding: 6px 8px; border-radius: 10px; gap: 6px;
  transition: border-color .12s ease, background .12s ease;
}
#screen-play .mode-card:active, #screen-play .mode-card:hover { transform: none; }
#screen-play .mc-icon { font-size: 16px; }
#screen-play .mc-title { font-size: 12px; }
#screen-play .mc-sub { display: none; }
#screen-play .mc-check { top: 4px; right: 6px; font-size: 10px; }
#screen-play .tier-rooms-grid { gap: 8px; }
#screen-play .room-pill { padding: 8px 4px; }
#screen-play .match-summary-card { padding: 8px 10px; }
#screen-play .btn-play-hero { padding: 12px; font-size: 14px; flex: 1; }
.sq-seats-mini {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.sq-seats-mini .play-slot { width: auto; height: 86px; border-radius: 12px; overflow: visible; gap: 1px; padding: 6px 4px 4px; }
.sq-seats-mini .fr-avatar { width: 28px; height: 28px; }
.sq-seats-mini .play-slot-name { font-size: 9px; max-width: 100%; }
.play-slot-state {
  font-size: 8px; font-weight: 900; letter-spacing: .4px;
  line-height: 1; padding: 2px 5px; border-radius: 6px;
}
.play-slot.is-ready { border-color: #22C55E; box-shadow: 0 0 0 1px rgba(34,197,94,.35); }
.play-slot.is-ready .play-slot-state { color: #052e16; background: #22C55E; }
.play-slot.is-wait { border-color: #F59E0B; }
.play-slot.is-wait .play-slot-state { color: #1C0A00; background: #F59E0B; }
.play-slot-x {
  width: 22px; height: 22px; font-size: 12px; font-weight: 900;
  background: #DC2626; color: #fff; z-index: 4;
}
.play-slot-swap {
  z-index: 4; left: 2px; top: 2px; width: auto; min-width: 22px; height: 18px;
  padding: 0 5px; border-radius: 6px; font-size: 10px; font-weight: 900;
  background: #2563EB; color: #fff;
}
.play-slot.team-B .play-slot-swap { background: #DB2777; }

.sq-actions { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.sq-vis {
  display: flex; flex: 1; min-width: 160px;
  border-radius: 12px; overflow: hidden;
  border: 1.5px solid rgba(255,255,255,.12);
  background: rgba(15,18,36,.7);
}
.sq-vis-btn {
  flex: 1; border: none; background: transparent; color: #9FB3C8;
  font-weight: 800; font-size: 13px; padding: 11px 8px; cursor: pointer;
}
.sq-vis-btn.on { background: #2563EB; color: #fff; }
.sq-leave {
  border: none; border-radius: 12px; padding: 11px 22px;
  min-width: 92px; font-weight: 800; font-size: 14px;
  background: #DC2626; color: #fff; cursor: pointer;
}
.sq-leave:active { transform: scale(.98); }

#flobby-slots:has(.flobby-teams) { display: block; width: 100%; }
#screen-play .flobby-teams { display: flex; width: 100%; gap: 6px; align-items: stretch; }
#screen-play .flobby-team { flex: 1; padding: 4px; gap: 4px; min-width: 0; }
#screen-play .flobby-team-row { display: flex; flex-direction: row; gap: 6px; }
#screen-play .flobby-team-row .play-slot { flex: 1; height: 72px; width: auto; }
#screen-play .flobby-team-title { font-size: 10px; margin: 0; }
#screen-play .play-slot.empty.sit {
  border: 1.5px dashed #FBBF24;
  background: rgba(251,191,36,.08);
}
#screen-play .play-slot.empty.sit .play-slot-name { color: #FBBF24; font-size: 9px; letter-spacing: .4px; }
#screen-play .play-slot, #screen-play .flobby-slot, #screen-play .mode-card {
  transition: border-color .12s ease, background .12s ease;
}
#screen-play .play-slot:hover, #screen-play .mode-card:hover { transform: none; }

/* r139p — Friends hub (PUBG/FF style). Old stacked panels retired. */
#screen-friends.fs-hub {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px 18px;
  overflow-y: auto;
}
#screen-friends.fs-hub.active { display: flex; }
.fs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fs-head-l { display: flex; align-items: baseline; gap: 8px; }
.fs-head-l strong { font-size: 18px; font-weight: 900; letter-spacing: .2px; color: #F8FAFC; }
.fs-online-n { font-size: 11px; font-weight: 800; color: #34D399; }
.fs-play {
  height: 32px; padding: 0 14px; border: 0; border-radius: 10px;
  background: linear-gradient(135deg, #F59E0B, #FBBF24); color: #111827;
  font-size: 12px; font-weight: 900; cursor: pointer;
}
.fs-play:active { transform: scale(.96); }
.fs-me {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 14px;
  border: 1px solid rgba(251,191,36,.28);
  background: linear-gradient(135deg, rgba(251,191,36,.12), rgba(15,23,42,.9));
}
.fs-me-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fs-me-id span { font-size: 9px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: #94A3B8; }
.fs-me-id strong { font-family: ui-monospace, monospace; font-size: 14px; letter-spacing: 1px; color: #FDE68A; }
.fs-me-btn {
  height: 32px; padding: 0 12px; border-radius: 9px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06);
  color: #E2E8F0; font-size: 11px; font-weight: 800;
}
.fs-me-share { border: 0; background: linear-gradient(135deg, #6B4EFF, #8B5CF6); color: #fff; }
.fs-tabs { display: flex; gap: 6px; padding: 3px; border-radius: 12px; background: rgba(0,0,0,.35); }
.fs-tab {
  flex: 1; height: 36px; border: 0; border-radius: 10px; background: transparent;
  color: #94A3B8; font-size: 12px; font-weight: 800; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.fs-tab.on { background: linear-gradient(180deg, #1E293B, #0F172A); color: #F8FAFC; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.fs-tab-pip, #fs-n-squad {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: rgba(255,255,255,.08); color: inherit; font-size: 10px; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center;
}
.fs-tab-pip { background: #EF4444; color: #fff; }
.fs-pane { display: none; flex-direction: column; gap: 8px; min-height: 0; }
.fs-pane.on { display: flex; }
.fs-chips { display: flex; gap: 6px; }
.fs-chip {
  height: 28px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04);
  color: #94A3B8; font-size: 11px; font-weight: 800;
}
.fs-chip.on { border-color: rgba(52,211,153,.45); background: rgba(16,185,129,.16); color: #6EE7B7; }
.fs-filter {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 12px; box-sizing: border-box;
  border: 1px solid rgba(255,255,255,.1); background: rgba(15,23,42,.85); color: #fff;
  font-size: 13px; font-weight: 700;
}
.fs-add-row { display: flex; gap: 8px; }
.fs-add-row .fs-filter { flex: 1; }
.fs-go {
  flex-shrink: 0; height: 40px; padding: 0 16px; border: 0; border-radius: 12px;
  background: linear-gradient(135deg, #6B4EFF, #8B7CF6); color: #fff;
  font-size: 12px; font-weight: 900; cursor: pointer;
}
.fs-sec { font-size: 10px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: #64748B; margin-top: 4px; }
.fs-list { display: flex; flex-direction: column; gap: 8px; }
.fs-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 12px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.07);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
}
.fs-card .fr-avatar { width: 44px; height: 44px; font-size: 24px; }
.fs-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fs-name { display: flex; align-items: center; gap: 6px; color: #F8FAFC; font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-sub { color: #64748B; font-size: 10px; font-weight: 700; }
.fs-st {
  font-size: 9px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px;
}
.fs-st.on { background: rgba(16,185,129,.18); color: #34D399; }
.fs-st.room { background: rgba(251,191,36,.16); color: #FBBF24; }
.fs-st.match { background: rgba(239,68,68,.16); color: #F87171; }
.fs-st.off { background: rgba(100,116,139,.2); color: #94A3B8; }
.fs-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.fs-card .fr-btn { min-width: 44px; }
.fs-empty {
  text-align: center; padding: 28px 12px; color: #64748B; font-size: 12px; font-weight: 700; line-height: 1.45;
}
.fs-empty b { display: block; color: #CBD5E1; font-size: 14px; margin-bottom: 4px; }

.fs-ref {
  padding: 12px; border-radius: 14px;
  border: 1px solid rgba(251,191,36,.3);
  background: linear-gradient(135deg, rgba(251,191,36,.12), rgba(15,23,42,.92));
  display: flex; flex-direction: column; gap: 8px;
}
.fs-ref-top { display: flex; flex-direction: column; gap: 2px; }
.fs-ref-top strong { font-size: 14px; color: #FDE68A; }
.fs-ref-top span { font-size: 11px; font-weight: 700; color: #94A3B8; }
.fs-ref-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.fs-ref-cell {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 10px; border-radius: 12px;
  background: rgba(15,23,42,.55); border: 1px solid rgba(255,255,255,.08);
}
.fs-ref-cell.they { border-color: rgba(52,211,153,.35); }
.fs-ref-cell.you { border-color: rgba(251,191,36,.4); }
.fs-ref-cell small { font-size: 9px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #94A3B8; }
.fs-ref-cell b { font-size: 18px; font-weight: 950; line-height: 1.1; color: #F8FAFC; }
.fs-ref-cell.they b { color: #6EE7B7; }
.fs-ref-cell.you b { color: #FDE68A; }
.fs-ref-cell span { font-size: 10px; font-weight: 700; color: #94A3B8; }
.fs-ref-note { margin: 6px 0 0; font-size: 10px; font-weight: 700; color: #94A3B8; line-height: 1.35; }
.fs-ref-stats { font-size: 11px; font-weight: 800; color: #A7F3D0; }
.fs-block { display: flex; flex-direction: column; gap: 8px; }
.fs-head strong { font-size: 18px; font-weight: 900; color: #F8FAFC; }

.fs-uid-line { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; color: #94A3B8; }
.fs-uid-line strong { font-family: ui-monospace, monospace; color: #E2E8F0; letter-spacing: .5px; }
.fs-ref .fs-me { justify-content: stretch; }
.fs-ref .fs-me-btn { flex: 1; height: 38px; }

.fs-st.inv { background: #1e3a5f; color: #93c5fd; }

.fs-card.ref-wait {
  border-color: rgba(251,191,36,.45);
  background: linear-gradient(90deg, rgba(251,191,36,.16), rgba(15,23,42,.4));
  box-shadow: inset 4px 0 0 #FBBF24;
}
.fs-card.ref-done {
  border-color: rgba(52,211,153,.4);
  background: linear-gradient(90deg, rgba(16,185,129,.14), rgba(15,23,42,.4));
  box-shadow: inset 4px 0 0 #34D399;
}
.fs-st.wait { background: rgba(251,191,36,.22); color: #FDE68A; }
.fs-st.done { background: rgba(16,185,129,.22); color: #6EE7B7; }
#fs-invited-wrap .fs-sec { color: #FBBF24; }

/* ===== r139v: TON Reward screen (phone-first, not Earn clone) ===== */
#screen-reward.ton-screen,
#screen-reward.ton-screen.active {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 14px 12px;
  /* r212: Keep scroll fix from r210 (was overflow:hidden !important), but revert safe-area to simple - user said previous fixed visual was correct */
  overflow-y: auto !important;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  animation: none !important;
  transform: none !important;
  box-sizing: border-box;
}
#screen-reward.ton-screen { display: none; }
#screen-reward.ton-screen.active { display: flex; }
.ton-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 4px;
  flex-shrink: 0;
}
.ton-head-copy { min-width: 0; }
.ton-head h2 {
  margin: 0;
  font-size: 18px; font-weight: 900; color: #F8FAFC;
  letter-spacing: -.2px;
}
.ton-head p {
  margin: 3px 0 0;
  font-size: 12px; font-weight: 650; color: #8BA3B8;
}
.ton-avail {
  display: inline-flex; align-items: baseline; gap: 5px; flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 12px;
  background: #121826;
  border: 1px solid rgba(248,199,91,.22);
}
.ton-avail span { font-size: 9px; font-weight: 800; color: #8BA3B8; text-transform: uppercase; letter-spacing: .4px; }
.ton-avail strong { font-size: 15px; font-weight: 900; color: #F8C75B; }
.ton-avail small { font-size: 10px; font-weight: 800; color: #8BA3B8; }
.ton-card {
  padding: 14px;
  border-radius: 18px;
  background: #121826;
  border: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.ton-card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ton-n {
  width: 26px; height: 26px; flex-shrink: 0;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 900; color: #041018;
  background: #0098EA;
}
.ton-card-h strong { display: block; font-size: 14px; font-weight: 900; color: #F1F5F9; }
.ton-card-h em { display: block; font-style: normal; font-size: 11px; font-weight: 650; color: #7B8EA3; margin-top: 1px; }
.ton-empty { font-size: 12px; font-weight: 700; color: #7B8EA3; margin: 0 0 10px; }
.ton-primary, .ton-claim, .ton-secondary {
  width: 100%; border: 0; cursor: pointer; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center;
}
.ton-primary {
  height: 46px; border-radius: 14px; font-size: 14px; color: #041018;
  background: linear-gradient(180deg, #2BB4F6, #0098EA);
  box-shadow: 0 8px 20px rgba(0,152,234,.32);
}
.ton-primary:active { transform: scale(.98); }
.ton-hint { margin: 8px 0 0; font-size: 11px; line-height: 1.4; color: #64748B; }
.ton-manual { margin-top: 10px; }
.ton-manual summary {
  font-size: 11px; font-weight: 750; color: #7B8EA3; cursor: pointer;
  list-style: none; display: flex; align-items: center; gap: 6px;
}
.ton-manual summary::-webkit-details-marker { display: none; }
.ton-manual summary::after { content: "›"; font-size: 14px; color: #64748B; }
.ton-manual[open] summary::after { content: "⌄"; }
.ton-input {
  width: 100%; box-sizing: border-box; margin-top: 8px;
  height: 42px; padding: 0 12px; border-radius: 12px;
  border: 1px solid rgba(148,163,184,.22);
  background: #0B1220; color: #F1F5F9; font-size: 13px; outline: none;
}
.ton-input:focus { border-color: rgba(0,152,234,.55); }
.ton-secondary {
  margin-top: 8px; height: 40px; border-radius: 12px; font-size: 13px;
  color: #E2E8F0; background: rgba(255,255,255,.07);
}
.ton-addr-row { display: flex; align-items: stretch; gap: 8px; }
.ton-addr {
  flex: 1; min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; font-weight: 700; color: #7DD3FC; line-height: 1.35;
  word-break: break-all;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(0,152,234,.10); border: 1px solid rgba(0,152,234,.28);
}
.ton-ghost {
  flex-shrink: 0; align-self: center;
  height: 34px; padding: 0 12px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05); color: #CBD5E1;
  font-size: 11px; font-weight: 800; cursor: pointer;
}
.ton-conv {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  align-items: center;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0,152,234,.08);
  border: 1px solid rgba(0,152,234,.22);
}
.ton-conv-cell { min-width: 0; }
.ton-conv-cell span { display: block; font-size: 10px; font-weight: 800; color: #7B8EA3; text-transform: uppercase; letter-spacing: .4px; }
.ton-conv-cell strong {
  display: block; margin-top: 4px;
  font-size: 16px; font-weight: 900; color: #F8FAFC;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ton-conv-cell.ton strong { color: #7DD3FC; font-size: 14px; }
.ton-conv-arrow { text-align: center; color: #64748B; font-size: 16px; font-weight: 900; }
.ton-meta {
  display: flex; flex-direction: column; gap: 2px;
  margin: 10px 2px 12px;
  font-size: 11px; font-weight: 700; color: #7B8EA3; line-height: 1.4;
}
.ton-claim {
  height: 48px; border-radius: 14px; font-size: 14px; color: #fff;
  background: linear-gradient(180deg, #38BDF8, #2563EB);
  box-shadow: 0 10px 22px rgba(37,99,235,.28);
}
.ton-play-gate { margin: 4px 0 6px; }
.ton-play-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 10px; font-weight: 800; color: #9AA3C7; margin-bottom: 3px; }
.ton-play-head strong { color: #FDE68A; font-size: 11px; }
.ton-play { height: 4px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.ton-play-fill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #38BDF8, #FDE68A); }
.ton-claim:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.ton-claim:not(:disabled):active { transform: scale(.98); }
.ton-status { margin: 8px 2px 0; min-height: 16px; font-size: 11px; font-weight: 700; color: #7B8EA3; line-height: 1.4; }
.ton-hist-h { margin: 4px 2px 0; flex-shrink: 0; font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: #7B8EA3; }
.ton-hist { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px; }
.ton-hist-empty {
  text-align: center; padding: 18px 8px;
  font-size: 12px; font-weight: 700; color: #64748B;
}
.ton-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 14px;
  background: #121826; border: 1px solid rgba(255,255,255,.06);
}
.ton-row-body { flex: 1; min-width: 0; }
.ton-row-top { display: flex; align-items: center; gap: 8px; }
.ton-pill {
  font-size: 9px; font-weight: 900; letter-spacing: .4px; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px;
}
.ton-pill.pending { background: rgba(251,191,36,.16); color: #FBBF24; }
.ton-pill.approved { background: rgba(56,189,248,.16); color: #38BDF8; }
.ton-pill.paid { background: rgba(34,197,94,.16); color: #4ADE80; }
.ton-pill.rejected { background: rgba(248,113,113,.16); color: #F87171; }
.ton-row-title { font-size: 12px; font-weight: 800; color: #E2E8F0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ton-row-sub { display: block; margin-top: 3px; font-size: 10px; font-weight: 700; color: #64748B; }
.ton-row-amt { flex-shrink: 0; font-size: 12px; font-weight: 900; color: #F87171; }
.ton-legal {
  margin: 0 2px 2px; padding: 4px 6px; text-align: center; flex-shrink: 0;
  font-size: 9.5px; font-weight: 900; line-height: 1.3; color: #F87171;
  background: rgba(239,68,68,.10); border: 1px solid rgba(248,113,113,.35); border-radius: 8px;
  animation: rwLegalPulse 1.2s ease-in-out infinite;
}
.ton-legal a { color: #FCA5A5; text-decoration: underline; }

#screen-reward.ton-screen,
#screen-reward.ton-screen.active {
  gap: 4px;
  padding: 3px 12px 2px;
}
#screen-reward .ton-head { padding: 0 2px 0; }
#screen-reward .ton-head h2 { font-size: 16px; }
#screen-reward .ton-head p { margin: 1px 0 0; font-size: 11px; }
#screen-reward .ton-avail { padding: 4px 8px; }
#screen-reward .ton-legal { margin-top: auto; }
#screen-reward .ton-empty,
#rw-connect-wrap > .ton-hint { display: none !important; }
#screen-reward .ton-hist-empty { display: none; }
#screen-reward .ton-hist-h { margin: 0; }
#screen-reward .ton-hist { flex: 0 1 auto; max-height: 44px; min-height: 0; }
#screen-reward .ton-card { padding: 5px 8px; }
#screen-reward .ton-manual { margin-top: 4px; }
#screen-reward .ton-status { min-height: 0; margin-top: 2px; }
#ton-claim-card .ton-conv { padding: 4px 6px; }
#ton-claim-card .ton-meta { margin: 2px 2px 3px; }
#ton-claim-card .ton-claim { height: 32px; }
#screen-reward .ton-card-h { margin-bottom: 3px; gap: 6px; }
#screen-reward .ton-n { width: 20px; height: 20px; font-size: 10px; }
#screen-reward .ton-n.info { background: #334155; color: #E2E8F0; }
#screen-reward .ton-primary { position: relative; overflow: hidden; height: 32px; animation: rwBtnBob 1.6s ease-in-out infinite; }
#screen-reward .ton-primary::after,
#screen-reward .ton-claim::after {
  content: ""; position: absolute; top: -10%; left: -55%; width: 40%; height: 120%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: rwSheen 1.4s linear infinite; pointer-events: none;
}
#screen-reward .ton-claim { position: relative; overflow: hidden; height: 32px; animation: rwClaimBob 1.8s ease-in-out infinite; }
#screen-reward .ton-claim::after { animation-delay: .25s; }
#screen-reward .ton-hint { margin: 4px 0 0; font-size: 9.5px; line-height: 1.28; }
#screen-reward .ton-addr {
  font-size: 9.5px; padding: 5px 8px; border-radius: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal;
}
#screen-reward .ton-ghost {
  height: 26px; padding: 0 8px; border-radius: 8px; font-size: 10px;
  border-color: rgba(125,211,252,.45); background: rgba(56,189,248,.16); color: #E0F2FE;
  animation: rwCopyBob 1.4s ease-in-out infinite;
}
.ton-sendfrom { padding: 4px 7px; outline: 2px dashed rgba(125,211,252,.55); outline-offset: 1px; }
.ton-sendfrom .ton-card-h { margin-bottom: 3px; }
.ton-sendfrom .ton-card-h em { color: #FBBF24; font-weight: 800; }
.ton-sendfrom::after { content: none !important; display: none !important; }
.new-tag {
  display: inline-block; margin-left: 4px; font-size: 7.5px; font-weight: 900;
  color: #041018; background: #7DD3FC; padding: 1px 4px; border-radius: 999px; vertical-align: middle;
  animation: rwNewPulse 1.8s ease-in-out infinite;
}
.c-main { color: #7DD3FC; font-weight: 800; animation: rwGlowText 1.5s ease-in-out infinite; }
.c-warn { color: #FBBF24; font-weight: 800; animation: rwWarnTick 1s ease-in-out infinite; }
.c-ok { color: #86EFAC; font-weight: 800; }
.c-ad { color: #F8C75B; font-weight: 800; }
.why {
  margin-top: 3px; padding: 3px 5px; border-radius: 6px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06);
}
.why p { margin: 0; font-size: 8.5px; font-weight: 700; line-height: 1.2; color: #CBD5E1; }
.why p + p { margin-top: 1px; }
.ton-cs {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  margin-top: 3px; padding: 3px 5px; border-radius: 6px;
  background: rgba(56,189,248,.08); border: 1px solid rgba(56,189,248,.2);
}
.ton-cs p { margin: 0; font-size: 9px; font-weight: 700; color: #CBD5E1; line-height: 1.22; }
.ton-cs a {
  flex-shrink: 0; text-decoration: none;
  height: 22px; padding: 0 8px; border-radius: 6px;
  display: inline-flex; align-items: center;
  font-size: 9.5px; font-weight: 900; color: #041018; background: #2AABEE;
  animation: rwTgPing 2.2s ease-out infinite;
}
#screen-reward .ton-hist { min-height: 36px; }
#screen-reward .b-tab.on .bt-icon,
.b-tab[data-target="screen-reward"].active .bt-icon { display: flex; animation: rwTabBounce 1s ease-in-out infinite; }
@keyframes rwSheen { from { transform: translateX(0); } to { transform: translateX(420%); } }
@keyframes rwNewPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); box-shadow: 0 0 10px #7DD3FC; } }
@keyframes rwTgPing {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(42,171,238,.65); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(42,171,238,0); }
  100% { transform: scale(1); }
}
@keyframes rwWarnTick { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes rwLegalPulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes rwBtnBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes rwCopyBob { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes rwClaimBob { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.22); } }
@keyframes rwGlowText { 50% { text-shadow: 0 0 14px #7DD3FC; } }
@keyframes rwTabBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) {
  #screen-reward * { animation: none !important; }
}

.ton-lock {
  flex-shrink: 0; align-self: center;
  height: 28px; padding: 0 10px; border-radius: 8px;
  border: 1px solid rgba(74,222,128,.28);
  background: rgba(34,197,94,.12); color: #86EFAC;
  font-size: 10px; font-weight: 900; letter-spacing: .4px; text-transform: uppercase;
  display: inline-flex; align-items: center;
}

.ton-coins-in {
  display: block; width: 100%; margin-top: 4px; box-sizing: border-box;
  height: 34px; padding: 0 8px; border-radius: 10px;
  border: 1px solid rgba(148,163,184,.22); background: #0B1220;
  color: #F8FAFC; font-size: 16px; font-weight: 900; outline: none;
}
.ton-coins-in:focus { border-color: rgba(0,152,234,.55); }
.ton-coins-in::placeholder { color: #64748B; font-weight: 700; font-size: 13px; }
.ton-coins-in::-webkit-outer-spin-button, .ton-coins-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ton-coins-in { -moz-appearance: textfield; }
.ton-pill.failed { background: rgba(248,113,113,.16); color: #FCA5A5; }
.ton-pill.sent, .ton-pill.paid { background: rgba(52,211,153,.16); color: #6EE7B7; }

/* r145 — Claim HUD (glass overlay + notice). HUD pattern: block UI during
   the wallet check; notice uses the same card so the motion feels one piece. */
.rw-hud {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px 18px;
  background: rgba(4, 8, 18, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.rw-hud.active { display: flex; animation: rwHudIn .22s ease-out; }
@keyframes rwHudIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.rw-hud-card {
  width: 100%;
  max-width: 320px;
  padding: 28px 22px 22px;
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(165deg, rgba(22, 32, 54, 0.94), rgba(12, 18, 34, 0.96));
  border: 1px solid rgba(125, 211, 252, 0.22);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255,255,255,0.04), inset 0 1px 0 rgba(255,255,255,0.08);
  animation: rwCardIn .32s cubic-bezier(.2,.8,.2,1);
}
@keyframes rwCardIn {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to { opacity: 1; transform: none; }
}
.rw-orb {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 16px;
}
.rw-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}
.rw-ring-a {
  border-top-color: #7DD3FC;
  border-right-color: rgba(56, 189, 248, 0.35);
  animation: rwSpin 1s linear infinite;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}
.rw-ring-b {
  inset: 10px;
  border-bottom-color: #38BDF8;
  border-left-color: rgba(99, 102, 241, 0.45);
  animation: rwSpin 1.6s linear infinite reverse;
}
.rw-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 4px;
  background: linear-gradient(135deg, #7DD3FC, #2563EB);
  transform: rotate(45deg);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.7);
  animation: rwCore 1.4s ease-in-out infinite;
}
@keyframes rwSpin { to { transform: rotate(360deg); } }
@keyframes rwCore {
  0%, 100% { transform: rotate(45deg) scale(1); opacity: 1; }
  50% { transform: rotate(45deg) scale(0.86); opacity: .75; }
}
.rw-hud-kicker {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #7DD3FC;
}
.rw-hud-title {
  margin: 0;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -0.3px;
  color: #F8FAFC;
}
.rw-hud-sub {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
  color: #9FB3C8;
}
.rw-hud-bar {
  height: 3px;
  margin: 18px 8px 2px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
}
.rw-hud-bar i {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, #7DD3FC, #38BDF8, transparent);
  animation: rwBar 1.15s ease-in-out infinite;
}
@keyframes rwBar {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
.rw-hud-note { padding-top: 4px; }
.rw-note-ico {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rw-note-pulse {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(125, 211, 252, 0.45);
  animation: rwPulse 2s ease-out infinite;
}
.rw-note-pulse.delay { animation-delay: .7s; }
@keyframes rwPulse {
  0% { transform: scale(.7); opacity: .7; }
  100% { transform: scale(1.35); opacity: 0; }
}
.rw-hud-ok {
  margin-top: 18px;
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  color: #041018;
  background: linear-gradient(180deg, #2BB4F6, #0098EA);
  box-shadow: 0 10px 22px rgba(0, 152, 234, 0.32);
}
.rw-hud-ok:active { transform: scale(.98); }
@media (prefers-reduced-motion: reduce) {
  .rw-hud.active, .rw-hud-card { animation: none; }
  .rw-ring-a, .rw-ring-b, .rw-core, .rw-hud-bar i, .rw-note-pulse { animation: none; }
}
background: linear-gradient(180deg, #2BB4F6, #0098EA);
  box-shadow: 0 10px 22px rgba(0, 152, 234, 0.32);
}
.rw-hud-ok:active { transform: scale(.98); }
@media (prefers-reduced-motion: reduce) {
  .rw-hud.active, .rw-hud-card { animation: none; }
  .rw-ring-a, .rw-ring-b, .rw-core, .rw-hud-bar i, .rw-note-pulse { animation: none; }
}

/* r181 referral visibility: mobile-first, glanceable audit dashboard */
.fs-ref-title-line { display:flex; align-items:center; gap:7px; }
.fs-ref-live { padding:2px 6px; border-radius:999px; background:rgba(52,211,153,.18); color:#6EE7B7; font-size:8px; font-weight:950; letter-spacing:.6px; }
.fs-ref-code-line { display:flex; align-items:center; justify-content:space-between; color:#94A3B8; font-size:10px; font-weight:800; }
.fs-ref-code-line strong { color:#FDE68A; font-family:ui-monospace,monospace; font-size:11px; letter-spacing:1px; }
.fs-ref-kpis { display:grid; grid-template-columns:repeat(5,1fr); gap:5px; margin-top:2px; }
.fs-ref-kpis > div { min-width:0; padding:7px 3px 6px; border:1px solid rgba(255,255,255,.08); border-radius:10px; background:rgba(15,23,42,.58); text-align:center; }
.fs-ref-kpis b { display:block; color:#F8FAFC; font-size:16px; font-weight:950; line-height:1.05; }
.fs-ref-kpis span { display:block; margin-top:3px; color:#94A3B8; font-size:8px; font-weight:850; letter-spacing:.2px; text-transform:uppercase; white-space:nowrap; }
.fs-ref-kpis > div:nth-child(3) b { color:#FDE68A; }
.fs-ref-kpis > div:nth-child(4) b { color:#C4B5FD; }
.fs-ref-kpis > div:nth-child(5) b { color:#6EE7B7; }
.fs-ref-money { display:flex; justify-content:space-between; gap:8px; color:#94A3B8; font-size:10px; font-weight:800; }
.fs-ref-money strong { color:#F8FAFC; font-size:12px; }
.fs-ref-money span:last-child strong { color:#FDE68A; }
.fs-ref-steps { display:flex; align-items:center; justify-content:space-between; gap:3px; padding-top:3px; color:#94A3B8; font-size:8px; font-weight:900; white-space:nowrap; }
.fs-ref-steps span { padding:4px 5px; border-radius:7px; background:rgba(255,255,255,.06); }
.fs-ref-steps span.done { color:#6EE7B7; background:rgba(16,185,129,.14); }
.fs-ref-steps i { color:#64748B; font-style:normal; font-size:13px; }
.fs-sec-ref { color:#FBBF24; }
.fs-section-hint { margin-top:-4px; color:#64748B; font-size:10px; font-weight:700; }
.fs-ref-row { align-items:flex-start; }
.fs-ref-row .fs-card-body { gap:4px; }
.fs-ref-row .fs-name { flex-wrap:wrap; white-space:normal; }
.fs-ref-status { display:inline-flex; width:max-content; padding:3px 7px; border-radius:999px; font-size:9px; font-weight:950; letter-spacing:.1px; }
.fs-ref-status.joined { color:#FDE68A; background:rgba(251,191,36,.18); }
.fs-ref-status.qualified { color:#C4B5FD; background:rgba(139,92,246,.2); }
.fs-ref-status.rewarded { color:#6EE7B7; background:rgba(16,185,129,.2); }
.fs-ref-status.invalid { color:#FCA5A5; background:rgba(239,68,68,.16); }
.fs-ref-detail { color:#94A3B8; font-size:10px; font-weight:700; line-height:1.35; }
.fs-ref-detail b { color:#CBD5E1; font-weight:900; }
.fs-ref-time { color:#64748B; font-size:9px; font-weight:700; }
.fs-ref-activity { display:flex; flex-direction:column; gap:6px; }
.fs-ref-event { display:flex; align-items:center; gap:8px; padding:9px 10px; border:1px solid rgba(255,255,255,.07); border-radius:11px; background:rgba(255,255,255,.035); }
.fs-ref-event-icon { width:25px; height:25px; display:grid; place-items:center; border-radius:8px; background:rgba(139,92,246,.18); font-size:13px; }
.fs-ref-event.rewarded .fs-ref-event-icon { background:rgba(16,185,129,.18); }
.fs-ref-event-copy { flex:1; min-width:0; }
.fs-ref-event-copy strong { display:block; color:#E2E8F0; font-size:10px; font-weight:900; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fs-ref-event-copy span { display:block; margin-top:2px; color:#64748B; font-size:9px; font-weight:700; }
.fs-ref-event-amount { color:#6EE7B7; font-size:11px; font-weight:950; white-space:nowrap; }
@media (max-width:360px) {
  .fs-ref-kpis { gap:3px; }
  .fs-ref-kpis b { font-size:14px; }
  .fs-ref-kpis span { font-size:7px; }
  .fs-ref-steps { font-size:7px; }
  .fs-ref-steps span { padding-inline:3px; }
}
