:root {
  --black: #000000;
  --text: #EDEDEF;
  --muted: #8A8A93;
  --accent: #EDEDEF;
  --idle: #4A4A52;
  --chip: #151518;
  --chip-border: #2A2A30;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --space: 'Space Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--black);
  color: var(--text);
  overscroll-behavior: none;
}

.stage {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 480px;
  overflow: hidden;
  font-family: var(--mono);
  user-select: none;
  -webkit-user-select: none;
}

.water {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.hit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  outline: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.hit:focus-visible { box-shadow: inset 0 0 0 2px #3A3A40; }

.fade-top, .fade-bottom, .header, .center, .chips, .mine {
  position: absolute;
  pointer-events: none;
}

.fade-top {
  left: 0; right: 0; top: 0;
  height: 120px;
  background: linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 45%, rgba(0,0,0,0.8) 80%);
}

.fade-bottom {
  left: 0; right: 0; bottom: 0;
  height: 240px;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.75) 45%, #000 80%);
}

.box { background: var(--black); font-family: var(--space); }

.header {
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px;
  padding-top: max(20px, env(safe-area-inset-top));
}
.brand { margin: 0; padding: 12px 16px; font-size: 14px; font-weight: 400; letter-spacing: 0.02em; }
.online { display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-size: 13px; color: var(--muted); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #4A4A52; }
.dot.live { background: #4ADE80; }

.center {
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 16px 120px;
}
.label {
  padding: 12px 18px 4px;
  border: 2px solid var(--black);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--muted);
}
.number {
  max-width: 100%;
  padding: 9px 20px;
  font-size: clamp(28px, 7.4vw, 90px);
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.today {
  padding: 7px 18px 12px;
  border: 2px solid var(--black);
  font-size: 13px;
  color: var(--muted);
}
/* Digit groups: 2/3 of a character apart instead of a full space. */
.g + .g { margin-left: 0.667ch; }

.chips { inset: 0; }
.chip {
  position: absolute;
  animation: float 7000ms cubic-bezier(.3,.5,.4,1) both;
}
.chip-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px 7px 9px;
  border-radius: 999px;
  background: var(--chip);
  border: 1px solid var(--chip-border);
  transform: translateX(-50%);
  white-space: nowrap;
}
.chip.you .chip-inner { border-color: var(--accent); }
.chip img, .chip .noflag {
  width: 20px;
  height: 15px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.14);
  object-fit: cover;
  display: block;
}
.chip .noflag { background: #2A2A30; }
.chip .amount { font-size: 15px; font-weight: 500; }
.chip.you .amount { color: var(--accent); }
.chip .code { font-size: 11px; letter-spacing: 0.08em; color: var(--muted); }
@keyframes float {
  0% { transform: translateY(28px); opacity: 0; }
  6% { opacity: 1; }
  86% { opacity: 1; }
  100% { transform: translateY(calc(-1 * var(--rise, 40vh))); opacity: 0; }
}

.mine {
  left: 0; right: 0;
  bottom: max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 28px;
}
.personal {
  font-family: var(--space);
  font-size: 25px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--idle);
  transform-origin: center;
}
.personal.active { color: var(--accent); }
.bar { width: 220px; height: 8px; border-radius: 2px; background: #26262C; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--accent); border-radius: 2px; }

/* Turnstile stays invisible unless Cloudflare decides a visitor must interact with it. */
.turnstile { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 10; }

@media (prefers-reduced-motion: reduce) {
  .chip { animation-timing-function: linear; }
}
