/* ══════════════════════════════════════════════════════════════
   HOOP X — app styles
   Palette (spec §4): black / red / white / light gray.
   Type: Archivo at two widths — condensed heavy for prices & scoreboard,
   normal width for reading.
   ══════════════════════════════════════════════════════════════ */
@font-face { font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(/fonts/archivo-latin-wdth-normal.woff2) format('woff2-variations'), url(/fonts/archivo-latin-wdth-normal.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: italic; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(/fonts/archivo-latin-wdth-italic.woff2) format('woff2-variations'), url(/fonts/archivo-latin-wdth-italic.woff2) format('woff2'); }
:root {
  --black: #000000;
  --s1: #101010;          /* surface */
  --s2: #181818;          /* raised */
  --s3: #232323;          /* control */
  --line: #2c2c2c;
  --white: #ffffff;
  --gray: #d4d4d4;        /* light gray: secondary data */
  --muted: #8f8f8f;
  --red: #e4002b;         /* identity + primary action */
  --red-press: #b80022;
  --up: #3ddc84;          /* paired with ▲ */
  --down: #ff8095;        /* paired with ▼ — lighter than brand red so it never reads as a button */
  --gold: #f2c14e;
  --r-card: 14px; --r-ctl: 10px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--black); color: var(--white); font-family: var(--font);
  font-size: 16px; line-height: 1.45; font-variation-settings: 'wdth' 100; -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; overscroll-behavior-y: none; }
a { color: var(--white); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* numbers: the scoreboard voice */
.n { font-variation-settings: 'wdth' 62; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.n-xl { font-size: clamp(52px, 14vw, 84px); line-height: .9; }
.n-l  { font-size: 40px; line-height: 1; }
.n-m  { font-size: 26px; line-height: 1; }
.n-s  { font-size: 19px; line-height: 1.1; }
.cr::after { content: var(--cur); font-size: .42em; font-weight: 600; color: var(--muted); font-variation-settings: 'wdth' 100; letter-spacing: 0; }
.up { color: var(--up); } .down { color: var(--down); } .flat { color: var(--muted); }
.chg::before { margin-right: 2px; font-size: .8em; }
.chg.up::before { content: '▲'; } .chg.down::before { content: '▼'; }
.muted { color: var(--muted); } .gray { color: var(--gray); }
.small { font-size: 13px; } .tiny { font-size: 12px; }

/* ── shell ─────────────────────────────────────────── */
#app { max-width: 1180px; margin: 0 auto; padding: calc(var(--safe-t) + 8px) 16px calc(var(--nav-h) + var(--safe-b) + 28px); }
.topbar { display: flex; align-items: center; gap: 10px; padding: 6px 0 14px; position: sticky; top: 0; z-index: 20;
  background: linear-gradient(var(--black) 75%, transparent); }
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 34px; width: auto; display: block; }
.mkt-pill { margin-left: auto; display: flex; align-items: center; gap: 6px; background: var(--s2); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px; font-size: 14px; max-width: 46vw; cursor: pointer; }
.mkt-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--s2); border: 1px solid var(--line);
  display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; }
.dot { position: absolute; top: 6px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 2px solid var(--s2); }

nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(0,0,0,.94);
  backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
nav.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none;
  color: var(--muted); font-size: 11px; font-weight: 600; }
nav.tabs a svg { width: 24px; height: 24px; }
nav.tabs a[aria-current="page"] { color: var(--white); }
nav.tabs a[aria-current="page"] svg { color: var(--red); }
@media (min-width: 900px) {
  #app { padding-left: 112px; padding-bottom: 40px; }
  nav.tabs { top: 0; bottom: 0; right: auto; width: 92px; height: auto; grid-template-columns: 1fr; grid-auto-rows: 76px;
    align-content: center; border-top: 0; border-right: 1px solid var(--line); padding: 0; }
}

/* ── generic blocks ─────────────────────────────────── */
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-size: 28px; font-weight: 800; font-variation-settings: 'wdth' 75; }
h2 { font-size: 19px; font-weight: 750; font-variation-settings: 'wdth' 85; margin: 26px 0 10px; }
h3 { font-size: 16px; font-weight: 700; }
.panel { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grid2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.stack > * + * { margin-top: 10px; }
.split { display: grid; gap: 22px; }
.split > section { min-width: 0; }
.kv > :last-child { text-align: right; overflow-wrap: anywhere; }
.row > .input { min-width: 0; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; } }
.list { display: grid; gap: 8px; }
.empty { padding: 26px 16px; text-align: center; color: var(--gray); background: var(--s1); border: 1px dashed var(--line); border-radius: var(--r-card); }
.empty .btn { margin-top: 12px; }
.note { font-size: 13px; color: var(--gray); background: var(--s2); border-left: 3px solid var(--gray); padding: 10px 12px; border-radius: 6px; }
.warn { border-left-color: var(--gold); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--s3); color: var(--gray); white-space: nowrap; }
.chip.red { background: var(--red); color: var(--white); }
.chip.out { background: transparent; border: 1px solid var(--gray); color: var(--white); }
.chip.sim { background: transparent; border: 1px dashed var(--muted); color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--s3); font-weight: 700; cursor: pointer;
  text-decoration: none; transition: transform .08s ease, background .15s ease; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--red); border-color: var(--red); }
.btn.primary:active { background: var(--red-press); }
.btn.light { background: var(--white); color: var(--black); border-color: var(--white); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn[disabled] { opacity: .5; pointer-events: none; background: var(--s3); border-color: var(--line); color: var(--muted); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--gray); text-decoration: underline; cursor: pointer; font-size: 14px; }

/* inputs */
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; color: var(--gray); font-weight: 600; }
.input { width: 100%; min-height: 48px; padding: 0 14px; border-radius: var(--r-ctl); background: var(--s2); border: 1px solid var(--line); }
.input:focus { border-color: var(--gray); outline: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--gray); margin: 6px 0 16px; }
.check input { width: 20px; height: 20px; accent-color: var(--red); margin-top: 1px; flex: none; }
.seg { display: inline-flex; background: var(--s2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--gray); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--white); color: var(--black); }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button { flex: none; border: 1px solid var(--line); background: var(--s1); color: var(--gray); border-radius: 999px;
  padding: 8px 14px; font-size: 14px; font-weight: 600; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--white); color: var(--black); border-color: var(--white); }
.toggle { appearance: none; width: 46px; height: 28px; border-radius: 999px; background: var(--s3); position: relative; cursor: pointer; border: 1px solid var(--line); flex: none; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--gray); transition: left .15s; }
.toggle:checked { background: var(--red); border-color: var(--red); }
.toggle:checked::after { left: 21px; background: var(--white); }

/* ── HERO: net worth ───────────────────────────────── */
.nw-hero { position: relative; overflow: hidden; padding: 20px 18px 18px; border-radius: 18px; background: var(--s1); border: 1px solid var(--line); }
.nw-hero::before { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.nw-hero > * { position: relative; }
.nw-hero .lbl { font-size: 14px; color: var(--gray); font-weight: 600; }
.nw-hero .meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.nw-hero .meta div { display: grid; gap: 2px; }
.nw-hero .meta span { font-size: 12px; color: var(--muted); }
.spark { width: 100%; height: 56px; display: block; margin-top: 8px; }

/* ── PLAYER CARD (signature) ───────────────────────── */
.pcards { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .pcards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .pcards { grid-template-columns: 1fr 1fr 1fr; } }
.pcard { position: relative; overflow: hidden; display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 14px 12px 12px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-card);
  text-decoration: none; color: var(--white); min-height: 78px; }
.pcard::before { content: ''; position: absolute; left: -18px; top: 0; bottom: 0; width: 34px; background: var(--tc, var(--s3)); transform: skewX(-14deg); opacity: .9; }
.pcard .jn { position: absolute; right: 74px; top: -14px; font-size: 92px; font-weight: 900; font-variation-settings: 'wdth' 62;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.07); pointer-events: none; line-height: 1; }
.pcard .who { min-width: 0; }
.pcard .nm { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .sub { display: flex; gap: 6px; align-items: center; margin-top: 4px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.pcard .px { text-align: right; }
.pcard .px .chg { font-size: 13px; font-weight: 700; }
.pcard.owned { border-color: #5a5a5a; }
.pcard.soldout .px .n { color: var(--gray); }
.avatar { width: 54px; height: 54px; border-radius: 12px; background: var(--s3); position: relative; z-index: 1; overflow: hidden; flex: none; }
.avatar svg { width: 100%; height: 100%; display: block; }
.catb { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; font-size: 12px; font-weight: 800;
  background: var(--white); color: var(--black); font-variation-settings: 'wdth' 75; }
.supply { height: 4px; border-radius: 4px; background: var(--s3); overflow: hidden; margin-top: 6px; width: 72px; margin-left: auto; }
.supply i { display: block; height: 100%; background: var(--gray); }
.flash-up { animation: fu .9s ease; } .flash-down { animation: fd .9s ease; }
@keyframes fu { 0% { background: rgba(61,220,132,.22); } 100% { background: var(--s1); } }
@keyframes fd { 0% { background: rgba(255,128,149,.22); } 100% { background: var(--s1); } }

/* player detail hero */
.phero { position: relative; overflow: hidden; border-radius: 18px; padding: 18px; background: var(--s1); border: 1px solid var(--line); min-height: 220px; }
.phero .slash { position: absolute; inset: 0 auto 0 -60px; width: 52%; background: var(--tc); transform: skewX(-16deg); }
.phero .slash2 { position: absolute; inset: 0 auto 0 calc(52% - 70px); width: 12px; background: var(--tc2); transform: skewX(-16deg); }
.phero .big-j { position: absolute; right: 8px; bottom: -28px; font-size: 200px; font-weight: 900; font-variation-settings: 'wdth' 62; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.1); }
.phero .content { position: relative; display: grid; grid-template-columns: 108px 1fr; gap: 16px; align-items: end; }
.phero .avatar { width: 108px; height: 132px; border-radius: 14px; background: rgba(0,0,0,.35); }
.phero .pname { font-size: 30px; font-weight: 850; font-variation-settings: 'wdth' 70; line-height: 1; }
.quote { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); }
.quote > div { background: var(--s1); padding: 12px; display: grid; gap: 4px; }
.quote span { font-size: 12px; color: var(--muted); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions .btn { min-height: 56px; font-size: 18px; }
@media (max-width: 899px) { .actions.sticky { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 10px); z-index: 10; } }

table.box { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.box th { text-align: right; color: var(--muted); font-weight: 600; font-size: 12px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
table.box td { text-align: right; padding: 8px 4px; border-bottom: 1px solid var(--s3); }
table.box th:first-child, table.box td:first-child { text-align: left; }
.sig { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.sig i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.sig.well_above i, .sig.above i { background: var(--up); }
.sig.well_below i, .sig.below i { background: var(--down); }
.sig.well_above i, .sig.well_below i { box-shadow: 0 0 0 3px rgba(255,255,255,.12); }

/* games strip */
.games { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(168px, 1fr); gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.games::-webkit-scrollbar { display: none; }
.game { background: var(--s1); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; text-align: left; }
.game .tm { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.game .tm i { display: inline-block; width: 4px; height: 16px; border-radius: 2px; margin-right: 8px; vertical-align: -2px; }
.game .st { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; justify-content: space-between; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-right: 5px; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* ranking */
.rk { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; background: var(--s1);
  border: 1px solid var(--line); border-radius: 12px; }
.rk .pos { font-size: 22px; }
.rk.me { border-color: var(--white); }
.rk.first .pos { color: var(--gold); }
.rk .nm { font-weight: 700; display: flex; gap: 6px; align-items: center; min-width: 0; }
.rk .nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* sheets & dialogs */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; background: var(--s1); border: 1px solid var(--line); border-bottom: 0; border-radius: 20px 20px 0 0;
  padding: 10px 18px calc(22px + var(--safe-b)); max-height: 90dvh; overflow-y: auto; animation: rise .22s ease-out; }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--s3); margin: 0 auto 14px; }
@media (min-width: 700px) { .scrim { align-items: center; } .sheet { border-radius: 20px; border-bottom: 1px solid var(--line); } }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } }
.price-input { display: flex; align-items: center; gap: 8px; }
.price-input button { width: 48px; height: 48px; border-radius: 10px; border: 1px solid var(--line); background: var(--s3); font-size: 22px; cursor: pointer; flex: none; }
.price-input input { text-align: center; font-size: 28px; font-weight: 800; font-variation-settings: 'wdth' 62; }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); transform: translateX(-50%); z-index: 70;
  background: var(--white); color: var(--black); padding: 12px 18px; border-radius: 12px; font-weight: 700; max-width: calc(100vw - 32px);
  box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: rise .2s ease-out; }
.toast.err { background: var(--s3); color: var(--white); border: 1px solid var(--down); }
.banner { background: var(--s2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--gray); margin-bottom: 12px; display: flex; gap: 10px; align-items: center; }

/* onboarding */
.ob { position: fixed; inset: 0; z-index: 80; background: var(--black); display: grid; grid-template-rows: 1fr auto; padding: calc(var(--safe-t) + 24px) 24px calc(var(--safe-b) + 24px); }
.ob .stage { display: grid; align-content: start; gap: 18px; max-width: 520px; margin: 0 auto; width: 100%; padding-top: clamp(24px, 12vh, 120px); }
.ob .bars { margin-bottom: 14px; }
.ob .big { font-size: clamp(44px, 13vw, 76px); font-weight: 900; font-variation-settings: 'wdth' 62; font-style: italic; line-height: .92; }
.ob .big .money { display: block; font-size: 1.9em; line-height: .85; margin-bottom: 10px; font-style: normal; }
.ob .big .money::after { content: var(--cur); font-size: .25em; color: var(--red); }
.ob p { font-size: 18px; color: var(--gray); margin: 0; }
.ob .bars { display: flex; gap: 6px; }
.ob .bars i { height: 4px; flex: 1; border-radius: 4px; background: var(--s3); }
.ob .bars i.on { background: var(--red); }
.ob .foot { max-width: 520px; margin: 0 auto; width: 100%; display: grid; gap: 10px; }

/* auth */
.auth { min-height: 100dvh; display: grid; align-content: center; max-width: 420px; margin: 0 auto; padding: 24px 0; }
.auth .brand { margin: 0 0 18px; }
.auth .brand img { width: min(300px, 78vw); height: auto; display: block; }
.auth .tag { color: var(--gray); margin: 0 0 28px; font-size: 17px; }

/* badges */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.badge { background: var(--s1); border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px; text-align: center; cursor: pointer; }
.badge .e { font-size: 30px; line-height: 1; }
.badge .bn { font-size: 13px; font-weight: 700; margin-top: 6px; }
.badge .cnt { font-size: 12px; color: var(--gray); }
.badge.locked { opacity: .38; filter: grayscale(1); }

.legal h2 { margin-top: 22px; }
.legal p { color: var(--gray); max-width: 72ch; }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; }
.legal-links a { color: var(--gray); }

.skel { background: linear-gradient(90deg, var(--s1), var(--s2), var(--s1)); background-size: 200% 100%; animation: sk 1.2s infinite linear; border-radius: var(--r-card); }
@keyframes sk { to { background-position: -200% 0; } }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--s3); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--gray); }
textarea.input { min-height: 140px; padding: 10px 14px; font-family: ui-monospace, monospace; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* game modes on Home */
.modes { display: grid; gap: 10px; }
@media (min-width: 620px) { .modes { grid-template-columns: 1fr 1fr; } }
.mode { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; display: grid; gap: 10px; align-content: start; }
.mode.on { border-color: var(--gray); }
.mode p { margin: 0; color: var(--gray); font-size: 14px; }
.mlink { width: 100%; background: var(--s2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; text-align: left; font-weight: 600; }
.mlink.cur { border-color: var(--white); }

.ob .ob-logo { height: 30px; width: auto; justify-self: start; margin-bottom: 8px; }
.legal-home img { height: 34px; width: auto; display: block; }

/* ══════════ HOME v2 ══════════ */
.sec-h { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 0 12px; }
.sec-h h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.sec-h a { color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.sec-h a:hover { color: var(--white); }

/* ticker tape: the market is alive */
.tape { margin: -6px -16px 16px; border-block: 1px solid var(--line); background: #070707; overflow: hidden; height: 36px; display: flex; align-items: center;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.tape-run { display: flex; gap: 28px; white-space: nowrap; padding-left: 16px; animation: tape 45s linear infinite; }
.tape:hover .tape-run { animation-play-state: paused; }
.tk { display: inline-flex; gap: 8px; align-items: baseline; font-size: 13px; text-decoration: none; color: var(--gray); }
.tk b { color: var(--white); font-weight: 800; font-variation-settings: 'wdth' 75; letter-spacing: .02em; }
.tk .n { font-size: 14px; color: var(--white); }
.tk .chg { font-weight: 700; font-size: 12px; }
@keyframes tape { to { transform: translateX(-50%); } }
@media (min-width: 900px) { .tape { margin: -6px 0 18px; border: 1px solid var(--line); border-radius: 10px; } }
@media (prefers-reduced-motion: reduce) { .tape { overflow-x: auto; } .tape-run { animation: none; } }

/* scoreboard */
.board { position: relative; overflow: hidden; border-radius: 20px; padding: 20px 20px 16px; border: 1px solid var(--line);
  background: radial-gradient(120% 90% at 100% 0%, #1b1b1b 0%, #0c0c0c 55%, #090909 100%); }
.board::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: repeating-linear-gradient(90deg, transparent 0 59px, rgba(255,255,255,.025) 59px 60px); }
.board > * { position: relative; z-index: 1; }
.board-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.board .lbl { font-size: 13px; color: var(--muted); font-weight: 600; }
.board .nw { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
.board .nw .n { font-size: clamp(54px, 15vw, 78px); line-height: .88; }
.board .nw .u { font-size: 18px; color: var(--muted); font-weight: 700; }
.board .delta { margin-top: 8px; font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.board .delta .chg { font-size: 15px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.06); }
.board .delta.up .chg { background: rgba(61,220,132,.12); } .board .delta.down .chg { background: rgba(255,128,149,.12); }
.jersey { display: grid; justify-items: end; min-width: 84px; }
.jersey .jn { font-size: 68px; line-height: .85; font-weight: 900; font-variation-settings: 'wdth' 62; color: transparent; -webkit-text-stroke: 2px var(--white); }
.jersey .jn::before { content: '#'; font-size: .42em; -webkit-text-stroke: 0; color: var(--red); vertical-align: top; margin-right: 2px; }
.jersey.off .jn::before { content: ''; }
.jersey .jl { font-size: 12px; color: var(--muted); margin-top: 6px; }
.jersey .jm { font-size: 12px; font-weight: 800; margin-top: 2px; }
.spark-area { display: block; width: calc(100% + 40px); margin: 12px -20px 0; height: 72px; }
.spark-area.up { color: var(--up); } .spark-area.down { color: var(--down); }
.spark-empty { height: 1px; background: var(--line); margin: 16px 0 0; }
.board-meta { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin-top: 0; padding-top: 12px; }
.board-meta div { display: grid; gap: 2px; padding-inline: 2px; }
.board-meta div + div { border-left: 1px solid var(--line); padding-left: 14px; }
.board-meta span { font-size: 12px; color: var(--muted); }
.board-meta b { font-size: 22px; line-height: 1; }
.board-meta small { font-size: 13px; color: var(--muted); font-weight: 700; }
.chase { margin-top: 14px; display: grid; gap: 6px; font-size: 13px; color: var(--gray); }
.chase i { display: block; height: 4px; border-radius: 4px; background: var(--s3); position: relative; overflow: hidden; }
.chase i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--white); border-radius: 4px; }
.chase.lead { color: var(--gold); font-weight: 700; }

/* next move */
.next { margin-top: 12px; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 14px 14px 16px;
  border-radius: 16px; background: var(--s1); border: 1px solid var(--line); }
.next.urgent { background: linear-gradient(90deg, rgba(228,0,43,.16), rgba(228,0,43,.03) 70%); border-color: rgba(228,0,43,.45); }
.next-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--s3); display: grid; place-items: center; font-size: 18px; }
.next.urgent .next-ic { background: rgba(0,0,0,.35); }
.next-tx { display: grid; gap: 3px; min-width: 0; }
.next-tx b { font-size: 15px; line-height: 1.25; }
.next-tx span { font-size: 13px; color: var(--gray); }
.pips { display: grid; grid-template-columns: repeat(5, 5px); gap: 2px; align-items: end; height: 22px; }
.pips i { display: block; width: 5px; height: 100%; border-radius: 2px; background: rgba(255,255,255,.18); }
.pips i.on { background: var(--white); }
.live-dot.big { width: 12px; height: 12px; margin: 0; }
@media (max-width: 420px) { .next { grid-template-columns: auto 1fr; } .next .btn { grid-column: 1 / -1; } }

/* where you play */
.modes2 { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 14px -16px 0; padding: 2px 16px; }
.modes2::-webkit-scrollbar { display: none; }
.mtile { flex: none; display: flex; gap: 10px; align-items: center; padding: 10px 14px 10px 10px; border-radius: 14px; background: var(--s1);
  border: 1px solid var(--line); cursor: pointer; text-align: left; color: var(--white); max-width: 220px; }
.mtile b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.mtile small { display: block; font-size: 12px; color: var(--muted); }
.mt-ic { width: 32px; height: 32px; border-radius: 10px; background: var(--s3); display: grid; place-items: center; flex: none; font-size: 18px; color: var(--gray); }
.mt-ic svg { width: 18px; height: 18px; }
.mtile.on { border-color: var(--white); background: var(--s2); }
.mtile.on .mt-ic { background: var(--white); color: var(--black); }
.mtile.add { border-style: dashed; }
@media (min-width: 900px) { .modes2 { margin-inline: 0; padding-inline: 0; } }

/* your players today */
.mine { display: grid; grid-auto-flow: column; grid-auto-columns: 138px; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; }
.mine::-webkit-scrollbar { display: none; }
.mcard { position: relative; display: grid; gap: 4px; padding: 14px 12px 12px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line);
  text-decoration: none; color: var(--white); overflow: hidden; }
.mcard::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--tc); }
.mc-top { display: flex; gap: 6px; align-items: center; }
.mc-nm { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-px { font-size: 26px; line-height: 1; margin-top: 2px; }
.mcard .chg { font-size: 13px; font-weight: 800; }
.mc-u { font-size: 11px; color: var(--muted); }
.mc-sig { position: absolute; top: 12px; right: 12px; width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.mc-sig.well_above, .mc-sig.above { background: var(--up); } .mc-sig.well_below, .mc-sig.below { background: var(--down); }
@media (min-width: 900px) { .mine { margin: 0; padding: 0 0 4px; } }

/* games: highlight the ones with your players */
.game.mine { border-color: #6b6b6b; position: relative; }
.game.mine::after { content: ''; position: absolute; top: 10px; right: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }

/* market leaderboard */
.mb-tabs { margin-bottom: 10px; }
.board-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--s1); overflow: hidden; }
.board-list li + li { border-top: 1px solid var(--s3); }
.board-list a { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 11px 14px; text-decoration: none; color: var(--white); position: relative; }
.board-list a::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--tc); }
.bl-rank { font-weight: 900; font-variation-settings: 'wdth' 62; font-size: 20px; color: var(--muted); text-align: center; }
.board-list li:first-child .bl-rank { color: var(--white); }
.bl-nm { min-width: 0; display: grid; }
.bl-nm b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.bl-nm small, .bl-px small { font-size: 12px; color: var(--muted); }
.bl-px { display: grid; justify-items: end; gap: 1px; }
.bl-px .n { font-size: 19px; }
.bl-px .chg { font-size: 13px; font-weight: 800; }
.bl-empty { padding: 18px; color: var(--gray); text-align: center; }
.mkt-foot { margin: 10px 2px 0; }

/* news timeline */
.feed { list-style: none; margin: 0; padding: 0 0 0 6px; position: relative; }
.feed::before { content: ''; position: absolute; left: 10px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.feed a { display: grid; grid-template-columns: 10px 1fr auto; gap: 14px; padding: 10px 0; text-decoration: none; color: var(--gray); font-size: 14px; line-height: 1.4; }
.feed i { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: var(--muted); position: relative; z-index: 1; box-shadow: 0 0 0 4px var(--black); }
.feed .above i, .feed .well_above i { background: var(--up); } .feed .below i, .feed .well_below i { background: var(--down); }
.feed b { color: var(--white); } .feed small { color: var(--muted); }
.feed time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.home-split { gap: 6px 28px; }
@media (min-width: 900px) { .home-split .sec-h { margin-top: 30px; } }

.jersey.off .jn { -webkit-text-stroke: 2px var(--muted); }
.home-top { display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); }
.home-top > * { min-width: 0; }
@media (min-width: 900px) {
  .home-top { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
  .home-side { display: grid; gap: 12px; align-content: start; }
  .home-side .next { margin-top: 0; grid-template-columns: auto 1fr; }
  .home-side .next .btn { grid-column: 1 / -1; }
  .home-side .modes2 { margin: 0; padding: 0; flex-wrap: wrap; overflow: visible; }
}

/* ══════════════════════════════════════════════════════════════
   THEME — ESPN-style: soft light page + white cards for content zones,
   black reserved for brand zones (header, ticker, scoreboard, intro, sign-in).
   Variables keep their roles: --black = background, --white = ink.
   ══════════════════════════════════════════════════════════════ */
:root {
  --black: #eceef1;     /* page: light gray */
  --s1: #ffffff;        /* card */
  --s2: #f5f6f8;        /* inset surface */
  --s3: #e7e9ed;        /* control */
  --line: #dde0e5;
  --white: #14171a;     /* ink */
  --gray: #4a5058;      /* secondary text */
  --muted: #7b828c;
  --up: #08884a; --down: #d0102e; --gold: #a37600;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 2px 8px rgba(16,24,40,.06);
  color-scheme: light;
}
html.dark, .topbar, .tape, .ob, .phero {
  --black: #000; --s1: #101010; --s2: #181818; --s3: #232323; --line: #2c2c2c;
  --white: #fff; --gray: #d4d4d4; --muted: #8f8f8f; --up: #3ddc84; --down: #ff8095; --gold: #f2c14e;
  --shadow: none; color: var(--white); color-scheme: dark;
}
html { background: var(--black); }

/* brand header: full-bleed black band */
.topbar { background: var(--black); box-shadow: 0 0 0 100vmax var(--black); clip-path: inset(0 -100vmax);
  margin-top: calc(-1 * (var(--safe-t) + 8px)); padding-top: calc(var(--safe-t) + 12px); padding-bottom: 12px; }
.tape { margin: 0 0 18px; border: 0; border-radius: 0; background: var(--black); box-shadow: 0 0 0 100vmax var(--black);
  clip-path: inset(0 -100vmax); mask-image: none; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .tape { margin: 0 0 22px; border-radius: 0; border: 0; border-top: 1px solid var(--line); } }

/* bottom / side navigation: white bar */
nav.tabs { background: rgba(255,255,255,.96); border-color: var(--line); box-shadow: 0 -1px 8px rgba(16,24,40,.05); }
nav.tabs a[aria-current="page"] { color: var(--white); }

/* soft depth for content cards */
.panel, .pcard, .rk, .badge, .next, .mtile, .quote, .game, .board-list, .sheet, .mode { box-shadow: var(--shadow); }
.btn.primary, .chip.red { color: #fff; }
.toggle:checked::after { background: #fff; }
.pcard .jn { -webkit-text-stroke: 1px rgba(20,23,26,.07); }
.pcard.owned { border-color: #9aa1ab; }
.feed i { box-shadow: 0 0 0 4px var(--s1); }
.pips i { background: rgba(20,23,26,.15); }
.next.urgent { background: linear-gradient(90deg, #fff1f3, #ffffff 75%); border-color: #f3b3bf; }
.next.urgent .next-ic { background: #fde3e8; }
.game.mine { border-color: #9aa1ab; }

/* content zones: each section is its own white card with a header row */
.zone { background: var(--s1); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 0 16px 16px; margin-top: 16px; }
.zone > .sec-h { margin: 0 -16px 14px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.zone > .sec-h h2 { font-size: 17px; }
.zone > .sec-h h2::before { content: ''; width: 4px; height: 16px; border-radius: 2px; background: var(--red); margin-right: 2px; }
.zone .mine, .zone .games { margin: 0 -16px; padding: 0 16px 2px; }
.zone .mcard { background: var(--s2); border-color: transparent; box-shadow: none; }
.zone .game { background: var(--s2); border-color: transparent; box-shadow: none; }
.zone .game.mine { border-color: #9aa1ab; background: var(--s1); }
.zone .board-list { margin: 0 -16px -16px; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; box-shadow: none; background: transparent; }
.zone .mb-tabs { margin-bottom: 12px; }
.zone .mkt-foot { margin: 0; padding: 12px 0 0; }
.zone .feed { margin-top: -4px; }
.zone .empty { background: var(--s2); border: 0; }
.home-split { gap: 0 16px; }
.home-split .zone { margin-top: 16px; }
@media (min-width: 900px) { .home-split .zone { height: calc(100% - 16px); } .zone .mine, .zone .games { margin: 0 -16px; padding: 0 16px 2px; } }
.modes2 .mtile { background: var(--s1); }
.modes2 .mtile.on { background: var(--white); color: var(--black); border-color: var(--white); }
.modes2 .mtile.on small { color: rgba(236,238,241,.75); }
.modes2 .mtile.on .mt-ic { background: var(--red); color: #fff; }
.modes2 .mtile.add { background: transparent; box-shadow: none; border-color: #b9bec6; }

/* ══════════════════════════════════════════════════════════════
   POLISH v3 — one coherent visual system
   Depth: page (gray) → card (white, soft shadow) → inset (gray) → control.
   Type: condensed 900 for numbers & titles, 700 for labels, 500 for reading.
   ══════════════════════════════════════════════════════════════ */
:root {
  --shadow: 0 1px 1px rgba(16,24,40,.04), 0 2px 6px rgba(16,24,40,.06);
  --shadow-up: 0 2px 4px rgba(16,24,40,.06), 0 10px 24px rgba(16,24,40,.10);
  --ring: 0 0 0 3px rgba(228,0,43,.22);
  --r-card: 16px;
  --ease: cubic-bezier(.2,.7,.2,1);
}
body { letter-spacing: -.005em; }
::selection { background: rgba(228,0,43,.22); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* titles */
h1 { font-size: 30px; font-weight: 900; font-style: italic; font-variation-settings: 'wdth' 62; letter-spacing: .005em; line-height: 1; }
h2 { font-weight: 800; letter-spacing: -.01em; }
#main > h1:first-child { margin: 6px 0 4px; }

/* cards: lift on hover (pointer devices only) */
@media (hover: hover) {
  a.pcard, .rk, .mcard, .game, .mtile, .board-list a, .badge { transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s; }
  a.pcard:hover, .mcard:hover, .game:hover, .mtile:hover, .badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-up); }
  .board-list a:hover { background: var(--s2); }
}

/* buttons */
.btn { border-radius: 12px; font-weight: 800; letter-spacing: .01em; box-shadow: 0 1px 0 rgba(16,24,40,.04); background: var(--s1); border-color: var(--line); }
.btn.primary { background: linear-gradient(180deg, #ef1239, #d6002a); border-color: #c90027; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 14px rgba(228,0,43,.28); }
.btn.primary:hover { filter: brightness(1.04); }
.btn.light { background: var(--white); color: var(--black); border-color: var(--white); box-shadow: 0 6px 14px rgba(20,23,26,.18); }
.btn[disabled] { background: transparent; border: 1.5px dashed var(--line); color: var(--muted); box-shadow: none; opacity: 1; }
.btn.ghost { background: transparent; box-shadow: none; }
html.dark .btn:not(.primary):not(.light) { background: var(--s2); }

/* inputs */
.input { background: var(--s1); border: 1.5px solid var(--line); border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--red); box-shadow: var(--ring); }
html.dark .input { background: var(--s2); }
.field label { font-weight: 700; color: var(--white); font-size: 13px; }

/* segmented controls & filters */
.seg { background: var(--s3); border: 0; padding: 4px; box-shadow: inset 0 1px 2px rgba(16,24,40,.06); }
.seg button { font-weight: 700; color: var(--gray); transition: background .15s, color .15s; }
.seg button[aria-pressed="true"] { background: var(--s1); color: var(--white); box-shadow: 0 1px 3px rgba(16,24,40,.14); }
html.dark .seg button[aria-pressed="true"] { background: var(--white); color: var(--black); }
.filters button { font-weight: 700; background: var(--s1); box-shadow: var(--shadow); border-color: transparent; }
.filters button[aria-pressed="true"] { background: var(--red); color: #fff; border-color: var(--red); box-shadow: 0 4px 10px rgba(228,0,43,.25); }

/* chips */
.chip { font-weight: 700; }
.chip.own { background: var(--white); color: var(--black); }
.chip.sim, .sim-tag { border: 1px dashed var(--muted); color: var(--muted); background: transparent; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; letter-spacing: .02em; }

/* price change pills */
.px .chg, .bl-px .chg, .mcard .chg, .board .delta .chg, .tk .chg { display: inline-flex; align-items: center; gap: 1px; }
.px .chg, .bl-px .chg, .mcard .chg { padding: 2px 7px; border-radius: 6px; font-weight: 800; font-size: 12px; font-variant-numeric: tabular-nums; }
.px .chg.up, .bl-px .chg.up, .mcard .chg.up { background: #e3f6ec; }
.px .chg.down, .bl-px .chg.down, .mcard .chg.down { background: #fde7ea; }
.px .chg.flat, .bl-px .chg.flat, .mcard .chg.flat { background: var(--s3); }

/* rarity badges — categories feel like collectible tiers */
.catb { width: 22px; height: 20px; border-radius: 6px; font-size: 12px; font-weight: 900; font-style: italic; letter-spacing: 0; }
.catb.t-A { background: linear-gradient(135deg, #1b1b1b, #3a3a3a); color: #f5c451; box-shadow: inset 0 0 0 1px #f5c451; }
.catb.t-B { background: linear-gradient(135deg, #e4002b, #ff3b5c); color: #fff; }
.catb.t-C { background: #2e3440; color: #fff; }
.catb.t-D { background: #8a929d; color: #fff; }
.catb.t-E { background: #d9dde2; color: #3b4048; }

/* ── header & ticker ── */
.topbar { box-shadow: 0 0 0 100vmax var(--black); }
.topbar::after { content: ''; position: absolute; left: -100vmax; right: -100vmax; bottom: 0; height: 2px; background: var(--red); display: none; }
.mkt-pill { background: #1a1a1a; border-color: #2e2e2e; font-weight: 700; gap: 8px; padding: 7px 12px 7px 10px; }
.mkt-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px rgba(61,220,132,.18); flex: none; }
.icon-btn { background: #1a1a1a; border-color: #2e2e2e; }
.tape { height: 38px; gap: 0; padding: 0; border-top: 1px solid #1f1f1f; border-bottom: 3px solid var(--red); }
.tape-tag { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 100%; padding: 0 12px 0 0; margin-right: 12px; font-size: 11px; font-weight: 900;
  letter-spacing: .08em; text-transform: uppercase; color: #fff; border-right: 1px solid #2a2a2a; }
.tape-tag .live-dot { margin: 0; }
.tape-view { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.tape-run { padding-left: 0; gap: 0; }
.tk { padding: 0 16px; border-right: 1px solid #222; }
.tk .chg { font-size: 12px; }

/* ── bottom / side nav ── */
nav.tabs a { position: relative; font-weight: 700; transition: color .15s; }
nav.tabs a[aria-current="page"]::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--red); }
nav.tabs a[aria-current="page"] svg { color: var(--red); }
@media (min-width: 900px) { nav.tabs a[aria-current="page"]::before { top: 20%; bottom: 20%; left: 0; right: auto; width: 3px; height: auto; border-radius: 0 3px 3px 0; } }

/* ── scoreboard & portfolio hero (dark feature cards) ── */
.board, .nw-hero { border: 0; box-shadow: 0 10px 30px rgba(16,24,40,.22); }
.board::before, .nw-hero::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--red), #ff4766 60%, transparent); z-index: 2; border-radius: 20px 20px 0 0; }
.nw-hero { border-radius: 20px; }
.board .nw .n { letter-spacing: -.02em; }
.jersey .jn { -webkit-text-stroke: 2.5px var(--white); }

/* ── next move ── */
.next { border: 0; box-shadow: var(--shadow); }
.next-ic { background: var(--s2); color: var(--white); font-weight: 900; }
.next-tx b { font-size: 16px; font-weight: 800; }
.next.urgent { box-shadow: inset 4px 0 0 var(--red), var(--shadow); border: 0; }

/* ── zones ── */
.zone { border: 0; box-shadow: var(--shadow); border-radius: 18px; }
.zone > .sec-h { background: linear-gradient(180deg, #fafbfc, #fff); border-radius: 18px 18px 0 0; }
.zone > .sec-h h2 { font-size: 18px; font-weight: 900; font-style: italic; font-variation-settings: 'wdth' 70; letter-spacing: .01em; }
.zone > .sec-h a { font-weight: 800; color: var(--red); font-size: 13px; }
.zone > .sec-h a::after { content: ' ›'; }
.sec-h h2 .live-dot { margin-left: 2px; }

/* where you play */
.mtile { border: 0; box-shadow: var(--shadow); border-radius: 14px; }
.mtile b { font-weight: 800; }
.modes2 .mtile.on { box-shadow: 0 6px 16px rgba(20,23,26,.25); }
.modes2 .mtile.add { box-shadow: none; border: 1.5px dashed #b9bec6; }

/* your players: mini trading cards */
.mcard { border-radius: 14px; padding: 16px 12px 12px; }
.zone .mcard { background: linear-gradient(180deg, var(--s1), var(--s2)); border: 1px solid var(--line); }
.mcard::before { height: 4px; }
.mc-nm { font-size: 16px; font-weight: 900; font-style: italic; font-variation-settings: 'wdth' 70; letter-spacing: .01em; }
.mc-px { font-size: 30px; }
.mc-u { font-weight: 600; }

/* games: ESPN scoreboard tiles */
.game { border-radius: 14px; padding: 10px 12px 12px; display: grid; gap: 4px; }
.game .st { margin: 0 0 4px; font-weight: 800; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; align-items: center; }
.game.is-live .st { color: var(--red); }
.game .tm { font-size: 15px; }
.game .tm .n { font-size: 20px; }
.game .tm.trail { color: var(--muted); font-weight: 600; }
.game .tm.trail .n { color: var(--muted); }

.game .tm i { height: 14px; width: 4px; }
.zone .game { background: var(--s1); border: 1px solid var(--line); }
.zone .game.is-live { border-color: rgba(228,0,43,.35); box-shadow: inset 0 3px 0 var(--red); }

/* market leaderboard rows */
.board-list a { padding: 12px 16px; }
.bl-rank { font-size: 22px; font-style: italic; }
.board-list li:nth-child(1) .bl-rank { color: var(--red); }
.bl-nm b { font-weight: 800; }
.bl-px .n { font-size: 20px; }

/* news timeline */
.feed a { padding: 12px 0; }
.feed b { font-weight: 800; }
.feed li + li a { border-top: 1px dashed var(--line); }
.feed .well_above i, .feed .well_below i { width: 12px; height: 12px; margin-left: -1px; }

/* ── market list cards ── */
.pcard { border: 0; box-shadow: var(--shadow); border-radius: 16px; grid-template-columns: 52px 1fr auto; padding: 12px 14px 12px 16px; min-height: 80px; }
.pcard::before { left: 0; width: 4px; transform: none; opacity: 1; border-radius: 16px 0 0 16px; }
.pcard .avatar { width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 0 0 2px var(--s1), 0 0 0 3px var(--line); }
.pcard .nm { font-weight: 800; font-size: 16px; }
.pcard .sub { color: var(--muted); font-weight: 600; }
.pcard .px .n { font-size: 26px; }
.pcard .px > div:nth-child(2) { margin-top: 2px; }
.pcard.owned { box-shadow: inset 0 0 0 2px var(--white), var(--shadow); }
.pcard.soldout { background: linear-gradient(90deg, var(--s1) 60%, #fff5f6); }
.supply-wrap { display: flex; align-items: center; gap: 6px; justify-content: flex-end; margin-top: 6px; font-size: 10px; font-weight: 800; color: var(--muted); }
.supply-wrap .supply { margin: 0; width: 48px; }
.supply i { background: var(--white); border-radius: 4px; }
.soldtag { display: inline-block; margin-top: 6px; font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.pcard .jn { right: 86px; }

/* ── player detail ── */
.phero { border: 0; box-shadow: 0 10px 30px rgba(16,24,40,.22); }
.phero .avatar { border-radius: 50%; width: 112px; height: 112px; box-shadow: 0 0 0 4px rgba(255,255,255,.12); }
.phero .content { align-items: center; }
.quote { border: 0; box-shadow: var(--shadow); gap: 0; background: var(--s1); }
.quote > div + div { border-left: 1px solid var(--line); }
.quote span { font-weight: 700; }
.actions .btn { border-radius: 14px; }

/* ── portfolio, ranking, profile ── */
.rk { border: 0; box-shadow: var(--shadow); border-radius: 14px; padding: 12px 16px; }
.rk .pos { font-style: italic; font-size: 24px; }
.rk.me { box-shadow: inset 4px 0 0 var(--red), var(--shadow); background: linear-gradient(90deg, #fff4f6, var(--s1) 55%); }
.rk.podium .pos { -webkit-text-stroke: 0; }
.rk.p1 .pos { color: #c9971c; } .rk.p2 .pos { color: #8f98a3; } .rk.p3 .pos { color: #b26a3a; }
.rk.podium .pos::after { content: ''; display: block; width: 18px; height: 3px; border-radius: 2px; margin-top: 3px; background: currentColor; }
.badge { border: 0; box-shadow: var(--shadow); border-radius: 14px; padding: 14px 8px; }
.badge.locked { opacity: 1; filter: none; background: var(--s2); box-shadow: none; border: 1.5px dashed var(--line); }
.badge.locked .e { filter: grayscale(1); opacity: .35; }
.badge.locked .bn { color: var(--muted); }
.panel { border: 0; box-shadow: var(--shadow); border-radius: 16px; }
.empty { border: 1.5px dashed var(--line); background: transparent; color: var(--gray); }
.note { background: var(--s1); box-shadow: var(--shadow); border-left-width: 4px; border-radius: 12px; }
.kv { border-bottom-color: var(--line); }
.sheet { border: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(16,24,40,.2); }
@media (min-width: 700px) { .sheet { border-radius: 22px; } }
.sheet h3 { font-size: 19px; font-weight: 900; font-style: italic; font-variation-settings: 'wdth' 70; }
.toast { border-radius: 14px; box-shadow: 0 12px 32px rgba(16,24,40,.3); font-weight: 800; }
.skel { background: linear-gradient(90deg, #e3e6ea, #f1f3f5, #e3e6ea); background-size: 200% 100%; }
html.dark .skel { background: linear-gradient(90deg, #111, #1b1b1b, #111); background-size: 200% 100%; }
table.box td a { color: var(--white); text-decoration: none; font-weight: 700; }
table.box td a:hover { color: var(--red); }
table.box tbody tr:nth-child(even) td { background: var(--s2); }
table.box td:first-child { padding-left: 8px; border-radius: 6px 0 0 6px; }
table.box td:last-child { border-radius: 0 6px 6px 0; }
table.box td { border-bottom: 0; }

/* ── Scoreboard v4: light premium card (no black slab) ── */
:root { --cur: ' BKT'; }
.board, .nw-hero { background:
    radial-gradient(90% 120% at 100% 0%, rgba(228,0,43,.07), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
  box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 12px 32px rgba(16,24,40,.10); border: 0; }
.board::after { background: repeating-linear-gradient(90deg, transparent 0 59px, rgba(20,23,26,.035) 59px 60px); }
.board::before, .nw-hero::before { height: 4px; background: linear-gradient(90deg, var(--red) 0%, #ff4766 45%, rgba(255,71,102,0) 100%); }
.board .lbl, .nw-hero .lbl { color: var(--gray); font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.board .nw .u { color: var(--muted); font-size: 16px; font-weight: 800; letter-spacing: .04em; }
.board .delta .chg { background: var(--s3); }
.board .delta.up .chg { background: #e3f6ec; } .board .delta.down .chg { background: #fde7ea; }
.board-meta { border-top-color: var(--line); }
.board-meta div + div { border-left-color: var(--line); }
.board-meta b { color: var(--white); }
.jersey .jn::before { color: var(--red); }
.chase { color: var(--gray); font-weight: 600; }
.chase i { background: var(--s3); }
.chase i::after { background: linear-gradient(90deg, var(--white), #3a3f46); }
.chase.lead { color: #a37600; }
.spark-area { margin-top: 14px; }
.nw-hero .meta { border-top-color: var(--line); }
.pcard.owned { box-shadow: var(--shadow); }
#mlist .pcard.owned { box-shadow: inset 0 0 0 1.5px #c9ced5, var(--shadow); }

/* ══════════════ ADMIN v2 (español, sin JSON) ══════════════ */
.adm-sub { margin: -6px 0 14px; color: var(--muted); font-size: 14px; }
.adm-tabs { display: flex; width: 100%; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; background: var(--s1); box-shadow: var(--shadow); }
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tabs button { flex: 1 0 auto; white-space: nowrap; font-size: 13.5px; padding: 8px 12px; }
.adm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.adm-stat { background: var(--s1); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 11px 10px; display: grid; gap: 2px; min-width: 0; }
.adm-stat b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.adm-stat span { font-size: 11.5px; color: var(--gray); line-height: 1.25; }
.adm-stat.live { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }
.adm-stat.live b { color: var(--red); }
.adm-stat.warn { background: #fff7e6; border-color: #f3d48a; }
.adm-stat.warn b { color: #9a6400; }
.adm-table { display: grid; }
.adm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.adm-row:first-child { border-top: 0; padding-top: 2px; }
.adm-row > div:first-child { display: grid; gap: 2px; min-width: 0; }
.adm-row small { color: var(--muted); font-size: 12px; }
.adm-row .n { font-variant-numeric: tabular-nums; }
.adm-nums { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; font-size: 12px; color: var(--gray); text-align: right; }
.adm-nums b { color: var(--white); font-size: 14px; }
.adm-actions { display: grid; gap: 10px; margin-top: 14px; }
.adm-act { text-align: left; display: grid; gap: 3px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--s1);
  box-shadow: var(--shadow); cursor: pointer; transition: transform .12s, border-color .12s; }
.adm-act b { font-size: 15.5px; }
.adm-act span { font-size: 13px; color: var(--gray); }
.adm-act:hover { border-color: var(--muted); }
.adm-act:active { transform: scale(.985); }
.adm-act:disabled { opacity: .55; cursor: progress; }
.adm-act.primary { background: var(--red); border-color: var(--red); color: #fff; }
.adm-act.primary span { color: rgba(255,255,255,.85); }
.adm-field { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.zone > .sec-h + .adm-field, .zone > p + .adm-field { border-top: 0; padding-top: 2px; }
.adm-field.dirty { background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 10%, transparent), transparent); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.adm-field.frozen { opacity: .72; }
.adm-fl { display: grid; gap: 3px; }
.adm-fl b { font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adm-fl span { font-size: 13px; color: var(--gray); line-height: 1.4; }
.adm-fl .chip { background: var(--s3); color: var(--gray); font-size: 11px; padding: 2px 8px; }
.adm-fi { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.adm-fi > .adm-sub-grid { flex: 1 1 100%; }
.adm-num { max-width: 160px; font-variant-numeric: tabular-nums; }
.adm-save { margin-left: auto; }
.adm-switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--gray); cursor: pointer; }
.adm-sub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.adm-sub-grid label { display: grid; gap: 4px; min-width: 0; }
.adm-sub-grid label > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.adm-sub-grid .input { width: 100%; font-variant-numeric: tabular-nums; }
.adm-scroll { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.adm-stats { min-width: 560px; }
.adm-stats td:first-child { white-space: nowrap; font-size: 13px; }
.adm-cell { width: 48px; padding: 6px 4px; text-align: center; font-size: 14px; min-height: 0; }
.adm-cell::-webkit-inner-spin-button { display: none; }
@media (min-width: 900px) {
  .adm-grid { grid-template-columns: repeat(5, 1fr); }
  .adm-tabs { max-width: 640px; }
  .adm-field { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; gap: 24px; }
  .adm-actions { grid-template-columns: repeat(2, 1fr); }
  .adm-sub-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.adm-save[hidden] { display: none !important; }
.adm-sub-grid .input[type=date] { min-width: 0; max-width: 100%; }
.adm-sub-grid select.input { text-overflow: ellipsis; }

/* ══════════════ HEADER v5: header blanco · navegación negra ══════════════ */
.topbar, .tape {
  --black: #eceef1; --s1: #ffffff; --s2: #f5f6f8; --s3: #e7e9ed; --line: #dde0e5;
  --white: #14171a; --gray: #4a5058; --muted: #7b828c; --up: #08884a; --down: #d0102e; --gold: #a37600;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 2px 8px rgba(16,24,40,.06); color: var(--white); color-scheme: light;
}
.topbar { background: #fff; box-shadow: 0 0 0 100vmax #fff; clip-path: inset(0 -100vmax); }
.mkt-pill { background: var(--s2); border-color: var(--line); color: var(--white); }
.mkt-pill::before { box-shadow: 0 0 0 3px rgba(8,136,74,.16); }
.icon-btn { background: var(--s2); border-color: var(--line); color: var(--white); }
.topbar .dot { border-color: #fff; }
.tape { background: #fff; box-shadow: 0 0 0 100vmax #fff; border-top: 1px solid var(--line); border-bottom: 3px solid var(--red); }
.tape-tag { color: var(--red); border-right-color: var(--line); }
.tk { border-right-color: var(--line); }
.tk b { color: var(--white); }
.tape-view { mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
@media (min-width: 900px) { .tape { border-top: 1px solid var(--line); } }

nav.tabs {
  --white: #fff; --gray: #d4d4d4; --muted: #9a9a9a; --line: #262626;
  background: #000; border-color: #000; box-shadow: none; color-scheme: dark;
}
nav.tabs a { color: var(--muted); }
nav.tabs a:hover { color: #fff; }
nav.tabs a[aria-current="page"] { color: #fff; }
@media (min-width: 900px) {
  nav.tabs { box-shadow: 2px 0 12px rgba(0,0,0,.12); }
  nav.tabs a[aria-current="page"] { background: linear-gradient(90deg, rgba(228,0,43,.16), transparent 80%); }
}
/* marca en la barra negra (escritorio) */
@media (min-width: 900px) {
  nav.tabs::before { content: ''; position: absolute; top: 22px; left: 50%; width: 40px; height: 40px; transform: translateX(-50%);
    background: url(/brand/hoopx-mark.svg) center / contain no-repeat; }
}
/* Buckets: botón de ayuda junto a BKT + hoja explicativa */
.bkt-i { background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; font: inherit; }
.bkt-i i { font-style: normal; width: 17px; height: 17px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 900;
  background: var(--s3); color: var(--gray); letter-spacing: 0; transition: background .15s, color .15s; }
.bkt-i:hover i, .bkt-i:focus-visible i { background: var(--up); color: #fff; }
.bkt-sheet { text-align: center; }
.bkt-sheet p { color: var(--gray); text-align: left; }
.bkt-sheet .note { margin-top: 12px; }
.bkt-coin { width: 64px; height: 64px; margin: 4px auto 10px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 15px; letter-spacing: .04em;
  color: #fff; background: radial-gradient(circle at 35% 30%, #3ddc84, #08884a 70%); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 0 6px 16px rgba(8,136,74,.3); }
.bkt-sheet h3 { margin: 0; }
.bkt-say { margin: 4px 0 14px; color: var(--muted) !important; text-align: center !important; font-size: 14px; font-weight: 700; }
/* Legal y ayuda (formato SuperOvni Studios) */
.legal-meta { font-size: 13px !important; color: var(--muted) !important; margin: 4px 0 6px; }
.legal h1 { margin-top: 10px; }
.legal p a { color: inherit; font-weight: 700; }
.legal-cards { display: grid; gap: 8px; }
.legal-cards a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 12px; text-decoration: none;
  background: var(--s1); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--white); transition: border-color .15s, transform .12s; }
.legal-cards a:hover { border-color: var(--muted); }
.legal-cards a:active { transform: scale(.99); }
.legal-cards a span { color: var(--muted); font-size: 20px; line-height: 1; }
.legal-contact { margin-top: 22px; }
@media (min-width: 700px) { .legal-cards { grid-template-columns: 1fr 1fr; } }
.studio-foot { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.studio-foot p { margin: 0; }
.studio-foot a { color: var(--gray); }
.studio-foot b { color: var(--white); }
/* Desarrollado por SuperOvni Studios */
.studio-by { display: flex; align-items: center; gap: 10px; }
.studio-by span { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.studio-by img { height: 40px; width: auto; display: block; }
.so-dark { display: none !important; }
html.dark .so-light { display: none !important; }
html.dark .so-dark { display: block !important; }
/* Logos de equipo (identidades originales) */
.tlogo { display: inline-block; flex: none; vertical-align: middle; }
.game .tm > span { display: inline-flex; align-items: center; gap: 7px; }
.game .tm .tlogo { margin-left: -2px; }
.box-team { display: flex; align-items: center; gap: 8px; }
.chip-team { gap: 5px; padding-left: 4px; }
.pcard .avatar { overflow: visible; }
.pcard .avatar > svg:first-child { border-radius: 50%; display: block; }
.tbadge { position: absolute; right: -6px; bottom: -4px; width: 26px; height: 26px; border-radius: 50%; background: var(--s1);
  box-shadow: 0 0 0 1px var(--line), 0 1px 3px rgba(0,0,0,.12); display: grid; place-items: center; z-index: 2; }
.tbadge .tlogo { width: 21px; height: 21px; }
