@font-face {
  font-family: "Clash Display";
  src: url("/assets/clash.woff2") format("woff2");
  font-weight: 200 700;
  font-display: swap;
}
@font-face {
  font-family: "TT Hoves Pro";
  src: url("/assets/hoves.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "TT Hoves Pro";
  src: url("/assets/hoves-medium.woff2") format("woff2");
  font-weight: 500 600;
  font-display: swap;
}
@font-face {
  font-family: "TT Hoves Pro";
  src: url("/assets/hoves-bold.woff2") format("woff2");
  font-weight: 650 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --crsh-canvas: #000;
  --crsh-surface-inset: #0e0e11;
  --crsh-surface: #151517;
  --crsh-surface-raised: #1e1e21;
  --crsh-surface-control: #29292d;
  --crsh-divider: #302d35;
  --crsh-control-edge: #797381;
  --crsh-text: #f4f4f5;
  --crsh-text-muted: #b9b3c1;
  --crsh-focus: #cba8ff;
  --canvas: var(--crsh-canvas);
  --ink: var(--crsh-text);
  --muted: var(--crsh-text-muted);
  --panel: var(--crsh-surface);
  --raised: var(--crsh-surface-raised);
  --line: var(--crsh-divider);
  --focus: var(--crsh-focus);
  --violet: #891bf7;
  --lavender: #d5b1ff;
  --mint: #a5ec99;
  --gold: #ffe600;
  --header-height: 70px;
  --ticker-height: 42px;
  --chrome-height: calc(var(--header-height) + var(--ticker-height));
  --font-body: "TT Hoves Pro", Arial, sans-serif;
  --font-display: "Clash Display", "TT Hoves Pro", sans-serif;
  font: 400 16px / 1.4 var(--font-body);
  color: var(--ink);
  background: var(--canvas);
  scroll-padding-top: calc(var(--chrome-height) + 12px);
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  min-height: 100svh;
  margin: 0;
  padding-top: var(--chrome-height);
}
button,
input,
select {
  font: inherit;
}
button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--ink);
  background: var(--raised);
  font-weight: 650;
  cursor: pointer;
}
button:hover,
.button:hover {
  background: #343139;
}
button:disabled,
input:disabled {
  opacity: 0.55;
  cursor: default;
}
:where(button, a, select, input, summary):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p,
dl,
dd,
fieldset {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1.12;
  overflow-wrap: anywhere;
}
h1 {
  font-size: clamp(32px, 4vw, 52px);
}
h2 {
  font-size: 22px;
}
h3 {
  font-size: 18px;
}
p {
  color: var(--muted);
  max-width: 65ch;
}
label,
legend {
  display: block;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
}
fieldset {
  min-width: 0;
  border: 0;
  padding: 0;
}
input:not([type="radio"]):not([type="range"]),
select {
  min-width: 0;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--crsh-control-edge);
  border-radius: 8px;
  background: var(--crsh-surface-inset);
  color: var(--ink);
}
input:not([type="radio"]):not([type="range"]) {
  display: block;
  width: 100%;
  margin: 6px 0 12px;
}
input[type="range"] {
  display: block;
  width: 100%;
  min-height: 36px;
  margin: 0;
  accent-color: var(--lavender);
  cursor: pointer;
}
input[type="range"]:disabled {
  cursor: default;
}
input[type="radio"] {
  accent-color: var(--lavender);
}
.primary {
  color: white;
  background: var(--violet);
}
.primary:hover {
  background: #9a38fc;
}
.wide {
  width: 100%;
}
.text-button,
.link-button {
  color: var(--ink);
  background: transparent;
}
.text-button:hover,
.link-button:hover {
  background: var(--raised);
}
.link-button {
  color: var(--lavender);
}
.outline {
  background: transparent;
  border-color: var(--crsh-control-edge);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 22;
  padding: 9px 14px;
  background: var(--panel);
}
.skip:focus {
  top: 6px;
}

.masthead {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  background: var(--canvas);
}
.mast-inner {
  height: var(--header-height);
  display: grid;
  align-items: center;
  grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr);
  gap: clamp(8px, 1vw, 12px);
  padding: 8px clamp(14px, 2.6vw, 36px);
  border-bottom: 1px solid #2d2933;
}
.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 44px;
}
.brand img {
  display: block;
  width: 64px;
  height: auto;
}
.main-nav,
.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.main-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 clamp(8px, 1vw, 16px);
  border-radius: 8px;
  color: #c6b7d0;
  font: 400 15px / 1 var(--font-display);
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: white;
  background: var(--crsh-surface-control);
}
.header-actions {
  justify-self: end;
  gap: 6px;
}
.wallet-trigger {
  max-width: 40vw;
  background: var(--raised);
  font-size: 13px;
}
#balance {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coin-icon {
  width: 15px;
  height: 15px;
  flex: none;
  border: 2px solid var(--gold);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #4c3921;
  background: #cda700;
}
#logout {
  font: 400 15px / 1 var(--font-display);
}
#logout .lock-mark {
  display: none;
}

.archive-rail {
  display: flex;
  align-items: center;
  height: var(--ticker-height);
  overflow: hidden;
  border-bottom: 1px solid #2a2530;
  background: var(--crsh-surface-inset);
}
.demo-band,
.dialog-band {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 650 12px / 1 var(--font-body);
  white-space: nowrap;
}
.demo-band {
  position: relative;
  z-index: 1;
  flex: none;
  min-height: 100%;
  padding: 0 clamp(14px, 2vw, 32px);
  background: #21162b;
  color: #ead7ff;
  border-right: 1px solid #47344e;
}
.rewind {
  width: 15px;
  height: 9px;
  background: #cd9bff;
  clip-path: polygon(0 50%, 48% 0, 48% 45%, 100% 0, 100% 100%, 48% 55%, 48% 100%);
}
.dot {
  width: 3px;
  height: 3px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}
.ticker-window {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 2%, black 98%, transparent);
}
.ticker-track,
.ticker-group,
.ticker-item,
.ticker-face {
  display: flex;
  align-items: center;
}
.ticker-track {
  width: max-content;
  animation: ticker-scroll 75s linear infinite;
}
.ticker-group {
  flex: none;
  gap: 32px;
  padding-right: 32px;
}
.ticker-item {
  gap: 6px;
  white-space: nowrap;
  font-size: 12px;
}
.ticker-item b {
  font: 650 13px var(--font-display);
}
.ticker-title {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 24ch;
  color: var(--muted);
}
.ticker-item time {
  color: #a7e46e;
  font-family: var(--font-display);
  font-weight: 650;
}
.ticker-face,
.market-icon {
  width: 26px;
  height: 26px;
  flex: none;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: #492769;
  color: #e6d0ff;
  font-size: 18px;
  font-weight: 700;
}
.ticker-face img,
.market-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.archive-rail:hover .ticker-track {
  animation-play-state: paused;
}
@keyframes ticker-scroll {
  to {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
  }
}

.frame {
  width: min(calc(100% - 48px), 1440px);
  margin-inline: auto;
}
.content {
  margin-block: 0 72px;
  padding-top: clamp(24px, 3vw, 46px);
}
.content:has(.replay-watch) {
  width: 100%;
  padding: 0;
  margin: 0 auto;
}
.content:focus {
  outline: none;
}
.notice:empty,
.error:empty {
  display: none;
}
.notice {
  background: #241b31;
  color: #efddff;
  font-weight: 500;
  padding: 8px 14px;
  margin-top: 8px;
  border-radius: 8px;
}
.error {
  margin-top: 10px;
  color: #ffc0b7;
  font-size: 14px;
}
.section-title h1,
.record-title {
  margin-bottom: 18px;
}
.gate-layout {
  min-height: calc(100svh - var(--chrome-height));
  display: grid;
  place-items: center;
  padding: 24px;
}
.gate-form {
  width: min(100%, 420px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px;
}
.gate-form h1 {
  font-size: 30px;
}
.gate-form p {
  margin-top: 9px;
}
.gate-form form {
  margin-top: 22px;
}
.gate-form .primary {
  margin-top: 6px;
}

.filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 28px;
}
.filters fieldset {
  margin-right: auto;
}
.filters legend,
.filters label {
  margin-bottom: 6px;
  color: var(--muted);
}
.segments,
.presets {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.segments button {
  min-width: 44px;
  min-height: 36px;
  border-radius: 8px;
  color: #c6b7d0;
  background: var(--raised);
  font-size: 13px;
}
.segments button:hover {
  background: var(--crsh-surface-control);
}
.segments button[aria-pressed="true"] {
  background: #44314e;
  color: #f4e6ff;
  border-color: #886b9a;
}
.select-filter {
  max-width: 100%;
}
.select-filter select {
  width: min(100%, 240px);
  min-width: 140px;
  min-height: 36px;
  font-size: 13px;
}
.list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.list-head h2 {
  font-size: 22px;
}
.count,
.metadata,
.stamp,
.help {
  color: var(--muted);
  font-size: 13px;
}
.help {
  margin: 6px 0 12px;
}
.market-list,
.record-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.market-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 22px 14px;
}
.market-row {
  display: block;
  border-radius: 12px;
  color: var(--ink);
}
.market-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  overflow: hidden;
  aspect-ratio: 1.95 / 1;
  padding: 12px;
  border: 1px solid #35313b;
  border-radius: 12px;
  background: #1b1b1f;
}
.market-preview.has-cover {
  background: #29262e;
}
.game-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.market-row:hover .market-preview {
  border-color: #b786ff;
}
.market-preview .status-line,
.market-prompt {
  position: relative;
}
.market-preview .status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.market-prompt {
  font: 650 clamp(17px, 1.45vw, 24px) / 1.13 var(--font-display);
  overflow-wrap: anywhere;
}
.market-caption {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 11px 2px 3px;
}
.market-caption > div {
  min-width: 0;
}
.market-icon {
  display: inline-flex;
  align-items: center;
  width: 32px;
  height: 32px;
}
.market-caption h3 {
  font-size: 17px;
  margin-block: 3px;
}
.metadata,
.status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #302b38;
  color: #eee8f3;
  font: 700 10px / 1.2 var(--font-body);
  text-transform: uppercase;
}
.tag.ended {
  background: #443458;
  color: white;
}
.tag.study,
.tag.locked {
  background: #372144;
  color: #efc9ff;
}
.tag.sample {
  font-size: 9px;
  color: #d8d1df;
  background: #252229;
}
.stamp {
  display: inline-block;
}
.empty,
.panel {
  padding: 20px;
  background: var(--panel);
  border-radius: 12px;
}
.empty p {
  margin: 6px 0 12px;
}
.back {
  display: inline-flex;
  align-items: center;
  color: var(--lavender);
  font-size: 14px;
}
.wallet-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
  overflow: hidden;
}
.stats > div {
  min-width: 0;
  padding: 18px;
  background: var(--panel);
}
dt {
  color: var(--muted);
  font-size: 13px;
}
.stats dd {
  margin-top: 5px;
  font: 650 25px / 1.2 var(--font-display);
  overflow-wrap: anywhere;
}
.stats dd small {
  font: 500 13px var(--font-body);
  color: var(--muted);
}
.record-list li + li {
  margin-top: 8px;
}
.record-list details {
  background: var(--panel);
  border-radius: 12px;
  overflow: hidden;
}
.record-list summary {
  cursor: pointer;
  padding: 14px 16px;
}
.record-list summary:hover {
  background: var(--raised);
}
.record-list summary strong {
  margin-inline: 8px;
  overflow-wrap: anywhere;
}
.record-list summary small {
  color: var(--muted);
}
.result {
  padding: 16px;
  background: var(--panel);
  border-radius: 12px;
}
.result-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.result-heading h2,
.result-heading h3 {
  font-size: 19px;
}
.tag.WIN {
  background: #263a27;
  color: #bcf2a8;
}
.tag.LOSS {
  background: #3b2934;
  color: #efbcd4;
}
.tag.VOID {
  background: #392f23;
  color: #f4d992;
}
.facts {
  margin: 10px 0 16px;
}
.facts div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.facts dd {
  text-align: right;
  font-weight: 650;
  overflow-wrap: anywhere;
}
dialog {
  width: min(440px, calc(100% - 24px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 0;
  border: 1px solid #3a3440;
  border-radius: 16px;
  color: var(--ink);
  background: var(--panel);
}
dialog::backdrop {
  background: #000c;
}
.dialog-band {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px;
  background: #271c33;
  color: #efdfff;
}
.dialog-body {
  padding: 22px;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.dialog-heading h2 {
  font-size: 23px;
}
.close {
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
  font-size: 22px;
}
.dialog-body form,
.dialog-body .actions {
  margin-top: 16px;
}
.actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.wallet-value {
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 11px;
  background: #3d2156;
  color: white;
  font: 650 29px / 1.2 var(--font-display);
  overflow-wrap: anywhere;
}
.wallet-value span {
  font: 500 13px var(--font-body);
  color: #ecdbf9;
}
.presets {
  margin-bottom: 14px;
}
.presets button {
  flex: 1;
}
.wallet-footer {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 16px;
}
.wallet-footer .link-button {
  padding-inline: 0;
}

@media (max-width: 720px) {
  :root {
    --header-height: 52px;
    --ticker-height: 34px;
  }
  body:not(.gate) {
    padding-bottom: calc(58px + env(safe-area-inset-bottom));
  }
  .mast-inner {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }
  .brand img {
    width: 44px;
  }
  .main-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 20;
    justify-content: space-around;
    padding: 3px 6px calc(3px + env(safe-area-inset-bottom));
    background: #111013;
    border-top: 1px solid var(--line);
  }
  .main-nav a {
    flex: 1;
    flex-direction: column;
    gap: 4px;
    height: 48px;
    min-height: 0;
    padding: 3px 6px;
    font: 650 11px / 1 var(--font-body);
  }
  .main-nav a[aria-current="page"] {
    color: var(--lavender);
    background: transparent;
  }
  .nav-screen,
  .nav-record {
    width: 16px;
    height: 12px;
    position: relative;
    border: 1.5px solid currentColor;
    border-radius: 2px;
  }
  .nav-screen::after {
    position: absolute;
    content: "";
    width: 7px;
    height: 2px;
    inset: auto auto -4px 3px;
    background: currentColor;
  }
  .nav-record {
    height: 15px;
  }
  .nav-record::after {
    position: absolute;
    content: "";
    inset: 4px 2px 3px;
    border-block: 1px solid currentColor;
  }
  .header-actions {
    grid-column: 2;
    gap: 3px;
  }
  .wallet-trigger {
    max-width: 61vw;
    min-height: 36px;
    padding: 7px 10px;
  }
  #logout {
    display: grid;
    place-items: center;
    width: 36px;
    min-height: 36px;
    padding: 0;
  }
  #logout .logout-label {
    display: none;
  }
  #logout .lock-mark {
    display: block;
    position: relative;
    width: 13px;
    height: 10px;
    margin-top: 5px;
    border: 1.5px solid currentColor;
    border-radius: 2px;
  }
  #logout .lock-mark::before {
    content: "";
    position: absolute;
    width: 8px;
    height: 7px;
    top: -7px;
    left: 1px;
    border: 1.5px solid currentColor;
    border-bottom: 0;
    border-radius: 5px 5px 0 0;
  }
  .demo-band {
    gap: 5px;
    padding-inline: 12px;
    font-size: 11px;
  }
  .frame {
    width: calc(100% - 28px);
  }
  .content {
    padding-top: 22px;
    margin-bottom: 26px;
  }
  .filters {
    gap: 10px;
    margin-block: 16px 22px;
  }
  .filters fieldset {
    width: 100%;
  }
  .segments {
    gap: 3px;
  }
  .segments button {
    min-width: 0;
    min-height: 38px;
    padding: 8px 11px;
  }
  .select-filter {
    flex: 1;
    min-width: 0;
  }
  .select-filter select {
    width: 100%;
    min-width: 0;
  }
  .market-list {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stats > div {
    padding: 13px;
  }
  .record-list summary small {
    display: block;
    margin-top: 3px;
  }
  .dialog-body,
  .gate-form {
    padding: 18px;
  }
  .gate-layout {
    padding: 14px;
  }
}
