:root {
  --fondo: #f4f4f5;
  --carta: #ffffff;
  --inchiostro: #0a0a0a;
  --grigio: #71717a;
  --linea: rgba(10, 10, 10, 0.08);
  --binario: #e4e4e7;
  --fatto: #16a34a;
}

* { box-sizing: border-box; margin: 0; padding: 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 {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.card {
  width: min(368px, 100%);
  background: var(--carta);
  border: 1px solid var(--linea);
  border-radius: 20px;
  padding: clamp(16px, 4.5vmin, 22px);
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.04), 0 18px 40px -18px rgba(10, 10, 10, 0.18);
}

.card__head { display: flex; gap: 12px; align-items: center; }
.card__icon {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--fondo);
  border: 1px solid var(--linea);
}
.card__icon svg { width: 20px; height: 20px; fill: none; stroke: var(--inchiostro); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.card__title { font-size: 15px; font-weight: 640; letter-spacing: -0.01em; }
.card__sub { font-size: 12px; color: var(--grigio); margin-top: 2px; }

.card__rows { margin: 16px 0 18px; border-top: 1px solid var(--linea); }
.card__rows > div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--linea);
  font-size: 12.5px;
}
.card__rows dt { color: var(--grigio); flex: none; }
.card__rows dd { text-align: right; font-weight: 520; font-variant-numeric: tabular-nums; }
.card__subject { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.send-wrap { position: relative; height: 48px; }

.busy-label {
  position: absolute; left: 0; right: 0; top: 0;
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12.5px; font-weight: 560;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  pointer-events: none;
}
.busy-label__count { color: var(--grigio); font-weight: 480; }
.busy-label__count .num { color: var(--inchiostro); font-weight: 600; }

.send {
  position: absolute; left: 50%; top: 2px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--inchiostro);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 1px 1px rgba(10, 10, 10, 0.18), 0 8px 18px -8px rgba(10, 10, 10, 0.5);
  -webkit-tap-highlight-color: transparent;
}
.send:focus-visible { outline: 2px solid var(--inchiostro); outline-offset: 3px; }

.send__track {
  position: absolute; inset: 0;
  background: var(--binario);
  opacity: 0;
}
.send__fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 100%;
  background: var(--inchiostro);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

.send__face {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap;
}
.send__face--done { opacity: 0; }
.send__plane { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.send__check { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.sent-at {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--grigio);
  font-variant-numeric: tabular-nums;
  opacity: 0;
}

.num { display: inline-flex; font-variant-numeric: tabular-nums; }
.digit { position: relative; display: inline-block; height: 1.25em; overflow: hidden; vertical-align: -0.28em; }
.digit__col { display: flex; flex-direction: column; line-height: 1.25em; }
.digit__col > span { text-align: center; }
.sep { display: inline-block; overflow: hidden; }

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

@media (hover: hover) {
  .send:hover { box-shadow: 0 1px 1px rgba(10, 10, 10, 0.18), 0 12px 24px -10px rgba(10, 10, 10, 0.55); }
}
