:root {
  --paper: #ffffff;
  --ink: #0b0c0e;
  --on-ink: #f4f3ef;
  --accent: #5b7cff;
  --hush: #8e8e8a;
  --dim: rgba(244, 243, 239, .5);
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 16px;
}
.book {
  display: grid;
  justify-items: center;
  gap: clamp(12px, 2.2vmin, 16px);
}
.book__btn {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  border-radius: 999px;
}
.book__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
/* the pill: GSAP scales this element, the CSS shadow stays on it */
.book__body {
  display: flex;
  align-items: center;
  height: clamp(52px, 9vmin, 62px);
  padding: 0 clamp(22px, 3.8vmin, 28px);
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.07) inset, 0 12px 26px -16px rgba(11,12,14,.6), 0 2px 4px -2px rgba(11,12,14,.3);
  will-change: transform;
}
/* the check slot: zero wide until the time is pinned */
.book__tick {
  display: block;
  flex: none;
  width: 0;
  height: clamp(22px, 3.8vmin, 26px);
  overflow: visible;
}
.book__tick svg {
  display: block;
  width: clamp(22px, 3.8vmin, 26px);
  height: 100%;
  overflow: visible;
}
.book__ring { fill: none; stroke: var(--accent); stroke-width: 1.6; }
.book__check { fill: none; stroke: var(--on-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.book__label {
  position: relative;
  display: grid;
  height: 1.25em;
  /* clipped only above and below: the letters roll through a slot */
  clip-path: inset(0 -24px);
  font-size: clamp(16px, 2.7vmin, 19px);
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.book__line {
  grid-area: 1 / 1;
  display: flex;
  white-space: pre;
  width: max-content;
  font-variation-settings: 'wght' 560, 'wdth' 100;
}
.book__ch { display: inline-block; white-space: pre; will-change: transform; }
.book__pre {
  display: inline-flex;
  overflow: hidden;
  color: var(--dim);
  font-variation-settings: 'wght' 460, 'wdth' 100;
}
.book__prein { display: block; padding-right: .3em; white-space: nowrap; }
.book__time { display: inline-flex; }
.book__note {
  position: relative;
  display: grid;
  justify-items: center;
  height: 1.3em;
  clip-path: inset(0 -24px);
  font-size: clamp(12px, 2vmin, 13px);
  line-height: 1.3;
  color: var(--hush);
  font-variation-settings: 'wght' 440, 'wdth' 100;
}
.book__noteline { grid-area: 1 / 1; white-space: nowrap; }
