:root {
  --bg: #000000;
  --pill: #f6f3ea;
  --ink: #17150f;
  --soft: rgba(23, 21, 15, 0.56);
  --gold: #f2b632;
  --done: #2fbf71;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 16px;
}

.cb {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(316px, 100%);
  height: 64px;
  padding: 0 8px 0 9px;
  border: 0;
  border-radius: 32px;
  background: var(--pill);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 44px -16px color-mix(in srgb, var(--gold) 60%, transparent);
  transition: box-shadow 0.5s ease;
}
.cb.is-done { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 44px -16px color-mix(in srgb, var(--done) 60%, transparent); cursor: default; }
.cb:focus-visible { box-shadow: 0 0 0 2px #000000, 0 0 0 4px var(--gold); }

/* the balance as a level of gold inside the pill: it drains toward the arrow */
.cb__level { position: absolute; inset: 0; z-index: -3; background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 34%, var(--pill)), color-mix(in srgb, var(--gold) 12%, var(--pill))); transform-origin: 100% 50%; }
.cb__wash { position: absolute; inset: 0; z-index: -2; background: color-mix(in srgb, var(--done) 22%, var(--pill)); clip-path: circle(0 at 85% 50%); }
.cb__shine { position: absolute; top: 0; bottom: 0; left: 0; width: 46%; z-index: -1; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.75), transparent); transform: translateX(-110%); opacity: 0; }

.cb__coin { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: #ffffff; box-shadow: 0 0 0 1px rgba(23, 21, 15, 0.06), 0 4px 10px -4px rgba(23, 21, 15, 0.3); }
.cb__coin svg { width: 28px; height: 28px; overflow: visible; }
.cb__coin-edge { fill: color-mix(in srgb, var(--gold) 70%, #6b4a00); }
.cb__coin-face { fill: var(--gold); }
.cb__coin-mark { fill: none; stroke: color-mix(in srgb, var(--gold) 30%, #4a3300); stroke-width: 1.700; stroke-linecap: round; stroke-linejoin: round; }

.cb__text { display: flex; flex-direction: column; min-width: 0; }
.cb__small { display: block; height: 15px; overflow: hidden; font-size: 11.5px; line-height: 15px; font-weight: 620; color: var(--soft); white-space: nowrap; }
.cb__small span, .cb__label span { display: block; }
.cb__amount { font-size: 21px; line-height: 24px; font-weight: 400; letter-spacing: -0.03em; font-variation-settings: "wght" 660, "wdth" 96; white-space: nowrap; }

/* the coins on their way: thin slabs seen edge-on, made by the script */
.cb__flow { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cb__slab { position: absolute; left: 0; top: 50%; width: 6px; height: 18px; margin: -9px 0 0 -3px; border-radius: 3px; background: var(--gold); box-shadow: inset -2px 0 0 color-mix(in srgb, var(--gold) 55%, #6b4a00), 0 2px 5px -1px rgba(107, 74, 0, 0.45); opacity: 0; }

.cb__go { display: flex; align-items: center; gap: 7px; height: 48px; margin-left: auto; padding: 0 14px 0 16px; border-radius: 24px; background: var(--ink); color: #ffffff; transition: background-color 0.45s ease; }
.cb.is-done .cb__go { background: var(--done); color: #06240f; }
.cb__label { display: block; height: 20px; overflow: hidden; font-size: 14px; line-height: 20px; font-weight: 660; font-stretch: 104%; white-space: nowrap; }
.cb__go svg { width: 18px; height: 18px; flex: none; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.900; stroke-linecap: round; stroke-linejoin: round; }
.cb__tick { stroke-dasharray: 1; stroke-dashoffset: 1; stroke-width: 2.200; }

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #ffffff;
  stroke: #000000;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  opacity: 0;
  visibility: hidden;
  z-index: 5;
}

@media (hover: hover) {
  .cb:not(.is-done):hover .cb__go { background: #33301f; }
}
