:root {
  --bg: #ffffff;
  --card: #ffffff;
  --ink: #1a1c1f;
  --soft: rgba(26, 28, 31, 0.58);
  --faint: rgba(26, 28, 31, 0.26);
  --line: rgba(26, 28, 31, 0.09);
  --accent: #d1432f;
}

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

.bm { position: relative; width: min(324px, 100%); padding: 14px; border-radius: 26px; background: var(--card); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(26, 28, 31, 0.05), 0 28px 46px -28px rgba(26, 28, 31, 0.32); }

.bm__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px; }
.bm__name { min-width: 0; display: grid; }
.bm__name b { font-size: 16px; line-height: 21px; font-weight: 740; font-stretch: 108%; letter-spacing: -0.012em; }
.bm__name span { font-size: 11.500px; line-height: 15px; font-weight: 540; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm__read { flex: none; display: grid; justify-items: end; }
.bm__value { display: flex; align-items: baseline; gap: 4px; font-variant-numeric: tabular-nums; }
.bm__value b { display: block; font-size: 24px; line-height: 24px; font-weight: 770; letter-spacing: -0.02em; transform-origin: 100% 70%; }
.bm__value span { font-size: 11.500px; font-weight: 600; color: var(--soft); }
.bm__trend { display: flex; align-items: center; gap: 4px; margin-top: 1px; font-size: 11.500px; font-weight: 660; color: var(--soft); }
.bm__trend svg { flex: none; width: 14px; height: 14px; fill: none; stroke: var(--accent); stroke-width: 1.800; stroke-linecap: round; stroke-linejoin: round; }
.bm__roll { display: block; height: 15px; line-height: 15px; overflow: hidden; }
.bm__roll span { display: block; white-space: nowrap; }

.bm__dial { position: relative; margin-top: 8px; }
.bm__dial svg { display: block; width: 100%; height: auto; overflow: visible; }
.bm__arc { fill: none; stroke: var(--line); stroke-width: 1.500; }
.bm__tick { stroke: var(--faint); stroke-width: 1.200; stroke-linecap: round; }
.bm__tick--big { stroke: var(--ink); stroke-width: 1.600; }
.bm__num { fill: var(--soft); font-size: 9.500px; font-weight: 640; text-anchor: middle; font-variant-numeric: tabular-nums; }
.bm__zone { fill: var(--faint); font-size: 12px; font-weight: 700; text-anchor: middle; transition: fill 0.35s ease; }
.bm__zone.is-on { fill: var(--ink); }
/* the set hand: it marks where the needle was at the last reading */
.bm__set { fill: none; stroke: #b99a5b; stroke-width: 1.300; stroke-linecap: round; }
.bm__setcap { fill: none; stroke: #b99a5b; stroke-width: 1.300; stroke-linecap: round; stroke-linejoin: round; }
.bm__needle { fill: var(--accent); stroke: var(--accent); stroke-width: 0.800; stroke-linejoin: round; filter: drop-shadow(0 2px 2px rgba(26, 28, 31, 0.25)); }
.bm__hub { fill: var(--ink); }
.bm__hubin { fill: #ffffff; }

.bm__hours { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 8px; padding: 4px; border-radius: 15px; background: #f1f2f3; box-shadow: inset 0 0 0 1px var(--line); }
.bm__pill { position: absolute; left: 0; top: 4px; bottom: 4px; width: 25%; border-radius: 11px; background: #ffffff; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(26, 28, 31, 0.1), 0 6px 10px -6px rgba(26, 28, 31, 0.3); }
.bm__hour { position: relative; z-index: 1; height: 36px; border: 0; border-radius: 11px; background: transparent; color: var(--soft); font: inherit; font-size: 13px; font-weight: 660; font-variant-numeric: tabular-nums; cursor: pointer; outline: none; transition: color 0.25s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.bm__hour[aria-pressed="true"] { color: var(--ink); }
.bm__hour:focus-visible { box-shadow: 0 0 0 2px #f1f2f3, 0 0 0 4px var(--ink); }
@media (hover: hover) { .bm__hour[aria-pressed="false"]:hover { color: var(--ink); } }

.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: #1a1c1f; stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); z-index: 6; }
