:root {
  --fondo: #ffffff;
  --inchiostro: #111113;
  --inchiostro-alto: #2c2c31;
  --carta: #f4f4f5;
  --testo: #0c0c0e;
  --spento: #74747c;
  --accento: #2f5bff;
  --alba-cielo: #ffb38a;
  --alba-terra: #6b4a8f;
  --mare-cielo: #9fd6e8;
  --mare-terra: #1f4e6e;
  --bosco-cielo: #e8e2c4;
  --bosco-terra: #3f6b4a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--fondo);
  color: var(--testo);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 12px;
  overflow: hidden;
}

/* the whole row is scaled down by the script when the window is narrower than it */
.fit { position: absolute; left: 50%; top: 50%; width: max-content; transform-origin: 50% 50%; }
.row {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}

/* ---- the avatar row: three tiny landscape photos, and yours that comes in first ---- */
.stack {
  position: relative;
  height: 40px;
  width: 92px;
  flex: 0 0 auto;
}
.av {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 0 0 2.5px var(--fondo), 0 6px 14px -6px rgba(17, 17, 19, 0.45);
}
.av__photo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
}
/* a horizon, a low sun and a soft lens sheen: a photo, never a face */
.av__photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 0 61%, rgba(255, 255, 255, 0.18) 61.5%, rgba(255, 255, 255, 0) 64%),
    radial-gradient(ellipse 9% 20% at var(--sole-x, 64%) 72%, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 100%),
    linear-gradient(180deg, transparent 0 60%, var(--terra) 60% 100%) top / 100% 100% no-repeat,
    radial-gradient(circle at var(--sole-x, 64%) 60%, color-mix(in srgb, var(--cielo) 35%, #fff6e8) 0 15%, color-mix(in srgb, var(--cielo) 60%, #ffffff) 16%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, color-mix(in srgb, var(--cielo) 82%, var(--terra)) 0%, var(--cielo) 60%, var(--terra) 60%, color-mix(in srgb, var(--terra) 70%, #000000) 100%);
}
.av__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(120% 90% at 28% 12%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 46%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.av--a { --cielo: var(--alba-cielo); --terra: var(--alba-terra); --sole-x: 38%; --sole-y: 56%; z-index: 3; }
.av--b { --cielo: var(--mare-cielo); --terra: var(--mare-terra); --sole-x: 70%; --sole-y: 40%; z-index: 2; }
.av--c { --cielo: var(--bosco-cielo); --terra: var(--bosco-terra); --sole-x: 50%; --sole-y: 30%; z-index: 1; }
.av--me {
  --cielo: color-mix(in srgb, var(--accento) 45%, #ffffff);
  --terra: color-mix(in srgb, var(--accento) 80%, #000000);
  --sole-x: 58%;
  --sole-y: 48%;
  z-index: 4;
  opacity: 0;
}
.av--me::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--accento);
  opacity: var(--alone, 0);
  transform: scale(var(--alone-s, 0.9));
}

/* the little «You» tag that pops over your avatar for a moment */
.tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  height: 20px;
  padding: 0 7px;
  margin-left: -17px;
  min-width: 34px;
  border-radius: 6px;
  background: var(--inchiostro);
  color: #ffffff;
  font-size: 11px;
  line-height: 20px;
  font-weight: 620;
  text-align: center;
  letter-spacing: 0.01em;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.5);
}
.tip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  margin-left: -4px;
  border: 4px solid transparent;
  border-top-color: var(--inchiostro);
}

/* ---- the counter: every digit is a window on a strip of digits ---- */
.count {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 0 0 auto;
}
.count__num {
  display: flex;
  height: 24px;
  overflow: hidden;
  font-size: 19px;
  line-height: 24px;
  font-weight: 660;
  font-stretch: 96%;
  letter-spacing: -0.01em;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%);
}
.dig { position: relative; display: block; height: 24px; width: 0.62em; }
.dig__strip { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; width: 100%; text-align: center; }
.dig__strip span { display: block; height: 24px; }
.sep { display: block; width: 0.26em; text-align: center; }
.count__label {
  font-size: 12.5px;
  line-height: 16px;
  color: var(--spento);
  font-weight: 480;
}

/* ---- the pill ---- */
.slot {
  position: relative;
  height: 60px;
  width: 124px;
  flex: 0 0 auto;
}
.pill {
  position: absolute;
  right: 0;
  top: 0;
  height: 60px;
  width: 124px;
}
.pill__body {
  position: absolute;
  inset: 0;
  border-radius: 30px;
  isolation: isolate;
}
.pill__paper, .pill__ink, .pill__shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.pill__paper {
  background: linear-gradient(180deg, #ffffff 0%, var(--carta) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(17, 17, 19, var(--bordo, 0.1)),
    inset 0 -1px 0 rgba(17, 17, 19, 0.05),
    0 1px 2px rgba(17, 17, 19, 0.05),
    0 10px 24px -14px rgba(17, 17, 19, 0.35);
}
.pill__ink {
  background: linear-gradient(180deg, var(--inchiostro-alto) 0%, var(--inchiostro) 58%, #050506 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 1px 2px rgba(17, 17, 19, 0.3),
    0 14px 28px -12px rgba(17, 17, 19, 0.55);
}
/* a soft light under the pointer */
.pill__shine { overflow: hidden; z-index: 1; }
.pill__shine::before {
  content: "";
  position: absolute;
  left: var(--mx, 50%);
  top: var(--my, 30%);
  width: 160px;
  height: 110px;
  margin: -55px 0 0 -80px;
  background: radial-gradient(closest-side, rgba(255, 255, 255, var(--luce-forza, 0.16)), rgba(255, 255, 255, 0));
  opacity: var(--luce, 0);
}
.pill__hit {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 3;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.pill__body::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 5;
  box-shadow: 0 0 0 0 transparent;
  transition: box-shadow 0.25s ease;
}
.pill__body:has(:focus-visible)::after { box-shadow: 0 0 0 3px var(--fondo), 0 0 0 5px var(--accento); }

.face {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  white-space: nowrap;
}
.face__in { display: inline-flex; align-items: center; gap: 8px; }
.face__word {
  font-size: 16.5px;
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: -0.005em;
}
.face--follow { color: #ffffff; }
.face--following { color: var(--testo); opacity: 0; }
.face--confirm { justify-content: flex-start; padding-left: 22px; opacity: 0; z-index: 4; }
.face--confirm .face__in { gap: 0; }
.face__ask { font-size: 16px; font-weight: 560; color: var(--testo); margin-right: 12px; }

.ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; overflow: visible; }
.ico--check { color: var(--accento); stroke-width: 2.1; }

/* the two small buttons of the confirmation */
.mini {
  position: relative;
  height: 40px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  pointer-events: auto;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.mini:focus-visible { box-shadow: 0 0 0 2px var(--fondo), 0 0 0 4px var(--accento); }
.mini--no {
  width: 40px;
  margin-right: 6px;
  color: var(--spento);
  background: rgba(17, 17, 19, 0.06);
}
.mini__ring { position: absolute; inset: 0; width: 40px; height: 40px; transform: rotate(-90deg); overflow: visible; }
.mini__ring circle { fill: none; stroke: rgba(17, 17, 19, 0.28); stroke-width: 1.2; stroke-linecap: round; }
.mini--yes {
  min-width: 58px;
  padding: 0 16px;
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 620;
  background: linear-gradient(180deg, var(--inchiostro-alto), var(--inchiostro));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 6px 14px -8px rgba(17, 17, 19, 0.6);
}
@media (hover: hover) {
  .mini--no:hover { color: var(--testo); background: rgba(17, 17, 19, 0.09); }
  .mini--yes:hover { background: linear-gradient(180deg, #3a3a40, var(--inchiostro)); }
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.ghost {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  margin: -3px 0 0 -4px;
  fill: #111113;
  stroke: #ffffff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  pointer-events: none;
  opacity: 0;
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}
