/* HallOfFame Piscinola — stile "Arena" (vedi design/arena.png) */
:root {
  --nero: #0b0b0d; --nero2: #17171c; --oro: #d4af37; --oro-chiaro: #f6e08f; --bianco: #f7f5ee; --viola: #4b2a8c;
  --argento: #c9ccd3; --bronzo: #c98a4b; --tenue: #ffffffa6; --spento: #ffffff66;
  --oro-v: linear-gradient(180deg, var(--oro-chiaro), var(--oro));
  --vetro: linear-gradient(180deg, #ffffff1f, #ffffff08);
  --titolo: "Anton", Impact, sans-serif; --testo: "Barlow Condensed", "Bahnschrift", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; }
html { background: var(--nero); }
body {
  min-height: 100dvh; color: var(--bianco); font: 600 16px/1.2 var(--testo); -webkit-tap-highlight-color: transparent;
  background: radial-gradient(600px 520px at 0% -8%, #7a5f1ccc, transparent 70%),
              radial-gradient(460px 400px at 110% 100%, #4b2a8c55, transparent 70%), var(--nero);
  background-attachment: fixed;
}
body::before { /* stella dello stemma, appena visibile */
  content: ""; position: fixed; inset: 40px -60px auto auto; width: 320px; height: 320px; opacity: .05; pointer-events: none; background: var(--oro);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
main { max-width: 480px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px 120px; position: relative; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
:focus-visible { outline: 2px solid var(--oro-chiaro); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--titolo); font-weight: 400; letter-spacing: .5px; line-height: 1; }
h1 { font-size: 26px; } h2 { font-size: 22px; } h3 { font-size: 18px; }
.oro { background: var(--oro-v); -webkit-background-clip: text; background-clip: text; color: transparent; }
.oro-chiaro { color: var(--oro-chiaro); }
.etichetta { font-size: 12px; letter-spacing: 2px; color: var(--oro-chiaro); text-transform: uppercase; margin: 14px 2px 8px; }
.etichetta.tenue { color: var(--tenue); margin: 2px 0 0; } .etichetta.spento { color: var(--spento); }
.vetro { background: var(--vetro); border: 1px solid #ffffff24; border-radius: 22px; }
.avviso { padding: 18px; color: var(--tenue); text-align: center; margin: 10px 0; }
.caricamento { text-align: center; padding: 40vh 0; color: var(--tenue); }
.nota { color: var(--spento); font-size: 13px; margin: 12px 2px; }

/* testata */
.testata { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; min-height: 48px; }
.testata .logo { width: 42px; height: 42px; border-radius: 50%; }
.testata > div { flex: 1; min-width: 0; }
.testata select { background: var(--nero2); border: 1px solid #ffffff24; border-radius: 14px; padding: 6px 8px; font-size: 13px; max-width: 120px; }
.tondo { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; flex: none; }

/* maglie: il numero resta visibile se l'immagine manca */
.maglia { position: relative; display: inline-grid; place-items: center; width: var(--d); height: var(--d); flex: none; }
.maglia b { font: 400 calc(var(--d) * .38) var(--titolo); width: 70%; height: 80%; display: grid; place-items: center; border-radius: 22% 22% 12% 12%;
  background: var(--nero); color: var(--bianco); border: 2px solid var(--oro); }
.maglia.bianca b { background: var(--bianco); color: var(--nero); }
.maglia:has(img) b { visibility: hidden; }
.maglia img { position: absolute; inset: 0; width: 100%; height: 100%; }

/* bottoni */
.bottone-oro, .pill-oro { background: var(--oro-v); color: var(--nero); border-radius: 999px; font-family: var(--titolo); letter-spacing: .5px; }
.bottone-oro { display: block; width: 100%; padding: 16px; font-size: 22px; text-align: center; box-shadow: 0 10px 24px #00000099; }
.bottone-oro.piccolo { display: inline-block; width: auto; padding: 9px 16px; font: 700 14px var(--testo); letter-spacing: 1px; box-shadow: 0 4px 10px #00000088; }
.bottone-oro:disabled { background: #2d2a20; color: #ffffff4d; box-shadow: none; border: 1px solid #ffffff1a; }
.pill-oro { padding: 3px 12px; }
.bottone-vetro { background: var(--vetro); border: 1px solid #ffffff24; border-radius: 999px; padding: 10px 14px; letter-spacing: 1px; font-size: 13px; }
.bottone-vetro.attivo { border-color: var(--oro); color: var(--oro-chiaro); }
.bottone-pericolo { color: #ff8a80; border-color: #ff8a8066; }

/* home */
.cta { display: block; position: relative; overflow: hidden; border-radius: 28px; padding: 16px 18px 18px; margin-bottom: 18px;
  background: linear-gradient(135deg, #8a6c1f, #2a210b); border: 1px solid #f6e08f66; box-shadow: 0 14px 34px #000000aa; }
.cta .etichetta { margin-top: 0; }
.cta h2 { font-size: 50px; margin: 4px 0 14px; position: relative; z-index: 1; }
.cta .bottone-oro { position: relative; z-index: 1; }
.cta-maglie { position: absolute; right: -20px; top: 14px; display: flex; }
.cta-maglie .maglia:last-child { margin-left: -95px; margin-top: 18px; }
.sezione { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.sezione a { color: var(--oro-chiaro); font-size: 13px; letter-spacing: 1px; }
.partita { display: block; padding: 10px 12px 12px; margin-bottom: 10px; }
.riga-alta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.riga-alta .etichetta { margin: 0; font-size: 11px; }
.chip-mvp { background: #d4af3726; border: 1px solid #d4af3780; color: var(--oro-chiaro); border-radius: 999px; padding: 3px 10px; font-size: 11px; letter-spacing: 1px; white-space: nowrap; }
.squadre { display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; margin-top: 8px; }
.lato { min-width: 0; } .lato.destra { text-align: right; }
.nome-squadra { font-size: 12px; letter-spacing: 1px; margin-bottom: 4px; }
.nome-squadra.oro { color: var(--oro-chiaro); background: none; }
.fila { display: flex; } .fila .maglia { margin-right: -8px; } .lato.destra .fila { justify-content: flex-end; } .lato.destra .fila .maglia { margin: 0 0 0 -8px; }
.punteggio { display: flex; align-items: baseline; gap: 2px; font-family: var(--titolo); }
.punti { font-size: 36px; color: var(--spento); } .punteggio i { color: var(--spento); font-style: normal; font-size: 26px; }

/* classifica e giocatore */
.copertina { position: relative; min-height: 300px; padding-top: 4px; }
.copertina .fantasma { position: absolute; left: -16px; top: -10px; font: 400 300px/1 var(--titolo); color: #ffffff0d; pointer-events: none; }
.copertina > .maglia { position: absolute; right: -16px; top: 0; filter: drop-shadow(0 0 40px #f6e08f33); }
.copertina .in-testa { margin-top: 110px; color: var(--tenue); letter-spacing: 3px; position: relative; }
.copertina .grande { font-size: 62px; position: relative; overflow-wrap: anywhere; }
.copertina.giocatore { min-height: 400px; } .copertina.giocatore .grande { padding-top: 270px; font-size: 56px; }
.copertina.giocatore .fantasma { left: auto; right: 0; font-size: 340px; }
.num-pill { display: flex; gap: 12px; align-items: center; font-size: 22px; margin-top: 6px; position: relative; }
.num-pill .pill-oro { font-size: 16px; }
.griglia-4, .griglia-3, .griglia-2 { display: grid; gap: 8px; margin: 14px 0; }
.griglia-4 { grid-template-columns: repeat(4, 1fr); } .griglia-3 { grid-template-columns: repeat(3, 1fr); } .griglia-2 { grid-template-columns: repeat(2, 1fr); }
.stat { padding: 10px 4px; text-align: center; } .stat b { display: block; font: 400 32px var(--titolo); }
.stat small { font-size: 10px; letter-spacing: 1px; color: var(--tenue); }
.tabella-testa, .riga-cl { display: grid; grid-template-columns: 30px 42px 1fr 40px 32px 32px 52px; align-items: center; gap: 4px; }
.tabella-testa { font-size: 10px; letter-spacing: 1px; color: var(--spento); text-align: center; margin: 18px 0 6px; }
.tabella-testa span:first-child { grid-column: 1 / 4; text-align: left; padding-left: 4px; }
.riga-cl { padding: 3px 8px 3px 4px; margin-bottom: 6px; border-radius: 16px; text-align: center; font-size: 14px; color: var(--tenue); }
.riga-cl .chi { text-align: left; display: flex; flex-direction: column; min-width: 0; }
.riga-cl .chi b { color: var(--bianco); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.riga-cl small, .figurina small, .compagno small { color: var(--spento); font-size: 11px; }
.pos { font: 400 22px var(--titolo); color: var(--bianco); } .pos-1 { color: var(--oro-chiaro); } .pos-2 { color: var(--argento); } .pos-3 { color: var(--bronzo); }
.pt { font: 400 17px var(--titolo); color: var(--bianco); background: #ffffff1a; border-radius: 999px; padding: 3px 0; }
.pt.pill-oro { color: var(--nero); background: var(--oro-v); }
.figurina { display: flex; flex-direction: column; align-items: center; padding: 10px; gap: 2px; text-align: center; }
.figurina.spenta { opacity: .45; }
.esiti { display: flex; gap: 6px; flex-wrap: wrap; }
.esito { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-family: var(--titolo); background: #ffffff1a; color: var(--tenue); }
.esito.V { background: var(--oro-v); color: var(--nero); }
.compagno { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.compagno span, .slot span { display: flex; flex-direction: column; }

/* dettaglio partita */
.tabellone { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 18px 10px 44px; position: relative; text-align: center; }
.tabellone p { letter-spacing: 1px; } .tabellone b { font: 400 88px/1 var(--titolo); display: block; }
.tabellone i { font: 400 60px var(--titolo); color: var(--spento); font-style: normal; }
.tabellone .chip-mvp { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); }
.pannelli { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.pannello { border-radius: 22px; padding: 10px 6px; border: 1px solid #f7f5ee40; background: linear-gradient(180deg, #f7f5ee26, #f7f5ee0a); }
.pannello.nera { border-color: #d4af3799; background: linear-gradient(180deg, #d4af3730, transparent); }
.pannello h3 { padding: 0 6px 6px; }
.slot { display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 14px; background: #ffffff0a; margin-top: 6px; font-size: 14px; min-height: 52px; width: 100%; text-align: left; }
.slot b { font-weight: 600; overflow-wrap: anywhere; }

/* barra in basso */
.barra { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom)); width: min(448px, calc(100% - 28px));
  height: 66px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; border-radius: 33px;
  background: #16161be8; border: 1px solid #ffffff1f; box-shadow: 0 10px 30px #000000cc; backdrop-filter: blur(12px); z-index: 10; }
.barra a { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 9px; letter-spacing: 1px; color: var(--spento); }
.barra a.attiva { color: var(--oro-chiaro); }
.barra .piu span { width: 62px; height: 62px; margin-top: -40px; border-radius: 50%; display: grid; place-items: center; background: var(--oro-v); color: var(--nero);
  font-size: 0; border: 4px solid var(--nero); box-shadow: 0 8px 18px #000000aa; position: relative; }
/* il + disegnato con due barre: un carattere del font non sta mai al centro esatto */
.barra .piu span::before, .barra .piu span::after { content: ""; position: absolute; left: 50%; top: 50%; width: 24px; height: 4px;
  border-radius: 2px; background: var(--nero); transform: translate(-50%, -50%); }
.barra .piu span::after { transform: translate(-50%, -50%) rotate(90deg); }
.ic { width: 22px; height: 22px; background: currentColor; display: block; }
.ic-home { clip-path: polygon(50% 0, 100% 41%, 100% 100%, 64% 100%, 64% 64%, 36% 64%, 36% 100%, 0 100%, 0 41%); }
.ic-classifica { clip-path: polygon(0 55%, 27% 55%, 27% 100%, 36% 100%, 36% 9%, 64% 9%, 64% 100%, 73% 100%, 73% 36%, 100% 36%, 100% 100%, 0 100%); }
.ic-admin { -webkit-mask: linear-gradient(#000, #000) 50% 100% / 80% 55% no-repeat, radial-gradient(circle at 50% 42%, transparent 20%, #000 21%, #000 31%, transparent 32%) 50% 0 / 100% 70% no-repeat;
  mask: linear-gradient(#000, #000) 50% 100% / 80% 55% no-repeat, radial-gradient(circle at 50% 42%, transparent 20%, #000 21%, #000 31%, transparent 32%) 50% 0 / 100% 70% no-repeat; }
.ic-giocatori { -webkit-mask: radial-gradient(circle at 50% 24%, #000 23%, transparent 24%), radial-gradient(ellipse 50% 46% at 50% 100%, #000 99%, transparent 100%);
  mask: radial-gradient(circle at 50% 24%, #000 23%, transparent 24%), radial-gradient(ellipse 50% 46% at 50% 100%, #000 99%, transparent 100%); }

/* inserimento */
.azioni-3, .azioni-2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.azioni-2 { grid-template-columns: 1fr 1fr; text-align: center; }
.bottone-vetro:disabled { opacity: .35; }
.centro { display: block; margin: 12px auto; }
.pannello h3 { display: flex; justify-content: space-between; align-items: baseline; }
.conta { font: 700 16px var(--testo); color: var(--oro-chiaro); }
.slot.vuoto { justify-content: center; color: var(--spento); border: 1px dashed #ffffff33; background: none; letter-spacing: 1px; font-size: 12px; }
.slot.scelto { outline: 2px solid var(--oro-chiaro); background: #d4af3733; }
.fuori { display: flex; flex-direction: column; align-items: center; padding: 8px 6px; gap: 2px; font-size: 13px; text-align: center; }
.bn { display: flex; gap: 6px; margin-top: 4px; }
.bn button { width: 40px; height: 32px; border-radius: 16px; border: 1px solid var(--oro); font: 400 16px var(--titolo); background: var(--bianco); color: var(--nero); }
.bn button + button { background: var(--nero); color: var(--oro-chiaro); }
.bn button:disabled { opacity: .25; }
.fisso { position: sticky; bottom: 96px; margin-top: 18px; z-index: 5; }
.tabellone-input { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 16px 8px 50px; position: relative; }
.tabellone-input > i { font: 400 56px var(--titolo); color: var(--spento); font-style: normal; }
.tabellone-input .chip-mvp { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); }
.lato-punti { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; letter-spacing: 1px; }
.lato-punti input { width: 100%; max-width: 140px; text-align: center; font: 400 84px/1 var(--titolo); background: none; border: 0; border-bottom: 2px solid #ffffff24; }
.lato-punti input.oro-chiaro { color: var(--oro-chiaro); }
.lato-punti span { display: flex; gap: 14px; }
.testata input[type="date"] { background: none; border: 0; color: var(--tenue); font-size: 13px; letter-spacing: 1px; padding: 0; }
.griglia-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 8px; }
.mvp { display: flex; flex-direction: column; align-items: center; padding: 4px 2px 6px; border-radius: 16px; background: var(--vetro); border: 1px solid #ffffff24; }
.mvp small { font-size: 10px; color: var(--tenue); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mvp.scelto { border: 2px solid var(--oro-chiaro); background: linear-gradient(180deg, #d4af3766, #d4af3714); }
.mvp.scelto small { color: var(--oro-chiaro); }
.errore { color: #ff8a80; text-align: center; margin: 10px 0; }
.ciao { font: 400 34px var(--titolo); text-align: center; margin-top: 10px; }
.puntini { display: flex; justify-content: center; gap: 16px; margin: 18px 0; }
.puntini span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--oro-chiaro); }
.puntini .pieno { background: var(--oro-chiaro); }
.tastierino { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px; justify-content: center; }
.tastierino button { height: 72px; border-radius: 50%; font: 400 30px var(--titolo); }
.modulo { display: flex; align-items: center; gap: 6px; padding: 6px 8px; margin-bottom: 8px; flex-wrap: wrap; }
.modulo input:not([type="checkbox"]) { flex: 1; min-width: 0; background: #ffffff0f; border: 1px solid #ffffff24; border-radius: 12px; padding: 8px 10px; }
.modulo input.corto { flex: 0 0 56px; padding: 8px 6px; text-align: center; }
.spunta { font-size: 13px; color: var(--tenue); display: flex; gap: 4px; align-items: center; }
.avviso-volante { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); background: var(--oro-v); color: var(--nero); padding: 10px 18px;
  border-radius: 999px; z-index: 20; font-weight: 700; letter-spacing: 1px; box-shadow: 0 8px 20px #000a; }
.slot.vuoto { width: 100%; cursor: pointer; }
.velo { position: fixed; inset: 0; background: #000000b3; z-index: 30; }
.foglio { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(480px, 100%); max-height: 75dvh; overflow-y: auto; z-index: 31;
  background: linear-gradient(180deg, #221d10, var(--nero)); border: 1px solid #f6e08f40; border-bottom: 0; border-radius: 28px 28px 0 0;
  padding: 16px 16px max(20px, env(safe-area-inset-bottom)); box-shadow: 0 -16px 40px #000c; }
.foglio-testa { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.scelta { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; gap: 2px; text-align: center; }
.scelta small { color: var(--spento); font-size: 11px; }
.partita + .azioni-2 { margin: -4px 6px 14px; }
.partita + .azioni-2 .bottone-vetro { padding: 7px 10px; font-size: 12px; }
