/* User dashboard UX layer (app.html) */
.ux-av { --h: 250; width: 34px; height: 34px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 70% 58%), hsl(calc(var(--h) + 50) 70% 42%)); box-shadow: inset 0 0 0 1px #ffffff2a; letter-spacing: .02em; }
.ux-av-lg { width: 64px; height: 64px; font-size: 22px; }
.ux-av-sm { width: 30px; height: 30px; font-size: 11px; }

/* skeleton */
@keyframes ux-pulse { 50% { opacity: .45; } }
.ux-skel { height: 120px; border-radius: 16px; background: #ffffff0a; animation: ux-pulse 1.4s ease-in-out infinite; }
.ux-skel-hero { height: 230px; margin-bottom: 16px; }
.ux-skel-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.ux-skel-tall { height: 340px; }

/* banners */
.ux-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 16px; border-radius: 14px; border: 1px solid #33c6ff55; background: #33c6ff12; }
.ux-banner > span { font-size: 20px; color: #7fdcff; }
.ux-banner > div { flex: 1 1 260px; }
.ux-banner strong { font-size: 15px; }
.ux-banner p { margin: 2px 0 0; font-size: 13px; color: #c9b58f; }

/* welcome / picker */
.ux-welcome { text-align: center; padding: 48px 16px 36px; }
.ux-welcome h1 { font-size: clamp(28px, 4vw, 40px); margin: 10px 0 8px; }
.ux-welcome p { color: var(--rx-muted); font-size: 15px; margin: 0 auto 20px; max-width: 520px; }
.ux-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.ux-person { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid #ffffff12; color: #e8eaf4; text-decoration: none; font-size: 14px; font-weight: 600; }
.ux-person small { display: block; color: var(--rx-muted); font-size: 11px; font-weight: 400; }
.ux-person:hover { border-color: #0084ff88; background: #0084ff0d; }

/* hero */
.ux-hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 16px; margin-bottom: 14px; }
@media (max-width: 1000px) { .ux-hero { grid-template-columns: 1fr; } }
.ux-hero-main, .ux-next { border-radius: 18px; border: 1px solid #ffffff12; padding: 22px; position: relative; overflow: hidden; }
.ux-hero-main { background: radial-gradient(120% 90% at 0% 0%, #0084ff2b, transparent 55%), radial-gradient(90% 90% at 100% 100%, #00e5ff1c, transparent 60%), linear-gradient(140deg, #151a2b, #10141f); }
.ux-id { display: flex; gap: 16px; align-items: center; }
.ux-id h1 { font-size: clamp(24px, 3vw, 34px); margin: 6px 0 2px; }
.ux-addr { margin: 0; font-size: 13px; color: var(--rx-muted); display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.ux-addr a { color: #8fd4ff; text-decoration: none; }
.ux-copy { border: 0; background: #ffffff10; color: #c9cfdc; border-radius: 6px; width: 24px; height: 24px; cursor: pointer; font-size: 12px; display: inline-grid; place-items: center; }
.ux-copy:hover { background: #0084ff33; color: #fff; }
.ux-earned { margin-top: 22px; }
.ux-earned span { display: block; font-size: 13px; color: var(--rx-muted); }
.ux-earned b { display: block; font-size: clamp(34px, 5vw, 52px); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ux-earned b small { font-size: 16px; color: var(--rx-muted); font-weight: 600; letter-spacing: 0; }
.ux-earned em { font-style: normal; font-size: 12px; color: var(--rx-muted); }
.ux-spark { position: absolute; right: 22px; top: 96px; width: 40%; max-width: 300px; height: 70px; }
@media (max-width: 700px) { .ux-spark { position: static; width: 100%; margin-top: 8px; } }
.ux-spark-line { fill: none; stroke: #0084ff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.ux-spark-area { fill: #0084ff1f; }
.ux-bals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.ux-bals div { padding: 10px 12px; border-radius: 12px; background: #0b0e17aa; border: 1px solid #ffffff0d; }
.ux-bals span { display: block; font-size: 12px; color: var(--rx-muted); }
.ux-bals b { font-size: 17px; font-variant-numeric: tabular-nums; }
.ux-next { background: linear-gradient(160deg, #1b1840, #121424); border-color: #0084ff3a; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ux-next-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: #0084ff26; color: #a9e2ff; margin-bottom: 6px; }
.ux-next h2 { font-size: 20px; line-height: 1.3; margin: 2px 0; }
.ux-next p { font-size: 14px; color: #b8bfd2; line-height: 1.55; margin: 0 0 12px; }
.ux-next .button { margin-top: auto; }
.ux-risk { font-size: 12px; color: var(--rx-muted); margin: 0 0 14px; }
.ux-risk a { color: #8fd4ff; }

/* milestones */
.ux-miles { margin-bottom: 16px; overflow-x: auto; }
.ux-miles ol { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 0; list-style: none; margin: 0; padding: 4px 0; counter-reset: m; }
.ux-miles li { position: relative; display: grid; justify-items: center; text-align: center; gap: 2px; padding: 0 6px; }
.ux-miles li::before { content: ''; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px; background: #ffffff14; z-index: 0; }
.ux-miles li:first-child::before { display: none; }
.ux-miles li.ok::before, .ux-miles li.now::before { background: linear-gradient(90deg, #00e5ff, #0084ff); }
.ux-miles li > span { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #151a2a; border: 2px solid #ffffff1c; color: var(--rx-muted); }
.ux-miles li.ok > span { background: #00e5ff; border-color: #00e5ff; color: #04202a; }
.ux-miles li.now > span { border-color: #0084ff; color: #fff; box-shadow: 0 0 0 4px #0084ff2e; }
.ux-miles b { font-size: 13px; margin-top: 4px; }
.ux-miles small { font-size: 11px; color: var(--rx-muted); }

/* level strip */
.ux-hint { font-size: 12px; color: var(--rx-muted); }
.ux-strip { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.ux-lv { display: grid; justify-items: center; gap: 4px; cursor: default; }
.ux-lv-col { width: 100%; height: 110px; border-radius: 8px; background: #ffffff08; border: 1px solid #ffffff0b; display: flex; align-items: flex-end; overflow: hidden; }
.ux-lv-col i { display: block; width: 100%; background: linear-gradient(180deg, #33c6ff, #0084ff); border-radius: 6px 6px 0 0; }
.ux-lv b { font-size: 12px; }
.ux-lv small { font-size: 12px; color: var(--rx-muted); min-width: 22px; text-align: center; border-radius: 6px; }
.ux-lv.on small { background: #0084ff2a; color: #d6f3ff; font-weight: 700; }
.ux-lv:hover .ux-lv-col { border-color: #ffffff2a; }
.ux-more, .ux-how { margin-top: 12px; font-size: 14px; }
.ux-more > summary, .ux-how > summary { cursor: pointer; color: #8fd4ff; font-weight: 600; font-size: 13px; }
.ux-how p { color: #b8bfd2; line-height: 1.6; font-size: 13px; }
.ux-example { padding: 10px 12px; border-radius: 10px; background: #0084ff1a; border: 1px solid #0084ff33; }

/* packages */
.ux-pkgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ux-pkg { position: relative; display: grid; justify-items: center; text-align: center; gap: 3px; padding: 14px 10px 12px; border-radius: 14px; border: 1px solid #ffffff10; background: #ffffff04; }
.ux-pkg.owned { border-color: #00e5ff44; background: #00e5ff0a; }
.ux-pkg img { width: 96px; height: auto; }
.ux-pkg b { font-size: 14px; }
.ux-pkg strong { font-size: 20px; }
.ux-pkg strong small { font-size: 12px; color: var(--rx-muted); }
.ux-pkg-note { font-size: 11px; color: var(--rx-muted); min-height: 30px; }
.ux-pkg .button { margin-top: 4px; width: 100%; }
.ux-pkg .button[disabled] { opacity: .45; cursor: not-allowed; }
.ux-own { position: absolute; top: 8px; right: 8px; font-size: 10px; font-weight: 800; letter-spacing: .04em; color: #04202a; background: #00e5ff; border-radius: 6px; padding: 2px 6px; }

/* segmented control */
.ux-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: #0b0e17; border: 1px solid #ffffff12; }
.ux-seg button { border: 0; background: none; color: var(--rx-muted); font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.ux-seg button small { opacity: .7; margin-left: 2px; }
.ux-seg button.on { background: #0084ff2e; color: #fff; }

/* tree diagram */
.ux-tree { overflow: auto; max-height: 560px; margin-top: 12px; border-radius: 14px; background: radial-gradient(100% 60% at 50% 0%, #0084ff10, transparent 70%), #0b0e17; border: 1px solid #ffffff0b; max-height: 720px; }
.ux-tree svg { display: block; margin: 0 auto; }
.ux-te { fill: none; stroke: #0084ff55; stroke-width: 1.6; }
.ux-tl { fill: #79849a; font-size: 11px; font-weight: 700; }
.ux-tn circle { --h: 250; fill: hsl(var(--h) 55% 45%); stroke: #0b0e17; stroke-width: 3; transition: stroke .15s; }
.ux-tn:hover circle, .ux-tn:focus circle { stroke: #fff; }
.ux-tn.me circle { stroke: #00e5ff; stroke-width: 3; }
.ux-tn.up circle { fill-opacity: .55; }
.ux-tn-i { fill: #fff; font-size: 12px; font-weight: 800; text-anchor: middle; pointer-events: none; }
.ux-tn-n { fill: #e3e6f1; font-size: 12px; font-weight: 600; text-anchor: middle; }
.ux-tn-t { fill: #8f99ae; font-size: 10px; text-anchor: middle; }
.ux-tn-more { fill: #8f99ae; font-size: 12px; text-anchor: middle; }
.ux-empty { text-align: center; padding: 18px 10px 6px; }
.ux-empty b { font-size: 16px; }
.ux-empty p { color: var(--rx-muted); font-size: 14px; margin: 4px 0 12px; }

/* withdraw preview */
.ux-np { margin-top: 14px; padding: 14px; border-radius: 14px; border: 1px dashed #ffffff1c; display: grid; gap: 10px; }
.ux-np-top { display: flex; align-items: center; gap: 12px; }
.ux-np-top span, .ux-np-top small { display: block; font-size: 12px; color: var(--rx-muted); }
.ux-np-top b { font-size: 16px; }
.ux-np-bar { height: 10px; border-radius: 10px; background: #ffffff0d; overflow: hidden; }
.ux-np-bar i { display: block; height: 100%; background: linear-gradient(90deg, #00e5ff, #0084ff); }
.ux-np > small { font-size: 12px; color: var(--rx-muted); }

/* activity */
.ux-group { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #79849a; margin: 16px 0 4px; }
.ux-acts { max-height: 640px; overflow: auto; }
.ux-act > summary { list-style: none; cursor: pointer; border-radius: 10px; padding-right: 6px; }
.ux-act > summary::-webkit-details-marker { display: none; }
.ux-act > summary:hover { background: #ffffff06; }
.ux-act .activity-row > b { white-space: nowrap; }
.ux-act .activity-row > b small { display: inline; font-size: 11px; color: var(--rx-muted); }
.ux-chev { color: var(--rx-muted); font-size: 12px; transition: transform .15s; margin-left: 4px; }
.ux-act[open] .ux-chev { transform: rotate(180deg); }
.ux-split { margin: 4px 0 12px 42px; padding: 10px 12px; border-radius: 12px; background: #0b0e17; border: 1px solid #ffffff0d; }
.ux-split-head { font-size: 13px; color: #b8bfd2; margin-bottom: 6px; }
.ux-split .ra-table td { padding: 5px 6px; font-size: 12px; }
.ux-split tr.me td { color: #fff; background: #0084ff14; }
@keyframes ux-flash { from { background: #00e5ff33; } to { background: transparent; } }
.ux-fresh > summary { animation: ux-flash 3s ease-out; }
.toast.ux-toast-reward { border-color: #00e5ff66; }

/* invite */
.ux-invite { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; margin-top: 16px;
  background: radial-gradient(90% 120% at 100% 0%, #00e5ff14, transparent 60%), linear-gradient(140deg, #141927, #10141f); }
@media (max-width: 760px) { .ux-invite { grid-template-columns: 1fr; } }
.ux-invite h2 { font-size: 20px; margin: 4px 0; }
.ux-invite p { color: #b8bfd2; font-size: 14px; margin: 0 0 12px; }
.ux-code { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: #0b0e17; border: 1px solid #ffffff12; margin-bottom: 10px; }
.ux-code span { font-size: 12px; color: var(--rx-muted); }
.ux-code b { font-family: ui-monospace, monospace; font-size: 16px; letter-spacing: .08em; color: #9ff6ff; }
.ux-share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ux-qr { width: 168px; height: 168px; padding: 8px; border-radius: 14px; background: #fff; justify-self: center; }
.ux-qr svg { width: 100%; height: 100%; display: block; }

/* bottom navigation on phones */
.ux-bottom { display: none; }
@media (max-width: 760px) {
  .app-page .app-sidebar { display: none; }
  .app-page .app-main { margin-left: 0; padding-bottom: 72px; }
  .ux-bottom { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: #0a0d16f2; backdrop-filter: blur(14px); border-top: 1px solid #ffffff12; }
  .ux-bottom a { display: grid; justify-items: center; gap: 2px; padding: 4px 0; color: var(--rx-muted); text-decoration: none; font-size: 11px; font-weight: 600; border-radius: 10px; }
  .ux-bottom a span { font-size: 17px; }
  .ux-bottom a.active { color: #fff; background: #0084ff22; }
  .ux-bals { grid-template-columns: 1fr 1fr 1fr; }
  .ux-bals b { font-size: 14px; }
  .ux-strip { gap: 3px; }
  .ux-lv-col { height: 80px; }
  .ux-split { margin-left: 0; }
}

/* org chart (top-down team tree) */
.ux-av-xs { width: 22px; height: 22px; font-size: 9px; }
.ux-mid { font-family: ui-monospace, monospace; color: #9ff6ff; font-size: 12px; letter-spacing: .04em; }
.oc-wrap { overflow: auto; margin-top: 12px; padding: 18px 12px 22px; border-radius: 14px; border: 1px solid #ffffff0b;
  background: radial-gradient(100% 60% at 50% 0%, #0084ff10, transparent 70%), #0b0e17; max-height: 720px; }
.oc-up { display: flex; flex-direction: column; align-items: center; gap: 0; margin: 0 auto 0; width: max-content; min-width: 100%; }
.oc-more { font-size: 12px; color: var(--rx-muted); padding-bottom: 4px; }
.oc-pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px solid #ffffff14; background: #ffffff06; color: #c9cfdc; text-decoration: none; font-size: 12px; position: relative; margin-bottom: 18px; }
.oc-pill small { color: var(--rx-muted); font-size: 11px; }
.oc-pill:hover { border-color: #0084ff88; }
.oc-pill::after { content: ''; position: absolute; left: 50%; top: 100%; height: 18px; border-left: 2px solid #0084ff55; }
.oc, .oc ul { display: flex; justify-content: center; margin: 0; padding: 0; list-style: none; }
.oc { width: max-content; min-width: 100%; }
.oc ul { position: relative; padding-top: 22px; }
.oc li { position: relative; display: flex; flex-direction: column; align-items: center; padding: 22px 6px 0; }
.oc > li { padding-top: 0; }
/* connectors: horizontal bar across siblings, short vertical into each child */
.oc li::before, .oc li::after { content: ''; position: absolute; top: 0; width: 50%; height: 22px; border-top: 2px solid #0084ff55; }
.oc li::before { right: 50%; }
.oc li::after { left: 50%; border-left: 2px solid #0084ff55; }
.oc li:only-child::before, .oc li:only-child::after { display: none; }
.oc li:only-child { padding-top: 0; }
.oc li:first-child::before, .oc li:last-child::after { border: 0 none; }
.oc li:last-child::before { border-right: 2px solid #0084ff55; border-radius: 0 8px 0 0; }
.oc li:first-child::after { border-radius: 8px 0 0 0; }
.oc > li::before, .oc > li::after { display: none; }
.oc ul::before { content: ''; position: absolute; top: 0; left: 50%; height: 22px; border-left: 2px solid #0084ff55; }
/* cards */
.oc-card { position: relative; display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 6px; border-radius: 12px; border: 1px solid #ffffff14; background: #151a2a; min-width: 150px; }
.oc-card.me { border-color: #00e5ffaa; background: linear-gradient(140deg, #163a33, #151a2a); box-shadow: 0 0 0 3px #00e5ff1a; }
.oc-main { display: flex; align-items: center; gap: 8px; flex: 1; color: inherit; text-decoration: none; min-width: 0; }
.oc-main span { display: grid; text-align: left; min-width: 0; }
.oc-main b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.oc-main small { font-size: 11px; color: var(--rx-muted); white-space: nowrap; }
.oc-card:hover { border-color: #0084ff88; }
.oc-lv { position: absolute; top: -9px; left: 10px; font-size: 9px; font-weight: 800; letter-spacing: .05em; padding: 1px 6px; border-radius: 6px; background: #2a2450; color: #a9e2ff; }
.oc-toggle { flex: none; min-width: 28px; height: 26px; padding: 0 6px; border-radius: 8px; border: 1px solid #ffffff1a; background: #0b0e17; color: #a9e2ff; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.oc-toggle:hover { background: #0084ff2e; color: #fff; }
.oc-toggle[aria-expanded="false"] { background: #0084ff22; border-color: #0084ff66; }

/* hero card v2 */
.hx { display: flex; flex-direction: column; gap: 20px; padding: 24px; }
.hx-top { display: flex; gap: 16px; align-items: center; }
.hx-who { min-width: 0; }
.hx-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hx-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 3px 9px; border-radius: 99px; border: 1px solid #ffffff14; color: #b8bfd2; background: #ffffff06; }
.hx-tag.me { color: #9ff6ff; border-color: #00e5ff44; }
.hx-tag.ro { color: #7fdcff; border-color: #33c6ff44; }
.hx-tag.live i { width: 7px; height: 7px; border-radius: 50%; background: #00e5ff; box-shadow: 0 0 0 3px #00e5ff22; }
.hx h1 { margin: 6px 0 8px; font-size: clamp(24px, 3vw, 32px); line-height: 1.15; font-weight: 800; letter-spacing: -.01em; overflow-wrap: anywhere; }
.hx-hi { font-weight: 500; color: #b8bfd2; }
.hx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hx-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; background: #0b0e17b3; border: 1px solid #ffffff0f; font-size: 12px; color: var(--rx-muted); text-decoration: none; }
.hx-chip b { color: #e3e6f1; font-weight: 600; }
.hx-chip code { font-size: 12px; color: #c9cfdc; }
.hx-chip .ux-copy { width: 20px; height: 20px; font-size: 11px; background: transparent; }
a.hx-chip:hover { border-color: #0084ff66; }
.hx-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; align-items: stretch; }
@media (max-width: 700px) { .hx-body { grid-template-columns: 1fr; } }
.hx-label { font-size: 13px; color: var(--rx-muted); }
.hx-amount { font-size: clamp(40px, 5.5vw, 58px); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.hx-amount small { font-size: 16px; font-weight: 600; color: var(--rx-muted); letter-spacing: 0; margin-left: 8px; }
.hx-usd { font-size: 13px; color: var(--rx-muted); }
.hx-mix { display: flex; gap: 2px; height: 8px; margin: 16px 0 10px; border-radius: 8px; overflow: hidden; background: #ffffff0d; }
.hx-mix i { display: block; height: 100%; }
.hx-mix .hx-none { background: #ffffff10; }
.hx-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hx-legend li { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 8px; font-size: 13px; color: #b8bfd2; }
.hx-legend b { font-variant-numeric: tabular-nums; color: #e3e6f1; font-weight: 600; }
.hx-chart { position: relative; display: flex; flex-direction: column; padding: 14px 14px 10px; border-radius: 14px; background: #0b0e17b3; border: 1px solid #ffffff0d; min-height: 170px; }
.hx-chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; color: var(--rx-muted); margin-bottom: 8px; }
.hx-chart-head b { font-weight: 600; color: var(--rx-muted); }
.hx-chart-head b.up { color: #00e5ff; }
.hx-chart svg { width: 100%; flex: 1; min-height: 90px; display: block; overflow: visible; }
.hx-base { stroke: #ffffff12; stroke-width: 1; vector-effect: non-scaling-stroke; }
.hx-area { fill: url(#hx-fill); }
.hx-line { fill: none; stroke: #0084ff; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.hx-dot { position: absolute; width: 10px; height: 10px; margin: 0; border-radius: 50%; background: #0084ff; box-shadow: 0 0 0 4px #0084ff33; transform: translate(-50%, -50%); pointer-events: none; }
.hx-plot { position: relative; flex: 1; display: flex; min-height: 90px; }
.hx-plot svg { flex: 1; }
.hx-axis { display: flex; justify-content: space-between; font-size: 11px; color: #79849a; margin-top: 6px; }
.hx-chart-empty { flex: 1; display: grid; place-items: center; font-size: 13px; color: var(--rx-muted); border: 1px dashed #ffffff14; border-radius: 10px; }
.hx-bals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid #ffffff0f; padding-top: 16px; }
.hx-bals > div { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 0 14px; border-left: 1px solid #ffffff0f; }
.hx-bals > div:first-child { border-left: 0; padding-left: 0; }
.hx-bals .hx-ico { grid-row: span 2; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 14px; font-weight: 800; }
.hx-ico.rpx { background: #0084ff24; color: #a9e2ff; }
.hx-ico.usdt { background: #00e5ff1c; color: #9ff6ff; }
.hx-ico.gas { background: #33c6ff1a; color: #7fdcff; font-size: 13px; }
.hx-bals span:not(.hx-ico) { font-size: 12px; color: var(--rx-muted); }
.hx-bals b { font-size: 17px; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .hx { padding: 18px; gap: 16px; }
  .hx-top { align-items: flex-start; }
  .hx-top .ux-av-lg { width: 48px; height: 48px; font-size: 17px; }
  .hx-bals > div { padding: 0 8px; column-gap: 6px; }
  .hx-bals .hx-ico { width: 26px; height: 26px; font-size: 12px; }
  .hx-bals b { font-size: 14px; }
}

/* reward cards (right of the hero) */
.rc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .rc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { .rc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .rc-grid { grid-template-columns: 1fr; } }
.rc { --c: #0084ff; position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 6px; text-align: left; padding: 14px; border-radius: 16px; cursor: pointer;
  border: 1px solid #ffffff12; background: linear-gradient(160deg, color-mix(in oklab, var(--c) 16%, #141927), #10141f 70%); color: inherit; font: inherit; overflow: hidden; transition: border-color .15s, transform .15s; }
.rc:hover { border-color: color-mix(in oklab, var(--c) 60%, transparent); transform: translateY(-2px); }
.rc:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.rc::after { content: ''; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, color-mix(in oklab, var(--c) 30%, transparent), transparent 70%); pointer-events: none; }
.rc-investment { --c: #00e5ff; } .rc-direct { --c: #00a6d6; } .rc-tenLevel { --c: #0084ff; } .rc-placement { --c: #0050f0; }
.rc-top { display: flex; align-items: center; gap: 8px; }
.rc-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 15px; background: color-mix(in oklab, var(--c) 28%, transparent); color: #fff; }
.rc-pct { font-size: 12px; font-weight: 800; color: color-mix(in oklab, var(--c) 70%, #fff); }
.rc-state { margin-left: auto; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; border: 1px solid #ffffff1c; color: #b8bfd2; position: relative; z-index: 1; }
.rc.active .rc-state { color: #9ff6ff; border-color: #00e5ff55; background: #00e5ff12; }
.rc.locked .rc-state { color: #7fdcff; border-color: #33c6ff55; background: #33c6ff12; }
.rc.pending .rc-state { color: #b8bfd2; }
.rc-title { font-size: 14px; font-weight: 700; margin-top: 4px; }
.rc-amt { font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rc-amt small { font-size: 12px; font-weight: 600; color: var(--rx-muted); margin-left: 5px; letter-spacing: 0; }
.rc.pending .rc-amt { color: #79849a; }
.rc-rule { font-size: 12px; line-height: 1.45; color: #b8bfd2; }
.rc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--rx-muted); }
.rc-pips { display: inline-flex; gap: 3px; }
.rc-pips i { width: 12px; height: 6px; border-radius: 3px; background: #ffffff1a; }
.rc-pips i.on { background: var(--c); }
.rc-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; border-top: 1px solid #ffffff0d; font-size: 11px; color: #79849a; }
.rc-go { color: color-mix(in oklab, var(--c) 70%, #fff); font-weight: 700; white-space: nowrap; }
.rc-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; margin-bottom: 6px; border-radius: 10px; background: #ffffff08; font-size: 13px; }
.rc-filter button { margin-left: auto; border: 0; background: #ffffff10; color: #e3e6f1; border-radius: 8px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.rc-filter button:hover { background: #0084ff33; }
/* how it works panel */
.ux-steps { list-style: none; counter-reset: s; margin: 4px 0 0; padding: 0; display: grid; gap: 14px; }
.ux-steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 2px 12px; }
.ux-steps li::before { content: counter(s); grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #0084ff26; color: #bfeaff; }
.ux-steps b { font-size: 14px; }
.ux-steps span { font-size: 13px; line-height: 1.55; color: #b8bfd2; }
.ux-steps .ra-sw { display: inline-block; vertical-align: middle; margin-right: 3px; }
.ux-howpanel .ux-example { margin-top: 14px; font-size: 13px; color: #d8cfae; }

/* let the chart fill the height when the reward cards are taller */
.hx-body { flex: 1; }
.hx-chart { height: 100%; }

/* pages */
.pg-head { margin: 2px 0 18px; }
.pg-back { font-size: 13px; color: var(--rx-muted); text-decoration: none; }
.pg-back:hover { color: #a9e2ff; }
.pg-head h1 { font-size: clamp(24px, 3vw, 32px); margin: 6px 0 4px; font-weight: 800; }
.pg-head p { margin: 0; color: var(--rx-muted); font-size: 14px; }
.pg-head + .ra-section, .pg-head + .panel { margin-top: 0; }
.rc-grid.rc-wide { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
@media (max-width: 1100px) { .rc-grid.rc-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .rc-grid.rc-wide { grid-template-columns: 1fr; } }
/* overview previews */
.pv-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-top: 4px; }
@media (max-width: 900px) { .pv-grid { grid-template-columns: 1fr; } }
.pv-col { display: grid; gap: 16px; align-content: start; }
.pv .panel-head { margin-bottom: 6px; }
.pv-row { padding: 9px 0; }
.pv-team { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 10px; }
.pv-team a { text-decoration: none; }
.pv-more { font-size: 12px; color: var(--rx-muted); margin-left: 4px; }
.pv-stats { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--rx-muted); }
.pv-stats b { color: #e3e6f1; }
.pv-inv { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: #0b0e17; border: 1px solid #ffffff10; }
.pv-inv code { font-size: 16px; letter-spacing: .08em; color: #9ff6ff; }
.ux-bottom a.active, .side-link.active { color: #fff; }
.pv-row > b { white-space: nowrap; }
.pv-row > b small { display: inline; font-size: 11px; color: var(--rx-muted); }
/* on their own pages, lists use the page scroll instead of an inner one */
.pg-head ~ #activity .ux-acts, .pg-head ~ #team .oc-wrap { max-height: none; }

/* --- visual-first: fewer words --- */
.hx-tag.role { color: #7fdcff; border-color: #33c6ff44; cursor: help; }
.hx-keys { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--rx-muted); }
.hx-keys span { display: inline-flex; align-items: center; gap: 5px; }
.hx-keys .ra-sw { width: 8px; height: 8px; }
.hx-chart-empty { font-size: 28px; opacity: .5; }
.ux-risk { font-size: 11px; }
.rc-rule { font-size: 12px; color: #c9cfdc; font-weight: 600; }
.rc-foot { font-size: 11px; }
.rc-go { font-size: 16px; line-height: 1; }
.rc-state { font-size: 11px; }
/* split diagrams (how it works, withdraw) */
.fl { display: grid; gap: 10px; margin-top: 4px; }
.fl-row { display: flex; align-items: center; gap: 10px; }
.fl-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #0084ff26; color: #bfeaff; font-size: 16px; }
.fl-lbl { color: var(--rx-muted); font-size: 13px; }
.fl-val { margin-left: auto; font-size: 18px; }
.fl-bar { display: flex; gap: 3px; height: 34px; border-radius: 10px; overflow: hidden; }
.fl-bar i { display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; color: #fff; min-width: 26px; white-space: nowrap; overflow: hidden; }
.fl-plat { background: #3a4057; color: #c9cfdc !important; }
.fl-rew { background: linear-gradient(90deg, #0050f0, #44d6bd); }
.fl-wallet { background: linear-gradient(90deg, #00a6d6, #00e5ff); }
.fl-next { background: linear-gradient(90deg, #0050f0, #0084ff); }
.fl-arrow { text-align: right; font-size: 12px; font-weight: 700; color: #9ff6ff; padding-right: 4px; }
.fl-split i { cursor: help; }
.fl-keys { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--rx-muted); }
.fl-keys span { display: inline-flex; align-items: center; gap: 5px; }
.fl-keys .ra-sw { width: 8px; height: 8px; }
.fl-ex { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding: 10px 12px; border-radius: 12px; background: #0084ff1a; border: 1px solid #0084ff33; font-size: 13px; color: #e3d6b0; }
.fl-ex b { margin-left: auto; color: #9fe6ff; }
.fl-ex-arrow { color: var(--rx-muted); }
.ux-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--rx-muted); }
.ux-key .k-bar { width: 8px; height: 14px; border-radius: 2px; background: #0084ff; }
.ux-key .k-num { font-style: normal; font-size: 11px; font-weight: 700; padding: 0 5px; border-radius: 5px; background: #0084ff2a; color: #d6f3ff; margin-left: 6px; }
/* bigger tree cards on the Team page */
.pg-head ~ #team .oc-card { min-width: 170px; padding: 8px 10px 8px 8px; }
.pg-head ~ #team .oc-card .ux-av-sm { width: 36px; height: 36px; font-size: 13px; }
.pg-head ~ #team .oc-main b { font-size: 14px; }
.pg-head ~ #team .oc ul, .pg-head ~ #team .oc li { --gap: 26px; }

/* history pagination */
.pg-head ~ #activity .ux-acts { max-height: none; overflow: visible; }
.pgn { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid #ffffff0d; }
.pgn-info { font-size: 12px; color: var(--rx-muted); font-variant-numeric: tabular-nums; }
.pgn-btns { display: flex; align-items: center; gap: 4px; }
.pgn-btns button { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 9px; border: 1px solid #ffffff14; background: #0b0e17; color: #c9cfdc; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.pgn-btns button:hover:not([disabled]) { border-color: #0084ff88; color: #fff; }
.pgn-btns button.on { background: #0084ff; border-color: #0084ff; color: #fff; }
.pgn-btns button[disabled] { opacity: .35; cursor: default; }
.pgn-gap { color: var(--rx-muted); padding: 0 2px; }
/* bonus RPX (locked until listing) */
.hx-bals { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 700px) { .hx-bals { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; } .hx-bals > div:nth-child(3) { border-left: 0; padding-left: 0; } }
.hx-ico.bonus { background: #33c6ff22; color: #33c6ff; font-size: 13px; }
.hx-bonus b { color: #33c6ff; }
.hx-bonus { cursor: help; }
.pkg-bonus { color: #33c6ff; white-space: nowrap; }

/* ---- contract v2: reward balance tile, withdraw page, investment plan ---- */
.hx-bals > a.hx-bal-link { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 0; color: inherit; text-decoration: none; }
.hx-bals > a.hx-bal-link .hx-ico { grid-row: span 2; }
.hx-bals > a.hx-bal-link:hover b { color: #9ff6ff; }
#withdraw .wd-go { margin-top: 14px; }
.inv-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 4px 0 14px; }
.inv-claim { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-bottom: 12px; border-radius: 14px; background: #00e5ff12; border: 1px solid #00e5ff33; }
.inv-claim > div { display: grid; gap: 2px; }
.inv-claim span { font-size: 12px; color: var(--rx-muted); }
.inv-claim b { font-size: 22px; font-variant-numeric: tabular-nums; }
.inv-claim small { font-size: 11.5px; color: var(--rx-muted); }
.inv-cap { height: 6px; border-radius: 99px; background: #ffffff14; overflow: hidden; min-width: 90px; }
.inv-cap i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #00e5ff, #0084ff); }
.ux-pkg.lower { opacity: .5; }
.ux-act-flat .activity-row { padding-right: 34px; }

/* ---- tree: rewards from each person ---- */
#team .oc-card { display: grid; grid-template-columns: 1fr auto; align-items: center; row-gap: 6px; cursor: pointer; min-width: 190px; max-width: 240px; }
#team .oc-card.me { cursor: default; }
#team .oc-card .oc-rw { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
#team .oc-card.paid { border-color: #00e5ff55; background: linear-gradient(180deg, #00e5ff0f, #151a2a); }
#team .oc-card.sel { outline: 2px solid #0084ff; outline-offset: 2px; }
#team .oc-card:not(.me):hover { border-color: #0084ff88; }
.oc-path { color: #8fd4ff !important; font-size: 10.5px !important; }
.oc-open { margin-left: auto; align-self: flex-start; font-size: 12px; color: var(--rx-muted); text-decoration: none; padding: 0 2px; }
.oc-open:hover { color: #fff; }
.oc-tot { flex-basis: 100%; font-size: 12px; font-weight: 800; color: #7df3ff; }
.oc-r { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 99px; color: #e5e7eb; background: #ffffff10; border: 1px solid #ffffff1c; white-space: nowrap; }
.oc-r b { font-variant-numeric: tabular-nums; }
.oc-r.ra-direct { background: #33c6ff22; border-color: #33c6ff55; }
.oc-r.ra-tenLevel { background: #33c6ff22; border-color: #33c6ff55; }
.oc-r.ra-placement { background: #0050f022; border-color: #0050f055; }
.oc-r.ra-investment { background: #33c6ff22; border-color: #33c6ff55; }
.oc-none { font-size: 10.5px; color: var(--rx-muted); }
.oc-hint { font-size: 12.5px; color: var(--rx-muted); margin: 6px 0 10px; line-height: 1.9; }
.oc-detail { margin-top: 14px; border: 1px solid #0084ff55; border-radius: 16px; padding: 14px; background: #0084ff0d; }
.oc-detail-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.oc-detail-h > div { display: grid; gap: 2px; flex: 1; }
.oc-detail-h small { color: var(--rx-muted); font-size: 12px; }
.oc-detail td .oc-r { margin: 1px 0; }
.oc-x { border: 0; background: #ffffff12; color: inherit; border-radius: 8px; width: 28px; height: 28px; cursor: pointer; }

/* ---- overview: withdraw box ---- */
.wdb { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; margin: 14px 0 6px; }
.wdb > div { display: grid; align-content: start; gap: 6px; padding: 18px 20px; border-radius: 18px; border: 1px solid #ffffff14; background: #121726; }
.wdb-main { background: linear-gradient(135deg, #00e5ff24, #121726 60%) !important; border-color: #00e5ff55 !important; }
.wdb-k { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--rx-muted); }
.wdb-amt { font-size: 34px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.wdb-amt.sm { font-size: 24px; }
.wdb-amt small { font-size: 14px; color: var(--rx-muted); }
.wdb-sub { font-size: 12.5px; color: var(--rx-muted); }
.wdb-split { font-size: 12.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wdb-split i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.wdb-split i.w { background: #00e5ff; } .wdb-split i.p { background: #0084ff; margin-left: 8px; }
.wdb-need { height: 8px; border-radius: 99px; background: #ffffff14; overflow: hidden; }
.wdb-need i { display: block; height: 100%; background: linear-gradient(90deg, #00e5ff, #0084ff); border-radius: inherit; }
.wdb-act { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.wdb-act small { color: var(--rx-muted); font-size: 12px; }
.wdb-side .button { justify-self: start; }
@media (max-width: 760px) { .wdb { grid-template-columns: 1fr; } }
#team .oc-card .oc-main { grid-column: 1; grid-row: 1; }
#team .oc-card .oc-toggle { grid-column: 2; grid-row: 1; align-self: start; }
#team .oc-card .oc-rw { grid-row: 2; }

/* ---- logo ---- */
.brand.brand-logo { display: block; padding: 2px 0; }
.brand.brand-logo img { display: block; width: 168px; height: auto; }

/* ---- top bar summary ---- */
.app-topbar { gap: 14px; }
.tb-sum { flex: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; min-width: 0; }
.tb-grp { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 12px; background: #ffffff08; border: 1px solid #ffffff12; }
.tb-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--rx-muted); padding: 2px 4px; }
.tb-chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.tb-chip.ra-direct i { background: #33c6ff; } .tb-chip.ra-tenLevel i { background: #33c6ff; } .tb-chip.ra-placement i { background: #0050f0; }
.tb-chip b, .tb-k b, .tb-total b { color: #fff; font-variant-numeric: tabular-nums; }
.tb-total { font-size: 12px; color: #7df3ff; padding-left: 4px; border-left: 1px solid #ffffff1a; margin-left: 2px; }
.tb-total b { color: #7df3ff; font-size: 14px; }
.tb-k { font-size: 12px; color: var(--rx-muted); text-decoration: none; white-space: nowrap; padding: 0 4px; }
a.tb-k:hover b { color: #8fd4ff; }
.tb-bonus b { color: #33c6ff; }
.tb-wd { background: #00e5ff12; border-color: #00e5ff40; }
.tb-act .button, .tb-wd .button { padding: 6px 12px; min-height: 0; font-size: 12px; }
@media (max-width: 1100px) { .tb-earn { display: none; } }
@media (max-width: 760px) { .tb-sum { display: none; } }

/* ---- invest dialog ---- */
.inv-dlg { border: 1px solid #ffffff22; border-radius: 18px; background: #121726; color: inherit; padding: 22px; width: min(420px, calc(100vw - 32px)); }
.inv-dlg::backdrop { background: #02040acc; backdrop-filter: blur(4px); }
.inv-form { display: grid; gap: 12px; }
.inv-form h3 { margin: 0; }
.inv-form label { display: grid; gap: 6px; font-size: 13px; color: var(--rx-muted); }
.inv-form input { padding: 10px 12px; border-radius: 10px; border: 1px solid #ffffff22; background: #0b0f1c; color: #fff; font-size: 16px; }
.inv-prev { font-size: 12.5px; color: #7df3ff; min-height: 1.2em; margin: 0; }
.inv-btns { display: flex; justify-content: flex-end; gap: 8px; }
/* top bar: grows to fit the summary; plain chips */
.app-page .app-topbar { height: auto; min-height: 68px; padding-top: 10px; padding-bottom: 10px; flex-wrap: nowrap; align-items: center; }
.app-page .app-topbar .breadcrumb { flex: 0 0 auto; }
.tb-chip.tb-c-direct i { background: #33c6ff; } .tb-chip.tb-c-tenLevel i { background: #33c6ff; } .tb-chip.tb-c-placement i { background: #0050f0; }
.tb-chip { background: none !important; }

.brand.brand-logo { margin-bottom: 18px; }

/* ---- clean top HUD: no breadcrumb, one row ---- */
.app-page .app-topbar .breadcrumb { display: none; }
.app-page .app-topbar { min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
.tb-sum { flex-wrap: nowrap; justify-content: flex-start; gap: 10px; }
.tb-grp { flex: 0 0 auto; height: 40px; padding: 0 10px; border-radius: 12px; }
.tb-sum .tb-grp .button { height: 30px; display: inline-flex; align-items: center; }
.tb-act { background: none; border: 0; padding: 0; gap: 8px; }
.tb-act .button { height: 40px !important; padding: 0 14px !important; font-size: 13px !important; }
@media (max-width: 1560px) { .tb-earn .tb-chip { display: none; } .tb-total { border-left: 0; margin: 0; padding: 0; } }
@media (max-width: 1200px) { .tb-bal { display: none; } }
@media (max-width: 900px) { .tb-earn { display: none; } }
.app-page .topbar-actions { margin-left: 12px; flex: 0 0 auto; }
@media (max-width: 1560px) { .tb-eq { display: none; } }
@media (max-width: 1400px) { .tb-sum { gap: 8px; } .tb-act .button { padding: 0 10px !important; } }

/* ---- HUD: current plan + prominent animated buttons ---- */
.tb-plan { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 6px; border-radius: 12px; text-decoration: none; color: inherit;
  background: linear-gradient(135deg, #0084ff22, #00e5ff14); border: 1px solid #0084ff55; }
.tb-plan img { width: 34px; height: 30px; object-fit: contain; filter: drop-shadow(0 0 6px #0084ff88); }
.tb-plan span { display: grid; line-height: 1.1; }
.tb-plan small { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--rx-muted); }
.tb-plan b { font-size: 13px; white-space: nowrap; }
.tb-plan-none { width: 28px; text-align: center; color: var(--rx-muted); }
.tb-top { font-size: 12.5px; font-weight: 700; color: #33c6ff; padding: 0 6px; }

.tb-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border: 0; border-radius: 12px;
  font: inherit; font-size: 13.5px; font-weight: 800; color: #fff; cursor: pointer; white-space: nowrap; transition: transform .15s ease, box-shadow .2s ease, filter .2s ease; }
.tb-btn small { font-weight: 600; opacity: .85; font-size: 12px; }
.tb-btn .tb-ico { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: #ffffff2e; font-size: 12px; }
.tb-btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); }
.tb-btn:active:not(:disabled) { transform: translateY(0) scale(.98); }
.tb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tb-btn:disabled { cursor: not-allowed; opacity: .55; filter: saturate(.6); }
.tb-sum .tb-wd .tb-btn { height: 32px; padding: 0 14px; border-radius: 10px; }

/* upgrade: violet -> cyan, moving shine */
.tb-btn-up { background: linear-gradient(110deg, #0050f0, #0084ff 45%, #00e5ff); box-shadow: 0 6px 20px -6px #0050f0aa; }
.tb-btn-up::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, #ffffff55 50%, transparent 70%); transform: translateX(-120%); animation: tb-shine 3.2s ease-in-out infinite; }
/* invest: green, soft glow */
.tb-btn-inv { background: linear-gradient(110deg, #0084ff, #33c6ff 55%, #00e5ff); box-shadow: 0 6px 20px -6px #33c6ffaa; animation: tb-glow-g 2.8s ease-in-out infinite; }
/* withdraw: only animated when it can be used */
.tb-btn-wd { background: linear-gradient(110deg, #0050f0, #0084ff); box-shadow: 0 0 0 0 #0050f066; animation: tb-ring 2s ease-out infinite; }
.tb-btn-off { background: #ffffff14; color: var(--rx-muted); font-weight: 700; }
.tb-btn:disabled::after { animation: none; }
.tb-btn:disabled { animation: none; }

@keyframes tb-shine { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@keyframes tb-glow-g { 0%, 100% { box-shadow: 0 6px 18px -8px #33c6ffaa; } 50% { box-shadow: 0 6px 26px -4px #00e5ffdd; } }
@keyframes tb-ring { 0% { box-shadow: 0 0 0 0 #0050f077; } 70% { box-shadow: 0 0 0 10px #0050f000; } 100% { box-shadow: 0 0 0 0 #0050f000; } }
@media (prefers-reduced-motion: reduce) { .tb-btn, .tb-btn::after { animation: none !important; transition: none; } }
@media (max-width: 1400px) { .tb-btn small { display: none; } .tb-plan small { display: none; } }
@media (max-width: 1200px) { .tb-plan span { display: none; } .tb-plan { padding: 0 6px; } }

/* ---- HUD v3: two-line stats, no overlap ---- */
.tb-sum { overflow: hidden; }
.tb-st { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px; }
.tb-st > span { display: grid; line-height: 1.15; }
.tb-st small { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--rx-muted); white-space: nowrap; }
.tb-st b { font-size: 13.5px; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tb-st b em { font-style: normal; font-size: 10.5px; color: var(--rx-muted); font-weight: 600; }
.tb-total { border-left: 1px solid #ffffff1a !important; margin-left: 2px; padding-left: 10px !important; }
.tb-total b { color: #7df3ff; font-size: 15px; }
.tb-bonus b { color: #33c6ff; }
.tb-grp { gap: 4px; }
@media (max-width: 1750px) { .tb-btn small { display: none; } }
@media (max-width: 1620px) { .tb-earn .tb-chip { display: none !important; } .tb-total { border-left: 0 !important; margin: 0; padding-left: 6px !important; } }
@media (max-width: 1460px) { .tb-bal { display: none; } }
@media (max-width: 1160px) { .tb-plan span { display: none; } .tb-plan { padding: 0 6px; } }
@media (max-width: 1000px) { .tb-earn { display: none; } }

/* ---- overview: investment plan ---- */
.ip { margin: 14px 0 6px; padding: 20px; border-radius: 20px; border: 1px solid #00e5ff44; background: radial-gradient(120% 140% at 0% 0%, #00e5ff1f, transparent 55%), radial-gradient(120% 140% at 100% 0%, #0084ff1c, transparent 55%), #10141f; }
.ip-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ip-k { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #7df3ff; }
.ip-head h2 { margin: 4px 0 0; font-size: 32px; font-variant-numeric: tabular-nums; }
.ip-head h2 small { font-size: 14px; color: var(--rx-muted); font-weight: 600; }
.ip-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ip-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 10px; }
.ip-card { display: grid; align-content: start; gap: 3px; padding: 14px; border-radius: 14px; background: #ffffff08; border: 1px solid #ffffff12; color: inherit; text-decoration: none; }
.ip-card small { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--rx-muted); }
.ip-card b { font-size: 20px; font-variant-numeric: tabular-nums; }
.ip-card b i, .ip-claim b i { font-style: normal; font-size: 12px; color: var(--rx-muted); font-weight: 600; }
.ip-card b.up { color: #7df3ff; }
.ip-card em, .ip-claim em { font-style: normal; font-size: 12px; color: var(--rx-muted); }
.ip-plan { grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; border-color: #0084ff55; background: linear-gradient(135deg, #0084ff1f, #ffffff05); }
.ip-plan img { width: 64px; height: 56px; object-fit: contain; filter: drop-shadow(0 0 10px #0084ff99); }
.ip-plan span { display: grid; gap: 2px; }
.ip-plan:hover { border-color: #0084ffaa; }
.ip-none { font-size: 30px; color: var(--rx-muted); width: 64px; text-align: center; }
.ip-cap { margin: 14px 0 12px; }
.ip-cap-top { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--rx-muted); margin-bottom: 6px; }
.ip-cap-top b { color: #fff; }
.ip-bar { height: 10px; border-radius: 99px; background: #ffffff12; overflow: hidden; }
.ip-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #33c6ff, #00e5ff, #0084ff); background-size: 200% 100%; animation: ip-flow 4s linear infinite; }
@keyframes ip-flow { to { background-position: -200% 0; } }
.ip-claim { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 14px; background: #00e5ff14; border: 1px solid #00e5ff44; }
.ip-claim > div { display: grid; gap: 2px; }
.ip-claim small { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #7df3ff; }
.ip-claim b { font-size: 26px; font-variant-numeric: tabular-nums; }
.ip-wd { height: 46px !important; padding: 0 22px !important; font-size: 14.5px !important; }
.ip-more { display: inline-block; margin-top: 10px; font-size: 13px; }
@media (max-width: 1100px) { .ip-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .ip-grid { grid-template-columns: 1fr; } .ip-head h2 { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { .ip-bar i { animation: none; } }

/* ---- investment plan v3: own product ---- */
.ip-rate { display: inline-block; margin-left: 8px; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 800; color: #00213a; background: linear-gradient(90deg, #00e5ff, #00e5ff); vertical-align: middle; }
.ip-sub { font-size: 13px; color: var(--rx-muted); }
.ip-sub b { color: #fff; }
.ip-ladder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.ip-step { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px dashed #ffffff22; text-align: center; }
.ip-step b { font-size: 18px; } .ip-step small { font-size: 11.5px; color: var(--rx-muted); }
.ip-step.on { border: 1px solid #00e5ff; background: #00e5ff1c; box-shadow: 0 0 0 3px #00e5ff1a; }
.ip-step.on b { color: #7df3ff; }
.ip-step.past { opacity: .55; }
.ip-grid { grid-template-columns: repeat(4, 1fr); }
.ip-link { justify-self: start; margin-top: 4px; border: 0; background: none; color: #8fd4ff; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 0; }
.ip-link:hover { color: #fff; }
.ip-claim-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ip-all { height: 46px !important; }
.ip-h3 { margin: 18px 0 8px; font-size: 15px; }

/* connected wallet balance, next to the wallet button */
.tb-walletbal { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 6px; border-radius: 12px; background: #ffffff08; border: 1px solid #ffffff14; }
.tb-walletbal[hidden] { display: none; }
.tb-wb-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #33c6ff26; color: #7df3ff; font-weight: 800; }
.tb-walletbal > span:last-child { display: grid; line-height: 1.15; }
.tb-walletbal small { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--rx-muted); }
.tb-walletbal b { font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tb-walletbal b i { font-style: normal; font-size: 10.5px; color: var(--rx-muted); font-weight: 600; }
.app-page .topbar-actions { display: flex; align-items: center; gap: 8px; }

/* ⓘ info icons (explanations on hover / tap instead of text everywhere) */
.ux-i { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 4px; border-radius: 50%; font-size: 11px; font-style: normal; font-weight: 700; line-height: 1;
  color: #8fd4ff; background: #0084ff1f; border: 1px solid #0084ff55; cursor: help; vertical-align: middle; text-transform: none; letter-spacing: 0; }
.ux-i:hover, .ux-i:focus-visible { color: #fff; background: #0084ff66; outline: none; }

/* avatars: cyan -> blue, like the logo */
.ux-av { background: linear-gradient(135deg, hsl(var(--h) 100% 50%), hsl(calc(var(--h) + 30) 100% 42%)) !important; }

/* Upgrade and Invest: green gradient so they stand out (the only non-logo colour, on purpose) */
.tb-btn-up, .tb-btn-inv { background: linear-gradient(110deg, #047857, #10b981 50%, #34d399) !important; color: #fff !important; text-shadow: 0 1px 1px #0003; }
.tb-btn-up { box-shadow: 0 6px 22px -6px #10b981cc !important; }
.tb-btn-inv { animation: tb-glow-green 2.6s ease-in-out infinite !important; }
.tb-btn-up .tb-ico, .tb-btn-inv .tb-ico { background: #ffffff38; }
.tb-btn-up:hover:not(:disabled), .tb-btn-inv:hover:not(:disabled) { filter: brightness(1.1) saturate(1.1); box-shadow: 0 8px 28px -6px #34d399ee !important; }
@keyframes tb-glow-green { 0%, 100% { box-shadow: 0 6px 18px -8px #10b981aa; } 50% { box-shadow: 0 6px 28px -4px #34d399ee; } }
@media (prefers-reduced-motion: reduce) { .tb-btn-inv { animation: none !important; } }

/* overview: the four reward cards in one row at the top */
.app-page #app > .rc-grid.rc-wide:first-child, .app-page #app > .ux-banner + .rc-grid.rc-wide { margin-top: 4px; }

/* ---- investment plan: engine card on the left ---- */
.ip-wrap { display: grid; grid-template-columns: minmax(270px, 340px) minmax(0, 1fr); gap: 14px; margin: 14px 0 6px; align-items: stretch; }
.ip-wrap > .ip { margin: 0; }
.eng-card { position: relative; overflow: hidden; display: grid; align-content: start; gap: 12px; padding: 18px; border-radius: 20px; border: 1px solid #00e5ff44;
  background: radial-gradient(90% 55% at 50% 48%, #0084ff38, transparent 70%), radial-gradient(60% 40% at 50% 100%, #00e5ff1f, transparent 70%), #0a0f1d; }
.eng-top { display: grid; gap: 2px; }
.eng-top small { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #7df3ff; }
.eng-top b { font-size: 22px; }
.eng-top span { font-size: 12.5px; color: var(--rx-muted); }
.eng-stage { position: relative; height: 250px; display: grid; place-items: center; perspective: 800px; }
.eng-stage > * { grid-area: 1 / 1; }
.eng-ring { width: 236px; height: 236px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 50%, #00e5ff 68%, #0050f0 86%, transparent 100%);
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 63%, #000 66%, transparent 67%); mask: radial-gradient(circle, transparent 62%, #000 63%, #000 66%, transparent 67%);
  filter: drop-shadow(0 0 10px #00e5ff); animation: eng-spin 4s linear infinite; opacity: .9; }
.eng-ring.r2 { width: 200px; height: 200px; animation-duration: 7s; animation-direction: reverse; opacity: .5;
  background: conic-gradient(from 90deg, transparent 0 60%, #33c6ff 80%, transparent 100%); }
.eng-float { position: relative; z-index: 2; animation: eng-float 3.4s ease-in-out infinite; }
.eng-3d { position: relative; width: 200px; transform-style: preserve-3d; animation: eng-turn 7s ease-in-out infinite; }
.eng-3d img { display: block; width: 100%; height: auto; filter: drop-shadow(0 12px 26px #0084ffaa); }
.eng-shine { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  -webkit-mask: var(--img) center / contain no-repeat; mask: var(--img) center / contain no-repeat;
  background: linear-gradient(105deg, transparent 38%, #ffffffb0 50%, transparent 62%); background-size: 260% 100%; animation: eng-sweep 3.8s ease-in-out infinite; }
.eng-floor { align-self: end; width: 210px; height: 26px; border-radius: 50%; background: radial-gradient(ellipse, #00e5ff66, transparent 70%); filter: blur(4px); animation: eng-pulse 3.4s ease-in-out infinite; }
.eng-sparks, .eng-smoke { position: relative; width: 100%; height: 100%; pointer-events: none; }
.eng-sparks { z-index: 3; }
.eng-sparks i { position: absolute; left: 50%; top: 62%; width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px 2px #00e5ff, 0 0 12px 3px #0084ff88;
  opacity: 0; animation: eng-spark var(--t) cubic-bezier(.2, .7, .3, 1) infinite; animation-delay: var(--d); }
.eng-smoke { z-index: 1; }
.eng-smoke i { position: absolute; bottom: 18px; left: calc(50% + var(--sx)); width: 70px; height: 70px; border-radius: 50%;
  background: radial-gradient(circle, #9fd8ff59, #33c6ff1f 45%, transparent 70%); filter: blur(10px); opacity: 0; animation: eng-smoke 5.5s ease-out infinite; animation-delay: var(--d); }
.eng-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.eng-meta span { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: #ffffff08; border: 1px solid #ffffff12; }
.eng-meta small { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--rx-muted); }
.eng-meta b { font-size: 16px; font-variant-numeric: tabular-nums; }
.eng-up { width: 100%; justify-content: center; height: 46px !important; font-size: 14px !important; }
.eng-max { text-align: center; font-weight: 800; color: #7df3ff; padding: 10px; border-radius: 12px; background: #00e5ff14; }
.eng-none .eng-3d img { filter: grayscale(.8) brightness(.6); }
.eng-none .eng-sparks, .eng-none .eng-smoke { display: none; }

@keyframes eng-spin { to { transform: rotate(360deg); } }
@keyframes eng-turn { 0%, 100% { transform: rotateY(-24deg) rotateX(4deg); } 50% { transform: rotateY(24deg) rotateX(-2deg); } }
@keyframes eng-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes eng-sweep { 0%, 30% { background-position: 130% 0; } 70%, 100% { background-position: -30% 0; } }
@keyframes eng-pulse { 0%, 100% { opacity: .55; transform: scaleX(.9); } 50% { opacity: 1; transform: scaleX(1.05); } }
@keyframes eng-spark { 0% { opacity: 0; transform: translate(0, 0) scale(1.2); } 8% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.2); } }
@keyframes eng-smoke { 0% { opacity: 0; transform: translate(-50%, 0) scale(.4); } 25% { opacity: .75; } 100% { opacity: 0; transform: translate(calc(-50% + var(--drift)), -170px) scale(2.4); } }
@media (prefers-reduced-motion: reduce) { .eng-card * { animation: none !important; } }
@media (max-width: 1100px) { .ip-wrap { grid-template-columns: 1fr; } .eng-card { max-width: 520px; width: 100%; justify-self: center; } }

/* Invite: bright cyan-to-white, dark text, so it looks different from green Upgrade/Invest and blue Withdraw */
.tb-btn-invite { background: linear-gradient(110deg, #00e5ff, #9ff6ff 55%, #ffffff) !important; color: #00213a !important; box-shadow: 0 6px 22px -8px #00e5ffcc; }
.tb-btn-invite .tb-ico { background: #00213a1f; color: #00213a; }
.tb-btn-invite::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, #ffffffaa 50%, transparent 70%); transform: translateX(-120%); animation: tb-shine 3.6s ease-in-out infinite 1.2s; }
.tb-btn-invite:hover { box-shadow: 0 8px 28px -6px #00e5ffee; }
@media (prefers-reduced-motion: reduce) { .tb-btn-invite::after { animation: none; } }
@media (max-width: 1300px) { .tb-btn-invite { padding: 0 10px !important; } }

/* RPX coin icon */
.rpx-ic { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.2em; margin-right: 3px; border-radius: 50%; filter: drop-shadow(0 0 4px #00e5ff88); }
.tb-st small .rpx-ic, .eng-meta small .rpx-ic { width: 13px; height: 13px; vertical-align: -2px; }

/* the coin is always text-sized, even inside cards that size their images */
img.rpx-ic, .ux-pkg img.rpx-ic { width: 15px !important; height: 15px !important; max-width: none !important; margin: 0 3px 0 0 !important; padding: 0 !important; object-fit: contain; vertical-align: -3px !important; display: inline-block !important; }
.pkg-bonus { white-space: nowrap; }

/* ---- transaction window ---- */
.txf { border: 1px solid #00e5ff44; border-radius: 20px; background: #0d1222; color: inherit; padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: 0 30px 80px #000a; }
.txf::backdrop { background: #02040acc; backdrop-filter: blur(4px); }
.txf-in { padding: 22px; display: grid; gap: 14px; }
.txf-h { margin: 0; font-size: 18px; }
.txf-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.txf-steps li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; opacity: .5; transition: opacity .2s; }
.txf-steps li.active, .txf-steps li.done, .txf-steps li.error { opacity: 1; }
.txf-steps li > div { display: grid; gap: 1px; }
.txf-steps b { font-size: 14px; }
.txf-steps small { font-size: 12px; color: var(--rx-muted); }
.txf-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: #ffffff10; border: 1px solid #ffffff22; }
.txf-steps li.active .txf-dot { border-color: #00e5ff; }
.txf-steps li.done .txf-dot { background: #00e5ff; border-color: #00e5ff; color: #00213a; }
.txf-steps li.error .txf-dot { background: #ff6b6b; border-color: #ff6b6b; color: #fff; }
.txf-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #00e5ff44; border-top-color: #00e5ff; animation: txf-spin .8s linear infinite; }
.txf-out { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 6px 0 2px; }
.txf-big { font-size: 20px; }
.txf.ok .txf-big { color: #7df3ff; }
.txf.bad .txf-big { color: #ff9b9b; }
.txf-line { font-size: 13px; color: var(--rx-muted); }
.txf-line b { color: #fff; }
.txf-foot { display: flex; justify-content: flex-end; }
.txf-burst { position: relative; width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 4px; }
.txf-coin { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-weight: 900; color: #00213a;
  background: radial-gradient(circle at 35% 30%, #ffffff, #00e5ff 45%, #0084ff); box-shadow: 0 0 24px #00e5ffaa; animation: txf-pop .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.txf-burst i { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: #00e5ff; box-shadow: 0 0 8px #00e5ff;
  animation: txf-fly .9s ease-out both; animation-delay: var(--d); }
.txf-burst i:nth-child(odd) { background: #fff; }
@keyframes txf-spin { to { transform: rotate(360deg); } }
@keyframes txf-pop { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes txf-fly { from { transform: rotate(var(--a)) translateX(0) scale(1); opacity: 1; } to { transform: rotate(var(--a)) translateX(70px) scale(.2); opacity: 0; } }
/* while a transaction runs, the action buttons cannot be pressed again */
body.tx-busy [data-act="wd-rewards"], body.tx-busy [data-act="wd-returns"], body.tx-busy [data-act="inv-all"], body.tx-busy [data-act="inv-take"],
body.tx-busy [data-act="invest"], body.tx-busy [data-act="upgrade"] { pointer-events: none; opacity: .5; }
@media (prefers-reduced-motion: reduce) { .txf-burst i, .txf-coin { animation: none; } .txf-burst i { display: none; } }

/* dialogs centred (the site reset removes the browser default) */
.txf, .inv-dlg { position: fixed; inset: 0; margin: auto; height: fit-content; max-height: calc(100vh - 32px); overflow: auto; }
.txf [data-txf-close]:disabled { opacity: .35; cursor: not-allowed; }

/* numbers that just changed glow for a moment */
[data-num] { transition: color .4s, text-shadow .4s; }
.num-up { color: #7df3ff !important; text-shadow: 0 0 12px #00e5ffaa; }
.num-down { color: #8fd4ff !important; }

/* ---- first-time guide ---- */
.gd { margin: 0 0 14px; padding: 18px 20px; border-radius: 20px; border: 1px solid #00e5ff55;
  background: radial-gradient(120% 140% at 0% 0%, #00e5ff1f, transparent 55%), radial-gradient(120% 140% at 100% 0%, #0050f022, transparent 55%), #0b1120; }
.gd-head { display: flex; align-items: center; gap: 12px; }
.gd-head > div { display: grid; gap: 2px; flex: 1; }
.gd-k { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #7df3ff; }
.gd-head b { font-size: 20px; }
.gd-count { font-size: 12.5px; color: var(--rx-muted); }
.gd-x { border: 0; background: #ffffff10; color: var(--rx-muted); width: 28px; height: 28px; border-radius: 8px; cursor: pointer; }
.gd-x:hover { color: #fff; }
.gd-bar { height: 6px; border-radius: 99px; background: #ffffff12; margin: 12px 0 14px; overflow: hidden; }
.gd-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #00e5ff, #0084ff); transition: width .6s; }
.gd-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.gd-steps li { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; padding: 12px; border-radius: 14px; border: 1px solid #ffffff12; background: #ffffff06; opacity: .6; }
.gd-steps li > div { display: grid; gap: 3px; min-width: 0; }
.gd-steps b { font-size: 14px; }
.gd-steps small { font-size: 12px; color: var(--rx-muted); line-height: 1.4; }
.gd-steps small b { color: #7fdcff; font-size: 12px; }
.gd-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #ffffff10; border: 1px solid #ffffff22; }
.gd-steps li.done { opacity: .85; }
.gd-steps li.done .gd-dot { background: #00e5ff; border-color: #00e5ff; color: #00213a; }
.gd-steps li.now { opacity: 1; border-color: #00e5ff88; background: #00e5ff10; box-shadow: 0 0 0 3px #00e5ff14; }
.gd-steps li.now .gd-dot { border-color: #00e5ff; color: #7df3ff; animation: gd-pulse 1.8s ease-in-out infinite; }
.gd-act { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gd-act .tb-btn { height: 38px; font-size: 13px; }
@keyframes gd-pulse { 0%, 100% { box-shadow: 0 0 0 0 #00e5ff66; } 50% { box-shadow: 0 0 0 6px #00e5ff00; } }
@media (max-width: 1100px) { .gd-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .gd-steps { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .gd-steps li.now .gd-dot { animation: none; } }

/* =================== phones and small tablets =================== */
.m-logo { display: none; }
.app-main, .app-content { min-width: 0; }
.app-content { overflow-x: clip; }
.ip, .eng-card, .rc, .ip-card, .gd { min-width: 0; }
@media (max-width: 760px) {
  .m-logo { display: block; margin-right: auto; }
  .m-logo img { width: 112px; height: auto; display: block; }
  /* sticky two-row bar: logo + wallet, then the money strip and actions */
  .app-page .app-topbar { position: sticky; top: 0; z-index: 40; flex-wrap: wrap; gap: 8px; padding: 8px 12px; background: #080a12f2; backdrop-filter: blur(10px); border-bottom: 1px solid #ffffff10; }
  .tb-sum { display: flex !important; order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow: visible; gap: 6px; justify-content: space-between; }
  .tb-earn, .tb-bal { display: none !important; }
  .tb-wd { flex: 1 1 auto; height: 40px; padding: 0 6px 0 8px; justify-content: space-between; }
  .tb-wd .tb-st small { font-size: 9px; }
  .tb-act { gap: 6px; }
  .tb-act .tb-btn { width: 40px; padding: 0 !important; justify-content: center; }
  .tb-act .tb-lbl { display: none; }
  .tb-act .tb-btn .tb-ico { width: 24px; height: 24px; font-size: 13px; background: #ffffff33; }
  .tb-walletbal { height: 36px; padding: 0 8px 0 4px; }
  .tb-walletbal small { display: none; }
  .tb-wb-ico { width: 24px; height: 24px; }
  .app-page .topbar-actions .button-wallet { padding: 0 10px; height: 36px; font-size: 12px; }
  .app-page .topbar-actions [data-act="reload"] { display: none; }
  /* content fits the screen */
  .app-content { padding-left: 12px !important; padding-right: 12px !important; padding-bottom: 84px !important; }
  .rc-grid.rc-wide { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
  .rc { padding: 12px !important; }
  .ip { padding: 14px !important; }
  .ip-head h2 { font-size: 24px !important; }
  .ip-rate { margin: 6px 0 0; display: inline-block; }
  .ip-ladder { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 6px; }
  .ip-step { padding: 8px 4px; } .ip-step b { font-size: 15px; } .ip-step small { font-size: 10px; }
  .ip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
  .ip-card { padding: 10px; } .ip-card b { font-size: 17px; }
  .ip-claim { padding: 12px; } .ip-claim-btns { width: 100%; } .ip-claim-btns .tb-btn { flex: 1 1 100%; justify-content: center; }
  .ip-wrap { grid-template-columns: minmax(0, 1fr) !important; }
  .eng-card { max-width: none !important; }
  .eng-stage { height: 220px; }
  .gd { padding: 14px; } .gd-steps { grid-template-columns: minmax(0, 1fr) !important; }
  .ux-miles ol { overflow-x: auto; }
  .pg-head h1 { font-size: 28px; }
}
@media (max-width: 380px) {
  .tb-wd .tb-btn { padding: 0 10px; font-size: 12px; }
  .rc-amt { font-size: 22px !important; }
}

/* =================== one icon style: outline SVG =================== */
.ic { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -0.2em; flex: none; stroke: currentColor; fill: none; }
.side-link > span .ic, .sidebar-nav .ic { width: 18px; height: 18px; }
.ux-bottom .ic { width: 21px; height: 21px; }
.rc-ico .ic { width: 18px; height: 18px; }
.tb-ico .ic { width: 15px; height: 15px; }
.tb-wb-ico .ic { width: 16px; height: 16px; }
.ux-i { width: 18px !important; height: 18px !important; border: 0 !important; background: none !important; color: #8fd4ff !important; }
.ux-i .ic { width: 16px; height: 16px; }
.ux-i:hover .ic { color: #fff; }
.rc-go .ic, .text-link .ic { width: 14px; height: 14px; }
.activity-symbol .ic { width: 18px; height: 18px; }
.icon-button .ic { width: 18px; height: 18px; }
.ux-copy .ic { width: 15px; height: 15px; }
.oc-open .ic, .oc-x .ic, .gd-x .ic, .m-sheet-x .ic { width: 15px; height: 15px; }
.txf-dot .ic { width: 16px; height: 16px; }
.rc-state .ic, .rc-meta .ic { width: 13px; height: 13px; vertical-align: -2px; }
.tb-top .ic, .eng-max .ic { width: 16px; height: 16px; }

/* =================== Connect wallet: modern and prominent =================== */
.button-wallet { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 18px 0 14px !important; border: 0 !important; border-radius: 14px !important;
  font-weight: 800 !important; font-size: 14px !important; color: #fff !important; cursor: pointer;
  background: linear-gradient(110deg, #0050f0, #0084ff 50%, #00e5ff) !important; box-shadow: 0 8px 26px -8px #0084ffcc, inset 0 1px 0 #ffffff40; transition: transform .15s, box-shadow .2s, filter .2s; }
.button-wallet .wallet-symbol { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #ffffff2e; }
.button-wallet .wallet-symbol .ic { width: 16px; height: 16px; }
.button-wallet::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, #ffffff66 50%, transparent 70%); transform: translateX(-120%); animation: tb-shine 3.4s ease-in-out infinite; }
.button-wallet:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 10px 30px -8px #00e5ffdd, inset 0 1px 0 #ffffff40; }
/* connected: calm glass chip with a live dot and the address */
.button-wallet.is-connected { background: #0e1528 !important; box-shadow: inset 0 0 0 1px #00e5ff55 !important; color: #e8f9ff !important; font-weight: 700 !important; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px !important; }
.button-wallet.is-connected::after { display: none; }
.button-wallet.is-connected .wallet-symbol { background: #00e5ff1f; color: #7df3ff; position: relative; }
.button-wallet.is-connected .wallet-symbol::after { content: ''; position: absolute; right: -2px; top: -2px; width: 8px; height: 8px; border-radius: 50%; background: #22e3a0; box-shadow: 0 0 0 2px #0e1528, 0 0 8px #22e3a0; }
@media (prefers-reduced-motion: reduce) { .button-wallet::after { animation: none; } }

/* =================== phones: bottom bar + More sheet =================== */
.ux-bottom button { display: grid; justify-items: center; gap: 2px; padding: 4px 0; color: var(--rx-muted); background: none; border: 0; font: inherit; font-size: 11px; font-weight: 600; border-radius: 10px; cursor: pointer; }
.ux-bottom button span, .ux-bottom a span { display: grid; place-items: center; height: 22px; }
.m-sheet { position: fixed; inset: 0; z-index: 60; background: #02040acc; backdrop-filter: blur(3px); display: flex; align-items: flex-end; }
.m-sheet[hidden] { display: none; }
.m-sheet-in { width: 100%; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: #0d1222; border-top: 1px solid #00e5ff44; animation: m-up .22s ease-out; }
.m-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.m-sheet-x { width: 32px; height: 32px; border-radius: 10px; border: 0; background: #ffffff12; color: #fff; display: grid; place-items: center; }
.m-sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m-sheet-grid a { display: grid; justify-items: center; gap: 6px; padding: 14px 6px; border-radius: 14px; background: #ffffff08; border: 1px solid #ffffff12; color: #e8f2ff; text-decoration: none; font-size: 12.5px; font-weight: 600; }
.m-sheet-grid a span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #0084ff22; color: #7df3ff; }
.m-sheet-grid a .ic { width: 20px; height: 20px; }
body.m-sheet-open { overflow: hidden; }
@keyframes m-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }

/* ---- investment feels alive: next-credit ring, live dot, projection ---- */
.ip-live { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #00e5ff; box-shadow: 0 0 0 0 #00e5ff99; animation: ip-live 1.8s ease-out infinite; vertical-align: 1px; }
@keyframes ip-live { 0% { box-shadow: 0 0 0 0 #00e5ffaa; } 80%, 100% { box-shadow: 0 0 0 7px #00e5ff00; } }
.ip-proj { font-size: 12px; font-weight: 700; color: #7fdcff; }
.ip-next { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 14px; background: #ffffff08; border: 1px solid #00e5ff2e; }
.ip-next svg { width: 52px; height: 52px; transform: rotate(-90deg); flex: none; }
.ip-next-bg { fill: none; stroke: #ffffff14; stroke-width: 5; }
.ip-next-fg { fill: none; stroke: url(#ip-grad); stroke: #00e5ff; stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset 1s linear; filter: drop-shadow(0 0 4px #00e5ff99); }
.ip-next > div { display: grid; gap: 1px; }
.ip-next small { font-size: 11px; color: var(--rx-muted); white-space: nowrap; }
.ip-next-t { font-size: 18px; font-variant-numeric: tabular-nums; color: #e8fbff; }
.ip-next.due .ip-next-fg { stroke: #22e3a0; }
.ip-next.due .ip-next-t { color: #7df3ff; }
.ip-claim { align-items: center; }
@media (max-width: 760px) { .ip-next { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .ip-live { animation: none; } .ip-next-fg { transition: none; } }

.ip-claim > .ip-next { display: flex; }

/* ---- upgrade preview ---- */
.upg { width: min(480px, calc(100vw - 24px)); }
.upg-head { display: flex; align-items: center; justify-content: space-between; }
.upg-show { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 0 2px;
  background: radial-gradient(60% 70% at 62% 50%, #00e5ff26, transparent 70%); border-radius: 16px; }
.upg-from, .upg-to { display: grid; justify-items: center; gap: 2px; }
.upg-from img { width: 84px; height: auto; opacity: .55; filter: grayscale(.4); }
.upg-from small, .upg-to small { font-size: 11.5px; color: var(--rx-muted); }
.upg-to img { width: 150px; height: auto; filter: drop-shadow(0 8px 22px #00e5ff88); animation: upg-float 3s ease-in-out infinite; }
.upg-to b { font-size: 17px; }
.upg-arrow { color: #7df3ff; } .upg-arrow .ic { width: 26px; height: 26px; }
.upg-pick { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.upg-pick button { border: 1px solid #ffffff1f; background: #ffffff08; color: #dfe9ff; border-radius: 99px; padding: 5px 11px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.upg-pick button small { color: var(--rx-muted); font-weight: 600; margin-left: 2px; }
.upg-pick button.on { border-color: #00e5ff; background: #00e5ff1f; color: #fff; box-shadow: 0 0 0 3px #00e5ff1a; }
.upg-pay { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 14px; border-radius: 14px; background: #ffffff08; border: 1px solid #ffffff14; }
.upg-pay span { color: var(--rx-muted); font-size: 13px; }
.upg-pay b { font-size: 24px; } .upg-pay i { font-style: normal; font-size: 13px; color: var(--rx-muted); }
.upg-get { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.upg-get li { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: start; }
.upg-get li > div { display: grid; gap: 2px; }
.upg-get b { font-size: 14px; }
.upg-get small { font-size: 12px; color: var(--rx-muted); line-height: 1.45; }
.upg-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: #10b98122; color: #6ee7b7; }
.upg-ic .ic { width: 18px; height: 18px; }
.upg-note { margin: 0; font-size: 12.5px; color: #8fd4ff; display: flex; gap: 6px; align-items: flex-start; }
.upg-btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.upg-go { height: 44px !important; }
@keyframes upg-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (max-width: 520px) { .upg-btns { flex-direction: column-reverse; } .upg-btns > * { width: 100%; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .upg-to img { animation: none; } }

.ux-pkg.later { opacity: .6; }
.ux-pkg.later img { filter: grayscale(.5); }

/* =================== Engine Forge (after a purchase) =================== */
body.fg-open { overflow: hidden; }
.fg { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-rows: auto auto; align-content: center; justify-items: center; animation: fg-in .3s ease-out; }
.fg.closing { animation: fg-out .28s ease-in forwards; }
.fg-bg { position: absolute; inset: 0; background: radial-gradient(60% 55% at 50% 45%, #0084ff40, transparent 70%), #02040ae6; backdrop-filter: blur(6px); }
.fg-stage { position: relative; width: 520px; height: 380px; display: grid; place-items: center; perspective: 1000px; }
.fg-stage > * { grid-area: 1 / 1; }
.fg-ring-wrap { width: 160px; height: 140px; transform-style: preserve-3d; opacity: 0; transition: opacity .3s, transform .38s ease-in; }
.fg-ring { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.fg-ring img { position: absolute; inset: 0; width: 160px; height: 140px; object-fit: contain; transform: rotateY(calc(var(--k) * 60deg)) translateZ(230px); filter: drop-shadow(0 8px 18px #0084ffaa); backface-visibility: hidden; }
.fg.s-ring .fg-ring-wrap { opacity: 1; }
.fg.s-ring-out .fg-ring-wrap { opacity: 0; transform: scale(.4); }
.fg-core { position: relative; width: 240px; height: 210px; }
.fg-old, .fg-new { position: absolute; inset: 0; }
.fg-tile { position: absolute; display: block; background-repeat: no-repeat; opacity: 0; will-change: transform, opacity; }
.fg.s-old .fg-tile.old { opacity: 1; }
.fg-final { position: absolute; inset: 0; width: 240px; height: 210px; opacity: 0; filter: drop-shadow(0 12px 30px #00e5ffaa); }
.fg-sweep { position: absolute; inset: 0; opacity: 0; mix-blend-mode: screen; -webkit-mask: var(--img) center / contain no-repeat; mask: var(--img) center / contain no-repeat;
  background: linear-gradient(105deg, transparent 38%, #ffffffcc 50%, transparent 62%); background-size: 260% 100%; }
.fg.s-ignite .fg-new, .fg.s-final .fg-new { opacity: 0; transition: opacity .25s; }
.fg.s-ignite .fg-final, .fg.s-final .fg-final { opacity: 1; animation: fg-float 3.2s ease-in-out infinite .4s; }
.fg.s-ignite .fg-sweep, .fg.s-final .fg-sweep { opacity: 1; animation: fg-sweep 2.6s ease-in-out infinite .2s; }
.fg-flash { width: 100%; height: 100%; background: radial-gradient(circle, #ffffff 0, #00e5ffaa 25%, transparent 60%); opacity: 0; pointer-events: none; }
.fg.s-ignite .fg-flash { animation: fg-flash .7s ease-out; }
.fg-shock { width: 120px; height: 120px; border-radius: 50%; border: 3px solid #00e5ff; opacity: 0; box-shadow: 0 0 30px #00e5ff, inset 0 0 20px #00e5ff; }
.fg.s-ignite .fg-shock { animation: fg-shock .9s ease-out; }
.fg-sparks, .fg-smoke { position: relative; width: 100%; height: 100%; pointer-events: none; }
.fg-sparks i { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px 3px #00e5ff; opacity: 0; }
.fg-sparks i:nth-child(3n) { background: #22e3a0; box-shadow: 0 0 8px 3px #10b981; }
.fg.s-ignite .fg-sparks i { animation: fg-spark 1.1s cubic-bezier(.15,.7,.3,1) both; animation-delay: var(--d); }
.fg.s-final .fg-sparks i { animation: fg-spark 2.4s cubic-bezier(.15,.7,.3,1) infinite; animation-delay: calc(var(--d) * 6); }
.fg-smoke i { position: absolute; left: calc(50% + var(--sx)); bottom: 70px; width: 110px; height: 110px; margin-left: -55px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, #9fd8ff66, #33c6ff1f 45%, transparent 70%); filter: blur(12px); }
.fg.s-ignite .fg-smoke i, .fg.s-final .fg-smoke i { animation: fg-smoke 3.6s ease-out infinite; animation-delay: var(--d); }
.fg-card { position: relative; margin-top: -10px; display: grid; justify-items: center; gap: 8px; text-align: center; opacity: 0; transform: translateY(16px); transition: opacity .4s, transform .4s; pointer-events: none; }
.fg.s-final .fg-card { opacity: 1; transform: none; pointer-events: auto; }
.fg-k { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #7df3ff; }
.fg-name { font-size: 30px; line-height: 1.1; background: linear-gradient(90deg, #fff, #7df3ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fg-gets { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.fg-gets span { padding: 6px 12px; border-radius: 99px; background: #ffffff10; border: 1px solid #00e5ff40; font-size: 13px; font-weight: 700; }
.fg-go { height: 46px !important; padding: 0 30px !important; margin-top: 6px; font-size: 15px !important; }
.fg-skip { position: absolute; right: 18px; top: 18px; border: 1px solid #ffffff2a; background: #ffffff10; color: #dfe9ff; border-radius: 10px; padding: 7px 14px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.fg.s-final .fg-skip { display: none; }
@keyframes fg-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fg-out { to { opacity: 0; transform: scale(.98); } }
@keyframes fg-flash { 0% { opacity: 0; transform: scale(.4); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.6); } }
@keyframes fg-shock { 0% { opacity: 1; transform: scale(.3); } 100% { opacity: 0; transform: scale(3.6); } }
@keyframes fg-spark { 0% { opacity: 0; transform: translate(0, 0) scale(1.3); } 10% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.2); } }
@keyframes fg-smoke { 0% { opacity: 0; transform: translateY(0) scale(.4); } 25% { opacity: .8; } 100% { opacity: 0; transform: translate(var(--drift), -200px) scale(2.3); } }
@keyframes fg-float { 0%, 100% { transform: translateY(0) rotateY(-8deg); } 50% { transform: translateY(-10px) rotateY(8deg); } }
@keyframes fg-sweep { 0%, 30% { background-position: 130% 0; } 70%, 100% { background-position: -30% 0; } }
@media (max-width: 560px) { .fg-stage { width: 100vw; height: 330px; transform: scale(.82); } .fg-name { font-size: 24px; } }
@media (prefers-reduced-motion: reduce) { .fg *, .fg { animation: none !important; transition: none !important; } }

/* forge motion in CSS (tiles carry --dx --dy --rot --dur --del) */
.fg.s-ring .fg-ring { animation: fg-spin 1.7s cubic-bezier(.15,.7,.2,1) forwards; }
@keyframes fg-spin { from { transform: rotateY(0deg); } to { transform: rotateY(var(--stop)); } }
.fg.s-old .fg-tile.old { opacity: 1; animation: fg-shatter var(--dur) cubic-bezier(.2,.6,.3,1) var(--del) forwards; }
.fg.s-new .fg-tile.new { animation: fg-assemble var(--dur) cubic-bezier(.2,.9,.25,1.05) var(--del) both; }
@keyframes fg-shatter { from { transform: translate(0, 0) rotate(0); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(.5); opacity: 0; } }
@keyframes fg-assemble { from { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* the old engine: shown whole, shakes, then the tiles take over and fly apart */
.fg-oldimg { position: absolute; inset: 0; width: 240px; height: 210px; opacity: 0; filter: drop-shadow(0 10px 24px #0084ff88) grayscale(.15); }
.fg.s-old .fg-oldimg { opacity: 1; animation: fg-shake .6s ease-in-out both; }
.fg.s-shatter .fg-oldimg { opacity: 0; animation: none; }
.fg.s-old .fg-tile.old { opacity: 0; animation: none; }
.fg.s-shatter .fg-tile.old { opacity: 1; animation: fg-shatter var(--dur) cubic-bezier(.2,.6,.3,1) var(--del) forwards; }
@keyframes fg-shake { 0% { transform: scale(.85); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 45% { transform: translateX(-4px) rotate(-1.5deg); } 60% { transform: translateX(5px) rotate(1.5deg); } 75% { transform: translateX(-4px) rotate(-1deg); filter: brightness(1.6) drop-shadow(0 0 20px #00e5ff); } 100% { transform: translateX(0) scale(1.03); filter: brightness(2) drop-shadow(0 0 30px #00e5ff); } }

/* wheel exit as an animation (more reliable than a transition) */
.fg.s-ring-out .fg-ring-wrap { animation: fg-ringout .38s ease-in forwards; }
.fg.s-old .fg-ring-wrap, .fg.s-new .fg-ring-wrap, .fg.s-final .fg-ring-wrap { opacity: 0 !important; visibility: hidden; }
@keyframes fg-ringout { to { opacity: 0; transform: scale(.4); } }

/* ---- forge v2: tighter timing, no empty stage ---- */
.fg.s-ring .fg-ring { animation: fg-spin 1.6s cubic-bezier(.15,.7,.2,1) forwards; }
.fg.s-ring-out .fg-ring-wrap { animation: fg-ringout .22s ease-in forwards; }
.fg-oldimg { transition: none; }
.fg.s-old .fg-oldimg { opacity: 1; animation: fg-charge .6s ease-in both; }
@keyframes fg-charge { 0% { transform: scale(1.05); } 30% { transform: translateX(-4px) rotate(-1.5deg) scale(1); } 50% { transform: translateX(5px) rotate(1.5deg); }
  70% { transform: translateX(-4px) rotate(-1deg); filter: brightness(1.6) drop-shadow(0 0 20px #00e5ff); } 100% { transform: scale(1.04); filter: brightness(2.2) drop-shadow(0 0 34px #00e5ff); } }
.fg.s-new .fg-tile.new { animation: fg-assemble var(--dur) cubic-bezier(.2,.9,.25,1.05) var(--del) both; }
/* top controls */
.fg-top { position: absolute; right: 18px; top: 18px; display: flex; gap: 8px; z-index: 2; }
.fg-top .fg-skip { position: static; }
.fg-sound { border: 1px solid #ffffff2a; background: #ffffff10; color: #dfe9ff; border-radius: 10px; padding: 7px 12px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.fg-sound[aria-pressed="true"] { border-color: #00e5ff; color: #7df3ff; background: #00e5ff1a; }
.fg-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; }
.fg-btns .tb-btn { height: 46px !important; padding: 0 24px !important; font-size: 15px !important; }
.fg-go { margin-top: 0 !important; }
/* second shockwave for big engines */
.fg-shock.s2 { border-width: 2px; }
.fg.s-ignite .fg-shock.s2 { animation: fg-shock 1.2s ease-out .18s both; }
/* Nova: a little more */
.fg-plus .fg-flash { background: radial-gradient(circle, #ffffff 0, #33c6ffcc 28%, transparent 64%); }
/* Titan / Sovereign: gold finale */
.fg-gold .fg-bg { background: radial-gradient(60% 55% at 50% 45%, #f5b70d33, transparent 70%), radial-gradient(40% 40% at 50% 45%, #0084ff33, transparent 70%), #02040ae6; }
.fg-gold .fg-shock { border-color: #fbbf24; box-shadow: 0 0 34px #fbbf24, inset 0 0 22px #fbbf24; }
.fg-gold .fg-flash { background: radial-gradient(circle, #ffffff 0, #fde68acc 26%, transparent 64%); }
.fg-gold .fg-sparks i { background: #fff7d6; box-shadow: 0 0 9px 3px #fbbf24; }
.fg-gold .fg-sparks i:nth-child(3n) { background: #fff; box-shadow: 0 0 8px 3px #00e5ff; }
.fg-gold .fg-final { filter: drop-shadow(0 12px 34px #fbbf24aa) drop-shadow(0 0 18px #00e5ff66); }
.fg-gold .fg-name { background: linear-gradient(90deg, #fff7d6, #fbbf24 60%, #fff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fg-gold .fg-k { color: #fde68a; }
@media (max-width: 560px) { .fg-top { top: 12px; right: 12px; } .fg-btns .tb-btn { flex: 1 1 100%; justify-content: center; } }

/* the old engine is gone from the shatter moment on (also after Skip) */
.fg.s-shatter .fg-oldimg, .fg.s-new .fg-oldimg, .fg.s-ignite .fg-oldimg, .fg.s-final .fg-oldimg { opacity: 0 !important; animation: none !important; visibility: hidden; }
.fg.s-ignite .fg-old, .fg.s-final .fg-old { visibility: hidden; }
.fg.s-final .fg-new { visibility: hidden; }
.fg.s-final .fg-final { opacity: 1; }

/* =================== forge: mechanical assembly (replaces the scatter) =================== */
.fg-core { transform-style: preserve-3d; perspective: 700px; }
.fg-old, .fg-new { transform-style: preserve-3d; }
.fg-part { position: absolute; display: block; background-repeat: no-repeat; opacity: 0; backface-visibility: hidden; will-change: transform, opacity; }
.fg.s-old .fg-part.old { opacity: 0; }
.fg.s-shatter .fg-part.old { opacity: 1; animation: fg-mech-out var(--dur) cubic-bezier(.55,0,.8,.4) var(--del) forwards; }
.fg.s-new .fg-part.new { animation: fg-mech-in var(--dur) cubic-bezier(.3,1.35,.55,1) var(--del) both; }
@keyframes fg-mech-in { 0% { transform: var(--from); opacity: 0; filter: brightness(2.2); } 18% { opacity: 1; } 85% { filter: brightness(1.4); } 100% { transform: none; opacity: 1; filter: none; } }
@keyframes fg-mech-out { 0% { transform: none; opacity: 1; } 70% { opacity: 1; } 100% { transform: var(--to); opacity: 0; } }
/* the old engine hands over to its parts the moment it starts coming apart */
.fg.s-shatter .fg-oldimg { opacity: 0 !important; visibility: hidden; animation: none !important; }
/* seams light up where the parts locked together */
.fg-seams { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.fg-seams i { position: absolute; display: block; background: linear-gradient(90deg, transparent, #7df3ff, #fff, #7df3ff, transparent); box-shadow: 0 0 10px #00e5ff, 0 0 20px #00e5ff88; }
.fg-seams i.h { left: 6%; width: 88%; height: 2px; }
.fg-seams i.v { width: 2px; background: linear-gradient(180deg, transparent, #7df3ff, #fff, #7df3ff, transparent); }
.fg.s-seams .fg-seams { animation: fg-seams .9s ease-out forwards; }
@keyframes fg-seams { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
.fg-gold .fg-seams i { box-shadow: 0 0 10px #fbbf24, 0 0 22px #fbbf2488; }
/* after ignition only the finished engine stays */
.fg.s-ignite .fg-new, .fg.s-final .fg-new, .fg.s-final .fg-old, .fg.s-ignite .fg-old { visibility: hidden; }

/* old engine scatter: fast explosive fade, so it never overlaps the new assembly */
.fg.s-shatter .fg-tile.old { opacity: 1; animation: fg-scatter var(--dur) cubic-bezier(.15,.65,.35,1) var(--del) forwards !important; }
@keyframes fg-scatter { 0% { transform: translate(0, 0) rotate(0) scale(1); opacity: 1; filter: brightness(1.8); } 55% { opacity: .55; } 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(.35); opacity: 0; filter: brightness(1); } }
.fg.s-new .fg-old { visibility: hidden; }

/* finale: no 3D stacking any more, so the light sweep always draws over the whole engine */
.fg.s-ignite .fg-core, .fg.s-final .fg-core { transform-style: flat; perspective: none; }
.fg.s-ignite .fg-final, .fg.s-final .fg-final { animation: fg-float-flat 3.2s ease-in-out infinite .4s; }
.fg.s-ignite .fg-sweep, .fg.s-final .fg-sweep { z-index: 2; animation: fg-sweep 2.6s ease-in-out infinite .2s, fg-float-flat 3.2s ease-in-out infinite .4s; }
@keyframes fg-float-flat { 0%, 100% { transform: translateY(0) scaleX(.97); } 50% { transform: translateY(-10px) scaleX(1); } }

/* =================== forge themes: one feel per upgrade =================== */
/* old engine exits (each tile carries its own --to) */
.fg { --ease: cubic-bezier(.15,.65,.35,1); }
.fg.x-swirl { --ease: cubic-bezier(.5,0,.75,.35); }
.fg.x-collapse { --ease: cubic-bezier(.6,0,.9,.45); }
.fg.x-gravity { --ease: cubic-bezier(.55,0,1,.45); }
.fg.x-ascend { --ease: cubic-bezier(.3,.3,.45,1); }
.fg.s-shatter .fg-tile.old { opacity: 1; animation: fg-exit var(--dur) var(--ease) var(--del) forwards !important; }
@keyframes fg-exit { 0% { transform: none; opacity: 1; filter: brightness(1.8); } 60% { opacity: .6; } 100% { transform: var(--to); opacity: 0; filter: brightness(1); } }
.fg.x-ascend.s-shatter .fg-tile.old { animation-name: fg-exit-up !important; }
@keyframes fg-exit-up { 0% { transform: none; opacity: 1; filter: brightness(1.6); } 100% { transform: var(--to); opacity: 0; filter: brightness(3) blur(3px); } }
.fx { pointer-events: none; }

/* Pulse Charge: lightning while overloading, a zap on every lock, heartbeat rings */
.fx-bolts { width: 520px; height: 380px; opacity: 0; overflow: visible; }
.fx-bolts path { fill: none; stroke: #e8fdff; stroke-width: 2.5; stroke-linejoin: round; filter: drop-shadow(0 0 6px #00e5ff) drop-shadow(0 0 14px #00e5ff); }
.th-pulse.s-overload .fx-bolts { animation: fx-flicker .5s steps(2, end) infinite; }
.th-pulse.s-new .fx-bolts { animation: none; opacity: 0; }
.th-pulse.zap .fx-bolts { animation: fx-zap .22s ease-out; }
.th-pulse.s-ignite .fx-bolts { animation: fx-zap .5s ease-out; }
.th-pulse.s-overload .fg-oldimg { animation: fx-jitter .08s linear infinite !important; filter: brightness(2) drop-shadow(0 0 22px #00e5ff); }
@keyframes fx-flicker { 0% { opacity: 1; } 50% { opacity: .15; } 100% { opacity: .9; } }
@keyframes fx-zap { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fx-jitter { 0% { transform: translate(1px, -1px); } 50% { transform: translate(-2px, 1px); } 100% { transform: translate(1px, 1px); } }
.fx-pulses { position: relative; width: 100%; height: 100%; }
.fx-pulses i { position: absolute; left: 50%; top: 50%; width: 140px; height: 140px; margin: -70px; border-radius: 50%; border: 3px solid #7df3ff; box-shadow: 0 0 18px #00e5ff; opacity: 0; }
.th-pulse.s-ignite .fx-pulses i, .th-pulse.s-final .fx-pulses i { animation: fx-pulse 1.6s ease-out infinite; }
.th-pulse .fx-pulses i:nth-child(2) { animation-delay: .25s !important; } .th-pulse .fx-pulses i:nth-child(3) { animation-delay: .5s !important; }
@keyframes fx-pulse { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.6); } }

/* Vortex Spin: two vortex rings spin behind while the old one is sucked in and the new one spirals together */
.fx-vortex { position: relative; width: 100%; height: 100%; opacity: 0; transition: opacity .3s; }
.fx-vortex i { position: absolute; left: 50%; top: 50%; border-radius: 50%; }
.fx-vortex i:nth-child(1) { width: 330px; height: 330px; margin: -165px; background: conic-gradient(from 0deg, transparent 0 20%, #00e5ff88 35%, transparent 50%, transparent 70%, #0084ff88 85%, transparent 100%); -webkit-mask: radial-gradient(circle, transparent 52%, #000 54%, #000 70%, transparent 72%); mask: radial-gradient(circle, transparent 52%, #000 54%, #000 70%, transparent 72%); animation: eng-spin 1.1s linear infinite; }
.fx-vortex i:nth-child(2) { width: 230px; height: 230px; margin: -115px; background: conic-gradient(from 90deg, transparent 0 30%, #7df3ffaa 45%, transparent 60%, transparent 80%, #33c6ffaa 92%, transparent 100%); -webkit-mask: radial-gradient(circle, transparent 50%, #000 53%, #000 66%, transparent 69%); mask: radial-gradient(circle, transparent 50%, #000 53%, #000 66%, transparent 69%); animation: eng-spin .8s linear infinite reverse; }
.th-vortex.s-shatter .fx-vortex, .th-vortex.s-new .fx-vortex { opacity: 1; }
.th-vortex.s-final .fx-vortex { opacity: .35; }

/* Nova Burst: the old engine collapses into a star that flashes; rays rotate behind the new engine */
.fx-star { width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 0 30px 12px #fff, 0 0 70px 30px #7df3ff, 0 0 140px 60px #0084ff88; opacity: 0; transform: scale(.2); z-index: 3; }
.th-nova.s-shatter .fx-star { animation: fx-star-in .5s ease-in forwards; }
.th-nova.s-star .fx-star { animation: fx-star-burst .55s ease-out forwards; }
@keyframes fx-star-in { to { opacity: 1; transform: scale(1); } }
@keyframes fx-star-burst { 0% { opacity: 1; transform: scale(1); } 40% { opacity: 1; transform: scale(3.5); } 100% { opacity: 0; transform: scale(6); } }
.fx-rays { width: 520px; height: 520px; border-radius: 50%; opacity: 0;
  background: repeating-conic-gradient(from 0deg, #7df3ff33 0deg 4deg, transparent 4deg 18deg); -webkit-mask: radial-gradient(circle, #000 10%, transparent 68%); mask: radial-gradient(circle, #000 10%, transparent 68%); }
.th-nova.s-star .fx-rays, .th-nova.s-new .fx-rays { opacity: .55; animation: eng-spin 14s linear infinite; transition: opacity .4s; }
.th-nova.s-ignite .fx-rays, .th-nova.s-final .fx-rays { opacity: 1; animation: eng-spin 10s linear infinite; }

/* Titan Forge: pieces fall away; each part slams down and shakes the stage; molten sparks; ground impact */
.fg-stage.thud { animation: fx-thud .28s cubic-bezier(.3,1.6,.5,1); }
@keyframes fx-thud { 0% { transform: translateY(0); } 25% { transform: translateY(7px) translateX(-3px); } 50% { transform: translateY(-3px) translateX(3px); } 100% { transform: none; } }
.th-titan.s-new .fg-part.new { animation-timing-function: cubic-bezier(.55,0,.75,.2) !important; }
.th-titan .fg-sparks i { background: #ffe1a1 !important; box-shadow: 0 0 9px 3px #ff9a1f !important; }
.fx-ground { align-self: end; width: 380px; height: 60px; margin-bottom: 70px; border-radius: 50%; opacity: 0;
  background: radial-gradient(ellipse, #ffcf6b 0, #ff9a1fbb 25%, #ff6a0044 55%, transparent 72%); filter: blur(2px); }
.th-titan.s-ignite .fx-ground { animation: fx-ground 1.4s ease-out forwards; }
.th-titan.s-final .fx-ground { opacity: .5; }
@keyframes fx-ground { 0% { opacity: 0; transform: scaleX(.3); } 20% { opacity: 1; transform: scaleX(1.1); } 100% { opacity: .5; transform: scaleX(1); } }

/* Sovereign Ascension: the old engine rises into light; the new one descends in a golden pillar; crown halo */
.fx-pillar { width: 210px; height: 100%; opacity: 0; transform: scaleX(.2);
  background: linear-gradient(90deg, transparent, #fde68a55 30%, #fff8dccc 50%, #fde68a55 70%, transparent); filter: blur(4px); -webkit-mask: linear-gradient(180deg, transparent, #000 15%, #000 85%, transparent); mask: linear-gradient(180deg, transparent, #000 15%, #000 85%, transparent); }
.th-sovereign.s-shatter .fx-pillar, .th-sovereign.s-new .fx-pillar { animation: fx-pillar .6s ease-out forwards; }
.th-sovereign.s-ignite .fx-pillar { animation: fx-pillar-out .8s ease-in forwards; }
@keyframes fx-pillar { to { opacity: 1; transform: scaleX(1); } }
@keyframes fx-pillar-out { from { opacity: 1; transform: scaleX(1); } to { opacity: 0; transform: scaleX(.1); } }
.th-sovereign.s-new .fg-part.new { filter: drop-shadow(0 0 10px #fbbf24); }
.fx-halo { width: 170px; height: 46px; align-self: start; margin-top: 18px; border-radius: 50%; border: 4px solid #fde68a; opacity: 0; transform: translateY(-30px) scale(.6);
  box-shadow: 0 0 22px #fbbf24, inset 0 0 14px #fbbf24; }
.th-sovereign.s-ignite .fx-halo, .th-sovereign.s-final .fx-halo { animation: fx-halo .8s cubic-bezier(.3,1.4,.5,1) forwards, fx-halo-glow 2.4s ease-in-out infinite .8s; }
@keyframes fx-halo { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fx-halo-glow { 0%, 100% { box-shadow: 0 0 22px #fbbf24, inset 0 0 14px #fbbf24; } 50% { box-shadow: 0 0 40px #fde68a, inset 0 0 22px #fde68a; } }
.fg-k { text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) { .fx, .fg-stage.thud { animation: none !important; } }

/* ---- rewards: withdraw or invest ---- */
.rw .txf-in { gap: 12px; }
.rw-opt { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; text-align: left; padding: 14px; border-radius: 16px; border: 1px solid #ffffff1c; background: #ffffff08; color: inherit; font: inherit; cursor: pointer; transition: border-color .2s, background .2s, transform .15s; }
.rw-opt:hover:not(:disabled) { border-color: #00e5ff88; background: #00e5ff10; transform: translateY(-1px); }
.rw-opt:disabled { opacity: .45; cursor: not-allowed; }
.rw-opt > div { display: grid; gap: 3px; }
.rw-opt b { font-size: 15px; } .rw-opt small { font-size: 12.5px; color: var(--rx-muted); line-height: 1.45; } .rw-opt small b { font-size: 12.5px; color: #fff; }
.rw-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: #0084ff26; color: #7df3ff; }
.rw-ic .ic { width: 22px; height: 22px; }
.rw-inv .rw-ic { background: #10b98126; color: #6ee7b7; }
.rw-inv:hover:not(:disabled) { border-color: #34d39999; background: #10b98112; }
.rw-go { color: var(--rx-muted); }
.wd-two { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.wd-two .tb-btn { height: 46px; }
/* five reward cards in a row */
.rc-grid.rc-wide.rc-five { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
@media (max-width: 1300px) { .rc-grid.rc-wide.rc-five { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 760px) { .rc-grid.rc-wide.rc-five { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.tb-chip.tb-c-bonus i { background: #33c6ff; }
.oc-r.ra-bonus { background: #33c6ff22; border-color: #33c6ff55; }

/* rewards window: amount box */
.rw-amt { display: grid; gap: 6px; }
.rw-amt label { font-size: 12.5px; font-weight: 700; color: var(--rx-muted); }
.rw-amt label small { font-weight: 600; }
.rw-row { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 14px; border-radius: 14px; border: 1px solid #00e5ff55; background: #0b0f1c; }
.rw-row:focus-within { border-color: #00e5ff; box-shadow: 0 0 0 3px #00e5ff22; }
.rw-row input { flex: 1; min-width: 0; border: 0; background: none; color: #fff; font: inherit; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; outline: none; padding: 8px 0; }
.rw-row input::-webkit-inner-spin-button, .rw-row input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.rw-unit { color: var(--rx-muted); font-size: 13px; font-weight: 700; }
.rw-max { border: 0; border-radius: 10px; padding: 9px 14px; background: #00e5ff22; color: #7df3ff; font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; }
.rw-max:hover { background: #00e5ff38; }
.rw-err { min-height: 1em; color: #ff9b9b; font-size: 12px; }

/* rewards window: keep everything inside the dialog */
.txf.rw { width: min(460px, calc(100vw - 24px)); }
.rw .txf-in { grid-template-columns: minmax(0, 1fr); }
.rw .txf-in > *, .rw-opt, .rw-amt { min-width: 0; max-width: 100%; box-sizing: border-box; }
.rw-opt { width: 100%; grid-template-columns: 44px minmax(0, 1fr) auto; }
.rw-row { box-sizing: border-box; width: 100%; }
.rw-amt { grid-template-columns: minmax(0, 1fr); }

/* ---- Auto upgrade plan (engine card) ---- */
.ap { display: grid; gap: 8px; padding: 12px; border-radius: 14px; border: 1px solid #10b98155; background: linear-gradient(160deg, #10b9811a, #ffffff05); }
.ap-head { display: flex; align-items: center; justify-content: space-between; }
.ap-k { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #6ee7b7; display: inline-flex; align-items: center; gap: 6px; }
.ap-n { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ap-dots { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; }
.ap-dots i { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; font-style: normal; font-size: 9.5px; font-weight: 800; color: var(--rx-muted); border: 1px solid #ffffff24; background: #ffffff08; }
.ap-dots i.o.on { background: #00e5ff; border-color: #00e5ff; color: #00213a; }
.ap-dots i.e.on { background: #10b981; border-color: #34d399; color: #052e1f; box-shadow: 0 0 8px #10b98188; }
.ap-key { display: flex; gap: 12px; font-size: 11px; color: var(--rx-muted); }
.ap-key i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.ap-key i.o { background: #00e5ff; } .ap-key i.e { background: #10b981; }
.ap-bar-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--rx-muted); }
.ap-bar-top b { color: #6ee7b7; }
.ap-bar { height: 9px; border-radius: 99px; background: #ffffff12; overflow: hidden; }
.ap-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #047857, #10b981, #34d399); background-size: 200% 100%; animation: ip-flow 3s linear infinite; }
.ap-s { font-size: 11.5px; color: var(--rx-muted); line-height: 1.4; }
.ap-ups { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-ups span { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: #6ee7b7; padding: 3px 9px; border-radius: 99px; background: #10b9811f; }
@media (prefers-reduced-motion: reduce) { .ap-bar i { animation: none; } }

.hx-ico.upw { background: #10b98126; color: #6ee7b7; }
.hx-upw b { color: #6ee7b7; }

.ap-dots { grid-template-columns: repeat(14, minmax(0, 30px)); justify-content: start; }
.ap-buy { justify-self: start; display: inline-flex; align-items: center; gap: 6px; }
.ap-split { font-size: 11.5px; color: var(--rx-muted); } .ap-split b { color: var(--rx-text, #e5e7eb); }

/* ---- Reward income ---- */
.rc-grid.rc-wide.rc-five { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
@media (min-width: 1700px) { .rc-grid.rc-wide.rc-five { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; } }
@media (max-width: 760px) { .rc-grid.rc-wide.rc-five { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.rc-rewardIncome .rc-ico { background: #f59e0b26; color: #fcd34d; }
.rwi-panel { display: grid; gap: 10px; border-color: #f59e0b44; }
.rwi-panel .eyebrow { color: #fcd34d; display: inline-flex; gap: 6px; align-items: center; }
.rwi-next { margin: 0; font-size: 13.5px; color: var(--rx-muted); } .rwi-next b { color: var(--rx-text, #e5e7eb); }
.rwi-leg { display: grid; gap: 4px; }
.rwi-lt { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--rx-muted); } .rwi-lt b { color: var(--rx-text, #e5e7eb); font-variant-numeric: tabular-nums; }
.rwi-bar i { background: linear-gradient(90deg, #b45309, #f59e0b, #fcd34d) !important; }

/* team tree card: user ID, sponsor ID, package only */
.oc-card.oc-min { cursor: default; }
.oc-ids { display: grid; gap: 3px; margin: 8px 0 0; font-size: 12px; }
.oc-ids > div { display: flex; justify-content: space-between; gap: 10px; }
.oc-ids dt { color: var(--rx-muted); margin: 0; }
.oc-ids dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; }
#team .oc-card.oc-min { grid-template-columns: minmax(0, 1fr) auto; min-width: 210px; max-width: 250px; cursor: default; }
#team .oc-card.oc-min .oc-main { grid-column: 1 / -1; grid-row: 1; padding-right: 30px; }
#team .oc-card.oc-min .oc-ids { grid-column: 1 / -1; grid-row: 2; margin: 0; }

/* investment levels (dashboard) */
.ilv { display: grid; gap: 12px; border-color: #a78bfa44; }
.ilv .eyebrow { color: #c4b5fd; display: inline-flex; gap: 6px; align-items: center; }
.ilv-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 10px; align-items: center; }
.ilv-row > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid #ffffff14; background: #ffffff05; }
.ilv-row small { color: var(--rx-muted); font-size: 12px; } .ilv-row b { font-size: 17px; } .ilv-row b i { font-style: normal; font-size: 12px; color: var(--rx-muted); }
.ilv-sp { font-size: 14px !important; }
.inv-sp-l { display: grid; gap: 4px; } .inv-sp-l small { color: var(--rx-muted); font-size: 11.5px; }
@media (max-width: 900px) { .ilv-row { grid-template-columns: 1fr 1fr; } }

.ilv-next { margin: 0; padding: 8px 12px; border-radius: 10px; border: 1px solid #fbbf2444; background: #fbbf240d; font-size: 13px; }
.ilv-next.open { border-color: #34d39955; background: #34d39910; }

/* ---- 2026-11-25: matrix, global line, Upgrade wallet ---- */
.rc-grid.rc-wide.rc-five { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important; }
.ra-global { background: #7c9cff !important; } .ra-levelBonus { background: #33c6ff !important; }
.oc-r.ra-global { background: #7c9cff22; border-color: #7c9cff55; }
.tm-tabs { flex-wrap: wrap; }
.mx-zone { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 12px 0 10px; }
.mx-lv { display: grid; gap: 3px; padding: 10px; border-radius: 12px; border: 1px solid #ffffff12; background: #0b0e17; font-size: 12px; min-width: 0; }
.mx-lv b { color: var(--rx-muted); font-size: 11px; letter-spacing: .04em; }
.mx-lv span { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mx-lv span small { font-size: 11px; font-weight: 600; color: var(--rx-muted); }
.mx-lv i { display: block; height: 4px; border-radius: 4px; background: #ffffff12; overflow: hidden; }
.mx-lv i em { display: block; height: 100%; background: linear-gradient(90deg, #0050f0, #00e5ff); }
.mx-lv > small { color: var(--rx-muted); font-variant-numeric: tabular-nums; }
.mx-lv.on { border-color: #0084ff55; } .mx-lv.full { border-color: #00e5ff88; background: #00e5ff0d; }
.mx-tools { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; font-size: 13px; color: var(--rx-muted); }
.mx-card { cursor: pointer; }
.mx-card.spill { border-style: dashed; }
.mx-card .oc-ids dd.positive { font-weight: 700; }
@media (max-width: 760px) { .mx-zone { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gl-wrap { display: grid; gap: 6px; margin-top: 8px; }
.gl-more { margin: 0; font-size: 12px; color: var(--rx-muted); padding-left: 8px; }
.gl-list { list-style: none; margin: 0; padding: 0 0 0 12px; display: grid; gap: 4px; border-left: 2px solid #0084ff44; }
.gl-row { display: grid; grid-template-columns: 64px 78px minmax(120px, 180px) 150px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px 10px; border-radius: 10px; border: 1px solid #ffffff10; background: #ffffff04; font-size: 12.5px; }
.gl-row.me { border-color: #00e5ffaa; background: #00e5ff10; }
.gl-row.up .gl-rel { color: #8fd4ff; } .gl-row.down .gl-rel { color: var(--rx-muted); }
.gl-pos, .gl-tier { color: var(--rx-muted); font-variant-numeric: tabular-nums; }
.gl-name { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; min-width: 0; }
.gl-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-note em { font-style: normal; color: var(--rx-muted); }
@media (max-width: 760px) { .gl-row { grid-template-columns: 52px 1fr; } .gl-row .gl-rel, .gl-row .gl-tier { display: none; } .gl-row .gl-note { grid-column: 1 / -1; } }

/* first visit: choose the first engine */
.fe-hero { padding: 8px 2px 18px; }
.fe-hero h1 { margin: 6px 0 8px; font-size: clamp(26px, 4vw, 38px); line-height: 1.1; }
.fe-hero p { margin: 0 0 12px; color: var(--rx-muted); max-width: 62ch; }
.fe-chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* engine picker: owned engines done, later ones locked (start with Spark, one step at a time) */
.upg-pick button[disabled] { cursor: not-allowed; }
.upg-pick button.owned { opacity: .55; border-color: #34d39955; color: #a7f3d0; }
.upg-pick button.locked { opacity: .42; }
.upg-pick button .ic { width: 12px; height: 12px; margin-right: 4px; vertical-align: -1px; }

/* ---- pay for someone else / ask someone to pay ---- */
.upg-alt { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #ffffff14; font-size: 14px; color: var(--rx-muted); }
.upg-alt .text-link { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 0; font: inherit; font-weight: 700; color: #7fd8ff; cursor: pointer; }
.upg-alt .ic { width: 16px; height: 16px; }
.pay-for, .pay-ask { display: grid; gap: 12px; }
.pay-f { display: grid; gap: 6px; }
.pay-f span { font-size: 13px; font-weight: 700; color: var(--rx-muted); }
.pay-f input { width: 100%; height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid #ffffff24; background: #0b1226; color: #fff; font: inherit; font-size: 15px; }
.pay-f input:focus { outline: none; border-color: #00e5ff88; box-shadow: 0 0 0 3px #00e5ff22; }
#pay-prev { display: grid; gap: 12px; }
.pay-hint { margin: 0; font-size: 13.5px; color: var(--rx-muted); display: flex; gap: 6px; align-items: flex-start; }
.pay-hint.bad { color: #ffb4a8; }
.pay-hint .ic { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.pay-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: linear-gradient(150deg, #13306a, #0b1631); box-shadow: inset 0 0 0 1px #00e5ff26; }
.pay-card img { width: 84px; height: auto; flex: none; filter: drop-shadow(0 8px 18px #00e5ff55); }
.pay-card > div { display: grid; gap: 3px; min-width: 0; }
.pay-card small { font-size: 12.5px; color: #b9d3f5; }
.pay-what { font-size: 16px; }
.pay-amt { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pay-amt i { font-style: normal; font-size: 13px; color: #b9d3f5; }
.pay-go { width: 100%; justify-content: center; }
.pay-fine { text-align: center; font-size: 12.5px; color: var(--rx-muted); }
.pay-link { padding: 10px 12px; border-radius: 12px; background: #0b1226; border: 1px dashed #ffffff2a; overflow-wrap: anywhere; font-size: 12.5px; }
.pay-btns { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 520px) { .pay-btns > * { flex: 1 1 auto; justify-content: center; } }
