﻿/* FRANYXAI — Feature Styles */
  .platform-banner{ padding:20px !important; }

/* ══════════════════════════════════════════
   AI CHAT — MARKDOWN + STREAMING
══════════════════════════════════════════ */

/* Streaming cursor blink */
.fxai-bubble--streaming::after {
  content: '▋';
  display: inline-block;
  color: var(--p2, #00e5ff);
  animation: fxAiBlink .7s step-end infinite;
  margin-left: 2px;
  font-size: .85em;
  vertical-align: middle;
}
@keyframes fxAiBlink { 0%,100%{opacity:1} 50%{opacity:0} }

/* Markdown elements inside AI bubbles */
.fxai-bubble p { margin: 0 0 .6em; line-height: 1.65; }
.fxai-bubble p:last-child { margin-bottom: 0; }
.fxai-bubble h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem; font-weight: 700;
  color: var(--p2, #00e5ff);
  margin: .8em 0 .3em;
  letter-spacing: -.3px;
}
.fxai-bubble h4 {
  font-size: .88rem; font-weight: 600;
  color: var(--text, #eeeef8);
  margin: .6em 0 .25em;
}
.fxai-bubble h5 {
  font-size: .82rem; font-weight: 600;
  color: var(--text2, #7878a0);
  margin: .5em 0 .2em;
}
.fxai-bubble pre {
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 12px 14px;
  margin: .6em 0;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem;
  line-height: 1.6;
  color: #c4b5fd;
}
.fxai-bubble code {
  font-family: 'JetBrains Mono', monospace;
  font-size: .8em;
  background: rgba(124,58,237,.18);
  border: 1px solid rgba(124,58,237,.25);
  border-radius: 5px;
  padding: 1px 6px;
  color: #c4b5fd;
}
.fxai-bubble pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.fxai-bubble ul, .fxai-bubble ol {
  margin: .4em 0 .4em 1.4em;
  padding: 0;
}
.fxai-bubble li { margin: .2em 0; line-height: 1.55; }
.fxai-bubble strong { color: var(--text, #eeeef8); font-weight: 600; }
.fxai-bubble em { color: #a78bfa; font-style: italic; }
.fxai-bubble del { color: var(--text2, #7878a0); text-decoration: line-through; }
.fxai-bubble a {
  color: var(--p2, #00e5ff);
  text-decoration: none;
  border-bottom: 1px solid rgba(0,229,255,.3);
  transition: border-color .2s;
}
.fxai-bubble a:hover { border-bottom-color: var(--p2, #00e5ff); }

/* ══════════════════════════════════════════
   EMPTY STATES — Global .fx-empty
══════════════════════════════════════════ */
.fx-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 24px;
  text-align: center;
  color: var(--text2, #7878a0);
}
.fx-empty-icon {
  font-size: 2.6rem;
  opacity: .35;
  line-height: 1;
  margin-bottom: 4px;
}
.fx-empty-title {
  font-family: 'Syne', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  color: var(--text, #eeeef8);
  opacity: .7;
}
.fx-empty-sub {
  font-size: .8rem;
  color: var(--text2, #7878a0);
  max-width: 260px;
  line-height: 1.5;
}
.fx-empty-action {
  margin-top: 8px;
  padding: 8px 20px;
  background: rgba(124,58,237,.15);
  border: 1px solid rgba(124,58,237,.3);
  border-radius: 10px;
  color: #a78bfa;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.fx-empty-action:hover {
  background: rgba(124,58,237,.28);
  border-color: rgba(124,58,237,.5);
  color: #c4b5fd;
}

/* ══════════════════════════════════════════
   FINANCE ENHANCEMENTS — .fxf-*
══════════════════════════════════════════ */
.fxf-section {
  margin-top: 20px;
  background: var(--glass, rgba(255,255,255,.04));
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: var(--r2, 18px);
  padding: 20px;
}
.fxf-section-title {
  font-family: 'Syne', sans-serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text2, #7878a0);
  margin-bottom: 14px;
}
/* Budget progress */
.fxf-budget-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: .82rem;
}
.fxf-budget-label { color: var(--text2); }
.fxf-budget-status { font-weight: 600; font-size: .8rem; }
.fxf-budget-status.ok    { color: var(--green, #00e5a0); }
.fxf-budget-status.warn  { color: var(--amber, #ffc84a); }
.fxf-budget-status.over  { color: var(--red, #ff4d6a); }
.fxf-progress-track {
  height: 6px;
  border-radius: 99px;
  background: rgba(255,255,255,.06);
  overflow: hidden;
  margin-bottom: 12px;
}
.fxf-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--green, #00e5a0);
  transition: width .5s cubic-bezier(.22,1,.36,1), background .3s;
}
.fxf-progress-fill.warn { background: var(--amber, #ffc84a); }
.fxf-progress-fill.over { background: var(--red, #ff4d6a); }
/* Budget input row */
.fxf-input-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.fxf-input {
  flex: 1;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text);
  font-size: .85rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color .2s;
}
.fxf-input:focus { border-color: var(--p1, #7C3AED); }
.fxf-btn {
  padding: 8px 16px;
  background: rgba(124,58,237,.18);
  border: 1px solid rgba(124,58,237,.3);
  border-radius: 10px;
  color: #a78bfa;
  font-weight: 600;
  font-size: .82rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}
.fxf-btn:hover { background: rgba(124,58,237,.3); }
/* Spending breakdown bars */
.fxf-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: .8rem;
}
.fxf-bar-label { width: 90px; color: var(--text2); flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fxf-bar-track { flex: 1; height: 5px; background: rgba(255,255,255,.06); border-radius: 99px; overflow: hidden; }
.fxf-bar-fill  { height: 100%; border-radius: 99px; background: var(--grad, linear-gradient(135deg,#7C3AED,#00e5ff)); }
.fxf-bar-val   { width: 50px; text-align: right; color: var(--text); font-weight: 600; flex-shrink: 0; }
/* Month selector + export row */
.fxf-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.fxf-month-sel {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 12px;
  color: var(--text);
  font-size: .82rem;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url(“data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237878a0'/%3E%3C/svg%3E”);
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.fxf-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(0,229,160,.1);
  border: 1px solid rgba(0,229,160,.25);
  border-radius: 10px;
  color: var(--green, #00e5a0);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.fxf-export-btn:hover { background: rgba(0,229,160,.2); }


/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   BATCH 1: NOTIFICATIONS + AI INSIGHT + TOAST
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€â”€ Notification Bell â”€â”€â”€ */
.notif-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.notif-bell {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,.04) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  color: var(--ink-2) !important;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: all .25s var(--ease-out, cubic-bezier(.22,1,.36,1)) !important;
  padding: 0 !important;
}
.notif-bell:hover {
  background: rgba(124,58,237,.15) !important;
  border-color: rgba(124,58,237,.4) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(124,58,237,.25);
}
.notif-bell.has-new svg {
  animation: bellShake 1.2s ease-in-out 3;
  color: #fff !important;
}
@keyframes bellShake {
  0%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(-12deg); }
  20%, 40% { transform: rotate(12deg); }
  50% { transform: rotate(0); }
}
.notif-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 10px;
  background: linear-gradient(135deg, #EC4899, #F43F5E);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: .65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-1, #06060d);
  box-shadow: 0 0 0 0 rgba(236,72,153,.6);
  animation: badgePulse 3s ease-in-out 2;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(236,72,153,.6); }
  50% { box-shadow: 0 0 0 6px rgba(236,72,153,0); }
}

/* â”€â”€â”€ Notification Dropdown â”€â”€â”€ */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 360px;
  max-height: 480px;
  background: rgba(13,13,22,.96);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.02) inset;
  overflow: hidden;
  display: none; /* hidden by default; JS adds .is-open to show */
  flex-direction: column;
  z-index: 1000;
  transform-origin: top right;
}
.notif-dropdown[hidden] { display: none !important; }
.notif-dropdown.is-open {
  display: flex;
  animation: notifDropIn .22s cubic-bezier(.22,1,.36,1);
}
.notif-dropdown.is-closing {
  display: flex;
  animation: notifDropOut .18s cubic-bezier(.22,1,.36,1) forwards;
  pointer-events: none;
}
@keyframes notifDropIn {
  from { opacity: 0; transform: scale(.92) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes notifDropOut {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to   { opacity: 0; transform: scale(.92) translateY(-8px); }
}
.notif-dropdown::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,58,237,.5), rgba(6,182,212,.5), transparent);
}
.notif-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.notif-hd-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: -.01em;
  color: #fff;
}
.notif-hd-action {
  background: transparent;
  border: none;
  color: var(--brand-2, #06B6D4);
  cursor: pointer;
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all .2s ease;
}
.notif-hd-action:hover {
  background: rgba(6,182,212,.1);
  color: #fff;
}
.notif-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}
.notif-list::-webkit-scrollbar { width: 6px; }
.notif-list::-webkit-scrollbar-thumb { background: rgba(124,58,237,.3); border-radius: 6px; }
.notif-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .18s ease;
  position: relative;
}
.notif-item:hover {
  background: rgba(124,58,237,.08);
}
.notif-item.unread {
  background: rgba(124,58,237,.06);
}
.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand-2, #06B6D4);
  box-shadow: 0 0 8px rgba(6,182,212,.8);
}
.notif-item-ic {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.notif-item-ic.chat { background: linear-gradient(135deg, rgba(124,58,237,.25), rgba(124,58,237,.1)); }
.notif-item-ic.friend { background: linear-gradient(135deg, rgba(6,182,212,.25), rgba(6,182,212,.1)); }
.notif-item-ic.tx { background: linear-gradient(135deg, rgba(34,197,94,.25), rgba(34,197,94,.1)); }
.notif-item-ic.task { background: linear-gradient(135deg, rgba(251,191,36,.25), rgba(251,191,36,.1)); }
.notif-item-ic.system { background: linear-gradient(135deg, rgba(236,72,153,.25), rgba(236,72,153,.1)); }
.notif-item-body { min-width: 0; }
.notif-item-title {
  font-weight: 600;
  font-size: .82rem;
  color: #fff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-item-desc {
  font-size: .73rem;
  color: var(--ink-2, #8b8b9d);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-item-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: .65rem;
  color: var(--ink-3, #5c5c70);
  white-space: nowrap;
  align-self: start;
}
.notif-empty {
  padding: 40px 20px;
  text-align: center;
}
.notif-empty-ic { font-size: 2.2rem; margin-bottom: 8px; opacity: .5; }
.notif-empty-title {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: .95rem;
  color: #fff;
  margin-bottom: 4px;
}
.notif-empty-sub { font-size: .76rem; color: var(--ink-2); }

/* â”€â”€â”€ AI Insight Card â”€â”€â”€ */
.ai-insight-card {
  background: linear-gradient(135deg, rgba(124,58,237,.08), rgba(6,182,212,.05), rgba(236,72,153,.06));
  border: 1px solid rgba(124,58,237,.18);
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.ai-insight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(124,58,237,.15), transparent 50%);
  pointer-events: none;
}
.ai-insight-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,58,237,.6), rgba(6,182,212,.6), rgba(236,72,153,.6), transparent);
  background-size: 200% 100%;
}
.ai-insight-hd {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.ai-insight-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-1, #7C3AED), var(--brand-2, #06B6D4));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(124,58,237,.4);
}
.ai-insight-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.01em;
  background: linear-gradient(135deg, #fff, #b8b8d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  flex: 1;
}
.ai-insight-sub {
  font-size: .76rem;
  color: var(--ink-2);
  margin-top: 1px;
}
.ai-insight-refresh {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--ink-2);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s ease;
  margin-left: auto;
}
.ai-insight-refresh:hover {
  background: rgba(124,58,237,.15);
  color: #fff;
  transform: rotate(180deg);
}
.ai-insight-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.ai-insight-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 12px;
  transition: all .22s ease;
  animation: insightFadeIn .35s ease backwards;
}
.ai-insight-item:nth-child(1) { animation-delay: .05s; }
.ai-insight-item:nth-child(2) { animation-delay: .15s; }
.ai-insight-item:nth-child(3) { animation-delay: .25s; }
.ai-insight-item:nth-child(4) { animation-delay: .35s; }
.ai-insight-item:nth-child(5) { animation-delay: .45s; }
@keyframes insightFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.ai-insight-item:hover {
  background: rgba(255,255,255,.05);
  border-color: rgba(124,58,237,.25);
  transform: translateX(2px);
}
.ai-insight-emoji {
  font-size: 1.05rem;
  line-height: 1.4;
  flex-shrink: 0;
}
.ai-insight-text {
  flex: 1;
  font-size: .82rem;
  line-height: 1.45;
  color: var(--ink-1, #e9e9f0);
}
.ai-insight-text b {
  color: #fff;
  font-weight: 600;
}
.ai-insight-action {
  background: transparent;
  border: 1px solid rgba(124,58,237,.4);
  color: var(--brand-2, #06B6D4);
  font-size: .7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.ai-insight-action:hover {
  background: linear-gradient(135deg, var(--brand-1, #7C3AED), var(--brand-2, #06B6D4));
  color: #fff;
  border-color: transparent;
  transform: translateY(-1px);
}
.ai-insight-skeleton {
  height: 38px;
  background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.06), rgba(255,255,255,.03));
  background-size: 200% 100%;
  border-radius: 10px;
  animation: skelShimmer 1.4s ease-in-out infinite;
}
.ai-insight-skeleton.short { width: 70%; }
@keyframes skelShimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* â”€â”€â”€ Toast Notifications â”€â”€â”€ */
.fx-toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 380px;
}
.fx-toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(13,13,22,.96);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  box-shadow: 0 16px 50px rgba(0,0,0,.5);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: toastIn .35s cubic-bezier(.22,1,.36,1);
  min-width: 280px;
}
.fx-toast.leaving {
  animation: toastOut .25s ease forwards;
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100%) scale(.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}
@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(100%) scale(.92);
  }
}
.fx-toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand-1, #7C3AED);
}
.fx-toast.success::before { background: #22c55e; }
.fx-toast.error::before { background: #ef4444; }
.fx-toast.info::before { background: var(--brand-2, #06B6D4); }
.fx-toast.chat::before { background: var(--brand-1, #7C3AED); }
.fx-toast.friend::before { background: var(--brand-2, #06B6D4); }
.fx-toast.tx::before { background: #22c55e; }

.fx-toast-ic {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.fx-toast.success .fx-toast-ic { background: rgba(34,197,94,.15); }
.fx-toast.error .fx-toast-ic { background: rgba(239,68,68,.15); }
.fx-toast.info .fx-toast-ic { background: rgba(6,182,212,.15); }
.fx-toast.chat .fx-toast-ic { background: rgba(124,58,237,.18); }
.fx-toast.friend .fx-toast-ic { background: rgba(6,182,212,.18); }
.fx-toast.tx .fx-toast-ic { background: rgba(34,197,94,.18); }

.fx-toast-body { min-width: 0; }
.fx-toast-title {
  font-weight: 600;
  font-size: .85rem;
  color: #fff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fx-toast-msg {
  font-size: .76rem;
  color: var(--ink-2, #8b8b9d);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fx-toast-close {
  background: transparent;
  border: none;
  color: var(--ink-3, #5c5c70);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0 4px;
  align-self: start;
  transition: color .2s ease;
}
.fx-toast-close:hover { color: #fff; }

@media (max-width: 768px) {
  .fx-toast-stack {
    top: 12px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
  .fx-toast { min-width: 0; }
  .notif-dropdown {
    width: calc(100vw - 24px);
    max-width: 380px;
    right: -50px;
  }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   BATCH 2: ANALYTICS + FINANCE UPGRADE
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€â”€ Finance Insight Banner â”€â”€â”€ */
.fin-insight {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(124,58,237,.1), rgba(6,182,212,.06));
  border: 1px solid rgba(124,58,237,.2);
  border-radius: 14px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  animation: insightFadeIn .35s ease;
}
.fin-insight::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,58,237,.5), transparent);
  background-size: 200% 100%;
}
.fin-insight-ic {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(124,58,237,.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.fin-insight-text {
  font-size: .85rem;
  color: var(--ink-1);
  line-height: 1.4;
}
.fin-insight-text b { color: #fff; font-weight: 600; }

/* â”€â”€â”€ Period Selector â”€â”€â”€ */
.fin-period {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  padding: 4px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 12px;
  width: fit-content;
}
.fin-period-btn {
  background: transparent;
  border: none;
  color: var(--ink-2);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .22s ease;
}
.fin-period-btn:hover { color: #fff; background: rgba(255,255,255,.04); }
.fin-period-btn.on {
  background: linear-gradient(135deg, var(--brand-1, #7C3AED), var(--brand-2, #06B6D4));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(124,58,237,.4);
}

/* â”€â”€â”€ KPI Cards â”€â”€â”€ */
.fin-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 768px) {
  .fin-kpis { grid-template-columns: repeat(2, 1fr); }
}
.fin-kpi {
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: all .25s var(--ease-out, cubic-bezier(.22,1,.36,1));
}
.fin-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.fin-kpi.income { border-color: rgba(34,197,94,.2); }
.fin-kpi.expense { border-color: rgba(239,68,68,.2); }
.fin-kpi.savings { border-color: rgba(124,58,237,.2); }
.fin-kpi.count { border-color: rgba(6,182,212,.2); }
.fin-kpi-ic {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}
.fin-kpi.income .fin-kpi-ic { background: rgba(34,197,94,.15); color: #22c55e; }
.fin-kpi.expense .fin-kpi-ic { background: rgba(239,68,68,.15); color: #ef4444; }
.fin-kpi.savings .fin-kpi-ic { background: rgba(124,58,237,.15); color: var(--brand-1, #7C3AED); }
.fin-kpi.count .fin-kpi-ic { background: rgba(6,182,212,.15); color: var(--brand-2, #06B6D4); }
.fin-kpi-body { min-width: 0; flex: 1; }
.fin-kpi-lbl { font-size: .68rem; color: var(--ink-3, #5c5c70); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px; }
.fin-kpi-val {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fin-kpi-trend {
  font-size: .68rem;
  color: var(--ink-3);
  margin-top: 2px;
  font-family: 'JetBrains Mono', monospace;
}
.fin-kpi-trend.up { color: #22c55e; }
.fin-kpi-trend.down { color: #ef4444; }

/* â”€â”€â”€ Charts Row â”€â”€â”€ */
.fin-charts {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
@media (max-width: 900px) {
  .fin-charts { grid-template-columns: 1fr; }
}
.chart-card { padding: 16px; }
.chart-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .7rem;
  color: var(--ink-2);
}
.chart-legend .lg-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-left: 6px;
}
.chart-legend .lg-lbl { margin-right: 4px; }

.chart-wrap {
  position: relative;
  margin-top: 8px;
  min-height: 220px;
}
.fin-chart {
  width: 100%;
  height: 220px;
  display: block;
  overflow: visible;
}
.chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-size: .82rem;
}

/* SVG line chart styling */
.fin-chart .grid-line { stroke: rgba(255,255,255,.05); stroke-width: 1; }
.fin-chart .axis-lbl { fill: var(--ink-3, #5c5c70); font-size: 10px; font-family: 'JetBrains Mono', monospace; }
.fin-chart .area-exp {
  fill: url(#expGrad);
  opacity: .8;
}
.fin-chart .area-inc {
  fill: url(#incGrad);
  opacity: .6;
}
.fin-chart .line-exp {
  fill: none;
  stroke: #ef4444;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 6px rgba(239,68,68,.3));
}
.fin-chart .line-inc {
  fill: none;
  stroke: #22c55e;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 6px rgba(34,197,94,.3));
}
.fin-chart .point {
  fill: var(--bg-1, #06060d);
  stroke-width: 2;
  cursor: pointer;
  transition: r .15s ease;
}
.fin-chart .point.exp { stroke: #ef4444; }
.fin-chart .point.inc { stroke: #22c55e; }
.fin-chart .point:hover { r: 5; }

/* â”€â”€â”€ Category Grid â”€â”€â”€ */
.cat-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.cat-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
}
.cat-row-ic {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
}
.cat-row-body { min-width: 0; }
.cat-row-lbl-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px;
  font-size: .78rem;
}
.cat-row-name { color: var(--ink-1); font-weight: 500; }
.cat-row-pct { color: var(--ink-2); font-family: 'JetBrains Mono', monospace; font-size: .7rem; }
.cat-row-bar {
  height: 5px;
  background: rgba(255,255,255,.05);
  border-radius: 3px;
  overflow: hidden;
}
.cat-row-bar-fg {
  height: 100%;
  border-radius: 3px;
  transition: width .6s cubic-bezier(.22,1,.36,1);
}
.cat-row-amt {
  font-family: 'Syne', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

/* â”€â”€â”€ Category Picker (in Add Tx form) â”€â”€â”€ */
.cat-picker { margin: 6px 0; }
.cat-picker-lbl {
  font-size: .72rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cat-auto {
  background: rgba(124,58,237,.15);
  color: var(--brand-2, #06B6D4);
  font-size: .6rem;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: lowercase;
}
.cat-auto.manual {
  background: rgba(255,255,255,.06);
  color: var(--ink-2);
}
.cat-picker-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cat-pick-btn {
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.06);
  color: var(--ink-2);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: .72rem;
  cursor: pointer;
  transition: all .2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}
.cat-pick-btn:hover {
  background: rgba(255,255,255,.05);
  color: #fff;
}
.cat-pick-btn.on {
  background: linear-gradient(135deg, var(--brand-1, #7C3AED), var(--brand-2, #06B6D4));
  color: #fff;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(124,58,237,.3);
}

/* â”€â”€â”€ Transaction list category badge â”€â”€â”€ */
.tx-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .65rem;
  color: var(--ink-3);
  background: rgba(255,255,255,.04);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.bal-meta .meta-trend {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
}
.bal-meta .meta-trend.up { color: #22c55e; }
.bal-meta .meta-trend.down { color: #ef4444; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   DASHBOARD ANALYTICS
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€â”€ Productivity Score Hero â”€â”€â”€ */
.prod-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
  padding: 22px 24px;
  background: linear-gradient(135deg, rgba(124,58,237,.1), rgba(6,182,212,.06), rgba(236,72,153,.05));
  border: 1px solid rgba(124,58,237,.18);
  border-radius: 18px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.prod-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 100%, rgba(124,58,237,.18), transparent 50%);
  pointer-events: none;
}
.prod-score-wrap {
  position: relative;
  width: 130px;
  height: 130px;
}
.prod-ring { transform: rotate(-90deg); width: 100%; height: 100%; }
.prod-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,.05);
  stroke-width: 8;
}
.prod-ring-fg {
  fill: none;
  stroke: url(#prodGrad);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dasharray 1.2s cubic-bezier(.22,1,.36,1);
}
.prod-score-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.prod-score-num {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2.4rem;
  background: linear-gradient(135deg, #fff, #b8b8d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.prod-score-lbl {
  font-size: .65rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-top: 2px;
}
.prod-meta { min-width: 0; position: relative; z-index: 1; }
.prod-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 4px;
}
.prod-sub {
  font-size: .82rem;
  color: var(--ink-2);
  margin-bottom: 14px;
  line-height: 1.4;
}
.prod-breakdown {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.prod-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
}
.prod-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.prod-dot.tasks { background: var(--brand-1, #7C3AED); }
.prod-dot.social { background: var(--brand-2, #06B6D4); }
.prod-dot.finance { background: #22c55e; }
.prod-lbl { color: var(--ink-2); }
.prod-val {
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
  font-weight: 600;
}
@media (max-width: 600px) {
  .prod-hero { grid-template-columns: 1fr; text-align: center; gap: 16px; }
  .prod-score-wrap { margin: 0 auto; width: 110px; height: 110px; }
  .prod-score-num { font-size: 2rem; }
  .prod-breakdown { justify-content: center; }
}

/* â”€â”€â”€ Activity Heatmap â”€â”€â”€ */
.heatmap-card { padding: 18px 20px; margin-bottom: 16px; }
.card-sub {
  font-size: .72rem;
  color: var(--ink-3);
  font-family: 'JetBrains Mono', monospace;
}
.heatmap-wrap {
  margin-top: 12px;
  overflow-x: auto;
}
.heatmap-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 1fr);
  gap: 3px;
  min-width: max-content;
}
.hm-cell {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: rgba(255,255,255,.04);
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: pointer;
  position: relative;
}
.hm-cell:hover {
  transform: scale(1.4);
  z-index: 5;
  box-shadow: 0 0 0 1px rgba(124,58,237,.6);
}
.hm-cell[data-level="1"] { background: rgba(124,58,237,.25); }
.hm-cell[data-level="2"] { background: rgba(124,58,237,.45); }
.hm-cell[data-level="3"] { background: rgba(124,58,237,.7); }
.hm-cell[data-level="4"] { background: linear-gradient(135deg, var(--brand-1, #7C3AED), var(--brand-2, #06B6D4)); box-shadow: 0 0 8px rgba(124,58,237,.5); }
.hm-cell[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(13,13,22,.96);
  color: #fff;
  font-size: .68rem;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 100;
  border: 1px solid rgba(255,255,255,.1);
  font-family: 'JetBrains Mono', monospace;
}
.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  justify-content: flex-end;
  font-size: .68rem;
  color: var(--ink-3);
}
.hm-lg-lbl { padding: 0 6px; }
.hm-lg-cell {
  width: 10px; height: 10px;
  border-radius: 2px;
  background: rgba(255,255,255,.04);
}
.hm-lg-cell[data-level="1"] { background: rgba(124,58,237,.25); }
.hm-lg-cell[data-level="2"] { background: rgba(124,58,237,.45); }
.hm-lg-cell[data-level="3"] { background: rgba(124,58,237,.7); }
.hm-lg-cell[data-level="4"] { background: linear-gradient(135deg, var(--brand-1, #7C3AED), var(--brand-2, #06B6D4)); }

/* â”€â”€â”€ Mini Charts â”€â”€â”€ */
.mini-charts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  .mini-charts { grid-template-columns: 1fr; }
}
.mini-chart-card { padding: 14px 16px; }
.mini-bar-svg {
  width: 100%;
  height: 90px;
  margin-top: 6px;
  display: block;
}
.mini-bar {
  transition: y .5s cubic-bezier(.22,1,.36,1), height .5s cubic-bezier(.22,1,.36,1);
}
.mini-bar.tasks { fill: url(#miniGradPurple); }
.mini-bar.chats { fill: url(#miniGradCyan); }
.mini-bar.income { fill: url(#miniGradGreen); }
.mini-bar.expense { fill: url(#miniGradRed); }
.mini-bar:hover { opacity: .8; }
.mini-axis-lbl {
  fill: var(--ink-3);
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
}
.mini-chart-foot {
  font-size: .68rem;
  color: var(--ink-3);
  margin-top: 4px;
  text-align: center;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   BATCH 3: GAMIFICATION + SOCIAL UPGRADE
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€â”€ Sidebar XP bar â”€â”€â”€ */
.sb-xp-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  width: 100%;
}
.sb-level-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: .6rem;
  font-weight: 700;
  color: var(--brand-2, #06B6D4);
  background: rgba(6,182,212,.12);
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: .03em;
}
.sb-xp-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,.06);
  border-radius: 3px;
  overflow: hidden;
  min-width: 40px;
}
.sb-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-1, #7C3AED), var(--brand-2, #06B6D4));
  border-radius: 3px;
  transition: width .8s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 0 6px rgba(124,58,237,.5);
}
.sidebar.col .sb-xp-wrap { display: none; }

/* â”€â”€â”€ Profile Level Card â”€â”€â”€ */
.gm-level-card {
  background: linear-gradient(135deg, rgba(124,58,237,.1), rgba(6,182,212,.06));
  border: 1px solid rgba(124,58,237,.2);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.gm-level-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 100%, rgba(124,58,237,.15), transparent 50%);
  pointer-events: none;
}
.gm-level-hd {
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  z-index: 1;
}
.gm-level-ring {
  position: relative;
  width: 80px; height: 80px;
  flex-shrink: 0;
}
.gm-ring-svg {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.gm-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,.06);
  stroke-width: 5;
}
.gm-ring-fg {
  fill: none;
  stroke: url(#gmGrad);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 0 214;
  transition: stroke-dasharray 1s cubic-bezier(.22,1,.36,1);
}
.gm-level-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  background: linear-gradient(135deg, #fff, #b8b8d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gm-level-info { flex: 1; min-width: 0; }
.gm-level-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 4px;
}
.gm-xp-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.gm-xp-bar {
  height: 8px;
  background: rgba(255,255,255,.06);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}
.gm-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-1, #7C3AED), var(--brand-2, #06B6D4), var(--brand-3, #EC4899));
  background-size: 200% 100%;
  animation: xpShimmer 3s ease-in-out infinite;
  border-radius: 6px;
  transition: width 1s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 0 10px rgba(124,58,237,.5);
}
@keyframes xpShimmer {
  0%,100% { background-position: 0% 0; }
  50% { background-position: 100% 0; }
}
.gm-xp-sub {
  font-size: .72rem;
  color: var(--ink-3);
  line-height: 1.35;
}

/* Daily Bonus Button */
.gm-daily-wrap {
  margin-top: 14px;
  position: relative;
  z-index: 1;
}
.gm-daily-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(251,191,36,.12), rgba(245,158,11,.06));
  border: 1px solid rgba(251,191,36,.3);
  border-radius: 12px;
  cursor: pointer;
  transition: all .25s ease;
  position: relative;
  overflow: hidden;
}
.gm-daily-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(251,191,36,.05), transparent);
  opacity: 0;
  transition: opacity .25s ease;
}
.gm-daily-btn:hover::before { opacity: 1; }
.gm-daily-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(251,191,36,.2);
  border-color: rgba(251,191,36,.5);
}
.gm-daily-btn.claimed {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}
.gm-daily-ic { font-size: 1.3rem; }
.gm-daily-text {
  flex: 1;
  font-weight: 600;
  font-size: .85rem;
  color: #fff;
  text-align: left;
}
.gm-daily-xp {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251,191,36,.12);
  padding: 3px 8px;
  border-radius: 6px;
}

/* â”€â”€â”€ Badges â”€â”€â”€ */
.gm-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.gm-badges-empty {
  font-size: .8rem;
  color: var(--ink-3);
  padding: 12px 0;
  width: 100%;
}
.gm-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  transition: all .25s ease;
  animation: insightFadeIn .35s ease backwards;
  flex: 0 0 auto;
  max-width: 200px;
}
.gm-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.3);
  border-color: rgba(124,58,237,.3);
}
.gm-badge-ic {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.gm-badge-body { min-width: 0; }
.gm-badge-name {
  font-weight: 600;
  font-size: .78rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gm-badge-desc {
  font-size: .65rem;
  color: var(--ink-3);
  line-height: 1.3;
}
.gm-badge.locked {
  opacity: .35;
  filter: grayscale(.8);
}
.gm-badge.earned .gm-badge-ic {
  box-shadow: 0 0 12px rgba(124,58,237,.4);
}

/* â”€â”€â”€ Profile Stats Grid â”€â”€â”€ */
.pf-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
@media (max-width: 500px) {
  .pf-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
.pf-stat {
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  transition: all .22s ease;
}
.pf-stat:hover {
  transform: translateY(-2px);
  border-color: rgba(124,58,237,.25);
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.pf-stat-val {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}
.pf-stat-lbl {
  font-size: .68rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* â”€â”€â”€ Invite Card â”€â”€â”€ */
.gm-invite-card { overflow: hidden; }
.gm-invite-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 0;
  position: relative;
}
.gm-invite-ic { font-size: 1.8rem; flex-shrink: 0; }
.gm-invite-text { flex: 1; min-width: 0; }
.gm-invite-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  color: #fff;
  margin-bottom: 2px;
}
.gm-invite-sub {
  font-size: .78rem;
  color: var(--ink-2);
  line-height: 1.35;
}
.gm-invite-btn {
  flex-shrink: 0;
  padding: 8px 16px !important;
  font-size: .8rem !important;
}

/* â”€â”€â”€ Leaderboard â”€â”€â”€ */
.gm-leaderboard {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gm-lb-row {
  display: grid;
  grid-template-columns: 28px 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  transition: all .2s ease;
  animation: insightFadeIn .3s ease backwards;
}
.gm-lb-row:hover { background: rgba(124,58,237,.06); transform: translateX(2px); }
.gm-lb-row.is-me {
  background: linear-gradient(135deg, rgba(124,58,237,.1), rgba(6,182,212,.06));
  border: 1px solid rgba(124,58,237,.2);
}
.gm-lb-rank {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: .95rem;
  text-align: center;
}
.gm-lb-rank.gold { color: #fbbf24; }
.gm-lb-rank.silver { color: #94a3b8; }
.gm-lb-rank.bronze { color: #b45309; }
.gm-lb-av {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(124,58,237,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  font-weight: 600;
  color: var(--brand-1, #7C3AED);
  overflow: hidden;
  flex-shrink: 0;
}
.gm-lb-av .av-img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.gm-lb-body { min-width: 0; }
.gm-lb-name {
  font-weight: 600;
  font-size: .82rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gm-lb-meta {
  font-size: .68rem;
  color: var(--ink-3);
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  gap: 6px;
}
.gm-lb-xp {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .9rem;
  color: var(--brand-2, #06B6D4);
  white-space: nowrap;
}

/* â”€â”€â”€ Friend list enhancement: last seen + level badge â”€â”€â”€ */
.fr-row .fr-level-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: .58rem;
  font-weight: 700;
  color: var(--brand-2, #06B6D4);
  background: rgba(6,182,212,.12);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 6px;
}
.fr-row .fr-last-seen {
  font-size: .68rem;
  color: var(--ink-3);
}

/* â”€â”€â”€ XP Popup (floats up when XP earned) â”€â”€â”€ */
.xp-popup {
  position: fixed;
  bottom: 80px;
  right: 24px;
  z-index: 99998;
  animation: xpPopup 2s ease forwards;
  pointer-events: none;
}
@keyframes xpPopup {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  60% { opacity: 1; transform: translateY(-40px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-60px) scale(.8); }
}
.xp-popup-inner {
  background: linear-gradient(135deg, var(--brand-1, #7C3AED), var(--brand-2, #06B6D4));
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  padding: 8px 16px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(124,58,237,.5);
  display: flex;
  align-items: center;
  gap: 6px;
}
.xp-popup-inner .xp-ic { font-size: 1.2rem; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   BATCH 3: SOCIAL UPGRADE
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€â”€ Friend Suggestions â”€â”€â”€ */
.fr-suggest-sub {
  font-size: .73rem;
  color: var(--ink-3, #5c5c70);
  margin: -8px 0 12px;
  padding: 0 12px;
}
.fr-suggest-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all .22s ease;
  animation: insightFadeIn .35s ease backwards;
}
.fr-suggest-row:hover {
  border-color: rgba(124,58,237,.2);
  transform: translateX(3px);
}
.fr-suggest-row .fr-av {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg3, #1a1a28);
  font-weight: 600;
  font-size: .85rem;
  color: var(--ink-2);
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.fr-suggest-row .fr-info { flex: 1; min-width: 0; }
.fr-suggest-row .fr-name {
  font-weight: 600;
  font-size: .85rem;
  color: #fff;
}
.fr-suggest-row .fr-frx {
  font-size: .72rem;
  color: var(--ink-3);
  font-family: 'JetBrains Mono', monospace;
}
.fr-suggest-reason {
  font-size: .68rem;
  color: var(--brand-2, #06B6D4);
  margin-top: 2px;
}
.fr-suggest-btn {
  background: linear-gradient(135deg, var(--brand-1, #7C3AED), var(--brand-2, #06B6D4));
  border: none;
  color: #fff;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .22s ease;
}
.fr-suggest-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(124,58,237,.4);
}
.fr-suggest-btn.sent {
  background: rgba(255,255,255,.06);
  color: var(--ink-2);
  cursor: default;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   BATCH 4: PERSONALIZATION + THEME
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€â”€ Settings Button (sidebar) â”€â”€â”€ */
.btn-settings {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  color: var(--ink-2, var(--text2, #7878a0));
  width: 30px; height: 30px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .25s ease;
  padding: 0;
}
.btn-settings:hover {
  background: rgba(124,58,237,.15);
  color: #fff;
  border-color: rgba(124,58,237,.4);
}
.btn-settings:hover svg { transform: rotate(90deg); }
.btn-settings svg { transition: transform .4s ease; }

/* â”€â”€â”€ Settings Modal Body â”€â”€â”€ */
.settings-body {
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.settings-section {}
.settings-section-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text2, #7878a0);
  margin-bottom: 12px;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}
.settings-row + .settings-row {
  border-top: 1px solid rgba(255,255,255,.05);
}
.settings-row-label { flex: 1; min-width: 0; }
.settings-row-name {
  font-weight: 600;
  font-size: .88rem;
  color: var(--text, #eeeef8);
}
.settings-row-desc {
  font-size: .73rem;
  color: var(--text2, #7878a0);
  margin-top: 2px;
}
.settings-input {
  width: 140px;
  padding: 8px 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  color: var(--text, #eeeef8);
  font-size: .82rem;
  font-family: 'DM Sans', sans-serif;
  transition: all .22s ease;
}
.settings-input:focus {
  outline: none;
  border-color: var(--brand-1, #7C3AED);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}

/* â”€â”€â”€ Theme Toggle â”€â”€â”€ */
.theme-toggle-wrap {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 3px;
}
.theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text2, #7878a0);
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .22s ease;
  font-family: 'DM Sans', sans-serif;
}
.theme-toggle-btn:hover { color: var(--text, #eeeef8); }
.theme-toggle-btn.active {
  background: linear-gradient(135deg, var(--brand-1, #7C3AED), var(--brand-2, #06B6D4));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(124,58,237,.3);
}

/* â”€â”€â”€ Accent Color Picker â”€â”€â”€ */
.accent-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.accent-swatch {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--swatch);
  border: 3px solid transparent;
  cursor: pointer;
  transition: all .22s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.accent-swatch:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 3px rgba(255,255,255,.1), 0 0 20px color-mix(in srgb, var(--swatch) 40%, transparent);
}
.accent-swatch.active {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,.15), 0 0 24px color-mix(in srgb, var(--swatch) 50%, transparent);
  transform: scale(1.1);
}
.accent-check {
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity .2s ease;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.accent-swatch.active .accent-check { opacity: 1; }

/* â”€â”€â”€ Greeting Style Buttons â”€â”€â”€ */
.greeting-style-wrap {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 3px;
}
.greeting-style-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text2, #7878a0);
  font-size: .75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s ease;
  font-family: 'DM Sans', sans-serif;
}
.greeting-style-btn:hover { color: var(--text, #eeeef8); }
.greeting-style-btn.active {
  background: rgba(124,58,237,.2);
  color: #fff;
  font-weight: 600;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   LIGHT THEME
   Override all dark tokens in one cascade
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
[data-theme="light"] {
  --bg:         #f5f5f7;
  --bg2:        #ebebef;
  --bg3:        #e0e0e6;
  --bg4:        #d5d5dd;
  --bg-1:       #f0f0f4;
  --bg-2:       #ffffff;
  --bg-3:       #f8f8fc;
  --bg-4:       #ebebf0;
  --glass:      rgba(0,0,0,.025);
  --glass2:     rgba(0,0,0,.04);
  --glass-2:    rgba(0,0,0,.04);
  --glass-3:    rgba(0,0,0,.06);
  --border:     rgba(0,0,0,.08);
  --border2:    rgba(0,0,0,.14);
  --hairline:       rgba(0,0,0,.06);
  --hairline-strong:rgba(0,0,0,.12);
  --text:       #1a1a2e;
  --text2:      #5c5c78;
  --text3:      #9090a8;
  --ink-1:      #1a1a2e;
  --ink-2:      #5c5c78;
  --ink-3:      #9090a8;
  --shadow-sm:  0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,.08);
  --shadow-lg:  0 12px 32px rgba(0,0,0,.1);
  --shadow-xl:  0 24px 64px rgba(0,0,0,.12);
  --brand-glow: rgba(124,58,237,.2);
  --brand-glow-soft: rgba(124,58,237,.08);
  --grad-mesh:  radial-gradient(ellipse 1200px 600px at 15% -20%, rgba(124,58,237,.06), transparent 60%),
                radial-gradient(ellipse 900px 500px at 85% 110%, rgba(6,182,212,.04), transparent 65%);
}
[data-theme="light"] body,
[data-theme="light"] {
  color: #1a1a2e;
}
[data-theme="light"] body::before {
  opacity: .5;
}
[data-theme="light"] body::after {
  opacity: .02;
}
[data-theme="light"] .sidebar {
  background: rgba(255,255,255,.92) !important;
  border-color: rgba(0,0,0,.08) !important;
}
[data-theme="light"] .sidebar::before {
  opacity: .3;
}
[data-theme="light"] .top-bar {
  background: rgba(255,255,255,.85) !important;
  border-color: rgba(0,0,0,.06) !important;
}
[data-theme="light"] .card,
[data-theme="light"] .fin-kpi,
[data-theme="light"] .pm-card,
[data-theme="light"] .stat,
[data-theme="light"] .heatmap-card,
[data-theme="light"] .mini-chart-card,
[data-theme="light"] .chart-card {
  background: rgba(255,255,255,.8) !important;
  border-color: rgba(0,0,0,.06) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04) !important;
}
[data-theme="light"] .card:hover,
[data-theme="light"] .pm-card:hover,
[data-theme="light"] .fin-kpi:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.08) !important;
}
[data-theme="light"] .modal-bg { background: rgba(0,0,0,.3); }
[data-theme="light"] .modal {
  background: #fff !important;
  border-color: rgba(0,0,0,.08) !important;
  box-shadow: 0 24px 64px rgba(0,0,0,.15) !important;
}
[data-theme="light"] .f-in,
[data-theme="light"] .todo-in,
[data-theme="light"] .note-ta,
[data-theme="light"] .settings-input,
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="number"],
[data-theme="light"] textarea {
  background: rgba(0,0,0,.03) !important;
  border-color: rgba(0,0,0,.1) !important;
  color: #1a1a2e !important;
}
[data-theme="light"] .notif-dropdown {
  background: rgba(255,255,255,.96) !important;
  border-color: rgba(0,0,0,.08) !important;
}
[data-theme="light"] .notif-item:hover {
  background: rgba(124,58,237,.04) !important;
}
[data-theme="light"] .fx-toast {
  background: rgba(255,255,255,.96) !important;
  border-color: rgba(0,0,0,.08) !important;
}
[data-theme="light"] .ai-insight-card {
  background: linear-gradient(135deg, rgba(124,58,237,.04), rgba(6,182,212,.03), rgba(236,72,153,.03)) !important;
  border-color: rgba(124,58,237,.12) !important;
}
[data-theme="light"] .ai-insight-item {
  background: rgba(0,0,0,.02) !important;
  border-color: rgba(0,0,0,.04) !important;
}
[data-theme="light"] .prod-hero {
  background: linear-gradient(135deg, rgba(124,58,237,.04), rgba(6,182,212,.03)) !important;
  border-color: rgba(124,58,237,.12) !important;
}
[data-theme="light"] .bal-hero {
  background: rgba(255,255,255,.8) !important;
  border-color: rgba(0,0,0,.06) !important;
}
[data-theme="light"] .platform-banner {
  background: linear-gradient(135deg, rgba(124,58,237,.05), rgba(6,182,212,.03)) !important;
}
[data-theme="light"] .frx-strip {
  background: rgba(255,255,255,.8) !important;
  border-color: rgba(0,0,0,.08) !important;
}
[data-theme="light"] .chat-side,
[data-theme="light"] .chat-thread {
  background: rgba(255,255,255,.6) !important;
  border-color: rgba(0,0,0,.06) !important;
}
[data-theme="light"] .msg-bubble.me {
  background: linear-gradient(135deg, var(--brand-1, #7C3AED), var(--brand-2, #06B6D4)) !important;
  color: #fff !important;
}
[data-theme="light"] .msg-bubble.them {
  background: rgba(0,0,0,.04) !important;
  color: #1a1a2e !important;
}
[data-theme="light"] .sb-li:hover,
[data-theme="light"] .sb-li.on {
  background: rgba(124,58,237,.06) !important;
}
[data-theme="light"] .btn-pri {
  box-shadow: 0 4px 12px rgba(124,58,237,.2) !important;
}
[data-theme="light"] .login-card {
  background: rgba(255,255,255,.95) !important;
  border-color: rgba(0,0,0,.06) !important;
}
[data-theme="light"] .hm-cell {
  background: rgba(0,0,0,.04);
}
[data-theme="light"] .theme-toggle-wrap,
[data-theme="light"] .greeting-style-wrap,
[data-theme="light"] .fin-period {
  background: rgba(0,0,0,.03);
  border-color: rgba(0,0,0,.06);
}
[data-theme="light"] .prod-score-num,
[data-theme="light"] .ai-insight-title {
  background: linear-gradient(135deg, #1a1a2e, #5c5c78);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Light theme scrollbar */
[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.12);
}

/* â”€â”€â”€ Accent Color Overrides â”€â”€â”€ */
[data-accent="cyan"] {
  --brand-1: #06B6D4;
  --brand-2: #7C3AED;
  --brand-glow: rgba(6,182,212,.45);
  --brand-glow-soft: rgba(6,182,212,.18);
}
[data-accent="pink"] {
  --brand-1: #EC4899;
  --brand-2: #A855F7;
  --brand-glow: rgba(236,72,153,.45);
  --brand-glow-soft: rgba(236,72,153,.18);
}
[data-accent="green"] {
  --brand-1: #22c55e;
  --brand-2: #06B6D4;
  --brand-glow: rgba(34,197,94,.45);
  --brand-glow-soft: rgba(34,197,94,.18);
}
[data-accent="amber"] {
  --brand-1: #f59e0b;
  --brand-2: #ef4444;
  --brand-glow: rgba(245,158,11,.45);
  --brand-glow-soft: rgba(245,158,11,.18);
}
[data-accent="red"] {
  --brand-1: #ef4444;
  --brand-2: #EC4899;
  --brand-glow: rgba(239,68,68,.45);
  --brand-glow-soft: rgba(239,68,68,.18);
}
/* purple is default â€” no override needed */

/* â”€â”€â”€ Greeting name highlight â”€â”€â”€ */
.greet-name {
  background: var(--grad-brand, linear-gradient(135deg,#7C3AED,#06B6D4));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-theme="light"] .greet-name {
  background: linear-gradient(135deg, var(--brand-1, #7C3AED), var(--brand-2, #06B6D4));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* â”€â”€â”€ Sidebar footer layout fix â”€â”€â”€ */
.sb-foot {
  gap: 6px !important;
}
.sb-foot .btn-settings,
.sb-foot .btn-signout {
  flex-shrink: 0;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   TIER S: CMD PALETTE + CONFETTI + REACTIONS + SEARCH
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€â”€ Command Palette Trigger Button â”€â”€â”€ */
.cmd-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  color: var(--text2, #7878a0);
  cursor: pointer;
  font-size: .78rem;
  font-family: 'DM Sans', sans-serif;
  transition: all .22s ease;
  white-space: nowrap;
}
.cmd-trigger:hover {
  background: rgba(124,58,237,.1);
  border-color: rgba(124,58,237,.3);
  color: #fff;
}
.cmd-trigger-label { pointer-events: none; }
.cmd-kbd {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem;
  color: var(--text3, #40405a);
  pointer-events: none;
}
@media (max-width: 768px) {
  .cmd-trigger-label, .cmd-kbd { display: none; }
  .cmd-trigger { padding: 6px 8px; }
}

/* â”€â”€â”€ Command Palette Overlay â”€â”€â”€ */
.cmd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99990;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: min(20vh, 140px);
  animation: cmdOverlayIn .15s ease;
}
.cmd-overlay.open {
  display: flex;
}
@keyframes cmdOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cmd-palette {
  width: 580px;
  max-width: calc(100vw - 32px);
  max-height: 480px;
  background: rgba(13,13,22,.98);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  box-shadow: 0 32px 80px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.03) inset;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: cmdPaletteIn .2s cubic-bezier(.22,1,.36,1);
}
@keyframes cmdPaletteIn {
  from { opacity: 0; transform: scale(.95) translateY(-12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.cmd-palette::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,58,237,.6), rgba(6,182,212,.6), transparent);
}
.cmd-search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.cmd-search-ic {
  flex-shrink: 0;
  color: var(--brand-1, #7C3AED);
  opacity: .7;
}
.cmd-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 1.05rem;
  font-family: 'DM Sans', sans-serif;
  caret-color: var(--brand-2, #06B6D4);
}
.cmd-search-input::placeholder { color: var(--text3, #40405a); }
.cmd-esc {
  padding: 3px 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem;
  color: var(--text3);
  flex-shrink: 0;
}
.cmd-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}
.cmd-results::-webkit-scrollbar { width: 6px; }
.cmd-results::-webkit-scrollbar-thumb { background: rgba(124,58,237,.3); border-radius: 6px; }
.cmd-group { margin-bottom: 8px; }
.cmd-group-title {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text3, #40405a);
  padding: 6px 12px 4px;
}
.cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .12s ease;
}
.cmd-item:hover, .cmd-item.active {
  background: rgba(124,58,237,.12);
}
.cmd-item.active {
  box-shadow: inset 0 0 0 1px rgba(124,58,237,.3);
}
.cmd-item-ic {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
  background: rgba(255,255,255,.04);
}
.cmd-item-body { flex: 1; min-width: 0; }
.cmd-item-title {
  font-weight: 500;
  font-size: .85rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmd-item-sub {
  font-size: .7rem;
  color: var(--text2, #7878a0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmd-item-badge {
  font-size: .65rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text3);
  padding: 2px 6px;
  background: rgba(255,255,255,.04);
  border-radius: 4px;
  white-space: nowrap;
}
.cmd-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.cmd-foot-hint {
  font-size: .65rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text3);
}
.cmd-no-results {
  padding: 32px 20px;
  text-align: center;
  color: var(--text3);
  font-size: .85rem;
}
[data-theme="light"] .cmd-palette {
  background: rgba(255,255,255,.98) !important;
  border-color: rgba(0,0,0,.08) !important;
}
[data-theme="light"] .cmd-search-input { color: #1a1a2e !important; }
[data-theme="light"] .cmd-item:hover,
[data-theme="light"] .cmd-item.active {
  background: rgba(124,58,237,.06) !important;
}

/* â”€â”€â”€ Message Reactions â”€â”€â”€ */
.msg-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.msg-reaction {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  font-size: .72rem;
  cursor: pointer;
  transition: all .18s ease;
  user-select: none;
}
.msg-reaction:hover {
  background: rgba(124,58,237,.15);
  border-color: rgba(124,58,237,.3);
  transform: scale(1.08);
}
.msg-reaction.mine {
  background: rgba(124,58,237,.2);
  border-color: rgba(124,58,237,.4);
}
.msg-reaction-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem;
  color: var(--text2);
}
.msg-react-btn {
  opacity: 0;
  position: absolute;
  top: -6px;
  background: rgba(13,13,22,.95);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 4px 6px;
  display: flex;
  gap: 2px;
  transition: opacity .15s ease, transform .15s ease;
  transform: translateY(4px);
  z-index: 10;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.msg-row:hover .msg-react-btn {
  opacity: 1;
  transform: translateY(0);
}
.msg-row.out .msg-react-btn { right: 8px; }
.msg-row.in .msg-react-btn { left: 8px; }
.msg-react-emoji {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  font-size: .9rem;
  transition: all .15s ease;
  background: transparent;
  border: none;
  padding: 0;
}
.msg-react-emoji:hover {
  background: rgba(255,255,255,.1);
  transform: scale(1.25);
}
.msg-row { position: relative; }
[data-theme="light"] .msg-react-btn {
  background: rgba(255,255,255,.98) !important;
  border-color: rgba(0,0,0,.1) !important;
}

/* â”€â”€â”€ Confetti â”€â”€â”€ */
#confettiCanvas {
  width: 100vw;
  height: 100vh;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   VISUAL POLISH PASS â€” Friends + General
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€â”€ Friends Grid: 3-zone layout â”€â”€â”€ */
#page-friends .fr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 980px) {
  #page-friends .fr-grid { grid-template-columns: 1fr; }
}

/* â”€â”€â”€ Cards: softer, more premium â”€â”€â”€ */
#page-friends .card {
  background: rgba(255,255,255,.025) !important;
  border: 1px solid rgba(255,255,255,.06) !important;
  border-radius: 20px !important;
  padding: 20px !important;
  backdrop-filter: blur(12px);
}
#page-friends .card:hover {
  border-color: rgba(124,58,237,.15) !important;
}

/* â”€â”€â”€ Add Friend: cleaner input â”€â”€â”€ */
#page-friends .fr-add {
  gap: 10px;
}
#page-friends .fr-add input {
  border-radius: 12px !important;
  padding: 12px 16px !important;
  font-size: .88rem;
  background: rgba(255,255,255,.03) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
}
#page-friends .fr-add input:focus {
  border-color: var(--brand-1, #7C3AED) !important;
  box-shadow: 0 0 0 4px rgba(124,58,237,.12) !important;
}
#page-friends .fr-add button {
  border-radius: 12px !important;
  padding: 12px 24px !important;
  font-weight: 600;
  letter-spacing: .02em;
}

/* â”€â”€â”€ Friend Rows: more spacious + polished â”€â”€â”€ */
#page-friends .fr-row {
  padding: 14px 16px !important;
  border-radius: 14px !important;
  gap: 14px !important;
  margin-bottom: 8px;
  background: rgba(255,255,255,.02) !important;
  border: 1px solid rgba(255,255,255,.04) !important;
  transition: all .22s cubic-bezier(.22,1,.36,1) !important;
}
#page-friends .fr-row:hover {
  background: rgba(124,58,237,.06) !important;
  border-color: rgba(124,58,237,.15) !important;
  transform: translateX(4px);
}
#page-friends .fr-row .fr-name {
  font-size: .92rem;
  font-weight: 600;
}
#page-friends .fr-row .fr-frx {
  font-size: .73rem;
  margin-top: 2px;
}
#page-friends .fr-row .fr-btn {
  border-radius: 10px !important;
  padding: 8px 16px !important;
  font-size: .78rem;
  font-weight: 600;
}

/* â”€â”€â”€ Level Tag: inline with name â”€â”€â”€ */
.fr-level-tag {
  display: inline-flex !important;
  align-items: center;
  padding: 2px 8px !important;
  border-radius: 6px !important;
  font-size: .62rem !important;
  font-weight: 700 !important;
  background: linear-gradient(135deg, rgba(124,58,237,.2), rgba(6,182,212,.15)) !important;
  color: var(--brand-2, #06B6D4) !important;
  vertical-align: middle;
  margin-left: 6px;
}

/* â”€â”€â”€ Last Seen: subtle â”€â”€â”€ */
.fr-last-seen {
  color: var(--text3, #40405a) !important;
  font-size: .7rem !important;
  font-family: 'JetBrains Mono', monospace;
}

/* â”€â”€â”€ Empty States: refined â”€â”€â”€ */
#page-friends .empty-state {
  padding: 24px 16px !important;
  border-radius: 12px !important;
  background: rgba(255,255,255,.015) !important;
  border: 1px dashed rgba(255,255,255,.06) !important;
  color: var(--text3) !important;
  font-size: .82rem;
}

/* â”€â”€â”€ Invite Card: full redesign â”€â”€â”€ */
.gm-invite-card {
  background: linear-gradient(135deg, rgba(124,58,237,.1), rgba(6,182,212,.08), rgba(236,72,153,.05)) !important;
  border: 1px solid rgba(124,58,237,.2) !important;
  border-radius: 20px !important;
  padding: 24px !important;
  position: relative;
  overflow: hidden;
}
.gm-invite-card::before {
  content: '';
  position: absolute;
  top: -50%; right: -30%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(124,58,237,.15), transparent 70%);
  pointer-events: none;
}
.gm-invite-inner {
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left;
  gap: 12px !important;
}
.gm-invite-ic {
  font-size: 2.2rem !important;
}
.gm-invite-title {
  font-size: 1.15rem !important;
  line-height: 1.3;
}
.gm-invite-sub {
  font-size: .82rem !important;
  line-height: 1.5 !important;
  color: var(--text2) !important;
}
.gm-invite-btn {
  width: 100% !important;
  text-align: center;
  padding: 12px 20px !important;
  border-radius: 12px !important;
  font-size: .85rem !important;
  margin-top: 4px;
}

/* â”€â”€â”€ Leaderboard: cleaner rows â”€â”€â”€ */
.gm-leaderboard {
  gap: 8px !important;
}
.gm-lb-row {
  padding: 12px 14px !important;
  border-radius: 14px !important;
  gap: 12px !important;
  background: rgba(255,255,255,.02) !important;
  border: 1px solid rgba(255,255,255,.04) !important;
}
.gm-lb-row:hover {
  background: rgba(124,58,237,.06) !important;
  border-color: rgba(124,58,237,.15) !important;
}
.gm-lb-row.is-me {
  background: rgba(124,58,237,.08) !important;
  border-color: rgba(124,58,237,.2) !important;
}
.gm-lb-av {
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
}
.gm-lb-name {
  font-size: .88rem !important;
}
.gm-lb-meta {
  font-size: .72rem !important;
}
.gm-lb-xp {
  font-size: .85rem !important;
}

/* â”€â”€â”€ Card headers: uniform â”€â”€â”€ */
#page-friends .card-hd {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
#page-friends .card-title {
  font-size: 1rem !important;
  font-weight: 700;
}
#page-friends .card-badge {
  border-radius: 8px !important;
  min-width: 26px;
  font-size: .72rem !important;
}

/* â”€â”€â”€ Notification dropdown: fix overlap â”€â”€â”€ */
.notif-dropdown.is-open,
.notif-dropdown.is-closing {
  max-height: 420px !important;
  right: 0 !important;
}

/* â”€â”€â”€ General card hover consistency â”€â”€â”€ */
.card {
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease !important;
}

/* â”€â”€â”€ Page titles: gradient text â”€â”€â”€ */
.pg-title {
  background: linear-gradient(135deg, #fff 0%, #cbb5fc 60%, #7dd6e8 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}

.fx-toast {
  animation: toastIn .35s cubic-bezier(.16,1,.3,1);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Smooth scroll feel */
html {
  scroll-behavior: smooth;
}

/* Semua element lebih halus */
* {
  transition: background-color .2s ease, color .2s ease;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   FXAI â€” AI Assistant Chat Styles
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* Provider status bar */
.fxai-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text3, #888);
  padding: 6px 12px;
  background: var(--bg2, rgba(255,255,255,.04));
  border-radius: var(--r2, 8px);
  margin-bottom: 10px;
}
.fxai-bar-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s infinite;
}

/* Suggestion chips */
.fxai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.fxai-chip {
  background: var(--bg3, rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.08);
  color: var(--text2, #ccc);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  font-family: inherit;
}
.fxai-chip:hover {
  background: var(--p1, #7c3aed);
  border-color: var(--p1, #7c3aed);
  color: #fff;
}

/* Chat messages */
.fxai-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
  animation: fadeUp .2s ease;
}
.fxai-msg--user { align-items: flex-end; }
.fxai-msg--ai   { align-items: flex-start; }

.fxai-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}
.fxai-msg--user .fxai-bubble {
  background: var(--p1, #7c3aed);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.fxai-msg--ai .fxai-bubble {
  background: var(--bg3, rgba(255,255,255,.06));
  color: var(--text, #f1f5f9);
  border-bottom-left-radius: 4px;
}

/* Provider label below AI bubble */
.fxai-meta {
  font-size: 10px;
  color: var(--text3, #666);
  padding: 0 4px;
}

/* Thinking animation */
.fxai-thinking {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  min-width: 56px;
}
.fxai-thinking span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--text3, #888);
  border-radius: 50%;
  animation: fxDotBounce .9s infinite;
}
.fxai-thinking span:nth-child(2) { animation-delay: .15s; }
.fxai-thinking span:nth-child(3) { animation-delay: .30s; }

@keyframes fxDotBounce {
  0%, 100% { transform: translateY(0);    opacity: .4; }
  50%       { transform: translateY(-6px); opacity: 1;  }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   GAMES HUB â€” ECOSYSTEM MODULES  (.fxg-*)
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.fxg-ecosystem {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.fxg-module {
  background: rgba(10,11,22,.75);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px;
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s;
  backdrop-filter: blur(12px);
}
.fxg-module:hover {
  border-color: rgba(255,255,255,.12);
}
.fxg-module.open {
  border-color: rgba(124,58,237,.22);
  box-shadow: 0 0 0 1px rgba(124,58,237,.06), 0 8px 32px rgba(0,0,0,.3);
}

/* â”€â”€ Header â”€â”€ */
.fxg-mod-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  cursor: pointer;
  user-select: none;
  transition: background .2s;
}
.fxg-mod-hd:hover { background: rgba(255,255,255,.025); }

.fxg-mod-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}
.fxg-mod-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: rgba(124,58,237,.1);
  border: 1px solid rgba(124,58,237,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  transition: background .3s, box-shadow .3s, border-color .3s;
}
.fxg-module.open .fxg-mod-icon { background: rgba(124,58,237,.18); box-shadow: 0 0 18px rgba(124,58,237,.28); }
.fxg-mod-icon.cyan { background: rgba(6,182,212,.1); border-color: rgba(6,182,212,.18); }
.fxg-module.open .fxg-mod-icon.cyan { background: rgba(6,182,212,.16); box-shadow: 0 0 18px rgba(6,182,212,.22); }

.fxg-mod-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .97rem;
  color: #e8e8f2;
  letter-spacing: -.2px;
  margin-bottom: 3px;
}
.fxg-mod-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .71rem;
  color: #5a5a7a;
}
.fxg-mod-status.live { color: #00e5a0; }
.fxg-live-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #00e5a0;
  box-shadow: 0 0 6px #00e5a0;
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
.fxg-status-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #5a5a7a;
  flex-shrink: 0;
}

.fxg-mod-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.fxg-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: .61rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 99px;
}
.fxg-tag.featured { background: rgba(245,200,66,.1); color: #f5c842; border: 1px solid rgba(245,200,66,.22); }
.fxg-tag.new-tag  { background: rgba(6,182,212,.1);  color: #06b6d4; border: 1px solid rgba(6,182,212,.22); }

.fxg-chevron {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  color: #3a3a58;
  transition: transform .4s cubic-bezier(.22,1,.36,1), color .25s;
  flex-shrink: 0;
}
.fxg-module.open .fxg-chevron { transform: rotate(180deg); color: #a855f7; }

/* â”€â”€ Collapsible body â”€â”€ */
.fxg-mod-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s cubic-bezier(.22,1,.36,1);
}
.fxg-module.open .fxg-mod-body { grid-template-rows: 1fr; }
.fxg-mod-body-inner {
  overflow: hidden;
  padding-left: 22px;
  padding-right: 22px;
  padding-top: 0;
  padding-bottom: 0;
  transition: padding-top .45s cubic-bezier(.22,1,.36,1),
              padding-bottom .45s cubic-bezier(.22,1,.36,1);
}
.fxg-module.open .fxg-mod-body-inner {
  padding-top: 4px;
  padding-bottom: 28px;
}

/* fxt-* (Typing v1) removed â€” superseded by fxt2-* engine */



/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   LEADERBOARD  (.fxlb-*)
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.fxlb-wrap {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 14px;
  overflow: hidden;
}
.fxlb-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background .18s;
}
.fxlb-row:last-child { border-bottom: none; }
.fxlb-row:hover { background: rgba(255,255,255,.03); }
.fxlb-row.me {
  background: rgba(124,58,237,.07);
  border-left: 2px solid rgba(124,58,237,.5);
}
.fxlb-rank {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem;
  font-weight: 700;
  color: #3a3a58;
  flex-shrink: 0;
}
.fxlb-rank.gold   { color: #f5c842; filter: drop-shadow(0 0 6px rgba(245,200,66,.5)); }
.fxlb-rank.silver { color: #c0c0c0; }
.fxlb-rank.bronze { color: #cd7f32; }
.fxlb-player { flex: 1; min-width: 0; }
.fxlb-name {
  font-weight: 600;
  font-size: .85rem;
  color: #d0d0e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fxlb-you {
  font-size: .6rem;
  background: rgba(124,58,237,.2);
  color: #a855f7;
  padding: 1px 5px;
  border-radius: 99px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  letter-spacing: .8px;
  vertical-align: middle;
  margin-left: 5px;
}
.fxlb-sub { font-size: .7rem; color: #3a3a58; margin-top: 1px; }
.fxlb-score {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: .87rem;
  color: #a855f7;
  white-space: nowrap;
  flex-shrink: 0;
}
.fxlb-empty, .fxlb-loading {
  padding: 22px 16px;
  text-align: center;
  color: #3a3a58;
  font-size: .8rem;
  font-family: 'DM Sans', sans-serif;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   LEADERBOARD v2 â€” enhancements
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.fxlb-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px 9px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.fxlb-hd-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: .64rem;
  font-weight: 700;
  color: #5c5c80;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.fxlb-hd-live {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .58rem;
  color: #22c55e;
  letter-spacing: .06em;
}
.fxlb-live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: fxlbPulse 2s ease-in-out infinite;
}
@keyframes fxlbPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .35; transform: scale(.65); }
}

.fxlb-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: .68rem;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  text-transform: uppercase;
  letter-spacing: .02em;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.fxlb-score-unit {
  font-size: .6rem;
  color: #5c5c80;
  font-weight: 500;
  letter-spacing: .06em;
  margin-left: 2px;
}

/* Top-3 row backgrounds */
.fxlb-row.top1 { background: rgba(245,200,66,.04); }
.fxlb-row.top2 { background: rgba(192,192,192,.025); }
.fxlb-row.top3 { background: rgba(205,127,50,.025); }
.fxlb-row.me.top1,
.fxlb-row.me.top2,
.fxlb-row.me.top3 { background: rgba(124,58,237,.07); }

/* Staggered entrance via inline style="animation-delay:Xs" */
@keyframes fxlbSlideIn {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}
.fxlb-row { animation: fxlbSlideIn .28s ease both; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   TYPING ENGINE v2  (.fxt2-*)
   Monkeytype-class: 3-line scroll Â· animated caret Â· pill ctrl
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€â”€ Outer wrap â”€â”€â”€ */
.fxt2-wrap {
  position: relative;
  padding: 6px 0 28px;
  user-select: none;
}

/* â”€â”€â”€ Controls bar â”€â”€â”€ */
.fxt2-ctrl {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  padding-bottom: 22px;
}
.fxt2-pill-grp { display: flex; align-items: center; }
.fxt2-sep {
  width: 1px; height: 16px;
  background: rgba(255,255,255,.08);
  flex-shrink: 0;
  margin: 0 4px;
}
.fxt2-pill {
  background: none;
  border: none;
  color: #35354f;
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 7px;
  cursor: pointer;
  transition: color .15s, background .15s;
  letter-spacing: .025em;
  white-space: nowrap;
  outline: none;
}
.fxt2-pill:hover { color: #9090b8; background: rgba(255,255,255,.05); }
.fxt2-pill.active { color: #c8c8e0; background: rgba(255,255,255,.08); }
.fxt2-pill.locked { opacity: .32; cursor: not-allowed; }
.fxt2-pill.locked:hover { color: #35354f; background: none; }

/* â”€â”€â”€ Caps lock warning â”€â”€â”€ */
.fxt2-capslock {
  display: none;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem;
  color: #f59e0b;
  background: rgba(245,158,11,.07);
  border: 1px solid rgba(245,158,11,.14);
  border-radius: 7px;
  padding: 5px 12px;
  margin-bottom: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* â”€â”€â”€ Live WPM â”€â”€â”€ */
.fxt2-live {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 12px;
  min-height: 26px;
  transition: opacity .35s ease;
}
.fxt2-live-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.55rem;
  font-weight: 700;
  color: #a855f7;
  line-height: 1;
}
.fxt2-live-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: .64rem;
  color: #35354f;
  letter-spacing: .1em;
  margin-bottom: 2px;
}

/* â”€â”€â”€ Words display window (exactly 3 lines) â”€â”€â”€ */
.fxt2-words {
  position: relative;
  /* 1.42rem Ã— 2.1 line-height Ã— 3 lines + padding */
  height: 152px;
  overflow: hidden;
  cursor: text;
}
/* bottom-fade mask */
.fxt2-words::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50px;
  background: linear-gradient(to top, var(--bg-1, #06060d) 15%, transparent);
  pointer-events: none;
  z-index: 3;
}

/* â”€â”€â”€ Inner scrollable words container â”€â”€â”€ */
.fxt2-inner {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.42rem;
  line-height: 2.1;
  letter-spacing: .025em;
  word-spacing: 8px;
  color: #2e2e46;
  padding: 3px 0;
  will-change: transform;
}

/* â”€â”€â”€ Word + character states â”€â”€â”€ */
.fxt2-word { display: inline; }
.fxt2-word.cur .fxt2-ch:not(.ok):not(.bad):not(.at) { color: #52527a; }
.fxt2-word-err .fxt2-ch { color: rgba(239,68,68,.5) !important; }
.fxt2-word-err .fxt2-ch.bad { color: rgba(239,68,68,.68) !important; }

.fxt2-ch { display: inline; transition: color .06s; }
.fxt2-ch.ok  { color: #c0c0dc; }
.fxt2-ch.bad { color: #ef4444; }
.fxt2-ch.at  { color: #52527a; }
.fxt2-ex.bad { color: rgba(239,68,68,.65); }

/* â”€â”€â”€ Animated caret â”€â”€â”€ */
.fxt2-caret {
  position: absolute;
  /*
   * top offset = half-leading to place caret at glyph top
   * half-leading = (font-size Ã— line-height âˆ’ font-size) / 2
   *              â‰ˆ (22.7px Ã— 2.1 âˆ’ 22.7) / 2 â‰ˆ 12.5px
   */
  top: 12px;
  left: 0;
  width: 2.5px;
  height: 18px;           /* â‰ˆ cap-height of 1.42rem */
  background: #a855f7;
  border-radius: 2px;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transition: transform .07s ease;
  box-shadow: 0 0 10px rgba(168,85,247,.7), 0 0 26px rgba(168,85,247,.22);
}
.fxt2-caret.typing {
  opacity: 1;
  animation: fxt2Blink 1.06s ease-in-out infinite;
}
@keyframes fxt2Blink {
  0%, 38% { opacity: 1; }
  58%, 100% { opacity: .1; }
}

/* â”€â”€â”€ Hint overlay â”€â”€â”€ */
.fxt2-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem;
  color: #35354f;
  letter-spacing: .07em;
  pointer-events: none;
  z-index: 2;
  transition: opacity .3s;
}

/* â”€â”€â”€ Hidden input (offscreen focus trap) â”€â”€â”€ */
.fxt2-hidden {
  position: absolute;
  top: 0; left: 0;
  opacity: 0;
  pointer-events: none;
  width: 1px; height: 1px;
  font-size: 1px;
  border: 0;
  padding: 0;
  z-index: -1;
}

/* â”€â”€â”€ Footer: timer + restart â”€â”€â”€ */
.fxt2-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 0 2px;
}
.fxt2-timer {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.35rem;
  font-weight: 700;
  color: #35354f;
  letter-spacing: -.01em;
  line-height: 1;
  min-width: 40px;
  transition: color .3s;
}
.fxt2-timer.fxt2-timer-low {
  color: #ef4444;
  text-shadow: 0 0 14px rgba(239,68,68,.45);
  animation: fxt2TimerPulse .88s ease-in-out infinite;
}
@keyframes fxt2TimerPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .42; }
}
.fxt2-restart {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: #35354f;
  font-family: 'JetBrains Mono', monospace;
  font-size: .67rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 7px;
  transition: color .18s, background .18s;
  letter-spacing: .05em;
  outline: none;
}
.fxt2-restart:hover { color: #8888b8; background: rgba(255,255,255,.06); }
.fxt2-restart svg { flex-shrink: 0; opacity: .8; }

/* â”€â”€â”€ Combo flash â”€â”€â”€ */
.fxt2-combo {
  position: absolute;
  top: 12px; right: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem;
  font-weight: 700;
  color: #f97316;
  opacity: 0;
  transform: translateY(8px) scale(.8);
  transition: opacity .18s, transform .22s cubic-bezier(.22,1,.36,1);
  pointer-events: none;
  z-index: 5;
  text-shadow: 0 0 12px rgba(249,115,22,.55);
}
.fxt2-combo.in  { opacity: 1; transform: translateY(-4px) scale(1); }
.fxt2-combo.out { opacity: 0; transform: translateY(-16px) scale(.88); transition-duration: .44s; }

/* â”€â”€â”€ Result overlay â”€â”€â”€ */
.fxt2-result {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(3,4,12,.94);
  backdrop-filter: blur(32px) saturate(140%);
  border-radius: 16px;
  z-index: 20;
  opacity: 0;
  transition: opacity .4s cubic-bezier(.22,1,.36,1);
  padding: 16px;
  overflow-y: auto;
}
.fxt2-result.show { opacity: 1; }

.fxt2-res-content {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

/* WPM + ACC headline */
.fxt2-res-top {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 28px;
  margin-bottom: 20px;
}
.fxt2-res-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: .58rem;
  color: #35354f;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.fxt2-res-val {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 4.4rem;
  line-height: 1;
  background: linear-gradient(135deg, #a855f7, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.fxt2-res-main:last-child .fxt2-res-val {
  font-size: 2.6rem;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: #9090b8;
}

/* Secondary stats */
.fxt2-res-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 12px 14px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 11px;
}
.fxt2-res-stat { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.fxt2-rs-v {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #d0d0e8;
}
.fxt2-rs-l {
  font-family: 'JetBrains Mono', monospace;
  font-size: .56rem;
  color: #35354f;
  letter-spacing: .13em;
  text-transform: uppercase;
}

/* XP */
.fxt2-res-xp {
  font-family: 'JetBrains Mono', monospace;
  font-size: .9rem;
  color: #a855f7;
  margin-bottom: 20px;
  letter-spacing: .025em;
}
.fxt2-xp-lbl { font-size: .65rem; color: #5c5c80; letter-spacing: .06em; }

/* Buttons */
.fxt2-res-acts { display: flex; gap: 10px; justify-content: center; }
.fxt2-btn-submit {
  padding: 10px 22px;
  background: linear-gradient(135deg, #7C3AED, #A855F7);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: .74rem;
  cursor: pointer;
  transition: opacity .2s, transform .18s;
  letter-spacing: .06em;
  box-shadow: 0 4px 16px rgba(124,58,237,.38);
}
.fxt2-btn-submit:hover { opacity: .86; transform: translateY(-1px); }
.fxt2-btn-submit:disabled { opacity: .38; cursor: default; transform: none; box-shadow: none; }
.fxt2-btn-retry {
  padding: 10px 22px;
  background: rgba(255,255,255,.06);
  color: #9090b8;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: .74rem;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: .06em;
}
.fxt2-btn-retry:hover { background: rgba(255,255,255,.1); color: #d0d0e8; }

/* â”€â”€â”€ Responsive â”€â”€â”€ */
@media (max-width: 640px) {
  .fxt2-inner  { font-size: 1.18rem; line-height: 2.0; word-spacing: 6px; }
  .fxt2-words  { height: 122px; }
  /* half-leading at 1.18rem/2.0: (18.88px Ã— 2.0 âˆ’ 18.88) / 2 â‰ˆ 9.4px */
  .fxt2-caret  { top: 9px; height: 15px; }
  .fxt2-res-val { font-size: 3.2rem; }
  .fxt2-res-main:last-child .fxt2-res-val { font-size: 2rem; }
  .fxt2-res-row { gap: 12px; padding: 10px 10px; }
  .fxt2-ctrl   { gap: 3px 5px; padding-bottom: 16px; }
  .fxt2-pill   { font-size: .67rem; padding: 4px 8px; }
}

/* Typing focus polish */
#fxTypingGame {
  max-width: 980px;
  margin: 0 auto;
}
.fxt2-wrap { padding: 10px 0 30px; }
.fxt2-ctrl {
  justify-content: center;
  gap: 6px 8px;
  padding-bottom: 28px;
  opacity: .9;
}
.fxt2-pill {
  color: #444862;
  padding: 6px 12px;
  border-radius: 8px;
  letter-spacing: .03em;
}
.fxt2-pill:hover {
  color: #aab4cf;
  background: rgba(255,255,255,.035);
}
.fxt2-pill.active {
  color: #d8def0;
  background: rgba(6,182,212,.08);
  box-shadow: inset 0 0 0 1px rgba(6,182,212,.08);
}
.fxt2-live {
  justify-content: center;
  margin-bottom: 8px;
}
.fxt2-live-num {
  color: #22d3ee;
  text-shadow: 0 0 22px rgba(34,211,238,.18);
}
.fxt2-live-lbl,
.fxt2-timer,
.fxt2-restart { color: #454a65; }
.fxt2-words {
  max-width: 920px;
  height: 164px;
  margin: 0 auto;
}
.fxt2-words::after {
  height: 62px;
  background: linear-gradient(to top, rgba(5,6,13,.96) 8%, rgba(5,6,13,.68) 44%, transparent);
}
.fxt2-inner {
  font-size: clamp(1.34rem, 1.34rem, 1.34rem);
  line-height: 2.28;
  letter-spacing: 0;
  word-spacing: 10px;
  color: #454b68;
  padding: 4px 2px;
  text-rendering: geometricPrecision;
}
.fxt2-word { transition: opacity .22s ease, filter .22s ease; }
.fxt2-word.cur .fxt2-ch:not(.ok):not(.bad):not(.at) { color: #7d86a8; }
.fxt2-word-err .fxt2-ch {
  color: rgba(248,113,113,.56) !important;
  text-shadow: 0 0 14px rgba(239,68,68,.12);
}
.fxt2-ch {
  transition: color .12s ease, text-shadow .12s ease, opacity .12s ease;
}
.fxt2-ch.ok { color: #d6dbea; }
.fxt2-ch.bad,
.fxt2-ex.bad {
  color: #fb7185;
  text-shadow: 0 0 12px rgba(251,113,133,.2);
}
.fxt2-ch.at { color: #8790ad; }
.fxt2-caret {
  width: 2px;
  height: 20px;
  background: #22d3ee;
  box-shadow: 0 0 12px rgba(34,211,238,.72), 0 0 32px rgba(34,211,238,.22);
  transition: transform .095s cubic-bezier(.22,1,.36,1), opacity .16s ease;
}
.fxt2-hint {
  color: #4c526b;
  letter-spacing: .08em;
}
.fxt2-foot {
  max-width: 920px;
  margin: 22px auto 0;
}
.fxt2-restart:hover {
  color: #aab4cf;
  background: rgba(255,255,255,.035);
}

/* Leaderboard prestige polish */
.fxlb-wrap {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(245,200,66,.07), transparent 26%),
    linear-gradient(180deg, rgba(10,12,25,.84), rgba(6,7,16,.58));
  border-color: rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 18px 54px rgba(0,0,0,.24);
}
.fxlb-hd {
  padding: 14px 16px 11px;
  background: linear-gradient(90deg, rgba(255,255,255,.035), transparent);
}
.fxlb-hd-title {
  color: #c8d0e5;
  letter-spacing: .18em;
}
.fxlb-row {
  min-height: 58px;
  padding: 11px 15px;
  gap: 11px;
  border-bottom-color: rgba(255,255,255,.045);
}
.fxlb-row:hover { background: rgba(255,255,255,.04); }
.fxlb-row.top1 {
  background: linear-gradient(90deg, rgba(245,200,66,.105), rgba(245,200,66,.018));
  box-shadow: inset 3px 0 0 rgba(245,200,66,.72);
}
.fxlb-row.top2 {
  background: linear-gradient(90deg, rgba(148,163,184,.075), rgba(148,163,184,.014));
  box-shadow: inset 3px 0 0 rgba(203,213,225,.42);
}
.fxlb-row.top3 {
  background: linear-gradient(90deg, rgba(217,119,6,.072), rgba(217,119,6,.012));
  box-shadow: inset 3px 0 0 rgba(217,119,6,.38);
}
.fxlb-rank {
  width: 28px;
  font-size: .92rem;
}
.fxlb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 8px 22px rgba(0,0,0,.32);
}
.fxlb-name {
  font-size: .9rem;
  color: #e3e8f4;
}
.fxlb-sub {
  color: #69708d;
  font-family: 'JetBrains Mono', monospace;
  font-size: .64rem;
  letter-spacing: .02em;
}
.fxlb-score {
  font-size: 1.05rem;
  color: #22d3ee;
  text-shadow: 0 0 18px rgba(34,211,238,.16);
}
.fxlb-score-unit {
  color: #707895;
  margin-left: 4px;
}
.fxlb-empty,
.fxlb-loading {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #737b98;
  background: radial-gradient(circle at 50% 0%, rgba(6,182,212,.08), transparent 36%);
  letter-spacing: .02em;
}

@media (max-width: 640px) {
  .fxt2-words { height: 136px; }
  .fxt2-inner {
    font-size: clamp(1.12rem, 1.12rem, 1.12rem);
    line-height: 2.12;
    word-spacing: 7px;
  }
  .fxt2-ctrl {
    justify-content: flex-start;
    padding-bottom: 20px;
  }
  .fxlb-row {
    padding: 10px 11px;
    gap: 9px;
  }
  .fxlb-avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
  .fxlb-score { font-size: .92rem; }
}

/* Games ecosystem router */
.sb-game-group {
  list-style: none;
}
.sb-game-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: inherit;
}
.sb-game-caret {
  margin-left: auto;
  color: var(--text3);
  font-size: .8rem;
  transition: transform .24s ease, color .2s ease;
}
.sb-game-toggle .sb-dot {
  right: 30px;
}

/* â”€â”€ Caret: dropdown (default) â”€â”€ */
/* closed: âŒ„ points down (0deg â€” natural) */
/* open:   âŒ„ flips to âˆ§ (180deg)         */
.sb-game-group.open .sb-game-caret {
  transform: rotate(180deg);
  color: #22d3ee;
}

/* â”€â”€ Caret: dropup mode â”€â”€ */
/* closed: âŒ„ pre-flipped to âˆ§ (signals "opens upward") */
.sb-game-group.dropup .sb-game-caret {
  transform: rotate(180deg);
}
/* open: returns to âŒ„ (submenu is above, caret points down toward it) */
.sb-game-group.dropup.open .sb-game-caret {
  transform: rotate(0deg);
  color: #22d3ee;
}

/* â”€â”€ Submenu: inline dropdown (default â€” expands downward) â”€â”€ */
.sb-game-sub {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin: 0 0 0 28px;
  transition: max-height .3s cubic-bezier(.22,1,.36,1),
              opacity .22s ease,
              margin-top .3s cubic-bezier(.22,1,.36,1);
}
.sb-game-group.open .sb-game-sub {
  max-height: 200px;
  opacity: 1;
  margin-top: 4px;
}

/* â”€â”€ Submenu: floating dropup (position:fixed escapes all overflow clipping) â”€â”€
   JS sets: left, width, bottom (bottom-anchored so max-height expands UPWARD).
   Transition still uses max-height â€” with bottom anchoring, growth is visual-up. */
.sb-game-sub.fx-floating {
  position: fixed;
  z-index: 400;
  margin: 0;
  padding: 4px 0;
  background: var(--bg2, #0a0a14);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  box-shadow: 0 -6px 28px rgba(0,0,0,.55),
              0 -1px 4px rgba(0,0,0,.3),
              inset 0 0 0 1px rgba(255,255,255,.03);
  /* left / width / bottom set by JS per toggle position */
}
/* floating open: margin-top from the open rule must not offset the fixed position */
.sb-game-group.open .sb-game-sub.fx-floating {
  margin-top: 0;
}

.sb-game-link {
  display: block;
  width: 100%;
  min-height: 28px;
  padding: 6px 9px;
  border: 0;
  border-left: 1px solid rgba(255,255,255,.07);
  background: transparent;
  color: #6f748f;
  font-family: 'DM Sans', sans-serif;
  font-size: .74rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.sb-game-link:hover,
.sb-game-link.active {
  color: #d8def0;
  background: rgba(6,182,212,.055);
  border-left-color: rgba(34,211,238,.42);
}
.sb-game-link.muted {
  color: #555a73;
}
.sidebar.col .sb-game-sub,
.sidebar.col .sb-game-caret {
  display: none;
}

.fxg-shell {
  /* Floating in-page game launcher removed — sidebar is the single nav source.
     Stage now spans the full freed width. */
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  min-height: calc(100vh - 118px);
}
/* Top action row inside a game view: Back to Hub + Leave */
.fxg-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.fxg-top-actions .fxg-back { margin-bottom: 0; }
.fxg-leave {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: .8rem;
  font-weight: 600;
  color: #ff9db0;
  background: rgba(255,77,106,.08);
  border: 1px solid rgba(255,77,106,.28);
  border-radius: 9px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.fxg-leave:hover {
  color: #fff;
  background: rgba(255,77,106,.22);
  border-color: rgba(255,77,106,.5);
  transform: translateY(-1px);
}
.fxg-leave:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,77,106,.18);
}
.fxg-launcher {
  position: sticky;
  top: 78px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(10,12,25,.78), rgba(6,7,16,.52));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 20px 60px rgba(0,0,0,.22);
}
.fxg-launcher::-webkit-scrollbar {
  display: none;
}
.fxg-launcher-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #c8d0e5;
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  outline: none;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, color .18s ease, box-shadow .18s ease;
}
.fxg-launcher-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 99px;
  background: #22d3ee;
  opacity: 0;
  transform: scaleY(.35);
  transition: opacity .18s ease, transform .22s cubic-bezier(.22,1,.36,1);
}
.fxg-launcher-item:hover {
  transform: translateX(2px);
  border-color: rgba(255,255,255,.08);
  background: rgba(255,255,255,.035);
}
.fxg-launcher-item:focus-visible {
  border-color: rgba(34,211,238,.32);
  box-shadow: 0 0 0 3px rgba(34,211,238,.08);
}
.fxg-launcher-item.active {
  color: #fff;
  border-color: rgba(34,211,238,.2);
  background: linear-gradient(90deg, rgba(6,182,212,.14), rgba(124,58,237,.08));
  box-shadow: 0 0 24px rgba(6,182,212,.08);
}
.fxg-launcher-item.active::before {
  opacity: 1;
  transform: scaleY(1);
}
.fxg-launcher-kicker {
  color: #69708d;
  font-family: 'JetBrains Mono', monospace;
  font-size: .58rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: color .18s ease;
}
.fxg-launcher-title {
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .18s ease, opacity .18s ease;
}
.fxg-launcher-item.active .fxg-launcher-kicker {
  color: #22d3ee;
}
.fxg-stage {
  position: relative;
  min-width: 0;
}
.fxg-view {
  display: none;
  animation: fxgViewIn .26s cubic-bezier(.22,1,.36,1);
}
.fxg-view.active {
  display: block;
}
@keyframes fxgViewIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fxg-hero,
.fxg-view-head,
.fxg-coming {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 18px;
  background:
    radial-gradient(circle at 80% 0%, rgba(6,182,212,.14), transparent 32%),
    linear-gradient(180deg, rgba(11,13,28,.84), rgba(6,7,16,.48));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 24px 70px rgba(0,0,0,.24);
}
.fxg-hero,
.fxg-view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  margin-bottom: 16px;
}
.fxg-coming {
  min-height: 430px;
  padding: 44px;
}
.fxg-eyebrow {
  color: #22d3ee;
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.fxg-title {
  margin: 0;
  color: #f4f7fb;
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.2rem, 5vw, 4.7rem);
  font-weight: 800;
  line-height: .92;
  letter-spacing: 0;
}
.fxg-sub {
  max-width: 640px;
  margin: 14px 0 0;
  color: #8e96b2;
  font-size: .98rem;
  line-height: 1.7;
}
.fxg-primary,
.fxg-secondary,
.fxg-back {
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 10px;
  background: rgba(255,255,255,.055);
  color: #d8def0;
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.fxg-primary,
.fxg-secondary {
  padding: 12px 16px;
}
.fxg-primary {
  color: #061019;
  border-color: rgba(34,211,238,.34);
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
}
.fxg-back {
  margin-bottom: 14px;
  padding: 9px 12px;
  color: #7f89a6;
}
.fxg-primary:hover,
.fxg-secondary:hover,
.fxg-back:hover {
  transform: translateY(-1px);
  border-color: rgba(34,211,238,.28);
  background: rgba(34,211,238,.09);
}
.fxg-game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.fxg-game-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 16px;
  background:
    radial-gradient(circle at 20% 0%, rgba(124,58,237,.13), transparent 34%),
    linear-gradient(180deg, rgba(12,14,29,.82), rgba(7,8,18,.62));
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 18px 54px rgba(0,0,0,.18);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.fxg-game-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34,211,238,.22);
  box-shadow: 0 24px 70px rgba(0,0,0,.28), 0 0 34px rgba(6,182,212,.07);
}
.fxg-game-card.featured {
  background:
    radial-gradient(circle at 20% 0%, rgba(245,200,66,.16), transparent 36%),
    linear-gradient(180deg, rgba(18,16,26,.86), rgba(8,8,17,.62));
}
.fxg-game-card.locked {
  cursor: default;
  opacity: .76;
}
.fxg-card-status {
  color: #22d3ee;
  font-family: 'JetBrains Mono', monospace;
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.fxg-card-status.live {
  color: #f5c842;
}
.fxg-card-title {
  color: #f4f7fb;
  font-family: 'Syne', sans-serif;
  font-size: 1.32rem;
  font-weight: 800;
}
.fxg-card-desc {
  color: #8d96b0;
  font-size: .86rem;
  line-height: 1.55;
}
.fxlb-center {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  gap: 14px;
}
.fxlb-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fxlb-tab {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  color: #8e96b2;
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.fxlb-tab:hover,
.fxlb-tab.active {
  color: #fff;
  border-color: rgba(34,211,238,.2);
  background: rgba(34,211,238,.08);
}
.fxlb-search {
  width: min(260px, 100%);
  padding: 11px 13px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(0,0,0,.2);
  color: #d8def0;
  outline: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem;
}
.fxlb-search:focus {
  border-color: rgba(34,211,238,.3);
  box-shadow: 0 0 0 3px rgba(34,211,238,.08);
}
.fxlb-unified {
  min-height: 360px;
}

@media (max-width: 980px) {
  .fxg-shell,
  .fxlb-center {
    grid-template-columns: 1fr;
  }
  .fxg-launcher {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fxg-game-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .fxg-hero,
  .fxg-view-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px;
  }
  .fxg-launcher {
    grid-template-columns: 1fr;
  }
  .fxg-title {
    font-size: 2.35rem;
  }
}

/* Typing view spatial balance */
.fxg-shell[data-active-game="typing"] {
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(14px, 2vw, 28px);
}
.fxg-shell[data-active-game="typing"] .fxg-launcher {
  padding: 8px;
  gap: 6px;
  border-radius: 14px;
  background: rgba(8,10,21,.38);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.fxg-shell[data-active-game="typing"] .fxg-launcher-item {
  min-height: 48px;
  padding: 8px 10px 8px 12px;
  justify-content: center;
  gap: 2px;
  font-size: .74rem;
}
.fxg-shell[data-active-game="typing"] .fxg-launcher-kicker {
  font-size: .58rem;
}
.fxg-shell[data-active-game="typing"] .fxg-launcher-title {
  font-size: .72rem;
  opacity: .78;
}
.fxg-shell[data-active-game="typing"] .fxg-launcher-item.active .fxg-launcher-title,
.fxg-shell[data-active-game="typing"] .fxg-launcher-item:hover .fxg-launcher-title {
  opacity: 1;
}
#fxgViewTyping {
  min-height: calc(100vh - 130px);
}
#fxgViewTyping .fxg-back {
  margin-left: clamp(8px, 1.8vw, 28px);
}
#fxgViewTyping .fxg-view-head {
  max-width: min(1180px, 100%);
  margin: 0 auto clamp(24px, 4vh, 46px);
  padding: 18px clamp(18px, 3vw, 36px);
  background: linear-gradient(180deg, rgba(11,13,28,.46), rgba(6,7,16,.2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
#fxgViewTyping .fxg-title {
  font-size: clamp(2.1rem, 4.2vw, 4.2rem);
}
#fxgViewTyping #fxTypingGame {
  width: min(100%, 1280px);
  max-width: none;
  margin: 0 auto;
  padding: clamp(10px, 2.4vw, 28px) clamp(12px, 4vw, 58px) clamp(26px, 5vh, 56px);
}
#fxgViewTyping .fxt2-wrap {
  padding-top: clamp(8px, 1.8vh, 24px);
}
#fxgViewTyping .fxt2-ctrl,
#fxgViewTyping .fxt2-foot,
#fxgViewTyping .fxt2-live,
#fxgViewTyping .fxt2-words {
  width: min(100%, 1180px);
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}
#fxgViewTyping .fxt2-ctrl {
  justify-content: center;
  padding-bottom: clamp(30px, 6vh, 62px);
}
#fxgViewTyping .fxt2-live {
  margin-bottom: clamp(8px, 2vh, 22px);
}
#fxgViewTyping .fxt2-words {
  height: clamp(168px, 23vh, 230px);
}
#fxgViewTyping .fxt2-inner {
  font-size: clamp(1.34rem, 1.55vw, 1.72rem);
  line-height: 2.22;
  word-spacing: clamp(9px, 1.1vw, 16px);
}
#fxgViewTyping .fxt2-foot {
  margin-top: clamp(24px, 4vh, 42px);
}

@media (min-width: 1500px) {
  .fxg-shell[data-active-game="typing"] {
    grid-template-columns: minmax(0, 1fr);
  }
  #fxgViewTyping #fxTypingGame,
  #fxgViewTyping .fxt2-ctrl,
  #fxgViewTyping .fxt2-foot,
  #fxgViewTyping .fxt2-live,
  #fxgViewTyping .fxt2-words {
    width: min(100%, 1360px);
  }
}

@media (max-width: 980px) {
  .fxg-shell[data-active-game="typing"] {
    grid-template-columns: 1fr;
  }
  .fxg-shell[data-active-game="typing"] .fxg-launcher {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .fxg-shell[data-active-game="typing"] .fxg-launcher-item {
    font-size: .82rem;
  }
  #fxgViewTyping #fxTypingGame {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 640px) {
  .fxg-shell[data-active-game="typing"] .fxg-launcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #fxgViewTyping .fxg-view-head {
    margin-bottom: 18px;
  }
  #fxgViewTyping .fxt2-ctrl {
    justify-content: flex-start;
    padding-bottom: 22px;
  }
  #fxgViewTyping .fxt2-words {
    height: 142px;
  }
  #fxgViewTyping .fxt2-inner {
    font-size: 1.13rem;
    line-height: 2.12;
    word-spacing: 7px;
  }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   MONOPOLY SPECTATOR â€” fx-monopoly.js mount target
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* Mount root â€” sits below the hero card */
.fxms-root {
  margin-top: 28px;
}

/* â”€â”€ Section header â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fxms-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.fxms-hd-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .18em;
  color: #6b7496;
}
.fxms-hd-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid rgba(0,229,160,.22);
  border-radius: 99px;
  background: rgba(0,229,160,.07);
  font-family: 'JetBrains Mono', monospace;
  font-size: .66rem;
  font-weight: 700;
  color: #00e5a0;
  letter-spacing: .06em;
}
.fxms-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00e5a0;
  box-shadow: 0 0 6px #00e5a0;
  animation: fxmsPulse 1.8s ease infinite;
  flex-shrink: 0;
}
@keyframes fxmsPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .55; transform: scale(.8); }
}

/* â”€â”€ Game card grid â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fxms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}

/* â”€â”€ Individual game card â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fxms-card {
  border: 1px solid rgba(245,200,66,.12);
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(245,200,66,.07), transparent 55%),
    linear-gradient(160deg, #0c0b12, #09080f);
  box-shadow: 0 12px 42px rgba(0,0,0,.45),
              inset 0 1px 0 rgba(255,255,255,.04);
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease;
}
.fxms-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245,200,66,.24);
}

.fxms-card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
}
.fxms-phase-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .16em;
  padding: 3px 9px;
  border-radius: 6px;
}
.fxms-playing {
  background: rgba(0,229,160,.12);
  color: #00e5a0;
  border: 1px solid rgba(0,229,160,.25);
}
.fxms-lobby {
  background: rgba(245,200,66,.1);
  color: #f5c842;
  border: 1px solid rgba(245,200,66,.22);
}
.fxms-ended {
  background: rgba(255,255,255,.05);
  color: #6b7496;
  border: 1px solid rgba(255,255,255,.08);
}
.fxms-game-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem;
  font-weight: 600;
  color: #4a5168;
  letter-spacing: .08em;
}

/* â”€â”€ Mini board strip (40 squares) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fxms-board {
  display: flex;
  gap: 2px;
  padding: 10px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.fxms-board::-webkit-scrollbar { display: none; }
.fxms-sq {
  flex-shrink: 0;
  position: relative;
  width: 15px;
  height: 22px;
  border-radius: 3px;
  background: var(--c, rgba(255,255,255,.06));
  opacity: .75;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 1px;
  transition: opacity .15s ease;
}
.fxms-sq:has(.fxms-btok) {
  opacity: 1;
}
.fxms-btok {
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  font-size: .42rem;
  font-weight: 800;
  font-family: 'Syne', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 1.5px solid rgba(0,0,0,.45);
  box-shadow: 0 2px 5px rgba(0,0,0,.5);
  z-index: 1;
  line-height: 1;
}

/* â”€â”€ Turn banner â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fxms-turn-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(245,200,66,.06);
  border-top: 1px solid rgba(245,200,66,.08);
  border-bottom: 1px solid rgba(245,200,66,.08);
}
.fxms-turn-arrow {
  font-size: .72rem;
  color: #f5c842;
}
.fxms-turn-name {
  font-family: 'DM Sans', sans-serif;
  font-size: .84rem;
  font-weight: 600;
  color: #e8c84a;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fxms-turn-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem;
  color: #4a5168;
  flex-shrink: 0;
}

/* â”€â”€ Player rows â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fxms-players {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 6px 0;
}
.fxms-player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  transition: background .15s ease;
}
.fxms-player-row.is-active {
  background: rgba(245,200,66,.05);
}
.fxms-player-row.is-bankrupt {
  opacity: .42;
}
.fxms-tok {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: .72rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.fxms-p-body {
  flex: 1;
  min-width: 0;
}
.fxms-p-name {
  font-family: 'DM Sans', sans-serif;
  font-size: .84rem;
  font-weight: 600;
  color: #c8d0e8;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fxms-p-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: .64rem;
  color: #4e566e;
  margin-top: 1px;
}
.fxms-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: .55rem;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.fxms-tag.bankrupt {
  background: rgba(239,68,68,.12);
  color: #f87171;
  border: 1px solid rgba(239,68,68,.2);
}
.fxms-tag.jail {
  background: rgba(245,200,66,.1);
  color: #f5c842;
  border: 1px solid rgba(245,200,66,.2);
}
.fxms-active-pip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f5c842;
  box-shadow: 0 0 7px rgba(245,200,66,.7);
  flex-shrink: 0;
  animation: fxmsPulse 1.4s ease infinite;
}

/* â”€â”€ Card footer â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fxms-card-ft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(255,255,255,.05);
  margin-top: 4px;
}
.fxms-tg-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: .67rem;
  font-weight: 700;
  color: rgba(245,200,66,.65);
  text-decoration: none;
  letter-spacing: .04em;
  transition: color .18s ease;
}
.fxms-tg-btn:hover { color: #f5c842; }
.fxms-player-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem;
  color: #3d4358;
}

/* â”€â”€ Loading / empty state â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fxms-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 48px 24px;
  text-align: center;
}
.fxms-empty-icon {
  font-size: 2.4rem;
  opacity: .6;
}
.fxms-empty-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #c8d0e8;
}
.fxms-state-txt {
  font-size: .86rem;
  color: #4e566e;
  max-width: 340px;
  line-height: 1.6;
}
.fxms-shimmer-bar {
  width: min(320px, 80%);
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.1) 50%, rgba(255,255,255,.04) 100%);
  background-size: 200%;
  animation: fxmsShimmer 1.6s ease infinite;
}
.fxms-shimmer-bar.short { width: min(180px, 55%); }
@keyframes fxmsShimmer {
  0%   { background-position: 100%; }
  100% { background-position: -100%; }
}
.fxms-start-link {
  display: inline-block;
  margin-top: 6px;
  padding: 10px 20px;
  border: 1px solid rgba(245,200,66,.25);
  border-radius: 10px;
  background: rgba(245,200,66,.07);
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  font-weight: 700;
  color: #f5c842;
  text-decoration: none;
  letter-spacing: .05em;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.fxms-start-link:hover {
  background: rgba(245,200,66,.13);
  border-color: rgba(245,200,66,.4);
  transform: translateY(-2px);
}

/* â”€â”€ Responsive â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 640px) {
  .fxms-grid {
    grid-template-columns: 1fr;
  }
  .fxms-sq {
    width: 11px;
    height: 18px;
  }
}


/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   WEB MONOPOLY PLAYABLE UI  (.fxmu-*)
   Phase 4 â€” Cinematic Â· Immersive Â· Premium Multiplayer
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ Root & game-active state â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fxmu-root {
  margin-top: 20px;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}
.fxmu-game-active .mono-hero-card { display: none !important; }
.fxmu-game-active .fxmu-root { margin-top: 8px; }

/* â”€â”€ Buttons â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fxmu-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.06); color: #c8d0e8;
  font-size: .84rem; font-weight: 500; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
  white-space: nowrap; letter-spacing: .015em;
}
.fxmu-btn:hover:not(:disabled) { background: rgba(255,255,255,.12); transform: translateY(-1px); }
.fxmu-btn:active:not(:disabled) { transform: translateY(0); }
.fxmu-btn:disabled { opacity: .35; cursor: not-allowed; }
.fxmu-btn-primary { background: rgba(124,58,237,.25); border-color: rgba(124,58,237,.5); color: #c4b5fd; }
.fxmu-btn-primary:hover:not(:disabled) { background: rgba(124,58,237,.38); }
.fxmu-btn-gold { background: rgba(245,200,66,.12); border-color: rgba(245,200,66,.35); color: #f5c842; }
.fxmu-btn-gold:hover:not(:disabled) { background: rgba(245,200,66,.2); }
.fxmu-btn-green { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.3); color: #4ade80; }
.fxmu-btn-ghost { background: transparent; border-color: rgba(255,255,255,.1); color: #4e566e; }
.fxmu-btn-ghost:hover:not(:disabled) { color: #c8d0e8; border-color: rgba(255,255,255,.2); }
.fxmu-btn-lg  { padding: 12px 28px; font-size: .94rem; border-radius: 12px; }
.fxmu-btn-sm  { padding: 6px 12px;  font-size: .76rem; }
.fxmu-btn-xs  { padding: 4px 10px;  font-size: .72rem; border-radius: 8px; }
.fxmu-btn-roll { min-width: 180px; font-size: .96rem; letter-spacing: .02em; }

/* â”€â”€ Shared status / loading â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fxmu-loading {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 48px; color: #4e566e; font-size: .9rem;
}
.fxmu-spin {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(124,58,237,.2); border-top-color: #7c3aed;
  animation: fxmuSpin .7s linear infinite;
}
@keyframes fxmuSpin { to { transform: rotate(360deg); } }
.fxmu-err {
  margin: 10px 0; padding: 10px 14px; border-radius: 10px;
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.25);
  color: #fca5a5; font-size: .84rem;
}
.fxmu-notice {
  margin: 20px 0; padding: 18px; border-radius: 12px; text-align: center;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  color: #4e566e; font-size: .88rem;
}
.fxmu-gold { color: #f5c842; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   LOBBY
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.fxmu-lobby { max-width: 540px; margin: 0 auto; padding: 20px 0 40px; }
.fxmu-lobby-head { text-align: center; margin-bottom: 32px; }
.fxmu-lobby-eyebrow {
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: #4e566e; margin-bottom: 8px;
}
.fxmu-lobby-title {
  font-size: 2rem; font-weight: 700; color: #e8eaf6; margin: 0 0 8px;
  letter-spacing: -.02em;
}
.fxmu-lobby-sub { font-size: .88rem; color: #4e566e; margin: 0; }
.fxmu-lobby-actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.fxmu-join-row { display: flex; gap: 10px; }
.fxmu-code-input {
  flex: 1; padding: 11px 16px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; color: #f5c842;
  font-family: 'JetBrains Mono', monospace; font-size: 1rem;
  font-weight: 600; letter-spacing: .18em; text-transform: uppercase; outline: none;
  transition: border-color .2s;
}
.fxmu-code-input:focus { border-color: rgba(245,200,66,.4); }
.fxmu-code-input::placeholder { letter-spacing: .06em; color: #2d3248; font-size: .78rem; }
.fxmu-rooms-panel {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px; overflow: hidden;
}
.fxmu-rooms-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: .74rem; font-weight: 600; color: #4e566e;
  text-transform: uppercase; letter-spacing: .12em;
}
.fxmu-refresh {
  background: none; border: none; cursor: pointer;
  font-size: 1.1rem; color: #3d4358; padding: 2px 4px;
  transition: color .2s;
}
.fxmu-refresh:hover { color: #a78bfa; }
.fxmu-room-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background .15s;
}
.fxmu-room-row:last-child { border-bottom: none; }
.fxmu-room-row:hover { background: rgba(255,255,255,.02); }
.fxmu-room-info { display: flex; align-items: center; gap: 12px; }
.fxmu-room-code {
  font-family: 'JetBrains Mono', monospace; font-size: .84rem;
  font-weight: 600; color: #a78bfa; letter-spacing: .1em;
}
.fxmu-room-host { font-size: .78rem; color: #3d4358; }
.fxmu-room-meta { display: flex; align-items: center; gap: 10px; }
.fxmu-room-count { font-size: .78rem; color: #4e566e; }
.fxmu-empty-rooms { padding: 28px; text-align: center; font-size: .84rem; color: #2d3248; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   WAITING ROOM
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.fxmu-waiting { max-width: 440px; margin: 0 auto; padding: 24px 0 40px; }
.fxmu-wr-head { text-align: center; margin-bottom: 28px; }
.fxmu-wr-label {
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: #4e566e; margin-bottom: 10px;
}
.fxmu-wr-code { display: flex; align-items: center; justify-content: center; gap: 12px; }
.fxmu-code-display {
  font-family: 'JetBrains Mono', monospace; font-size: 2.4rem;
  font-weight: 700; color: #f5c842; letter-spacing: .2em;
}
.fxmu-copy-btn {
  background: rgba(245,200,66,.08); border: 1px solid rgba(245,200,66,.2);
  border-radius: 8px; padding: 6px 10px; cursor: pointer;
  color: #f5c842; font-size: .9rem; transition: background .15s;
}
.fxmu-copy-btn:hover { background: rgba(245,200,66,.18); }
.fxmu-wr-share { font-size: .8rem; color: #3d4358; margin-top: 10px; }
.fxmu-wr-players {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px; overflow: hidden; margin-bottom: 20px;
}
.fxmu-wr-players-hd {
  padding: 11px 16px; border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: .74rem; font-weight: 600; color: #4e566e;
  text-transform: uppercase; letter-spacing: .1em;
}
.fxmu-wr-player {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.04);
}
.fxmu-wr-player:last-child { border-bottom: none; }
.fxmu-wr-player.fxmu-wr-empty { opacity: .3; }
.fxmu-wr-tok {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .76rem; font-weight: 700; color: #fff; flex-shrink: 0;
  overflow: hidden; position: relative;
}
.fxmu-empty-tok { background: rgba(255,255,255,.06) !important; color: #3d4358; }
.fxmu-wr-name { font-size: .88rem; color: #c8d0e8; display: flex; align-items: center; gap: 8px; }
.fxmu-badge-host, .fxmu-badge-me {
  display: inline-block; padding: 2px 7px; border-radius: 5px;
  font-size: .64rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; vertical-align: middle;
}
.fxmu-badge-host { background: rgba(245,200,66,.12); color: #f5c842; }
.fxmu-badge-me   { background: rgba(124,58,237,.15);  color: #a78bfa; }
.fxmu-wr-foot { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.fxmu-wr-hint { font-size: .84rem; color: #4e566e; padding: 10px 0; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   PLAYING â€” CINEMATIC TWO-COLUMN LAYOUT
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.fxmu-match { display: flex; flex-direction: column; }

/* â”€â”€ Turn banner â”€â”€ */
.fxmu-turn-banner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px; margin-bottom: 14px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px; transition: background .3s, border-color .3s;
}
.fxmu-turn-banner.fxmu-my-turn {
  background: rgba(124,58,237,.15); border-color: rgba(124,58,237,.48);
  box-shadow: 0 0 28px rgba(124,58,237,.09);
  animation: fxmuBannerGlow 2.2s ease-in-out infinite;
}
@keyframes fxmuBannerGlow {
  0%,100% { box-shadow: 0 0 0 0 rgba(124,58,237,0); }
  50%      { box-shadow: 0 0 20px 3px rgba(124,58,237,.16); }
}
.fxmu-banner-left { display: flex; align-items: center; gap: 10px; }
.fxmu-banner-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 0 6px rgba(0,0,0,.5);
}
.fxmu-turn-you  { font-weight: 700; font-size: .92rem; color: #c4b5fd; letter-spacing: .01em; }
.fxmu-turn-other { font-size: .88rem; color: #4e566e; }
.fxmu-pending-badge {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  background: rgba(245,200,66,.12); color: #f5c842;
  font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
}
.fxmu-banner-right { display: flex; align-items: center; gap: 10px; }
.fxmu-inflation-badge {
  display: inline-block; padding: 3px 10px; border-radius: 8px;
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.2);
  color: #fca5a5; font-size: .72rem; font-weight: 600;
}
.fxmu-turn-num {
  font-size: .78rem; color: #3d4358;
  font-family: 'JetBrains Mono', monospace;
}
.fxmu-timer {
  display: flex; align-items: center;
  font-family: 'JetBrains Mono', monospace; font-size: .78rem;
  color: #4e566e; opacity: .55; transition: color .3s, opacity .3s;
}
.fxmu-timer.fxmu-timer-warn    { color: #f59e0b; opacity: 1; }
.fxmu-timer.fxmu-timer-urgent  { color: #ef4444; opacity: 1; animation: fxmuTimerPulse .8s infinite; }
@keyframes fxmuTimerPulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* â”€â”€ Game body grid â€” column widths set inline from JS â”€â”€ */
.fxmu-game-body {
  display: grid;
  gap: 20px;
  align-items: start;
  /* center board+sidebar as a unit — prevents dead side space on wide viewports */
  width: fit-content;
  margin: 0 auto;
}

/* â”€â”€ Board column â”€â”€ */
.fxmu-board-col { display: flex; flex-direction: column; gap: 10px; }
.fxmu-board-wrap {
  position: relative; border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.85), 0 4px 24px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.09);
  flex-shrink: 0;
}
.fxmu-board-img { display: block; }
.fxmu-board-tok {
  position: absolute; width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .54rem; font-weight: 800; color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.55);
  border: 1.5px solid rgba(255,255,255,.4);
  transition: left .12s linear, top .12s linear;
  will-change: left, top;
  pointer-events: none;
  z-index: 2;
}
.fxmu-board-tok.fxmu-tok-dead { opacity: .2; filter: grayscale(1); }

/* Phase 5A — Active token glow */
.fxmu-board-tok.fxmu-tok-active {
  z-index: 6;
  animation: fxmuTokPulse 1.8s ease-in-out infinite;
}
@keyframes fxmuTokPulse {
  0%,100% { box-shadow: 0 0 0 2px var(--tok-col,#7C3AED), 0 0 8px var(--tok-col,#7C3AED); }
  50%     { box-shadow: 0 0 0 4px var(--tok-col,#7C3AED), 0 0 20px var(--tok-col,#7C3AED), 0 2px 8px rgba(0,0,0,.6); }
}

/* Phase 5A — Landing bounce */
.fxmu-board-tok.fxmu-tok-bounce {
  animation: fxmuTokBounce 0.38s cubic-bezier(.36,.07,.19,.97) forwards;
}
@keyframes fxmuTokBounce {
  0%   { transform: scale(1)    translateY(0);   }
  30%  { transform: scale(1.35) translateY(-6px);}
  60%  { transform: scale(0.88) translateY(2px); }
  80%  { transform: scale(1.08) translateY(-2px);}
  100% { transform: scale(1)    translateY(0);   }
}

/* Phase 5A — Moving tokens use quicker step transition */
.fxmu-board-tok.fxmu-tok-moving {
  transition: left .09s linear, top .09s linear;
}

/* ── Phase 5A — Dice Overlay ── */
.fxmu-dice-overlay {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  pointer-events: none;
  z-index: 30;
  opacity: 0;
  transition: opacity .28s ease, transform .28s cubic-bezier(.22,1,.36,1);
}
.fxmu-dice-overlay.fxmu-dice-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.fxmu-dice-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.fxmu-dice-who {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  text-shadow: 0 1px 4px rgba(0,0,0,.9);
}
.fxmu-dice-total {
  font-size: .72rem;
  font-weight: 800;
  color: #f5c842;
  letter-spacing: .03em;
  text-shadow: 0 1px 4px rgba(0,0,0,.9);
}
.fxmu-dice-pair {
  display: flex;
  gap: 9px;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.7));
}

/* Single die face */
.fxmu-die {
  width: 36px; height: 36px;
  background: linear-gradient(150deg, #fff 0%, #dde3ee 100%);
  border-radius: 7px;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  grid-template-rows: repeat(3,1fr);
  padding: 5px;
  gap: 2px;
  box-shadow:
    0 2px 0 #9ca3b0,
    0 5px 14px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.95);
  position: relative;
  overflow: hidden;
}
.fxmu-die::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 7px;
  background: linear-gradient(130deg, rgba(255,255,255,.55) 0%, transparent 55%);
  pointer-events: none;
}
.fxmu-pip {
  border-radius: 50%;
  background: transparent;
}
.fxmu-pip.fxmu-pip-on {
  background: #1c1e3a;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.35);
}

/* Dice roll animation */
.fxmu-dice-pair.fxmu-dice-rolling .fxmu-die {
  animation: fxmuDiceRoll .56s cubic-bezier(.36,.07,.19,.97) both;
}
.fxmu-dice-pair.fxmu-dice-rolling .fxmu-die:nth-child(2) {
  animation-delay: .06s;
}
@keyframes fxmuDiceRoll {
  0%   { transform: rotate(0deg)   scale(.65); opacity: 0; }
  18%  { transform: rotate(-28deg) scale(1.2); opacity: 1; }
  38%  { transform: rotate(18deg)  scale(.93);             }
  58%  { transform: rotate(-9deg)  scale(1.06);            }
  78%  { transform: rotate(4deg)   scale(.97);             }
  100% { transform: rotate(0deg)   scale(1);               }
}

@media (prefers-reduced-motion: reduce) {
  .fxmu-board-tok       { transition: none; }
  .fxmu-board-tok.fxmu-tok-active { animation: none; box-shadow: 0 0 0 3px var(--tok-col,#7C3AED); }
  .fxmu-board-tok.fxmu-tok-bounce { animation: none; }
  .fxmu-dice-pair.fxmu-dice-rolling .fxmu-die { animation: none; }
}

/* â”€â”€ Properties panel (compact, below board) â”€â”€ */
.fxmu-props-panel {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px; overflow: hidden;
}
.fxmu-props-hd {
  padding: 9px 14px; border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: .7rem; font-weight: 600; color: #4e566e;
  text-transform: uppercase; letter-spacing: .1em;
}
.fxmu-prop-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 14px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.fxmu-prop-row:last-child { border-bottom: none; }
.fxmu-prop-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.fxmu-prop-name {
  flex: 1; font-size: .78rem; color: #9ca3af;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fxmu-prop-bldg { font-size: .7rem; color: #f59e0b; letter-spacing: -.02em; }
.fxmu-prop-sell {
  padding: 3px 8px; font-size: .68rem; color: #f87171;
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.15);
  border-radius: 6px; cursor: pointer; transition: background .15s;
}
.fxmu-prop-sell:hover { background: rgba(239,68,68,.2); }
.fxmu-props-empty { padding: 12px 14px; font-size: .76rem; color: #2d3248; }

/* â”€â”€ Sidebar â”€â”€ */
.fxmu-sidebar { display: flex; flex-direction: column; gap: 10px; }

/* â”€â”€ Player cards (vertical sidebar) â”€â”€ */
.fxmu-players-sidebar { display: flex; flex-direction: column; gap: 6px; }
.fxmu-pcard {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 13px; border-radius: 10px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
  transition: border-color .25s, background .25s;
}
.fxmu-pcard-active  { background: rgba(124,58,237,.15); border-color: rgba(124,58,237,.52); box-shadow: inset 0 0 0 1px rgba(124,58,237,.1); }
.fxmu-pcard-me      { border-color: rgba(245,200,66,.18); }
.fxmu-pcard-active.fxmu-pcard-me { border-color: rgba(124,58,237,.5); }
.fxmu-pcard-bankrupt { opacity: .28; filter: grayscale(.9); }
.fxmu-pcard-tok {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 700; color: #fff; flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  overflow: hidden; position: relative;
}
.fxmu-pcard-body { flex: 1; min-width: 0; }
.fxmu-pcard-row1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fxmu-pcard-name {
  font-size: .8rem; color: #c8d0e8;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fxmu-pcard-name em { font-style: normal; font-size: .64rem; color: #7c3aed; margin-left: 4px; }
.fxmu-pcard-money {
  font-family: 'JetBrains Mono', monospace; font-size: .8rem;
  font-weight: 700; color: #4ade80; white-space: nowrap; flex-shrink: 0;
}
.fxmu-pcard-row2 { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.fxmu-pcard-pos {
  font-size: .7rem; color: #3d4358;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fxmu-pcard-bust { font-size: .66rem; color: #ef4444; font-weight: 700; letter-spacing: .06em; }
.fxmu-pcard-props { font-size: .68rem; color: #4e566e; margin-left: auto; flex-shrink: 0; }

/* â”€â”€ Compact event feed â”€â”€ */
.fxmu-feed {
  background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column;
  max-height: 280px;
}
.fxmu-feed-hd {
  padding: 8px 13px; border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: .68rem; font-weight: 600; color: #3d4358;
  text-transform: uppercase; letter-spacing: .12em; flex-shrink: 0;
}
.fxmu-feed-body { flex: 1; overflow-y: auto; padding: 4px 0; }
.fxmu-feed-body::-webkit-scrollbar { width: 3px; }
.fxmu-feed-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.07); border-radius: 3px; }
.fxmu-feed-entry {
  padding: 5px 13px; font-size: .75rem; color: #4e566e;
  border-bottom: 1px solid rgba(255,255,255,.025);
  line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fxmu-feed-entry.fxmu-feed-latest { color: #c8d0e8; }
.fxmu-feed-entry.fxmu-feed-dim    { opacity: .32; }
.fxmu-feed-entry:last-child { border-bottom: none; }
.fxmu-feed-empty { padding: 20px 13px; font-size: .78rem; color: #2d3248; text-align: center; }
@keyframes fxmuFeedIn {
  from { opacity: 0; transform: translateY(-7px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fxmu-feed-in { animation: fxmuFeedIn .22s cubic-bezier(.2,.8,.4,1) forwards; }

/* â”€â”€ Action zone â”€â”€ */
.fxmu-action-zone {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.fxmu-action-idle { align-items: center; justify-content: center; padding: 18px; }
.fxmu-waiting-txt { font-size: .84rem; color: #3d4358; }
.fxmu-action-prompt { font-size: .84rem; color: #9ca3af; padding: 2px 0 4px; }
.fxmu-action-prompt strong { color: #f5c842; }
.fxmu-action-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.fxmu-build-row {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding-top: 8px; border-top: 1px solid rgba(255,255,255,.05);
}
.fxmu-dest-select {
  flex: 1; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px; color: #c8d0e8; padding: 8px 12px;
  font-size: .82rem; outline: none;
}
.fxmu-dest-select:focus { border-color: rgba(124,58,237,.4); }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   ENDED SCREEN
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.fxmu-ended { max-width: 480px; margin: 0 auto; padding: 32px 0 48px; }
.fxmu-ended-banner {
  text-align: center; padding: 28px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px; margin-bottom: 20px;
}
.fxmu-ended-banner.fxmu-won {
  background: rgba(245,200,66,.06); border-color: rgba(245,200,66,.2);
}
.fxmu-ended-emoji { font-size: 3rem; margin-bottom: 12px; line-height: 1; }
.fxmu-ended-banner h2 { margin: 0; font-size: 1.6rem; color: #c8d0e8; }
.fxmu-ended-banner.fxmu-won h2 { color: #f5c842; }
.fxmu-result-list {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px; overflow: hidden; margin-bottom: 20px;
}
.fxmu-result-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,.05);
}
.fxmu-result-row:last-child { border-bottom: none; }
.fxmu-result-row.fxmu-result-me { background: rgba(124,58,237,.06); }
.fxmu-result-rank { width: 28px; text-align: center; font-size: .88rem; flex-shrink: 0; }
.fxmu-result-tok {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 700; color: #fff; flex-shrink: 0;
  overflow: hidden; position: relative;
}
/* â”€â”€ Lobby room-list host avatar â”€â”€ */
.fxmu-room-tok {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .62rem; font-weight: 700; color: #fff;
  overflow: hidden; position: relative;
}
/* â”€â”€ Profile photo overlay shared by all tok classes â”€â”€ */
.fxmu-av-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%;
  opacity: 0; transition: opacity .25s ease;
}
.fxmu-av-img.fxmu-av-loaded { opacity: 1; }
.fxmu-result-name { flex: 1; font-size: .88rem; color: #c8d0e8; }
.fxmu-result-name em { font-style: normal; font-size: .72rem; color: #7c3aed; margin-left: 6px; }
.fxmu-result-worth {
  font-family: 'JetBrains Mono', monospace; font-size: .82rem; color: #22c55e; flex-shrink: 0;
}
.fxmu-ended-foot { display: flex; gap: 10px; justify-content: center; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   RESPONSIVE
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
@media (max-width: 760px) {
  .fxmu-game-body { grid-template-columns: 1fr !important; }
  .fxmu-board-col { align-items: center; }
  .fxmu-board-wrap { width: 300px !important; height: 300px !important; }
  .fxmu-board-img  { width: 300px !important; height: 300px !important; }
  .fxmu-board-tok  { width: 14px; height: 14px; font-size: .44rem; }
  .fxmu-feed       { max-height: 180px; }
  .fxmu-sidebar    { gap: 8px; }
}
@media (max-width: 480px) {
  .fxmu-code-display  { font-size: 1.8rem; letter-spacing: .15em; }
  .fxmu-pcard-money   { font-size: .74rem; }
  .fxmu-action-btns   { flex-direction: column; }
  .fxmu-btn-roll      { min-width: unset; width: 100%; }
  .fxmu-turn-banner   { padding: 8px 12px; }
}
/* â”€â”€ Wide / ultrawide centering â”€â”€ */
@media (min-width: 1200px) {
  .fxmu-root { max-width: 1280px; margin-left: auto; margin-right: auto; }
  .fxmu-game-body { gap: 24px; }
  .fxmu-sidebar   { gap: 12px; }
}
@media (min-width: 1500px) {
  .fxmu-root { max-width: 1480px; }  /* 760px board + 320px sidebar + 24px gap + breathing room */
}

/* ─── Home launchpad ───────────────────────────────────────────────── */
.home-launchpad {
  position: relative;
  margin: 0 0 22px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--radius-lg, 16px);
  background:
    linear-gradient(135deg, rgba(124,58,237,.08), rgba(6,182,212,.045)),
    rgba(255,255,255,.026);
  box-shadow: 0 12px 34px rgba(0,0,0,.24);
  overflow: hidden;
}
.home-launchpad::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,.08), transparent 34%, rgba(255,255,255,.035));
  opacity: .55;
}
.home-launchpad-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.home-launchpad-kicker {
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--brand-2, #06B6D4);
}
.home-launchpad-title {
  margin: 1px 0 0;
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--text, #eeeef8);
}
.home-launchpad-badge {
  flex-shrink: 0;
  padding: 5px 10px;
  border: 1px solid rgba(124,58,237,.24);
  border-radius: 999px;
  background: rgba(124,58,237,.12);
  color: #c4b5fd;
  font-size: .68rem;
  font-weight: 800;
}
.home-launchpad-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.home-launch-card {
  min-width: 0;
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(7,9,22,.58);
  color: var(--text, #eeeef8);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  text-align: left;
  transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
}
.home-launch-card:hover,
.home-launch-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(6,182,212,.34);
  background: rgba(255,255,255,.055);
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
  outline: none;
}
.home-launch-ic {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255,255,255,.065);
  font-size: 1rem;
}
.home-launch-card.profile .home-launch-ic { color: #c4b5fd; background: rgba(124,58,237,.14); }
.home-launch-card.games .home-launch-ic { color: #f5c842; background: rgba(245,200,66,.13); }
.home-launch-card.ai .home-launch-ic { color: #06B6D4; background: rgba(6,182,212,.13); }
.home-launch-card.finance .home-launch-ic { color: #22c55e; background: rgba(34,197,94,.13); }
.home-launch-copy {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}
.home-launch-title {
  font-weight: 800;
  font-size: .86rem;
  line-height: 1.2;
}
.home-launch-sub {
  color: var(--text2, #7878a0);
  font-size: .74rem;
  line-height: 1.35;
  white-space: normal;
}
.home-launch-arr {
  flex: 0 0 auto;
  color: var(--text3, #40405a);
  font-weight: 800;
  transition: transform .22s ease, color .22s ease;
}
.home-launch-card:hover .home-launch-arr,
.home-launch-card:focus-visible .home-launch-arr {
  color: var(--brand-2, #06B6D4);
  transform: translateX(2px);
}
[data-theme="light"] .home-launchpad {
  background:
    linear-gradient(135deg, rgba(124,58,237,.055), rgba(6,182,212,.035)),
    rgba(255,255,255,.82);
  border-color: rgba(0,0,0,.08);
  box-shadow: 0 12px 34px rgba(15,23,42,.08);
}
[data-theme="light"] .home-launch-card {
  background: rgba(255,255,255,.72);
  border-color: rgba(0,0,0,.07);
}
[data-theme="light"] .home-launch-card:hover,
[data-theme="light"] .home-launch-card:focus-visible {
  background: #fff;
  border-color: rgba(6,182,212,.28);
}

@media (max-width: 980px) {
  .home-launchpad-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .home-launchpad { padding: 14px; }
  .home-launchpad-head { align-items: flex-start; }
  .home-launchpad-badge { display: none; }
  .home-launchpad-grid { grid-template-columns: 1fr; }
  .home-launch-card { min-height: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-launch-card,
  .home-launch-arr {
    transition: none;
  }
  .home-launch-card:hover,
  .home-launch-card:focus-visible {
    transform: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   TYPING TOURNAMENT SYSTEM
═══════════════════════════════════════════════════════════════════ */

#fxTournamentRoot {
  position: fixed; inset: 0; z-index: 9000;
}

/* ── Overlay ── */
.fxtn-overlay {
  position: absolute; inset: 0;
  background: rgba(5, 5, 14, .82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .28s ease;
}
.fxtn-overlay.fxtn-open { opacity: 1; }

/* ── Panel ── */
.fxtn-panel {
  width: min(620px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  background: #0d0d1c;
  border: 1px solid rgba(124, 58, 237, .28);
  border-radius: 20px;
  padding: 28px 32px 32px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255,255,255,.03);
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(124,58,237,.3) transparent;
}
.fxtn-panel::-webkit-scrollbar { width: 5px; }
.fxtn-panel::-webkit-scrollbar-thumb { background: rgba(124,58,237,.3); border-radius: 99px; }

/* ── Panel header ── */
.fxtn-panel-hdr {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
.fxtn-badge {
  font-size: .72rem; font-weight: 800; letter-spacing: .09em;
  color: #f59e0b; text-transform: uppercase;
}
.fxtn-close {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.35); font-size: 1rem;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: color .15s, background .15s;
}
.fxtn-close:hover { color: #fff; background: rgba(255,255,255,.09); }

/* ── Screens ── */
.fxtn-screen {
  display: none; flex-direction: column; align-items: center;
  gap: 18px; padding-top: 4px;
}
.fxtn-screen.fxtn-visible { display: flex; }

/* ── Common text ── */
.fxtn-hero-icon { font-size: 3.2rem; line-height: 1; }
.fxtn-title { font-size: 1.5rem; font-weight: 700; color: #fff; margin: 0; text-align: center; }
.fxtn-sub {
  color: rgba(255,255,255,.5); text-align: center;
  font-size: .88rem; line-height: 1.65; max-width: 400px; margin: 0;
}
.fxtn-hint { color: rgba(255,255,255,.3); font-size: .78rem; text-align: center; margin: 0; }

/* ── Spinner ── */
.fxtn-spinner {
  width: 38px; height: 38px;
  border: 3px solid rgba(124,58,237,.18);
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: fxtnSpin .75s linear infinite;
}
.fxtn-spinner-sm { width: 22px; height: 22px; border-width: 2px; }
@keyframes fxtnSpin { to { transform: rotate(360deg); } }

/* ── Rules list ── */
.fxtn-rules {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 7px;
  width: 100%; max-width: 400px;
}
.fxtn-rules li {
  padding: 9px 14px;
  background: rgba(255,255,255,.04);
  border-left: 2px solid rgba(124,58,237,.6);
  border-radius: 0 8px 8px 0;
  font-size: .83rem; color: rgba(255,255,255,.65);
}
.fxtn-rules-sm li { padding: 7px 12px; font-size: .8rem; }

/* ── Fee card ── */
.fxtn-fee-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(124,58,237,.12), rgba(245,158,11,.08));
  border: 1px solid rgba(245,158,11,.25);
  border-radius: 14px; padding: 18px 32px;
  text-align: center;
}
.fxtn-fee-label { font-size: .73rem; color: rgba(255,255,255,.4); letter-spacing: .04em; text-transform: uppercase; }
.fxtn-fee-price { font-size: 2rem; font-weight: 800; color: #f59e0b; letter-spacing: -.02em; line-height: 1.1; }

/* ── Buttons ── */
.fxtn-btn {
  padding: 12px 28px; border-radius: 10px; border: none; cursor: pointer;
  font-size: .93rem; font-weight: 600; transition: transform .1s, opacity .15s, background .15s;
  min-width: 160px;
}
.fxtn-btn:active { transform: scale(.97); }
.fxtn-btn:disabled { opacity: .4; cursor: not-allowed; }
.fxtn-btn-primary  { background: #7c3aed; color: #fff; }
.fxtn-btn-primary:hover:not(:disabled)  { background: #6d28d9; }
.fxtn-btn-secondary { background: rgba(255,255,255,.07); color: rgba(255,255,255,.75); }
.fxtn-btn-secondary:hover:not(:disabled) { background: rgba(255,255,255,.12); }

/* ── Pending card ── */
.fxtn-pending-card {
  background: rgba(245,158,11,.07); border: 1px solid rgba(245,158,11,.22);
  border-radius: 12px; padding: 20px 22px;
  max-width: 400px; text-align: center;
}
.fxtn-pending-card p { color: rgba(255,255,255,.65); font-size: .86rem; line-height: 1.6; margin: 0 0 8px; }
.fxtn-pending-card p:last-child { margin: 0; }
.fxtn-pending-card strong { color: #f59e0b; }

/* ── Lobby stats ── */
.fxtn-lobby-stats {
  display: flex; gap: 10px; width: 100%; justify-content: center;
}
.fxtn-stat-mini {
  flex: 1; max-width: 130px;
  background: rgba(255,255,255,.04); border-radius: 12px;
  padding: 14px 10px; text-align: center;
}
.fxtn-stat-mini-main { background: rgba(124,58,237,.1); border: 1px solid rgba(124,58,237,.2); }
.fxtn-stat-mini-val  { display: block; font-size: 1.35rem; font-weight: 700; color: #fff; }
.fxtn-stat-mini-lbl  { display: block; font-size: .68rem; color: rgba(255,255,255,.32); margin-top: 3px; }

/* ── Match history ── */
.fxtn-history {
  width: 100%; max-height: 190px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.08) transparent;
}
.fxtn-history-empty { color: rgba(255,255,255,.3); font-size: .83rem; text-align: center; padding: 18px; }
.fxtn-hi-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 8px; transition: background .1s;
}
.fxtn-hi-row:hover { background: rgba(255,255,255,.04); }
.fxtn-hi-forfeit { opacity: .55; }
.fxtn-hi-n    { width: 28px; font-size: .72rem; color: rgba(255,255,255,.3); flex-shrink: 0; }
.fxtn-hi-eff  { flex: 1; font-weight: 700; color: #7c3aed; font-size: .88rem; }
.fxtn-hi-zero { color: #ef4444 !important; font-weight: 600; font-size: .78rem; }
.fxtn-hi-wpm  { font-size: .78rem; color: rgba(255,255,255,.45); }
.fxtn-hi-acc  { font-size: .78rem; color: rgba(255,255,255,.35); }
.fxtn-hi-lang { font-size: .8rem; }

/* ── Cooldown ── */
.fxtn-cooldown-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fxtn-cooldown-label { font-size: .72rem; color: rgba(255,255,255,.3); }
.fxtn-cooldown-timer {
  font-size: 2.2rem; font-weight: 800; color: #f59e0b;
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════════════════════════
   BATCH: TOURNAMENT v2 — PHASE SCREENS, PRIZE, LEADERBOARD, PODIUM
   ═══════════════════════════════════════════════════════════════════ */

/* ── Before-open screen ── */
.fxtn-before-screen {
  /* display managed by .fxtn-screen / .fxtn-visible */
}
.fxtn-before-hd { text-align: center; }
.fxtn-before-trophy {
  font-size: 3.2rem; line-height: 1;
  animation: fxtnTrophyFloat 3s ease-in-out infinite;
  display: inline-block; margin-bottom: 6px;
}
@keyframes fxtnTrophyFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

/* ── Countdown box ── */
.fxtn-countdown-box {
  background: linear-gradient(135deg, rgba(124,58,237,.14), rgba(109,40,217,.08));
  border: 1px solid rgba(124,58,237,.35);
  border-radius: 16px; padding: 18px 32px; text-align: center;
  min-width: 220px;
}
.fxtn-cd-label {
  font-size: .7rem; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(255,255,255,.4); margin-bottom: 6px;
}
.fxtn-cd-timer {
  font-size: 2rem; font-weight: 800; color: #a78bfa;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
  animation: fxtnCdPulse 2s ease-in-out infinite;
}
@keyframes fxtnCdPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .7; }
}

/* ── Prize banner ── */
.fxtn-prize-banner { width: 100%; }
.fxtn-prize-box {
  background: linear-gradient(135deg, rgba(245,158,11,.08), rgba(124,58,237,.06));
  border: 1px solid rgba(245,158,11,.2);
  border-radius: 14px; padding: 14px 16px; width: 100%;
}
.fxtn-prize-title {
  font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(255,255,255,.35); text-align: center; margin-bottom: 12px;
}
.fxtn-prize-row {
  display: flex; gap: 8px; justify-content: center;
}
.fxtn-prize-item {
  flex: 1; max-width: 120px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border-radius: 10px; padding: 10px 6px; text-align: center;
}
.fxtn-prize-gold   { background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.3); }
.fxtn-prize-silver { background: rgba(148,163,184,.08); border: 1px solid rgba(148,163,184,.2); }
.fxtn-prize-bronze { background: rgba(180,83,9,.08);   border: 1px solid rgba(180,83,9,.2); }
.fxtn-prize-rank {
  font-size: .72rem; color: rgba(255,255,255,.5);
}
.fxtn-prize-amt {
  font-size: .82rem; font-weight: 700;
}
.fxtn-prize-gold   .fxtn-prize-amt { color: #f59e0b; }
.fxtn-prize-silver .fxtn-prize-amt { color: #94a3b8; }
.fxtn-prize-bronze .fxtn-prize-amt { color: #b45309; }

/* ── Before-open registration section ── */
.fxtn-before-reg { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 0; }
.fxtn-before-status {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; font-size: .88rem; font-weight: 500;
}
.fxtn-before-status-pending {
  background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.25);
  color: #f59e0b;
}
.fxtn-before-status-ok {
  background: rgba(34,197,94,.09); border: 1px solid rgba(34,197,94,.22);
  color: #4ade80;
}

/* ── Small DANA box (before-open variant) ── */
.fxtn-dana-box-sm {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 14px 18px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 100%;
}
.fxtn-dana-box-sm .fxtn-dana-title { font-size: .8rem; color: rgba(255,255,255,.5); }
.fxtn-dana-box-sm .fxtn-dana-qr-wrap img {
  width: 110px; height: 110px; object-fit: contain; border-radius: 8px;
}

/* ── Before-open player list ── */
.fxtn-before-players { width: 100%; }
.fxtn-section-label {
  font-size: .68rem; letter-spacing: .07em; text-transform: uppercase;
  color: rgba(255,255,255,.3); margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.fxtn-section-label::before {
  content: ''; display: inline-block;
  width: 3px; height: 12px; border-radius: 2px;
  background: #7c3aed;
}
.fxtn-player-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 200px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.08) transparent;
}
.fxtn-pl-empty {
  color: rgba(255,255,255,.25); font-size: .82rem;
  text-align: center; padding: 16px;
}
.fxtn-pl-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.05);
  transition: background .15s;
}
.fxtn-pl-row:hover { background: rgba(255,255,255,.06); }
.fxtn-pl-num {
  width: 20px; font-size: .72rem; color: rgba(255,255,255,.3);
  flex-shrink: 0; text-align: center;
}
.fxtn-pl-av {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  overflow: hidden; background: rgba(124,58,237,.25);
  display: flex; align-items: center; justify-content: center;
}
.fxtn-pl-av-img { width: 100%; height: 100%; object-fit: cover; }
.fxtn-pl-av-txt { font-size: .75rem; font-weight: 700; color: #a78bfa; }
.fxtn-pl-name  { flex: 1; font-size: .85rem; color: rgba(255,255,255,.75); font-weight: 500; }
.fxtn-pl-badge {
  font-size: .65rem; font-weight: 600; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 20px;
}
.fxtn-pl-badge.active {
  background: rgba(124,58,237,.2); border: 1px solid rgba(124,58,237,.4);
  color: #a78bfa;
}
.fxtn-pl-badge.done {
  background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.3);
  color: #4ade80;
}

/* ── Approved celebration screen ── */
.fxtn-approved-screen {
  /* display managed by .fxtn-screen / .fxtn-visible */
}
.fxtn-approved-anim {
  font-size: 4rem; line-height: 1;
  animation: fxtnApproveIn .6s cubic-bezier(.34,1.56,.64,1) both,
             fxtnApproveSpin 6s ease-in-out infinite 1s;
}
@keyframes fxtnApproveIn {
  from { transform: scale(0) rotate(-30deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);   opacity: 1; }
}
@keyframes fxtnApproveSpin {
  0%, 90%, 100% { transform: scale(1) rotate(0deg); }
  95%           { transform: scale(1.08) rotate(8deg); }
}
.fxtn-approved-title {
  background: linear-gradient(120deg, #a78bfa, #7c3aed);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.5rem !important; font-weight: 800 !important;
}
.fxtn-approved-prize {
  background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.2);
  border-radius: 12px; padding: 14px 28px; text-align: center;
  min-width: 200px;
}
.fxtn-apr-prize-label {
  font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(255,255,255,.35); margin-bottom: 4px;
}
.fxtn-apr-prize-val {
  font-size: 1.4rem; font-weight: 800; color: #f59e0b;
}

/* ── Leaderboard section ── */
.fxtn-lb-section { width: 100%; margin-top: 10px; }
.fxtn-leaderboard {
  display: flex; flex-direction: column; gap: 5px;
  max-height: 260px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.07) transparent;
}
.fxtn-lb-empty {
  color: rgba(255,255,255,.22); font-size: .82rem;
  text-align: center; padding: 20px;
}
.fxtn-lb-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.05);
  transition: background .12s;
}
.fxtn-lb-row:hover { background: rgba(255,255,255,.06); }
.fxtn-lb-top {
  background: rgba(124,58,237,.07); border-color: rgba(124,58,237,.18);
}
.fxtn-lb-me {
  background: rgba(124,58,237,.13) !important;
  border-color: rgba(124,58,237,.4) !important;
  box-shadow: 0 0 0 1px rgba(124,58,237,.2);
}
.fxtn-lb-pos {
  width: 26px; font-size: .9rem; text-align: center; flex-shrink: 0;
}
.fxtn-lb-av {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  overflow: hidden; background: rgba(124,58,237,.2);
  display: flex; align-items: center; justify-content: center;
}
.fxtn-lb-av-img { width: 100%; height: 100%; object-fit: cover; }
.fxtn-lb-av-txt { font-size: .78rem; font-weight: 700; color: #a78bfa; }
.fxtn-lb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fxtn-lb-name {
  font-size: .85rem; font-weight: 600; color: rgba(255,255,255,.85);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fxtn-lb-detail { font-size: .68rem; color: rgba(255,255,255,.3); }
.fxtn-lb-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0;
}
.fxtn-lb-score {
  font-size: .82rem; font-weight: 700; color: #a78bfa;
  font-variant-numeric: tabular-nums;
}
.fxtn-lb-prize {
  font-size: .68rem; color: #f59e0b; font-weight: 600;
}

/* ── Done rank card ── */
.fxtn-done-rank-card { width: 100%; }
.fxtn-done-rank-card-inner {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: linear-gradient(135deg, rgba(124,58,237,.15), rgba(245,158,11,.06));
  border: 1px solid rgba(124,58,237,.3); border-radius: 14px; padding: 18px 24px;
  text-align: center;
}
.fxtn-drc-label {
  font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(255,255,255,.35);
}
.fxtn-drc-rank {
  font-size: 3rem; font-weight: 900; color: #a78bfa;
  line-height: 1.1; letter-spacing: -.03em;
}
.fxtn-drc-of { font-size: .78rem; color: rgba(255,255,255,.4); }
.fxtn-drc-prize { font-size: .88rem; font-weight: 700; color: #f59e0b; margin-top: 6px; }

/* ── Closed screen ── */
.fxtn-closed-screen {
  /* display managed by .fxtn-screen / .fxtn-visible */
}
.fxtn-closed-hd { text-align: center; }
.fxtn-closed-icon {
  font-size: 3rem; line-height: 1; margin-bottom: 8px; display: inline-block;
}

/* ── Podium ── */
.fxtn-closed-podium { width: 100%; }
.fxtn-podium {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 10px; padding: 8px 0 4px;
}
.fxtn-pod-item {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  flex: 1; max-width: 110px; padding: 14px 8px 10px;
  border-radius: 14px; text-align: center;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.03);
  transition: transform .2s;
}
.fxtn-pod-item:hover { transform: translateY(-3px); }
.fxtn-pod-1 {
  background: linear-gradient(160deg, rgba(245,158,11,.12), rgba(120,53,15,.06));
  border-color: rgba(245,158,11,.3);
  padding-top: 20px; /* taller for 1st */
}
.fxtn-pod-2 {
  background: linear-gradient(160deg, rgba(148,163,184,.08), rgba(71,85,105,.04));
  border-color: rgba(148,163,184,.2);
}
.fxtn-pod-3 {
  background: linear-gradient(160deg, rgba(180,83,9,.08), rgba(120,53,15,.04));
  border-color: rgba(180,83,9,.2);
}
.fxtn-pod-av {
  width: 44px; height: 44px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: rgba(124,58,237,.2); border: 2px solid rgba(124,58,237,.3);
}
.fxtn-pod-1 .fxtn-pod-av { border-color: rgba(245,158,11,.6); width: 52px; height: 52px; }
.fxtn-pod-av-img { width: 100%; height: 100%; object-fit: cover; }
.fxtn-pod-av-txt { font-size: .88rem; font-weight: 700; color: #a78bfa; }
.fxtn-pod-medal { font-size: 1.5rem; line-height: 1; }
.fxtn-pod-name  { font-size: .76rem; font-weight: 600; color: rgba(255,255,255,.8); word-break: break-word; }
.fxtn-pod-score { font-size: .7rem; color: rgba(255,255,255,.4); }
.fxtn-pod-prize { font-size: .74rem; font-weight: 700; color: #f59e0b; }

/* ── Approved prize sub-box (inline in approved screen) ── */
.fxtn-approved-prize:empty { display: none; }

/* ── Mobile tweaks ── */
@media (max-width: 480px) {
  .fxtn-prize-row { gap: 6px; }
  .fxtn-prize-item { padding: 8px 4px; }
  .fxtn-prize-amt  { font-size: .75rem; }
  .fxtn-podium     { gap: 6px; }
  .fxtn-pod-item   { max-width: 90px; padding: 10px 4px 8px; }
  .fxtn-pod-name   { font-size: .68rem; }
  .fxtn-lb-name    { font-size: .78rem; }
  .fxtn-cd-timer   { font-size: 1.6rem; }
  .fxtn-drc-rank   { font-size: 2.4rem; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .fxtn-before-trophy,
  .fxtn-cd-timer,
  .fxtn-approved-anim { animation: none !important; }
}

/* ── Start button ── */
.fxtn-start-btn { width: 100%; max-width: 280px; padding: 15px; font-size: .98rem; }

/* ── Prematch ── */
.fxtn-prematch-badge {
  font-size: .72rem; font-weight: 700; letter-spacing: .07em;
  color: rgba(124,58,237,.85); text-transform: uppercase;
  background: rgba(124,58,237,.1); padding: 4px 12px; border-radius: 99px;
}
.fxtn-lang-row { display: flex; gap: 10px; }
.fxtn-lang {
  padding: 10px 22px; border-radius: 9px;
  background: rgba(255,255,255,.05); border: 1.5px solid transparent;
  color: rgba(255,255,255,.55); font-size: .9rem; cursor: pointer;
  transition: all .15s;
}
.fxtn-lang:hover { background: rgba(255,255,255,.08); }
.fxtn-lang.active { border-color: #7c3aed; background: rgba(124,58,237,.14); color: #fff; }

/* ── Arena screen ── */
.fxtn-arena-screen { width: 100%; align-items: stretch; gap: 12px; }

.fxtn-arena-hdr {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.fxtn-arena-info { font-size: .75rem; color: rgba(255,255,255,.3); }
.fxtn-arena-timer {
  font-size: 2.4rem; font-weight: 800; color: #fff;
  font-variant-numeric: tabular-nums; transition: color .3s;
}
.fxtn-arena-timer.fxtn-urgent {
  color: #ef4444;
  animation: fxtnTimerPulse .6s ease-in-out infinite;
}
@keyframes fxtnTimerPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .45; }
}
.fxtn-arena-wpm { font-size: .88rem; color: rgba(255,255,255,.45); text-align: right; min-width: 70px; }

/* ── Words display ── */
.fxtn-words {
  height: 96px; overflow: hidden;
  font-size: 1.12rem; line-height: 1.8;
  color: rgba(255,255,255,.22);
  word-break: break-word; user-select: none;
  position: relative;
}
.fxtn-words::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 28px;
  background: linear-gradient(transparent, #0d0d1c);
  pointer-events: none;
}
.fxtn-w     { display: inline-block; margin-right: .28em; }
.fxtn-w-cur .fxtn-c { color: rgba(255,255,255,.75); }
.fxtn-w-done { opacity: .28; }
.fxtn-c-ok  { color: #22c55e !important; }
.fxtn-c-err { color: #ef4444 !important; text-decoration: underline; }
.fxtn-c-sp  { display: inline-block; width: .28em; }

/* ── Arena input ── */
.fxtn-input {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 10px; padding: 13px 16px;
  font-size: 1rem; color: #fff; outline: none; caret-color: #7c3aed;
  transition: border-color .15s;
}
.fxtn-input:focus { border-color: rgba(124,58,237,.45); background: rgba(255,255,255,.07); }

/* ── Arena footer ── */
.fxtn-arena-footer {
  display: flex; justify-content: space-between;
  font-size: .75rem; color: rgba(255,255,255,.28);
}

/* ── Result screen ── */
.fxtn-result-title {
  font-size: 1.15rem; font-weight: 700; color: #7c3aed;
  animation: fxtnFadeUp .4s ease both;
}
.fxtn-result-cards { display: flex; gap: 10px; width: 100%; }
.fxtn-rc {
  flex: 1; padding: 16px 10px; border-radius: 12px;
  background: rgba(255,255,255,.04); text-align: center;
  animation: fxtnFadeUp .4s ease both;
}
.fxtn-rc:nth-child(2) { animation-delay: .07s; }
.fxtn-rc:nth-child(3) { animation-delay: .14s; }
.fxtn-rc-main { background: rgba(124,58,237,.1); border: 1px solid rgba(124,58,237,.28); }
.fxtn-rc-val  { font-size: 1.7rem; font-weight: 800; color: #fff; }
.fxtn-rc-lbl  { font-size: .68rem; color: rgba(255,255,255,.38); margin-top: 4px; }
.fxtn-result-avg { font-size: .83rem; color: rgba(255,255,255,.45); }
.fxtn-result-avg strong { color: #7c3aed; font-weight: 700; }
.fxtn-result-rem { font-size: .78rem; color: rgba(255,255,255,.28); margin: 0; }

/* ── Done screen ── */
.fxtn-done-trophy {
  font-size: 3.8rem; line-height: 1;
  animation: fxtnTrophyPop .55s cubic-bezier(.175,.885,.32,1.55) both;
}
@keyframes fxtnTrophyPop {
  from { transform: scale(.25) rotate(-20deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}
.fxtn-done-score { text-align: center; }
.fxtn-done-val { display: block; font-size: 2.8rem; font-weight: 900; color: #f59e0b; letter-spacing: -.02em; }
.fxtn-done-lbl { font-size: .75rem; color: rgba(255,255,255,.35); margin-top: 4px; }

/* ── Shared animation ── */
@keyframes fxtnFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .fxtn-spinner, .fxtn-arena-timer.fxtn-urgent,
  .fxtn-done-trophy, .fxtn-rc, .fxtn-result-title { animation: none; }
  .fxtn-overlay { transition: none; }
}

/* ── DANA QR box ── */
.fxtn-dana-box {
  width: 100%; max-width: 320px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 18px; text-align: center;
}
.fxtn-dana-title { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.35); margin-bottom: 12px; }
.fxtn-dana-qr-wrap { display: flex; justify-content: center; margin-bottom: 10px; }
.fxtn-dana-qr-wrap img { width: 180px; height: 180px; border-radius: 10px; object-fit: contain; background: #fff; padding: 6px; }
.fxtn-dana-placeholder {
  width: 180px; height: 180px; border-radius: 10px;
  border: 2px dashed rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; color: rgba(255,255,255,.25);
}

/* ── Mobile adjustments ── */
@media (max-width: 560px) {
  .fxtn-panel { padding: 20px 18px 24px; }
  .fxtn-result-cards { gap: 7px; }
  .fxtn-rc-val { font-size: 1.4rem; }
  .fxtn-lobby-stats { gap: 7px; }
  .fxtn-stat-mini-val { font-size: 1.1rem; }
  .fxtn-words { height: 80px; font-size: 1rem; }
  .fxtn-arena-timer { font-size: 2rem; }
}

/* ══════════════════════════════════════════
   MOBILE GLOBAL — ≤768px
══════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Page header */
  .pg-head { margin-bottom: 16px; }
  .pg-title { font-size: 1.4rem !important; }
  .pg-sub   { font-size: .78rem; }

  /* Touch-friendly tap targets */
  .btn-pri, .btn-ghost, .btn-add, .send-btn,
  .sb-item, .sb-bot-item,
  .notif-bell, .mob-btn {
    min-height: 44px;
  }

  /* AI Chat bubbles — wider on small screen */
  .fxai-bubble { max-width: 88%; }
  .fxai-bubble pre { font-size: .72rem; padding: 10px 12px; }

  /* Chat input row */
  .chat-in-row { gap: 6px; }
  .chat-in     { font-size: .88rem; }

  /* Leaderboard compact */
  .fxlb-list        { gap: 6px; }
  .fxlb-item        { padding: 10px 12px; }
  .fxlb-rank        { font-size: .9rem; width: 28px; }
  .fxlb-name        { font-size: .85rem; }
  .fxlb-score       { font-size: .8rem; }
  .fxlb-header      { padding: 12px 16px; }
  .fxlb-search      { font-size: .82rem; }

  /* Games hub */
  .fxg-game-grid    { grid-template-columns: 1fr !important; }
  .fxg-module-body  { padding: 12px; }
  .fxg-launcher-item { min-height: 44px; }

  /* Finance */
  .fxf-top-row { flex-direction: column; align-items: flex-start; }
  .fxf-month-sel { width: 100%; }
  .fxf-section  { padding: 14px; }

  /* Friends */
  .fr-item { padding: 10px 12px; min-height: 44px; }

  /* Social chat */
  .msg-bubble { max-width: 88%; }
  .chat-input { font-size: .88rem; }

  /* Generator */
  .vibe-row { gap: 6px; flex-wrap: wrap; }
  .vibe-btn { min-height: 36px; font-size: .78rem; }

  /* Dashboard cards */
  .todo-row  { gap: 6px; }
  .todo-in   { font-size: .88rem; }

  /* Settings modal */
  .modal { margin: 12px; max-height: calc(100dvh - 24px); overflow-y: auto; }
}

@media (max-width: 480px) {
  /* Stats single column */
  .stats-row { grid-template-columns: 1fr 1fr; gap: 8px; }

  /* Content padding tighter */
  .content { padding: 14px 12px !important; }

  /* Page heading smaller */
  .pg-title { font-size: 1.25rem !important; }

  /* Orbit ring hidden on very small (already done in landing) */
  .fxg-hero-card { padding: 16px 14px; }

  /* Finance enhancements compact */
  .fxf-input-row { flex-direction: column; }
  .fxf-btn       { width: 100%; }
}

/* ══════════════════════════════════════════════════════════════════════
   MONOPOLY LOBBY v2 — Room Cards + Create Modal + Live Stats
══════════════════════════════════════════════════════════════════════ */

/* Lobby stats bar */
.fxmu-lobby-stats {
  display: flex; align-items: center; gap: 16px;
  margin-top: 8px; flex-wrap: wrap;
}
.fxmu-lstat {
  display: flex; align-items: center; gap: 6px;
  font-size: .74rem; color: #4e566e; font-weight: 500;
}
.fxmu-lstat-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.fxmu-lstat-dot.pub { background: #a78bfa; }
.fxmu-lstat-dot.on  { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,.5); animation: fxmu-pulse-g 2s infinite; }
@keyframes fxmu-pulse-g {
  0%,100% { opacity: 1; }
  50%      { opacity: .4; }
}

/* Live rooms indicator dot (in panel header) */
.fxmu-rooms-live-dot {
  width: 7px; height: 7px; border-radius: 50;
  background: #22c55e; box-shadow: 0 0 5px rgba(34,197,94,.5);
  animation: fxmu-pulse-g 2s infinite; flex-shrink: 0;
}

/* Lobby actions (create + join row) */
.fxmu-lobby-actions {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 18px;
}
.fxmu-join-row {
  display: flex; gap: 10px;
}
.fxmu-join-row .fxmu-code-input { flex: 1; }

/* Room cards grid */
.fxmu-rooms-grid {
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px;
}
.fxmu-room-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; overflow: hidden;
  transition: border-color .2s, background .2s;
}
.fxmu-room-card:hover { border-color: rgba(167,139,250,.25); background: rgba(167,139,250,.04); }
.fxmu-room-card.mine  { border-color: rgba(124,58,237,.3); background: rgba(124,58,237,.05); }
.fxmu-room-card.private { border-color: rgba(245,200,66,.15); }

.fxmu-room-card-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 8px;
}
.fxmu-room-card-host { display: flex; align-items: center; gap: 10px; }
.fxmu-room-card-av {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg,#7C3AED,#06B6D4);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; color: #fff;
}
.fxmu-room-card-name {
  font-size: .86rem; font-weight: 600; color: #c8d0e8;
  display: flex; align-items: center; gap: 6px;
}
.fxmu-room-card-code {
  font-size: .72rem; color: #4e566e; margin-top: 2px;
}

.fxmu-room-card-right { text-align: right; }
.fxmu-room-card-count {
  font-size: 1.1rem; font-weight: 700; color: #a78bfa;
  line-height: 1;
}
.fxmu-room-card-count span { font-size: .72rem; color: #3d4358; font-weight: 400; }

.fxmu-room-dots { display: flex; gap: 4px; justify-content: flex-end; margin-top: 5px; }
.fxmu-room-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.1); transition: background .2s;
}
.fxmu-room-dot.filled { background: #7C3AED; }

.fxmu-room-card-foot {
  padding: 0 14px 12px;
  display: flex; align-items: center; gap: 10px;
}
.fxmu-room-card-bar {
  flex: 1; height: 4px; background: rgba(255,255,255,.07);
  border-radius: 2px; overflow: hidden;
}
.fxmu-room-card-fill {
  height: 100%; background: linear-gradient(90deg,#7C3AED,#a78bfa);
  border-radius: 2px; transition: width .4s var(--ease);
}

/* Create Room Modal */
.fxmu-create-modal {
  background: rgba(10,10,20,.95);
  border: 1px solid rgba(167,139,250,.2);
  border-radius: 16px; overflow: hidden;
  margin-bottom: 18px;
  backdrop-filter: blur(16px);
}
.fxmu-create-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.07);
  font-size: .88rem; font-weight: 600; color: #c8d0e8;
}
.fxmu-create-close {
  background: none; border: none; cursor: pointer;
  color: #4e566e; font-size: 1rem; padding: 2px 6px;
  border-radius: 6px; transition: color .2s, background .2s;
}
.fxmu-create-close:hover { color: #c8d0e8; background: rgba(255,255,255,.07); }
.fxmu-create-body {
  padding: 16px; display: flex; flex-direction: column; gap: 14px;
}
.fxmu-create-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.fxmu-create-label {
  font-size: .78rem; color: #4e566e; font-weight: 500;
  text-transform: uppercase; letter-spacing: .1em; flex-shrink: 0;
}
.fxmu-create-input {
  flex: 1; padding: 9px 13px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; color: #e8e8f2; font-size: .88rem; outline: none;
  transition: border-color .2s; width: 100%;
}
.fxmu-create-input:focus { border-color: rgba(167,139,250,.4); }
.fxmu-create-input::placeholder { color: #2d3248; }

/* Player count pills */
.fxmu-pill-row { display: flex; gap: 6px; }
.fxmu-pill {
  padding: 6px 14px; border-radius: 20px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  color: #7c7c9a; font-size: .82rem; font-weight: 600; cursor: pointer;
  transition: all .2s;
}
.fxmu-pill.active {
  background: rgba(124,58,237,.2); border-color: rgba(167,139,250,.4);
  color: #a78bfa;
}
.fxmu-pill:hover:not(.active) { color: #c8d0e8; border-color: rgba(255,255,255,.2); }

/* Visibility toggle (Public / Private) */
.fxmu-vis-toggle {
  display: flex; border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; overflow: hidden;
}
.fxmu-vis-btn {
  flex: 1; padding: 7px 12px;
  background: none; border: none; cursor: pointer;
  color: #4e566e; font-size: .8rem; font-weight: 500;
  transition: all .2s;
}
.fxmu-vis-btn.active {
  background: rgba(124,58,237,.2); color: #a78bfa;
}
.fxmu-vis-btn:hover:not(.active) { color: #c8d0e8; }

/* ══════════════════════════════════════════════════════════════════════
   GLOBAL PRESENCE PANEL  .fxpr-*
══════════════════════════════════════════════════════════════════════ */
.fxpr-panel {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px; overflow: hidden;
  margin-top: 24px;
}
.fxpr-count {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: .78rem; font-weight: 600; color: #4e566e;
  text-transform: uppercase; letter-spacing: .1em;
}
.fxpr-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,.5);
  animation: fxmu-pulse-g 2s infinite; flex-shrink: 0;
}
.fxpr-list { padding: 6px 0; }
.fxpr-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px; transition: background .15s;
}
.fxpr-item:hover { background: rgba(255,255,255,.02); }
.fxpr-av {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg,#7C3AED,#06B6D4);
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 700; color: #fff;
  position: relative;
}
.fxpr-av-dot {
  position: absolute; bottom: 1px; right: 1px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e; border: 1.5px solid #04050c;
}
.fxpr-name {
  flex: 1; font-size: .84rem; color: #c8d0e8;
  display: flex; align-items: center; gap: 6px;
}
.fxpr-you {
  font-size: .68rem; color: #a78bfa; font-weight: 600;
  background: rgba(124,58,237,.15); border-radius: 5px;
  padding: 1px 5px;
}
.fxpr-lv { font-size: .72rem; color: #3d4358; }
.fxpr-empty {
  padding: 24px 16px; text-align: center;
  font-size: .82rem; color: #2d3248;
}

/* ══════════════════════════════════════════════════════════════════════
   ADMIN PANEL  .fxad-*
══════════════════════════════════════════════════════════════════════ */

/* FAB button */
.fxad-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 9000;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(124,58,237,.85);
  border: 1px solid rgba(167,139,250,.3);
  color: #fff; font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(124,58,237,.4);
  transition: background .2s, transform .2s, box-shadow .2s;
  backdrop-filter: blur(8px);
}
.fxad-fab:hover {
  background: rgba(124,58,237,1);
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(124,58,237,.6);
}

/* Overlay backdrop */
.fxad-overlay {
  position: fixed; inset: 0; z-index: 9100;
  background: rgba(4,5,12,.7); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}

/* Panel card */
.fxad-panel {
  width: 100%; max-width: 520px; max-height: 88vh;
  background: rgba(8,9,20,.98);
  border: 1px solid rgba(167,139,250,.18);
  border-radius: 22px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,.8), 0 0 0 1px rgba(167,139,250,.07);
}

/* Panel header */
.fxad-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
  background: rgba(124,58,237,.06);
}
.fxad-head-left { display: flex; align-items: center; gap: 12px; }
.fxad-head-icon {
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
  background: rgba(124,58,237,.2); border: 1px solid rgba(167,139,250,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.fxad-title {
  font-size: .96rem; font-weight: 700; color: #e8e8f2;
  letter-spacing: .04em; line-height: 1.2;
}
.fxad-subtitle {
  font-size: .68rem; color: #4e566e; letter-spacing: .1em;
  text-transform: uppercase; margin-top: 1px;
}
.fxad-close {
  background: rgba(255,255,255,.07); border: none; cursor: pointer;
  color: #7c7c9a; width: 32px; height: 32px; border-radius: 9px;
  font-size: .9rem; display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s; flex-shrink: 0;
}
.fxad-close:hover { background: rgba(255,255,255,.14); color: #e8e8f2; }

/* Tab bar */
.fxad-tabs {
  display: flex; border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0; background: rgba(0,0,0,.2);
}
.fxad-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 10px 4px 9px; gap: 3px;
  background: none; border: none; cursor: pointer;
  color: #3d4358; font-size: .7rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s, background .2s;
}
.fxad-tab:hover { color: #7c7c9a; background: rgba(255,255,255,.02); }
.fxad-tab.active {
  color: #a78bfa; border-bottom-color: #7C3AED;
  background: rgba(124,58,237,.07);
}
.fxad-tab-icon { font-size: 1rem; line-height: 1; }
.fxad-tab-label { font-size: .64rem; }

/* Panel body */
.fxad-body { flex: 1; overflow-y: auto; }

/* Sections */
.fxad-section {
  padding: 16px 22px; border-bottom: 1px solid rgba(255,255,255,.05);
}
.fxad-section:last-child { border-bottom: none; }
.fxad-section-title {
  font-size: .68rem; font-weight: 600; color: #3d4358;
  text-transform: uppercase; letter-spacing: .14em; margin-bottom: 14px;
}

/* Live stats */
.fxad-stats-row { display: flex; gap: 28px; flex-wrap: wrap; }
.fxad-stat { text-align: center; }
.fxad-stat-val {
  font-size: 1.8rem; font-weight: 800; color: #a78bfa; line-height: 1;
  display: flex; align-items: center; gap: 6px; justify-content: center;
}
.fxad-stat-val.fxad-green { color: #22c55e; }
.fxad-stat-lbl {
  font-size: .66rem; color: #3d4358; text-transform: uppercase;
  letter-spacing: .1em; margin-top: 5px;
}

/* Live pulse dot */
.fxad-live-pulse {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
  background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,.6);
  animation: fxmu-pulse-g 2s infinite;
}

/* User list (Live tab + Users tab) */
.fxad-user-list { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.fxad-user-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.03);
}
.fxad-user-item:last-child { border-bottom: none; }
.fxad-user-av {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg,#7C3AED,#06B6D4);
  display: flex; align-items: center; justify-content: center;
  font-size: .66rem; font-weight: 700; color: #fff;
}
.fxad-user-name { flex: 1; font-size: .84rem; color: #c8d0e8; font-weight: 500; }
.fxad-user-lv   { font-size: .72rem; color: #4e566e; }

/* User search result rows */
.fxad-user-result {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.04);
}
.fxad-user-result:last-child { border-bottom: none; }
.fxad-user-result-info { flex: 1; min-width: 0; }
.fxad-user-uid {
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem; color: #2d3248; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* XP adjust buttons */
.fxad-user-xp-btns { display: flex; gap: 4px; flex-shrink: 0; }
.fxad-xp-btn {
  padding: 5px 9px; border-radius: 7px; cursor: pointer;
  font-size: .7rem; font-weight: 700; border: 1px solid;
  transition: all .15s;
}
.fxad-xp-btn.plus {
  background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.25); color: #22c55e;
}
.fxad-xp-btn.minus {
  background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.25); color: #ef4444;
}
.fxad-xp-btn.kilo {
  background: rgba(245,200,66,.08); border-color: rgba(245,200,66,.2); color: #f5c842;
}
.fxad-xp-btn:hover { opacity: .8; transform: scale(1.06); }

/* Toggle rows */
.fxad-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,.03);
}
.fxad-toggle-row:last-child { border-bottom: none; }
.fxad-toggle-info { flex: 1; min-width: 0; }
.fxad-toggle-title {
  font-size: .88rem; color: #c8d0e8; font-weight: 500;
}
.fxad-toggle-desc {
  font-size: .72rem; color: #3d4358; margin-top: 2px;
}
.fxad-toggle-btn {
  padding: 7px 18px; border-radius: 20px; cursor: pointer;
  font-size: .76rem; font-weight: 700; letter-spacing: .08em;
  border: 1px solid; transition: all .2s; flex-shrink: 0; min-width: 60px;
}
.fxad-toggle-btn.on {
  background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.3);
  color: #22c55e;
}
.fxad-toggle-btn.off {
  background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1);
  color: #3d4358;
}
.fxad-toggle-btn.on:hover  { background: rgba(34,197,94,.24); }
.fxad-toggle-btn.off:hover { background: rgba(255,255,255,.08); color: #c8d0e8; }
.fxad-toggle-btn:disabled  { opacity: .45; cursor: not-allowed; }

/* Broadcast */
.fxad-hint {
  font-size: .76rem; color: #3d4358; margin-bottom: 14px; line-height: 1.5;
}
.fxad-bcast-input {
  width: 100%; min-height: 96px; resize: vertical;
  padding: 12px 14px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px; color: #e8e8f2; font-size: .88rem;
  font-family: 'DM Sans', sans-serif; line-height: 1.5;
  outline: none; transition: border-color .2s;
}
.fxad-bcast-input:focus { border-color: rgba(167,139,250,.35); }
.fxad-bcast-input::placeholder { color: #2d3248; }
.fxad-bcast-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; gap: 10px;
}
.fxad-char-count { font-size: .72rem; color: #3d4358; }
.fxad-bcast-btn {
  padding: 10px 20px; border-radius: 10px; cursor: pointer;
  background: rgba(124,58,237,.2); border: 1px solid rgba(167,139,250,.3);
  color: #a78bfa; font-size: .84rem; font-weight: 600;
  transition: all .2s;
}
.fxad-bcast-btn:hover:not(:disabled) {
  background: rgba(124,58,237,.35); color: #e8e8f2;
}
.fxad-bcast-btn:disabled { opacity: .4; cursor: not-allowed; }
.fxad-danger-btn {
  padding: 9px 18px; border-radius: 10px; cursor: pointer;
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2);
  color: #f87171; font-size: .82rem; font-weight: 600;
  transition: all .2s; margin-top: 6px;
}
.fxad-danger-btn:hover { background: rgba(239,68,68,.16); }

/* User search */
.fxad-search-input {
  width: 100%; padding: 10px 14px; margin-bottom: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; color: #e8e8f2; font-size: .88rem; outline: none;
  transition: border-color .2s;
}
.fxad-search-input:focus { border-color: rgba(167,139,250,.35); }
.fxad-search-input::placeholder { color: #2d3248; }

/* Info rows */
.fxad-info-row {
  font-size: .78rem; color: #4e566e; padding: 5px 0;
  display: flex; align-items: center; gap: 8px;
}
.fxad-info-row code {
  font-family: 'JetBrains Mono', monospace; font-size: .7rem;
  color: #a78bfa; background: rgba(124,58,237,.1);
  padding: 2px 7px; border-radius: 5px;
}

/* Empty state */
.fxad-empty {
  padding: 20px 0; text-align: center;
  font-size: .82rem; color: #2d3248;
}

/* Access denied */
.fxad-deny {
  padding: 40px; text-align: center;
  font-size: .88rem; color: #4e566e;
}

/* ══════════════════════════════════════════
   PHASE 6 — ECOSYSTEM BAR & ACTIVITY FEED
══════════════════════════════════════════ */

/* Ecosystem status bar */
.fxg-ecosystem-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; margin-bottom: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  font-size: .78rem; color: #4e566e;
  flex-wrap: wrap;
}
.fxg-eco-stat {
  display: flex; align-items: center; gap: 6px;
  color: #7878a0;
}
.fxg-eco-stat--right { margin-left: auto; }
.fxg-eco-dot {
  width: 7px; height: 7px; border-radius: 50%;
  flex-shrink: 0;
}
.fxg-eco-dot.online {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34,197,94,.7);
  animation: fxEcoPulse 2s ease-in-out infinite;
}
.fxg-eco-dot.rooms {
  background: #a78bfa;
  box-shadow: 0 0 6px rgba(167,139,250,.6);
}
@keyframes fxEcoPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .5; transform: scale(.7); }
}
.fxg-eco-alive {
  color: #22c55e; font-weight: 600;
}
#fxHubOnline {
  color: #e8e8f2; font-weight: 700;
}

/* Activity feed section */
.fxact-section {
  margin-bottom: 20px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  overflow: hidden;
}
.fxact-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  font-size: .78rem; font-weight: 600;
  color: #7878a0; letter-spacing: .5px; text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.fxact-pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239,68,68,.8);
  animation: fxPulseRed 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes fxPulseRed {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.65); }
}
.fxact-feed { padding: 6px 0; }
.fxact-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px;
  transition: background .15s;
  animation: fxActSlideIn .3s ease;
}
.fxact-item:hover { background: rgba(255,255,255,.03); }
@keyframes fxActSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fxact-icon {
  font-size: 1.1rem; flex-shrink: 0; width: 26px; text-align: center;
}
.fxact-body {
  flex: 1; font-size: .82rem; color: #7878a0;
  line-height: 1.4;
}
.fxact-name {
  color: #e8e8f2; font-weight: 600;
}
.fxact-detail { color: #7878a0; }
.fxact-ago {
  font-size: .72rem; color: #2d3248;
  white-space: nowrap; flex-shrink: 0;
}
.fxact-empty {
  padding: 20px 16px; text-align: center;
  font-size: .82rem; color: #2d3248;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════
   ╔═══════════════════════════════════════════════════════════════════╗
   ║  WEB MONOPOLY — "PAPAN HANGAT" THEME OVERRIDE                      ║
   ║  Cozy board-game night · wood + cream paper + ink · tactile pieces ║
   ║  Concept: a warm wooden tray lit by a hanging lamp, sitting in     ║
   ║  the dim (dark) room of the page. Overrides the old glass/purple.  ║
   ║  Appended last → wins the cascade without touching legacy rules.   ║
   ╚═══════════════════════════════════════════════════════════════════╝
═══════════════════════════════════════════════════════════════════════ */
.fxmu-root {
  /* ── Cozy palette ── */
  --ph-wood-dark:  #3B2615;
  --ph-wood:       #6B4A2B;
  --ph-wood-edge:  #2A1B0E;
  --ph-paper:      #FBF3E0;
  --ph-paper-2:    #F4E8CC;
  --ph-paper-hi:   #FFFCF4;
  --ph-paper-edge: #E2D1A8;
  --ph-paper-line: #E7D9B6;
  --ph-ink:        #2E2317;
  --ph-ink-soft:   #6F5C44;
  --ph-ink-faint:  #A7937A;
  --ph-brick:      #B5462F;
  --ph-brick-hi:   #C9573E;
  --ph-brick-deep: #7E2C1A;
  --ph-green:      #2E6B45;
  --ph-green-hi:   #37804F;
  --ph-green-deep: #1C4A2E;
  --ph-gold:       #B07D27;
  --ph-gold-deep:  #8A5F18;
  --ph-mustard:    #D9A441;
  --ph-shadow:     rgba(43,27,14,.28);

  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--ph-ink);
  margin-top: 18px;
  /* ── The wooden tray under a warm lamp ── */
  padding: 22px 20px 26px;
  border-radius: 22px;
  background:
    radial-gradient(ellipse 70% 42% at 50% -6%, rgba(255,210,128,.30), transparent 62%),
    repeating-linear-gradient(91deg, rgba(0,0,0,.05) 0 2px, transparent 2px 8px),
    repeating-linear-gradient(90deg, rgba(255,240,210,.04) 0 1px, transparent 1px 13px),
    linear-gradient(118deg, #5b3d22 0%, #6e4d2d 38%, #573a20 74%, #432c18 100%);
  border: 1px solid var(--ph-wood-edge);
  box-shadow:
    inset 0 1px 0 rgba(255,225,180,.18),
    inset 0 0 60px rgba(0,0,0,.30),
    0 22px 50px rgba(0,0,0,.5);
}

/* ── Headings & flavor (hand-drawn warmth) ── */
.fxmu-lobby-title,
.fxmu-ended-banner h2 {
  font-family: 'Fredoka', sans-serif; font-weight: 700;
  color: var(--ph-paper); letter-spacing: 0;
  text-shadow: 0 2px 0 rgba(0,0,0,.28);
}
.fxmu-lobby-eyebrow,
.fxmu-wr-label {
  font-family: 'Caveat', cursive; font-weight: 700;
  font-size: 1.15rem; letter-spacing: 0; text-transform: none;
  color: #F2D9A0;
}
.fxmu-lobby-sub { color: #E8D9BC; }

/* Panel headers → small hand-lettered tabs */
.fxmu-rooms-hd, .fxmu-wr-players-hd, .fxmu-props-hd, .fxmu-feed-hd {
  font-family: 'Caveat', cursive; font-weight: 700;
  font-size: 1.02rem; letter-spacing: 0; text-transform: none;
  color: var(--ph-ink-soft);
  border-bottom-color: var(--ph-paper-line);
}

/* ── Paper card surfaces (everything that was glass) ── */
.fxmu-rooms-panel, .fxmu-wr-players, .fxmu-feed,
.fxmu-action-zone, .fxmu-props-panel, .fxmu-pcard,
.fxmu-result-list, .fxmu-ended-banner, .fxmu-notice {
  background: linear-gradient(180deg, var(--ph-paper), var(--ph-paper-2));
  border: 1px solid var(--ph-paper-edge);
  border-radius: 14px;
  box-shadow: 0 7px 16px var(--ph-shadow), inset 0 1px 0 var(--ph-paper-hi);
  color: var(--ph-ink);
}
.fxmu-notice { color: var(--ph-ink-soft); }

/* Row dividers on paper */
.fxmu-room-row, .fxmu-wr-player, .fxmu-prop-row, .fxmu-result-row {
  border-bottom-color: var(--ph-paper-line);
}
.fxmu-room-row:hover { background: rgba(176,125,39,.10); }

/* ── Text recolor (cool greys → warm ink) ── */
.fxmu-room-host, .fxmu-room-count, .fxmu-pcard-pos,
.fxmu-empty-rooms, .fxmu-props-empty, .fxmu-feed-empty,
.fxmu-wr-hint, .fxmu-waiting-txt, .fxmu-wr-share,
.fxmu-turn-other, .fxmu-turn-num { color: var(--ph-ink-faint); }
.fxmu-prop-name, .fxmu-pcard-name, .fxmu-wr-name,
.fxmu-result-name, .fxmu-action-prompt { color: var(--ph-ink); }
.fxmu-feed-entry { color: var(--ph-ink-faint); border-bottom-color: rgba(231,217,182,.6); }
.fxmu-feed-entry.fxmu-feed-latest { color: var(--ph-ink); font-weight: 700; }

/* ── Tactile push-buttons (wooden candy tiles) ── */
.fxmu-btn {
  font-family: 'Fredoka', sans-serif; font-weight: 600; letter-spacing: .01em;
  background: linear-gradient(180deg, #FFFDF6, #EFE2C4);
  color: var(--ph-ink);
  border: 1px solid var(--ph-paper-edge); border-radius: 13px;
  box-shadow: 0 3px 0 #D9C499, 0 4px 9px var(--ph-shadow);
  transition: transform .08s ease, box-shadow .08s ease, background .15s;
}
.fxmu-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #D9C499, 0 7px 13px var(--ph-shadow);
  background: linear-gradient(180deg, #FFFFFF, #F3E7CB);
}
.fxmu-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #D9C499, 0 2px 5px var(--ph-shadow);
}
.fxmu-btn-primary {
  background: linear-gradient(180deg, var(--ph-brick-hi), var(--ph-brick));
  color: #FFF3EC; border-color: var(--ph-brick-deep);
  box-shadow: 0 3px 0 var(--ph-brick-deep), 0 5px 11px rgba(126,44,26,.4);
}
.fxmu-btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #D2604A, var(--ph-brick-hi));
  box-shadow: 0 4px 0 var(--ph-brick-deep), 0 8px 15px rgba(126,44,26,.45);
}
.fxmu-btn-primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--ph-brick-deep), 0 2px 6px rgba(126,44,26,.4); }
.fxmu-btn-gold {
  background: linear-gradient(180deg, var(--ph-mustard), #C68F2E);
  color: #4A330B; border-color: var(--ph-gold-deep);
  box-shadow: 0 3px 0 var(--ph-gold-deep), 0 5px 11px rgba(138,95,24,.36);
}
.fxmu-btn-gold:hover:not(:disabled) { background: linear-gradient(180deg, #E4B254, #D29B36); }
.fxmu-btn-gold:active:not(:disabled) { box-shadow: 0 1px 0 var(--ph-gold-deep), 0 2px 6px rgba(138,95,24,.36); }
.fxmu-btn-green, .fxmu-btn-roll {
  background: linear-gradient(180deg, var(--ph-green-hi), var(--ph-green));
  color: #F2FBF4; border-color: var(--ph-green-deep);
  box-shadow: 0 3px 0 var(--ph-green-deep), 0 5px 11px rgba(28,74,46,.4);
}
.fxmu-btn-green:hover:not(:disabled), .fxmu-btn-roll:hover:not(:disabled) {
  background: linear-gradient(180deg, #3E9159, var(--ph-green-hi));
  box-shadow: 0 4px 0 var(--ph-green-deep), 0 8px 15px rgba(28,74,46,.45);
}
.fxmu-btn-green:active:not(:disabled), .fxmu-btn-roll:active:not(:disabled) { box-shadow: 0 1px 0 var(--ph-green-deep), 0 2px 6px rgba(28,74,46,.4); }
.fxmu-btn-ghost {
  background: transparent; border-color: rgba(255,240,210,.22); color: #E8D9BC; box-shadow: none;
}
.fxmu-btn-ghost:hover:not(:disabled) { color: #FFF6E4; border-color: rgba(255,240,210,.4); background: rgba(255,240,210,.06); transform: translateY(-1px); }
.fxmu-prop-sell {
  background: rgba(181,70,47,.1); border-color: rgba(181,70,47,.3); color: var(--ph-brick);
}
.fxmu-prop-sell:hover { background: rgba(181,70,47,.22); }
.fxmu-copy-btn {
  background: rgba(176,125,39,.14); border-color: rgba(176,125,39,.4); color: var(--ph-gold-deep);
}
.fxmu-copy-btn:hover { background: rgba(176,125,39,.26); }
.fxmu-refresh { color: var(--ph-ink-faint); }
.fxmu-refresh:hover { color: var(--ph-brick); }

/* ── Codes & money → friendly Fredoka, not techy mono ── */
.fxmu-code-display, .fxmu-room-code {
  font-family: 'Fredoka', sans-serif; font-weight: 700;
}
.fxmu-code-display { color: var(--ph-gold-deep); text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.fxmu-room-code { color: var(--ph-brick); }
.fxmu-code-input {
  font-family: 'Fredoka', sans-serif; font-weight: 600;
  background: var(--ph-paper-hi); border: 1px solid var(--ph-paper-edge);
  color: var(--ph-ink);
}
.fxmu-code-input:focus { border-color: var(--ph-gold); }
.fxmu-code-input::placeholder { color: var(--ph-ink-faint); }
.fxmu-pcard-money, .fxmu-result-worth, .fxmu-turn-num, .fxmu-timer {
  font-family: 'Nunito', sans-serif; font-weight: 800; font-variant-numeric: tabular-nums;
}
.fxmu-pcard-money { color: var(--ph-green); }
.fxmu-result-worth { color: var(--ph-green); }

/* ── Turn banner: warm "your turn!" lamp instead of purple glow ── */
.fxmu-turn-banner {
  background: linear-gradient(180deg, var(--ph-paper), var(--ph-paper-2));
  border: 1px solid var(--ph-paper-edge); border-radius: 14px;
  box-shadow: 0 6px 14px var(--ph-shadow), inset 0 1px 0 var(--ph-paper-hi);
}
.fxmu-turn-banner.fxmu-my-turn {
  background: linear-gradient(180deg, #FBEFD2, #F6E4B6);
  border-color: var(--ph-mustard);
  box-shadow: 0 0 0 1px rgba(217,164,65,.4), 0 8px 20px rgba(176,125,39,.28);
  animation: fxmuWarmGlow 2.4s ease-in-out infinite;
}
@keyframes fxmuWarmGlow {
  0%,100% { box-shadow: 0 0 0 1px rgba(217,164,65,.35), 0 6px 16px rgba(176,125,39,.2); }
  50%     { box-shadow: 0 0 0 2px rgba(217,164,65,.55), 0 10px 26px rgba(176,125,39,.34); }
}
.fxmu-turn-you  { color: var(--ph-brick-deep); font-family: 'Fredoka', sans-serif; font-weight: 700; }
.fxmu-pending-badge { background: rgba(176,125,39,.16); color: var(--ph-gold-deep); }
.fxmu-inflation-badge { background: rgba(181,70,47,.12); border-color: rgba(181,70,47,.28); color: var(--ph-brick); }

/* ── Badges ── */
.fxmu-badge-host { background: rgba(176,125,39,.18); color: var(--ph-gold-deep); }
.fxmu-badge-me   { background: rgba(46,107,69,.16);  color: var(--ph-green-deep); }
.fxmu-pcard-name em { color: var(--ph-brick); }
.fxmu-result-name em { color: var(--ph-brick); }

/* ── Player cards — active player gets a warm spotlight + gentle bob ── */
.fxmu-pcard-active {
  background: linear-gradient(180deg, #FBEFD2, #F4E0B2);
  border-color: var(--ph-mustard);
  box-shadow: inset 0 0 0 1px rgba(217,164,65,.4), 0 6px 16px rgba(176,125,39,.26);
  animation: fxmuPcardBob 2.6s ease-in-out infinite;
}
@keyframes fxmuPcardBob {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-2px); }
}
.fxmu-pcard-me { border-color: rgba(46,107,69,.4); }
.fxmu-pcard-active.fxmu-pcard-me { border-color: var(--ph-mustard); }

/* ── Tokens as glossy physical pieces (top highlight + table shadow) ── */
.fxmu-board-tok, .fxmu-pcard-tok, .fxmu-wr-tok, .fxmu-result-tok, .fxmu-room-tok {
  border: 1.5px solid rgba(255,255,255,.55);
  box-shadow:
    inset 0 2px 3px rgba(255,255,255,.55),
    inset 0 -2px 4px rgba(0,0,0,.35),
    0 3px 5px rgba(43,27,14,.45);
}
.fxmu-empty-tok {
  background: rgba(110,77,45,.12) !important; color: var(--ph-ink-faint);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.12);
}

/* ── Emoji pawn fallback (used when player has no profile photo) ── */
.fxmu-tok-emoji {
  font-size: 12px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.5));
  pointer-events: none; user-select: none;
}
@media (max-width: 520px) {
  .fxmu-tok-emoji { font-size: 9px; }
}

/* ── Board: wooden frame via box-shadow RING (outside the box, so it never
   eats into the fixed-size board image like a `border` would) ── */
.fxmu-board-wrap {
  border: none;
  border-radius: 12px;
  box-shadow:
    0 0 0 8px #4a3119,
    0 0 0 10px #2a1b0e,
    inset 0 0 0 2px rgba(255,225,180,.12),
    0 16px 34px rgba(0,0,0,.5);
  background: #4a3119;
}

/* Active token glow → warm amber */
.fxmu-board-tok.fxmu-tok-active { animation: fxmuTokPulseWarm 1.8s ease-in-out infinite; }
@keyframes fxmuTokPulseWarm {
  0%,100% { box-shadow: 0 0 0 2px var(--tok-col,#B5462F), 0 0 8px var(--tok-col,#B5462F), 0 3px 5px rgba(43,27,14,.45); }
  50%     { box-shadow: 0 0 0 4px var(--tok-col,#B5462F), 0 0 18px var(--tok-col,#B5462F), 0 3px 6px rgba(43,27,14,.5); }
}

/* ── Dice → warm ivory with ink pips ── */
.fxmu-die {
  background: linear-gradient(150deg, #FFFBF0 0%, #EBDFC4 100%);
  box-shadow: 0 2px 0 #C9B891, 0 5px 14px rgba(43,27,14,.4), inset 0 1px 0 rgba(255,255,255,.95);
}
.fxmu-pip.fxmu-pip-on { background: var(--ph-ink); }
.fxmu-dice-total { color: #FFE6A6; }

/* ── Event feed → ruled notebook paper ── */
.fxmu-feed-body {
  background:
    repeating-linear-gradient(180deg, transparent 0 27px, rgba(231,217,182,.55) 27px 28px);
}
.fxmu-feed-body::-webkit-scrollbar-thumb { background: rgba(176,125,39,.4); }

/* ── Inputs / selects ── */
.fxmu-dest-select {
  background: var(--ph-paper-hi); border: 1px solid var(--ph-paper-edge); color: var(--ph-ink);
}
.fxmu-dest-select:focus { border-color: var(--ph-gold); }
.fxmu-action-prompt strong { color: var(--ph-brick); }
.fxmu-prop-bldg { color: var(--ph-gold-deep); }

/* ── Spinner & status → warm ── */
.fxmu-spin { border-color: rgba(176,125,39,.25); border-top-color: var(--ph-brick); }
.fxmu-loading { color: #E8D9BC; }
.fxmu-err { background: rgba(181,70,47,.12); border-color: rgba(181,70,47,.3); color: #FBEFEA; }
.fxmu-gold { color: var(--ph-gold-deep); }

/* ── Ended screen: winner = golden certificate ── */
.fxmu-ended-banner.fxmu-won {
  background: linear-gradient(180deg, #FBEAC0, #F3D98E);
  border-color: var(--ph-mustard);
  box-shadow: 0 8px 22px rgba(176,125,39,.3), inset 0 1px 0 rgba(255,255,255,.7);
}
.fxmu-ended-banner.fxmu-won h2 { color: var(--ph-brick-deep); }
.fxmu-ended-emoji { animation: fxmuTrophyPop .6s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes fxmuTrophyPop {
  0%   { transform: scale(0) rotate(-18deg); opacity: 0; }
  70%  { transform: scale(1.25) rotate(8deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}
.fxmu-result-row.fxmu-result-me { background: rgba(46,107,69,.08); }

/* ── Playful entrance: cards pop in on load ── */
.fxmu-lobby .fxmu-rooms-panel,
.fxmu-lobby .fxmu-lobby-actions,
.fxmu-waiting .fxmu-wr-players,
.fxmu-ended .fxmu-result-list {
  animation: fxmuCardPop .42s cubic-bezier(.34,1.56,.64,1) both;
}
.fxmu-lobby .fxmu-rooms-panel { animation-delay: .08s; }
@keyframes fxmuCardPop {
  0%   { opacity: 0; transform: translateY(10px) scale(.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .fxmu-turn-banner.fxmu-my-turn,
  .fxmu-pcard-active,
  .fxmu-board-tok.fxmu-tok-active,
  .fxmu-ended-emoji,
  .fxmu-lobby .fxmu-rooms-panel,
  .fxmu-lobby .fxmu-lobby-actions,
  .fxmu-waiting .fxmu-wr-players,
  .fxmu-ended .fxmu-result-list { animation: none; }
}

/* ── Create-Room modal → a cream note card pinned to the table ── */
.fxmu-create-modal {
  background: linear-gradient(180deg, var(--ph-paper), var(--ph-paper-2));
  border: 1px solid var(--ph-paper-edge);
  box-shadow: 0 10px 24px var(--ph-shadow), inset 0 1px 0 var(--ph-paper-hi);
  backdrop-filter: none;
}
.fxmu-create-hd {
  color: var(--ph-ink); font-family: 'Fredoka', sans-serif; font-weight: 600;
  border-bottom-color: var(--ph-paper-line);
}
.fxmu-create-close { color: var(--ph-ink-faint); }
.fxmu-create-close:hover { color: var(--ph-brick); background: rgba(181,70,47,.1); }
.fxmu-create-label {
  font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.02rem;
  letter-spacing: 0; text-transform: none; color: var(--ph-ink-soft);
}
.fxmu-create-input {
  background: var(--ph-paper-hi); border: 1px solid var(--ph-paper-edge); color: var(--ph-ink);
}
.fxmu-create-input:focus { border-color: var(--ph-gold); }
.fxmu-create-input::placeholder { color: var(--ph-ink-faint); }

/* Player-count pills → little wooden chips, active chip = board green */
.fxmu-pill {
  font-family: 'Fredoka', sans-serif; font-weight: 600;
  background: linear-gradient(180deg, #FFFDF6, #EFE2C4);
  border: 1px solid var(--ph-paper-edge); color: var(--ph-ink-soft);
  box-shadow: 0 2px 0 #D9C499;
  transition: transform .08s, box-shadow .08s, background .15s, color .15s;
}
.fxmu-pill:hover:not(.active) { color: var(--ph-ink); border-color: var(--ph-gold); transform: translateY(-1px); }
.fxmu-pill.active {
  background: linear-gradient(180deg, var(--ph-green-hi), var(--ph-green));
  border-color: var(--ph-green-deep); color: #F2FBF4;
  box-shadow: 0 2px 0 var(--ph-green-deep);
}
.fxmu-pill:active { transform: translateY(1px); }

/* Visibility toggle: active = brick red */
.fxmu-vis-toggle { border-color: var(--ph-paper-edge); }
.fxmu-vis-btn { color: var(--ph-ink-soft); font-family: 'Fredoka', sans-serif; font-weight: 500; }
.fxmu-vis-btn.active { background: linear-gradient(180deg, var(--ph-brick-hi), var(--ph-brick)); color: #FFF3EC; }
.fxmu-vis-btn:hover:not(.active) { color: var(--ph-ink); }

/* Mobile: trim the wooden tray padding so the board still fits */
@media (max-width: 760px) {
  .fxmu-root { padding: 16px 12px 20px; border-radius: 16px; }
}

/* ══════════════════════════════════════════════════════════════════
   FINANCE — Business mode (Pribadi / Bisnis toggle + business ledger)
══════════════════════════════════════════════════════════════════ */
.fxbiz-modetog { margin-bottom: 14px; }
.fxbiz-periodtog { margin-bottom: 14px; max-width: 280px; }
/* 5 kind buttons need to wrap (the personal .type-tog is a 2-col grid) */
.fxbiz-kindtog {
  display: flex; flex-wrap: wrap; gap: 8px; grid-template-columns: none;
}
.fxbiz-kindbtn { flex: 1 1 auto; white-space: nowrap; }
/* ACTIVE state for the business toggles — personal CSS only styles
   .on-income/.on-expense, so plain .on had no highlight (looked unclickable). */
.fxbiz-kindbtn.on,
.fxbiz-curtog .type-btn.on {
  background: var(--p1, #7c3aed); color: #fff;
  box-shadow: 0 2px 8px rgba(124,58,237,.4);
}
/* Amount row: currency toggle + amount field side by side */
.fxbiz-amt-row { display: flex; gap: 8px; align-items: stretch; }
.fxbiz-amt-row .f-in { flex: 1; }
.fxbiz-curtog { flex: 0 0 auto; }
.fxbiz-curtog .type-btn { flex: 0 0 auto; min-width: 40px; }
/* Live USD→IDR conversion hint */
.fxbiz-conv {
  font-size: .74rem; color: var(--text2, #94a3b8);
  margin: -4px 2px 2px; font-weight: 600;
}
/* little category pill on each business row */
.fxbiz-tag {
  display: inline-block; font-size: .64rem; font-weight: 600;
  padding: 1px 7px; margin-left: 4px; border-radius: 999px;
  background: rgba(124,58,237,.16); color: #a78bfa; vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════════════════════
   HOME COMMAND CENTER (2026-06-12) — hero band aurora + bento grid 12 kolom
   Spec: docs/superpowers/specs/2026-06-12-home-command-center-design.md
   ═══════════════════════════════════════════════════════════════════════ */
.home-hero{position:relative;overflow:hidden;border-radius:20px;padding:26px 26px 20px;margin-bottom:16px;
  background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.015)),#0b0d1d;
  border:1px solid rgba(124,58,237,.28);
  box-shadow:0 24px 70px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.07);}
.hh-aurora{position:absolute;inset:-40%;pointer-events:none;filter:blur(46px);opacity:.55;
  background:
    radial-gradient(38% 42% at 18% 32%,rgba(124,58,237,.55),transparent 70%),
    radial-gradient(34% 38% at 82% 24%,rgba(6,182,212,.40),transparent 70%),
    radial-gradient(30% 36% at 60% 88%,rgba(236,72,153,.30),transparent 72%);
  animation:hhAurora 16s ease-in-out infinite alternate;}
@keyframes hhAurora{
  from{transform:translate3d(-3%,-2%,0) rotate(-2deg) scale(1);}
  to{transform:translate3d(3%,3%,0) rotate(2.5deg) scale(1.08);}}
.home-hero>*:not(.hh-aurora){position:relative;z-index:1;}
.hh-top{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;flex-wrap:wrap;}
.hh-greet{font-family:'Syne',sans-serif;font-size:clamp(1.5rem,3.2vw,2.15rem);font-weight:800;color:#fff;letter-spacing:-.5px;}
.hh-sub{color:#9ca3c7;font-size:.92rem;margin-top:4px;}
.hh-ctas{display:flex;gap:10px;flex-wrap:wrap;}
.hh-btn{display:inline-flex;align-items:center;gap:8px;padding:10px 18px;border-radius:12px;cursor:pointer;
  background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.12);
  color:#e7e9ee;font-weight:600;font-size:.86rem;white-space:nowrap;
  transition:all .25s cubic-bezier(.22,1,.36,1);}
.hh-btn svg{width:16px;height:16px;}
.hh-btn:hover{background:rgba(124,58,237,.16);border-color:rgba(124,58,237,.45);transform:translateY(-1px);}
.hh-btn.solid{background:linear-gradient(135deg,#7C3AED,#06B6D4);border-color:transparent;color:#fff;
  box-shadow:0 6px 18px rgba(124,58,237,.35);}
.hh-btn.solid:hover{box-shadow:0 10px 26px rgba(124,58,237,.5);}
.hh-id{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin-top:18px;
  padding:12px 14px;border-radius:14px;background:rgba(5,6,16,.5);
  border:1px solid rgba(255,255,255,.08);backdrop-filter:blur(8px);}
.hh-id-left{display:flex;align-items:center;gap:12px;min-width:0;}
.hh-id-meta{min-width:0;}
.hh-id-label{font-size:.64rem;letter-spacing:2px;text-transform:uppercase;color:#7c7c9a;}
.hh-id-val{font-family:'JetBrains Mono',monospace;font-weight:600;color:#e7e9ee;font-size:.95rem;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.hh-id .frx-tier-badge{flex:none;}
.hh-id-right{display:flex;gap:8px;flex:none;}

.home-bento{display:grid;grid-template-columns:repeat(12,1fr);gap:14px;}
.home-bento>*{margin:0 !important;min-width:0;}
.home-bento>.home-launch-card{grid-column:span 3;}
.home-bento>.bento-ai{grid-column:span 8;}
.home-bento>.bento-online{grid-column:span 4;}
.home-bento>.bento-pm{grid-column:span 4;}
.home-bento>.bento-half{grid-column:span 6;}
.home-launch-ic svg{width:20px;height:20px;}
.pm-ic svg{width:20px;height:20px;}

/* Entrance stagger — transform/opacity only, urutan via --i di markup */
#page-home.on .home-hero{animation:hhRise .5s cubic-bezier(.22,1,.36,1) both;}
#page-home.on .home-bento>*{animation:hhRise .5s cubic-bezier(.22,1,.36,1) both;
  animation-delay:calc(var(--i,0)*40ms);}
@keyframes hhRise{from{opacity:0;transform:translateY(14px);}to{opacity:1;transform:none;}}
@media(prefers-reduced-motion:reduce){
  .hh-aurora{animation:none;}
  #page-home.on .home-hero,#page-home.on .home-bento>*{animation:none;}}

@media(max-width:1024px){
  .home-bento>.bento-ai,.home-bento>.bento-online{grid-column:span 12;}
  .home-bento>.home-launch-card{grid-column:span 6;}
}
@media(max-width:768px){
  .home-bento>*{grid-column:span 12 !important;}
  .home-bento>.home-launch-card{grid-column:span 6 !important;}
  .home-bento>.bento-pm{grid-column:span 12 !important;}
  .home-hero{padding:20px 16px 16px;}
}

/* ══════════════════════════════════════════════════════════════
   FX SIMPLE MODE — simple by default (spec 2026-06-12)
══════════════════════════════════════════════════════════════ */
.page.fx-simple [data-adv] { display: none !important; }
#page-finance.fx-simple .fxbiz-modetog,
#page-finance.fx-simple #fxbizPanel { display: none !important; }
.fxsm-hide { display: none !important; }

/* Quick Add */
.fxq-card {
  margin: 14px 0 16px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background:
    radial-gradient(circle at 15% 0%, rgba(34,211,238,.10), transparent 40%),
    linear-gradient(180deg, rgba(12,14,29,.82), rgba(7,8,18,.62));
}
.fxq-row { display: flex; gap: 10px; }
.fxq-in {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  color: var(--text1, #f4f7fb);
  font-size: 1rem;
}
.fxq-in:focus { outline: none; border-color: rgba(34,211,238,.4); }
.fxq-btn {
  width: 50px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
  color: #061019;
  font-size: 1.5rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease;
}
.fxq-btn:hover { transform: translateY(-1px); }
.fxq-fb {
  display: none;
  margin-top: 8px;
  color: #f5c842;
  font-size: .8rem;
}
.fxq-fb.show { display: block; animation: fxqFbIn .2s ease; }
@keyframes fxqFbIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.fxq-chips { display: none; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.fxq-chips.show { display: flex; }
.fxq-chip {
  padding: 8px 13px;
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--text2, #8e96b2);
  font-size: .8rem;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.fxq-chip:hover { border-color: rgba(34,211,238,.45); color: #e8edf8; }

/* Tombol Tampilkan/Sembunyikan detail */
.fxsm-toggle {
  display: block;
  width: 100%;
  margin: 14px 0;
  padding: 11px;
  border: 1px dashed rgba(255,255,255,.14);
  border-radius: 12px;
  background: transparent;
  color: var(--text3, #7f89a6);
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.fxsm-toggle:hover { border-color: rgba(34,211,238,.35); color: #d8def0; }

/* Panel "Mulai dari sini" (Dashboard) — hidden default, tampil saat .fx-simple */
.fxsm-start { display: none; }
#page-dashboard.fx-simple .fxsm-start {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
  padding: 26px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at 80% 0%, rgba(124,58,237,.14), transparent 36%),
    linear-gradient(180deg, rgba(11,13,28,.84), rgba(6,7,16,.48));
}
.fxsm-start-title { font-family: 'Syne', sans-serif; font-size: 1.4rem; font-weight: 800; color: #f4f7fb; }
.fxsm-start-sub { color: var(--text2, #8e96b2); font-size: .9rem; margin-top: -6px; }
.fxsm-steps { display: flex; flex-direction: column; gap: 10px; }
.fxsm-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 13px;
  background: rgba(255,255,255,.045);
  color: #e8edf8;
  font-size: .92rem;
  text-align: left;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}
.fxsm-step:hover { transform: translateY(-1px); border-color: rgba(34,211,238,.3); }
.fxsm-step-n {
  flex: 0 0 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
  color: #061019;
  font-weight: 800;
  font-size: .8rem;
}
.fxsm-step-go { margin-left: auto; color: var(--text3, #7f89a6); }

/* Friends: kartu Share ID full-width di atas + CTA chat kosong */
.fxsm-invite-top { grid-column: 1 / -1; }
.fxsm-req-subhead {
  margin: 14px 0 6px;
  color: var(--text3, #7f89a6);
  font-family: 'JetBrains Mono', monospace;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.fxsm-cta { margin-top: 10px; }

/* ══════════════════════════════════════════════════════════════
   GAMES HUB BENTO — command center (spec 2026-06-12)
══════════════════════════════════════════════════════════════ */
.fxgh-slim{display:flex;align-items:flex-end;gap:18px;padding:4px 2px 16px;}
.fxgh-slim .fxg-eyebrow{margin-bottom:5px;}
.fxgh-title{margin:0;color:#f4f7fb;font-family:'Syne',sans-serif;font-size:1.6rem;font-weight:800;line-height:1;}
.fxgh-pill{margin-left:auto;display:inline-flex;align-items:center;gap:7px;color:#34d399;
  font-family:'JetBrains Mono',monospace;font-size:.68rem;font-weight:700;letter-spacing:.06em;
  padding:6px 12px;border:1px solid rgba(52,211,153,.3);border-radius:999px;background:rgba(52,211,153,.08);white-space:nowrap;}
.fxgh-pill-dot{width:7px;height:7px;border-radius:50%;background:#34d399;box-shadow:0 0 10px #34d399;}

.fxgh-bento{display:grid;grid-template-columns:repeat(12,1fr);gap:14px;}
.fxgh-tile{position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:flex-end;gap:6px;
  min-width:0;min-height:128px;padding:18px;border:1px solid rgba(255,255,255,.08);border-radius:16px;
  background:linear-gradient(180deg,rgba(12,14,29,.82),rgba(7,8,18,.62));
  color:#fff;text-align:left;box-shadow:0 18px 54px rgba(0,0,0,.18);}
button.fxgh-tile{cursor:pointer;transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease;}
button.fxgh-tile:hover{transform:translateY(-3px);box-shadow:0 24px 70px rgba(0,0,0,.28);}
.fxgh-glow{position:absolute;inset:0 0 auto 0;height:2px;pointer-events:none;}
.fxgh-status{font-family:'JetBrains Mono',monospace;font-size:.62rem;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:#7f89a6;}
.fxgh-name{display:flex;align-items:center;gap:9px;color:#f4f7fb;font-family:'Syne',sans-serif;font-size:1.3rem;font-weight:800;line-height:1.15;}
.fxgh-name svg{width:20px;height:20px;flex:0 0 auto;}
.fxgh-name-sm{font-size:.95rem;color:#aab2cc;}
.fxgh-desc{color:#8e96b2;font-size:.8rem;line-height:1.55;font-weight:500;}
.fxgh-livehead{display:flex;align-items:center;gap:8px;color:#aab2cc;font-family:'JetBrains Mono',monospace;
  font-size:.64rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;margin-bottom:4px;}

/* ── identitas warna per game ── */
.fxgh-isle{grid-column:span 8;grid-row:span 2;min-height:300px;border-color:rgba(52,211,153,.42);
  background:radial-gradient(circle at 75% 8%,rgba(52,211,153,.34),transparent 52%),
    linear-gradient(180deg,rgba(13,42,38,.55),rgba(5,10,9,.88));}
.fxgh-isle .fxgh-glow{background:linear-gradient(90deg,transparent,#34d399,transparent);}
.fxgh-isle .fxgh-status{color:#34d399;}
.fxgh-isle .fxgh-name{font-size:2rem;color:#eafff6;}
.fxgh-isle .fxgh-name svg{width:28px;height:28px;color:#34d399;}
.fxgh-isle:hover{border-color:rgba(52,211,153,.6);}
.fxgh-play{margin-top:8px;align-self:flex-start;color:#04110c;background:linear-gradient(135deg,#34d399,#22d3ee);
  border-radius:9px;padding:9px 16px;font-family:'JetBrains Mono',monospace;font-size:.66rem;font-weight:900;letter-spacing:.1em;text-transform:uppercase;}

.fxgh-gold{grid-column:span 4;border-color:rgba(245,200,66,.4);
  background:radial-gradient(circle at 85% -20%,rgba(245,200,66,.28),transparent 55%),linear-gradient(180deg,rgba(20,17,8,.9),rgba(10,9,5,.72));}
.fxgh-gold .fxgh-glow{background:linear-gradient(90deg,transparent,#f5c842,transparent);}
.fxgh-gold .fxgh-status{color:#f5c842;}
.fxgh-gold .fxgh-name svg{color:#f5c842;}
.fxgh-gold:hover{border-color:rgba(245,200,66,.55);}

.fxgh-cyan{grid-column:span 4;border-color:rgba(34,211,238,.38);
  background:radial-gradient(circle at 85% -20%,rgba(34,211,238,.24),transparent 55%),linear-gradient(180deg,rgba(7,16,20,.9),rgba(4,9,12,.72));}
.fxgh-cyan .fxgh-glow{background:linear-gradient(90deg,transparent,#22d3ee,transparent);}
.fxgh-cyan .fxgh-status{color:#22d3ee;}
.fxgh-cyan .fxgh-name svg{color:#22d3ee;}
.fxgh-cyan:hover{border-color:rgba(34,211,238,.55);}

.fxgh-purp{grid-column:span 4;border-color:rgba(167,139,250,.4);
  background:radial-gradient(circle at 85% -20%,rgba(167,139,250,.26),transparent 55%),linear-gradient(180deg,rgba(13,11,22,.9),rgba(8,7,14,.72));}
.fxgh-purp .fxgh-glow{background:linear-gradient(90deg,transparent,#a78bfa,transparent);}
.fxgh-purp .fxgh-status{color:#a78bfa;}
.fxgh-purp .fxgh-name svg{color:#a78bfa;}
.fxgh-purp:hover{border-color:rgba(167,139,250,.55);}

.fxgh-soon{grid-column:span 4;border-style:dashed;opacity:.85;}
.fxgh-soon .fxgh-name svg{color:#7f89a6;}
.fxgh-soon:hover{border-color:rgba(255,255,255,.2);opacity:1;}

/* ── tile live (non-game) ── */
.fxgh-eco{grid-column:span 4;justify-content:flex-start;}
.fxgh-act{grid-column:span 7;justify-content:flex-start;min-height:150px;}
.fxgh-pres{grid-column:span 5;justify-content:flex-start;min-height:150px;}

/* ── entrance stagger (reuse keyframes hhRise) ── */
#page-games.on .fxgh-slim{animation:hhRise .5s cubic-bezier(.22,1,.36,1) both;}
#page-games.on .fxgh-bento>*{animation:hhRise .5s cubic-bezier(.22,1,.36,1) both;animation-delay:calc(var(--i,0)*40ms);}
@media(prefers-reduced-motion:reduce){
  #page-games.on .fxgh-slim,#page-games.on .fxgh-bento>*{animation:none;}}

/* ── responsive ── */
@media(max-width:1024px){
  .fxgh-isle{grid-column:span 12;grid-row:span 1;min-height:230px;}
  .fxgh-gold,.fxgh-cyan,.fxgh-purp,.fxgh-soon,.fxgh-eco{grid-column:span 6;}
  .fxgh-act,.fxgh-pres{grid-column:span 12;}
}
@media(max-width:768px){
  .fxgh-isle{grid-column:span 12;min-height:200px;}
  .fxgh-isle .fxgh-name{font-size:1.5rem;}
  .fxgh-gold .fxgh-name,.fxgh-cyan .fxgh-name,.fxgh-purp .fxgh-name{font-size:0.82rem;flex-wrap:wrap;word-break:break-word;}
  .fxgh-gold,.fxgh-cyan,.fxgh-purp,.fxgh-soon{grid-column:span 6;}
  .fxgh-eco,.fxgh-act,.fxgh-pres{grid-column:span 12;}
  .fxgh-tile{padding:14px;}
  .fxgh-slim{flex-wrap:wrap;}
}
