:root {
  --bg: #09090b;
  --tile: #131316;
  --tile-2: #1b1b20;
  --line: #ffffff12;
  --line-2: #ffffff26;
  --text: #fafafa;
  --dim: #a1a1aa;
  --faint: #71717a;
  --accent: #ffffff;
  --accent-ink: #09090b;
  --prem: #8b5cf6;
  --prem-2: #6d28d9;
  --live: #22c55e;
  --dc: #5865f2;
  --r: 24px;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--bg); color-scheme: dark; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }

body {
  margin: 0;
  min-height: 100svh;
  color: var(--text);
  font: 400 15px/1.55 var(--ui);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 500px at 85% -10%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 70%),
    radial-gradient(800px 500px at -10% 110%, color-mix(in srgb, var(--prem) 12%, transparent), transparent 70%),
    radial-gradient(#ffffff0b 1px, transparent 1px) 0 0 / 22px 22px,
    var(--bg);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }

/* top bar */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 84px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 22px/1 var(--display);
  letter-spacing: -0.04em;
}

.logo img { width: 30px; height: 30px; }
.logo span { color: var(--faint); font-weight: 500; }

.pills {
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff06;
}

.pills a {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--dim);
  transition: color 160ms, background 160ms;
}

.pills a:hover { color: var(--text); }
.pills a[aria-current='page'] { background: var(--text); color: var(--bg); }

.top-cta { display: flex; gap: 8px; }

/* buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: #ffffff08;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: transform 160ms, background 160ms, border-color 160ms, filter 160ms;
}

.btn:hover { background: #ffffff12; border-color: #ffffff3d; transform: translateY(-1px); }
.btn:active { transform: none; }
.btn svg { width: 17px; height: 17px; }
.btn-sm { min-height: 38px; padding: 0 14px; border-radius: 11px; font-size: 13px; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent); border-color: var(--accent); filter: brightness(1.08); }
.btn-light { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-light:hover { background: #fff; border-color: #fff; }
.btn-dc { background: var(--dc); border-color: var(--dc); color: #fff; }
.btn-dc:hover { background: var(--dc); border-color: var(--dc); filter: brightness(1.1); }
.btn-prem { background: var(--prem); border-color: var(--prem); color: #fff; }
.btn-prem:hover { background: var(--prem); border-color: var(--prem); filter: brightness(1.1); }
.btn-block { width: 100%; }

/* bento */

.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 10px 0 60px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 170px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--tile);
  overflow: hidden;
  transition: transform 200ms, border-color 200ms;
}

a.tile:hover { transform: translateY(-3px); border-color: var(--line-2); }

.s2 { grid-column: span 2; }
.s3 { grid-column: span 3; }
.s4 { grid-column: span 4; }
.r2 { grid-row: span 2; }

.lbl {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.lbl b { color: var(--text); font-weight: 500; }

.num {
  margin-top: auto;
  font: 700 clamp(40px, 5vw, 64px)/1 var(--display);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.cap { margin-top: 8px; color: var(--dim); font-size: 14px; }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 10px var(--live);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink { 50% { opacity: 0.35; } }

.arrow {
  position: absolute;
  top: 20px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.55;
  transition: opacity 200ms, transform 200ms;
}

.arrow svg { width: 16px; height: 16px; }
a.tile:hover .arrow { opacity: 1; transform: rotate(-45deg); }

.t-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.t-accent .lbl { color: color-mix(in srgb, var(--accent-ink) 65%, transparent); }
.t-prem { background: linear-gradient(150deg, var(--prem), var(--prem-2)); border-color: #a78bfa55; }
.t-prem .lbl, .t-dc .lbl { color: #ffffffa8; }
.t-dc { background: var(--dc); border-color: #7c86ff; }

.big {
  font: 700 clamp(44px, 6.4vw, 84px)/0.95 var(--display);
  letter-spacing: -0.05em;
}

.big em { font-style: normal; color: var(--accent); }

.h2 {
  font: 700 clamp(26px, 3vw, 34px)/1.05 var(--display);
  letter-spacing: -0.035em;
}

.code {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #00000059;
  font: 500 12.5px/1.5 var(--mono);
  color: #e4e4e7;
  min-width: 0;
}

.code span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1; min-width: 0; }

.row { display: flex; flex-wrap: wrap; gap: 10px; }

.moonbg {
  position: absolute;
  right: -60px;
  bottom: -70px;
  width: 300px;
  opacity: 0.16;
  pointer-events: none;
  transform: rotate(-12deg);
}

/* games */

.strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.gcard {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--tile-2);
  transition: transform 200ms, border-color 200ms;
}

.gcard:hover { transform: translateY(-3px); border-color: var(--line-2); }
.gcard img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--tile-2); }
.gcard div { padding: 10px 12px 12px; font-size: 13px; font-weight: 600; line-height: 1.35; color: #e4e4e7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.ggrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
  padding-bottom: 70px;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 12px 16px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: #00000040;
  color: var(--faint);
}

.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 15px; }
.search input::placeholder { color: var(--faint); }
.search svg { width: 18px; height: 18px; }

/* lists */

.ticks { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.ticks li::before { content: ''; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 6px; background: #ffffff22 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat; }

.steps { display: grid; gap: 14px; margin: 16px 0 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 12px; color: var(--dim); font-size: 14.5px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--tile-2); border: 1px solid var(--line-2); color: var(--text); font: 700 13px var(--display); }
.steps b { color: var(--text); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font: 600 10.5px/1.4 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; background: #22c55e1f; color: #4ade80; border: 1px solid #22c55e4d; }

.table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14px; }
.table th, .table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.table td:not(:first-child), .table th:not(:first-child) { text-align: center; }
.yes { color: #4ade80; font-weight: 600; }
.no { color: var(--faint); }

/* modal */

.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 16px; background: #000000b3; }
.modal.on { display: grid; }
.modal .tile { width: min(440px, 100%); min-height: 0; background: #141418; animation: pop 220ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
.x { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line-2); background: #ffffff08; font-size: 18px; color: var(--dim); }
.coins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 16px 0; }
.coins button { padding: 9px 4px; border-radius: 10px; border: 1px solid var(--line-2); background: #ffffff06; font-weight: 600; font-size: 13px; color: var(--dim); }
.coins button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.qr { width: 150px; height: 150px; margin: 0 auto 12px; border-radius: 12px; background: var(--tile-2); }
.field { display: flex; gap: 6px; margin-top: 10px; }
.field input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: #00000059; font: 500 12px var(--mono); outline: none; }
.field input:focus { border-color: var(--accent); }
.msg { display: none; margin-top: 10px; padding: 9px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.45; }
.msg.ok { display: block; background: #22c55e1f; border: 1px solid #22c55e4d; color: #86efac; }
.msg.bad { display: block; background: #ef44441f; border: 1px solid #ef44444d; color: #fca5a5; }
.msg.wait { display: block; background: #ffffff0d; border: 1px solid var(--line-2); color: var(--dim); }

/* mobile dock */

.dock { display: none; }

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .s3, .s4 { grid-column: span 2; }
  .strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 28px); }
  .top { height: 70px; }
  .pills, .top-cta .hide-m { display: none; }
  .bento { gap: 10px; padding-bottom: 110px; }
  .ggrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-bottom: 110px; }
  .tile { padding: 20px; min-height: 140px; border-radius: 20px; }
  .r2 { grid-row: auto; }
  .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .strip a:nth-child(n + 7) { display: none; }
  .moonbg { width: 220px; }

  .dock {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 6px;
    border: 1px solid var(--line-2);
    border-radius: 20px;
    background: #131316f2;
  }

  .dock a {
    display: grid;
    justify-items: center;
    gap: 3px;
    padding: 8px 0 6px;
    border-radius: 14px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--faint);
  }

  .dock a svg { width: 20px; height: 20px; }
  .dock a[aria-current='page'] { background: #ffffff10; color: var(--text); }
  .dock a[aria-current='page'] svg { color: var(--accent); }
}

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