:root {
  --bg: #ffffff;
  --card: #ffffff;
  --ink: #14161a;
  --soft: rgba(20, 22, 26, 0.5);
  --line: rgba(20, 22, 26, 0.08);
  --accent: #4b5bff;
}

*, *::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;
}

.cs {
  width: min(332px, 100%);
  padding: 14px 15px 10px;
  border-radius: 26px;
  background: var(--card);
  box-shadow:
    0 0 0 1px rgba(20, 22, 26, 0.07),
    0 1px 2px rgba(20, 22, 26, 0.05),
    0 14px 28px -12px rgba(20, 22, 26, 0.16),
    0 44px 70px -34px color-mix(in srgb, var(--accent) 34%, rgba(20, 22, 26, 0.3));
}
.cs__head { display: flex; align-items: center; justify-content: space-between; height: 24px; }
.cs__title { font-size: 15px; font-weight: 680; font-stretch: 108%; letter-spacing: -0.008em; }
.cs__delta { height: 22px; padding: 0 9px; border-radius: 999px; overflow: hidden; font-size: 11.500px; line-height: 22px; font-weight: 640; background: rgba(20, 22, 26, 0.055); color: var(--soft); transition: background-color 0.3s ease, color 0.3s ease; }
.cs__delta span { display: block; white-space: nowrap; }
.cs.is-up .cs__delta { background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); }
.cs.is-down .cs__delta { background: rgba(20, 22, 26, 0.09); color: var(--ink); }

.cs__read { display: flex; align-items: baseline; gap: 9px; margin-top: 4px; }
.cs__num { display: inline-block; font-size: clamp(38px, 12vh, 52px); line-height: 1; font-weight: 600; letter-spacing: -0.03em; font-variation-settings: "wght" var(--w, 600), "wdth" 96; transform-origin: 0 100%; }
.cs__band { height: 20px; overflow: hidden; font-size: 14px; line-height: 20px; font-weight: 620; color: var(--accent); }
.cs__band span { display: block; white-space: nowrap; }

.cs__scale { position: relative; margin-top: 16px; padding-bottom: 17px; }
.cs__bar { display: flex; gap: 3px; height: 10px; }
.cs__bar i { display: block; height: 100%; border-radius: 3px; background: rgba(20, 22, 26, 0.09); transition: background-color 0.35s ease; transform-origin: 50% 50%; }
.cs__bar i:first-child { border-radius: 5px 3px 3px 5px; }
.cs__bar i:last-child { border-radius: 3px 5px 5px 3px; }
.cs__bar i.is-on { background: var(--accent); }
/* today's score stays behind as a thin hollow mark; the solid one is where the moves would take it */
.cs__today { position: absolute; top: -5px; width: 2px; height: 20px; margin-left: -1px; border-radius: 1px; background: rgba(20, 22, 26, 0.28); }
.cs__mark { position: absolute; top: -12px; width: 0; height: 0; }
.cs__mark i {
  position: absolute;
  left: -7px;
  top: 0;
  width: 14px;
  height: 27px;
  border-radius: 7px;
  background: var(--ink);
  box-shadow: 0 0 0 3px #ffffff, 0 6px 12px -3px rgba(20, 22, 26, 0.45);
}
.cs__ends { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; font-size: 10.500px; font-weight: 560; color: var(--soft); }

.cs__moves { margin-top: 8px; border-top: 1px solid var(--line); }
.move {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: clamp(32px, 8.800vh, 38px);
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.move:last-child { border-bottom: 0; }
.move__box {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1.500px rgba(20, 22, 26, 0.22);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
.move__box svg { width: 12px; height: 12px; fill: none; stroke: #ffffff; stroke-width: 2.200; stroke-linecap: round; stroke-linejoin: round; }
.move__box path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.move[aria-pressed="true"] .move__box { background: var(--ink); box-shadow: none; }
.move__label { flex: 1; min-width: 0; font-size: 13px; font-weight: 540; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.move__pts { flex: none; font-size: 12.500px; font-weight: 660; color: var(--soft); transition: color 0.25s ease; }
.move[aria-pressed="true"] .move__pts { color: var(--accent); }
.move[aria-pressed="true"].is-neg .move__pts { color: var(--ink); }
.move:focus-visible .move__box { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--ink); }

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

@media (hover: hover) {
  .move:hover .move__box { box-shadow: inset 0 0 0 1.500px rgba(20, 22, 26, 0.5); }
  .move[aria-pressed="true"]:hover .move__box { box-shadow: none; }
}
