:root {
  --bg: #ffffff;
  --ink: #17171a;
  --soft: rgba(23, 23, 26, 0.58);
  --accent: #5b4bff;
  --good: #128a5e;
}

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

.bs { position: relative; display: block; width: 224px; max-width: 100%; height: 60px; border: 0; border-radius: 30px; font: inherit; color: #ffffff; background: var(--accent); cursor: pointer; outline: none; overflow: hidden; touch-action: manipulation; -webkit-tap-highlight-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -3px 6px rgba(0, 0, 0, 0.14), 0 18px 28px -16px color-mix(in srgb, var(--accent) 85%, transparent); transition: background-color 0.4s, color 0.4s, box-shadow 0.4s; }
.bs[data-state="busy"] { cursor: progress; }
.bs[data-state="done"] { background: #ffffff; color: var(--ink); box-shadow: inset 0 0 0 1.500px color-mix(in srgb, var(--accent) 34%, transparent), 0 18px 30px -18px color-mix(in srgb, var(--accent) 60%, transparent); }
.bs:focus-visible { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--accent); }

.bs__face { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; gap: 9px; font-size: 16px; font-weight: 720; letter-spacing: -0.008em; white-space: nowrap; opacity: 0; pointer-events: none; }
.bs__face[data-face="rest"] { opacity: 1; }
.bs__icon { display: block; flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.800; stroke-linecap: round; stroke-linejoin: round; }
.bs__face--side { left: 62px; right: 18px; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1px; }
.bs__face--side b { font-size: 14.500px; line-height: 18px; font-weight: 720; }
.bs__face--side i { font-style: normal; font-size: 12px; line-height: 15px; font-weight: 560; opacity: 0.74; font-variant-numeric: tabular-nums; }

.bs__who { position: absolute; left: 9px; top: 9px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); box-shadow: inset 0 0 0 1.500px rgba(255, 255, 255, 0.4); font-size: 14px; font-weight: 780; letter-spacing: 0.01em; opacity: 0; transition: background 0.4s, box-shadow 0.4s, color 0.4s; }
.bs[data-state="done"] .bs__who { background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #ff7a59)); color: #ffffff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 8px 14px -8px var(--accent); }
.bs__roll { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; overflow: hidden; }
.bs__roll span { display: block; line-height: 1; }
.bs__badge { position: absolute; right: -5px; bottom: -5px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 2px #ffffff; }
.bs__badge svg { display: block; width: 12px; height: 12px; fill: none; stroke: #ffffff; stroke-width: 1.900; stroke-linecap: round; stroke-linejoin: round; }
.bs__badge path { stroke-dasharray: 1; stroke-dashoffset: 1; }

@media (hover: hover) { .bs[data-state="rest"]:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -3px 6px rgba(0, 0, 0, 0.14), 0 22px 34px -14px color-mix(in srgb, var(--accent) 95%, transparent); } }

.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #17171a; stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); z-index: 6; }

@media (prefers-reduced-motion: reduce) { .bs, .bs__who { transition: none; } }
