:root {
  --accento: #EEA403;
  --carta-bg: #231F20;
  --crema: #FBF6EA;
  --bianco: #FFFFFF;
  --testo: #231F20;
  --testo-2: #5E5753;
  --bordo: #E7DFCF;
  --errore: #B3261E;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--crema); color: var(--testo);
  font: 500 16px/1.5 "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap {
  max-width: 480px; margin: 0 auto;
  padding-top: max(18px, env(safe-area-inset-top, 0px));
  padding-bottom: max(40px, env(safe-area-inset-bottom, 0px));
  padding-left: max(18px, env(safe-area-inset-left, 0px));
  padding-right: max(18px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 18px;
}
header { display: flex; justify-content: center; }
header img { width: 56px; height: auto; display: block; }
h1 { font-weight: 900; font-size: clamp(24px, 7vw, 30px); line-height: 1.12; margin: 0; letter-spacing: -0.01em; text-wrap: balance; text-align: center; }
h1 em { font-style: normal; color: var(--accento); }
.blocco { display: flex; flex-direction: column; gap: 8px; }
.lead { margin: 0; text-align: center; color: var(--testo-2); font-size: 15px; text-wrap: pretty; }
.etichetta { display: block; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--testo-2); }

/* ── Carta ─────────────────────────────────────────── */
.card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  aspect-ratio: 1.586; max-width: 100%; padding: 18px 20px; border-radius: 18px;
  background: var(--carta-bg); color: #fff; text-decoration: none;
  box-shadow: 0 18px 40px -18px rgba(35,31,32,.55);
}
.card::before {
  content: ""; position: absolute; width: 72%; aspect-ratio: 2 / 1; right: -14%; top: -2px;
  background: var(--accento); border-radius: 0 0 999px 999px; opacity: .96;
}
.card > * { position: relative; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-brand { line-height: 1; }
.card-brand b { display: block; font-weight: 900; font-size: 20px; letter-spacing: .02em; }
.card-brand small { display: block; margin-top: 6px; font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; opacity: .75; }
.card-pts { text-align: right; color: var(--carta-bg); line-height: 1; }
.card-pts strong { display: block; font-size: clamp(30px, 9vw, 40px); font-weight: 900; letter-spacing: -0.02em; }
.card-pts small { display: block; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; margin-top: 2px; }
.card-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.card-name { font-weight: 700; font-size: 15px; }
.card-sede { font-size: 11px; opacity: .7; margin-top: 2px; }
.card-code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; letter-spacing: .08em; opacity: .9; white-space: nowrap; }
.card-mini { aspect-ratio: auto; padding: 16px 18px; min-height: 88px; justify-content: center; }
.card-mini::before { width: 46%; right: -8%; }
.card-mini .card-pts strong { font-size: 26px; }

/* ── Box ───────────────────────────────────────────── */
.box { background: var(--bianco); border: 1px solid var(--bordo); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.box p { margin: 0; font-size: 14px; color: var(--testo-2); }
.cassa { text-align: center; align-items: center; }
.cassa .numero { font-size: clamp(28px, 9vw, 36px); font-weight: 900; letter-spacing: .02em; font-variant-numeric: tabular-nums; color: var(--testo); }
.premi strong { font-size: 17px; font-weight: 800; }
.barra { height: 10px; border-radius: 999px; background: var(--crema); border: 1px solid var(--bordo); overflow: hidden; }
.barra span { display: block; height: 100%; background: var(--accento); border-radius: 999px; }
.lista { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.lista li { font-weight: 700; font-size: 15px; }
.lista small { font-weight: 500; color: var(--testo-2); margin-left: 4px; }
.installa { border-color: var(--accento); }
.ios { margin: 0; padding-left: 20px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.ios .nota { list-style: none; margin-left: -20px; color: var(--testo-2); font-size: 12.5px; }
.ico { width: 18px; height: 18px; vertical-align: -3px; color: #0A84FF; }
.altre { display: flex; flex-direction: column; gap: 10px; }
.quiigo { text-align: center; }

/* ── Form ──────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 14px; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
input[type=tel], input[type=password] {
  font-family: inherit; font-size: 16px; font-weight: 600; color: var(--testo);
  background: var(--bianco); border: 1.5px solid var(--bordo); border-radius: 12px; padding: 13px 14px; width: 100%;
}
input:focus { outline: none; border-color: var(--carta-bg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accento) 35%, transparent); }
.pin { letter-spacing: .35em; font-size: 20px !important; text-align: center; }
.form-err { margin: 0; color: var(--errore); font-size: 13px; font-weight: 700; text-align: center; }
.hint { margin: 0; font-size: 13px; color: var(--testo-2); }
.hint a { color: var(--testo); font-weight: 700; }
.center { text-align: center; }

.cta {
  appearance: none; border: 0; cursor: pointer; width: 100%;
  background: var(--accento); color: var(--carta-bg);
  font-family: inherit; font-size: 17px; font-weight: 900; padding: 17px 20px; border-radius: 14px;
  box-shadow: 0 6px 0 color-mix(in srgb, var(--accento) 72%, #000);
}
.cta:active { transform: translateY(4px); box-shadow: 0 2px 0 color-mix(in srgb, var(--accento) 72%, #000); }
.btn-sec { display: block; text-decoration: none; text-align: center; background: var(--carta-bg); color: #fff; font-weight: 800; padding: 15px; border-radius: 14px; }

footer { text-align: center; font-size: 12px; color: var(--testo-2); display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
footer form { margin: 0; }
.link { appearance: none; background: none; border: 0; padding: 4px; font: inherit; font-weight: 700; color: var(--testo-2); text-decoration: underline; cursor: pointer; }
