/* ==========================================================================
   Dashboard (Panel) — builds on styles.css
   ========================================================================== */

.dashboard { background: var(--bg); }

/* ---------- app header ---------- */
.app-header {
  position: sticky; top: 0; z-index: 45;
  background: rgba(5, 7, 13, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.app-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
  padding: 0 max(var(--gutter), env(safe-area-inset-left)) 0 max(var(--gutter), env(safe-area-inset-right));
  max-width: 640px; margin: 0 auto;
}
.app-header-actions { display: flex; align-items: center; gap: 8px; }

.icon-round {
  position: relative;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  cursor: pointer;
}
.icon-round .dot {
  position: absolute; top: 9px; right: 10px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue-bright);
  box-shadow: 0 0 0 2px var(--bg);
}
@media (hover: hover) {
  .icon-round:hover { color: var(--text); border-color: rgba(96, 165, 250, 0.45); }
}

/* ---------- desktop nav (≥641 px — phones use the tabbar instead) ---------- */
.desk-nav { display: none; }

@media (min-width: 641px) {
  .desk-nav {
    display: block;
    background: rgba(5, 7, 13, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .desk-nav-inner {
    display: flex; align-items: center; gap: 4px;
    max-width: 640px; margin: 0 auto;
    padding: 0 var(--gutter);
  }
  .desk-nav-item {
    display: flex; align-items: center; gap: 7px;
    padding: 10px 14px;
    font-size: 13.5px; font-weight: 500;
    color: var(--muted);
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
  }
  .desk-nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
  .desk-nav-item.active {
    color: var(--text);
  }
  .desk-nav-item.active svg { color: var(--blue-bright); filter: drop-shadow(0 0 4px rgba(59,130,246,0.6)); }
}

/* ---------- layout ---------- */
.dash-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px max(var(--gutter), env(safe-area-inset-left)) 40px max(var(--gutter), env(safe-area-inset-right));
  display: flex; flex-direction: column; gap: 26px;
}

.preview-note {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: var(--blue-soft);
  color: var(--text-2);
  font-size: 13px;
}
.preview-note.live-ok {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.1);
  color: #6ee7b7;
}

/* ---------- balance card ---------- */
.balance-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background:
    radial-gradient(600px 240px at 90% -20%, rgba(59, 130, 246, 0.3), transparent 70%),
    linear-gradient(180deg, rgba(17, 24, 43, 0.96), rgba(11, 16, 30, 0.98));
  box-shadow: 0 26px 60px -34px rgba(37, 99, 235, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.balance-top { display: flex; align-items: center; justify-content: space-between; }
.balance-label { color: var(--text-2); font-size: 14px; }
.icon-plain {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0; border-radius: 8px;
  background: none; color: var(--text-2);
  cursor: pointer;
}
.icon-plain .eye-off { display: none; }
.icon-plain[aria-pressed="true"] .eye { display: none; }
.icon-plain[aria-pressed="true"] .eye-off { display: block; }

.balance-value { margin: 8px 0 2px; font-size: 38px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.balance-unit { font-size: 18px; font-weight: 600; color: var(--text-2); }
.balance-usd { color: var(--muted); font-size: 14px; }
.refs-hidden [data-ref-code],
.refs-hidden [data-ref-link],
.refs-hidden [data-ref-earned],
.refs-hidden [data-ref-count],
.refs-hidden [data-ref-rate],
.refs-hidden [data-ref-deposit-bonus] {
  font-size: 0 !important;
  user-select: none;
  pointer-events: none;
}
.refs-hidden [data-ref-code]::after,
.refs-hidden [data-ref-link]::after,
.refs-hidden [data-ref-earned]::after,
.refs-hidden [data-ref-count]::after,
.refs-hidden [data-ref-rate]::after,
.refs-hidden [data-ref-deposit-bonus]::after {
  content: '***';
  font-size: .875rem;
}

.balance-split {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 20px 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.balance-split dt { color: var(--muted); font-size: 12.5px; margin-bottom: 4px; }
.balance-split dd { font-size: 15px; font-weight: 600; }
.up { color: var(--up); }

.balance-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.balance-actions .btn { height: 48px; }

/* ---------- sections ---------- */
.dash-section { display: flex; flex-direction: column; gap: 14px; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.section-link { color: var(--blue-bright); font-size: 14px; font-weight: 600; }
.free-tag {
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.1);
  color: var(--up); font-size: 12px; font-weight: 600;
}

/* ---------- mining speed banner ---------- */
.speed-card {
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  background: linear-gradient(120deg, rgba(5, 20, 16, 0.9), rgba(8, 12, 22, 0.95));
}
.speed-lines {
  position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(115deg, transparent 0 26px, rgba(52, 211, 153, 0.12) 26px 27px);
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 75%);
  mask-image: linear-gradient(90deg, #000, transparent 75%);
}
.speed-main { position: relative; min-width: 0; }
.speed-label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.speed-value { margin: 2px 0; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; color: var(--up); line-height: 1.1; text-shadow: 0 0 20px rgba(52, 211, 153, 0.45); }
.speed-unit { font-size: 14px; font-weight: 600; color: #8ef0c8; }
.speed-sub { color: var(--muted); font-size: 12px; }
.speed-link {
  position: relative; flex: none;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.1);
  color: var(--up); font-size: 13px; font-weight: 600;
}

/* ---------- miner cards ---------- */
.miner-card {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.miner-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.miner-name { display: flex; align-items: center; gap: 12px; }
.miner-badge {
  flex: none;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 11px;
  border: 1px solid rgba(96, 165, 250, 0.25);
  background: var(--blue-soft);
  color: var(--blue-bright);
}
.miner-name h3 { font-size: 15.5px; font-weight: 600; }
.miner-meta { color: var(--muted); font-size: 13px; margin-top: 2px; }

.pill { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill-active { border: 1px solid rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.1); color: var(--up); }
.pill-ended { border: 1px solid rgba(248, 113, 113, 0.3); background: rgba(248, 113, 113, 0.08); color: var(--down, #f87171); }

a.miner-card-link { display: block; text-decoration: none; color: inherit; transition: border-color .15s; }
a.miner-card-link:hover { border-color: var(--blue-bright, #60a5fa); }

.miner-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px 0;
  margin-bottom: 14px;
}
.miner-stats > div { text-align: center; }
.miner-stats > div:first-child { text-align: left; }
.miner-stats > div:last-child { text-align: right; }
.miner-stats dt { color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.miner-stats dd { font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; margin: 0; }
.miner-card .miner-progress { margin-bottom: 0; }

.miner-progress { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.miner-progress span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue-2), var(--blue-bright)); }
.miner-progress.big { height: 10px; }
.miner-manage { height: 44px; margin-top: 14px; }

/* ---------- miner management page ---------- */
.miner-hero .miner-head { margin-bottom: 18px; }
.miner-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.miner-rate { padding-top: 16px; border-top: 1px solid var(--line); }
.miner-rate .label { color: var(--muted); font-size: 12.5px; }
.rate-val { margin-top: 4px; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.rate-unit { font-size: 14px; font-weight: 600; color: #8ef0c8; }
.miner-coin { margin-top: 6px; color: var(--text-2); font-size: 13px; }

/* ---------- coin selector ---------- */
.coin-list { display: grid; gap: 10px; }
.coin {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit; text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.coin-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; }
.coin-name { flex: 1; font-size: 15px; font-weight: 600; }
.coin-rate { flex: none; color: var(--up); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.coin-check {
  flex: none; width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: transparent; font-size: 12px; font-weight: 700;
}
.coin[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); }
.coin[aria-pressed="true"] .coin-check { background: var(--blue); border-color: var(--blue); color: #fff; }
@media (hover: hover) { .coin:hover { border-color: rgba(96, 165, 250, 0.45); } }
.coin:active { transform: scale(0.99); }

/* ---------- interactive daily-output bars (hover/tap shows the value) ---------- */
.bars-interactive { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 150px; }
.obar { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.obar-track { position: relative; width: 100%; height: 112px; display: flex; align-items: flex-end; justify-content: center; }
.obar-fill {
  width: 100%; max-width: 28px; height: var(--h); min-height: 4px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--blue-bright), var(--blue-2));
  transition: height 0.35s ease;
}
.obar em { color: var(--muted); font-size: 11px; font-style: normal; }
.obar-tip {
  position: absolute; left: 50%; bottom: var(--h);
  transform: translateX(-50%);
  margin-bottom: 6px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(52, 211, 153, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--up); font-size: 12px; font-weight: 700;
  white-space: nowrap;
  opacity: 0; transition: opacity 0.15s;
  pointer-events: none;
}
.obar:hover .obar-tip, .obar:focus .obar-tip, .obar.active .obar-tip { opacity: 1; }
.obar:focus-visible { outline: none; }
.obar:focus-visible .obar-fill { outline: 2px solid var(--blue-bright); outline-offset: 2px; }

/* ---------- rent plans ---------- */
.miners-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 28px 20px;
  border-radius: 18px;
  border: 1px dashed var(--line-strong);
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
}
.miners-empty-ic {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  margin-bottom: 4px;
  border-radius: 14px;
  border: 1px solid rgba(96, 165, 250, 0.25);
  background: var(--blue-soft);
  color: var(--blue-bright);
}
.miners-empty-title {
  margin: 0;
  font-size: 17px; font-weight: 700; letter-spacing: -0.01em;
}
.miners-empty-sub {
  margin: 0 0 10px;
  max-width: 280px;
  color: var(--muted);
  font-size: 13.5px; line-height: 1.45;
}

.plan-list { display: grid; gap: 14px; }
.plan-price {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1;
}
.plan-est { color: var(--text-2); }
.plan-est span { color: var(--up); }
.plan-card {
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.plan-featured {
  border-color: rgba(96, 165, 250, 0.4);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.12), var(--surface) 55%);
}
.plan-tag {
  position: absolute; top: -10px; right: 16px;
  padding: 3px 11px; border-radius: 999px;
  background: linear-gradient(180deg, #4b8dff, var(--blue-2));
  color: #fff; font-size: 11.5px; font-weight: 600;
  box-shadow: 0 6px 18px -5px rgba(59, 130, 246, 0.7);
}
.plan-head h3 { font-size: 17px; font-weight: 700; }
.plan-spec { color: var(--muted); font-size: 13px; margin-top: 2px; }
.plan-est { display: flex; align-items: baseline; gap: 8px; }
.plan-est span { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.plan-est small { color: var(--muted); font-size: 13px; }
.plan-facts { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; color: var(--text-2); font-size: 14px; }
.plan-facts strong { color: var(--text); }
.plan-facts li::before { content: "✓ "; color: var(--up); font-weight: 700; }
.plan-return { font-size: 14px; color: var(--text-2); padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.plan-return strong { color: var(--up); font-size: 15px; }
.plan-card { transition: border-color .2s, transform .2s, box-shadow .2s; }
.plan-card:hover { border-color: rgba(96, 165, 250, 0.35); transform: translateY(-2px); box-shadow: 0 8px 24px -8px rgba(59, 130, 246, 0.2); }
.plan-disclaimer { margin-top: 2px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
@media (min-width: 640px) { .plan-list { grid-template-columns: repeat(2, 1fr); } }

/* ---------- free game ---------- */
.game-card {
  display: flex; gap: 16px; align-items: center;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    radial-gradient(400px 200px at 100% 0%, rgba(52, 211, 153, 0.1), transparent 70%),
    var(--surface);
}
.game-body { flex: 1; }
.game-desc { color: var(--text-2); font-size: 14px; margin-bottom: 14px; }
.game-stats { display: flex; gap: 24px; margin-bottom: 16px; }
.game-stats dt { color: var(--muted); font-size: 12.5px; margin-bottom: 2px; }
.game-stats dd { font-size: 20px; font-weight: 700; }
.game-card .btn { height: 44px; padding: 0 28px; }

.game-art { flex: none; display: flex; align-items: center; gap: 8px; }
.game-tile {
  width: 44px; height: 58px;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, var(--surface-3), var(--surface-2));
  color: var(--text-2); font-weight: 700;
}
.game-vs { color: var(--muted); font-size: 12px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 60;
  left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  transform: translateX(-50%) translateY(8px);
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(10, 15, 28, 0.98);
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.9);
  color: var(--text); font-size: 14px; text-align: center;
  opacity: 0; transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 641px) { .toast { bottom: 24px; } }

/* ---------- desktop: hide app header safe-area quirks, keep it a centered column ---------- */
@media (min-width: 641px) {
  .game-card { padding: 24px; }
}

/* ---------- small phones ---------- */
@media (max-width: 400px) {
  .balance-value { font-size: 32px; }
  .balance-split { gap: 8px; }
  .balance-split dd { font-size: 14px; }
  .game-art { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}

/* ==========================================================================
   Shared app components (account menu, deposit, withdraw, portfolio)
   ========================================================================== */

/* ---------- account menu ---------- */
.account { position: relative; }
.account-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 50;
  min-width: 220px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.85);
}
.account-email {
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
  font-size: 14px; font-weight: 600;
  overflow-wrap: anywhere;
}
.account-label { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.account-item {
  display: block; width: 100%;
  padding: 11px 12px;
  border: 0; border-radius: 9px;
  background: none;
  color: var(--text-2);
  font: inherit; font-size: 15px; text-align: left;
  cursor: pointer;
}
.account-item.danger { color: #fca5a5; }
@media (hover: hover) {
  .account-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
  .account-item.danger:hover { background: rgba(248, 113, 113, 0.12); color: #fecaca; }
}

/* ---------- back link + page title ---------- */
.back-link {
  display: inline-flex; align-items: center; gap: 4px;
  margin-bottom: -4px;
  color: var(--text-2); font-size: 14px; font-weight: 500;
}
.back-link svg { flex: none; }
.page-title { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }

/* ---------- generic app card ---------- */
.app-card {
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.card-title { font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 16px; }

/* ---------- segmented control (Deposit / Withdraw) ---------- */
.seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.seg-tab {
  height: 42px;
  border: 0; border-radius: 9px;
  background: none;
  color: var(--muted);
  font: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.seg-tab[aria-selected="true"] {
  background: var(--blue-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.4);
}

/* ---------- network tabs ---------- */
.net-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.net-tab {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--bg-soft);
  color: var(--text-2);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}
.net-tab strong { color: var(--text); font-size: 15px; }
.net-tab span { font-size: 12.5px; color: var(--muted); }
.net-tab[aria-selected="true"] { border-color: var(--blue); background: var(--blue-soft); }

/* ---------- sample warning banner ---------- */
.sample-banner {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.1);
  color: #fde68a;
  font-size: 13px; line-height: 1.5;
}
.sample-banner svg { flex: none; margin-top: 1px; }
.sample-banner strong { color: #fef3c7; }

/* ---------- QR ---------- */
.qr-frame { display: grid; place-items: center; margin-bottom: 18px; }
.qr {
  width: 200px; height: 200px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
}
.qr svg { width: 100%; height: 100%; display: block; }

/* ---------- address ---------- */
.field-label { color: var(--text-2); font-size: 13px; margin-bottom: 8px; }
.address-row {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--bg-soft);
}
.address {
  flex: 1; min-width: 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13.5px; line-height: 1.4;
  color: var(--text);
  overflow-wrap: anywhere;
}
.copy-btn {
  flex: none;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  cursor: pointer;
}
@media (hover: hover) { .copy-btn:hover { color: var(--text); border-color: rgba(96, 165, 250, 0.45); } }

/* ---------- notes ---------- */
.notes { display: grid; gap: 8px; list-style: none; margin: 18px 0 0; padding: 0; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.notes li { position: relative; padding-left: 16px; }
.notes li::before { content: "•"; position: absolute; left: 2px; color: var(--muted); }
.notes strong { color: var(--text); }
.notes .muted { color: var(--muted); }

/* ---------- withdraw form ---------- */
.withdraw-avail { margin-bottom: 16px; color: var(--text-2); font-size: 14px; }
.withdraw-avail strong { color: var(--text); }
.app-form { display: grid; gap: 16px; }
.app-form .field label { display: block; margin-bottom: 8px; color: var(--text-2); font-size: 14px; font-weight: 500; }
.app-form input, .app-form select {
  width: 100%; height: 50px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #060911;
  color: var(--text);
  font: inherit; font-size: 16px;
}
.app-form input:focus, .app-form select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25); }
.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; right: 16px; top: 50%;
  width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); pointer-events: none;
}
.select-wrap select { -webkit-appearance: none; appearance: none; padding-right: 40px; }
.app-form .btn { height: 52px; margin-top: 2px; }

/* ---------- withdraw fee breakdown ---------- */
.wd-fee-box {
  padding: 14px 16px; border-radius: 12px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
}
.wd-fee-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-2); padding: 4px 0; }
.wd-fee-row strong { color: var(--text); font-weight: 600; }
.wd-fee-net { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; }
.wd-fee-net strong { color: var(--green); }

/* ---------- portfolio summary ---------- */
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.summary-tile { padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.tile-label { color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.tile-value { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.tile-unit { font-size: 13px; font-weight: 600; color: var(--text-2); }

/* ---------- portfolio bars ---------- */
.bars-card { padding: 20px; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 140px; }
.bar { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar span {
  width: 100%; max-width: 28px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--blue-bright), var(--blue-2));
  min-height: 4px;
}
.bar em { color: var(--muted); font-size: 11px; font-style: normal; }
.bars-note { margin-top: 14px; color: var(--muted); font-size: 12.5px; }
.bars-empty { grid-column: 1 / -1; color: var(--muted); font-size: 13px; text-align: center; padding: 40px 0; margin: 0; }

/* ---------- transactions ---------- */
.tx-list { display: grid; gap: 2px; list-style: none; margin: 0; padding: 0; }
.tx {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.tx-icon { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; }
.tx-in { background: rgba(52, 211, 153, 0.12); color: var(--up); }
.tx-out { background: rgba(248, 113, 113, 0.12); color: #fca5a5; }
.tx-mine { background: var(--blue-soft); color: var(--blue-bright); }
.tx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tx-main strong { font-size: 14.5px; font-weight: 600; }
.tx-sub { color: var(--muted); font-size: 12.5px; }
.tx-amt { flex: none; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tx-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 32px 0; list-style: none; }

@media (max-width: 400px) {
  .summary-grid { gap: 8px; }
  .summary-tile { padding: 14px; }
  .tile-value { font-size: 18px; }
  .qr { width: 176px; height: 176px; }
}

/* ==========================================================================
   Real or AI? game
   ========================================================================== */
.game-main { gap: 20px; }
.game-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.game-sub { margin-top: 6px; color: var(--text-2); font-size: 14px; }
.game-sub strong { color: var(--text); }

.game-score { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.score-tile {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 14px 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.score-val { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.score-lbl { color: var(--muted); font-size: 12px; }

.game-stage { min-height: 200px; }
.game-loading { color: var(--muted); text-align: center; padding: 40px 0; }

.game-prompt { text-align: center; font-size: 17px; margin-bottom: 14px; }
.game-prompt strong { color: var(--blue-bright); }

.guess-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.guess {
  position: relative;
  padding: 0; margin: 0;
  border: 2px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 1;
  transition: transform 0.12s, border-color 0.2s, box-shadow 0.2s;
}
.guess img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-select: none; user-select: none; }
.guess:not(:disabled):active { transform: scale(0.98); }
@media (hover: hover) { .guess:not(:disabled):hover { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25); } }
.guess:disabled { cursor: default; }

.guess-badge {
  position: absolute; top: 8px; left: 8px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  opacity: 0; transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
}
.guess.is-real .guess-badge,
.guess.is-ai .guess-badge { opacity: 1; transform: none; }
.guess.is-real { border-color: var(--up); }
.guess.is-real .guess-badge { background: var(--up); color: #04231a; }
.guess.is-ai { border-color: rgba(248, 113, 113, 0.7); }
.guess.is-ai .guess-badge { background: #f87171; color: #2a0a0a; }
.guess.is-ai img { filter: grayscale(0.3) brightness(0.8); }
.guess.picked-correct { box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.45); }
.guess.picked-wrong { box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.45); }

.game-hint { margin-top: 14px; text-align: center; color: var(--muted); font-size: 13px; }

.game-result {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 18px;
  padding: 18px;
  border-radius: 16px;
  text-align: center;
}
.game-result.good { border: 1px solid rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.1); }
.game-result.bad { border: 1px solid rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.08); }
.game-result strong { font-size: 18px; }
.game-result.good strong { color: var(--up); }
.game-result.bad strong { color: #fca5a5; }
.game-result span { color: var(--text-2); font-size: 14px; }
.game-result .btn { margin-top: 12px; }

.game-msg {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 40px 20px;
  text-align: center;
}
.game-msg-icon { font-size: 40px; }
.game-msg h2 { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.game-msg p { color: var(--text-2); font-size: 14px; max-width: 320px; }
.game-next { color: var(--text-2); }
.game-next strong { color: var(--text); }
.game-msg .btn { margin-top: 12px; }

@media (max-width: 360px) {
  .score-val { font-size: 19px; }
  .game-head { flex-direction: column; }
}

/* ==========================================================================
   Profile page
   ========================================================================== */
.profile-main { gap: 18px; }
.profile-id { display: flex; align-items: center; gap: 16px; }
.avatar {
  flex: none;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #1d4ed8);
  color: #fff; font-size: 24px; font-weight: 700;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}
.profile-who { min-width: 0; }
.profile-email { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.email-btn {
  flex: none; width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 0; border-radius: 8px;
  background: none; color: var(--text-2);
  cursor: pointer;
}
.email-btn .eye-off { display: none; }
.email-btn.revealed .eye { display: none; }
.email-btn.revealed .eye-off { display: block; }
@media (hover: hover) { .email-btn:hover { color: var(--text); } }

/* wallets */
.wallet-card {
  position: relative; overflow: hidden;
  padding: 20px 22px;
  border-radius: 20px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background:
    radial-gradient(500px 220px at 92% -20%, rgba(59, 130, 246, 0.28), transparent 70%),
    linear-gradient(180deg, rgba(17, 24, 43, 0.96), rgba(11, 16, 30, 0.98));
  box-shadow: 0 24px 56px -34px rgba(37, 99, 235, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.wallet-card .label { color: var(--text-2); font-size: 13px; }
.wallet-total { margin: 4px 0 18px; font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.wallet-unit { font-size: 16px; font-weight: 600; color: var(--text-2); }
.wallet-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wallet-sub { padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.28); }
.wallet-sub .label { font-size: 12px; margin-bottom: 5px; }
.wallet-val { font-size: 16px; font-weight: 600; }

/* quick actions */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.qa {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 4px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px; font-weight: 500;
  transition: transform 0.12s, border-color 0.2s;
}
.qa-ic {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.25);
  background: var(--blue-soft);
  color: var(--blue-bright);
}
.qa:active { transform: scale(0.97); }
@media (hover: hover) { .qa:hover { border-color: rgba(96, 165, 250, 0.4); } }

/* settings menu */
.menu-list { display: grid; gap: 2px; }
.menu-item {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 15px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit; text-align: left;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.2s;
}
.menu-ic {
  flex: none; width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  background: var(--blue-soft);
  color: var(--blue-bright);
}
.menu-label { flex: 1; font-size: 15px; font-weight: 500; }
.menu-arrow { flex: none; color: var(--muted); font-size: 22px; line-height: 1; }
@media (hover: hover) { .menu-item:hover { border-color: rgba(96, 165, 250, 0.4); } }
.menu-item:active { transform: scale(0.99); }
.menu-item.danger .menu-label { color: #fca5a5; }
.menu-item.danger .menu-ic { border-color: rgba(248, 113, 113, 0.3); background: rgba(248, 113, 113, 0.12); color: #fca5a5; }

@media (max-width: 360px) {
  .qa { font-size: 11.5px; }
  .qa-ic { width: 42px; height: 42px; }
}

/* ---------- panel welcome / referral promo ---------- */
.bonus-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(251, 146, 60, 0.4);
  background:
    radial-gradient(420px 160px at 100% 0%, rgba(251, 146, 60, 0.18), transparent 70%),
    linear-gradient(180deg, rgba(42, 24, 10, 0.9), rgba(17, 24, 43, 0.95));
  color: var(--text);
  text-decoration: none;
  transition: transform 0.12s, border-color 0.2s;
}
.bonus-banner:active { transform: scale(0.99); }
.bonus-banner-kicker {
  margin: 0 0 4px;
  color: #fb923c;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.bonus-banner-title {
  margin: 0 0 4px;
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
}
.bonus-banner-title strong { color: #fdba74; }
.bonus-banner-sub {
  margin: 0;
  color: var(--text-2);
  font-size: 13px; line-height: 1.4;
}
.bonus-banner-sub strong { color: #fdba74; }
.bonus-banner-cta {
  flex: none;
  display: inline-flex; align-items: center; gap: 2px;
  color: #fb923c;
  font-size: 13px; font-weight: 700;
  white-space: nowrap;
}
.team-ticker { margin-bottom: 4px; }

/* ---------- referral / team ---------- */
.tier-pill {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: var(--blue-soft);
  color: var(--blue-bright);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.02em;
}

.ref-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}
.ref-stat {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.ref-stat-label { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.ref-stat-val {
  font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15;
}
.ref-stat-val.accent { color: var(--blue-bright); }
.ref-stat-val.up { color: #4ade80; }
.ref-stat-sub { margin-top: 4px; color: var(--muted); font-size: 11.5px; }

.ref-invite .field-label { margin-bottom: 8px; }
.field-hint { color: var(--muted); font-size: 13px; line-height: 1.45; }

.ref-rules-title {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.ref-rules-list {
  margin: 0 0 16px; padding-left: 18px;
  color: var(--text-2); font-size: 13.5px; line-height: 1.55;
}
.ref-rules-list li + li { margin-top: 6px; }
.ref-rules-list strong { color: var(--text); font-weight: 600; }

.ref-tiers { display: grid; gap: 8px; }
.ref-tier {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text-2);
  font-size: 13px;
}
.ref-tier strong { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.ref-tier-range { color: var(--muted); font-size: 12px; }
.ref-tier.active {
  border-color: rgba(96, 165, 250, 0.45);
  background: var(--blue-soft);
  color: var(--text);
}
.ref-tier.active strong { color: var(--blue-bright); }
.ref-tier.locked { opacity: 0.55; }
.ref-tier-check {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-size: 12px; color: var(--muted);
}
.ref-tier.active .ref-tier-check,
.ref-tier.unlocked .ref-tier-check {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
}

.ref-next {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: rgba(59, 130, 246, 0.08);
  color: var(--text-2);
  font-size: 13px; line-height: 1.45;
}
.ref-next strong { color: var(--blue-bright); }

.ref-members { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ref-member {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
  align-items: center;
}
.ref-member-cut {
  grid-row: 1 / span 2;
  align-self: center;
  text-align: left;
  font-size: 15px; font-weight: 700;
  color: #4ade80;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 4.5rem;
}
.ref-member-cut span { display: block; color: var(--muted); font-size: 11px; font-weight: 500; }
.ref-member-email { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.ref-member-meta { color: var(--muted); font-size: 12px; min-width: 0; }
.ref-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px; font-weight: 600;
  vertical-align: middle;
}
.ref-badge.active { background: rgba(74, 222, 128, 0.14); color: #4ade80; }
.ref-badge.pending { background: rgba(251, 191, 36, 0.14); color: #fbbf24; }
.ref-empty {
  padding: 18px 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
}

/* ==========================================================================
   Modals (password, pin)
   ========================================================================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 20px;
  animation: modalFadeIn .2s ease;
}
.modal-overlay[hidden] { display: none; }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 28px 24px;
  animation: modalSlideIn .25s ease;
}
@keyframes modalSlideIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.modal-header h2 {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 600; margin: 0;
}
.modal-close {
  background: none; border: none; color: var(--muted); cursor: pointer;
  padding: 4px; border-radius: 8px; transition: color .15s;
}
.modal-close:hover { color: var(--text); }

.modal-desc {
  color: var(--text-2); font-size: 14px; margin-bottom: 20px; line-height: 1.5;
}

.modal-form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 13px; font-weight: 500; color: var(--text-2);
}
.form-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  outline: none;
  transition: border-color .15s;
}
.form-input:focus { border-color: var(--blue); }
.form-input::placeholder { color: var(--muted); }

.pin-input {
  text-align: center; letter-spacing: 8px; font-size: 24px;
}

.modal-submit { margin-top: 4px; }

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237682a3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
select.form-input option { background: var(--surface-2); color: var(--text); }

textarea.form-input { resize: vertical; min-height: 100px; }
