:root {
  --fondo: #000000;
  --card-alto: #26262c;
  --card-basso: #151519;
  --bordo: rgba(255, 255, 255, 0.085);
  --testo: #f3f2ee;
  --tenue: #9a99a3;
  --spento: #6c6b74;
  --accento: #a9b4ff;
  --accento-fondo: rgba(169, 180, 255, 0.14);
  --verde: #6fdca4;
  --crema: #f4f2ec;
  --crema-testo: #17171b;
  --rosso: #ff8a7a;
}

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

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

.req {
  position: relative;
  width: min(384px, 92vw);
  padding-bottom: 38px;
}

/* the requests waiting under the card */
.req__ghost {
  position: absolute;
  left: 0; right: 0; bottom: 38px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(180deg, #1d1d22, #121215);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.9);
  transform-origin: 50% 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
  overflow: hidden;
}
.req__ghost--far .req__ghost-line { visibility: hidden; }
.req__ghost-line {
  font-size: 10.5px;
  letter-spacing: 0.01em;
  color: var(--spento);
  white-space: nowrap;
}

.card {
  position: relative;
  z-index: 2;
  border-radius: 20px;
  padding: 16px 16px 12px;
  background: linear-gradient(180deg, var(--card-alto), var(--card-basso));
  border: 1px solid var(--bordo);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.6),
    0 12px 28px -10px rgba(0, 0, 0, 0.85),
    0 40px 70px -30px rgba(40, 44, 90, 0.55);
  overflow: hidden;
  isolation: isolate;
}
.card::before {
  /* a hair of light along the top edge */
  content: '';
  position: absolute;
  left: 18%; right: 18%; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  pointer-events: none;
}
.card__light {
  position: absolute;
  z-index: -1;
  width: 260px; height: 260px;
  left: 0; top: 0;
  margin: -130px 0 0 -130px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(169, 180, 255, 0.13), transparent);
  pointer-events: none;
}

.card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--tenue);
}
.card__app {
  width: 22px; height: 22px;
  border-radius: 6px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #3b3f66, #23253c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.card__app svg { width: 15px; height: 15px; fill: none; stroke: #dfe3ff; stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; }
.card__app-line { stroke: var(--accento); }
.card__from { font-weight: 560; color: #c9c8d0; }
.card__sep { color: var(--spento); margin: 0 2px; }
.card__time { margin-left: auto; color: var(--spento); font-variant-numeric: tabular-nums; }

.card__body { position: relative; margin-top: 12px; }
.card__done {
  position: absolute;
  left: 0; right: 0; top: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 2px 10px;
  visibility: hidden;
}

.card__who { display: flex; gap: 11px; align-items: flex-start; }
.card__line {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #c9c8d0;
  min-width: 0;
}
.card__line strong { color: var(--testo); font-weight: 620; }

.avatar {
  position: relative;
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(140deg, var(--a1, #8a7dff), var(--a2, #ff9fb4));
  box-shadow: 0 0 0 2px var(--card-basso), inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -6px 10px rgba(0, 0, 0, 0.18);
}
.avatar--big { width: 40px; height: 40px; font-size: 13px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -8px 12px rgba(0, 0, 0, 0.18), 0 6px 14px -6px rgba(0, 0, 0, 0.8); }
.avatar--fly { position: absolute; z-index: 5; margin: 0; pointer-events: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 8px 1px 6px;
  margin-top: 2px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: var(--testo);
  font-weight: 560;
  white-space: nowrap;
}
.chip__icon { width: 14px; height: 14px; fill: none; stroke: var(--accento); stroke-width: 1.2; stroke-linejoin: round; stroke-linecap: round; }

.card__note {
  margin: 8px 0 0 51px;
  font-size: 12.5px;
  font-style: italic;
  color: var(--tenue);
}

.seg {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 13px;
  padding: 3px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.seg__pill {
  position: absolute;
  left: 3px; top: 3px; bottom: 3px;
  width: calc(50% - 3px);
  border-radius: 8px;
  background: linear-gradient(180deg, #3a3a43, #2c2c33);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 6px -1px rgba(0, 0, 0, 0.7);
}
.seg__opt {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  border: 0;
  background: none;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 540;
  color: var(--tenue);
  cursor: pointer;
  transition: color 0.25s ease;
}
.seg__opt[aria-checked='true'] { color: var(--testo); }
.seg__opt svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; }
.seg__opt:focus-visible { outline: 2px solid var(--accento); outline-offset: 1px; }

.card__hint {
  margin: 7px 2px 0;
  height: 16px;
  overflow: hidden;
  font-size: 11.5px;
  color: var(--spento);
}
.card__hint-in { display: block; }

.card__actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
  margin-top: 11px;
}
.btn {
  position: relative;
  height: 40px;
  border: 0;
  padding: 0;
  border-radius: 12px;
  cursor: pointer;
  background: none;
}
.btn__face {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  border-radius: inherit;
  font-size: 13.5px;
  font-weight: 600;
}
.btn--ghost .btn__face {
  color: #d9d8de;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
  transition: background 0.25s ease, color 0.25s ease;
}
.btn--main .btn__face {
  color: var(--crema-testo);
  background: linear-gradient(180deg, #ffffff, var(--crema));
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 18px -8px rgba(169, 180, 255, 0.55);
}
.btn:focus-visible { outline: 2px solid var(--accento); outline-offset: 2px; }
@media (hover: hover) {
  .btn--ghost:hover .btn__face { background: rgba(255, 138, 122, 0.1); color: var(--rosso); }
  .seg__opt:hover { color: #d9d8de; }
}
.btn__spin {
  position: absolute;
  right: 14px;
  width: 16px; height: 16px;
  fill: none;
  stroke: var(--crema-testo);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 0.3 0.7;
  opacity: 0;
}

.seal { flex: none; width: 34px; height: 34px; }
.seal svg { width: 100%; height: 100%; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.seal__ring { stroke: var(--verde); stroke-width: 1.6; stroke-dasharray: 1 1; transform: rotate(-90deg); transform-origin: 50% 50%; }
.seal__mark { stroke: var(--verde); stroke-width: 2; stroke-dasharray: 1 1; }
.seal--no .seal__ring, .seal--no .seal__mark { stroke: var(--rosso); }
.card__done-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card__done-title { font-size: 14.5px; font-weight: 620; color: var(--testo); }
.card__done-line { font-size: 12.5px; color: var(--tenue); }

.card__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11.5px;
  color: var(--spento);
}
.stack { position: relative; height: 26px; flex: none; }
.stack .avatar { position: absolute; top: 0; width: 26px; height: 26px; font-size: 9px; }
.card__count { margin-left: auto; height: 16px; overflow: hidden; font-variant-numeric: tabular-nums; color: var(--tenue); }
.card__count-roll { display: block; }

.pointer {
  position: absolute;
  left: 0; top: 0;
  z-index: 10;
  width: 22px; height: 22px;
  pointer-events: none;
  fill: #fff;
  stroke: #111;
  stroke-width: 1.1;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5));
  opacity: 0;
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-height: 520px) {
  .card__note { display: none; }
}
