:root {
  color-scheme: dark;
  --bg: #07080d;
  --panel: #101621;
  --panel-2: #161f2d;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f6f7fb;
  --muted: #a7b0c0;
  --green: #00f56a;
  --yellow: #ffe600;
  --orange: #ff8a00;
  --red: #ff263f;
  --violet: #8d35ff;
  --cyan: #55d6c2;
  --blue: #5aa5ff;
  --shadow: 0 18px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.45;
  background:
    linear-gradient(115deg, rgba(85, 214, 194, 0.16), transparent 32%),
    linear-gradient(245deg, rgba(255, 38, 63, 0.12), transparent 34%),
    linear-gradient(180deg, #06070c 0%, #101621 46%, #07090f 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 72%);
}

button,
input {
  font: inherit;
  min-width: 0;
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
  padding: 0 14px;
  background: linear-gradient(180deg, #222d3f, #141b28);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.26);
  background: #222c3d;
}

button:active {
  transform: translateY(0);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

button.primary-action {
  border: 0;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #07100e;
  font-weight: 800;
}

button.ghost-action {
  min-height: 36px;
  border-color: transparent;
  padding: 0;
  background: transparent;
  color: var(--cyan);
  justify-self: start;
  font-size: 0.84rem;
  font-weight: 800;
}

button.ghost-action:hover {
  background: transparent;
}

input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  min-height: 44px;
  background: rgba(5, 8, 14, 0.78);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(85, 214, 194, 0.12);
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  grid-template-rows: auto auto auto auto;
  gap: 16px;
  width: min(1500px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px;
}

.app-shell > * {
  min-width: 0;
}

.admin-shell {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
  width: min(1500px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px;
}

.command-panel,
.bubble-stage,
.rank-panel,
.network-panel,
.support-panel,
.admin-hero,
.admin-panel,
.admin-stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 21, 32, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.admin-hero {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(0, 245, 106, 0.12), transparent 32%),
    linear-gradient(235deg, rgba(141, 53, 255, 0.14), transparent 36%),
    rgba(15, 21, 32, 0.88);
}

.admin-hero h1 {
  margin: 4px 0 0;
  font-size: clamp(1.9rem, 3.2vw, 3.8rem);
  line-height: 1;
}

.admin-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  min-width: 124px;
  padding: 12px 16px;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.035);
}

.admin-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.admin-stat {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px;
}

.admin-stat span,
.admin-label,
.root-preview span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-stat strong {
  font-size: clamp(1.35rem, 2.3vw, 2.2rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.admin-layout {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
}

.admin-login {
  grid-column: 1 / -1;
}

.admin-panel {
  grid-column: span 6;
  min-width: 0;
  overflow: hidden;
  padding: 18px;
}

.admin-panel-wide {
  grid-column: 1 / -1;
}

.admin-layout > .admin-panel {
  grid-column: auto;
}

.admin-copy {
  color: var(--muted);
  line-height: 1.45;
  margin: 14px 0;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 8px;
}

.admin-login .admin-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(130px, auto);
}

.admin-login #adminMfaRow {
  grid-template-columns: minmax(0, 1fr) auto;
}

.admin-login #adminMfaRow[hidden] {
  display: none;
}

.admin-protected[hidden],
.admin-session[hidden] {
  display: none;
}

.admin-session {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.admin-session span {
  color: var(--muted);
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-session strong {
  display: block;
  margin-top: 3px;
}

.root-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.root-preview strong {
  font-size: 1.2rem;
}

.admin-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.admin-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
  overflow-wrap: anywhere;
}

.admin-payout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.admin-payout-card {
  --rank-a: rgba(85, 214, 194, 0.16);
  --rank-b: rgba(0, 245, 106, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  padding: 13px;
  background:
    linear-gradient(135deg, var(--rank-a), transparent 36%),
    linear-gradient(225deg, var(--rank-b), transparent 42%),
    rgba(8, 12, 20, 0.72);
}

.admin-payout-card div {
  min-width: 0;
}

.admin-payout-card span,
.admin-user-main > span,
.admin-user-meta > span,
.admin-user-email > span {
  color: var(--muted);
  display: block;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-payout-card strong,
.admin-user-meta strong {
  display: block;
  margin-top: 3px;
  font-size: 1rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.admin-state {
  color: var(--green);
}

.admin-state.yellow {
  color: var(--yellow);
}

.admin-state.orange {
  color: var(--orange);
}

.admin-state.red {
  color: var(--red);
}

.admin-state.purple,
.admin-state.burst {
  color: var(--violet);
}

.admin-stat strong.is-negative {
  color: var(--red);
}

.admin-ops-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.admin-ops-grid article {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  min-width: 0;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(85, 214, 194, 0.08), transparent 38%),
    rgba(255, 255, 255, 0.04);
}

.admin-ops-grid span,
.admin-ops-grid small {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.35;
}

.admin-ops-grid span {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-ops-grid strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.admin-tree {
  max-height: 440px;
  max-width: 100%;
}

.admin-filter {
  width: min(360px, 100%);
}

.admin-user-table {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.admin-withdrawal-table {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.admin-deposit-table {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.admin-user-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(4, minmax(118px, 0.75fr)) minmax(220px, 1.15fr) auto minmax(160px, 0.75fr);
  gap: 12px;
  align-items: stretch;
}

.admin-deposit-row,
.admin-withdrawal-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) minmax(100px, 0.55fr) minmax(130px, 0.65fr) minmax(240px, 1.35fr) minmax(230px, 1fr);
  gap: 12px;
  align-items: stretch;
  min-width: 0;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(85, 214, 194, 0.06), transparent 34%),
    rgba(255, 255, 255, 0.035);
}

.admin-deposit-row {
  grid-template-columns: minmax(170px, 1fr) minmax(100px, 0.55fr) minmax(130px, 0.65fr) minmax(220px, 1.1fr) minmax(220px, 1.1fr) minmax(160px, 0.75fr);
}

.admin-deposit-row.status-confirmed {
  border-color: rgba(0, 245, 106, 0.28);
  background: rgba(0, 245, 106, 0.06);
}

.admin-deposit-row.status-rejected {
  border-color: rgba(255, 38, 63, 0.28);
  background: rgba(255, 38, 63, 0.06);
}

.admin-withdrawal-row.status-approved {
  border-color: rgba(85, 214, 194, 0.26);
}

.admin-withdrawal-row.status-rejected {
  border-color: rgba(255, 38, 63, 0.28);
  background: rgba(255, 38, 63, 0.06);
}

.admin-withdrawal-row.status-paid {
  border-color: rgba(0, 245, 106, 0.28);
  background: rgba(0, 245, 106, 0.06);
}

.admin-user-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(85, 214, 194, 0.06), transparent 34%),
    rgba(255, 255, 255, 0.035);
}

.admin-user-row.is-suspended {
  border-color: rgba(255, 38, 63, 0.32);
  background: rgba(255, 38, 63, 0.07);
}

.admin-user-main,
.admin-user-meta,
.admin-user-email,
.admin-user-row strong,
.admin-user-row small,
.admin-user-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-user-main strong {
  display: block;
  margin-top: 4px;
  font-size: 1.02rem;
}

.admin-user-row small {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  line-height: 1.25;
  max-height: 3.8em;
  overflow: hidden;
}

.admin-user-meta,
.admin-user-email {
  border-left: 1px solid rgba(255, 255, 255, 0.09);
  padding-left: 12px;
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  justify-content: center;
  padding: 6px 9px;
  width: fit-content;
  align-self: start;
  font-size: 0.76rem;
  font-weight: 900;
}

.status-pill.ok {
  border-color: rgba(0, 245, 106, 0.3);
  color: var(--green);
}

.status-pill.warn {
  border-color: rgba(255, 230, 0, 0.3);
  color: var(--yellow);
}

.status-pill.danger {
  border-color: rgba(255, 38, 63, 0.35);
  color: var(--red);
}

.admin-user-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-self: center;
}

.withdrawal-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-user-actions button {
  min-height: 34px;
  padding: 0 9px;
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-link.compact {
  min-height: 36px;
  padding: 9px 12px;
}

.beta-settings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.switch-row,
.entry-limit-row {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.entry-limit-row {
  grid-template-columns: minmax(0, 1fr) 110px;
}

.switch-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--cyan);
}

.beta-settings strong {
  display: block;
  font-size: 0.92rem;
}

.beta-settings small {
  color: var(--muted);
  display: block;
  margin-top: 3px;
  font-size: 0.76rem;
  line-height: 1.25;
}

.beta-settings button {
  min-height: 100%;
}

.admin-log-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.admin-log-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
  max-height: 420px;
  overflow: auto;
}

.admin-log-grid strong {
  display: block;
  margin-bottom: 10px;
}

.log-row {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 3px;
  padding: 9px 0;
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.log-row b {
  color: var(--text);
}

.command-panel {
  grid-row: 1 / 5;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 26%),
    linear-gradient(145deg, rgba(85, 214, 194, 0.12), transparent 42%),
    rgba(12, 17, 27, 0.92);
}

.brand-block h1,
.top-bar h2,
.section-head h2 {
  margin: 4px 0 0;
  line-height: 1.02;
  letter-spacing: 0;
}

.brand-block h1 {
  max-width: 12ch;
  margin: 10px 0 0;
  font-size: clamp(1.65rem, 2.2vw, 2.35rem);
  line-height: 1.03;
  text-wrap: balance;
}

.brand-lockup {
  align-items: center;
  display: flex;
  gap: 12px;
}

.brand-lockup strong {
  display: block;
  font-size: 1.24rem;
  letter-spacing: 0;
  margin-top: 2px;
}

.brand-mark {
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 48px;
  position: relative;
  background:
    conic-gradient(from 210deg, var(--green), var(--cyan), var(--violet), var(--red), var(--yellow), var(--green));
  box-shadow: 0 0 34px rgba(85, 214, 194, 0.32);
  animation: brandBob 3.6s ease-in-out infinite;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.22) 24%, transparent 52%),
    rgba(7, 10, 16, 0.72);
}

.brand-mark::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: 29%;
  top: 39%;
  width: 6px;
  height: 8px;
  border-radius: 50%;
  background: #07100e;
  box-shadow:
    14px 0 0 #07100e,
    0 0 0 2px rgba(255, 255, 255, 0.18),
    14px 0 0 2px rgba(255, 255, 255, 0.18);
}

.brand-mark::after {
  box-shadow: inset 0 -8px 0 -5px rgba(7, 16, 14, 0.9);
}

.brand-mark i,
.brand-mark b {
  position: absolute;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.94), transparent 15%),
    linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 0 18px rgba(85, 214, 194, 0.28);
}

.brand-mark i {
  width: 13px;
  height: 13px;
  right: -4px;
  top: 2px;
  animation: mascotPop 2.8s ease-in-out infinite;
}

.brand-mark b {
  width: 9px;
  height: 9px;
  left: -2px;
  bottom: 5px;
  animation: mascotPop 3.1s ease-in-out 500ms infinite;
}

.round-feed {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 14px;
  width: 100%;
}

.round-feed span {
  display: grid;
  place-items: center;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.1;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: center;
}

.eyebrow {
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-card {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.auth-card > div,
.auth-card #authFields,
#emailField {
  display: grid;
  gap: 8px;
}

#authFields[hidden],
#emailField[hidden],
.auth-extra-card[hidden],
.ghost-action[hidden] {
  display: none;
}

.auth-extra-card {
  border: 1px solid rgba(85, 214, 194, 0.22);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(85, 214, 194, 0.09), rgba(141, 53, 255, 0.07)),
    rgba(5, 8, 14, 0.38);
}

.auth-card label,
.auth-card p,
.wallet-grid span,
.status-card span,
.metrics-row span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.auth-card p {
  margin: 2px 0 0;
  line-height: 1.35;
  text-transform: none;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.auth-tabs button,
.account-tabs button {
  min-height: 38px;
  background: rgba(255, 255, 255, 0.045);
}

.auth-tabs button.is-selected,
.account-tabs button.is-selected {
  border-color: rgba(85, 214, 194, 0.72);
  background: linear-gradient(135deg, rgba(85, 214, 194, 0.24), rgba(141, 53, 255, 0.16));
}

.account-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(94px, 1fr));
  gap: 8px;
  min-width: min(390px, 100%);
}

.account-tabs button[hidden] {
  display: none;
}

.account-tabs[hidden],
.tab-panel[hidden] {
  display: none;
}

.tab-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.account-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.account-card[hidden] {
  display: none;
}

.account-card > span,
.account-card small,
.verify-row span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.account-card strong {
  font-size: 1.25rem;
  overflow-wrap: anywhere;
}

.account-card small {
  overflow-wrap: anywhere;
  text-transform: none;
}

.verify-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.verify-row button,
#logoutButton {
  min-height: 36px;
}

.input-row {
  display: grid;
  gap: 8px;
}

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

.wallet-grid > div,
.payment-card,
.join-options,
.profile-card,
.branch-card,
.status-card,
.metrics-row > div {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.payment-card,
.join-options,
.profile-card,
.branch-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.payment-card,
.join-options {
  position: relative;
  border-width: 2px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 16px 34px rgba(0, 0, 0, 0.18);
}

.payment-card {
  border-color: rgba(85, 214, 194, 0.3);
  background:
    linear-gradient(145deg, rgba(85, 214, 194, 0.08), rgba(141, 53, 255, 0.04) 46%, rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.045);
}

.join-options {
  border-color: rgba(141, 53, 255, 0.34);
  background:
    linear-gradient(145deg, rgba(141, 53, 255, 0.1), rgba(85, 214, 194, 0.04) 48%, rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.045);
}

.payment-card[hidden],
.join-options[hidden],
.profile-card[hidden],
.branch-card[hidden] {
  display: none;
}

.payment-card span,
.payment-card small,
.join-options > span,
.profile-head span,
.profile-metrics span,
.branch-card > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.payment-card strong {
  overflow-wrap: anywhere;
  font-size: 0.88rem;
}

.payment-card > .wallet-action > strong {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  display: block;
  padding: 10px 11px;
  background: rgba(5, 8, 14, 0.46);
  color: var(--text);
  font-size: 0.9rem;
}

.payment-card small {
  line-height: 1.35;
  text-transform: none;
}

.wallet-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.wallet-head strong {
  display: block;
  margin-top: 2px;
  font-size: 1rem;
}

.wallet-head small {
  border: 1px solid rgba(85, 214, 194, 0.22);
  border-radius: 999px;
  flex: 0 0 auto;
  padding: 6px 8px;
  background: rgba(85, 214, 194, 0.07);
  color: var(--cyan);
  font-weight: 900;
}

.wallet-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.wallet-tabs button {
  min-height: 38px;
  background: rgba(255, 255, 255, 0.045);
}

.wallet-tabs button.is-selected {
  border-color: rgba(85, 214, 194, 0.72);
  background: linear-gradient(135deg, rgba(85, 214, 194, 0.22), rgba(141, 53, 255, 0.14));
}

.wallet-action {
  display: grid;
  gap: 8px;
}

.wallet-action[hidden] {
  display: none;
}

.wallet-action label,
.wallet-action span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.wallet-action-row {
  display: grid;
  grid-template-columns: minmax(82px, 0.75fr) minmax(124px, 1fr);
  gap: 8px;
}

.wallet-action-row button {
  min-width: 0;
  padding-inline: 10px;
}

.deposit-request-card label[hidden],
.deposit-request-card .wallet-action-row[hidden] {
  display: none;
}

.deposit-list,
.withdraw-list {
  display: grid;
  gap: 7px;
}

.deposit-request-card {
  border: 2px solid rgba(85, 214, 194, 0.3);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  background:
    linear-gradient(135deg, rgba(85, 214, 194, 0.15), transparent 44%),
    rgba(5, 8, 14, 0.5);
}

.deposit-request-card[hidden] {
  display: none;
}

.deposit-request-card a {
  border: 1px solid rgba(85, 214, 194, 0.36);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  color: #07100e;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  background: linear-gradient(135deg, var(--green), var(--cyan));
}

.deposit-request-card.is-provider-checkout strong {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.35;
}

.deposit-request-card.is-provider-checkout::after {
  content: "After payment, MoonPay confirms it automatically and the deposit waits for admin approval before wallet credit.";
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.deposit-list article,
.withdraw-list article {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px;
  background: rgba(5, 8, 14, 0.3);
}

.deposit-list article.is-empty,
.withdraw-list article.is-empty {
  color: var(--muted);
  font-size: 0.8rem;
}

.deposit-list article strong,
.deposit-list article small,
.deposit-list article span,
.withdraw-list article strong,
.withdraw-list article small,
.withdraw-list article span {
  display: block;
  overflow-wrap: anywhere;
}

.deposit-list article small,
.deposit-list article span,
.withdraw-list article small,
.withdraw-list article span {
  color: var(--muted);
  font-size: 0.76rem;
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.choice-row label {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  min-width: 0;
  min-height: 42px;
  padding: 0 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.035);
}

.choice-row input {
  accent-color: var(--cyan);
  flex: 0 0 16px;
  inline-size: 16px;
  block-size: 16px;
  margin: 0;
}

.placement-title {
  display: block;
  font-size: 0.88rem;
  line-height: 1.25;
}

.choice-row label strong {
  display: block;
  min-width: 0;
  font-size: 0.84rem;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.placement-help {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
  text-transform: none;
}

#branchList {
  display: grid;
  gap: 8px;
}

.branch-entry {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
}

.branch-entry header {
  display: grid;
  gap: 3px;
}

.branch-entry strong,
.branch-entry span,
.branch-entry small,
.branch-person {
  overflow-wrap: anywhere;
}

.branch-entry small,
.branch-person {
  color: var(--muted);
  font-size: 0.8rem;
}

.branch-people {
  display: grid;
  gap: 4px;
  max-height: 180px;
  overflow: auto;
  padding-right: 4px;
}

.branch-person {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 7px 8px;
}

.wallet-grid > div {
  display: grid;
  gap: 4px;
  place-items: center;
  min-width: 0;
  padding: 12px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.wallet-grid strong,
.metrics-row strong {
  font-size: 1.25rem;
  overflow-wrap: anywhere;
}

.action-stack {
  display: grid;
  gap: 10px;
}

.action-stack .primary-action {
  min-height: 56px;
  font-size: 1rem;
  box-shadow: 0 14px 34px rgba(0, 245, 106, 0.18);
}

.status-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  margin-top: auto;
}

.status-card > div {
  display: grid;
  gap: 4px;
}

.profile-card {
  background:
    linear-gradient(135deg, rgba(141, 53, 255, 0.13), transparent 42%),
    linear-gradient(225deg, rgba(0, 245, 106, 0.1), transparent 38%),
    rgba(255, 255, 255, 0.045);
}

.profile-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.profile-head strong {
  display: block;
  margin-top: 2px;
  font-size: 1.18rem;
}

.profile-head small {
  border: 1px solid rgba(85, 214, 194, 0.24);
  border-radius: 999px;
  color: var(--text);
  flex: 0 0 auto;
  max-width: 46%;
  padding: 7px 9px;
  background: rgba(85, 214, 194, 0.08);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

.profile-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-metrics > div,
.earnings-grid > div {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px;
  background: rgba(5, 8, 14, 0.36);
}

.earnings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.earnings-grid > div {
  background:
    linear-gradient(135deg, rgba(0, 245, 106, 0.08), transparent 44%),
    rgba(5, 8, 14, 0.42);
}

.profile-metrics strong,
.earnings-grid strong {
  display: block;
  font-size: 1.16rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.earnings-grid span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-progress {
  display: grid;
  gap: 7px;
}

.profile-progress span {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}

.profile-progress div {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.profile-progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green), var(--yellow));
  box-shadow: 0 0 20px rgba(0, 245, 106, 0.28);
  transition: width 240ms ease;
}

.profile-entry-list {
  display: grid;
  gap: 8px;
}

.profile-entry {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 11px;
  background: rgba(5, 8, 14, 0.32);
}

.profile-entry > div {
  min-width: 0;
}

.profile-entry span,
.profile-entry dt,
.profile-entry small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-entry strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-entry small {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  text-transform: none;
}

.profile-entry dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.profile-entry dl > div {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  min-width: 0;
  padding: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.profile-entry dd {
  margin: 3px 0 0;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.entry-renew {
  min-height: 36px;
  width: 100%;
  border-color: rgba(85, 214, 194, 0.36);
  background: linear-gradient(135deg, rgba(85, 214, 194, 0.16), rgba(141, 53, 255, 0.12));
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 950;
}

.entry-renew:disabled {
  cursor: default;
  opacity: 0.62;
}

.profile-entry.is-empty {
  color: var(--muted);
}

.profile-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-history-grid section {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  min-width: 0;
  padding: 12px;
  background: rgba(5, 8, 14, 0.32);
}

.profile-history-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 260px;
  overflow: auto;
}

.history-row {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  min-width: 0;
  padding: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.history-row strong,
.history-row small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.history-row small,
.history-empty {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.history-row > span {
  border-radius: 999px;
  padding: 6px 8px;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.history-row .is-positive {
  background: rgba(0, 245, 106, 0.12);
  color: var(--green);
}

.history-row .is-negative {
  background: rgba(255, 38, 63, 0.12);
  color: #ff8793;
}

.history-empty {
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px;
}

.bubble-stage {
  grid-column: 2;
  position: relative;
  min-height: 540px;
  overflow: hidden;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), transparent 24%),
    linear-gradient(135deg, rgba(0, 245, 106, 0.16), transparent 34%),
    linear-gradient(225deg, rgba(141, 53, 255, 0.17), transparent 36%),
    #0c111b;
}

.bubble-stage.is-tabs-only {
  min-height: 104px;
}

.bubble-stage.is-tabs-only::before,
.bubble-stage.is-tabs-only .stage-bubble-content,
.bubble-stage.is-tabs-only .profile-stage-card {
  display: none;
}

.bubble-stage.is-tabs-only .top-bar > div:first-child,
.bubble-stage.is-tabs-only .bubble-meter {
  visibility: hidden;
}

.stage-bubble-content[hidden],
.network-panel[hidden],
.rank-panel[hidden],
.support-panel[hidden] {
  display: none;
}

.bubble-stage::before {
  content: "";
  position: absolute;
  inset: 72px 22px 96px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.42;
}

.top-bar,
.section-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

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

.stage-controls .account-tabs {
  flex: 0 1 250px;
}

.stage-controls .account-tabs button {
  position: relative;
  overflow: hidden;
  min-height: 40px;
  padding: 0 12px;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

#howItWorksTab {
  border-color: rgba(85, 214, 194, 0.28);
  padding-left: 34px;
  background:
    linear-gradient(135deg, rgba(85, 214, 194, 0.12), rgba(141, 53, 255, 0.1)),
    rgba(255, 255, 255, 0.045);
  color: rgba(234, 246, 255, 0.92);
}

#howItWorksTab::before {
  content: "?";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(85, 214, 194, 0.5);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
  background: rgba(6, 11, 18, 0.58);
  box-shadow: 0 0 14px rgba(85, 214, 194, 0.18);
}

#howItWorksTab::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transform: translateX(-100%);
  transition:
    opacity 180ms ease,
    transform 320ms ease;
}

#howItWorksTab:hover,
#howItWorksTab:focus-visible {
  border-color: rgba(85, 214, 194, 0.72);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(85, 214, 194, 0.18),
    0 12px 26px rgba(85, 214, 194, 0.12);
}

#howItWorksTab:hover::after,
#howItWorksTab:focus-visible::after {
  opacity: 1;
  transform: translateX(100%);
}

#howItWorksTab.is-selected {
  border-color: rgba(85, 214, 194, 0.92);
  background:
    linear-gradient(135deg, rgba(85, 214, 194, 0.28), rgba(141, 53, 255, 0.26)),
    rgba(255, 255, 255, 0.065);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(85, 214, 194, 0.22),
    0 14px 34px rgba(141, 53, 255, 0.16);
}

#howItWorksTab.is-selected::before {
  border-color: rgba(255, 255, 255, 0.5);
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #07100e;
  box-shadow: 0 0 18px rgba(85, 214, 194, 0.32);
}

.bubble-meter {
  min-width: 112px;
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(0, 245, 106, 0.16);
  color: var(--green);
  font-weight: 900;
  text-align: center;
  box-shadow: 0 0 28px rgba(0, 245, 106, 0.2);
}

.stage-copy {
  position: absolute;
  z-index: 2;
  left: 28px;
  top: 108px;
  display: grid;
  gap: 3px;
  max-width: min(270px, 42%);
}

.stage-copy span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stage-copy strong {
  font-size: clamp(2rem, 3.2vw, 3.6rem);
  line-height: 0.96;
  max-width: 8ch;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
}

.bubble-meter.yellow {
  background: rgba(255, 230, 0, 0.18);
  color: #fff27a;
  box-shadow: 0 0 30px rgba(255, 230, 0, 0.28);
}

.bubble-meter.orange {
  background: rgba(255, 138, 0, 0.18);
  color: #ffc16b;
  box-shadow: 0 0 30px rgba(255, 138, 0, 0.28);
}

.bubble-meter.red {
  background: rgba(255, 38, 63, 0.18);
  color: #ff5b6d;
  box-shadow: 0 0 28px rgba(255, 38, 63, 0.22);
}

.bubble-meter.purple {
  background: rgba(141, 53, 255, 0.2);
  color: #c39cff;
  box-shadow: 0 0 32px rgba(141, 53, 255, 0.28);
}

.bubble-meter.burst {
  background: rgba(255, 38, 63, 0.24);
  color: #ffffff;
  box-shadow: 0 0 36px rgba(255, 38, 63, 0.35);
}

.bubble-visual {
  position: absolute;
  inset: 88px 22px 106px;
  display: grid;
  place-items: center;
  --bubble-size: 230px;
}

.burst-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.burst-overlay.is-active::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.95), transparent 8%),
    radial-gradient(circle at 50% 48%, rgba(244, 211, 94, 0.42), transparent 28%),
    radial-gradient(circle at 50% 48%, rgba(240, 93, 94, 0.38), transparent 42%);
  animation: burstFlash 900ms ease-out forwards;
}

.burst-wave {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 120px;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: burstWave 900ms ease-out forwards;
}

.burst-shard {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 10px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), currentColor);
  color: var(--yellow);
  transform: translate(-50%, -50%) rotate(var(--angle));
  animation: shardFly 980ms cubic-bezier(0.12, 0.72, 0.18, 1) forwards;
}

.burst-result {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 8px;
  width: min(280px, 72vw);
  padding: 18px;
  border: 1px solid rgba(240, 93, 94, 0.44);
  border-radius: 8px;
  background: rgba(13, 19, 29, 0.82);
  box-shadow: 0 24px 80px rgba(240, 93, 94, 0.26);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.82);
  transition:
    opacity 260ms ease,
    transform 260ms ease;
}

.burst-result[hidden] {
  display: none;
}

.burst-result.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.burst-result strong {
  font-size: 1.35rem;
}

.burst-result > span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.empty-balloon {
  position: relative;
  width: 132px;
  height: 132px;
}

.balloon-skin {
  position: absolute;
  left: 20px;
  top: 16px;
  width: 92px;
  height: 74px;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.38), transparent 12%),
    linear-gradient(150deg, rgba(168, 137, 255, 0.42), rgba(240, 93, 94, 0.18)),
    #202637;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 48% 52% 46% 54% / 35% 42% 58% 65%;
  box-shadow:
    inset 0 -18px 28px rgba(0, 0, 0, 0.42),
    0 18px 34px rgba(0, 0, 0, 0.24);
  clip-path: polygon(0 42%, 16% 10%, 46% 0, 80% 12%, 100% 50%, 74% 86%, 34% 100%, 8% 80%);
  transform: rotate(-8deg) scaleY(0.7);
  animation: emptyBalloonSettle 1.2s ease-out both;
}

.balloon-knot {
  position: absolute;
  left: 61px;
  top: 86px;
  width: 18px;
  height: 14px;
  background: rgba(168, 137, 255, 0.52);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.balloon-string {
  position: absolute;
  left: 67px;
  top: 98px;
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, 0.32);
  transform: rotate(8deg);
}

.bubble-core,
.bubble-ring {
  position: absolute;
  border-radius: 50%;
}

.bubble-core {
  width: min(var(--bubble-size), 37vw);
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.95), transparent 9%),
    radial-gradient(circle at 44% 36%, rgba(255, 255, 255, 0.38), transparent 18%),
    radial-gradient(circle at 68% 70%, rgba(0, 255, 213, 0.44), transparent 30%),
    linear-gradient(135deg, rgba(0, 245, 106, 1), rgba(0, 210, 156, 0.9));
  box-shadow:
    inset 0 -38px 96px rgba(0, 54, 37, 0.34),
    inset 0 28px 52px rgba(255, 255, 255, 0.18),
    0 0 130px rgba(0, 245, 106, 0.48),
    0 36px 90px rgba(0, 0, 0, 0.42);
  animation: breathe 4.8s ease-in-out infinite;
}

.bubble-ring {
  width: min(calc(var(--bubble-size) * 1.32), 48vw);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 42px rgba(255, 255, 255, 0.035);
}

.ring-a {
  animation: orbit 10s linear infinite;
}

.ring-b {
  width: min(calc(var(--bubble-size) * 1.55), 54vw);
  transform: rotate(60deg);
  border-color: rgba(244, 211, 94, 0.22);
  animation: orbit 14s linear infinite reverse;
}

.ring-c {
  width: min(calc(var(--bubble-size) * 0.86), 32vw);
  transform: rotate(-26deg);
  border-color: rgba(90, 165, 255, 0.2);
  animation: orbit 7s linear infinite;
}

.metrics-row {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  bottom: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metrics-row > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    rgba(8, 12, 20, 0.62);
  backdrop-filter: blur(16px);
}

.profile-stage-card {
  position: relative;
  z-index: 2;
  min-height: 420px;
  margin-top: 24px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(141, 53, 255, 0.18), transparent 38%),
    linear-gradient(225deg, rgba(0, 245, 106, 0.14), transparent 42%),
    rgba(8, 12, 20, 0.72);
  backdrop-filter: blur(12px);
}

.profile-stage-card .profile-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-stage-card .profile-entry-list {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.rank-panel,
.network-panel,
.rules-panel,
.view-tabs-panel,
.support-panel {
  grid-column: 2;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), transparent 32%),
    rgba(15, 21, 32, 0.9);
}

.network-panel {
  min-height: 440px;
  overflow: hidden;
}

.rank-panel {
  overflow: hidden;
}

.view-tabs-panel {
  padding: 16px 20px;
}

.view-tabs-panel .account-tabs {
  margin-left: auto;
}

.rules-panel {
  overflow: hidden;
}

.support-panel {
  overflow: hidden;
}

.rules-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.rules-flow article,
.rules-notes > div {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  min-width: 0;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(85, 214, 194, 0.08), transparent 38%),
    rgba(255, 255, 255, 0.04);
}

.rules-flow span,
.rules-notes span {
  color: var(--cyan);
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rules-flow strong,
.rules-notes strong {
  display: block;
  margin-top: 6px;
  font-size: 1.05rem;
}

.rules-flow p,
.rules-notes p {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 0.88rem;
  line-height: 1.35;
}

.rules-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.legend {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 50%;
}

.legend-dot.active {
  background: var(--green);
}

.legend-dot.player {
  background: var(--yellow);
}

.search-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(96px, auto) minmax(210px, 0.8fr);
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.search-card strong {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.tree-wrap {
  display: grid;
  gap: 12px;
  overflow: auto;
  max-width: 100%;
  min-width: 0;
  max-height: 520px;
  margin-top: 12px;
  padding: 16px 10px 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    rgba(7, 10, 16, 0.34);
  background-size: 38px 38px;
}

.tree-summary {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.tree-summary span,
.tree-summary small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.tree-summary span {
  display: block;
  text-transform: uppercase;
}

.tree-summary strong {
  display: block;
  margin-top: 3px;
}

.branch-tree {
  width: max-content;
  min-width: 620px;
  max-width: none;
  padding: 10px 0 18px;
}

.tree-level {
  display: flex;
  justify-content: center;
  gap: 10px;
  min-width: max-content;
}

.branch-node-wrap {
  display: grid;
  justify-items: center;
  min-width: 0;
  position: relative;
}

.branch-children {
  display: grid;
  grid-template-columns: repeat(3, minmax(138px, 1fr));
  gap: 10px;
  margin-top: 22px;
  padding-top: 20px;
  position: relative;
  width: 100%;
}

.branch-children::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16.66%;
  right: 16.66%;
  border-top: 1px solid rgba(85, 214, 194, 0.34);
}

.branch-children > .branch-node-wrap::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 50%;
  height: 20px;
  border-left: 1px solid rgba(85, 214, 194, 0.34);
}

.node,
.branch-node {
  min-height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    #0d131d;
  padding: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
  display: grid;
  gap: 8px;
  min-width: 0;
  width: min(168px, 100%);
  color: var(--text);
  text-align: left;
}

.branch-node {
  cursor: pointer;
  padding: 10px;
}

.node.is-user {
  border-color: var(--yellow);
  box-shadow: 0 0 0 2px rgba(244, 211, 94, 0.16);
}

.node.is-empty {
  color: var(--muted);
  border-style: dashed;
  background: rgba(255, 255, 255, 0.025);
}

.node strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
}

.node span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.node small {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.node em {
  color: var(--cyan);
  display: block;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.rules-card {
  align-items: center;
  border: 1px solid rgba(85, 214, 194, 0.18);
  border-radius: 8px;
  display: grid;
  grid-template-columns: auto minmax(170px, 0.7fr) minmax(0, 1.3fr);
  gap: 16px;
  margin-top: 14px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(85, 214, 194, 0.11), transparent 42%),
    rgba(255, 255, 255, 0.04);
}

.rules-card h3 {
  margin: 4px 0 0;
  font-size: clamp(1.1rem, 1.6vw, 1.45rem);
  line-height: 1.08;
}

.rules-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.rules-card strong {
  color: var(--text);
}

.bubble-mascot {
  position: relative;
  width: 92px;
  height: 92px;
}

.mascot-bubble {
  position: absolute;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.96), transparent 12%),
    radial-gradient(circle at 55% 64%, rgba(141, 53, 255, 0.32), transparent 34%),
    linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow:
    inset 0 -14px 28px rgba(0, 54, 37, 0.24),
    0 0 36px rgba(85, 214, 194, 0.24);
}

.mascot-bubble.main {
  inset: 10px;
  animation: mascotFloat 3.2s ease-in-out infinite;
}

.mascot-bubble.main::before,
.mascot-bubble.main::after {
  content: "";
  position: absolute;
  top: 38%;
  width: 8px;
  height: 11px;
  border-radius: 50%;
  background: #07100e;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.16);
}

.mascot-bubble.main::before {
  left: 34%;
}

.mascot-bubble.main::after {
  right: 34%;
}

.mascot-bubble.mini {
  width: 18px;
  height: 18px;
  opacity: 0.9;
  animation: mascotPop 2.8s ease-in-out infinite;
}

.mascot-bubble.one {
  right: 2px;
  top: 8px;
}

.mascot-bubble.two {
  bottom: 4px;
  left: 0;
  animation-delay: 700ms;
}

.payout-info,
.rank-explainer {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.payout-info > div,
.rank-explainer > div {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 13px;
}

.payout-info span,
.rank-explainer span {
  color: var(--muted);
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.payout-info strong,
.rank-explainer strong {
  display: block;
  margin-top: 5px;
  font-size: 1.02rem;
}

.payout-info p,
.rank-explainer p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.rank-advantage {
  align-items: center;
  border: 1px solid rgba(0, 245, 106, 0.22);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(170px, 0.52fr) minmax(0, 1fr);
  margin-top: 12px;
  overflow: hidden;
  padding: 15px 16px;
  position: relative;
  background:
    radial-gradient(circle at 96% 12%, rgba(255, 230, 0, 0.28), transparent 16%),
    linear-gradient(120deg, rgba(0, 245, 106, 0.18), rgba(85, 214, 194, 0.08) 42%, rgba(141, 53, 255, 0.14)),
    rgba(8, 14, 22, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.rank-advantage::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #00f56a, #55d6c2, #ffe600);
}

.rank-advantage span {
  color: #76ffbf;
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rank-advantage strong {
  display: block;
  font-size: clamp(1.04rem, 1.6vw, 1.28rem);
  line-height: 1.08;
  margin-top: 5px;
}

.rank-advantage p {
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.35;
  margin: 0;
}

.dollar-payouts {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  margin-top: 12px;
  padding: 16px;
  background: rgba(5, 8, 14, 0.38);
}

.dollar-payouts.is-central {
  background:
    linear-gradient(135deg, rgba(0, 245, 106, 0.1), transparent 28%),
    linear-gradient(235deg, rgba(141, 53, 255, 0.16), transparent 34%),
    rgba(5, 8, 14, 0.48);
}

.payout-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.payout-title strong {
  font-size: 1.08rem;
}

.payout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

.payout-rank {
  --rank-a: rgba(85, 214, 194, 0.16);
  --rank-b: rgba(0, 245, 106, 0.08);
  --rank-glow: rgba(85, 214, 194, 0.18);
  --rank-pulse: 6s;
  --rank-drift: 8s;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(120px, 1.1fr) minmax(86px, 0.65fr) minmax(112px, 0.75fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 78px;
  padding: 13px 16px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.2), transparent 12%),
    linear-gradient(135deg, var(--rank-a), transparent 38%),
    linear-gradient(225deg, var(--rank-b), transparent 46%),
    #0d131d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 34px rgba(0, 0, 0, 0.22),
    0 0 28px var(--rank-glow);
  animation: rankPulse var(--rank-pulse) ease-in-out var(--rank-delay, 0ms) infinite;
}

.payout-rank::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--rank-a), var(--rank-b));
}

.payout-rank::after {
  content: "";
  position: absolute;
  right: -26px;
  top: -26px;
  width: 76px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--rank-a), transparent 68%);
  opacity: 0.85;
  animation: rankGlowDrift var(--rank-drift) ease-in-out var(--rank-delay, 0ms) infinite;
}

.rank-orbit {
  position: absolute;
  inset: 8px;
  pointer-events: none;
  z-index: 0;
}

.rank-orbit span {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rank-b);
  box-shadow: 0 0 14px var(--rank-a);
  opacity: 0.72;
  animation: rankParticleFloat 4.8s ease-in-out var(--rank-delay, 0ms) infinite;
}

.rank-orbit span:nth-child(1) {
  left: 18px;
  top: 12px;
}

.rank-orbit span:nth-child(2) {
  right: 28px;
  bottom: 14px;
  width: 8px;
  height: 8px;
  animation-delay: calc(var(--rank-delay, 0ms) + 600ms);
}

.rank-orbit span:nth-child(3) {
  left: 47%;
  bottom: 10px;
  width: 4px;
  height: 4px;
  animation-delay: calc(var(--rank-delay, 0ms) + 1200ms);
}

.payout-rank-name,
.payout-rank-stat {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.payout-rank-stat {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding-left: 14px;
}

.rank-tone-0 {
  --rank-a: rgba(0, 245, 106, 0.28);
  --rank-b: rgba(85, 214, 194, 0.14);
  --rank-glow: rgba(0, 245, 106, 0.1);
  --rank-pulse: 7.4s;
  --rank-drift: 8.8s;
}

.rank-tone-1 {
  --rank-a: rgba(85, 214, 194, 0.28);
  --rank-b: rgba(90, 165, 255, 0.15);
  --rank-glow: rgba(85, 214, 194, 0.12);
  --rank-pulse: 6.9s;
  --rank-drift: 8.2s;
}

.rank-tone-2 {
  --rank-a: rgba(90, 165, 255, 0.28);
  --rank-b: rgba(0, 245, 106, 0.13);
  --rank-glow: rgba(90, 165, 255, 0.12);
  --rank-pulse: 6.5s;
  --rank-drift: 7.8s;
}

.rank-tone-3 {
  --rank-a: rgba(255, 230, 0, 0.28);
  --rank-b: rgba(255, 138, 0, 0.14);
  --rank-glow: rgba(255, 230, 0, 0.1);
  --rank-pulse: 6.1s;
  --rank-drift: 7.4s;
}

.rank-tone-4 {
  --rank-a: rgba(255, 138, 0, 0.3);
  --rank-b: rgba(255, 230, 0, 0.13);
  --rank-glow: rgba(255, 138, 0, 0.12);
  --rank-pulse: 5.8s;
  --rank-drift: 7s;
}

.rank-tone-5 {
  --rank-a: rgba(255, 38, 63, 0.3);
  --rank-b: rgba(255, 138, 0, 0.14);
  --rank-glow: rgba(255, 38, 63, 0.12);
  --rank-pulse: 5.4s;
  --rank-drift: 6.7s;
}

.rank-tone-6 {
  --rank-a: rgba(141, 53, 255, 0.32);
  --rank-b: rgba(90, 165, 255, 0.16);
  --rank-glow: rgba(141, 53, 255, 0.14);
  --rank-pulse: 5.1s;
  --rank-drift: 6.4s;
}

.rank-tone-7 {
  --rank-a: rgba(141, 53, 255, 0.34);
  --rank-b: rgba(255, 38, 190, 0.16);
  --rank-glow: rgba(141, 53, 255, 0.16);
  --rank-pulse: 4.8s;
  --rank-drift: 6.1s;
}

.rank-tone-8 {
  --rank-a: rgba(255, 38, 190, 0.32);
  --rank-b: rgba(255, 230, 0, 0.13);
  --rank-glow: rgba(255, 38, 190, 0.14);
  --rank-pulse: 4.5s;
  --rank-drift: 5.9s;
}

.rank-tone-9 {
  --rank-a: rgba(255, 230, 0, 0.34);
  --rank-b: rgba(141, 53, 255, 0.18);
  --rank-glow: rgba(255, 230, 0, 0.14);
  --rank-pulse: 4.2s;
  --rank-drift: 5.6s;
}

.rank-tone-10 {
  --rank-a: rgba(255, 255, 255, 0.3);
  --rank-b: rgba(0, 245, 106, 0.18);
  --rank-glow: rgba(255, 255, 255, 0.12);
  --rank-pulse: 3.9s;
  --rank-drift: 5.3s;
}

.payout-rank span,
.payout-rank-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.payout-rank strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(1.05rem, 1.5vw, 1.24rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
  white-space: nowrap;
}

.payout-rank-name strong {
  font-size: clamp(1.1rem, 1.8vw, 1.42rem);
}

@keyframes rankPulse {
  0%,
  100% {
    border-color: rgba(255, 255, 255, 0.13);
    transform: translateY(0);
  }

  50% {
    border-color: var(--rank-a);
    transform: translateY(-1px);
  }
}

@keyframes rankGlowDrift {
  0%,
  100% {
    opacity: 0.58;
    transform: translate(0, 0) scale(0.92);
  }

  50% {
    opacity: 0.95;
    transform: translate(-12px, 12px) scale(1.12);
  }
}

@keyframes rankParticleFloat {
  0%,
  100% {
    opacity: 0.25;
    transform: translate3d(0, 0, 0) scale(0.86);
  }

  45% {
    opacity: 0.88;
    transform: translate3d(9px, -8px, 0) scale(1.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .payout-rank,
  .payout-rank::after,
  .rank-orbit span {
    animation: none;
  }
}

.support-panel {
  display: grid;
  gap: 12px;
}

.support-panel p {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.support-mail {
  border: 1px solid rgba(85, 214, 194, 0.28);
  border-radius: 8px;
  color: var(--text);
  display: inline-flex;
  justify-content: center;
  padding: 14px 16px;
  text-decoration: none;
  width: fit-content;
  max-width: 100%;
  background: rgba(85, 214, 194, 0.08);
  font-weight: 900;
}


.burst .bubble-core {
  width: min(34vw, 300px);
  aspect-ratio: 1.65;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.28), transparent 9%),
    linear-gradient(145deg, rgba(168, 137, 255, 0.32), rgba(240, 93, 94, 0.18)),
    #202637;
  border-radius: 48% 52% 44% 56% / 34% 42% 58% 66%;
  clip-path: polygon(0 42%, 12% 12%, 42% 0, 79% 10%, 100% 50%, 75% 87%, 34% 100%, 7% 80%);
  box-shadow:
    inset 0 -26px 58px rgba(0, 0, 0, 0.42),
    0 0 70px rgba(168, 137, 255, 0.12);
  animation: deflatedBubble 2.8s ease-in-out infinite;
}

.yellow .bubble-core {
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.95), transparent 9%),
    radial-gradient(circle at 68% 72%, rgba(255, 138, 0, 0.34), transparent 28%),
    linear-gradient(135deg, rgba(255, 230, 0, 1), rgba(255, 184, 0, 0.9));
  box-shadow:
    inset 0 -28px 80px rgba(84, 52, 0, 0.28),
    0 0 120px rgba(255, 230, 0, 0.45);
}

.orange .bubble-core {
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.95), transparent 9%),
    radial-gradient(circle at 66% 70%, rgba(255, 230, 0, 0.34), transparent 24%),
    linear-gradient(135deg, rgba(255, 138, 0, 1), rgba(255, 76, 0, 0.92));
  box-shadow:
    inset 0 -28px 80px rgba(82, 24, 0, 0.34),
    0 0 125px rgba(255, 138, 0, 0.48);
}

.red .bubble-core {
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.95), transparent 9%),
    radial-gradient(circle at 64% 68%, rgba(255, 207, 51, 0.34), transparent 26%),
    linear-gradient(135deg, rgba(255, 38, 63, 1), rgba(185, 0, 74, 0.92));
  box-shadow:
    inset 0 -28px 80px rgba(65, 0, 22, 0.38),
    0 0 120px rgba(255, 38, 63, 0.48);
}

.purple .bubble-core {
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.95), transparent 9%),
    radial-gradient(circle at 70% 72%, rgba(255, 38, 190, 0.36), transparent 28%),
    linear-gradient(135deg, rgba(141, 53, 255, 1), rgba(52, 0, 180, 0.95));
  box-shadow:
    inset 0 -28px 80px rgba(24, 0, 76, 0.42),
    0 0 130px rgba(141, 53, 255, 0.55);
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(0.98);
  }
  50% {
    transform: scale(1.04);
  }
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes burstPulse {
  0%,
  100% {
    transform: scale(1);
    filter: saturate(1);
  }
  50% {
    transform: scale(1.07);
    filter: saturate(1.35);
  }
}

@keyframes deflatedBubble {
  0%,
  100% {
    transform: rotate(-4deg) scaleY(0.72);
  }
  50% {
    transform: rotate(3deg) scaleY(0.66);
  }
}

@keyframes emptyBalloonSettle {
  0% {
    opacity: 0;
    transform: translateY(-18px) rotate(12deg) scaleY(1);
  }
  55% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(-8deg) scaleY(0.7);
  }
}

@keyframes burstFlash {
  0% {
    opacity: 0;
    transform: scale(0.62);
  }
  24% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.22);
  }
}

@keyframes burstWave {
  0% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(0.35);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(6);
  }
}

@keyframes shardFly {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(var(--distance)) scale(0.45);
  }
}

@keyframes mascotFloat {
  0%,
  100% {
    transform: translateY(0) scale(0.98);
  }
  50% {
    transform: translateY(-8px) scale(1.04);
  }
}

@keyframes mascotPop {
  0%,
  100% {
    opacity: 0.55;
    transform: translateY(5px) scale(0.82);
  }
  50% {
    opacity: 1;
    transform: translateY(-7px) scale(1.1);
  }
}

@keyframes brandBob {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-5px) rotate(5deg);
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-rows: auto;
    grid-template-columns: 1fr;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-hero,
  .admin-session,
  .admin-grid,
  .admin-layout,
  .admin-panel,
  .admin-panel-wide {
    grid-column: auto;
  }

  .bubble-stage,
  .network-panel,
  .rank-panel,
  .rules-panel,
  .support-panel {
    grid-column: auto;
  }

  .command-panel {
    grid-row: auto;
    position: relative;
    top: auto;
    max-height: none;
  }

  .admin-grid,
  .admin-layout,
  .admin-log-grid,
  .admin-ops-grid,
  .beta-settings {
    grid-template-columns: 1fr;
  }

  .admin-user-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-withdrawal-row,
  .admin-deposit-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-user-main {
    grid-column: 1 / -1;
  }

  .admin-user-actions,
  .withdrawal-actions {
    grid-column: 1 / -1;
  }

  .admin-user-meta,
  .admin-user-email {
    border-left: 0;
    padding-left: 0;
  }

  .brand-block h1 {
    max-width: 14ch;
  }

  .bubble-stage {
    min-height: 560px;
  }

  .stage-copy {
    max-width: 45%;
  }

  .metrics-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payout-info,
  .rank-explainer,
  .rules-flow,
  .rules-notes {
    grid-template-columns: 1fr;
  }

  .rules-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .rules-card ul {
    grid-column: 1 / -1;
  }

  .payout-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .app-shell,
  .admin-shell {
    padding: 10px;
    gap: 10px;
  }

  .wallet-grid,
  .search-card {
    grid-template-columns: 1fr;
  }

  .app-shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .command-panel {
    display: contents;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .brand-block {
    order: 1;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
    padding: 12px;
    background:
      linear-gradient(135deg, rgba(0, 245, 106, 0.13), transparent 36%),
      linear-gradient(245deg, rgba(141, 53, 255, 0.14), transparent 34%),
      rgba(12, 17, 27, 0.92);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  }

  .brand-block,
  .auth-card,
  .tab-panel,
  .bubble-stage,
  .network-panel,
  .rank-panel,
  .rules-panel,
  .support-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .auth-card {
    order: 2;
  }

  .bubble-stage {
    order: 3;
  }

  .tab-panel {
    order: 4;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: rgba(15, 21, 32, 0.9);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  }

  .network-panel {
    order: 5;
  }

  .rank-panel {
    order: 6;
  }

  .rules-panel {
    order: 5;
  }

  .support-panel {
    order: 7;
  }

  .brand-block .brand-lockup {
    grid-column: 1 / -1;
  }

  .brand-block h1 {
    grid-column: 1 / -1;
    max-width: 100%;
    margin-top: 8px;
    font-size: clamp(1.55rem, 7vw, 2.05rem);
  }

  .round-feed {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 8px;
    overflow: hidden;
  }

  .round-feed span:last-child {
    grid-column: 1 / -1;
  }

  .auth-card {
    gap: 8px;
  }

  .account-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .account-card > span,
  .account-card small {
    display: none;
  }

  .account-card strong {
    font-size: 1.05rem;
  }

  .verify-row {
    grid-column: 1 / -1;
  }

  #logoutButton {
    grid-column: 2;
    grid-row: 1;
    min-height: 34px;
  }

  .tab-panel {
    gap: 10px;
  }

  .wallet-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    order: 1;
  }

  .join-options {
    order: 2;
  }

  .action-stack {
    order: 3;
  }

  .status-card {
    order: 4;
  }

  .payment-card {
    order: 5;
    max-height: 300px;
    overflow: auto;
  }

  .branch-card {
    order: 6;
  }

  .top-bar,
  .section-head,
  .admin-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .stage-controls {
    align-items: stretch;
    flex-direction: row;
    gap: 8px;
  }

  .stage-controls .account-tabs {
    flex-basis: auto;
    min-width: 0;
  }

  .stage-controls .account-tabs button {
    padding: 0 8px;
    font-size: 0.82rem;
  }

  .admin-actions,
  .admin-row,
  .admin-login .admin-row,
  .admin-user-row,
  .admin-withdrawal-row,
  .admin-user-actions,
  .admin-payout-card {
    grid-template-columns: 1fr;
  }

  .admin-hero h1 {
    font-size: 2rem;
  }

  .bubble-stage {
    min-height: 455px;
    padding: 14px;
  }

  .bubble-stage::before {
    inset: 104px 12px 96px;
  }

  .bubble-visual {
    inset: 148px 12px 128px;
  }

  .stage-copy {
    top: 126px;
    left: 16px;
    max-width: 42%;
  }

  .stage-copy strong {
    font-size: 1.72rem;
    max-width: 8ch;
  }

  .rules-card {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .bubble-core {
    width: min(var(--bubble-size), 50vw);
  }

  .bubble-ring {
    width: min(calc(var(--bubble-size) * 1.32), 68vw);
  }

  .metrics-row {
    left: 12px;
    right: 12px;
    bottom: 12px;
    gap: 6px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .metrics-row > div {
    min-height: 58px;
    padding: 9px 7px;
  }

  .metrics-row span {
    font-size: 0.62rem;
  }

  .metrics-row strong {
    font-size: 0.9rem;
  }

  .tree-summary,
  .payout-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .branch-tree {
    min-width: 500px;
  }

  .profile-stage-card .profile-metrics,
  .earnings-grid,
  .profile-stage-card .profile-entry-list,
  .profile-history-grid {
    grid-template-columns: 1fr;
  }

  .payout-grid {
    grid-template-columns: 1fr;
  }

  .payout-rank {
    grid-template-columns: minmax(0, 1fr);
  }

  .payout-rank-stat {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-left: 0;
    padding-top: 10px;
  }

  .payout-rank strong {
    white-space: normal;
  }
}

@media (max-width: 480px) {
  body {
    background:
      linear-gradient(160deg, rgba(0, 245, 106, 0.12), transparent 28%),
      linear-gradient(25deg, rgba(141, 53, 255, 0.14), transparent 34%),
      #07080d;
  }

  .app-shell,
  .admin-shell {
    padding: 8px;
    gap: 8px;
  }

  .command-panel,
  .bubble-stage,
  .network-panel,
  .rank-panel,
  .support-panel,
  .admin-hero,
  .admin-panel,
  .admin-stat,
  .auth-card {
    border-radius: 8px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  }

  .command-panel,
  .rank-panel,
  .network-panel,
  .rules-panel,
  .support-panel,
  .admin-panel {
    padding: 10px;
  }

  .brand-lockup {
    gap: 10px;
  }

  .brand-mark {
    flex-basis: 40px;
  }

  .brand-lockup strong {
    font-size: 1.02rem;
  }

  .brand-block h1 {
    max-width: 100%;
    font-size: clamp(1.45rem, 8vw, 1.95rem);
    line-height: 1.02;
  }

  .round-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .round-feed span:last-child {
    grid-column: 1 / -1;
  }

  .round-feed span {
    min-height: 32px;
    padding: 6px 5px;
    font-size: 0.64rem;
  }

  .auth-card,
  .payment-card,
  .join-options,
  .branch-card,
  .status-card,
  .profile-card {
    padding: 11px;
  }

  input,
  button {
    min-height: 42px;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  .wallet-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .wallet-action-row {
    grid-template-columns: 1fr;
  }

  .wallet-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .wallet-grid > div {
    padding: 8px 5px;
  }

  .wallet-grid strong,
  .metrics-row strong {
    font-size: 0.9rem;
  }

  .choice-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice-row label strong {
    font-size: 0.78rem;
  }

  .bubble-stage {
    min-height: 420px;
    padding: 10px;
  }

  .top-bar,
  .section-head {
    gap: 10px;
  }

  .top-bar h2,
  .section-head h2 {
    font-size: 1.18rem;
  }

  .stage-controls {
    gap: 8px;
  }

  .stage-controls .account-tabs {
    min-width: 0;
  }

  .stage-controls .account-tabs button {
    min-height: 34px;
    font-size: 0.76rem;
  }

  .bubble-meter {
    min-width: 76px;
    width: auto;
    padding: 7px 9px;
  }

  .bubble-stage::before {
    inset: 104px 10px 90px;
  }

  .stage-copy {
    top: 124px;
    left: 14px;
    max-width: 40%;
  }

  .stage-copy strong {
    font-size: 1.4rem;
  }

  .bubble-visual {
    inset: 148px 8px 114px;
  }

  .bubble-core {
    width: min(var(--bubble-size), 46vw);
  }

  .bubble-ring {
    width: min(calc(var(--bubble-size) * 1.22), 62vw);
  }

  .ring-b {
    width: min(calc(var(--bubble-size) * 1.4), 70vw);
  }

  .metrics-row {
    left: 10px;
    right: 10px;
    bottom: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .metrics-row > div {
    padding: 8px 5px;
    min-height: 54px;
  }

  .search-card {
    gap: 8px;
  }

  .tree-wrap {
    max-height: 320px;
    padding: 10px 8px;
  }

  .tree-summary {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px;
  }

  .branch-tree {
    min-width: 460px;
  }

  .node,
  .branch-node {
    width: 136px;
    min-height: 64px;
    padding: 8px;
  }

  .branch-children {
    grid-template-columns: repeat(3, minmax(112px, 1fr));
    gap: 7px;
  }

  .rules-card {
    gap: 10px;
    padding: 12px;
  }

  .bubble-mascot {
    width: 74px;
    height: 74px;
  }

  .rank-explainer {
    gap: 8px;
  }

  .rules-flow,
  .rules-notes {
    gap: 8px;
  }

  .rank-explainer > div,
  .rules-flow article,
  .rules-notes > div,
  .dollar-payouts {
    padding: 11px;
  }

  .payout-rank {
    min-height: auto;
    padding: 11px;
  }

  .support-mail {
    width: 100%;
    overflow-wrap: anywhere;
  }

  .profile-stage-card {
    min-height: auto;
    margin-top: 14px;
    padding: 12px;
  }

  .profile-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-head small {
    max-width: 100%;
  }

  .profile-metrics,
  .earnings-grid,
  .profile-entry dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-hero,
  .admin-session {
    padding: 12px;
  }

  .admin-link,
  .admin-session button {
    width: 100%;
  }

  .admin-grid {
    gap: 8px;
  }

  .admin-stat {
    padding: 12px;
  }

  .admin-stat strong {
    font-size: 1.28rem;
  }

  .admin-payout-grid {
    grid-template-columns: 1fr;
  }

  .admin-tree {
    max-height: 360px;
  }

  .admin-log-grid > div {
    max-height: 320px;
  }
}
