:root {
  --fondo: #f6f6f7;
  --carta: #ffffff;
  --inchiostro: #121214;
  --grigio: #6f6f78;
  --grigio-chiaro: #a3a3ab;
  --bordo: rgba(18, 18, 20, 0.09);
  --campo: #f2f2f4;
  --accento: #2563eb;
  --verde: #16a34a;
  --verde-chiaro: #e9f7ee;
  --ambra: #b45309;
  --ambra-chiaro: #fdf3e4;
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }

body {
  background: var(--fondo);
  color: var(--inchiostro);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

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

/* the card */
.meet {
  width: min(372px, 92vw);
  border: 1px solid var(--bordo);
  border-radius: 20px;
  background: var(--carta);
  box-shadow: 0 1px 2px rgba(18, 18, 20, 0.04), 0 18px 40px -22px rgba(18, 18, 20, 0.28);
}
.meet__in { padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 16px; }

.meet__head { display: flex; align-items: flex-start; gap: 11px; }
.meet__mark {
  width: 36px; height: 36px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  background: var(--inchiostro);
}
.meet__mark svg { width: 19px; height: 19px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.meet__text { flex: 1; min-width: 0; }
.meet__app { font-size: 11px; font-weight: 560; color: var(--grigio-chiaro); letter-spacing: 0.01em; }
.meet__name { font-size: 15.5px; font-weight: 650; letter-spacing: -0.01em; margin-top: 1px; }
.meet__time { font-size: 12px; color: var(--grigio); margin-top: 2px; }

/* a line of text that rolls to the next one */
.roll { position: relative; display: inline-grid; overflow: hidden; vertical-align: top; }
.roll > span { grid-area: 1 / 1; white-space: nowrap; }

.tag {
  flex: none;
  font-size: 11.5px; font-weight: 580;
  padding: 4px 9px; border-radius: 99px;
  color: var(--ambra); background: var(--ambra-chiaro);
  margin-top: 2px;
}
.tag.is-live { color: var(--verde); background: var(--verde-chiaro); }

/* the people: avatars in absolute position, x = index times step */
.people { display: flex; align-items: center; gap: 12px; min-height: 42px; }
.stack { position: relative; height: 42px; flex: none; }
.av {
  position: absolute; left: 0; top: 0;
  width: 42px; height: 42px;
}
.av__face, .av__grey {
  position: absolute; inset: 3px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 660; letter-spacing: 0.02em;
  box-shadow: 0 0 0 2px var(--carta);
}
.av__face { color: rgba(18, 18, 20, 0.78); }
.av__grey { background: #ececef; color: #b4b4bb; }
.av__ring { position: absolute; inset: 0; width: 42px; height: 42px; transform: rotate(-90deg); overflow: visible; }
.av__ring circle { fill: none; stroke: var(--verde); stroke-width: 1.6; stroke-linecap: butt; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.av.is-you .av__ring circle { stroke: var(--accento); }
.caption { flex: 1; font-size: 12.5px; line-height: 1.3; color: var(--grigio); min-width: 0; }
.caption .roll { display: grid; }
.caption .roll > span { white-space: normal; }
.caption b { color: var(--inchiostro); font-weight: 620; }

/* the actions */
.actions { position: relative; display: flex; gap: 8px; }
.join {
  position: relative;
  flex: 1;
  height: 44px;
  border: 0; border-radius: 99px;
  background: var(--inchiostro); color: #fff;
  font: inherit; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  cursor: pointer;
  transition: background-color 0.35s ease, color 0.35s ease;
}
.join.is-checking { background: #26262b; }
.join.is-ready { background: var(--verde-chiaro); color: var(--verde); }
.join:focus-visible { outline: 2px solid var(--accento); outline-offset: 3px; }
.join__icon { position: relative; width: 20px; height: 20px; flex: none; }
.ic, .spin { position: absolute; inset: 0; width: 20px; height: 20px; overflow: visible; }
.ic { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic rect, .ic path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.ic--mic, .ic--ok { opacity: 0; }
.spin { opacity: 0; transform-origin: 50% 50%; }
.spin circle { fill: none; stroke: rgba(255, 255, 255, 0.85); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 0.22 0.78; }
.join__label { min-width: 0; }
.level { display: flex; align-items: center; gap: 2px; height: 14px; width: 0; overflow: hidden; opacity: 0; }
.level i { display: block; width: 2.4px; height: 100%; border-radius: 2px; background: currentColor; transform: scaleY(0.55); }

.leave {
  flex: none;
  width: 0; padding: 0; overflow: hidden;
  height: 44px;
  border: 1px solid var(--bordo); border-radius: 99px;
  background: var(--carta); color: var(--inchiostro);
  font: inherit; font-size: 13.5px; font-weight: 580;
  cursor: pointer; opacity: 0;
  white-space: nowrap;
}
@media (hover: hover) {
  .join:hover { background: #2a2a30; }
  .join.is-ready:hover { background: #dff2e6; }
  .leave:hover { background: var(--campo); }
}
.join.is-hover { background: #2a2a30; }
.leave.is-hover { background: var(--campo); }

.note { font-size: 11.5px; color: var(--grigio-chiaro); }

.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;
}

@media (max-width: 360px) {
  .meet__in { padding: 15px 14px 12px; gap: 14px; }
  .people { gap: 9px; }
  .caption { font-size: 11.5px; }
}
