:root {
  --bg: #ffffff;
  --ink: #17171a;
  --soft: rgba(23, 23, 26, 0.58);
  --line: rgba(23, 23, 26, 0.1);
  --accent: #6a4cf5;
  --quiet: #128a5e;
  --steady: #b86a00;
  --busy: #d9432f;
}

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

.gb { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; width: min(348px, 100%); padding: 18px 16px 16px; border-radius: 26px; background: #ffffff; box-shadow: inset 0 0 0 1.500px var(--line), 0 30px 44px -30px rgba(23, 23, 26, 0.4); }
.gb__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 2px; }
.gb__head strong { font-size: 16px; line-height: 20px; font-weight: 740; letter-spacing: -0.01em; }
.gb__now { display: block; height: 16px; overflow: hidden; font-size: 12.500px; line-height: 16px; font-weight: 700; color: var(--tone, var(--quiet)); white-space: nowrap; }
.gb__now span { display: block; }
.gb[data-level="quiet"] { --tone: var(--quiet); }
.gb[data-level="steady"] { --tone: var(--steady); }
.gb[data-level="busy"] { --tone: var(--busy); }

.gb__hero { display: flex; align-items: center; gap: 12px; height: 44px; padding-left: 2px; }
.gb__num { flex: none; min-width: 52px; font-size: 40px; line-height: 44px; font-weight: 760; font-stretch: 92%; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.gb__what { display: grid; gap: 2px; min-width: 0; }
.gb__what b { font-size: 14px; line-height: 18px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gb__what > span { font-size: 12px; line-height: 15px; font-weight: 640; color: var(--soft); white-space: nowrap; font-variant-numeric: tabular-nums; }

.gb__seg { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); height: 38px; padding: 3px; border-radius: 13px; background: rgba(23, 23, 26, 0.06); }
.gb__pick { position: absolute; left: 3px; top: 3px; bottom: 3px; width: calc((100% - 6px) / 3); border-radius: 10px; background: #ffffff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 4px 8px -4px rgba(23, 23, 26, 0.35), 0 0 0 1px rgba(23, 23, 26, 0.05); }
.gb__opt { position: relative; display: grid; place-items: center; height: 32px; border-radius: 10px; font-size: 12.500px; font-weight: 680; color: var(--soft); white-space: nowrap; transition: color 0.25s; }
.gb__opt[aria-pressed="true"] { color: var(--ink); }
.gb__opt:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); }

.gb__chart { position: relative; height: 96px; border-radius: 8px; outline: none; cursor: crosshair; touch-action: pan-y; }
.gb__chart:focus-visible { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--ink); }
.gb__svg { display: block; width: 100%; height: 96px; overflow: visible; }
.gb__svg .base { stroke: rgba(23, 23, 26, 0.14); stroke-width: 1.500; stroke-linecap: round; }
.gb__svg .area { fill: url(#gb-fade); }
.gb__svg .curve { fill: none; stroke: var(--accent); stroke-width: 2.500; stroke-linecap: round; stroke-linejoin: round; }
.gb__svg .nowmark line { stroke: var(--ink); stroke-width: 1.500; stroke-dasharray: 2 4; stroke-linecap: round; }
.gb__svg .nowmark circle { fill: #ffffff; stroke: var(--ink); stroke-width: 2.500; }
.gb__svg .probe line { stroke: var(--accent); stroke-width: 1.500; stroke-linecap: round; }
.gb__svg .probe circle { fill: var(--accent); stroke: #ffffff; stroke-width: 2.500; }
.gb__svg .ticks text { font-size: 10.500px; font-weight: 640; fill: var(--soft); }

.gb__note { padding: 10px 12px; border-radius: 14px; background: rgba(23, 23, 26, 0.045); }
.gb__clip { display: block; height: 18px; overflow: hidden; white-space: nowrap; font-size: 13px; line-height: 18px; font-weight: 660; font-variant-numeric: tabular-nums; }
.gb__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) { .gb__opt:hover { color: var(--ink); } }
@media (max-width: 350px) { .gb { padding: 16px 13px 14px; } .gb__num { font-size: 36px; } .gb__opt { font-size: 12px; } .gb__clip { font-size: 12.500px; } }
@media (prefers-reduced-motion: reduce) { .gb__opt { transition: none; } }
