  :root {
    --bg: #000000; --surface: #1c1c1e; --surface2: #2c2c2e;
    --frost-blue: #4fc8f8; --frost-deep: #1a7fc4; --frost-glow: #0a84ff;
    --gold: #ffd60a; --gold-deep: #ffb800;
    --text: #f5f5f7; --muted: #86868b; --border: rgba(255,255,255,0.1);
    --red: #ff6961; --green: #32d74b;
  }
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Space Grotesk', sans-serif; overflow-x: hidden;
    min-height: 100vh; display: flex; flex-direction: column;
    -webkit-font-smoothing: antialiased;
  }
  .topo-bg, #particles { display: none; }

  nav {
    position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 100;
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px;
    width: calc(100% - 32px); max-width: 1240px;
    padding: 0 28px; height: 64px;
    backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6);
    background: rgba(20,20,22,0.82);
    border: 1px solid var(--border); border-radius: 980px;
    overflow: hidden;
  }
  @media (min-width: 2000px) {
    nav { max-width: 1600px; height: 72px; }
    .page { max-width: 1180px; }
  }
  .nav-logo {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 18px; font-weight: 700;
    letter-spacing: -0.3px; color: var(--frost-blue);
    text-decoration: none;
    transition: opacity 0.2s;
  }
  .nav-logo:hover { opacity: 0.85; }
  .nav-logo-icon { width: 20px; height: 20px; transition: transform 0.3s cubic-bezier(0.22,1,0.36,1); }
  .nav-logo:hover .nav-logo-icon { transform: rotate(-8deg) scale(1.08); }
  .nav-logo span { color: var(--text); }
  .nav-back { color: var(--muted); font-size: 14px; text-decoration: none; transition: color 0.2s; }
  .nav-back:hover { color: var(--text); }
  .nav-link { color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; transition: color 0.2s; }
  .nav-link:hover { color: var(--text); }
  .nav-link.active { color: var(--frost-blue); }
  .nav-links { display: none; align-items: center; justify-content: center; gap: 18px; }
  .nav-right { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
  .nav-logout-btn {
    display: none;
    background: rgba(255,105,97,0.1); border: 1px solid rgba(255,105,97,0.35);
    color: var(--red); font-family: inherit; font-size: 13px; font-weight: 600;
    padding: 7px 14px; border-radius: 980px; cursor: pointer; transition: background 0.2s, border-color 0.2s;
  }
  .nav-logout-btn:hover { background: rgba(255,105,97,0.2); border-color: rgba(255,105,97,0.6); }
  @media (max-width: 700px) {
    nav { width: calc(100% - 20px); padding: 0 16px; gap: 10px; }
    .nav-right { gap: 10px; }
    .nav-back { font-size: 12px; }
    .nav-link { font-size: 12px; }
    .nav-links { gap: 12px; }
    .nav-logout-btn { font-size: 11px; padding: 6px 10px; }
    .withdraw-open-btn { font-size: 11px; padding: 6px 10px; }
  }

  .page { position: relative; z-index: 1; max-width: 900px; width: 100%; margin: 0 auto; padding: 130px 24px 100px; flex: 1 0 auto; }
  footer { flex-shrink: 0; }

  .gate { max-width: 460px; margin: 60px auto 0; text-align: center; }
  .gate-eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); margin-bottom: 16px; }
  .gate h1 { font-size: clamp(26px, 4.5vw, 36px); font-weight: 700; letter-spacing: -1px; margin-bottom: 14px; }
  .gate p { font-size: 14.5px; color: var(--muted); line-height: 1.7; margin-bottom: 28px; }
  .gate p.state-hint { font-size: 12.5px; opacity: 0.75; margin-top: -18px; margin-bottom: 0; display: none; }
  .gate p.state-hint.show { display: block; animation: fadeInUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .gate.denied h1 { color: var(--red); }

  .login-hero { max-width: 680px; margin: 20px auto 0; text-align: center; }
  .login-badge-spacer { height: 64px; margin: 0 auto 26px; }
  .login-hero h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 700; letter-spacing: -1.5px; margin-bottom: 16px; color: var(--text); }
  .login-hero > p { font-size: 15px; color: var(--muted); line-height: 1.75; margin-bottom: 32px; max-width: 480px; margin-left: auto; margin-right: auto; }
  .login-become-partner { font-size: 13px; color: var(--muted); margin-top: 16px; }
  .login-become-partner a { color: var(--frost-blue); text-decoration: none; font-weight: 600; transition: color 0.2s; }
  .login-become-partner a:hover { text-decoration: underline; }
  .login-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 48px; text-align: left; }
  .login-feature {
    background: var(--surface);
    border: 1px solid var(--border); border-radius: 18px; padding: 18px;
    transition: transform 0.25s cubic-bezier(0.22,1,0.36,1), border-color 0.25s, background 0.25s;
  }
  .login-feature:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.24); background: var(--surface2); }
  .login-feature-icon { width: 22px; height: 22px; margin-bottom: 10px; color: var(--frost-blue); }
  .login-feature-icon svg { width: 100%; height: 100%; }
  .login-feature-title { font-size: 13.5px; font-weight: 700; margin-bottom: 6px; }
  .login-feature-desc { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
  @media (max-width: 640px) { .login-features { grid-template-columns: 1fr; } }

  .spinner {
    width: 30px; height: 30px; margin: 0 auto 20px;
    border: 3px solid rgba(255,255,255,0.12); border-top-color: var(--frost-blue);
    border-radius: 50%; animation: spin 0.8s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  #pageTransition {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    opacity: 1; transition: opacity 0.3s ease;
  }
  #pageTransition .spinner { margin: 0; }
  #pageTransition.hide { opacity: 0; pointer-events: none; }
  @media (prefers-reduced-motion: reduce) { #pageTransition { transition: none; } }

  .btn-discord {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: #5865F2; color: #fff; text-decoration: none; border: none; cursor: pointer;
    font-family: inherit; font-size: 15px; font-weight: 600;
    padding: 14px 28px; border-radius: 980px;
    transition: transform 0.2s, filter 0.2s;
  }
  .btn-discord:hover { transform: translateY(-1px); filter: brightness(1.08); }
  .btn-discord.loading { opacity: 0.6; pointer-events: none; }
  .btn-discord img { width: 18px; height: 18px; }
  .btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: transparent; color: var(--text);
    border: 1px solid var(--border); cursor: pointer; text-decoration: none;
    font-family: inherit; font-size: 14px; font-weight: 600;
    padding: 12px 26px; border-radius: 980px; margin-top: 12px;
    transition: border-color 0.2s, background 0.2s;
  }
  .btn-secondary:hover { border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.05); }

  .state { display: none; }
  .state.active { display: block; animation: fadeInUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
  @keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
  @media (prefers-reduced-motion: reduce) { .state.active { animation: none; } }

  .partner-head { display: flex; align-items: center; gap: 16px; margin-bottom: 36px; flex-wrap: wrap; }
  .partner-avatar { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--border); }
  .partner-head h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
  .partner-head p { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
  .partner-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .tier-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    padding: 3px 10px; border-radius: 980px;
    background: rgba(79,200,248,0.12); border: 1px solid rgba(79,200,248,0.35); color: var(--frost-blue);
  }
  .tier-badge.partner {
    background: rgba(191,90,242,0.14);
    border: 1px solid rgba(191,90,242,0.4); color: #bf5af2;
  }
  .tier-badge.plus {
    background: rgba(255,214,10,0.14);
    border: 1px solid rgba(255,214,10,0.4); color: var(--gold);
  }
  .refresh-info { margin-left: auto; display: flex; align-items: center; gap: 10px; }
  .refresh-info span { font-size: 12px; color: var(--muted); }
  .refresh-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    background: var(--surface2); border: 1px solid var(--border);
    color: var(--muted); font-size: 15px; cursor: pointer; padding: 0;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
  }
  .refresh-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.28); }
  .refresh-btn.spinning { pointer-events: none; }
  .refresh-btn-icon { display: inline-block; }
  .refresh-btn.spinning .refresh-btn-icon { animation: spin 1.1s ease-in-out infinite; }

  .rankup-banner {
    border: 1px solid rgba(79,200,248,0.35); border-radius: 22px;
    background: var(--surface);
    padding: 20px 24px; margin-bottom: 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  }
  .rankup-banner-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
  .rankup-banner-text { font-size: 13px; color: var(--muted); }
  .rankup-banner-btn {
    flex-shrink: 0; border: none; cursor: pointer; border-radius: 980px;
    background: var(--frost-blue); color: #06121c;
    font-family: inherit; font-size: 13.5px; font-weight: 700;
    padding: 11px 22px; transition: transform 0.2s, filter 0.2s;
  }
  .rankup-banner-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }

  .code-card {
    border: 1px solid rgba(255,214,10,0.35); border-radius: 22px;
    background: var(--surface);
    padding: 26px 28px; margin-bottom: 28px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    transition: transform 0.3s cubic-bezier(0.22,1,0.36,1);
  }
  .code-card:hover { transform: translateY(-2px); }
  .code-card-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: var(--gold); margin-bottom: 8px; }
  .code-card-value { font-size: 26px; font-weight: 700; letter-spacing: 0.5px; }
  .code-copy-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--gold); color: #1a0f00;
    border: none; cursor: pointer; font-family: inherit; font-size: 13.5px; font-weight: 600;
    padding: 11px 20px; border-radius: 980px; transition: transform 0.2s, filter 0.2s;
  }
  .code-copy-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
  .code-copy-btn.copied { background: var(--green); }

  .quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 28px; }
  @media (max-width: 560px) { .quick-actions { grid-template-columns: 1fr; } }
  .quick-action-card {
    position: relative; display: flex; align-items: center; gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border); border-radius: 20px; padding: 20px 22px;
    text-decoration: none; color: inherit;
    transition: transform 0.25s cubic-bezier(0.22,1,0.36,1), border-color 0.25s;
  }
  .quick-action-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.24); }
  .quick-action-card.amber { border-color: rgba(255,214,10,0.28); }
  .quick-action-card.amber:hover { border-color: rgba(255,214,10,0.5); }
  .quick-action-icon {
    width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 21px;
    background: var(--surface2); border: 1px solid var(--border);
  }
  .quick-action-icon img { width: 26px; height: 26px; object-fit: contain; }
  .quick-action-icon svg { width: 22px; height: 22px; }
  .quick-action-card.amber .quick-action-icon { background: rgba(255,214,10,0.12); border-color: rgba(255,214,10,0.3); }
  .quick-action-body { flex: 1; min-width: 0; }
  .quick-action-title { font-size: 14.5px; font-weight: 700; margin-bottom: 3px; }
  .quick-action-value { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .quick-action-value strong { color: var(--frost-blue); font-weight: 700; }
  .quick-action-card.amber .quick-action-value strong { color: var(--gold); }
  .quick-action-arrow { font-size: 18px; color: var(--muted); flex-shrink: 0; transition: transform 0.2s, color 0.2s; }
  .quick-action-card:hover .quick-action-arrow { transform: translateX(3px); color: var(--text); }

  .stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 40px; }
  .stat-tile {
    background: var(--surface);
    border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px;
    transition: transform 0.25s cubic-bezier(0.22,1,0.36,1), border-color 0.25s;
  }
  .stat-tile:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.24); }
  .stat-tile .num { font-size: 22px; font-weight: 700; color: var(--frost-blue); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.3px; }
  .stat-tile.earnings .num { color: var(--gold); }
  .stat-tile .label { font-size: 12px; color: var(--muted); }
  .stat-tile-hint { font-size: 10.5px; color: var(--muted); opacity: 0.75; margin-top: 6px; line-height: 1.4; }

  .toast-stack {
    position: fixed; bottom: 20px; left: 20px; z-index: 500;
    display: flex; flex-direction: column; gap: 10px;
    width: min(340px, calc(100vw - 40px));
  }
  .toast {
    position: relative; overflow: hidden;
    background: var(--surface2);
    border: 1px solid var(--border); border-radius: 18px;
    padding: 13px 14px 16px; display: flex; align-items: flex-start; gap: 10px;
    box-shadow: 0 20px 60px -12px rgba(0,0,0,0.6);
    animation: toastIn 0.35s cubic-bezier(0.22,1,0.36,1) both;
  }
  .toast.hide { animation: toastOut 0.25s ease forwards; }
  @keyframes toastIn { from { opacity: 0; transform: translateX(-24px) scale(0.98); } to { opacity: 1; transform: translateX(0) scale(1); } }
  @keyframes toastOut { to { opacity: 0; transform: translateX(-24px); } }
  @media (prefers-reduced-motion: reduce) { .toast, .toast.hide { animation: none; } }
  .toast-icon { font-size: 19px; line-height: 1; flex-shrink: 0; margin-top: 1px; }
  .toast-body { flex: 1; min-width: 0; }
  .toast-title { font-size: 13.5px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
  .toast-desc { font-size: 12px; color: var(--muted); line-height: 1.45; }
  .toast-close {
    background: none; border: none; color: var(--muted); cursor: pointer;
    font-size: 15px; line-height: 1; padding: 2px; flex-shrink: 0; opacity: 0.6; transition: opacity 0.2s;
  }
  .toast-close:hover { opacity: 1; }
  .toast-progress {
    position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
    background: var(--frost-blue);
    animation: toastProgress linear forwards;
    transform-origin: left;
  }
  @keyframes toastProgress { from { transform: scaleX(1); } to { transform: scaleX(0); } }
  @media (prefers-reduced-motion: reduce) { .toast-progress { animation: none; } }

  .notif-bell-btn {
    position: relative; display: none; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    background: var(--surface2); border: 1px solid var(--border); color: var(--muted);
    cursor: pointer; transition: color 0.2s, border-color 0.2s, background 0.2s;
  }
  .notif-bell-btn:hover { color: var(--frost-blue); border-color: rgba(79,200,248,0.4); }
  .notif-bell-btn.active { color: var(--frost-blue); border-color: rgba(79,200,248,0.5); background: rgba(79,200,248,0.12); }
  .notif-bell-btn svg { width: 17px; height: 17px; }
  .notif-badge {
    position: absolute; top: -5px; right: -5px;
    min-width: 16px; height: 16px; padding: 0 4px; border-radius: 980px;
    background: var(--frost-blue); color: #06121c;
    font-size: 9.5px; font-weight: 700;
    display: none; align-items: center; justify-content: center;
    box-shadow: 0 0 0 2px var(--bg);
  }
  .notif-panel {
    position: fixed; top: 84px; right: 16px; z-index: 600;
    width: min(360px, calc(100vw - 32px)); max-height: min(480px, calc(100vh - 110px));
    background: var(--surface2);
    border: 1px solid var(--border); border-radius: 20px;
    box-shadow: 0 30px 90px -20px rgba(0,0,0,0.7);
    display: none; flex-direction: column; overflow: hidden;
    transform-origin: top right;
  }
  .notif-panel.open { display: flex; animation: notifPanelIn 0.25s cubic-bezier(0.22,1,0.36,1) both; }
  @keyframes notifPanelIn { from { opacity: 0; transform: scale(0.92) translateY(-6px); } to { opacity: 1; transform: scale(1) translateY(0); } }
  @media (prefers-reduced-motion: reduce) { .notif-panel.open { animation: none; } }
  .notif-panel-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 14px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0;
  }
  .notif-panel-head-title { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
  .notif-panel-actions { display: flex; gap: 4px; }
  .notif-panel-actions button {
    background: none; border: none; color: var(--muted); font-size: 10.5px; font-weight: 700;
    cursor: pointer; padding: 5px 7px; border-radius: 980px; transition: color 0.2s, background 0.2s;
    font-family: inherit;
  }
  .notif-panel-actions button:hover { color: var(--frost-blue); background: rgba(79,200,248,0.1); }
  .notif-panel-list { overflow-y: auto; padding: 6px; }
  .notif-item {
    position: relative; display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 30px 10px 10px; border-radius: 14px; margin-bottom: 2px;
    cursor: grab; user-select: none;
  }
  .notif-item.dragging { cursor: grabbing; }
  .notif-item.unread { background: rgba(79,200,248,0.08); box-shadow: inset 2px 0 0 var(--frost-blue); }
  .notif-item-icon { font-size: 16px; line-height: 1; margin-top: 1px; flex-shrink: 0; }
  .notif-item-body { flex: 1; min-width: 0; }
  .notif-item-title { font-size: 12.5px; font-weight: 700; color: var(--text); }
  .notif-item-desc { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
  .notif-item-footer { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 5px; }
  .notif-item-time { font-size: 10px; color: var(--muted); opacity: 0.7; flex-shrink: 0; }
  .notif-item-action { font-size: 10.5px; font-weight: 700; color: var(--frost-blue); text-decoration: none; white-space: nowrap; }
  .notif-item-action:hover { text-decoration: underline; }
  .notif-item-delete {
    position: absolute; top: 8px; right: 8px;
    width: 21px; height: 21px; border-radius: 50%;
    background: rgba(255,105,97,0.12); border: 1px solid rgba(255,105,97,0.3); color: var(--red);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; line-height: 1; cursor: pointer; padding: 0;
    opacity: 0; transition: opacity 0.15s, background 0.2s;
  }
  .notif-item:hover .notif-item-delete { opacity: 1; }
  .notif-item-delete:hover { background: rgba(255,105,97,0.24); }
  .notif-empty { text-align: center; padding: 32px 16px; color: var(--muted); font-size: 12.5px; }

  #refreshProgress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: transparent; pointer-events: none; }
  #refreshProgressBar { height: 100%; width: 0%; background: var(--frost-blue); will-change: width, opacity; }
  @media (prefers-reduced-motion: reduce) { #refreshProgressBar { transition: none !important; } }
  .withdraw-open-btn {
    display: none; align-items: center; justify-content: center; gap: 6px;
    background: var(--gold); color: #1a0f00;
    border: none; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 700;
    padding: 8px 16px; border-radius: 980px;
    transition: transform 0.2s, filter 0.2s;
  }
  .withdraw-open-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }

  .chart-section { margin-bottom: 24px; }
  .tracker-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
  .tracker-head h2 { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; }
  .chart-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border); border-radius: 20px; padding: 20px;
  }
  .chart-svg-version { display: block; width: 100%; height: auto; overflow: visible; }
  .chart-axis-label { fill: var(--muted); font-size: 11px; }
  .chart-version-label { fill: var(--text); font-size: 12px; font-weight: 600; }
  .chart-empty { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 13.5px; }
  .view-all-btn {
    display: block; width: 100%; margin-top: 10px; padding: 10px; border-radius: 980px;
    background: none; border: 1px dashed var(--border); color: var(--frost-blue);
    font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
  }
  .view-all-btn:hover { background: rgba(79,200,248,0.08); border-color: rgba(79,200,248,0.4); }
  .chart-loading { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 13.5px; }

  .range-switch { display: flex; gap: 4px; background: var(--surface2); border: 1px solid var(--border); border-radius: 980px; padding: 4px; flex-wrap: wrap; }
  .range-btn {
    background: none; border: none; cursor: pointer; border-radius: 980px;
    padding: 6px 12px; font-family: inherit; font-size: 12.5px; font-weight: 600;
    color: var(--muted); transition: color 0.2s, background 0.2s;
  }
  .range-btn:hover { color: var(--text); }
  .range-btn.active { background: var(--frost-blue); color: #06121c; }
  .chart-type-switch { width: fit-content; margin-bottom: 16px; }
  .chart-view { display: none; }
  .chart-view.active { display: block; animation: fadeInUp 0.35s cubic-bezier(0.22, 1, 0.36, 1) both; }
  @media (prefers-reduced-motion: reduce) { .chart-view.active { animation: none; } }
  .chart-subline { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
  .chart-subline strong { color: var(--text); font-weight: 700; }
  .chart-svg { display: block; width: 100%; height: 220px; overflow: visible; }
  .chart-curve { transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
  @media (prefers-reduced-motion: reduce) { .chart-curve { transition: none; } }
  .chart-tooltip {
    position: absolute; display: none; pointer-events: none; transform: translate(-50%, calc(-100% - 12px));
    background: var(--surface2); border: 1px solid var(--border); border-radius: 12px;
    padding: 8px 12px; font-size: 12.5px; white-space: nowrap; box-shadow: 0 12px 30px -8px rgba(0,0,0,0.6); z-index: 5;
  }
  .chart-tooltip-value { color: var(--frost-blue); font-weight: 700; font-size: 13.5px; }
  .chart-tooltip-label { color: var(--muted); margin-top: 2px; }

  .earnings-note { font-size: 12px; color: var(--muted); margin-top: 12px; text-align: center; }

  .history-list { display: flex; flex-direction: column; }
  .history-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 4px; margin: 0 -10px; padding-left: 10px; padding-right: 10px;
    border-bottom: 1px solid var(--border); border-radius: 12px;
    transition: background 0.2s;
  }
  .history-row:hover { background: rgba(255,255,255,0.03); }
  .history-row:last-child { border-bottom: none; }
  .history-row-date { font-size: 11.5px; color: var(--muted); }
  .history-row-desc { font-size: 13.5px; color: var(--text); margin-top: 2px; }
  .history-row-amount { font-weight: 700; font-size: 14px; color: var(--gold); flex-shrink: 0; white-space: nowrap; }

  @media (max-width: 600px) {
    .partner-head { flex-wrap: wrap; }
    .code-card { flex-direction: column; align-items: flex-start; }
    .footer-inner { text-align: center; }
  }

  footer { border-top: 1px solid var(--border); padding: 60px 48px 40px; position: relative; z-index: 1; }
  .footer-inner { max-width: 1160px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 40px 56px; position: relative; }
  .footer-brand { flex: 1 1 200px; }
  .footer-col { flex: 1 1 130px; }
  .footer-logo { font-size: 18px; font-weight: 700; color: var(--frost-blue); margin-bottom: 12px; letter-spacing: -0.2px; }
  .footer-tagline { font-size: 14px; color: var(--muted); }
  .footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); margin-bottom: 16px; font-weight: 600; }
  .footer-col a, .footer-link-btn { display: block; color: var(--text); font-size: 14px; text-decoration: none; margin-bottom: 10px; opacity: 0.75; transition: opacity 0.2s; }
  .footer-col a:hover, .footer-link-btn:hover { opacity: 1; }
  .footer-link-btn { background: none; border: none; padding: 0; font-family: inherit; cursor: pointer; text-align: left; }
  .footer-social-icons { display: flex; align-items: center; gap: 12px; }
  .footer-social-icons a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); margin-bottom: 0; opacity: 1; transition: border-color 0.2s, transform 0.15s, background 0.2s; }
  .footer-social-icons a:hover { border-color: rgba(255,255,255,0.28); background: var(--surface2); transform: translateY(-2px); }
  .footer-social-icons img { width: 18px; height: 18px; object-fit: contain; opacity: 0.85; transition: opacity 0.2s; }
  .footer-social-icons a:hover img { opacity: 1; }
  .footer-bottom { max-width: 1160px; margin: 48px auto 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 28px; font-size: 13px; color: var(--muted); }

  .modal-overlay {
    position: fixed; inset: 0; z-index: 700;
    background: rgba(0,0,0,0.65); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    display: none; align-items: center; justify-content: center; padding: 20px;
  }
  .modal-overlay.open { display: flex; animation: modalOverlayIn 0.2s ease both; }
  @keyframes modalOverlayIn { from { opacity: 0; } to { opacity: 1; } }
  .modal-box {
    position: relative; width: min(440px, 100%); max-height: min(600px, calc(100vh - 40px)); overflow-y: auto;
    background: var(--surface2);
    border: 1px solid var(--border); border-radius: 24px; padding: 32px 28px;
    box-shadow: 0 30px 90px -20px rgba(0,0,0,0.7);
    animation: modalBoxIn 0.25s cubic-bezier(0.22,1,0.36,1) both;
  }
  @keyframes modalBoxIn { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
  @media (prefers-reduced-motion: reduce) { .modal-overlay.open, .modal-box { animation: none; } }
  .modal-close {
    position: absolute; top: 16px; right: 16px;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--surface); border: 1px solid var(--border); color: var(--muted);
    cursor: pointer; font-size: 15px; display: flex; align-items: center; justify-content: center;
    transition: color 0.2s, border-color 0.2s;
  }
  .modal-close:hover { color: var(--text); border-color: rgba(255,105,97,0.4); }
  .modal-title { font-size: 20px; font-weight: 700; margin-bottom: 16px; padding-right: 30px; letter-spacing: -0.3px; }
  .qw-state { display: none; }
  .qw-state.active { display: block; animation: fadeInUp 0.3s cubic-bezier(0.22,1,0.36,1) both; }
  @media (prefers-reduced-motion: reduce) { .qw-state.active { animation: none; } }

  .withdraw-step { display: none; }
  .withdraw-step.active { display: block; animation: fadeInUp 0.3s cubic-bezier(0.22,1,0.36,1) both; }
  @media (prefers-reduced-motion: reduce) { .withdraw-step.active { animation: none; } }
  .withdraw-back-btn {
    display: inline-flex; align-items: center; gap: 4px; background: none; border: none; cursor: pointer;
    color: var(--muted); font-family: inherit; font-size: 12.5px; font-weight: 600;
    margin-bottom: 18px; padding: 0; transition: color 0.2s, transform 0.2s;
  }
  .withdraw-back-btn:hover { color: var(--frost-blue); transform: translateX(-2px); }
  .withdraw-title { font-size: 19px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.2px; }
  .withdraw-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; }
  .withdraw-sub strong { color: var(--gold); }
  .withdraw-field { margin-bottom: 16px; }
  .withdraw-field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 7px; }
  .withdraw-amount-row { display: flex; gap: 8px; }
  .withdraw-input {
    width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
    padding: 11px 14px; font-family: inherit; font-size: 14px; color: var(--text);
    outline: none; transition: border-color 0.2s, background 0.2s;
  }
  .withdraw-input::placeholder { color: var(--muted); }
  .withdraw-input:focus { border-color: var(--frost-blue); }
  .withdraw-input-wrap { position: relative; flex: 1; min-width: 0; }
  .withdraw-input-wrap .withdraw-input { padding-right: 32px; }
  .withdraw-input.has-stepper::-webkit-inner-spin-button,
  .withdraw-input.has-stepper::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
  .withdraw-input.has-stepper { -moz-appearance: textfield; appearance: textfield; }
  .withdraw-stepper {
    position: absolute; top: 1px; right: 1px; bottom: 1px; width: 27px;
    display: flex; flex-direction: column;
    border-left: 1px solid var(--border); border-radius: 0 13px 13px 0; overflow: hidden;
  }
  .withdraw-stepper-btn {
    flex: 1; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.02); border: none; color: var(--muted);
    cursor: pointer; padding: 0; line-height: 1;
    transition: background 0.15s, color 0.15s;
  }
  .withdraw-stepper-btn svg { width: 9px; height: 9px; display: block; }
  .withdraw-stepper-btn:first-child { border-bottom: 1px solid var(--border); }
  .withdraw-stepper-btn:hover { background: rgba(255,214,10,0.12); color: var(--gold); }
  .withdraw-stepper-btn:active { background: rgba(255,214,10,0.2); }
  .withdraw-max-btn {
    flex-shrink: 0; background: rgba(255,214,10,0.12); border: 1px solid rgba(255,214,10,0.4); color: var(--gold);
    font-family: inherit; font-size: 13px; font-weight: 700; border-radius: 980px;
    padding: 0 16px; cursor: pointer; transition: background 0.2s, border-color 0.2s;
  }
  .withdraw-max-btn:hover { background: rgba(255,214,10,0.2); }
  .withdraw-checkbox-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-bottom: 14px; }
  .withdraw-checkbox-row input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--frost-blue); cursor: pointer; flex-shrink: 0; }
  .withdraw-error { font-size: 12.5px; color: var(--red); margin: -4px 0 16px; }
  .withdraw-btn {
    width: 100%; padding: 13px; border: none; border-radius: 980px; cursor: pointer;
    font-family: inherit; font-size: 14.5px; font-weight: 700;
    background: var(--gold); color: #1a0f00;
    transition: transform 0.2s, filter 0.2s, opacity 0.2s;
  }
  .withdraw-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
  .withdraw-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

  .withdraw-done-check { display: flex; justify-content: center; margin-bottom: 18px; }
  .withdraw-done-check svg { width: 68px; height: 68px; overflow: visible; }
  .withdraw-done-check circle {
    fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round;
    stroke-dasharray: 166; stroke-dashoffset: 166;
    animation: checkCircle 0.5s cubic-bezier(0.22,1,0.36,1) forwards;
  }
  .withdraw-done-check path {
    fill: none; stroke: var(--green); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 48; stroke-dashoffset: 48;
    animation: checkMark 0.35s cubic-bezier(0.22,1,0.36,1) 0.45s forwards;
  }
  .withdraw-done-check .check-glow { stroke: none; fill: var(--green); opacity: 0; animation: checkGlow 0.6s ease-out 0.5s forwards; }
  @keyframes checkCircle { to { stroke-dashoffset: 0; } }
  @keyframes checkMark { to { stroke-dashoffset: 0; } }
  @keyframes checkGlow { 0% { opacity: 0.35; r: 2; } 100% { opacity: 0; r: 34; } }
  @media (prefers-reduced-motion: reduce) {
    .withdraw-done-check circle, .withdraw-done-check path { animation: none; stroke-dashoffset: 0; }
    .withdraw-done-check .check-glow { animation: none; opacity: 0; }
  }
  .withdraw-title.centered { text-align: center; }
  .withdraw-sub.centered { text-align: center; }
