/* ─── Reset & Base ─────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0d1117;
  --card:     #161b22;
  --card2:    #1c2230;
  --border:   #21262d;
  --green:    #2fb250;
  --green-bg: rgba(47,178,80,.12);
  --red:      #f85149;
  --red-bg:   rgba(248,81,73,.12);
  --text:     #e6edf3;
  --muted:    #8b949e;
  --blue:     #1d6ae5;
  --gold:     #f59e0b;
  --radius:   16px;
}

html {
  height: 100%;
  overflow: hidden;
  background: #0d1117;
}

body {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #0d1117;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

#app {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
  max-width: 430px;
  margin: 0 auto;
}

/* ─── Connect Screen ────────────────────────────────────────────────────────── */

.connect-screen {
  display: flex; align-items: center; justify-content: center;
  min-height: 100%; padding: 24px;
}
.connect-card { text-align: center; max-width: 320px; width: 100%; }
.connect-logo { font-size: 64px; margin-bottom: 20px; }
.connect-title { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.connect-subtitle { color: var(--muted); font-size: 15px; line-height: 1.6; margin-bottom: 32px; }
.btn-connect {
  width: 100%; padding: 14px 20px; background: #0052ff; color: #fff;
  border: none; border-radius: var(--radius); font-size: 16px; font-weight: 700;
  cursor: pointer; margin-bottom: 12px; transition: opacity .15s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-connect:hover { opacity: .9; }
.btn-connect:disabled { opacity: .6; cursor: not-allowed; }
.btn-connect-logo { display: flex; align-items: center; flex-shrink: 0; }
.connect-hint { font-size: 12px; color: var(--muted); }

/* ─── Home Screen ────────────────────────────────────────────────────────────── */

#home-screen { padding: 0 0 40px; }

/* Profile header */
.profile-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 14px;
}
.profile-left { display: flex; align-items: center; gap: 12px; }
.profile-avatar {
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800; color: #fff; flex-shrink: 0;
  letter-spacing: -.5px;
}
.profile-meta { display: flex; flex-direction: column; gap: 3px; }
.profile-name { font-size: 15px; font-weight: 700; color: var(--text); }
.profile-balance-row { display: flex; align-items: center; gap: 5px; }
.profile-balance-label { font-size: 11px; color: var(--muted); }
.profile-balance-val { font-size: 13px; font-weight: 700; color: var(--gold); }
.profile-streak-pill {
  background: rgba(234,88,12,.12); border: 1px solid rgba(234,88,12,.3);
  color: #fb923c; font-size: 13px; font-weight: 700;
  padding: 7px 14px; border-radius: 999px;
  display: flex; align-items: center;
}

/* Season section (open canvas) */
.season-section { padding: 4px 16px 20px; }
.season-title-row {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-bottom: 8px;
}
.season-title {
  font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -.3px;
  text-align: center;
}
.season-chevron-btn {
  background: none; border: none; cursor: pointer; padding: 0;
  color: var(--muted); display: flex; align-items: center;
  flex-shrink: 0; margin-top: 4px;
}
.season-subtitle {
  font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 16px;
  width: 85%; margin-left: auto; margin-right: auto; text-align: center;
}

/* Pool inline (under season title) */
.pool-inline { margin-top: 8px; }
.pool-inline-row {
  display: flex; justify-content: center; align-items: center; gap: 12px;
  width: 85%; margin: 0 auto;
}
.pool-inline-label { font-size: 18px; font-weight: 800; color: var(--text); }
.pool-inline-right { display: flex; align-items: center; gap: 10px; }
.pool-inline-pct { font-size: 18px; font-weight: 800; color: var(--gold); }
.pool-inline-amount { display: none; }
.pool-home-bar {
  height: 6px; background: var(--card2); border-radius: 3px; overflow: hidden;
  width: 85%; margin: 10px auto 0;
}
.pool-home-fill {
  height: 100%; background: linear-gradient(90deg, var(--gold), #d97706);
  border-radius: 3px; transition: width 1s ease;
}

/* Season modal */
.season-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.65);
  z-index: 1000; display: flex; align-items: flex-end;
}
.season-modal-sheet {
  background: #161b22; border-radius: 24px 24px 0 0;
  width: 100%; max-width: 430px; margin: 0 auto;
  max-height: 88vh; overflow-y: auto; overscroll-behavior: none;
  padding-bottom: env(safe-area-inset-bottom, 16px);
  animation: slideUp .25s ease;
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.season-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 12px; border-bottom: 1px solid var(--border);
}
.season-modal-title { font-size: 17px; font-weight: 700; }
.season-modal-close {
  background: var(--card2); border: none; border-radius: 50%;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text);
}
.season-modal-body { padding: 16px 20px 24px; }
.season-modal-section-title {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px;
}
.season-modal-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.season-modal-item:last-of-type { border-bottom: none; }
.season-modal-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--card2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.season-modal-content {
  flex: 1; font-size: 13px; color: var(--muted); line-height: 1.5;
}
.season-modal-content span { color: var(--text); font-weight: 600; }
.season-modal-arrow { flex-shrink: 0; opacity: .4; }
.season-modal-cta {
  width: 100%; margin-top: 20px; padding: 16px;
  background: var(--blue); color: #fff; border: none;
  border-radius: var(--radius); font-size: 16px; font-weight: 700;
  cursor: pointer; transition: opacity .15s;
}
.season-modal-cta:hover { opacity: .9; }

/* Promo banner (compact) */
.promo-banner {
  margin: 0 16px 14px;
  background: linear-gradient(130deg, #0d1f40 0%, #13233a 55%, #111827 100%);
  border: 1px solid rgba(29,106,229,.3);
  border-radius: 18px; padding: 14px 14px 14px 18px;
  display: flex; align-items: center; cursor: pointer;
  overflow: hidden; position: relative; min-height: 86px;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  transition: transform .15s;
}
.promo-banner:hover { transform: translateY(-1px); }
.promo-content { flex: 1; }
.promo-tag { font-size: 10px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 6px; }
.promo-title { font-size: 17px; font-weight: 800; color: #fff; line-height: 1.2; margin-bottom: 8px; }
.promo-cta { font-size: 13px; color: rgba(255,255,255,.5); }
.promo-cta span { color: #4d8ef0; font-size: 15px; }
.promo-art { position: absolute; right: -10px; top: -10px; bottom: -10px; width: 140px; pointer-events: none; }

/* Daily check-in button */
.checkin-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: calc(100% - 32px); margin: 0 16px 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  cursor: pointer; text-align: left; transition: border-color .2s, opacity .2s;
}
.checkin-btn:disabled { opacity: .45; cursor: not-allowed; }
.checkin-btn.active { border-color: var(--gold); box-shadow: 0 0 14px rgba(245,158,11,.18); }
.checkin-btn-streak {
  font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 3px;
}
.checkin-btn-hint { font-size: 12px; color: var(--muted); }
.checkin-btn-badge {
  display: inline-block; padding: 7px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 700;
  background: rgba(245,158,11,.15); color: var(--gold);
  border: 1px solid rgba(245,158,11,.3);
  transition: background .2s, color .2s;
}
.checkin-btn.active .checkin-btn-badge {
  background: var(--gold); color: #0a0a0a; border-color: var(--gold);
}

/* Tasks */
.tasks-card {
  margin: 0 16px 14px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.tasks-title {
  font-size: 12px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px; padding: 12px 16px 8px;
}
.task-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-top: 1px solid var(--border);
}
.task-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.task-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.task-name { font-size: 14px; font-weight: 500; }
.task-xp   { font-size: 12px; color: var(--gold); font-weight: 600; }
.btn-task {
  width: 32px; height: 32px; background: var(--card2);
  border: 1px solid var(--border); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); text-decoration: none;
  font-size: 16px; font-weight: 700; transition: all .15s;
}
.btn-task:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-task-done { background: transparent; border-color: transparent; color: var(--green); cursor: default; }
.task-done .task-name { color: var(--muted); }
.task-done .task-xp  { color: var(--green); }
.task-clickable { cursor: pointer; transition: background .15s; }
.task-clickable:hover { background: var(--card2); }

/* Task verify sheet */
.task-verify-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; z-index: 200; animation: fadeIn .15s ease;
}
.task-verify-sheet {
  background: var(--card); border-radius: 20px;
  padding: 28px 24px 28px; width: 100%; max-width: 440px; max-height: 85vh;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  animation: popIn .2s ease; overflow-y: auto; overscroll-behavior: none;
  box-sizing: border-box;
}

/* Centered modal overlay (folder / ambassador) */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7);
  z-index: 500; display: flex; align-items: center; justify-content: center;
  padding: 16px; animation: fadeIn .15s ease;
}
.modal-sheet {
  background: var(--card); border-radius: 20px;
  width: 100%; max-width: 430px; max-height: 85vh; overflow-y: auto;
  overscroll-behavior: none; animation: popIn .2s ease;
}
@keyframes popIn {
  from { transform: scale(.95); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.task-verify-icon {
  width: 56px; height: 56px; border-radius: 50%; overflow: hidden;
  margin-bottom: 4px;
}
.task-verify-name {
  font-size: 17px; font-weight: 700; text-align: center;
}
#task-verify-body { width: 100%; min-width: 0; }
.task-sheet-hint {
  font-size: 14px; color: var(--muted); text-align: center; margin: 4px 0 8px;
}
.task-sheet-error {
  font-size: 14px; color: var(--red); text-align: center; margin: 4px 0 8px; line-height: 1.5;
}
.task-checking-spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--blue);
  animation: spin .7s linear infinite; margin: 8px auto 4px;
}
@keyframes spin { to { transform: rotate(360deg) } }
.task-verify-btns {
  display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 8px;
}
.btn-task-confirm {
  width: 100%; padding: 16px; background: var(--blue); color: #fff;
  border: none; border-radius: var(--radius); font-size: 16px; font-weight: 700;
  cursor: pointer; transition: opacity .15s;
}
.btn-task-confirm:disabled { opacity: .4; cursor: default; }
.btn-task-secondary {
  background: transparent !important; color: var(--blue) !important;
  border: 1px solid var(--blue) !important;
}
.btn-task-cancel {
  width: 100%; padding: 14px; background: transparent; color: var(--muted);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 15px; cursor: pointer;
}
/* Tweet share sheet */
.tweet-share-url-row {
  display: flex; align-items: center; gap: 8px; width: 100%;
  min-width: 0;
  background: var(--card2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px; box-sizing: border-box;
}
.tweet-share-url-text {
  flex: 1; min-width: 0; font-size: 12px; color: var(--muted);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.tweet-share-copy-btn {
  flex-shrink: 0; background: rgba(255,255,255,.08); border: none;
  border-radius: 6px; color: var(--text); font-size: 12px;
  padding: 5px 12px; cursor: pointer;
}
.tweet-share-x-btn {
  display: flex !important; align-items: center; justify-content: center;
  gap: 8px; text-decoration: none; width: 100%;
}
.tweet-share-input {
  width: 100%; padding: 12px 14px; background: var(--card2);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); font-size: 14px; outline: none; box-sizing: border-box;
}
.tweet-share-input:focus { border-color: var(--blue); }

/* Leaderboard (open canvas) */
.leaderboard-section { padding: 0 16px 24px; }
.leaderboard-title-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.leaderboard-title { font-size: 18px; font-weight: 700; }
.leaderboard-sub { font-size: 18px; color: var(--muted); display: inline-block; }
.leaderboard-rows {}
.lb-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.lb-row:last-child { border-bottom: none; }
.lb-rank { font-size: 18px; width: 30px; flex-shrink: 0; }
.lb-name { flex: 1; font-size: 14px; font-weight: 500; color: var(--text); }
.lb-xp   { font-size: 13px; font-weight: 700; color: var(--gold); }
.lb-streak { font-size: 11px; color: #fb923c; margin-left: 6px; }
.lb-loading { padding: 16px 0; color: var(--muted); font-size: 13px; }

/* ─── Game Screen ────────────────────────────────────────────────────────────── */

#game-screen { padding-bottom: 110px; }

.game-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border); margin-bottom: 8px;
}
.btn-back {
  width: 36px; height: 36px; background: var(--card);
  border: 1px solid var(--border); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text); flex-shrink: 0;
}
.game-round-info {
  flex: 1; display: flex; justify-content: space-between; align-items: center;
}
.round-label { font-size: 14px; color: var(--muted); }
.game-timer {
  font-size: 20px; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: 1px;
}

/* ─── Card Stack ─────────────────────────────────────────────────────────────── */

.positive { color: var(--green); }
.negative { color: var(--red); }

#card-stack { padding: 0 16px 8px; }

.pred-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 24px; overflow: hidden; user-select: none; touch-action: pan-y;
}

.card-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 16px 8px;
}
.card-asset-icon {
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.card-counter {
  background: rgba(255,255,255,.1); color: var(--text);
  font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px;
}
.card-question {
  font-size: 20px; font-weight: 700; line-height: 1.35; padding: 4px 16px 12px;
}
.card-price-row { padding: 0 16px 10px; }
.card-price {
  font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums;
  letter-spacing: -.5px; margin-bottom: 4px;
}
.card-change { display: flex; align-items: center; gap: 6px; }
.change-badge {
  display: inline-flex; align-items: center;
  padding: 3px 8px; border-radius: 999px; font-size: 13px; font-weight: 700;
}
.change-badge.positive { background: rgba(47,178,80,.18); color: var(--green); }
.change-badge.negative { background: rgba(248,81,73,.18); color: var(--red); }
.change-abs { font-size: 12px; color: var(--muted); }
.card-chart { width: 100%; height: 150px; margin-bottom: -4px; }

/* Action buttons */
.card-actions { display: flex; flex-direction: column; gap: 8px; padding: 8px 16px 16px; }
.card-btn {
  width: 100%; padding: 16px; border-radius: 14px; border: none;
  font-size: 16px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .15s;
}
.card-btn-up   { background: rgba(47,178,80,.15);  color: var(--green); }
.card-btn-down { background: rgba(248,81,73,.15);   color: var(--red); }
.card-btn-up.selected   { background: var(--green); color: #0a2e18; }
.card-btn-down.selected { background: var(--red);   color: #fff; }

/* Swipe nav + dots row */
.card-nav { display: flex; align-items: center; justify-content: space-between; padding: 4px 16px 12px; }
.card-dots { display: flex; justify-content: center; align-items: center; gap: 7px; }
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--border); transition: background .2s;
}
.dot.active { background: var(--text); width: 18px; border-radius: 4px; }
.dot.done   { background: var(--green); }
.card-nav-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--card2); border: 1px solid var(--border);
  color: var(--text); font-size: 22px; font-weight: 300;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s; line-height: 1;
}
.card-nav-btn:disabled { opacity: .3; cursor: not-allowed; }
.card-nav-btn:not(:disabled):hover { background: var(--border); }

/* ─── Submit Bar ─────────────────────────────────────────────────────────────── */

#submit-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; padding: 12px 16px 28px;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.btn-submit {
  width: 100%; padding: 16px; background: var(--blue); color: #fff;
  border: none; border-radius: var(--radius);
  font-size: 16px; font-weight: 700; cursor: pointer; transition: opacity .15s;
  display: block;
}
.btn-submit:disabled { opacity: .45; cursor: not-allowed; }
.btn-submit:not(:disabled):hover { opacity: .9; }
.submit-hint {
  text-align: center; color: var(--muted); font-size: 13px; padding: 10px 0 4px;
}
.submit-dots {
  display: flex; justify-content: center; gap: 8px; margin-top: 8px;
}
.submit-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); transition: background .2s;
}
.submit-dot.filled { background: var(--green); }

.btn-claim {
  width: 100%; padding: 16px; background: var(--green); color: #000;
  border: none; border-radius: var(--radius);
  font-size: 16px; font-weight: 700; cursor: pointer; margin-top: 8px;
}
.btn-claim:disabled { opacity: .6; cursor: not-allowed; }

/* ─── Waiting / Results Screen ───────────────────────────────────────────────── */

.waiting-screen {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 16px 120px;
  animation: fadeIn .35s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.waiting-ring-wrap {
  position: relative; width: 110px; height: 110px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.waiting-ring { transform: rotate(-90deg); }
.ring-bg  { fill: none; stroke: var(--card2); stroke-width: 6; }
.ring-fill {
  fill: none; stroke: var(--green); stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}
.ring-win  { stroke: var(--green); }
.ring-lose { stroke: var(--red); }
.waiting-check {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--green);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900; color: #fff;
  box-shadow: 0 0 20px rgba(47,178,80,.4);
}
.waiting-check.result-score {
  background: var(--card2); font-size: 20px; font-weight: 800; color: var(--text);
  box-shadow: none;
}

.waiting-title {
  font-size: 18px; font-weight: 700; text-align: center;
  margin-bottom: 8px; line-height: 1.3;
}
.waiting-sub {
  font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 24px;
}
.waiting-sub.positive { color: var(--green); font-weight: 600; }

/* Predictions list card */
.pred-result-card {
  width: 100%;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden; margin-bottom: 16px;
}
.pred-result-card-title {
  font-size: 12px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px;
  padding: 14px 16px 10px;
}
.pred-result-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-top: 1px solid var(--border);
  animation: fadeIn .3s ease;
}
.pred-result-icon {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.pred-result-info { flex: 1; min-width: 0; }
.pred-result-name { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.pred-result-desc { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pred-result-right {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.pred-pct { font-size: 14px; font-weight: 700; }
.pred-check {
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.pred-check.ok   { background: var(--green); color: #fff; }
.pred-check.fail { background: var(--red);   color: #fff; }
.pred-dir-badge {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.pred-dir-badge.up   { background: var(--green-bg); color: var(--green); }
.pred-dir-badge.down { background: var(--red-bg);   color: var(--red); }
.pred-result-row.row-live-ok   { border-left: 3px solid var(--green); padding-left: 13px; }
.pred-result-row.row-live-fail { border-left: 3px solid var(--red);   padding-left: 13px; }

.btn-claim-big {
  width: 100%; padding: 18px; background: var(--green); color: #000;
  border: none; border-radius: var(--radius);
  font-size: 17px; font-weight: 800; cursor: pointer;
  box-shadow: 0 4px 20px rgba(47,178,80,.35);
  transition: opacity .15s;
}
.btn-claim-big:hover { opacity: .9; }
.btn-claim-big:disabled { opacity: .5; cursor: not-allowed; }

/* ─── Toast ──────────────────────────────────────────────────────────────────── */

.toast {
  position: fixed; bottom: 100px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--card); border: 1px solid var(--border);
  color: var(--text); padding: 10px 20px; border-radius: 999px;
  font-size: 13px; font-weight: 600; opacity: 0;
  transition: opacity .25s, transform .25s;
  z-index: 9999; white-space: nowrap; pointer-events: none;
}
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-error   { border-color: var(--red); color: var(--red); }

/* ─── Profile Panel (Личный кабинет) ─────────────────────────────────────── */

.profile-panel-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7);
  z-index: 500; display: flex; align-items: flex-end;
  animation: fadeIn .15s ease;
}
.profile-panel-sheet {
  background: var(--card); border-radius: 24px 24px 0 0;
  width: 100%; max-width: 430px; margin: 0 auto;
  max-height: 90vh; overflow-y: auto; overscroll-behavior: none;
  padding-bottom: env(safe-area-inset-bottom, 20px);
  animation: slideUp .25s ease;
}

/* Lang switch (tumbler) */
.lang-switch {
  display: flex; background: var(--card2); border: 1px solid var(--border);
  border-radius: 20px; padding: 3px; gap: 2px;
}
.lang-opt {
  padding: 4px 10px; border-radius: 14px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  cursor: pointer; transition: all .2s; color: var(--muted);
  user-select: none;
}
.lang-opt.active { background: var(--blue); color: #fff; }

/* Header */
.profile-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 14px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--card); z-index: 1;
}
.profile-panel-title { font-size: 17px; font-weight: 700; }
.profile-panel-close {
  background: var(--card2); border: none; border-radius: 50%;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text); flex-shrink: 0;
}

/* Stats row start right after header — identity section removed */

/* Stats row */
.profile-panel-stats {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
}
.profile-stat-box {
  flex: 1; padding: 14px 12px; text-align: center;
  border-right: 1px solid var(--border);
}
.profile-stat-box:last-child { border-right: none; }
.profile-stat-val { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 2px; }
.profile-stat-lbl { font-size: 11px; color: var(--muted); }

/* Reward card */
.profile-panel-reward-card {
  margin: 16px; padding: 16px;
  background: var(--card2); border-radius: var(--radius);
  border: 1px solid var(--border);
}
.profile-panel-reward-title {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px;
}
.profile-panel-reward-formula {
  font-size: 12px; color: var(--muted); margin-bottom: 6px; line-height: 1.5;
}
.profile-panel-reward-eth {
  font-size: 26px; font-weight: 800; color: var(--gold); margin-bottom: 14px;
}
.profile-panel-claim-btn {
  width: 100%; padding: 13px; border: none; border-radius: 12px;
  font-size: 15px; font-weight: 700; cursor: pointer; transition: opacity .15s;
  background: var(--blue); color: #fff;
}
.profile-panel-claim-btn:disabled {
  background: var(--card); border: 1px solid var(--border);
  color: var(--muted); cursor: not-allowed; opacity: 1;
}

/* XP History */
.profile-panel-history-title {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px;
  padding: 4px 20px 8px;
}
.profile-panel-history { padding: 0 16px 8px; min-height: 120px; }
.pp-history-loading { color: var(--muted); font-size: 13px; padding: 12px 4px; text-align: center; }
.pp-history-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.pp-history-row:last-child { border-bottom: none; }
.pp-history-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.pp-history-icon-pred { background: rgba(47,178,80,.12); }
.pp-history-icon-task { background: rgba(29,106,229,.12); }
.pp-history-icon-checkin { background: rgba(234,88,12,.12); }
.pp-history-info { flex: 1; }
.pp-history-label { font-size: 13px; font-weight: 500; color: var(--text); }
.pp-history-date  { font-size: 11px; color: var(--muted); margin-top: 1px; }
.pp-history-xp    { font-size: 14px; font-weight: 700; color: var(--green); white-space: nowrap; }
