:root {
  --bg: #f6f4ef;
  --ink: #17171a;
  --soft: rgba(23, 23, 26, 0.58);
  --line: rgba(23, 23, 26, 0.1);
  --under: #ff6a3d;
  --over: #3b6cff;
}

*, *::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;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.bm { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; width: min(348px, 100%); padding: 16px 16px 16px; border-radius: 26px; background: #ffffff; box-shadow: inset 0 0 0 1px var(--line), 0 30px 44px -30px rgba(60, 50, 30, 0.45); }
.bm__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 2px; }
.bm__head strong { font-size: 16px; line-height: 20px; font-weight: 740; letter-spacing: -0.01em; }
.bm__result { display: flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px 0 5px; border-radius: 14px; background: rgba(23, 23, 26, 0.05); font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bm__chip { display: block; width: 18px; height: 18px; border-radius: 6px; background: var(--over); box-shadow: inset 0 0 0 1px rgba(23, 23, 26, 0.12); }

/* the two shapes: the pair is its own stacking context, so the top one blends with the one below and nothing else */
.bm__view { position: relative; display: grid; place-items: center; height: min(132px, 32vh); border-radius: 18px; background: #f3f1ec; box-shadow: inset 0 0 0 1px rgba(23, 23, 26, 0.04); overflow: hidden; }
.bm__floor { position: absolute; left: 50%; bottom: 13%; width: 150px; height: 16px; margin-left: -75px; border-radius: 50%; background: rgba(40, 30, 10, 0.28); filter: blur(10px); }
.bm__pair { position: relative; width: 148px; height: 92px; isolation: isolate; }
.bm__under, .bm__over { position: absolute; top: 0; width: 92px; height: 92px; }
.bm__under { left: 0; }
.bm__over { right: 0; }
.bm__under i, .bm__over i { display: block; width: 100%; height: 100%; }
.bm__under i { border-radius: 50%; background: var(--under); }
.bm__over i { border-radius: 24px; background: var(--over); }
.bm__over { mix-blend-mode: normal; }

.bm__modes { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 3px; border-radius: 17px; background: rgba(23, 23, 26, 0.055); }
.bm__modes button { position: relative; z-index: 1; height: 32px; border-radius: 14px; font-size: 12.500px; font-weight: 690; color: var(--soft); white-space: nowrap; transition: color 0.2s ease; }
.bm__modes button[aria-checked="true"] { color: var(--ink); }
.bm__modes button:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.bm__thumb { position: absolute; left: 3px; top: 3px; width: calc((100% - 6px) / 3); height: 32px; border-radius: 14px; background: #ffffff; box-shadow: 0 1px 0 rgba(23, 23, 26, 0.06), 0 5px 9px -5px rgba(23, 23, 26, 0.4); }

.bm__note { padding: 0 2px; }
.bm__clip { display: block; height: 17px; line-height: 17px; overflow: hidden; white-space: nowrap; font-size: 12.500px; font-weight: 620; color: var(--soft); }
.bm__clip span { display: block; overflow: hidden; text-overflow: ellipsis; }

.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 (hover: hover) { .bm__modes button:hover { color: var(--ink); } }
@media (max-width: 350px) { .bm { padding: 14px 13px 14px; } .bm__clip { font-size: 12px; } }
@media (max-height: 400px) { .bm { gap: 10px; } .bm__view { height: min(116px, 30vh); } }
@media (prefers-reduced-motion: reduce) { .bm__modes button { transition: none; } }
