:root {
  --fondo: #f7f4ee;
  --inchiostro: #17161a;
  --grigio: #8a867f;
  --bolla: #ffffff;
  --bordo: rgba(23, 22, 26, 0.09);
  --accento: #ff5a36;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--fondo);
  color: var(--inchiostro);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.stage {
  position: relative;
  height: 100vh; height: 100dvh;
  max-width: 760px; margin: 0 auto;
  display: flex; flex-direction: column;
  padding: clamp(12px, 3.2vh, 28px) clamp(14px, 4vw, 32px);
  touch-action: none;
  user-select: none; -webkit-user-select: none;
}
.head { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 7px; font-weight: 650; font-size: 14px; letter-spacing: -0.01em; }
.brand__mark { width: 18px; height: 18px; fill: none; stroke: var(--accento); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip {
  font: inherit; font-size: 13px; color: var(--grigio); background: none; border: 0; cursor: pointer;
  padding: 6px 4px;
}
@media (hover: hover) { .skip:hover { color: var(--inchiostro); } }

.intro { text-align: center; margin-top: clamp(6px, 2.4vh, 22px); }
.title {
  font-size: clamp(20px, min(5.6vw, 6.4vh), 34px);
  font-weight: 640; font-stretch: 92%; letter-spacing: -0.025em; line-height: 1.05;
}
.sub { margin-top: 6px; font-size: clamp(11.5px, 1.9vh, 14px); color: var(--grigio); }
.count { color: var(--inchiostro); font-weight: 600; white-space: nowrap; }
.count__roll {
  display: inline-block; position: relative; height: 1.2em; line-height: 1.2em; overflow: hidden;
  vertical-align: bottom; min-width: 0.62em; text-align: center;
}
.count__roll span { display: block; }

.field { position: relative; flex: 1 1 auto; min-height: 0; margin: clamp(4px, 1.4vh, 14px) 0; }

.bubble {
  position: absolute; left: 0; top: 0;
  border: 0; background: none; padding: 0; font: inherit; color: inherit;
  -webkit-tap-highlight-color: transparent;
  border-radius: 50%;
  display: grid; place-items: center;
  cursor: grab;
  will-change: transform;
}
.bubble:active { cursor: grabbing; }
/* GSAP moves the bubble; the body inside carries the size, the colour and the press */
.bubble__body {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--bolla);
  border: 1px solid var(--bordo);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 10px 22px -14px rgba(23, 22, 26, 0.32), 0 2px 5px -3px rgba(23, 22, 26, 0.16);
  display: grid; place-items: center; align-content: center; gap: 0.18em;
  position: relative; overflow: hidden;
  transition: background-color .32s ease, border-color .32s ease, color .32s ease, box-shadow .32s ease;
}
/* a soft highlight on the top left, like a lit sphere seen flat */
.bubble__body::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 46%);
  pointer-events: none;
}
.bubble__word {
  position: relative;
  font-weight: 600; letter-spacing: -0.015em; font-stretch: 96%;
  white-space: nowrap; line-height: 1;
}
.bubble__tick {
  position: absolute; left: 50%; top: 19%; margin-left: -0.5em; width: 1em; height: 1em; fill: none; stroke: #fff; stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round; opacity: 0;
}
.bubble.is-on .bubble__body {
  background: var(--accento); border-color: transparent; color: #fff;
  box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--accento) 80%, transparent), 0 2px 6px -3px rgba(23, 22, 26, 0.2);
}
.bubble.is-on .bubble__body::before { background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 50%); }

.foot { display: flex; justify-content: center; padding-bottom: 2px; }
.go {
  position: relative; overflow: hidden;
  font: inherit; font-size: 14.5px; font-weight: 620;
  height: clamp(38px, 6.4vh, 46px); padding: 0 34px; border-radius: 99px; border: 0;
  background: #e7e3db; color: #a49f96;
  cursor: not-allowed;
  display: grid; place-items: center;
  min-width: 168px;
  transition: color .3s ease;
}
.go.is-ready { cursor: pointer; color: #fff; }
.go__fill {
  position: absolute; inset: 0; background: var(--inchiostro);
  transform-origin: 50% 50%; transform: scale(0); border-radius: 99px;
}
.go__label { position: relative; font-stretch: 100%; }
.go__check {
  position: absolute; width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
}

.ghost {
  position: absolute; left: 0; top: 0;
  width: 22px; height: 22px;
  fill: var(--inchiostro); stroke: #fff; stroke-width: 1.4; stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.18));
  pointer-events: none; opacity: 0; z-index: 5;
}
