/* Anki Markets: a clean, flat market interface. Light by default, dark via system or [data-theme]. */

:root {
  --bg: #ffffff;
  --bg-soft: #f4f5f7;
  --bg-hover: #f7f8fa;
  --panel: #ffffff;
  --line: #e6e8ec;
  --line-2: #d9dce1;
  --text: #23272d;
  --text-2: #6b727b;
  --text-3: #9ba1a9;
  --blue: #2e5cff;
  --blue-hover: #1f4cf0;
  --blue-soft: #eaeeff;
  --yes: #009c39;
  --yes-ink: #007e26;
  --yes-soft: #d9f0e2;
  --yes-soft-2: #c9e9d6;
  --no: #df0c10;
  --no-ink: #df0c10;
  --no-soft: #fce9e9;
  --no-soft-2: #f8d8d8;
  --gold: #f5a524;
  --shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 2px 6px -.5px rgba(0, 0, 0, .025), 0 2px 10px 0 rgba(0, 0, 0, .025);
  --shadow-hover: 0 0 0 1px rgba(0, 0, 0, .08), 0 4px 14px -2px rgba(0, 0, 0, .08);
  --shadow-pop: 0 0 0 1px rgba(0, 0, 0, .06), 0 12px 32px -6px rgba(0, 0, 0, .16);
  --skeleton: #eef0f3;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171a;
    --bg-soft: #22252a;
    --bg-hover: #1c1f23;
    --panel: #1a1d21;
    --line: #2b2f35;
    --line-2: #383c43;
    --text: #eceef1;
    --text-2: #9aa0a8;
    --text-3: #6e747c;
    --blue: #4c74ff;
    --blue-hover: #6487ff;
    --blue-soft: rgba(76, 116, 255, .16);
    --yes: #12a84a;
    --yes-ink: #3fd07a;
    --yes-soft: rgba(18, 168, 74, .16);
    --yes-soft-2: rgba(18, 168, 74, .26);
    --no: #e8363b;
    --no-ink: #ff6a6e;
    --no-soft: rgba(232, 54, 59, .15);
    --no-soft-2: rgba(232, 54, 59, .25);
    --shadow: 0 0 0 1px rgba(255, 255, 255, .07);
    --shadow-hover: 0 0 0 1px rgba(255, 255, 255, .12), 0 6px 18px -6px rgba(0, 0, 0, .6);
    --shadow-pop: 0 0 0 1px rgba(255, 255, 255, .08), 0 16px 40px -8px rgba(0, 0, 0, .7);
    --skeleton: #24272c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15171a;
  --bg-soft: #22252a;
  --bg-hover: #1c1f23;
  --panel: #1a1d21;
  --line: #2b2f35;
  --line-2: #383c43;
  --text: #eceef1;
  --text-2: #9aa0a8;
  --text-3: #6e747c;
  --blue: #4c74ff;
  --blue-hover: #6487ff;
  --blue-soft: rgba(76, 116, 255, .16);
  --yes: #12a84a;
  --yes-ink: #3fd07a;
  --yes-soft: rgba(18, 168, 74, .16);
  --yes-soft-2: rgba(18, 168, 74, .26);
  --no: #e8363b;
  --no-ink: #ff6a6e;
  --no-soft: rgba(232, 54, 59, .15);
  --no-soft-2: rgba(232, 54, 59, .25);
  --shadow: 0 0 0 1px rgba(255, 255, 255, .07);
  --shadow-hover: 0 0 0 1px rgba(255, 255, 255, .12), 0 6px 18px -6px rgba(0, 0, 0, .6);
  --shadow-pop: 0 0 0 1px rgba(255, 255, 255, .08), 0 16px 40px -8px rgba(0, 0, 0, .7);
  --skeleton: #24272c;
  color-scheme: dark;
}

/* ---------- base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 130px; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 14px/1.43 var(--font); letter-spacing: -.006em; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11"; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
svg { display: block; }
h1, h2, h3, p { margin: 0; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.up { color: var(--yes-ink); }
.down { color: var(--no-ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.app { flex: 1; width: 100%; max-width: 1320px; margin: 0 auto; padding: 20px 24px 64px; outline: none; }

/* ---------- header */

.hdr { position: sticky; top: 0; z-index: 40; background: var(--bg); }
.hdr-row { max-width: 1320px; margin: 0 auto; height: 64px; padding: 0 24px; display: flex; align-items: center; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 700; letter-spacing: -.03em; white-space: nowrap; flex: none; }
.logo-mark { width: 26px; height: 26px; }
.logo.sm { font-size: 15px; }
.logo.sm .logo-mark { width: 20px; height: 20px; }
.hsearch { flex: 1; min-width: 0; max-width: 600px; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 12px; border-radius: 12px; background: var(--bg-soft); cursor: text; }
.hsearch svg { width: 16px; height: 16px; fill: none; stroke: var(--text-2); stroke-width: 2; flex: none; }
.hsearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 14px; font-weight: 500; }
.hsearch input::placeholder { color: var(--text-3); font-weight: 400; }
.hsearch input::-webkit-search-cancel-button { display: none; }
.hsearch kbd { font: 500 12px var(--font); color: var(--text-3); border: 1px solid var(--line-2); border-radius: 5px; padding: 0 6px; line-height: 18px; }
.hsearch:focus-within { box-shadow: 0 0 0 1px var(--line-2); background: var(--bg); }
.hdr-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.hlink { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--text-2); font-weight: 500; white-space: nowrap; }
.hlink:hover { color: var(--text); background: var(--bg-soft); }
.hlink.on { color: var(--text); }
.hlink.blue { color: var(--blue); }
.hlink svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.hstat { display: flex; flex-direction: column; align-items: flex-end; padding: 2px 10px; border-radius: 8px; line-height: 1.2; }
.hstat:hover { background: var(--bg-soft); }
.hstat small { font-size: 12px; color: var(--text-2); font-weight: 500; }
.hstat b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hstat b.g { color: var(--yes-ink); }
.hsep { width: 1px; height: 28px; background: var(--line); margin: 0 4px; }

.cats { max-width: 1320px; margin: 0 auto; padding: 0 24px; height: 44px; display: flex; align-items: stretch; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.hdr::after { content: ""; display: block; border-bottom: 1px solid var(--line); }
.cats a { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; color: var(--text-2); font-weight: 500; white-space: nowrap; }
.cats a:hover { color: var(--text); }
.cats a.on { color: var(--text); font-weight: 600; }
.cats a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px; background: var(--text); }
.cats a svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.cats .sep { width: 1px; background: var(--line); margin: 12px 6px; flex: none; }

/* ---------- buttons, inputs, menus */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; }
.btn:hover { background: var(--bg-hover); border-color: var(--line-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.blue { border: 0; background: var(--blue); color: #fff; }
.btn.blue:hover { background: var(--blue-hover); }
.btn.ghost { border-color: transparent; background: none; color: var(--text-2); }
.btn.ghost:hover { color: var(--text); background: var(--bg-soft); }
.btn.soft { border: 0; background: var(--bg-soft); }
.btn.soft:hover { background: var(--line); }
.btn.danger { color: var(--no-ink); }
.btn.lg { height: 48px; font-size: 15px; border-radius: 10px; padding: 0 18px; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn.block { width: 100%; }
.linkish { background: none; border: 0; padding: 0; color: inherit; font: inherit; }
.linkish:hover { color: var(--text); }
.input { width: 100%; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); padding: 0 12px; outline: none; font-size: 14px; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.hint { font-size: 12.5px; color: var(--text-2); margin-top: 6px; }

/* yes / no buttons */
.by, .bn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: 0; border-radius: 6px; font-weight: 600; white-space: nowrap; transition: background .12s, color .12s; }
.by { background: var(--yes-soft); color: var(--yes-ink); }
.bn { background: var(--no-soft); color: var(--no-ink); }
.by:hover { background: var(--yes-soft-2); }
.bn:hover { background: var(--no-soft-2); }
.by.on { background: var(--yes); color: #fff; }
.bn.on { background: var(--no); color: #fff; }
.bt { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: var(--bg-soft); color: var(--text); font-weight: 600; white-space: nowrap; transition: background .12s; }
.bt:hover { background: var(--line); }
.bt.on { background: var(--blue); color: #fff; }
.by.row, .bn.row { height: 40px; min-width: 132px; padding: 0 12px; font-size: 14px; border-radius: 8px; }

.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 250px; background: var(--panel); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; z-index: 60; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 7px; font-size: 14px; color: var(--text); background: none; border: 0; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--bg-soft); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 2px; }
.menu-head { display: flex; gap: 10px; align-items: center; padding: 8px 10px; }
.menu-head .av { width: 36px; height: 36px; font-size: 18px; }
.menu-head b { display: block; font-size: 14px; }
.menu-head small { color: var(--text-2); font-size: 12.5px; }

.av { --h: 220; border-radius: 50%; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, hsl(var(--h) 80% 86%), hsl(calc(var(--h) + 50) 75% 76%)); line-height: 1; }
:root[data-theme="dark"] .av { background: linear-gradient(135deg, hsl(var(--h) 45% 32%), hsl(calc(var(--h) + 50) 45% 26%)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .av { background: linear-gradient(135deg, hsl(var(--h) 45% 32%), hsl(calc(var(--h) + 50) 45% 26%)); } }
.av-btn { width: 36px; height: 36px; font-size: 18px; border: 0; padding: 0; }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--bg-soft); }
.seg button { height: 30px; padding: 0 12px; border-radius: 7px; border: 0; background: none; color: var(--text-2); font-weight: 500; font-size: 13.5px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px rgba(0, 0, 0, .04); }
.utabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.utabs::-webkit-scrollbar { display: none; }
.utabs button, .utabs a { position: relative; height: 40px; padding: 0; border: 0; background: none; color: var(--text-2); font-weight: 500; font-size: 14px; white-space: nowrap; display: inline-flex; align-items: center; }
.utabs button:hover, .utabs a:hover { color: var(--text); }
.utabs .on { color: var(--text); font-weight: 600; }
.utabs .on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- surfaces */

.card { background: var(--panel); border-radius: 15px; box-shadow: var(--shadow); }
.pad { padding: 16px; }
.pad-lg { padding: 24px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 32px 0 14px; }
.sec-head h2 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.sec-head .more { color: var(--text-2); font-weight: 500; }
.sec-head .more:hover { color: var(--text); }
.h1 { font-size: 28px; font-weight: 600; letter-spacing: -.025em; }
.sub { color: var(--text-2); margin-top: 4px; font-size: 14px; }
.lbl { font-size: 13px; color: var(--text-2); font-weight: 500; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag.yes { background: var(--yes-soft); color: var(--yes-ink); }
.tag.no { background: var(--no-soft); color: var(--no-ink); }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag.plain { background: var(--bg-soft); color: var(--text-2); }
.tag.gold { background: rgba(245, 165, 36, .16); color: #a96a00; }
.coin { width: 1em; height: 1em; display: inline-block; vertical-align: -.13em; flex: none; }
.tok { display: inline-flex; align-items: center; gap: .3em; font-variant-numeric: tabular-nums; }
.skel { background: var(--skeleton); border-radius: 8px; animation: skel 1.1s ease-in-out infinite alternate; }
@keyframes skel { to { opacity: .5; } }
.empty { text-align: center; padding: 48px 20px; color: var(--text-2); }
.empty h3 { color: var(--text); font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }
.live { display: inline-flex; align-items: center; gap: 5px; color: var(--no-ink); font-weight: 600; font-size: 12px; letter-spacing: .02em; }
.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.chg { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }

/* ---------- home */

.strip { display: flex; align-items: center; gap: 18px; padding: 10px 16px; border-radius: 12px; background: var(--bg-soft); margin-bottom: 20px; flex-wrap: wrap; min-height: 48px; }
.strip .s-item { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); white-space: nowrap; }
.strip .s-item b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.strip .s-sep { width: 1px; height: 18px; background: var(--line-2); }
.strip .bar { width: 120px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.strip .bar i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.strip .bar.done i { background: var(--yes); }
.strip .s-cta { margin-left: auto; }
.strip svg.ic { width: 16px; height: 16px; fill: none; stroke: var(--text-2); stroke-width: 1.8; }
.strip svg.flame { width: 14px; height: 14px; fill: #f97316; }

.top-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.top-grid > * { min-width: 0; }
.feat { padding: 20px 20px 14px; display: flex; flex-direction: column; min-height: 372px; cursor: pointer; }
.feat-head { display: flex; gap: 12px; align-items: center; }
.feat-head img, .feat-head .ph { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; background: var(--bg-soft); }
.crumb { font-size: 13px; color: var(--text-2); display: flex; gap: 6px; align-items: center; }
.feat-head h2 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin-top: 2px; }
.feat-body { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 24px; margin-top: 16px; flex: 1; }
.feat-opts { display: flex; flex-direction: column; }
.feat-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.feat-opt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feat-opt b { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.feat-chart { position: relative; min-height: 220px; }
.feat-chart .chart { height: 100%; margin: 0; }
.feat-foot { display: flex; align-items: center; gap: 14px; margin-top: 10px; color: var(--text-2); font-size: 13px; }
.feat-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 12px; }
.dots { display: flex; gap: 5px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line-2); transition: width .2s, background .2s; cursor: pointer; }
.dots i.on { width: 18px; background: var(--text); }
.pager { display: flex; gap: 8px; min-width: 0; }
.pager button { height: 32px; padding: 0 12px; border-radius: 16px; border: 0; background: var(--bg-soft); color: var(--text-2); font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; max-width: 220px; min-width: 0; }
.pager button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager button:hover { color: var(--text); background: var(--line); }

.side { display: flex; flex-direction: column; gap: 20px; }
.side h3 { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 2px; margin-bottom: 2px; }
.side h3 a:hover { text-decoration: underline; }
.srow { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 13.5px; }
.srow .n { width: 14px; color: var(--text-2); font-size: 13px; flex: none; }
.srow .t { flex: 1; min-width: 0; font-weight: 500; line-height: 1.35; }
.srow .t span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.srow .t small { display: block; color: var(--text-2); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow .v { text-align: right; flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.srow .v small { display: block; font-size: 12px; font-weight: 600; }
.srow .av { width: 28px; height: 28px; font-size: 14px; }
a.srow:hover .t span { text-decoration: underline; }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.mc { display: flex; flex-direction: column; height: 180px; padding: 12px 14px 10px; cursor: pointer; transition: box-shadow .15s; }
.mc:hover { box-shadow: var(--shadow-hover); }
.mc-head { display: flex; gap: 10px; align-items: flex-start; min-height: 40px; }
.mc-img { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; flex: none; background: var(--bg-soft); }
.mc-title { font-size: 14px; font-weight: 600; line-height: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; min-width: 0; }
.mc-gauge { width: 58px; flex: none; margin-left: auto; margin-top: -2px; text-align: center; position: relative; }
.mc-gauge svg { width: 58px; height: 34px; }
.mc-gauge b { position: absolute; left: 0; right: 0; top: 13px; font-size: 14px; font-weight: 600; }
.mc-gauge small { display: block; font-size: 11px; color: var(--text-2); margin-top: -2px; }
.mc-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 0; }
.mc-bin { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.mc-bin .by, .mc-bin .bn, .mc-bin .bt { height: 40px; font-size: 14px; border-radius: 8px; min-width: 0; padding: 0 8px; }
.mc-bin span { overflow: hidden; text-overflow: ellipsis; }
.mc-opt { display: flex; align-items: center; gap: 8px; height: 30px; }
.mc-opt .nm { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-opt .pc { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mc-opt .ab { display: flex; gap: 4px; }
.mc-opt .ab .by, .mc-opt .ab .bn { height: 27px; padding: 0 10px; font-size: 13px; font-weight: 500; border-radius: 5px; min-width: 38px; }
.mc-team { display: flex; align-items: center; gap: 8px; height: 26px; font-size: 14px; }
.mc-team .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-team .pc { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mc-foot { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12.5px; margin-top: 8px; white-space: nowrap; overflow: hidden; }
.mc-foot .dot { color: var(--text-3); }
.mc-foot .end { margin-left: auto; overflow: hidden; text-overflow: ellipsis; }
.more { display: flex; justify-content: center; margin-top: 24px; }

/* ---------- event page */

.ev-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.ev-grid > * { min-width: 0; }
.ev-head { display: flex; gap: 14px; align-items: center; }
.ev-head img, .ev-head .ph { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; background: var(--bg-soft); }
.ev-head h1 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin-top: 2px; }
.ev-big { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.ev-big b { font-size: 28px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ev-big span { color: var(--text-2); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 16px; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; }
.legend b { color: var(--text); font-weight: 600; }
.chart { position: relative; height: 300px; margin-top: 8px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; top: 0; transform: translateX(-50%); background: var(--panel); box-shadow: var(--shadow-pop); border-radius: 8px; padding: 6px 9px; font-size: 12px; white-space: nowrap; opacity: 0; transition: opacity .1s; z-index: 2; }
.chart .tip div { display: flex; align-items: center; gap: 6px; }
.chart .tip i { width: 7px; height: 7px; border-radius: 50%; }
.chart .tip small { display: block; color: var(--text-2); margin-bottom: 2px; }
.chart-empty { height: 100%; display: grid; place-items: center; color: var(--text-3); }
.ev-meta { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 13.5px; flex-wrap: wrap; }
.ev-meta .ranges { margin-left: auto; display: flex; gap: 2px; }
.ev-meta .ranges button { height: 26px; padding: 0 8px; border: 0; border-radius: 6px; background: none; color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.ev-meta .ranges button:hover { color: var(--text); background: var(--bg-soft); }
.ev-meta .ranges button.on { color: var(--text); background: var(--bg-soft); }
.ev-meta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ev-meta .mi { display: inline-flex; align-items: center; gap: 6px; }
.orow { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 16px; align-items: center; padding: 14px 8px; margin: 0 -8px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 0; }
.orow:hover { background: var(--bg-hover); }
.orow.on { background: var(--bg-hover); }
.orow .nm { display: flex; gap: 12px; align-items: center; min-width: 0; }
.orow .nm img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; }
.orow .nm b { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orow .nm small { color: var(--text-2); font-size: 12.5px; }
.orow .pc { text-align: center; }
.orow .pc b { font-size: 24px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.orow .pc .chg { display: block; margin-top: 1px; }
.orow .acts { display: flex; gap: 8px; }
.show-all { margin-top: 12px; }
.rules { margin-top: 28px; }
.rules h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.rules p { color: var(--text-2); font-size: 14px; white-space: pre-line; line-height: 1.6; }
.rules .clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.tp { position: sticky; top: 128px; padding: 16px; }
.tp-head { display: flex; gap: 10px; align-items: center; }
.tp-head img, .tp-head .ph { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; background: var(--bg-soft); }
.tp-head > div { min-width: 0; }
.tp-head small { display: block; font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-head b { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.tp-tabs { display: flex; gap: 16px; margin: 14px 0 12px; border-bottom: 1px solid var(--line); }
.tp-tabs button { position: relative; height: 34px; border: 0; background: none; padding: 0; font-size: 15px; font-weight: 600; color: var(--text-3); }
.tp-tabs button:hover { color: var(--text-2); }
.tp-tabs button.on { color: var(--text); }
.tp-tabs button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--text); }
.tp-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tp-toggle button { height: 48px; border-radius: 8px; border: 0; background: var(--bg-soft); color: var(--text-2); font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; padding: 0 8px; }
.tp-toggle button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-toggle button:hover { color: var(--text); }
.tp-toggle button.y.on { background: var(--yes); color: #fff; }
.tp-toggle button.n.on { background: var(--no); color: #fff; }
.tp-amt { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.tp-amt .lbl { font-size: 16px; color: var(--text); font-weight: 600; }
.tp-amt .lbl small { display: block; font-size: 12.5px; color: var(--text-2); font-weight: 400; }
.tp-amt label { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tp-amt .coin { width: 22px; height: 22px; }
.tp-amt input { width: 150px; border: 0; outline: 0; background: none; text-align: right; font-size: 34px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; padding: 0; }
.tp-amt input::placeholder { color: var(--text-3); }
.tp-chips { display: flex; gap: 6px; justify-content: flex-end; margin-top: 10px; }
.tp-chips button { height: 30px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: none; color: var(--text-2); font-size: 12px; font-weight: 600; }
.tp-chips button:hover { color: var(--text); border-color: var(--line-2); }
.tp-sum { margin: 16px 0 14px; display: grid; gap: 6px; font-size: 14px; }
.tp-sum div { display: flex; justify-content: space-between; align-items: baseline; color: var(--text-2); }
.tp-sum b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.tp-sum .win { margin-top: 4px; }
.tp-sum .win span { color: var(--text); font-weight: 600; font-size: 15px; }
.tp-sum .win b { color: var(--yes-ink); font-size: 20px; }
.tp-note { text-align: center; font-size: 12.5px; color: var(--text-2); margin-top: 10px; }
.tp-warn { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: rgba(245, 165, 36, .14); color: #8f5a00; font-size: 13px; font-weight: 500; }
:root[data-theme="dark"] .tp-warn { color: #ffc865; }
.tp-pos { margin-top: 16px; padding-top: 4px; }
.tp-pos h4 { margin: 0 0 4px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.tp-pos .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.tp-pos .row:first-of-type { border-top: 0; }
.tp-empty { text-align: center; color: var(--text-2); padding: 18px 4px 6px; }
.tp-empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

/* ---------- tables */

.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); letter-spacing: .02em; text-transform: uppercase; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 14px 12px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--bg-hover); }
.tbl .r { text-align: right; }
.tbl td.r { font-variant-numeric: tabular-nums; }
.mkt-cell { display: flex; gap: 12px; align-items: center; min-width: 220px; }
.mkt-cell img, .mkt-cell .ph { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; background: var(--bg-soft); }
.mkt-cell a { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.mkt-cell a:hover { text-decoration: underline; }
.mkt-cell .meta { display: flex; gap: 6px; align-items: center; margin-top: 4px; font-size: 12.5px; color: var(--text-2); }
.pnl { font-weight: 600; }
.pnl small { display: block; font-size: 12px; font-weight: 500; }

/* ---------- portfolio */

.pf-top { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.pf-card { padding: 20px; display: flex; flex-direction: column; min-height: 196px; }
.pf-card .lbl { display: flex; align-items: center; gap: 6px; }
.pf-big { font-size: 32px; font-weight: 600; letter-spacing: -.03em; margin-top: 6px; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 8px; }
.pf-big .coin { width: 24px; height: 24px; }
.pf-sub { margin-top: 2px; font-size: 13.5px; color: var(--text-2); }
.pf-row { display: flex; gap: 28px; margin-top: auto; padding-top: 16px; flex-wrap: wrap; }
.pf-row div { font-size: 13px; color: var(--text-2); }
.pf-row b { display: block; color: var(--text); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 76px; margin-top: 12px; }
.bars i { flex: 1; min-height: 3px; border-radius: 3px 3px 1px 1px; background: var(--blue); opacity: .85; }
.bars i.goal { background: var(--yes); }
.bars i.zero { background: var(--line); opacity: 1; }
.bars-x { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); margin-top: 6px; }

/* ---------- leaderboard / profile */

.lb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.lb-layout > * { min-width: 0; }
.lb-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 4px; flex-wrap: wrap; }
.select { height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); padding: 0 32px 0 12px; font-size: 14px; font-weight: 500; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m6 8 4 4 4-4' fill='none' stroke='%236b727b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 16px; cursor: pointer; }
.lb-search { display: flex; align-items: center; gap: 8px; height: 46px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.lb-search svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
.lb-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 14px; }
.lb-search .cols { display: flex; gap: 16px; font-size: 13px; font-weight: 500; }
.lb-search .cols span { width: 120px; text-align: right; }
.lb-search .cols span.on { color: var(--text); font-weight: 600; }
.lb-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.lb-row:hover .nm { text-decoration: underline; }
.lb-row.me { background: var(--blue-soft); margin: 0 -12px; padding: 12px; border-radius: 10px; border-bottom-color: transparent; }
.lb-row .rk { width: 28px; text-align: center; color: var(--text-2); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; flex: none; }
.lb-row .av { width: 40px; height: 40px; font-size: 20px; position: relative; }
.lb-row .medal { position: absolute; left: -2px; bottom: -2px; width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--panel); }
.lb-row .nm { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .c1, .lb-row .c2 { width: 120px; text-align: right; font-variant-numeric: tabular-nums; flex: none; }
.lb-row .c1 { font-weight: 600; }
.lb-row .c2 { color: var(--text-2); font-size: 13.5px; }
.lb-pinned { position: sticky; bottom: 12px; margin-top: 12px; background: var(--panel); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 0 12px; }
.lb-pinned .lb-row { border: 0; }
.lb-pinned .lb-row.me { margin: 0; background: none; padding: 12px 0; }
#wins small b { color: var(--yes-ink); font-weight: 600; }

.prof-head { display: flex; gap: 20px; align-items: center; }
.prof-head .av { width: 88px; height: 88px; font-size: 44px; }
.prof-head h1 { font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.prof-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 24px; }
.prof-stats div { padding: 4px 20px; border-left: 1px solid var(--line); }
.prof-stats div:first-child { border-left: 0; padding-left: 0; }
.prof-stats small { display: block; font-size: 13px; color: var(--text-2); }
.prof-stats b { display: block; font-size: 22px; font-weight: 600; margin-top: 4px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.heat { display: grid; grid-template-columns: repeat(28, 1fr); gap: 4px; margin-top: 12px; }
.heat i { aspect-ratio: 1; border-radius: 3px; background: var(--bg-soft); }
.heat i.l1 { background: color-mix(in srgb, var(--yes) 25%, var(--bg-soft)); }
.heat i.l2 { background: color-mix(in srgb, var(--yes) 50%, var(--bg-soft)); }
.heat i.l3 { background: color-mix(in srgb, var(--yes) 75%, var(--bg-soft)); }
.heat i.l4 { background: var(--yes); }

/* ---------- how it works / prose / forms */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.step { padding: 20px; }
.step .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-weight: 700; font-size: 13px; }
.step h3 { font-size: 16px; font-weight: 600; margin-top: 12px; }
.step p { color: var(--text-2); margin-top: 6px; line-height: 1.55; }
.kv { display: grid; grid-template-columns: 1fr 1fr; }
.kv div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.kv div:nth-child(-n+2) { border-top: 0; }
.kv div:nth-child(odd) { border-right: 1px solid var(--line); }
.kv span { color: var(--text-2); }
.kv b { font-weight: 600; text-align: right; }
.olist { margin: 14px 0 0; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.olist li { list-style: none; counter-increment: s; position: relative; padding-left: 34px; color: var(--text-2); line-height: 1.55; }
.olist li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--bg-soft); color: var(--text); font-weight: 600; font-size: 12px; display: grid; place-items: center; }
.olist b { color: var(--text); font-weight: 600; }
.code { display: inline-flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: 8px; background: var(--bg-soft); font-weight: 700; font-size: 16px; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-2); font-weight: 400; font-size: 20px; line-height: 20px; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--text-2); margin-top: 8px; line-height: 1.6; }
.prose { max-width: 720px; }
.prose h2 { font-size: 18px; font-weight: 600; margin: 26px 0 6px; }
.prose p { color: var(--text-2); line-height: 1.65; margin-bottom: 8px; }
.narrow { max-width: 460px; margin: 24px auto 0; }
.narrow.wide { max-width: 640px; }
.avatar-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.avatar-grid button { aspect-ratio: 1; border-radius: 50%; border: 2px solid transparent; font-size: 22px; padding: 0; }
.avatar-grid button.on { border-color: var(--blue); }
.league-row { display: flex; align-items: center; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.league-row:first-child { border-top: 0; }
.league-row .nm { flex: 1; min-width: 140px; }
.league-row .nm b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.league-row .nm small { color: var(--text-2); }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.inline { display: flex; gap: 8px; }

/* ---------- toasts, modal */

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--panel); box-shadow: var(--shadow-pop); font-size: 14px; animation: tin .2s ease; }
.toast .ti { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; }
.toast .ti svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.toast .ti.ok { background: var(--yes); }
.toast .ti.err { background: var(--no); }
.toast .ti.info { background: var(--blue); }
.toast b { display: block; font-weight: 600; }
.toast p { color: var(--text-2); font-size: 13px; margin-top: 1px; }
.toast.out { opacity: 0; transform: translateY(6px); transition: all .2s; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
.modal-back { position: fixed; inset: 0; z-index: 90; background: rgba(15, 17, 20, .45); display: grid; place-items: center; padding: 16px; animation: fade .12s ease; }
.modal { width: min(420px, 100%); padding: 22px; }
.modal h3 { font-size: 18px; font-weight: 600; }
.modal p { color: var(--text-2); margin-top: 8px; line-height: 1.55; }
.modal .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
@keyframes fade { from { opacity: 0; } }

/* ---------- footer, tab bar */

.foot { border-top: 1px solid var(--line); margin-top: 32px; }
.foot-in { max-width: 1320px; margin: 0 auto; padding: 24px 24px 36px; color: var(--text-2); font-size: 13px; }
.foot-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.foot-top .logo { color: var(--text); }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a:hover, .foot-links button:hover { color: var(--text); }
.foot p { max-width: 760px; line-height: 1.6; }
.tabbar { display: none; }

/* ---------- responsive */

@media (max-width: 1280px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .top-grid, .lb-layout, .ev-grid { grid-template-columns: minmax(0, 1fr); }
  .tp { position: static; }
  .feat-body { grid-template-columns: minmax(0, 1fr); }
  .feat-chart { min-height: 200px; }
  .hdr-right .hide-t { display: none; }
}
@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
  .prof-stats { grid-template-columns: 1fr 1fr; gap: 16px 0; }
  .prof-stats div:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 680px) {
  .app { padding: 14px 16px 96px; }
  .hdr-row { padding: 0 16px; gap: 12px; height: 56px; }
  .hdr .logo span { display: none; }
  .hsearch kbd { display: none; }
  .hdr-right .hlink, .hdr-right .hsep, .hdr-right .hide-m { display: none; }
  .hstat { padding: 2px 4px; }
  .cats { padding: 0 8px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .strip { gap: 8px 14px; }
  .strip .s-sep { display: none; }
  .strip .s-cta { margin-left: 0; }
  .strip .s-cta .btn { display: none; }
  .feat { min-height: 0; }
  .feat-head h2 { font-size: 18px; }
  .orow { grid-template-columns: minmax(0, 1fr) 64px; gap: 10px; }
  .orow .pc b { font-size: 20px; }
  .orow .acts { grid-column: 1 / -1; }
  .orow .acts .by, .orow .acts .bn { flex: 1; min-width: 0; }
  .pf-top { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .kv div:nth-child(odd) { border-right: 0; }
  .kv div:nth-child(2) { border-top: 1px solid var(--line); }
  .form-2 { grid-template-columns: 1fr; }
  .tbl .hide-m { display: none; }
  .tbl td, .tbl th { padding: 12px 8px; }
  .lb-row .c2, .lb-search .cols span.c2 { display: none; }
  .lb-row .c1, .lb-search .cols span { width: auto; }
  .prof-head .av { width: 64px; height: 64px; font-size: 32px; }
  .prof-head h1 { font-size: 22px; }
  .h1 { font-size: 24px; }
  .avatar-grid { grid-template-columns: repeat(6, 1fr); }
  .heat { grid-template-columns: repeat(14, 1fr); }
  .foot { display: none; }
  .toasts { right: 16px; bottom: 80px; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--bg); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 500; color: var(--text-2); padding: 3px 0; }
  .tabbar a.on { color: var(--text); font-weight: 600; }
  .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
}

/* ---------- live bets */

.sec-head .live { margin-left: auto; }
.live-card { overflow: hidden; }
.live-head { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.live-head .utabs { border-bottom: 0; }
.live-tbl td { padding: 10px 12px; }
.live-tbl tbody tr.new { animation: rowin 1.2s ease; }
@keyframes rowin { from { background: var(--blue-soft); } }
.live-mk { display: flex; gap: 10px; align-items: center; min-width: 0; max-width: 420px; font-weight: 600; }
.live-mk img, .live-mk .ph { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; flex: none; background: var(--bg-soft); }
.live-mk span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-mk:hover span { text-decoration: underline; }
.live-sub { margin: 4px 0 0 38px; display: flex; gap: 6px; align-items: center; font-size: 12.5px; }
.live-pl { display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.live-pl .av { width: 24px; height: 24px; font-size: 13px; }
.live-pl:hover span { text-decoration: underline; }
.pay-win { color: var(--yes-ink); font-weight: 600; }
.pay-loss { color: var(--no-ink); font-weight: 600; }
.pay-open { color: var(--text-2); font-size: 13px; }
@media (max-width: 680px) {
  .live-mk { max-width: 180px; }
  .live-sub { margin-left: 0; }
  .live-mk img, .live-mk .ph { display: none; }
  .live-pl span { display: none; }
}

/* ---------- chat */

.chat-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; margin-top: 18px; align-items: start; }
.chat-rooms { padding: 10px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 128px; }
.chat-rooms button { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--text-2); font-weight: 500; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat-rooms button:hover { background: var(--bg-soft); color: var(--text); }
.chat-rooms button.on { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.chat-rooms .hash { width: 14px; color: var(--text-3); font-weight: 600; }
.chat-room-add { margin: 8px 6px 2px; font-size: 13px; color: var(--blue); font-weight: 600; }
.chat-panel { display: flex; flex-direction: column; min-height: 0; }
.chat-title { display: flex; align-items: baseline; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-title b { font-size: 16px; font-weight: 600; }
.chat-title span { font-size: 13px; }
.chat { display: flex; flex-direction: column; }
.chat-live .chat-list { height: min(62vh, 640px); overflow-y: auto; padding: 8px 18px; }
.chat-comments .chat-list { padding: 4px 0; }
.chat-empty { padding: 40px 12px; text-align: center; color: var(--text-2); }
.chat-older { display: block; margin: 6px auto 10px; border: 0; background: var(--bg-soft); color: var(--text-2); font-weight: 600; font-size: 13px; height: 30px; padding: 0 12px; border-radius: 15px; }
.chat-older:hover { color: var(--text); }
.msg { display: flex; gap: 10px; padding: 10px 0; }
.chat-comments .msg { border-bottom: 1px solid var(--line); padding: 14px 0; }
.msg .av { width: 34px; height: 34px; font-size: 17px; }
.msg-main { flex: 1; min-width: 0; }
.msg-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.msg-name { font-weight: 600; font-size: 14px; }
.msg-name:hover { text-decoration: underline; }
.msg-time { color: var(--text-3); }
.msg-acts { margin-left: auto; display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.msg:hover .msg-acts { opacity: 1; }
.msg-acts button { width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; color: var(--text-3); display: grid; place-items: center; }
.msg-acts button:hover { background: var(--bg-soft); color: var(--text); }
.msg-acts svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.msg-body { margin-top: 2px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.chat-compose { padding: 12px 18px 14px; border-top: 1px solid var(--line); }
.chat-comments .chat-compose { border-top: 0; padding: 14px 0 6px; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-form textarea { flex: 1; min-height: 40px; max-height: 120px; resize: none; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 14px; background: var(--panel); color: var(--text); outline: none; line-height: 1.45; }
.chat-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.chat-form .btn { height: 40px; }
.chat-note { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 12.5px; }
.chat-locked { padding: 12px 14px; border-radius: 10px; background: var(--bg-soft); color: var(--text-2); font-size: 14px; }
.chat-locked a { font-weight: 600; margin-left: 4px; }
.badge-chip { display: inline-flex; vertical-align: middle; }
.badge-ico { display: block; flex: none; }
@media (max-width: 860px) {
  .chat-layout { grid-template-columns: minmax(0, 1fr); }
  .chat-rooms { position: static; flex-direction: row; overflow-x: auto; }
  .chat-rooms .label, .chat-rooms p { display: none; }
  .chat-rooms button { flex: none; }
  .chat-live .chat-list { height: 58vh; padding: 6px 12px; }
  .chat-compose { padding: 10px 12px 12px; }
  .msg-acts { opacity: 1; }
}

/* ---------- weekly */

.wk-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.wk-hero .sub b { color: var(--text); font-weight: 600; }
.wk-score { display: flex; align-items: baseline; gap: 6px; padding: 10px 16px; border-radius: 12px; background: var(--bg-soft); }
.wk-score b { font-size: 26px; font-weight: 600; }
.wk-score span { color: var(--text-2); }
.wk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.wk-ch { padding: 16px; }
.wk-ch.done { box-shadow: 0 0 0 1.5px var(--yes), var(--shadow); }
.wk-ch-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.wk-ch-top b { font-weight: 600; line-height: 1.35; }
.wk-reward { font-weight: 600; white-space: nowrap; }
.wk-bar { height: 6px; border-radius: 3px; background: var(--bg-soft); overflow: hidden; margin-top: 14px; }
.wk-bar i { display: block; height: 100%; border-radius: 3px; background: var(--blue); }
.wk-ch.done .wk-bar i { background: var(--yes); }
.wk-ch-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 13px; }
.wk-perfect { display: flex; gap: 14px; align-items: center; padding: 16px 18px; margin-top: 14px; }
.wk-perfect b { font-weight: 600; }
.wk-perfect p { font-size: 13.5px; margin-top: 1px; }
.wk-perfect.done { box-shadow: 0 0 0 1.5px #7c5cff, var(--shadow); }
.wk-races { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.wk-race { padding: 4px 18px 8px; }
.wk-race-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 14px 0 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.wk-race-head h2 { font-size: 18px; font-weight: 600; }
.wk-race-head p { font-size: 13px; }
.prizes { display: flex; gap: 10px; flex-wrap: wrap; }
.prize { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.wk-race .lb-row:last-child { border-bottom: 0; }
.wk-race .lb-row .nm { display: flex; align-items: center; gap: 6px; }
.wk-tier { flex: none; }
.wk-champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px; padding: 10px; }
.wk-champ { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; }
.wk-champ:hover { background: var(--bg-hover); }
.wk-champ b { display: block; font-weight: 600; }
.wk-champ small { color: var(--text-2); }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.badge-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; }
.badge-card b { display: block; font-weight: 600; font-size: 14px; }
.badge-card small { display: block; color: var(--text-2); font-size: 12.5px; line-height: 1.35; margin-top: 1px; }
.badge-card.locked { opacity: .45; filter: grayscale(1); }
.lb-row .nm .badge-chip { margin-left: 6px; }
.menu-head .badge-chip { margin-left: 4px; }
@media (max-width: 1100px) { .wk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wk-races { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 680px) { .wk-grid { grid-template-columns: minmax(0, 1fr); } .tabbar { grid-template-columns: repeat(5, 1fr) !important; } }

/* ---------- daily call */

.dc { padding: 16px 16px 14px; }
.dc-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.dc-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .05em; font-size: 12px; }
.dc-label svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.dc-x2 { font-size: 11px; font-weight: 700; color: #c58a0b; background: rgba(234, 179, 8, .16); padding: 2px 7px; border-radius: 999px; }
.dc-time { margin-left: auto; white-space: nowrap; }
.dc-time b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.dc-q { display: flex; gap: 10px; align-items: center; margin-top: 12px; font-weight: 600; font-size: 15px; line-height: 1.35; }
.dc-q img, .dc-q .ph { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; background: var(--bg-soft); }
.dc-q > span { min-width: 0; }
.dc-q b { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }
.dc-q small { display: block; font-size: 12px; font-weight: 500; color: var(--text-2); margin-bottom: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-q:hover b { text-decoration: underline; }
.dc-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.dc-picks button { height: 44px; padding: 0 10px; border-radius: 9px; font-size: 14.5px; gap: 8px; min-width: 0; }
.dc-picks button span { overflow: hidden; text-overflow: ellipsis; }
.dc-picks button b { font-weight: 600; opacity: .75; font-variant-numeric: tabular-nums; }
.dc-picks.dis button { cursor: default; opacity: .65; }
.dc-picks.dis .by:hover { background: var(--yes-soft); }
.dc-picks.dis .bn:hover { background: var(--no-soft); }
.dc-picks.dis .bt:hover { background: var(--bg-soft); }
.dc-lock { margin-top: 8px; height: 40px; }
.dc-note { margin-top: 12px; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.dc-note b { color: var(--text); font-weight: 600; }
.dc-note b.up { color: var(--yes-ink); }
.dc-note b.down { color: var(--no-ink); }
.dc-note a { color: var(--blue); font-weight: 600; }
.dc-note a:hover { text-decoration: underline; }
.dc-bar { height: 8px; border-radius: 4px; background: var(--no); overflow: hidden; margin-top: 14px; }
.dc-bar i { display: block; height: 100%; background: var(--yes); border-right: 2px solid var(--panel); }
.dc-split { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12.5px; font-weight: 600; }
.dc-split .muted { font-weight: 500; }
.dc-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
.dc-foot b { color: var(--text); font-weight: 600; }
.dc-dots { display: inline-flex; gap: 3px; }
.dc-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.dc-dots i.right { background: var(--yes); }
.dc-dots i.wrong { background: var(--no); }
.dc-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.dc-dots + .dc-last { margin-left: auto; }
/* Home: one wide row above the featured market. */
.dc.wide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); grid-template-areas: "head body" "q body" "foot foot"; column-gap: 32px; margin-bottom: 20px; padding: 16px 20px 14px; }
.dc.wide .dc-head { grid-area: head; }
.dc.wide .dc-q { grid-area: q; margin-top: 8px; font-size: 16px; }
.dc.wide .dc-body { grid-area: body; align-self: center; }
.dc.wide .dc-body > :first-child { margin-top: 0; }
.dc.wide .dc-foot { grid-area: foot; }
.dc.wide .dc-note { margin-top: 8px; }
@media (max-width: 860px) {
  .dc.wide { display: block; }
  .dc.wide .dc-body > :first-child { margin-top: 14px; }
}

/* ---------- levels */

.lvl { display: inline-grid; place-items: center; min-width: 20px; height: 17px; padding: 0 5px; border-radius: 5px; font-size: 10.5px; font-weight: 700; line-height: 1; color: #fff; background: var(--lv, #8f9aa8); margin-left: 6px; vertical-align: 1px; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.lvbar-top { display: flex; align-items: baseline; gap: 6px; font-size: 13px; white-space: nowrap; }
.lvbar-top b { font-weight: 600; }
.lvbar-top span { color: var(--text-2); }
.lvbar-top small { margin-left: auto; color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.xpbar { height: 6px; border-radius: 3px; background: var(--bg-soft); overflow: hidden; margin-top: 7px; }
.xpbar i { display: block; height: 100%; border-radius: 3px; min-width: 3px; }
.menu-lv { padding: 4px 10px 8px; }
.prof-lv { margin-top: 10px; max-width: 360px; }
.wk-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.wk-lv h2 { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.xp-list { list-style: none; margin-top: 14px; display: grid; gap: 0; }
.xp-list li { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.xp-list li:first-child { border-top: 0; }
.xp-list b { width: 64px; flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.xp-list span { color: var(--text-2); }
@media (max-width: 860px) { .wk-pair { grid-template-columns: minmax(0, 1fr); } }
