* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: #f3f1f8; color: #1d1830; font-size: 16px; line-height: 1.45; }
.testata { background: linear-gradient(135deg, #2a0b4f, #7b2ff7 60%, #ff2e93); color: #fff; padding: 22px 18px 26px; display: flex; gap: 16px; align-items: center; }
.testata .logo-sito { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 14px; padding: 6px; flex: none; }
.testata .sito { font-size: 13px; opacity: .85; letter-spacing: .04em; text-transform: uppercase; }
.testata h1 { margin: 2px 0 2px; font-size: 26px; line-height: 1.15; }
.testata .sotto { font-size: 15px; opacity: .9; }
main { max-width: 720px; margin: -12px auto 40px; padding: 0 12px; }
.box { background: #fff; border-radius: 18px; padding: 22px 18px; box-shadow: 0 6px 24px rgba(42, 11, 79, .08); margin-bottom: 16px; }
.intro { margin-top: 0; color: #4a4560; }
.avviso { background: #fff6dd; border: 1px solid #f0d58a; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-size: 15px; }
h2 { font-size: 19px; margin: 26px 0 6px; }
h3 { font-size: 15px; margin: 18px 0 8px; color: #4a4560; }
.campi { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
@media (max-width: 560px) { .campi { grid-template-columns: 1fr; } }
.campo { margin-bottom: 12px; }
.campo:has(textarea), .campo:has(.sino) { grid-column: 1 / -1; }
.campo label { display: block; font-weight: 650; font-size: 14px; margin-bottom: 5px; }
.campo input[type=text], .campo input[type=email], .campo input[type=tel], .campo input[type=date], .campo input[type=number], .campo select, .campo textarea {
  width: 100%; font: inherit; padding: 12px 13px; border: 1.5px solid #d9d4e6; border-radius: 11px; background: #fbfaff; color: inherit; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: #7b2ff7; box-shadow: 0 0 0 3px rgba(123, 47, 247, .15); background: #fff; }
.campo .aiuto, .aiuto { font-size: 13px; color: #7a748e; margin-top: 4px; }
.obbl { color: #e0217f; }
.sino { display: flex; gap: 10px; }
.opz { display: flex !important; align-items: flex-start; gap: 10px; font-weight: 500 !important; cursor: pointer; }
.sino .opz { border: 1.5px solid #d9d4e6; border-radius: 11px; padding: 10px 18px; align-items: center; }
.opz input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: #7b2ff7; flex: none; }
.consenso .opz { font-size: 14px; color: #3b3650; }
.consenso a { color: #7b2ff7; }
.campo.errore input, .campo.errore select, .campo.errore textarea, .campo.errore .sino .opz { border-color: #e0217f; background: #fff5f9; }
.msg-errore { color: #d0105f; font-size: 13px; font-weight: 600; min-height: 0; margin-top: 4px; }
.msg-errore:empty { display: none; }
.hp { position: absolute; left: -9999px; height: 1px; overflow: hidden; }
.sezione-file h2 { margin-top: 18px; }
.pulsanti-file { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.btn { display: inline-flex; align-items: center; gap: 6px; background: #7b2ff7; color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700; cursor: pointer; font-size: 15px; }
.btn.sec { background: #efeaff; color: #4b1fb0; }
.btn input { display: none; }
.ritaglio { margin-top: 10px; }
#tela-ritaglio { width: 240px; height: 300px; border-radius: 14px; background: #ddd; touch-action: none; cursor: grab; display: block; box-shadow: 0 4px 16px rgba(0, 0, 0, .15); }
.zoom { display: flex; align-items: center; gap: 10px; width: 240px; margin-top: 8px; color: #7a748e; font-weight: 700; }
.zoom input { flex: 1; accent-color: #7b2ff7; }
.anteprima canvas, .anteprima-senza canvas { width: 100%; height: auto; border-radius: 10px; display: block; }
.anteprima-senza h3 { font-size: 15px; margin: 12px 0 8px; }
.foto-no .aiuto { margin-top: 10px; }
.campo-domanda-foto .scelte-sino { display: flex; gap: 10px; flex-wrap: wrap; }
.prev-loghi { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.prev-loghi canvas { border-radius: 12px; width: 100%; height: auto; }
#tela-logo { box-shadow: 0 0 0 1px #e2dff0; }
.avvisi-logo div { background: #fff6dd; border-radius: 10px; padding: 8px 12px; font-size: 14px; margin-top: 8px; }
.file-attuale img { width: 160px; border-radius: 12px; display: block; margin: 6px 0; box-shadow: 0 2px 10px rgba(0, 0, 0, .1); }
.file-attuale .aiuto { margin-bottom: 6px; }
.invia { width: 100%; margin-top: 18px; font: inherit; font-size: 18px; font-weight: 800; padding: 16px; border: 0; border-radius: 14px; color: #fff; background: linear-gradient(90deg, #7b2ff7, #ff2e93); cursor: pointer; }
.invia:disabled { opacity: .6; cursor: wait; }
.msg-generale { color: #d0105f; font-weight: 700; margin-top: 12px; }
.msg-generale:empty { display: none; }
#lvi-fatto { text-align: center; }
#lvi-fatto .ok { font-size: 54px; }
#lvi-fatto .link { word-break: break-all; background: #f3f1f8; border-radius: 10px; padding: 10px; font-size: 14px; margin: 10px 0; }
#lvi-fatto button { font: inherit; font-weight: 700; padding: 10px 16px; border-radius: 10px; border: 0; background: #efeaff; color: #4b1fb0; cursor: pointer; }
[hidden] { display: none !important; }
