:root {
  --sfondo: #f4f4f2;
  --carta: #ffffff;
  --testo: #1b1b1a;
  --tenue: #6b6b66;
  --accento: #1f5f4a;
  --accento-testo: #ffffff;
  --errore: #a3261b;
  --bordo: #deded8;
}
@media (prefers-color-scheme: dark) {
  :root {
    --sfondo: #121212;
    --carta: #1d1d1c;
    --testo: #ececea;
    --tenue: #a2a29c;
    --accento: #4fae8c;
    --accento-testo: #0d1b16;
    --errore: #ff8a7f;
    --bordo: #2e2e2c;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--sfondo);
  color: var(--testo);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
main {
  width: 100%;
  max-width: 360px;
  background: var(--carta);
  border: 1px solid var(--bordo);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
}
h1 { font-size: 1.25rem; margin: 0 0 4px; }
p { margin: 0 0 16px; color: var(--tenue); font-size: 0.95rem; }
label { display: block; text-align: left; font-size: 0.85rem; color: var(--tenue); margin: 12px 0 4px; }
input {
  width: 100%;
  padding: 12px;
  font: inherit;
  color: var(--testo);
  background: var(--sfondo);
  border: 1px solid var(--bordo);
  border-radius: 10px;
}
input#invito { letter-spacing: 0.08em; text-transform: uppercase; font-family: ui-monospace, Menlo, monospace; }
button {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  font: inherit;
  font-weight: 600;
  color: var(--accento-testo);
  background: var(--accento);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}
button:disabled { opacity: 0.6; cursor: default; }
.messaggio { min-height: 1.5em; margin: 16px 0 0; font-size: 0.9rem; }
.messaggio.errore { color: var(--errore); }
.messaggio.ok { color: var(--accento); }
