:root {
  --bg: #0a1510; --bg2: #0e1c15; --card: #12231b; --card2: #172b21; --line: rgba(255,255,255,.09); --line2: rgba(255,255,255,.16);
  --text: #eef5f0; --muted: #a3b8ac; --dim: #7d9187;
  --gold: #f5a623; --gold2: #ffc15c; --gold-ink: #1b1204;
  --green: #45d98b; --red: #ff8a80; --live: #ff5a4f; --warn: #ffcf6b;
  --radius: 16px; --tap: 44px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: radial-gradient(1200px 600px at 50% -200px, #14301f 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text); font: 15px/1.5 var(--font); font-variant-numeric: tabular-nums;
}
a { color: var(--gold2); }
a:hover { color: #ffd690; }
b { font-weight: 650; }
small { font-size: .82em; }
:focus-visible { outline: 3px solid var(--gold2); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--gold); color: var(--gold-ink); padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.muted { color: var(--muted); }
.good { color: var(--green); }
.warn { color: var(--warn); }
.hint { color: var(--muted); font-size: .88rem; margin: .5rem 0; }

/* ------------------------------------------------ chrome */
.testbar { background: repeating-linear-gradient(135deg, #3a2a06 0 12px, #33250a 12px 24px); color: #ffd690; text-align: center; font-size: .8rem; letter-spacing: .02em; padding: 6px 12px; border-bottom: 1px solid #5a4210; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1080px; margin: 0 auto; padding: 14px 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-height: var(--tap); }
.brand img { border-radius: 9px; }
.brand-t { font-weight: 800; letter-spacing: .06em; font-size: 1.02rem; }
.brand-t b { color: var(--gold); font-weight: 800; }
.tabs { position: sticky; top: 0; z-index: 20; display: flex; gap: 4px; max-width: 1080px; margin: 0 auto; padding: 6px 12px; background: rgba(10,21,16,.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 16px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; }
.tabs a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.tabs a[aria-current="page"] { color: var(--gold-ink); background: var(--gold); }
.tabs .count:empty { display: none; }
.tabs .count { background: rgba(0,0,0,.25); color: inherit; border-radius: 999px; font-size: .75rem; padding: 1px 7px; }
main { max-width: 1080px; margin: 0 auto; padding: 16px 16px 40px; outline: none; }
.foot { max-width: 1080px; margin: 0 auto; padding: 24px 16px 48px; color: var(--dim); font-size: .85rem; border-top: 1px solid var(--line); }

/* ------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 18px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card2); color: var(--text); font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; transition: transform .08s, background .15s, border-color .15s; }
.btn:hover { border-color: rgba(255,255,255,.3); color: var(--text); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-gold { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: var(--gold-ink); border-color: transparent; }
.btn-gold:hover { color: var(--gold-ink); filter: brightness(1.05); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .88rem; }
.btn-block { width: 100%; margin-top: 12px; }
.linkbtn { background: none; border: 0; color: var(--gold2); font: inherit; cursor: pointer; padding: 8px 4px; min-height: 36px; text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------ wallet chip + menu */
.wallet-slot { position: relative; }
.chip { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 4px 6px 4px 14px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
.chip-bal small { color: var(--muted); }
.chip-addr { background: rgba(255,255,255,.07); border-radius: 999px; padding: 6px 10px; font-size: .85rem; font-family: ui-monospace, Menlo, monospace; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 230px; background: #13251c; border: 1px solid var(--line2); border-radius: 14px; box-shadow: 0 18px 40px rgba(0,0,0,.5); padding: 6px; }
.menu-head { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: .88rem; }
.menu button, .menu a { display: block; width: 100%; text-align: left; min-height: var(--tap); padding: 10px 12px; border: 0; background: none; color: var(--text); font: inherit; border-radius: 10px; cursor: pointer; text-decoration: none; }
.menu button:hover, .menu a:hover { background: rgba(255,255,255,.06); }

/* ------------------------------------------------ onboarding */
.onboard { background: linear-gradient(135deg, rgba(245,166,35,.13), rgba(69,217,139,.07)); border: 1px solid rgba(245,166,35,.3); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.onboard h2 { margin: 0 0 4px; font-size: 1.25rem; }
.onboard .ob-head p { margin: 0 0 12px; color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { display: flex; gap: 12px; background: rgba(0,0,0,.18); border-radius: 12px; padding: 12px; }
.steps li p { margin: 2px 0 8px; color: var(--muted); font-size: .9rem; }
.step-n { flex: 0 0 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--card2); border: 1px solid var(--line2); font-weight: 700; }
.steps li.done .step-n { background: var(--green); color: #06170d; border-color: transparent; }
.steps li.done b { color: var(--muted); text-decoration: line-through; }

/* ------------------------------------------------ filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; padding-bottom: 2px; }
.fchip { flex: 0 0 auto; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.fchip[aria-pressed="true"] { background: var(--text); color: #0a1510; border-color: var(--text); }
.fchip .n, .seg .n { font-size: .75rem; opacity: .75; margin-left: 2px; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { min-height: 38px; padding: 0 12px; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; border-radius: 9px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--card2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.notice { background: var(--card); border: 1px solid var(--line2); border-left: 4px solid var(--gold); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; }
.notice.good { border-left-color: var(--green); color: var(--text); }
.notice.warn { border-left-color: var(--warn); }

/* ------------------------------------------------ cards */
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.card { background: linear-gradient(180deg, var(--card2), var(--card)); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 10px; }
.card.is-live { border-color: rgba(255,90,79,.45); box-shadow: 0 0 0 1px rgba(255,90,79,.15), 0 10px 30px rgba(255,90,79,.06); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); }
.league { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--dim); }
.live { display: inline-flex; align-items: center; gap: 6px; color: #fff; background: var(--live); font-weight: 800; letter-spacing: .06em; font-size: .72rem; padding: 3px 8px; border-radius: 6px; }
.live i { width: 7px; height: 7px; background: #fff; border-radius: 50%; animation: pulse 1.4s infinite; }
.clock { color: var(--text); font-weight: 600; }
.final { color: var(--text); font-weight: 700; }
@keyframes pulse { 50% { opacity: .25; } }
.matchup { margin: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; font-size: 1rem; }
.team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.team:last-child { flex-direction: row-reverse; text-align: right; }
.tname { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scoreline { display: inline-flex; align-items: center; gap: 6px; }
.score { font-size: 1.55rem; font-weight: 800; line-height: 1; }
.is-live .badge, .card:has(.scoreline) .badge { min-width: 32px; height: 32px; border-radius: 9px; font-size: .66rem; }
.card:has(.scoreline) .team { gap: 6px; }
.dash { color: var(--dim); }
.sep { color: var(--dim); font-weight: 600; font-size: .85rem; }
.badge { flex: 0 0 auto; display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 4px; border-radius: 11px; background: var(--c); color: var(--t); font-weight: 800; font-size: .72rem; letter-spacing: .02em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.status { margin: 0; font-size: .9rem; color: var(--muted); min-height: 1.4em; }
.status b { color: var(--text); }
.status.good { color: var(--green); }
.status.warn { color: var(--warn); }
.outcomes { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
.outcomes.n3 { grid-template-columns: repeat(3, 1fr); }
.oc { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "n x" "b b" "p p"; gap: 4px 6px; text-align: left; min-height: 72px; padding: 10px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(0,0,0,.2); color: var(--text); font: inherit; }
button.oc { cursor: pointer; transition: border-color .15s, background .15s, transform .08s; }
button.oc:hover { border-color: var(--gold); background: rgba(245,166,35,.08); }
button.oc:active { transform: scale(.98); }
button.oc[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.oc.is-mine { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.oc.won { border-color: var(--green); background: rgba(69,217,139,.1); }
.oc.won .oc-name::after { content: " ✓"; color: var(--green); }
.oc-name { grid-area: n; font-weight: 700; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-x { grid-area: x; font-weight: 800; color: var(--gold2); }
.bar { grid-area: b; height: 5px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold2)); border-radius: 3px; transition: width .4s; }
.oc-pot { grid-area: p; font-size: .78rem; color: var(--muted); }
.mine { display: inline-block; margin-left: 4px; font-size: .66rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-ink); background: var(--gold); padding: 1px 5px; border-radius: 4px; vertical-align: 1px; }
.yours { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; font-size: .88rem; background: rgba(245,166,35,.07); border: 1px dashed rgba(245,166,35,.35); border-radius: 10px; padding: 8px 10px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 4px; }
.card-foot .links { display: flex; gap: 10px; align-items: center; }
.card-foot a { min-height: 36px; display: inline-flex; align-items: center; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); grid-column: 1 / -1; }
.empty h2 { color: var(--text); font-size: 1.2rem; margin: 0 0 8px; }
.empty p { max-width: 520px; margin: 0 auto 14px; }
.sk { min-height: 210px; }
.sk-l, .sk-b { border-radius: 8px; background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.1), rgba(255,255,255,.05)); background-size: 200% 100%; animation: sh 1.3s infinite; height: 14px; margin-bottom: 12px; }
.sk-l.w60 { width: 60%; height: 28px; }
.sk-b { height: 72px; }
@keyframes sh { to { background-position: -200% 0; } }

/* ------------------------------------------------ my bets */
.stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 14px; }
.stats > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; }
.stats span { color: var(--muted); font-size: .8rem; }
.stats b { font-size: 1.35rem; font-weight: 800; }
.betlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bet { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.bet-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bet-match { display: flex; align-items: center; gap: 6px; }
.bet-match .badge { min-width: 30px; height: 30px; border-radius: 8px; font-size: .62rem; }
.bet-match > span:not(.badge) { display: flex; flex-direction: column; margin-left: 4px; }
.bet-match small { color: var(--muted); }
.bet-res { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------ forms */
.form, .lim-intro, .ask, .tech { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.lim-intro h2, .form h3, .ask h2, .tech h2 { margin: 0 0 6px; }
.field { margin: 12px 0; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.inp { display: flex; align-items: center; background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px; padding: 0 12px; }
.inp:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,166,35,.25); }
.inp input { flex: 1; min-width: 0; min-height: var(--tap); background: none; border: 0; color: var(--text); font: inherit; outline: none; }
.inp span { color: var(--muted); font-size: .85rem; }
.inp.big input { font-size: 1.5rem; font-weight: 800; min-height: 56px; }
.form-err { color: var(--red); margin: 6px 0; min-height: 0; }
.form-err:empty { display: none; }
.cool { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: flex; gap: 10px; align-items: center; min-height: var(--tap); }
.check input { width: 22px; height: 22px; accent-color: var(--gold); }

/* ------------------------------------------------ dialog */
.dlg { width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line2); border-radius: 20px; background: #102019; color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.dlg::backdrop { background: rgba(3,8,5,.72); backdrop-filter: blur(3px); }
.dlg-inner { padding: 22px 20px 20px; overflow-y: auto; max-height: calc(100vh - 34px); }
.dlg h2 { margin: 0 34px 4px 0; font-size: 1.25rem; }
.dlg-x { position: absolute; top: 10px; right: 10px; width: var(--tap); height: var(--tap); border-radius: 12px; border: 0; background: rgba(255,255,255,.06); color: var(--text); font-size: 1rem; cursor: pointer; }
.pick { border: 0; padding: 0; margin: 14px 0 6px; display: grid; gap: 8px; }
.pick legend { font-weight: 600; margin-bottom: 6px; }
.pick-o { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 12px; border: 1px solid var(--line2); border-radius: 12px; cursor: pointer; background: rgba(0,0,0,.15); }
.pick-o:has(input:checked) { border-color: var(--gold); background: rgba(245,166,35,.1); }
.pick-o:has(input:focus-visible) { outline: 3px solid var(--gold2); outline-offset: 2px; }
.pick-o input { width: 20px; height: 20px; accent-color: var(--gold); margin: 0; }
.pick-o .pick-l { font-weight: 700; flex: 1; }
.pick-o small { color: var(--gold2); font-weight: 700; }
.pick-o.is-off { opacity: .45; cursor: not-allowed; }
.pick-o .badge { min-width: 32px; height: 32px; border-radius: 9px; }
.quick { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.qbtn { min-height: 40px; min-width: 56px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card2); color: var(--text); font: inherit; font-weight: 650; cursor: pointer; }
.qbtn:hover { border-color: var(--gold); }
.preview { background: var(--bg2); border-radius: 12px; padding: 12px; margin-top: 8px; }
.preview:empty { display: none; }
.pv-row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.pv-row b { font-size: 1.25rem; }
.txsteps { list-style: none; margin: 14px 0 6px; padding: 0; display: grid; gap: 6px; }
.txsteps li { display: flex; align-items: center; gap: 10px; color: var(--dim); }
.txsteps li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line2); font-size: .75rem; font-weight: 800; }
.txsteps li.ok { color: var(--muted); }
.txsteps li.ok span { background: var(--green); border-color: var(--green); color: #06170d; }
.txsteps li.now { color: var(--text); font-weight: 650; }
.txsteps li.now span { border-color: var(--gold); border-top-color: transparent; animation: spin .8s linear infinite; }
.txsteps li.bad { color: var(--red); }
.txsteps li.bad span { border-color: var(--red); color: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }
.ok-box { background: rgba(69,217,139,.1); border: 1px solid rgba(69,217,139,.4); border-radius: 12px; padding: 12px; margin: 10px 0; }
.wallets { display: grid; gap: 8px; margin: 14px 0; }
.wbtn { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line2); background: var(--card2); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.wbtn:hover { border-color: var(--gold); color: var(--text); }
.wbtn small { margin-left: auto; color: var(--green); font-weight: 600; }
.wbtn.dim small { color: var(--muted); }
.wlogo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; }
.w-phantom { background: #ab9ff2; color: #1c1640; }
.w-solflare { background: #fc7227; }
.w-backpack { background: #e33e3f; }
.timeline { list-style: none; margin: 16px 0; padding: 0 0 0 18px; border-left: 2px solid var(--line2); display: grid; gap: 12px; }
.timeline li { position: relative; display: flex; flex-direction: column; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line2); }
.timeline li.done::before { background: var(--green); border-color: var(--green); }
.timeline span { color: var(--muted); font-size: .88rem; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.raw summary, details summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; font-weight: 650; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 8px 0; font-size: .9rem; }
dt { color: var(--muted); }
dd { margin: 0; word-break: break-word; }

/* ------------------------------------------------ help */
#panel-help details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 2px 16px; margin-bottom: 8px; }
#panel-help details[open] { padding-bottom: 12px; }
.faq-a { color: #d6e3dc; }
.faq-a p { margin: .5rem 0; }
.ask-log { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; margin: 10px 0; }
.ask-log:empty { display: none; }
.bubble { max-width: 85%; padding: 10px 12px; border-radius: 14px; background: var(--card2); }
.bubble.user { align-self: flex-end; background: rgba(245,166,35,.16); }
.bubble.typing { color: var(--muted); animation: pulse 1.2s infinite; }
.ask-form { display: flex; gap: 8px; }
.ask-form input { flex: 1; min-width: 0; min-height: var(--tap); border-radius: 12px; border: 1px solid var(--line2); background: var(--bg2); color: var(--text); font: inherit; padding: 0 12px; }
.ask-form input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,166,35,.25); }
.activity { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; font-size: .86rem; }
.activity li { display: flex; gap: 10px; align-items: baseline; }
.activity time { color: var(--dim); flex: 0 0 auto; min-width: 118px; }
.activity span { flex: 1; }

/* ------------------------------------------------ toasts */
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
.toast { background: #1c3328; border: 1px solid var(--line2); color: var(--text); padding: 12px 16px; border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.45); animation: up .25s ease-out; transition: opacity .5s, transform .5s; }
.toast.good { border-color: var(--green); }
.toast.sticky { pointer-events: auto; display: flex; align-items: center; gap: 10px; }
.toast.sticky span { flex: 1; }
.toast-x { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; border: 0; background: rgba(255,255,255,.08); color: var(--text); cursor: pointer; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes up { from { opacity: 0; transform: translateY(10px); } }

/* ------------------------------------------------ small screens */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .top { padding: 10px 12px; }
  .brand-t { font-size: .92rem; }
  .brand img { width: 30px; height: 30px; }
  .chip { padding-left: 10px; gap: 6px; }
  .chip-bal small { display: none; }
  main { padding: 12px 12px 32px; }
  .cards { grid-template-columns: 1fr; }
  .filters { flex-direction: column; align-items: stretch; }
  .seg { display: flex; }
  .seg button { flex: 1; padding: 0 6px; font-size: .86rem; }
  .dlg { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 20px 20px 0 0; max-height: 92vh; }
  .dlg-inner { max-height: 92vh; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .score { font-size: 1.45rem; }
  .seg .xl { display: none; }
  .testbar { font-size: .72rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .btn, .oc, .fchip, .pick-o { border: 1px solid ButtonText; }
}

/* ------------------------------------------------ dashboard (v2) */
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.dtile { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--card2), var(--card)); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-height: 92px; }
.dtile span { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.dtile b { font-size: 1.6rem; font-weight: 800; line-height: 1.15; }
.dtile small { color: var(--muted); font-size: .82rem; }
.dtile.bal { background: linear-gradient(150deg, rgba(245,166,35,.22), rgba(245,166,35,.05) 60%), var(--card); border-color: rgba(245,166,35,.35); }
.dtile.bal b { color: var(--gold2); }
.dtile.up b { color: var(--green); }
.dtile.down b { color: var(--red); }
.linkbtn.inline { padding: 0; min-height: 0; font-size: inherit; }
.rail { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; padding: 8px; background: rgba(255,90,79,.07); border: 1px solid rgba(255,90,79,.3); border-radius: 14px; }
.rail-t { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: #ffb3ad; padding: 0 6px; }
.rail-i { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); color: var(--text); font: inherit; font-size: .88rem; cursor: pointer; }
.rail-i:hover { border-color: var(--live); }
.rail-i small { color: var(--muted); margin-left: 4px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live); margin-right: 6px; vertical-align: 1px; animation: pulse 1.4s infinite; }
.grouphead { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; margin: 10px 2px -2px; }
.grouphead:first-child { margin-top: 0; }
.grouphead h3 { margin: 0; font-size: 1.05rem; font-weight: 800; }
.grouphead span { color: var(--dim); font-size: .82rem; }
.card { position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--c1, #334), var(--c2, #334)); opacity: .9; }
.card.has-bet { border-color: rgba(245,166,35,.35); }
.card-top .league span { font-size: .95rem; }
.soon { color: var(--gold2); font-weight: 700; }
.matchup { font-size: 1.02rem; }
/* my bets v2 */
.bet { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; border-left: 4px solid var(--line2); }
.bet-ic { font-size: 1.4rem; width: 32px; text-align: center; }
.bet-score { font-weight: 800; margin-left: 4px; }
.pickpill { display: inline-block; font-weight: 800; font-size: .82rem; padding: 3px 9px; border-radius: 999px; background: rgba(245,166,35,.15); color: var(--gold2); border: 1px solid rgba(245,166,35,.35); }
.bet-res { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.stpill { display: inline-block; font-weight: 800; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--text); }
.bet-note { color: var(--muted); font-size: .8rem; }
.bet.st-live { border-left-color: var(--live); } .bet.st-live .stpill { background: var(--live); color: #fff; }
.bet.st-open { border-left-color: var(--gold); } .bet.st-open .stpill { background: rgba(245,166,35,.18); color: var(--gold2); }
.bet.st-wait .stpill { background: rgba(255,207,107,.15); color: var(--warn); }
.bet.st-won { border-left-color: var(--green); } .bet.st-won .stpill { background: rgba(69,217,139,.18); color: var(--green); } .bet.st-won .bet-note { color: var(--green); }
.bet.st-lost { border-left-color: #6b3a36; } .bet.st-lost .stpill { background: rgba(255,138,128,.12); color: var(--red); }
.bet.st-ref .stpill { background: rgba(255,255,255,.1); color: var(--muted); }
@media (max-width: 860px) { .summary { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .dtile { min-height: 78px; padding: 12px; } .dtile b { font-size: 1.3rem; }
  .bet { grid-template-columns: auto 1fr; } .bet-res { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; text-align: left; }
}

.reg { font-size: .5em; font-weight: 700; vertical-align: super; line-height: 0; margin-left: 1px; letter-spacing: 0; }

/* ------------------------------------------------ profiles, avatars, referrals */
.av { display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 50%; object-fit: cover; font-weight: 800; color: #fff; line-height: 1; vertical-align: middle;
  background: linear-gradient(135deg, hsl(var(--h, 140) 55% 42%), hsl(calc(var(--h, 140) + 40) 60% 30%)); border: 0; padding: 0; }
.av-sm { width: 22px; height: 22px; font-size: 12px; margin-right: 6px; }
.av-md { width: 44px; height: 44px; font-size: 22px; }
.av-xl { width: 88px; height: 88px; font-size: 42px; box-shadow: 0 0 0 3px var(--card2), 0 0 0 5px var(--gold); }
.av-p1 { background: linear-gradient(135deg, #7a2e0e, #e0782a); } .av-p2 { background: linear-gradient(135deg, #8a3b12, #f39a3c); }
.av-p3 { background: linear-gradient(135deg, #0d4a2a, #3fbf74); } .av-p4 { background: linear-gradient(135deg, #12335a, #4b8fd6); }
.av-p5 { background: linear-gradient(135deg, #5a1222, #d64b63); } .av-p6 { background: linear-gradient(135deg, #3d1a5c, #a35bd6); }
.av-p7 { background: linear-gradient(135deg, #6b1d06, #ff7a2f); } .av-p8 { background: linear-gradient(135deg, #5a4a06, #ffd23f); }
.av-p9 { background: linear-gradient(135deg, #2b2b2b, #8c8c8c); } .av-p10 { background: linear-gradient(135deg, #1a2a3a, #6c8aa6); }
.av-p11 { background: linear-gradient(135deg, #5c3b06, #d6a13a); } .av-p12 { background: linear-gradient(135deg, #0b3d3a, #2fc2b2); }
.av-p13 { background: linear-gradient(135deg, #4a3600, #f5a623); } .av-p14 { background: linear-gradient(135deg, #10204a, #6a5bff); }
.av-p15 { background: linear-gradient(135deg, #0f1530, #3d4f8f); } .av-p16 { background: linear-gradient(135deg, #0a4a5a, #5fe0ff); }
.chip-addr { display: inline-flex; align-items: center; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prof-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.prof-id { flex: 1 1 220px; min-width: 0; }
.prof-id h2 { margin: 0 0 4px; font-size: 1.4rem; overflow-wrap: anywhere; }
.prof-bio { margin: 0 0 6px; }
.prof-id p { margin: 4px 0; }
.invited-by { display: flex; align-items: center; gap: 2px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tiles.small { grid-template-columns: repeat(3, 1fr); margin: 12px 0; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.tile b { display: block; font-size: 1.25rem; overflow-wrap: anywhere; }
.tile b.bad { color: var(--red); }
.tile span { color: var(--muted); font-size: .82rem; }
.refbox { border-left: 4px solid var(--gold); }
.reflink { display: flex; gap: 8px; margin: 10px 0; }
.reflink input { flex: 1 1 auto; min-width: 0; min-height: var(--tap); border-radius: 12px; border: 1px solid var(--line2); background: var(--bg2); color: var(--text); padding: 0 12px; font: inherit; font-size: .88rem; }
.share { display: flex; flex-wrap: wrap; gap: 8px; }
.people, .recent { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.people li, .recent li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.res { display: inline-block; min-width: 58px; text-align: center; border-radius: 999px; font-size: .78rem; font-weight: 700; padding: 2px 8px; background: var(--card2); }
.res.won { background: rgba(69,217,139,.15); color: var(--green); } .res.lost { color: var(--muted); }
.av-pick { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.av-pick label.btn { margin-right: 6px; }
.presets { display: grid; grid-template-columns: repeat(8, 44px); gap: 8px; border: 0; padding: 0; margin: 0 0 12px; }
.presets legend { color: var(--muted); font-size: .88rem; margin-bottom: 6px; }
.presets .av { cursor: pointer; outline-offset: 2px; }
.presets .av.on { box-shadow: 0 0 0 3px var(--gold); }
.invite { display: flex; align-items: center; gap: 4px; background: rgba(245,166,35,.12); border: 1px solid rgba(245,166,35,.35); border-radius: 12px; padding: 8px 12px; margin: 0 0 12px; }
.invite-note { border-left: 3px solid var(--gold); padding-left: 10px; }
@media (max-width: 520px) {
  .presets { grid-template-columns: repeat(6, 44px); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .prof-head .btn { width: 100%; }
}

/* 1WB AI picks */
.ai-pick { display: flex; align-items: baseline; gap: 6px; margin: 2px 0 8px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.ai-pick b { color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.ai-tag { font-weight: 800; font-style: italic; letter-spacing: .4px; text-transform: uppercase; font-size: 11px; color: var(--green); flex: none; }
.ai-pct { color: var(--gold); font-weight: 800; flex: none; }
.ai-box { margin: 10px 0 14px; padding: 12px 14px; border: 1px solid rgba(110, 255, 172, .25); border-radius: 12px; background: rgba(110, 255, 172, .04); }
.ai-box p { margin: 0 0 6px; }
.ai-box .ai-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ai-box .ai-head b { color: var(--gold); }
.ai-box .ai-all { font-size: 12.5px; color: var(--muted); }
.ai-box .hint { margin: 0; }

/* ambassadors */
.amb-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 9px; border-radius: 999px; vertical-align: middle;
  font-size: .72rem; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--gold-ink); background: linear-gradient(135deg, var(--gold), #d48800); }
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.amb-table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 520px; }
.amb-table th, .amb-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.amb-table th { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; }
.amb-owed { margin: .5rem 0; }
