*{box-sizing:border-box}
body{font-family:system-ui,sans-serif;max-width:980px;margin:0 auto;padding:1rem;color:#222;background:#f6f7f9}
h1{font-size:1.3rem;margin:.2rem 0} h2{font-size:1.05rem;margin:1.2rem 0 .4rem}
.muted{color:#667;font-size:.85rem}
a{color:#1a5fc0}

/* testata pagina referente */
.testata{display:flex;justify-content:space-between;align-items:baseline;gap:.5rem}
.girone{font-weight:700;color:#445;white-space:nowrap}
.contatti{display:flex;flex-wrap:wrap;gap:.3rem .9rem;align-items:center;font-size:.92rem;margin:.1rem 0 .6rem}
.contatti details{flex-basis:100%}
.contatti summary{cursor:pointer;color:#1a5fc0;display:inline}
.contatti form{display:grid;grid-template-columns:1fr;gap:.4rem;margin:.5rem 0;max-width:420px}
.contatti label{font-size:.78rem;color:#667;display:block}

/* elenco incontri: [giornata] [rettangolo] [punteggio] [punti] */
.riga-inc{display:flex;gap:.45rem;align-items:stretch;margin:.55rem 0;text-decoration:none;color:inherit}
.quadro{flex:0 0 3.4rem;min-height:3.4rem;border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#fff;border:1px solid #dde}
.quadro.giornata{background:#2b3a55;color:#fff;border-color:#2b3a55;font-size:1.9rem;font-weight:800}
.quadro.punteggio{font-size:1.15rem;font-weight:800;color:#223}
.quadro.punti{font-size:1.5rem;font-weight:800;color:#1e6b34;background:#e6f4ea;border-color:#b9dfc3}
.quadro small{font-size:.6rem;font-weight:600;color:#889;text-transform:uppercase;letter-spacing:.03em}
.quadro.punti small{color:#4a8a5b}
.quadro.vuoto{color:#c3c8d2;background:#fafbfc}
.quadro.provvisorio{opacity:.6}
.riga-inc .card{flex:1;margin:0;min-width:0}

.card{background:#fff;border:1px solid #dde;border-radius:10px;padding:.7rem .8rem;margin:.6rem 0}
.tag{display:inline-block;padding:.1rem .5rem;border-radius:99px;font-size:.78rem;background:#eef;color:#335}
.tag.azione{background:#fff3cd;color:#7a5b00;font-weight:600}
.tag.ok{background:#e6f4ea;color:#1e6b34}
.tag.ko{background:#fdecea;color:#a02020}
.flash{background:#e6f4ea;border:1px solid #b9dfc3;padding:.7rem;border-radius:8px;margin:.6rem 0}
.errori{background:#fdecea;border:1px solid #f1b8b4;padding:.7rem;border-radius:8px;margin:.6rem 0}
.errori ul{margin:.3rem 0 0 1.1rem;padding:0}
.btn{display:inline-block;padding:.65rem 1rem;border-radius:8px;border:0;background:#1a6ed8;color:#fff;font:inherit;font-weight:600;cursor:pointer;text-decoration:none}
.btn.verde{background:#1e8e3e} .btn.rosso{background:#c0392b} .btn.grigio{background:#667} .btn.arancio{background:#c77700}
input[type=text],input[type=email],input[type=date],textarea,select{font:inherit;width:100%;padding:.5rem;border:1px solid #bbc;border-radius:6px}

/* giocatori a referto */
.top4{background:#eef3fb;border-radius:8px;padding:.6rem;margin:.6rem 0}
.top4 .griglia{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.4rem;margin-top:.3rem}
.top4 label{font-size:.75rem;color:#667;display:block}
@media (max-width:560px){.top4 .griglia{grid-template-columns:1fr 1fr}}

/* tabella referto in stile FITET */
.refwrap{overflow-x:auto;margin:.6rem 0;-webkit-overflow-scrolling:touch}
table.referto{border-collapse:collapse;min-width:820px;width:100%;background:#fff;font-size:.9rem}
table.referto th,table.referto td{border:1px solid #9aa4b2;padding:.15rem .2rem;text-align:center}
table.referto th{background:#e9edf3;font-size:.75rem;font-weight:700}
table.referto th.nome{text-align:left;min-width:8rem}
table.referto td.lab{white-space:nowrap;font-weight:700;font-size:.82rem;text-align:left;padding:.15rem .4rem}
table.referto td.nome{text-align:left;padding:.15rem .4rem}
table.referto .s1,table.referto .s3,table.referto .s5{background:#fff}
table.referto .s2,table.referto .s4{background:#e6e9ee}
table.referto th.s2,table.referto th.s4{background:#d5dae2}
table.referto th.s1,table.referto th.s3,table.referto th.s5{background:#f1f3f7}
table.referto input.nm{width:100%;min-width:7.5rem;border:0;background:transparent;padding:.4rem .2rem;font:inherit;font-size:16px;border-radius:0}
table.referto input.pt{width:2.2rem;border:0;background:transparent;text-align:center;padding:.4rem 0;font-size:16px;border-radius:0}
table.referto input:focus{outline:2px solid #1a6ed8;outline-offset:-2px;background:#fffbe6}
table.referto td.tot{width:1.9rem;font-weight:700;background:#f4f6f9}
table.referto tr.totali td{background:#dfe5ee;font-weight:800}
table.referto .vince{font-weight:800}
.esito{font-weight:700;margin:.2rem 0;min-height:1.3rem}

@media (max-width:560px){
 table.referto{min-width:660px;font-size:.82rem}
 table.referto th.nome{min-width:5.5rem}
 table.referto input.nm{min-width:5.5rem}
 .quadro{flex-basis:3.1rem}
 .quadro.giornata{font-size:1.7rem}
}

.programma{margin:.2rem 0 .8rem}
.programma summary{cursor:pointer;color:#1a5fc0}
.programma form{display:grid;grid-template-columns:1fr;gap:.45rem;margin:.5rem 0;max-width:440px}
.programma label{font-size:.78rem;color:#667;display:block}
