/* KOLLECT: a trading desktop. Windows-95 bones, crypto-terminal layout, our own colors. */
@font-face { font-family: "Anton"; src: url(/fonts/anton.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Plex"; src: url(/fonts/plexmono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex"; src: url(/fonts/plexmono-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --desk: #13224a;
  --grid: rgba(255, 255, 255, 0.045);
  --win: #f3efe4;
  --win-2: #e7e1d1;
  --paper: #fffdf6;
  --ink: #15161c;
  --ink-2: #55535c;
  --line: #d6cdb6;
  --hi: #ffffff;
  --lo: #6d6858;
  --bar: #0a246a;
  --bar-2: #2457b8;
  --red: #d8342a;
  --green: #128a55;
  --gold: #c9a227;
  --silver: #9aa3ad;
  --base: #b9875a;
  --black: #1b1b22;
  --focus: #ffcf3a;
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --mono: "Plex", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  --top: 56px;
  --tabbar: 0px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 12px); }
body {
  margin: 0; min-height: 100vh; font: 14px/1.5 var(--mono); color: var(--ink);
  background-color: var(--desk);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  padding-bottom: var(--tabbar);
}
img { max-width: 100%; }
a { color: var(--bar); }
a:hover { color: var(--red); }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--focus); color: var(--ink); padding: 8px 12px; }
.skip:focus { left: 8px; }
.up { color: var(--green); }
.down { color: var(--red); }
.muted { color: var(--ink-2); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- bevels ---------- */
.raised { background: var(--win); border: 2px solid; border-color: var(--hi) var(--lo) var(--lo) var(--hi); box-shadow: 1px 1px 0 #000; }
.sunken { background: var(--paper); border: 2px solid; border-color: var(--lo) var(--hi) var(--hi) var(--lo); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 36px; padding: 6px 14px; white-space: nowrap;
  font: 700 13px/1 var(--mono); color: var(--ink); text-decoration: none; cursor: pointer;
}
.btn:hover { color: var(--ink); background: #faf7ee; }
.btn:active:not(:disabled) { border-color: var(--lo) var(--hi) var(--hi) var(--lo); box-shadow: none; transform: translate(1px, 1px); }
.btn:disabled { color: var(--lo); cursor: not-allowed; }
.btn.mini { min-height: 26px; padding: 3px 9px; font-size: 12px; }
.btn.go { background: var(--red); color: #fff; border-color: #ff8a80 #8a1610 #8a1610 #ff8a80; }
.btn.go:hover { color: #fff; background: #e23d33; }
.btn.blue { background: var(--bar); color: #fff; border-color: #5d7fd6 #04123a #04123a #5d7fd6; }
.btn.blue:hover { color: #fff; background: #12308a; }
.btn.big { min-height: 48px; padding: 10px 22px; font-size: 15px; }
.btn.on { border-color: var(--lo) var(--hi) var(--hi) var(--lo); box-shadow: none; background: var(--win-2); }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; width: 16px; height: 16px; border: 3px solid var(--ink); border-color: var(--ink) transparent var(--ink) transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
.btn.go.busy::after, .btn.blue.busy::after { border-color: #fff transparent #fff transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 50; height: var(--top);
  display: flex; align-items: center; gap: 14px; padding: 0 16px;
  background: var(--win); border-bottom: 2px solid #000; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font: 400 24px/1 var(--display); letter-spacing: 0.03em; }
.logo:hover { color: var(--ink); }
.logo img { width: auto; height: 40px; display: block; }
.nav { display: flex; gap: 2px; }
.nav a { padding: 8px 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 13px; border: 2px solid transparent; white-space: nowrap; }
.nav a:hover { background: var(--win-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--bar); color: #fff; }
.search { position: relative; flex: 1; max-width: 440px; margin-left: auto; }
.search input#gsearch { width: 100%; min-height: 36px; padding: 6px 10px 6px 32px; font: 13px var(--mono); background: var(--paper); border: 2px solid; border-color: var(--lo) var(--hi) var(--hi) var(--lo); }
.search svg { position: absolute; left: 10px; top: 11px; width: 14px; height: 14px; }
.search kbd { position: absolute; right: 8px; top: 9px; font: 11px var(--mono); padding: 1px 5px; border: 1px solid var(--line); color: var(--ink-2); background: var(--win); }
.results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; max-height: 70vh; overflow: auto; padding: 4px; }
.results a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; text-decoration: none; color: var(--ink); }
.results a:hover, .results a[aria-selected="true"] { background: var(--bar); color: #fff; }
.results a img { width: 28px; height: 28px; border: 1px solid #000; object-fit: cover; }
.results small { margin-left: auto; opacity: 0.75; }
.results .hd { padding: 6px 8px 2px; font-size: 11px; color: var(--ink-2); font-weight: 700; }
.me-btn { display: flex; align-items: center; gap: 8px; }
.me-btn img { width: 22px; height: 22px; border: 1px solid #000; object-fit: cover; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(18, 138, 85, 0.2); }
.live.off i { background: var(--red); box-shadow: 0 0 0 3px rgba(216, 52, 42, 0.2); }

/* ---------- mobile tab bar ---------- */
.tabbar { display: none; }

/* ---------- page ---------- */
.page { max-width: 1320px; margin: 0 auto; padding: 18px 16px 28px; display: flex; flex-direction: column; gap: 18px; }
.row { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.row > .win { display: flex; flex-direction: column; }
.row > .win > .in, .row > .win > [data-token], .row > .win > [data-perf] { flex: 1; }
/* A side column that matches its neighbour's height instead of setting it; its last window scrolls. */
.fit { display: flex; flex-direction: column; gap: 18px; min-width: 0; height: 0; min-height: 100%; }
.fit > .win { flex: none; }
.fit > .win.grow { flex: 1 1 0; min-height: 180px; display: flex; flex-direction: column; }
.fit > .win.grow > .tape, .fit > .win.grow > .scroll { flex: 1 1 0; min-height: 0; max-height: none; overflow: auto; }
.row.wl { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.row.wr { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); }
.row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- windows ---------- */
.win { padding: 3px; background: var(--win); border: 2px solid; border-color: var(--hi) var(--lo) var(--lo) var(--hi); box-shadow: 2px 2px 0 #000; min-width: 0; }
.win > .bar { display: flex; align-items: center; gap: 10px; min-height: 30px; padding: 3px 4px 3px 10px; background: linear-gradient(90deg, var(--bar), var(--bar-2)); color: #fff; }
.win > .bar h2, .win > .bar .t { flex: 1; min-width: 0; margin: 0; font: 700 13px/1.2 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win > .bar a { color: #fff; font-size: 12px; font-weight: 700; text-decoration: none; padding: 2px 8px; border: 1px solid rgba(255, 255, 255, 0.4); }
.win > .bar a:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }
.win > .in, .in { padding: 14px; }
.win > .in.flush { padding: 0; }
.tabs { display: flex; gap: 4px; padding: 6px 8px 0; border-bottom: 2px solid var(--lo); overflow-x: auto; scrollbar-width: none; }
.tabs button, .tabs a { padding: 6px 12px; font: 700 12px var(--mono); color: var(--ink); text-decoration: none; background: var(--win-2); border: 2px solid; border-color: var(--hi) var(--lo) transparent var(--hi); margin-bottom: -2px; cursor: pointer; white-space: nowrap; }
.tabs [aria-selected="true"] { background: var(--win); border-bottom-color: var(--win); position: relative; z-index: 1; padding-top: 8px; margin-top: -2px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tools .grow { flex: 1; }
.seg { display: inline-flex; padding: 2px; gap: 2px; background: var(--win-2); border: 2px solid; border-color: var(--lo) var(--hi) var(--hi) var(--lo); }
.seg button { min-height: 28px; padding: 3px 10px; font: 700 12px var(--mono); color: var(--ink); background: transparent; border: 0; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--bar); color: #fff; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; font: 700 11px/1.4 var(--mono); border: 1px solid #000; background: var(--paper); color: var(--ink); white-space: nowrap; cursor: default; }
button.chip { cursor: pointer; }
button.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.chip.good { background: #dff3e8; border-color: var(--green); color: #0b5a37; }
.chip.bad { background: #fde3e0; border-color: var(--red); color: #8a1610; }

/* ---------- hero ---------- */
.hero .in { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 28px 28px 24px; }
.hero h1 { font: 400 clamp(42px, 6vw, 84px)/0.92 var(--display); margin: 0 0 16px; text-transform: uppercase; }
.hero p.lede { font-size: 16px; max-width: 46ch; margin: 0 0 20px; }
.ctas { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.proof { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.fan { position: relative; height: 380px; }
.fan .card { position: absolute; width: 214px; top: 10px; transition: transform 0.25s; }
.fan .card:nth-child(1) { left: 2%; transform: rotate(-9deg) translateY(30px); }
.fan .card:nth-child(2) { left: 27%; z-index: 2; }
.fan .card:nth-child(3) { left: 52%; transform: rotate(9deg) translateY(30px); }
.fan .card:hover { transform: translateY(-8px); z-index: 3; }

/* ---------- stat tiles (fixed size, never overflow) ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.stat { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; min-height: 68px; padding: 8px 10px; background: var(--paper); border: 2px solid; border-color: var(--lo) var(--hi) var(--hi) var(--lo); }
.stat small { display: block; font-size: 11px; line-height: 1.3; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat b { display: block; font: 400 clamp(20px, 2.1vw, 26px)/1.1 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat em { font-style: normal; font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- the card ---------- */
.card {
  --t: var(--base);
  display: block; position: relative; color: var(--ink); text-decoration: none;
  aspect-ratio: 5 / 7; padding: 7px; border-radius: 10px;
  background: var(--t); box-shadow: 0 0 0 2px #000, 4px 5px 0 rgba(0, 0, 0, 0.45);
  transition: transform 0.15s;
}
a.card:hover { color: var(--ink); transform: translateY(-3px); }
.card[data-tier="gold"] { --t: var(--gold); }
.card[data-tier="silver"] { --t: var(--silver); }
.card[data-tier="base"] { --t: var(--base); }
.card[data-tier="unranked"] { --t: #8c887c; }
.card[data-tier="black"] { --t: var(--black); background: linear-gradient(135deg, #1b1b22 0%, #2d2140 30%, #173a4a 55%, #3a2a17 80%, #1b1b22 100%); }
.card[data-tier="black"]::after { content: ""; position: absolute; inset: 0; border-radius: 10px; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.28) 46%, transparent 60%); background-size: 250% 100%; animation: holo 4.5s ease-in-out infinite; pointer-events: none; mix-blend-mode: screen; }
@keyframes holo { 0%, 100% { background-position: 120% 0; } 50% { background-position: -20% 0; } }
.card .face { height: 100%; display: flex; flex-direction: column; background: var(--win); border-radius: 5px; border: 2px solid #000; overflow: hidden; }
.card .ctop { display: flex; justify-content: space-between; align-items: center; padding: 4px 7px; font: 700 11px/1.2 var(--mono); background: #000; color: #fff; }
.card .ctop .tier { color: var(--t); text-transform: uppercase; letter-spacing: 0.08em; }
.card[data-tier="black"] .ctop .tier { color: #d9c8ff; }
.card .pic { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; background: var(--acc, transparent) repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.05) 0 6px, transparent 6px 12px); border-bottom: 2px solid #000; }
.card .pic img { width: 62%; }
.card .pic img.photo { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.card .pic .kind { position: absolute; left: 6px; bottom: 5px; font: 700 10px/1 var(--mono); background: #000; color: #fff; padding: 3px 5px; text-transform: uppercase; }
.card .pic .tok { position: absolute; right: 6px; bottom: 5px; font: 700 10px/1 var(--mono); background: var(--red); color: #fff; padding: 3px 5px; }
.card .cname { padding: 6px 8px 0; font: 400 20px/1.05 var(--display); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .chk { display: inline-block; width: 14px; height: 14px; vertical-align: 2px; margin-left: 4px; background: var(--bar); color: #fff; font: 700 10px/14px var(--mono); text-align: center; border-radius: 50%; }
.card .px { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 2px 8px 6px; }
.card .px b { font: 400 24px/1 var(--display); }
.card .px span { font: 700 12px/1 var(--mono); }
.card .meter { height: 6px; margin: 0 8px 8px; background: var(--win-2); border: 1px solid #000; }
.card .meter i { display: block; height: 100%; background: var(--t); }
.card[data-tier="black"] .meter i { background: linear-gradient(90deg, #8f6bff, #4fd1c5, #f6c453); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 18px; padding: 4px; }
.card.sk { box-shadow: none; }

/* ---------- tables ---------- */
.tw { overflow: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-weight: 700; font-size: 11px; color: var(--ink-2); padding: 8px 10px; background: var(--win-2); border-bottom: 2px solid var(--lo); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
table.t th button { all: unset; cursor: pointer; }
table.t th button:hover { color: var(--ink); text-decoration: underline; }
table.t th[aria-sort] { color: var(--ink); }
table.t td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
table.t tbody tr:hover td { background: #fff7d6; }
table.t tbody tr.me td { background: #fff4c7; }
table.t .r { text-align: right; font-variant-numeric: tabular-nums; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: var(--ink); }
.who:hover { color: var(--ink); }
.who img { width: 32px; height: 32px; flex: none; object-fit: cover; border: 2px solid #000; background: var(--win-2); }
.who .nm { display: flex; flex-direction: column; min-width: 0; }
.who b { color: var(--ink); overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.who small { font-size: 11px; color: var(--ink-2); }
.rank { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 4px; font: 700 12px var(--mono); background: var(--win-2); border: 1px solid var(--lo); }
.rank.r1 { background: var(--gold); border-color: #000; }
.rank.r2 { background: var(--silver); border-color: #000; }
.rank.r3 { background: var(--base); border-color: #000; }
.pill { display: inline-block; padding: 1px 7px; font: 700 11px/1.6 var(--mono); text-transform: uppercase; border: 1px solid #000; background: var(--win-2); white-space: nowrap; }
.pill.black { background: #1b1b22; color: #d9c8ff; }
.pill.gold { background: var(--gold); }
.pill.silver { background: var(--silver); }
.pill.base { background: var(--base); }
.pill.dump, .pill.sell { background: var(--red); color: #fff; }
.pill.buy { background: var(--green); color: #fff; }
.pill.kol { background: var(--bar); color: #fff; }
td.wl b { color: var(--green); }
td.wl i { font-style: normal; color: var(--red); }
.star { all: unset; cursor: pointer; font-size: 16px; color: var(--lo); padding: 2px 6px; }
.star[aria-pressed="true"] { color: #d99a00; }
.stack { display: flex; }
.stack img { width: 24px; height: 24px; border: 2px solid var(--win); margin-left: -6px; border-radius: 50%; object-fit: cover; background: var(--win-2); }
.stack img:first-child { margin-left: 0; }
.stack span { margin-left: 4px; font-size: 12px; align-self: center; }
.quick { display: flex; gap: 4px; }

/* ---------- tape ---------- */
.tape { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.tape li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.tape li.new { animation: flash 1.4s ease-out; }
@keyframes flash { from { background: #fff1a8; } to { background: transparent; } }
.tape li.dump { background: #fde3e0; }
.tape li > img { width: 32px; height: 32px; border: 2px solid #000; object-fit: cover; background: var(--win-2); }
.tape .what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tape .what a { font-weight: 700; text-decoration: none; }
.tape .sub { display: block; font-size: 11px; color: var(--ink-2); }
.tape .amt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tape .amt small { display: block; font-weight: 400; font-size: 11px; color: var(--ink-2); }
.scroll { max-height: 560px; overflow: auto; }

/* ---------- card page ---------- */
.profile { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; padding: 18px; }
.profile .card { width: 100%; }
.ph1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ph1 h1 { font: 400 clamp(36px, 5vw, 60px)/1 var(--display); text-transform: uppercase; margin: 0; overflow-wrap: anywhere; }
.bio { max-width: 64ch; margin: 8px 0 10px; white-space: pre-line; overflow-wrap: anywhere; }
.links { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.chart { width: 100%; height: 200px; display: block; background: var(--paper); }
.cal { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 3px; }
.cal i { aspect-ratio: 1; border: 1px solid rgba(0, 0, 0, 0.25); background: var(--win-2); display: block; }
.legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-2); margin-top: 6px; }
.tok { padding: 12px; }
.ca { display: flex; gap: 6px; align-items: center; font-size: 12px; padding: 6px 8px; overflow: hidden; }
.ca span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }

/* ---------- forms ---------- */
label { display: block; font-weight: 700; font-size: 12px; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
input[type="text"], input[type="email"], input[type="search"], input[type="url"], textarea, select {
  width: 100%; min-height: 38px; padding: 8px 10px; font: 14px var(--mono); color: var(--ink);
  background: var(--paper); border: 2px solid; border-color: var(--lo) var(--hi) var(--hi) var(--lo); border-radius: 0;
}
textarea { min-height: 110px; resize: vertical; }
.field.bad input, .field.bad textarea, .field.bad select { border-color: var(--red); background: #fff1ef; }
.field .err { display: none; color: var(--red); font-size: 12px; margin: 4px 0 0; font-weight: 700; }
.field.bad .err { display: block; }
.hint { font-size: 12px; color: var(--ink-2); margin: 4px 0 0; }
.formmsg { min-height: 1.4em; font-size: 13px; margin: 8px 0 0; }
.formmsg.err { color: var(--red); font-weight: 700; }
.formmsg.ok { color: var(--green); font-weight: 700; }
.hp { position: absolute; left: -9999px; }
.inline { display: flex; gap: 8px; }
.inline > input { flex: 1; min-width: 0; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatches button { width: 30px; height: 30px; border: 2px solid #000; cursor: pointer; }
.swatches button[aria-pressed="true"] { outline: 3px solid var(--focus); outline-offset: 1px; }
.drop { display: grid; place-items: center; gap: 6px; padding: 16px; text-align: center; border: 2px dashed var(--lo); background: var(--paper); cursor: pointer; }
.drop.over { border-color: var(--bar); background: #eef2ff; }
.editor { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; }

/* ---------- skeletons + empty ---------- */
.sk { background: linear-gradient(90deg, var(--win-2) 25%, #f7f3e9 50%, var(--win-2) 75%); background-size: 200% 100%; animation: sk 1.2s linear infinite; border: 1px solid var(--line); }
@keyframes sk { to { background-position: -200% 0; } }
.sk.line { height: 16px; margin: 10px 12px; }
.empty { padding: 28px 14px; text-align: center; color: var(--ink-2); }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.error-box { margin: 12px; padding: 12px; background: #fde3e0; border: 2px solid var(--red); color: #6d140f; font-weight: 700; }

/* ---------- weekly ---------- */
.count { display: flex; gap: 6px; }
.count span { padding: 6px 8px; min-width: 54px; text-align: center; background: #000; color: #7dffb0; font: 700 22px/1 var(--mono); }
.count span small { display: block; font-size: 10px; color: #9aa3ad; margin-top: 4px; }
.races { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.race { padding: 12px; min-width: 0; }
.race h3 { font: 400 22px/1 var(--display); margin: 0 0 4px; text-transform: uppercase; }
.race .amt { font: 400 30px/1.1 var(--display); color: var(--green); }
.race p { font-size: 12px; margin: 6px 0 0; }

/* ---------- prose ---------- */
.prose { max-width: 74ch; }
.prose h1 { font: 400 46px/1 var(--display); text-transform: uppercase; margin: 6px 0 12px; }
.prose h2 { font: 400 26px/1.1 var(--display); text-transform: uppercase; margin: 28px 0 8px; }
.updated { color: var(--ink-2); font-size: 12px; }
.display { font: 400 clamp(36px, 5vw, 64px)/0.95 var(--display); text-transform: uppercase; margin: 0 0 10px; }
.h3 { font: 400 22px/1.1 var(--display); text-transform: uppercase; margin: 0 0 8px; }

/* ---------- toasts + dialogs ---------- */
.toasts { position: fixed; right: 14px; bottom: calc(var(--tabbar) + 14px); z-index: 70; display: flex; flex-direction: column; gap: 8px; max-width: min(360px, calc(100vw - 28px)); }
.toast { padding: 10px 12px; font-size: 13px; animation: pop 0.2s ease-out; }
.toast.err { border-left: 6px solid var(--red); }
.toast.ok { border-left: 6px solid var(--green); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
dialog.win { padding: 3px; max-width: min(460px, calc(100vw - 24px)); width: 100%; }
dialog.win::backdrop { background: rgba(8, 14, 32, 0.6); }
dialog.closing { opacity: 0; transition: opacity 0.15s; }
.wbody .wlist { display: grid; gap: 6px; }
.wopt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; font: 700 14px var(--mono); cursor: pointer; text-align: left; }
.wopt small { margin-left: auto; color: var(--green); font-weight: 400; }
.wcur { display: flex; gap: 10px; align-items: center; padding: 8px; margin-bottom: 10px; }
.wcur small { display: block; }
.wcur button { margin-left: auto; }
.wnote, .wfine { font-size: 12px; }
.wlinks { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- footer ---------- */
.foot { max-width: 1320px; margin: 0 auto; padding: 0 16px 24px; color: #c8d0e6; font-size: 12px; display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .nav a { padding: 8px 7px; }
  .search kbd { display: none; }
}
@media (max-width: 1020px) {
  .row, .row.wl, .row.wr, .row.three { grid-template-columns: minmax(0, 1fr); }
  .fit { height: auto; min-height: 0; }
  .fit > .win.grow > .tape { max-height: 460px; }
  .hero .in { grid-template-columns: minmax(0, 1fr); }
  .fan { height: 330px; max-width: 520px; width: 100%; margin: 0 auto; }
  .races { grid-template-columns: minmax(0, 1fr); }
  .nav { display: none; }
  .search { max-width: none; }
  :root { --tabbar: 62px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: var(--tabbar); display: grid; grid-template-columns: repeat(5, 1fr); background: var(--win); border-top: 2px solid #000; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font: 700 11px var(--mono); color: var(--ink); text-decoration: none; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { background: var(--bar); color: #fff; }
  .tabbar a.cta { background: var(--red); color: #fff; }
}
@media (max-width: 760px) {
  :root { --top: 52px; }
  .top { padding: 0 8px; gap: 8px; }
  .logo span { display: none; }
  .logo img { height: 34px; }
  .live { display: none; }
  .page { padding: 10px 8px 20px; gap: 12px; }
  .hero .in { padding: 18px 14px; gap: 14px; }
  .proof { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fan { height: 270px; }
  .fan .card { width: 150px; }
  .fan .card:nth-child(1) { left: 0; }
  .fan .card:nth-child(2) { left: calc(50% - 75px); }
  .fan .card:nth-child(3) { left: auto; right: 0; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card .cname { font-size: 16px; }
  .card .px b { font-size: 19px; }
  .profile, .editor { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .profile > div:first-child, .editor > div:first-child { max-width: 260px; margin: 0 auto; width: 100%; }
  .win > .in { padding: 10px; }
  .hide-sm { display: none; }
  .who b { max-width: 120px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tools { gap: 6px; padding: 8px; }
  .tools select, .tools input { flex: 1 1 40%; max-width: none !important; }
  .tools .grow { display: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; flex: 1; }
  table.t td, table.t th { padding: 7px 6px; }
  .rank { min-width: 24px; }
  .me-btn span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.big-title { font: 400 clamp(36px, 5vw, 64px)/0.95 var(--display); text-transform: uppercase; margin: 0 0 10px; }
.win > .bar .dots { display: none; }

/* ---------- card market ---------- */
.market { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; padding: 14px; }
.lot { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lot .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 12px; }
.lot .price { font: 400 22px/1 var(--display); }
.lot .btn { width: 100%; }
.card.copy .ctop { background: #1b1b22; }
.card.copy::before { content: ""; position: absolute; inset: 3px; border: 1px dashed rgba(0, 0, 0, 0.35); border-radius: 8px; pointer-events: none; }
.supply { height: 6px; background: var(--win-2); border: 1px solid #000; }
.supply i { display: block; height: 100%; background: var(--red); }
.offer { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px; border-bottom: 1px solid var(--line); }
.offer .side { display: flex; gap: 8px; flex-wrap: wrap; }
.offer .side .card { width: 110px; }
.pickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; max-height: 340px; overflow: auto; padding: 6px; }
.pickgrid label { position: relative; cursor: pointer; margin: 0; }
.pickgrid input { position: absolute; top: 6px; left: 6px; z-index: 2; width: 18px; height: 18px; }
.pickgrid input:checked + .card { outline: 4px solid var(--focus); }
@media (max-width: 760px) { .market { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 10px; } .offer { grid-template-columns: minmax(0, 1fr); } }
[hidden] { display: none !important; }
.lot form.inline { gap: 6px; }
.lot form.inline input { flex: 1 1 auto; width: 100%; min-width: 0; min-height: 34px; }
.lot form.inline .btn { width: auto; flex: none; }
.lot .price { white-space: nowrap; }
.lot .meta span:last-child { text-align: right; }
@media (max-width: 760px) { .lot .price { font-size: 18px; } .lot .meta { font-size: 11px; } }

/* ---------- $KOLLECT contract strip ---------- */
.castrip { background: #000; color: #fff; font-size: 12px; border-bottom: 2px solid #000; }
.castrip-in { max-width: 1320px; margin: 0 auto; padding: 5px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.castrip b { color: var(--gold); }
.castrip .ca-full { color: #d9d4c4; overflow-wrap: anywhere; }
.castrip a { color: #fff; font-weight: 700; }
.castrip a:hover { color: var(--gold); }
.castrip .btn { min-height: 22px; padding: 1px 8px; font-size: 11px; }
@media (max-width: 760px) { .castrip-in { gap: 8px; padding: 5px 8px; } .castrip .ca-full { font-size: 10px; flex-basis: 100%; order: 5; } }
