/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #f5f5f3;
  --card:     #ffffff;
  --card2:    #f0f0ee;
  --border:   #e8e8e6;
  --border2:  #d4d4d2;
  --accent:   #0066ff;
  --green:    #05a05a;
  --red:      #cc2a1d;
  --orange:   #d46a00;
  --text:     #0a0a0a;
  --text2:    #5a5a5a;
  --text3:    #a8a8a8;
  --navbar-h: 56px;
  --cat-h:    44px;
  --max-w:    1340px;
  --radius:   12px;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { cursor: pointer; font-family: inherit; font-size: 14px; border: none; background: none; color: inherit; }
input  { font-family: inherit; font-size: 14px; color: var(--text); }
.hidden { display: none !important; }

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--navbar-h);
  background: var(--card); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px; padding: 0 24px; z-index: 40;
}
.topbar-logo {
  display: flex; align-items: center; gap: 7px; font-size: 16px; font-weight: 800;
  letter-spacing: -.02em; white-space: nowrap; flex-shrink: 0; color: var(--text);
  text-decoration: none;
}
.topbar-logo .star { color: var(--accent); font-size: 18px; }

.topbar-search {
  flex: 1; max-width: 520px; position: relative;
}
.topbar-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text3); pointer-events: none; }
.topbar-search input {
  width: 100%; background: var(--card2); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px 8px 34px; outline: none;
  font-size: 14px; color: var(--text);
}
.topbar-search input::placeholder { color: var(--text3); }
.topbar-search input:focus { border-color: #aaa; background: #fff; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.conn-pill {
  display: flex; align-items: center; gap: 5px;
  background: var(--card2); border: 1px solid var(--border); border-radius: 20px;
  padding: 4px 10px; font-size: 11px; color: var(--text2);
}
.conn-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text3); flex-shrink: 0; }
.conn-dot.online  { background: var(--green); box-shadow: 0 0 5px rgba(5,160,90,.5); }
.conn-dot.offline { background: var(--red); }

.user-area {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  background: var(--card2); border: 1px solid var(--border); border-radius: 24px;
  padding: 4px 10px 4px 5px; cursor: pointer; user-select: none;
  transition: border-color .12s;
}
.user-area:hover, .user-area.open { border-color: var(--border2); }
.user-chevron { color: var(--text3); flex-shrink: 0; transition: transform .15s; }
.user-area.open .user-chevron { transform: rotate(180deg); }
.sb-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; color: #fff; flex-shrink: 0;
}
.sb-uname { font-weight: 600; font-size: 13px; }
.sb-uid   { font-family: monospace; font-size: 10px; color: var(--text3); }

/* ── User dropdown menu ───────────────────────────────────────────────────── */
.user-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.12);
  min-width: 220px; padding: 6px 0; z-index: 200;
}
.user-menu-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px 10px;
}
.menu-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #fff; flex-shrink: 0;
}
.menu-uname { font-weight: 700; font-size: 14px; }
.menu-uid   { font-family: monospace; font-size: 10px; color: var(--text3); margin-top: 1px; }
.user-menu-divider { height: 1px; background: var(--border); margin: 4px 0; }
.user-menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 14px; font-size: 13px; font-weight: 500;
  color: var(--text); text-decoration: none; background: none; border: none;
  cursor: pointer; transition: background .1s; text-align: left;
}
.user-menu-item:hover { background: var(--card2); }
.user-menu-item svg { color: var(--text3); flex-shrink: 0; }
.user-menu-item.danger { color: var(--red); }
.user-menu-item.danger svg { color: var(--red); }
.menu-lang-val { margin-left: auto; font-size: 12px; color: var(--text3); }

.signin-btn {
  border: 1px solid var(--border2); color: var(--text); border-radius: 8px;
  padding: 7px 16px; font-weight: 600; font-size: 13px; transition: background .12s;
}
.signin-btn:hover { background: var(--card2); }

.signup-btn {
  background: var(--accent); color: #fff; border-radius: 8px;
  padding: 7px 16px; font-weight: 600; font-size: 13px; transition: opacity .12s;
}
.signup-btn:hover { opacity: .88; }

/* ── Category strip ───────────────────────────────────────────────────────── */
.cat-strip {
  position: fixed; top: var(--navbar-h); left: 0; right: 0; height: var(--cat-h);
  background: var(--card); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; overflow-x: auto; z-index: 39;
  padding: 0 24px; gap: 0; scrollbar-width: none;
}
.cat-strip::-webkit-scrollbar { display: none; }

.cat-trending {
  display: flex; align-items: center; gap: 5px; font-size: 13px;
  font-weight: 600; color: var(--text2); flex-shrink: 0; margin-right: 10px;
  white-space: nowrap;
}
.cat-divider { width: 1px; height: 18px; background: var(--border); margin: 0 6px; flex-shrink: 0; }
.cat-pill {
  flex-shrink: 0; padding: 5px 12px; border-radius: 20px; font-size: 13px;
  font-weight: 500; color: var(--text2); white-space: nowrap;
  transition: background .12s, color .12s;
}
.cat-pill:hover { background: var(--card2); color: var(--text); }
.cat-pill.active { background: var(--text); color: #fff; }
.cat-pill.highlight { background: #fff5e0; color: #a05000; border: 1px solid #ffe0a0; }

/* ── App shell ────────────────────────────────────────────────────────────── */
#app { padding-top: calc(var(--navbar-h) + var(--cat-h)); min-height: 100vh; }
.view { display: none; }
.view.active { display: block; }

/* ── Onboarding modal ─────────────────────────────────────────────────────── */
#onboarding {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 16px;
}
.ob-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 32px 28px; width: 100%; max-width: 440px;
  display: flex; flex-direction: column; gap: 18px;
  box-shadow: 0 8px 40px rgba(0,0,0,.12);
}
.ob-step { display: flex; flex-direction: column; gap: 16px; }
.ob-step.hidden { display: none !important; }

.ob-logo { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; }
.ob-logo .star { color: var(--accent); font-size: 20px; }
.ob-tagline { color: var(--text2); font-size: 13px; margin-top: -8px; }
.ob-step-title { font-size: 18px; font-weight: 700; }
.ob-step-sub { color: var(--text2); font-size: 13px; margin-top: -8px; }
.ob-back { display: flex; align-items: center; gap: 5px; color: var(--text3); font-size: 13px; font-weight: 500; background: none; border: none; cursor: pointer; padding: 0; }
.ob-back:hover { color: var(--text); }

/* Step 1: choices */
.ob-choices { display: flex; flex-direction: column; gap: 10px; }
.ob-choice {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--card2);
  cursor: pointer; text-align: left; transition: border-color .12s, background .12s;
}
.ob-choice:hover { border-color: var(--accent); background: #eef3ff; }
.ob-choice svg { color: var(--text3); flex-shrink: 0; }
.ob-choice-primary { border-color: var(--accent); background: #f0f5ff; }
.ob-choice-primary svg { color: var(--accent); }
.ob-choice-title { font-weight: 600; font-size: 14px; }
.ob-choice-sub { font-size: 12px; color: var(--text2); margin-top: 2px; }

/* Step 1b: import */
.ob-import-input {
  width: 100%; background: var(--card2); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; font-family: monospace; font-size: 12px;
  color: var(--text); resize: none; outline: none; line-height: 1.6;
}
.ob-import-input:focus { border-color: var(--accent); }
#ob-import-status { font-size: 12px; min-height: 16px; margin-top: -8px; }

/* Step 2: identity hero */
.ob-identity-hero { display: flex; align-items: center; gap: 12px; }
.ob-id-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; color: #fff; flex-shrink: 0;
}
.ob-identity-label { font-size: 11px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.ob-id { background: var(--card2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-family: monospace; font-size: 12px; color: var(--text2); word-break: break-all; }
.ob-wallet-row { display: flex; flex-direction: column; gap: 5px; }
.ob-wallet-addr { font-family: monospace; font-size: 11px; color: var(--text2); background: var(--card2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; word-break: break-all; }
.ob-username-hint { font-size: 12px; color: var(--text3); margin-top: 4px; }
.ob-label { font-size: 11px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.ob-input-group { display: flex; align-items: center; background: var(--card2); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.ob-input-group:focus-within { border-color: var(--accent); }
.ob-input-group span { padding: 0 10px; color: var(--text3); }
.ob-input { flex: 1; background: transparent; border: none; padding: 10px 10px 10px 0; color: var(--text); outline: none; font-size: 14px; }
#ob-username-status { font-size: 12px; min-height: 16px; margin-top: 4px; }
.status-available { color: var(--green); } .status-taken { color: var(--red); }
.status-yours { color: var(--accent); } .status-idle { color: var(--text2); }

/* Backup key box */
.ob-backup-box {
  background: #fffbea; border: 1.5px solid #e8c840;
  border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.ob-backup-hdr { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; color: #5a4000; }
.ob-backup-hdr svg { color: #b8860b; flex-shrink: 0; }
.ob-backup-sub { font-size: 12px; color: #7a5500; line-height: 1.4; }
.ob-backup-key {
  font-family: monospace; font-size: 11px; background: #fff8d6;
  border: 1px solid #d4b040; border-radius: 6px; padding: 8px 10px;
  word-break: break-all; color: #3a2800; user-select: all; line-height: 1.6;
}

/* Step 3: fund wallet */
.ob-fund-qr-wrap { display: flex; justify-content: center; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 8px; }
.ob-fund-addr { font-family: monospace; font-size: 11px; color: var(--text2); word-break: break-all; background: var(--card2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.ob-fund-divider { text-align: center; font-size: 12px; color: var(--text3); }
.ob-swap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ob-swap-btn {
  display: flex; align-items: center; justify-content: center;
  padding: 10px; border-radius: 8px; border: 1.5px solid var(--border);
  background: var(--card2); font-size: 13px; font-weight: 600;
  color: var(--text); text-decoration: none; transition: border-color .12s, background .12s;
}
.ob-swap-btn:hover { border-color: var(--accent); background: #eef3ff; color: var(--accent); }

.ob-btn { background: var(--accent); color: #fff; border-radius: 8px; padding: 11px; font-weight: 600; font-size: 14px; border: none; cursor: pointer; }
.ob-btn:hover { opacity: .88; }
.ob-btn-sec { background: var(--card2); color: var(--text); border: 1.5px solid var(--border); border-radius: 8px; padding: 9px; font-weight: 600; font-size: 13px; cursor: pointer; }
.ob-btn-sec:hover { border-color: var(--border2); }
.ob-skip { text-align: center; color: var(--text3); font-size: 13px; cursor: pointer; }
.ob-skip:hover { color: var(--text2); }
.ob-bet-hint { background: #fff7e0; border: 1px solid #f0c040; border-radius: 8px; padding: 11px 13px; font-size: 13px; color: #7a5500; line-height: 1.5; }
.ob-security { display: flex; gap: 8px; align-items: flex-start; background: var(--card2); border-radius: 8px; padding: 10px 12px; color: var(--text2); font-size: 12px; line-height: 1.5; }
.ob-security svg { flex-shrink: 0; margin-top: 1px; color: var(--text3); }

/* ── Markets view ─────────────────────────────────────────────────────────── */
.markets-inner { max-width: var(--max-w); margin: 0 auto; padding: 24px 24px 40px; }

/* ── Hero section ─────────────────────────────────────────────────────────── */
.hero-grid { display: grid; grid-template-columns: 1fr 340px; gap: 16px; margin-bottom: 32px; }

.hero-main {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; position: relative;
}
.hero-body { padding: 24px 28px 0; display: flex; flex-direction: column; gap: 14px; }

.hero-eyebrow {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text2); font-weight: 500;
}
.hero-eyebrow .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text3); }

.hero-top { display: flex; gap: 16px; align-items: flex-start; }
.hero-thumb {
  width: 60px; height: 60px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
  overflow: hidden;
}
.hero-title { font-size: 24px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; flex: 1; }

.hero-outcomes { display: flex; flex-direction: column; gap: 10px; }
.hero-outcome { display: flex; align-items: center; gap: 12px; padding: 2px 0; }
.hero-outcome-flag { font-size: 20px; flex-shrink: 0; width: 26px; text-align: center; }
.hero-outcome-name { font-weight: 600; font-size: 15px; min-width: 90px; }
.hero-outcome-pct { font-size: 22px; font-weight: 800; min-width: 56px; }
.hero-outcome-bar { flex: 1; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.hero-outcome-fill { height: 100%; border-radius: 3px; }

.hero-actions { display: flex; gap: 10px; padding: 0 28px; }
.hero-btn {
  flex: 1; padding: 11px 0; border-radius: 9px; font-weight: 700; font-size: 15px; transition: opacity .12s;
}
.hero-btn.yes { background: rgba(5,160,90,.1); color: var(--green); border: 1px solid rgba(5,160,90,.25); }
.hero-btn.yes:hover { background: rgba(5,160,90,.18); }
.hero-btn.no  { background: rgba(204,42,29,.08); color: var(--red); border: 1px solid rgba(204,42,29,.2); }
.hero-btn.no:hover  { background: rgba(204,42,29,.15); }

.hero-footer-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 28px 16px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text3);
}
.hero-footer-row strong { color: var(--text2); }

/* Carousel dots + nav */
.hero-carousel {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px; border-top: 1px solid var(--border); background: var(--card);
}
.carousel-dots { display: flex; gap: 6px; align-items: center; }
.carousel-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--border2);
  cursor: pointer; transition: background .12s, transform .12s;
}
.carousel-dot.active { background: var(--text); transform: scale(1.2); }
.carousel-nav { display: flex; gap: 8px; }
.carousel-btn {
  display: flex; align-items: center; gap: 5px; padding: 6px 12px;
  border: 1px solid var(--border); border-radius: 20px; font-size: 12px;
  font-weight: 500; color: var(--text2); transition: background .12s;
}
.carousel-btn:hover { background: var(--card2); }
.carousel-btn svg { flex-shrink: 0; }

.live-hero-score {
  font-size: 44px; font-weight: 900; text-align: center; letter-spacing: .04em;
  padding: 8px 0; color: var(--text);
}
.live-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fef2f2; color: var(--red); border: 1px solid #fecaca;
  border-radius: 6px; padding: 2px 8px; font-size: 11px; font-weight: 700;
}

/* ── Hot topics sidebar ───────────────────────────────────────────────────── */
.hero-aside { display: flex; flex-direction: column; gap: 12px; }
.aside-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
}
.aside-title {
  font-size: 16px; font-weight: 700; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.aside-title a { font-size: 12px; font-weight: 500; color: var(--accent); text-decoration: none; }
.hot-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--border); cursor: pointer;
  transition: opacity .12s;
}
.hot-row:last-child { border-bottom: none; padding-bottom: 0; }
.hot-row:hover { opacity: .75; }
.hot-rank { font-size: 13px; font-weight: 600; color: var(--text3); min-width: 16px; text-align: right; }
.hot-name { flex: 1; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-vol  { font-size: 12px; color: var(--text2); white-space: nowrap; }
.hot-fire { font-size: 13px; }
.hot-arrow { font-size: 12px; color: var(--text3); }

.explore-btn, .explore-all-btn {
  width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 9px;
  font-size: 13px; font-weight: 600; color: var(--text); background: var(--card);
  transition: background .12s;
}
.explore-btn:hover, .explore-all-btn:hover { background: var(--card2); }

/* ── All markets section ──────────────────────────────────────────────────── */
.all-markets { }
.all-markets-hdr, .all-markets-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
}
.all-markets-hdr h2, .all-markets-header h2 { font-size: 20px; font-weight: 800; }
.all-markets-actions { display: flex; gap: 6px; }
.icon-btn-sm, .icon-action-btn {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 8px; color: var(--text2);
  background: var(--card); transition: background .12s;
}
.icon-btn-sm:hover, .icon-action-btn:hover { background: var(--card2); }

/* Topic filter strip */
.topic-strip { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; margin-bottom: 18px; scrollbar-width: none; }
.topic-strip::-webkit-scrollbar { display: none; }
.topic-chip {
  flex-shrink: 0; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500;
  color: var(--text2); background: var(--card); border: 1px solid var(--border);
  transition: all .12s; white-space: nowrap;
}
.topic-chip:hover { border-color: var(--text2); color: var(--text); }
.topic-chip.active { background: var(--text); color: #fff; border-color: var(--text); }

/* filter-chip / market-tab aliases for JS compat */
.filter-chip { flex-shrink: 0; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500; color: var(--text2); background: var(--card); border: 1px solid var(--border); transition: all .12s; white-space: nowrap; cursor: pointer; }
.filter-chip:hover { border-color: var(--text2); color: var(--text); }
.filter-chip.active { background: var(--text); color: #fff; border-color: var(--text); }
.filter-strip { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.market-tab { }

/* ── Market card grid ─────────────────────────────────────────────────────── */
.mcard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.mcard {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
  cursor: pointer; transition: box-shadow .15s, border-color .15s;
  text-decoration: none; color: inherit;
}
.mcard:hover { box-shadow: 0 4px 20px rgba(0,0,0,.07); border-color: var(--border2); }

/* header: thumb left, gauge right */
.mcard-header { display: flex; align-items: flex-start; justify-content: space-between; }
/* legacy alias */
.mcard-top { display: flex; align-items: flex-start; gap: 12px; }
.mcard-thumb {
  width: 48px; height: 48px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
/* Category-specific thumbnail backgrounds */
.thumb-politics    { background: linear-gradient(135deg,#6366f1,#8b5cf6); }
.thumb-crypto      { background: linear-gradient(135deg,#f59e0b,#f97316); }
.thumb-sports      { background: linear-gradient(135deg,#10b981,#059669); }
.thumb-entertainment { background: linear-gradient(135deg,#ec4899,#f43f5e); }
.thumb-economics   { background: linear-gradient(135deg,#3b82f6,#0ea5e9); }
.thumb-geopolitics { background: linear-gradient(135deg,#374151,#111827); }
.thumb-ai          { background: linear-gradient(135deg,#8b5cf6,#6366f1); }
.thumb-culture     { background: linear-gradient(135deg,#f43f5e,#ec4899); }
.thumb-other       { background: linear-gradient(135deg,#64748b,#475569); }
/* Sport-specific */
.thumb-soccer      { background: linear-gradient(135deg,#16a34a,#15803d); }
.thumb-nfl         { background: linear-gradient(135deg,#1d4ed8,#1e40af); }
.thumb-nba         { background: linear-gradient(135deg,#dc2626,#b91c1c); }
.thumb-mlb         { background: linear-gradient(135deg,#0284c7,#0369a1); }
.thumb-tennis      { background: linear-gradient(135deg,#65a30d,#4d7c0f); }
.thumb-mma         { background: linear-gradient(135deg,#dc2626,#991b1b); }
.thumb-default     { background: linear-gradient(135deg,#6b7280,#4b5563); }

.mcard-title {
  font-size: 14px; font-weight: 600; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.mcard-outcome-label { font-size: 12px; color: var(--text2); }

.mcard-gauge-row { display: flex; align-items: center; justify-content: space-between; }
.mcard-gauge {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--green) calc(var(--pct, 50) * 1%), var(--border) 0);
  display: grid; place-items: center;
}
.mcard-gauge-inner {
  width: 35px; height: 35px; border-radius: 50%; background: var(--card);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; color: var(--text);
}

.mcard-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 8px; border-top: 1px solid var(--border);
  font-size: 11px; color: var(--text3); margin-top: auto;
}
.mcard-vol { }
.mcard-cat { font-size: 11px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: .04em; }

/* ── Sport rows ───────────────────────────────────────────────────────────── */
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  padding: 5px 13px; border-radius: 20px; font-size: 12px; font-weight: 500;
  color: var(--text2); background: var(--card); border: 1px solid var(--border);
  transition: all .12s; cursor: pointer; white-space: nowrap;
}
.chip:hover { border-color: var(--border2); color: var(--text); }
.chip.active { background: var(--text); color: #fff; border-color: var(--text); }

.sport-rows {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 18px;
}
.market-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 0; border-bottom: 1px solid var(--border); gap: 16px;
}
.market-row:last-child { border-bottom: none; }
.market-row-left { min-width: 0; flex: 1; }
.market-meta { font-size: 11px; color: var(--text3); margin-bottom: 3px; display: flex; align-items: center; gap: 6px; }
.market-teams { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.market-row-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.market-odds { display: flex; gap: 6px; }
.odds-chip-sm {
  background: var(--card2); border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 10px; font-size: 13px; font-weight: 700;
}
.market-score { display: flex; gap: 8px; align-items: center; font-size: 22px; font-weight: 900; letter-spacing: .02em; }
.bet-btn-sm {
  background: rgba(0,102,255,.07); border: 1px solid rgba(0,102,255,.18);
  border-radius: 6px; padding: 7px 14px; font-size: 12px; font-weight: 700; color: var(--accent);
  transition: background .12s; white-space: nowrap;
}
.bet-btn-sm:hover { background: rgba(0,102,255,.14); }
.vs { color: var(--text3); font-weight: 400; }
.pos { color: var(--green); }
.neg { color: var(--orange); }

/* ── Feed ─────────────────────────────────────────────────────────────────── */
#view-feed { }
.feed-inner { max-width: 680px; margin: 0 auto; padding: 28px 24px; display: flex; flex-direction: column; gap: 10px; }
.view-heading { font-size: 22px; font-weight: 800; }

/* ── Open bets section ────────────────────────────────────────────────────── */
.ob-section-hdr { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.ob-section-title { font-size: 20px; font-weight: 800; }
.ob-section-sub { font-size: 13px; color: var(--text2); }
.ob-filters { display: flex; gap: 6px; margin-top: 8px; }
.ob-filter {
  padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
  border: 1.5px solid var(--border); background: transparent; color: var(--text2); cursor: pointer;
  transition: all .12s;
}
.ob-filter.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.ob-filter:hover:not(.active) { border-color: var(--border2); color: var(--text); }

.open-bets-list { display: flex; flex-direction: column; gap: 8px; }

.ob-bet-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; display: flex; align-items: center; gap: 12px;
  transition: border-color .12s, box-shadow .12s;
}
.ob-bet-card:hover { border-color: var(--border2); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.ob-bet-card.own-bet { opacity: .6; }

.ob-bet-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ob-bet-event { font-size: 11px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-bet-selection { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-bet-meta { font-size: 11px; color: var(--text3); display: flex; align-items: center; gap: 8px; }
.ob-bet-poster { font-family: monospace; }

.ob-bet-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.ob-bet-amount { font-size: 16px; font-weight: 800; color: var(--text); }
.ob-bet-xmr { font-size: 10px; color: var(--text3); font-weight: 600; margin-top: -4px; }
.ob-take-btn {
  background: var(--accent); color: #fff; border-radius: 8px;
  padding: 7px 16px; font-size: 13px; font-weight: 700; border: none; cursor: pointer;
  transition: opacity .12s;
}
.ob-take-btn:hover { opacity: .85; }
.ob-take-btn:disabled { background: var(--card2); color: var(--text3); cursor: default; }

.ob-empty { font-size: 14px; color: var(--text3); text-align: center; padding: 32px 0; }
.feed-section-sep { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

.feed-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
}
.feed-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.feed-card.card-live { border-left: 3px solid var(--red); }
.card-meta { display: flex; align-items: center; justify-content: space-between; }
.sport-tag { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.event-time { font-size: 12px; color: var(--text3); }
.live-score { font-size: 30px; font-weight: 900; text-align: center; letter-spacing: .04em; }
.matchup { font-size: 17px; font-weight: 700; }
.odds-row { display: flex; gap: 8px; }
.odds-chip { flex: 1; background: var(--card2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; display: flex; justify-content: space-between; align-items: center; }
.odds-team { font-size: 12px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.odds-val  { font-size: 14px; font-weight: 700; }
.bet-btn { background: var(--accent); color: #fff; border-radius: 8px; padding: 9px 0; font-weight: 700; font-size: 13px; }
.bet-btn:hover { opacity: .88; }
.pred-title { font-size: 15px; font-weight: 600; line-height: 1.4; }
.pred-outcomes { display: flex; flex-direction: column; gap: 6px; }
.pred-outcome { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; }
.pred-name { font-size: 13px; color: var(--text2); }
.pred-prob { font-size: 13px; font-weight: 700; color: var(--accent); grid-column: 2; grid-row: 1/3; align-self: center; }
.prob-bar  { height: 3px; background: var(--card2); border-radius: 2px; }
.prob-fill { height: 100%; background: var(--accent); border-radius: 2px; }
.pred-volume { font-size: 11px; color: var(--text3); }

/* ── Messages ─────────────────────────────────────────────────────────────── */
#view-messages { display: none; }
#view-messages.active { display: flex; height: calc(100vh - var(--navbar-h) - var(--cat-h)); }

#convo-list-panel { width: 280px; flex-shrink: 0; border-right: 1px solid var(--border); display: flex; flex-direction: column; background: var(--card); }
.panel-header { padding: 18px 16px 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.panel-header h2 { font-size: 17px; font-weight: 700; }
.icon-btn { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 20px; display: flex; align-items: center; justify-content: center; }
#convo-list { flex: 1; overflow-y: auto; }
.convo-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; transition: background .1s; }
.convo-row:hover, .convo-row.active { background: var(--card2); }
.convo-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: #fff; flex-shrink: 0; }
.convo-info { flex: 1; min-width: 0; }
.convo-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convo-last { font-size: 12px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.unread-badge { background: var(--accent); color: #fff; border-radius: 10px; padding: 2px 7px; font-size: 11px; font-weight: 700; }
.empty-state { padding: 32px 16px; text-align: center; color: var(--text2); font-size: 13px; line-height: 1.7; }

#chat-panel { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
#chat-header { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; flex-shrink: 0; background: var(--card); }
.chat-back-btn { color: var(--text2); font-size: 20px; display: none; padding: 4px; }
.chat-header-info { flex: 1; }
.chat-name    { font-weight: 700; font-size: 15px; }
.chat-subname { font-family: monospace; font-size: 11px; color: var(--text2); }
.chat-enc     { font-size: 11px; color: var(--green); }
#chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.msg { display: flex; flex-direction: column; }
.msg-me { align-items: flex-end; } .msg-them { align-items: flex-start; }
.msg-bubble { max-width: 70%; padding: 9px 13px; border-radius: 16px; font-size: 14px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.msg-me   .msg-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg-them .msg-bubble { background: var(--card); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg-encrypted { opacity: .6; font-style: italic; }
.msg-time { font-size: 10px; color: var(--text3); margin-top: 3px; padding: 0 4px; }
#typing-indicator { padding: 4px 16px; font-size: 12px; color: var(--text2); font-style: italic; }
.chat-input-row { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); flex-shrink: 0; background: var(--card); }
.chat-input-row input { flex: 1; background: var(--card2); border: 1px solid var(--border); border-radius: 20px; padding: 9px 16px; outline: none; color: var(--text); }
.chat-input-row input:focus { border-color: var(--accent); }
.send-btn { background: var(--accent); color: #fff; border-radius: 20px; padding: 9px 18px; font-weight: 600; }
.send-btn:hover { opacity: .88; }

/* ── Modals ───────────────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.3); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal-box { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 24px; width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 8px 40px rgba(0,0,0,.1); }
/* Bet modal — constrained height with scrollable middle */
.bet-modal-box { padding: 0; gap: 0; max-height: min(680px, 90vh); overflow: hidden; }
.bet-modal-hdr { flex-shrink: 0; padding: 20px 20px 14px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.bet-modal-hdr h3 { font-size: 17px; font-weight: 700; margin: 0; }
.bet-event-name { font-weight: 600; color: var(--text2); font-size: 13px; line-height: 1.3; }
.bet-pick-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 20px; display: flex; flex-direction: column; gap: 6px; }
.bet-modal-ftr { flex-shrink: 0; padding: 14px 20px 18px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.modal-box h3 { font-size: 18px; font-weight: 700; }
.modal-input { width: 100%; background: var(--card2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; outline: none; color: var(--text); }
.modal-input:focus { border-color: var(--accent); }
.modal-row { display: flex; gap: 8px; flex-shrink: 0; }
.modal-btn { flex: 1; padding: 10px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.modal-btn.primary   { background: var(--accent); color: #fff; }
.modal-btn.secondary { background: var(--card2); color: var(--text2); border: 1px solid var(--border); }
.modal-btn:hover { opacity: .85; }
.nc-result { min-height: 20px; }
.nc-searching { font-size: 13px; color: var(--text3); }
.nc-not-found { font-size: 13px; color: var(--text3); }
.nc-found { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.nc-found-info { display: flex; flex-direction: column; gap: 2px; }
.nc-found-info strong { font-size: 14px; font-weight: 600; }
.nc-uid { font-size: 11px; color: var(--text3); font-family: monospace; }
.nc-add-btn { padding: 7px 14px; font-size: 13px; flex-shrink: 0; }

/* ── Toast ────────────────────────────────────────────────────────────────── */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; border-radius: 10px; padding: 10px 20px; font-size: 13px; z-index: 200; box-shadow: 0 4px 20px rgba(0,0,0,.15); animation: fade-in .2s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateX(-50%) translateY(8px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ── Mobile bottom nav ────────────────────────────────────────────────────── */
#bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--card); border-top: 1px solid var(--border); padding: 6px 0 env(safe-area-inset-bottom,6px); z-index: 40; }
.bottom-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: var(--text3); font-size: 10px; }
.bottom-tab.active { color: var(--accent); }
.bottom-tab svg { width: 22px; height: 22px; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1100px) { .mcard-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px)  {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-aside { display: none; }
  .mcard-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar-search { display: none; }
  .cat-strip { padding: 0 14px; }
  #bottom-nav { display: flex; }
  #app { padding-bottom: 60px; }
  .markets-inner, .feed-inner { padding: 16px 14px; }
  #convo-list-panel { width: 100%; border-right: none; }
  #chat-panel { position: fixed; inset: 0; top: var(--navbar-h); bottom: 60px; background: var(--bg); z-index: 10; }
  #chat-panel.hidden { display: none; }
  .hidden-mobile { display: none !important; }
  .chat-back-btn { display: flex; }
  .mcard-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .conn-pill span { display: none; }
  .sb-uid { display: none; }
}
@media (max-width: 900px) { #convo-list-panel { width: 220px; } }

/* ── Event Detail Overlay ─────────────────────────────────────────────────── */
.event-overlay {
  position: fixed; inset: 0; top: calc(var(--navbar-h) + var(--cat-h));
  background: var(--bg); z-index: 30; overflow-y: auto;
}
.event-overlay-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px 60px; }

.event-overlay-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0 0; margin-bottom: 4px;
}
.event-back-btn {
  display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600;
  color: var(--text2); padding: 6px 0; transition: color .12s;
}
.event-back-btn:hover { color: var(--text); }
.event-cat-badge {
  display: inline-flex; align-items: center; padding: 3px 10px;
  background: rgba(0,102,255,.08); color: var(--accent);
  border: 1px solid rgba(0,102,255,.18); border-radius: 20px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}

.event-overlay-content { padding-top: 8px; }

.event-detail {}
.event-detail-header { margin-bottom: 18px; }
.event-detail-title {
  font-size: 22px; font-weight: 800; line-height: 1.3; letter-spacing: -.01em;
  color: var(--text); margin-bottom: 8px;
}
.event-detail-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12px; color: var(--text3);
}
.dot-sep { color: var(--border2); }
.outcome-cutoff-badge {
  background: #fff8e1; color: #a05000; border: 1px solid #ffe082;
  border-radius: 6px; padding: 2px 7px; font-size: 11px; font-weight: 600;
}

/* Tabs */
.event-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.event-tab {
  padding: 9px 18px; font-size: 14px; font-weight: 600; color: var(--text3);
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .12s;
}
.event-tab:hover { color: var(--text2); }
.event-tab.active { color: var(--text); border-bottom-color: var(--text); }

/* Outcome contracts list */
.outcome-list { display: flex; flex-direction: column; gap: 8px; }

.outcome-contract {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 20px; transition: box-shadow .12s;
}
.outcome-contract:hover { box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.outcome-contract.outcome-catchall { border-style: dashed; border-color: var(--border2); }
.outcome-contract.outcome-pending  { opacity: .7; }

.outcome-contract-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.outcome-canonical-id  { font-family: monospace; font-size: 10px; color: var(--text3); letter-spacing: .04em; }
.outcome-display-name  { font-size: 16px; font-weight: 700; color: var(--text); }
.outcome-aliases       { font-size: 12px; color: var(--text3); }
.outcome-desc          { font-size: 12px; color: var(--text2); line-height: 1.5; margin-top: 2px; max-width: 600px; }
.outcome-catchall-note {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 4px;
  font-size: 11px; font-weight: 600; color: #a05000;
  background: #fff8e1; border: 1px solid #ffe082; border-radius: 6px; padding: 3px 9px;
}

.outcome-contract-right {
  display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0;
}
.outcome-gauge {
  width: 56px; height: 56px; border-radius: 50%;
  background: conic-gradient(var(--green) calc(var(--pct, 50) * 1%), var(--border) 0);
  display: grid; place-items: center;
}
.outcome-gauge-inner {
  width: 42px; height: 42px; border-radius: 50%; background: var(--card);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: var(--text);
}
.outcome-trade-btn {
  background: var(--accent); color: #fff; border-radius: 8px;
  padding: 7px 18px; font-size: 13px; font-weight: 700;
  white-space: nowrap; transition: opacity .12s;
}
.outcome-trade-btn:hover { opacity: .88; }
.outcome-pending-badge {
  font-size: 11px; font-weight: 600; color: var(--text3);
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 8px; white-space: nowrap; text-align: center;
}

/* Propose section */
.propose-section { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.propose-btn {
  align-self: flex-start; display: flex; align-items: center; gap: 6px;
  border: 1px dashed var(--border2); border-radius: 9px;
  padding: 10px 18px; font-size: 14px; font-weight: 600; color: var(--text2);
  background: var(--card); transition: background .12s, border-color .12s, color .12s;
}
.propose-btn:hover { background: var(--card2); border-color: var(--accent); color: var(--accent); }
.propose-note { font-size: 12px; color: var(--text3); max-width: 480px; line-height: 1.5; }
.propose-closed-notice {
  display: inline-flex; padding: 10px 14px; font-size: 13px; color: var(--text3);
  background: var(--card2); border: 1px solid var(--border); border-radius: 9px;
}

/* Pending proposals */
.pending-proposals { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 16px; }
.pending-proposals-title { font-size: 13px; font-weight: 700; color: var(--text2); margin-bottom: 10px; }
.pending-proposal-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.pending-proposal-row:last-child { border-bottom: none; }
.proposal-name   { font-weight: 600; }
.proposal-status { font-size: 11px; color: #a05000; background: #fff8e1; border: 1px solid #ffe082; border-radius: 5px; padding: 2px 7px; font-weight: 600; }

/* Event rules panel */
.event-rules-section { display: flex; flex-direction: column; gap: 20px; max-width: 700px; }
.event-rules-section h4 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.event-rules-list { padding-left: 18px; display: flex; flex-direction: column; gap: 7px; }
.event-rules-list li { font-size: 13px; color: var(--text2); line-height: 1.6; }
.event-rule-block { display: flex; flex-direction: column; gap: 5px; }
.event-rule-label { font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; }
.event-rule-body  { font-size: 13px; color: var(--text2); line-height: 1.6; background: var(--card); border: 1px solid var(--border); border-radius: 9px; padding: 12px 14px; }

/* Custom event card in predictions grid */
.mcard.mcard-custom { border-color: rgba(0,102,255,.2); }
.mcard.mcard-custom:hover { border-color: var(--accent); }
.mcard-custom-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px;
}
.mcard-outcomes-mini { display: flex; flex-direction: column; gap: 5px; margin: 6px 0; }
.mcard-outcome-mini-row {
  display: flex; align-items: center; gap: 8px; font-size: 12px;
}
.mcard-outcome-mini-name { flex: 1; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard-outcome-mini-pct  { font-weight: 700; color: var(--text); min-width: 30px; text-align: right; }
.mcard-outcome-mini-bar  { flex: 1; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.mcard-outcome-mini-fill { height: 100%; background: var(--accent); border-radius: 2px; }

/* Bet modal fixed-outcome display */
.bet-outcome-fixed {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--card2); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px;
}
.bet-outcome-fixed-name { font-size: 14px; font-weight: 700; }
.bet-outcome-fixed-id   { font-family: monospace; font-size: 10px; color: var(--text3); }

/* Prediction outcome pick buttons */
#bet-outcome-btns { display: flex; flex-direction: column; gap: 5px; }
.outcome-pick-btn {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 12px; border-radius: 8px; border: 1.5px solid var(--border);
  background: var(--card2); cursor: pointer; text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.outcome-pick-btn:hover  { border-color: var(--accent); }
.outcome-pick-btn.selected { border-color: var(--accent); background: #e8f0ff; }
.opb-name { font-size: 14px; font-weight: 600; color: var(--text1); }
.opb-meta { font-size: 12px; color: var(--text3); white-space: nowrap; margin-left: 12px; }

/* Propose modal */
.propose-event-label { font-size: 12px; color: var(--text2); line-height: 1.5; font-style: italic; }
.propose-status-msg  { font-size: 13px; min-height: 18px; }
.propose-status-msg.propose-error   { color: var(--red); }
.propose-status-msg.propose-success { color: var(--green); }
.propose-status-msg.propose-idle    { color: var(--text3); }

/* Loading pulse */
.loading-pulse { padding: 40px; text-align: center; color: var(--text3); font-size: 14px; }

/* ── Market Order Book Panel ─────────────────────────────────────────────── */
.market-panel {
  position: fixed; inset: 0; z-index: 300;
  background: var(--bg);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.market-panel.hidden { display: none; }
.market-panel-inner  { max-width: 720px; margin: 0 auto; width: 100%; padding: 0 0 80px; }
.market-panel-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.panel-market-title {
  font-size: 17px; font-weight: 700; color: var(--text1);
  padding: 20px 20px 12px;
}
.panel-outcomes { padding: 0 20px 16px; display: flex; flex-direction: column; gap: 6px; }
.panel-outcome-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: var(--card2); border-radius: 8px;
  width: 100%; border: 1.5px solid transparent; cursor: pointer;
  transition: border-color 0.12s, background 0.12s; text-align: left;
}
.panel-outcome-row:hover { border-color: var(--accent); background: #eef3ff; }
.panel-outcome-name  { font-size: 14px; font-weight: 600; }
.panel-outcome-odds  { font-size: 13px; color: var(--accent); font-weight: 600; }
.panel-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text3); padding: 0 20px 8px;
}
.panel-bets-list { padding: 0 20px; display: flex; flex-direction: column; gap: 8px; }
.panel-bet-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: var(--card); border: 1px solid var(--border);
  border-radius: 10px;
}
.panel-bet-info     { display: flex; flex-direction: column; gap: 2px; }
.panel-bet-selection { font-size: 14px; font-weight: 600; }
.panel-bet-amount   { font-size: 12px; color: var(--text3); }
.panel-empty        { color: var(--text3); font-size: 14px; padding: 20px; }
.panel-loading      { color: var(--text3); font-size: 14px; padding: 20px; }
.take-btn {
  padding: 7px 16px; border-radius: 8px; border: none;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.take-btn:hover { background: #0052cc; }

/* ── My Bets ─────────────────────────────────────────────────────────────── */
.mybet-row {
  padding: 14px 16px; background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; margin: 0 0 8px; display: flex; flex-direction: column; gap: 6px;
}
.mybet-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mybet-event  { font-size: 13px; color: var(--text2); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mybet-detail { display: flex; flex-direction: column; gap: 2px; }
.mybet-selection { font-size: 15px; font-weight: 700; }
.mybet-meta      { font-size: 12px; color: var(--text3); }
.cancel-bet-btn {
  align-self: flex-start; padding: 5px 12px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--card2);
  font-size: 12px; color: var(--text2); cursor: pointer;
}
.cancel-bet-btn:hover { border-color: var(--red); color: var(--red); }

/* Status badges */
.bet-status-badge {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px;
  white-space: nowrap;
}
.badge-open      { background: #e8f4ff; color: #0066ff; }
.badge-matched   { background: #e6f9f0; color: #05a05a; }
.badge-settled   { background: #f0f0f0; color: #666; }
.badge-cancelled { background: #fff0f0; color: var(--red); }

/* ── Sport bet type picker ───────────────────────────────────────────────── */
.sbet-tabs {
  display: flex; gap: 4px; margin-bottom: 10px;
}
.sbet-tab {
  flex: 1; padding: 7px 4px; border-radius: 8px; border: 1.5px solid var(--border);
  background: var(--card2); font-size: 13px; font-weight: 600; color: var(--text2);
  cursor: pointer; transition: all .12s;
}
.sbet-tab:hover  { border-color: var(--accent); color: var(--accent); }
.sbet-tab.active { border-color: var(--accent); background: #e8f0ff; color: var(--accent); }
.sbet-picks      { display: flex; flex-direction: column; gap: 6px; }

/* ── Escrow steps in My Bets ─────────────────────────────────────────────── */
.escrow-step      { margin-top: 4px; border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.escrow-waiting   { background: #f5f5f3; color: var(--text3); }
.escrow-fund      { background: #fffbe6; border: 1px solid #f0d060; }
.escrow-funded    { background: #e6f9f0; color: #05a05a; font-weight: 600; }
.escrow-step-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text3); margin-bottom: 6px; }
.escrow-address   { font-family: monospace; font-size: 11px; word-break: break-all; color: var(--text1); margin-bottom: 4px; }
.escrow-amount    { font-size: 14px; font-weight: 700; color: var(--text1); }
.submit-keys-btn  {
  align-self: flex-start; padding: 7px 14px; border-radius: 8px; border: none;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 600;
  cursor: pointer; margin-top: 4px;
}
.submit-keys-btn:hover { background: #0052cc; }

/* ── My Bets stats bar ───────────────────────────────────────────────────── */
.mybets-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--border); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; margin-bottom: 16px;
}
.mybet-stat { background: var(--surface); padding: 12px 14px; text-align: center; }
.mybet-stat-val   { font-size: 15px; font-weight: 700; color: var(--text1); line-height: 1.2; }
.mybet-stat-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); margin-top: 2px; }
.stat-pos .mybet-stat-val { color: #05a05a; }
.stat-neg .mybet-stat-val { color: #cc2a1d; }

/* ── Expiry label ────────────────────────────────────────────────────────── */
.expiry-label { color: #d46a00; font-weight: 600; }

/* ── Escrow fund row (copy button) ──────────────────────────────────────── */
.escrow-fund-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.copy-addr-btn {
  padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg); font-size: 12px; font-weight: 600; cursor: pointer;
  color: var(--text2); transition: all .12s;
}
.copy-addr-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Wallet chip (topbar) ────────────────────────────────────────────────── */
.wallet-chip {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 10px; padding: 5px 12px 5px 10px;
  cursor: pointer; transition: border-color .12s, background .12s;
  line-height: 1;
}
.wallet-chip:hover { border-color: var(--accent); background: #f0f5ff; }
.wallet-chip svg   { color: var(--text3); flex-shrink: 0; }
.wallet-chip-bal   { font-size: 13px; font-weight: 700; color: var(--text1); }
.wallet-chip-label { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); margin-top: 1px; }

/* ── Wallet panel (dropdown) ─────────────────────────────────────────────── */
.wallet-panel {
  position: fixed; top: var(--navbar-h); right: 0;
  width: 300px; background: var(--card);
  border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 0 14px; box-shadow: -6px 6px 30px rgba(0,0,0,.13);
  z-index: 200; padding: 20px;
  max-height: calc(100vh - var(--navbar-h)); overflow-y: auto;
}
.wallet-panel-hdr {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.wallet-panel-title { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.wallet-panel-close {
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: var(--card2); cursor: pointer; font-size: 12px;
  color: var(--text2); display: flex; align-items: center; justify-content: center;
}
.wallet-panel-close:hover { background: var(--border); }

.wallet-addr-block { margin-bottom: 16px; }
.wallet-addr-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); margin-bottom: 4px; }
.wallet-addr-val {
  font-family: monospace; font-size: 10px; color: var(--text2);
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 7px; padding: 7px 10px; word-break: break-all; line-height: 1.5;
  margin-top: 8px;
}

/* Receive block */
.wallet-receive-block { margin-bottom: 14px; }
.wallet-receive-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.wallet-receive-actions { display: flex; gap: 6px; }
.wallet-qr-wrap {
  display: flex; justify-content: center;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px; margin-bottom: 0;
}
.wallet-qr-wrap canvas { display: block; border-radius: 4px; }

/* Pay from external wallet */
.wallet-pay-section { margin: 14px 0; }
.wallet-pay-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); margin-bottom: 4px; }
.wallet-pay-hint { font-size: 11px; color: var(--text3); margin-bottom: 8px; }
.wallet-pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.wallet-pay-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 8px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--card2);
  font-size: 12px; font-weight: 600; color: var(--text1);
  text-decoration: none; cursor: pointer; transition: border-color .12s, background .12s;
}
.wallet-pay-btn:hover { border-color: var(--accent); background: #eef3ff; color: var(--accent); }
.wpb-icon { font-size: 22px; line-height: 1; }

/* Escrow funding section */
.wallet-escrow-section { margin-bottom: 14px; }
.wallet-escrow-item {
  background: #fff8e0; border: 1px solid #e8c840; border-radius: 10px;
  padding: 12px; margin-bottom: 8px;
}
.wallet-escrow-item-hdr { font-size: 11px; font-weight: 700; color: #7a5500; margin-bottom: 4px; }
.wallet-escrow-item-amt { font-size: 13px; font-weight: 800; color: var(--text1); margin-bottom: 8px; }
.wallet-escrow-item-qr { display: flex; justify-content: center; margin-bottom: 8px; background: #fff; border-radius: 6px; padding: 6px; }
.wallet-escrow-pay-btns { display: flex; gap: 6px; }
.wallet-escrow-pay-btn {
  flex: 1; padding: 6px 4px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--card); font-size: 11px; font-weight: 600; color: var(--text1);
  text-decoration: none; text-align: center; transition: all .12s;
}
.wallet-escrow-pay-btn:hover { border-color: var(--accent); color: var(--accent); }

.wallet-stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--border); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; margin-bottom: 14px;
}
.wallet-stat-card { background: var(--surface); padding: 11px 10px; text-align: center; }
.ws-val { font-size: 13px; font-weight: 700; color: var(--text1); line-height: 1.2; }
.ws-lbl { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); margin-top: 2px; }

.wallet-balance-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card2); border-radius: 10px; padding: 10px 14px;
  margin-bottom: 14px;
}
.ws-balance-val {
  font-size: 15px; font-weight: 800; color: var(--text1);
}
.wallet-panel-actions { display: flex; gap: 8px; }
.wallet-action-btn {
  flex: 1; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--card2); font-size: 13px; font-weight: 600;
  color: var(--text1); cursor: pointer; transition: all .12s;
}
.wallet-action-btn:hover { border-color: var(--accent); color: var(--accent); }
.wallet-action-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.wallet-action-btn.primary:hover { background: #0052cc; }

.wallet-backdrop {
  position: fixed; inset: 0; z-index: 199; background: transparent;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIVE ODDS + VISUAL POLISH  — Phase 3
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── SVG probability ring ────────────────────────────────────────────────── */
.svg-ring { display: block; overflow: visible; }
.ring-arc {
  stroke-dasharray: var(--circ) var(--circ);
  stroke-dashoffset: var(--circ);
  animation: ring-draw 0.75s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes ring-draw {
  to { stroke-dashoffset: var(--offset); }
}

/* ── Odds flash animations ───────────────────────────────────────────────── */
@keyframes flash-green {
  0%   { background: #d4f7e7; border-color: #05a05a; color: #05a05a; }
  100% { background: var(--card2); border-color: var(--border); }
}
@keyframes flash-red {
  0%   { background: #fde8e8; border-color: #cc2a1d; color: #cc2a1d; }
  100% { background: var(--card2); border-color: var(--border); }
}
.odds-flash-up   { animation: flash-green 2s ease forwards; }
.odds-flash-down { animation: flash-red   2s ease forwards; }

/* ── Live row indicator ──────────────────────────────────────────────────── */
.market-row { cursor: pointer; }
.market-row.row-live { border-left: 3px solid var(--red); padding-left: 13px; }
.inline-score {
  font-weight: 900; font-size: 13px; letter-spacing: .04em;
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 5px; padding: 1px 7px; margin-left: 4px;
}

/* ── Probability split bar (sport rows) ──────────────────────────────────── */
.prob-split {
  display: flex; height: 5px; border-radius: 3px; overflow: hidden;
  margin-top: 7px; background: var(--border);
}
.ps-away { background: #0066ff; transition: width .5s ease; }
.ps-home { background: #05a05a; transition: width .5s ease; flex: 1; }
.prob-labels {
  display: flex; justify-content: space-between;
  font-size: 10px; font-weight: 700; margin-top: 3px;
}

/* ── Market row polish ───────────────────────────────────────────────────── */
.market-row { transition: background .12s; }
.market-row:hover { background: rgba(0,0,0,.016); }
.team-name { font-size: 15px; font-weight: 700; }
.odds-chip-sm {
  background: var(--card2); border: 1px solid var(--border); border-radius: 7px;
  padding: 5px 11px; font-size: 13px; font-weight: 700;
  transition: background .15s, border-color .15s, color .15s;
}
.odds-chip-sm.pos { color: #05a05a; }
.odds-chip-sm.neg { color: var(--orange); }

/* ── Redesigned prediction card (mcard-v2) ───────────────────────────────── */
.mcard.mcard-v2 { gap: 12px; }
.mcard-v2-hdr {
  display: flex; align-items: flex-start; justify-content: space-between;
}
.mcard-thumb-sm {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.thumb-politics.mcard-thumb-sm    { background: linear-gradient(135deg,#6366f1,#8b5cf6); }
.thumb-crypto.mcard-thumb-sm      { background: linear-gradient(135deg,#f59e0b,#f97316); }
.thumb-sports.mcard-thumb-sm      { background: linear-gradient(135deg,#10b981,#059669); }
.thumb-entertainment.mcard-thumb-sm { background: linear-gradient(135deg,#ec4899,#f43f5e); }
.thumb-economics.mcard-thumb-sm   { background: linear-gradient(135deg,#3b82f6,#0ea5e9); }
.thumb-geopolitics.mcard-thumb-sm { background: linear-gradient(135deg,#374151,#111827); }
.thumb-ai.mcard-thumb-sm          { background: linear-gradient(135deg,#8b5cf6,#6366f1); }
.thumb-culture.mcard-thumb-sm     { background: linear-gradient(135deg,#f43f5e,#ec4899); }
.thumb-other.mcard-thumb-sm       { background: linear-gradient(135deg,#64748b,#475569); }
.mcard-v2-ring { flex-shrink: 0; }

/* ── Outcome bars inside card ────────────────────────────────────────────── */
.mcard-outcomes-v2 { display: flex; flex-direction: column; gap: 6px; }
.mco-row {
  display: grid; grid-template-columns: 1fr auto auto;
  align-items: center; gap: 7px;
}
.mco-name {
  font-size: 12px; color: var(--text2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mco-bar {
  width: 64px; height: 4px; background: #e8eaed; border-radius: 2px; overflow: hidden;
}
.mco-fill { height: 100%; border-radius: 2px; transition: width .6s ease; }
.mco-pct  { font-size: 12px; font-weight: 700; min-width: 30px; text-align: right; }

/* ── Global card hover polish ────────────────────────────────────────────── */
.mcard {
  transition: box-shadow .18s, border-color .18s, transform .18s;
}
.mcard:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.09);
  border-color: var(--border2);
  transform: translateY(-1px);
}

/* ── Parlay odds chip selected state ─────────────────────────────────────── */
.odds-chip-sm.parlay-sel {
  background: var(--accent); color: #fff !important;
  border-radius: 5px; box-shadow: 0 0 0 1.5px var(--accent);
}
.parlay-add-btn {
  font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 5px;
  border: 1px solid var(--border2); background: var(--card2); color: var(--text2);
  cursor: pointer; transition: all .12s; letter-spacing: .02em;
}
.parlay-add-btn:hover, .parlay-add-btn.parlay-sel {
  background: var(--accent); color: #fff; border-color: var(--accent);
}

/* ── Parlay Slip ─────────────────────────────────────────────────────────── */
.parlay-slip {
  position: fixed; bottom: 80px; right: 20px; z-index: 210;
  width: 320px; background: var(--card); border: 1px solid var(--border2);
  border-radius: 14px; box-shadow: 0 8px 40px rgba(0,0,0,.14);
  display: flex; flex-direction: column; overflow: hidden;
}
.parlay-slip.hidden { display: none; }
.parlay-slip-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 10px; border-bottom: 1px solid var(--border);
  background: var(--card2);
}
.parlay-slip-title { font-size: 13px; font-weight: 700; color: var(--text1); }
.parlay-slip-hdr-actions { display: flex; align-items: center; gap: 6px; }
.parlay-clear-btn {
  font-size: 11px; font-weight: 600; color: var(--text3); background: none;
  border: none; cursor: pointer; padding: 2px 4px; transition: color .12s;
}
.parlay-clear-btn:hover { color: var(--red); }
.parlay-close-btn {
  font-size: 14px; color: var(--text3); background: none; border: none;
  cursor: pointer; padding: 2px 5px; transition: color .12s;
}
.parlay-close-btn:hover { color: var(--text1); }

.parlay-legs { max-height: 260px; overflow-y: auto; padding: 6px 0; }
.parlay-empty {
  font-size: 12px; color: var(--text3); text-align: center;
  padding: 18px 16px; line-height: 1.5;
}
.parlay-leg {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 8px 14px; border-bottom: 1px solid var(--border);
  gap: 10px;
}
.parlay-leg:last-child { border-bottom: none; }
.parlay-leg-info { min-width: 0; flex: 1; }
.parlay-leg-event { font-size: 11px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.parlay-leg-sel   { font-size: 12px; font-weight: 600; color: var(--text1); margin-top: 1px; }
.parlay-leg-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.parlay-leg-odds  { font-size: 12px; font-weight: 700; }
.parlay-leg-odds.pos { color: #05a05a; }
.parlay-leg-odds.neg { color: var(--orange); }
.parlay-leg-rm {
  font-size: 15px; line-height: 1; color: var(--text3); background: none;
  border: none; cursor: pointer; padding: 0 2px; transition: color .12s;
}
.parlay-leg-rm:hover { color: var(--red); }

.parlay-slip-footer {
  border-top: 1px solid var(--border); padding: 12px 14px; background: var(--card2);
  display: flex; flex-direction: column; gap: 10px;
}
.parlay-combined-row, .parlay-stake-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.parlay-footer-lbl { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text3); }
.parlay-combined-odds-val { font-size: 16px; font-weight: 800; color: var(--accent); }
.parlay-stake-input {
  flex: 1; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border2);
  background: var(--bg); font-size: 13px; color: var(--text1); min-width: 0;
}
.parlay-stake-input:focus { outline: none; border-color: var(--accent); }
.parlay-payout-block { text-align: right; flex-shrink: 0; }
.parlay-payout-val { font-size: 13px; font-weight: 700; color: var(--text1); display: block; }
.parlay-place-btn {
  width: 100%; padding: 10px; border-radius: 9px; border: none;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background .12s;
}
.parlay-place-btn:hover:not(:disabled) { background: #0052cc; }
.parlay-place-btn:disabled { background: var(--border2); color: var(--text3); cursor: not-allowed; }

/* ── Parlay FAB ──────────────────────────────────────────────────────────── */
.parlay-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 209;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); color: #fff; border: none;
  box-shadow: 0 4px 18px rgba(0,102,255,.35);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.parlay-fab:hover { transform: scale(1.07); box-shadow: 0 6px 24px rgba(0,102,255,.45); }
.parlay-fab.hidden { display: none; }
.parlay-fab-count {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; border-radius: 9px;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
  border: 2px solid var(--card);
}

/* ── Support Chat Widget ─────────────────────────────────────────────────── */
#support-chat-widget {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.support-chat-fab {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent, #6c63ff); color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.support-chat-fab:hover { transform: scale(1.07); box-shadow: 0 6px 24px rgba(0,0,0,0.45); }
.support-chat-panel {
  width: 340px;
  background: var(--card, #1a1a2e); border: 1px solid var(--border, #2e2e4a);
  border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  animation: support-chat-in 0.2s ease;
}
@keyframes support-chat-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.support-chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: var(--card, #1a1a2e);
  border-bottom: 1px solid var(--border, #2e2e4a);
}
.support-chat-header-info { display: flex; align-items: center; gap: 10px; }
.support-chat-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent, #6c63ff);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff; font-weight: 700;
}
.support-chat-title { font-size: 14px; font-weight: 700; color: var(--text, #e0e0f0); }
.support-chat-subtitle { font-size: 11px; color: var(--text-muted, #888); margin-top: 1px; }
.support-chat-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted, #888); padding: 4px;
  border-radius: 6px; display: flex; align-items: center;
  transition: color 0.15s;
}
.support-chat-close:hover { color: var(--text, #e0e0f0); }
.support-chat-messages {
  flex: 1; overflow-y: auto; padding: 16px 14px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 280px; max-height: 340px;
  scrollbar-width: thin; scrollbar-color: var(--border, #2e2e4a) transparent;
}
.support-chat-msg { display: flex; }
.support-chat-msg-user { justify-content: flex-end; }
.support-chat-msg-ai   { justify-content: flex-start; }
.support-chat-bubble {
  max-width: 84%; padding: 9px 13px;
  border-radius: 14px; font-size: 13px; line-height: 1.5;
  color: var(--text, #e0e0f0);
  word-break: break-word;
}
.support-chat-msg-user .support-chat-bubble {
  background: var(--accent, #6c63ff); color: #fff;
  border-bottom-right-radius: 4px;
}
.support-chat-msg-ai .support-chat-bubble {
  background: var(--bg, #12121e); border: 1px solid var(--border, #2e2e4a);
  border-bottom-left-radius: 4px;
}
.support-chat-typing .support-chat-bubble { color: var(--text-muted, #888); font-style: italic; }
.support-chat-input-row {
  display: flex; gap: 8px; padding: 12px 14px;
  border-top: 1px solid var(--border, #2e2e4a);
  background: var(--card, #1a1a2e);
}
.support-chat-input {
  flex: 1; background: var(--bg, #12121e);
  border: 1px solid var(--border, #2e2e4a); border-radius: 10px;
  padding: 9px 12px; font-size: 13px; color: var(--text, #e0e0f0);
  outline: none; transition: border-color 0.15s;
}
.support-chat-input::placeholder { color: var(--text-muted, #888); }
.support-chat-input:focus { border-color: var(--accent, #6c63ff); }
.support-chat-send {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent, #6c63ff); color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: opacity 0.15s;
}
.support-chat-send:disabled { opacity: 0.5; cursor: not-allowed; }
.support-chat-send:not(:disabled):hover { opacity: 0.85; }

/* ── Mobile layout ───────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Market tabs: scrollable */
  .tab-row, .market-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .market-tab, .tab-btn  { flex-shrink: 0; padding: 8px 14px; font-size: 12px; }

  /* Market rows: tighter */
  .market-row { padding: 10px 12px; }
  .market-teams { font-size: 12px; }
  .market-meta  { font-size: 10px; }
  .odds-chip-sm { font-size: 11px; padding: 4px 7px; }
  .bet-btn-sm   { font-size: 11px; padding: 5px 10px; }

  /* Prediction cards: 1 column */
  .mcard-grid { grid-template-columns: 1fr !important; }

  /* Wallet chip: compact */
  .wallet-chip-label { display: none; }
  .wallet-chip-bal   { font-size: 11px; }

  /* Parlay slip: full-width bottom sheet */
  .parlay-slip {
    bottom: 0; right: 0; left: 0; width: 100%;
    border-radius: 16px 16px 0 0; max-height: 80vh;
  }
  .parlay-fab { bottom: 76px; right: 16px; width: 46px; height: 46px; }

  /* Markets inner: less padding */
  .markets-inner { padding: 12px 12px 60px; }

  /* Featured section: hide on very small screens */
  .hero-grid, .featured-row { display: none; }

  /* Bet modal: bottom sheet on mobile */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .bet-modal-box { max-height: 88vh; border-radius: 16px 16px 0 0; max-width: 100%; width: 100%; }
  .outcome-pick-btn { padding: 6px 10px; }
  .opb-name { font-size: 13px; }
}

