/* Hic Sunt Leones: scritte bianche e arancioni su una carta dei sentieri nera.
   Impianto: la carta a curve di livello sta ferma sotto tutte le pagine; i contenuti scorrono sopra
   su una colonna di 1120px; il segnavia a tre bande (arancio-bianco-arancio) è il motivo ricorrente. */
@font-face { font-family: "Anton"; src: url(/static/fonts/anton.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Work Sans"; src: url(/static/fonts/worksans.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url(/static/fonts/worksans-italic.woff2) format("woff2"); font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(/static/fonts/jetbrainsmono.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --nero: #0d0b0a;             /* fondo della carta */
  --pannello: #171311;         /* schede e moduli */
  --pannello-2: #211b17;       /* riquadri dentro le schede, intestazioni di tabella */
  --velo: rgba(13, 11, 10, .82);
  --linea: #2f2722;
  --linea-forte: #4a3c33;
  --bianco: #f7f3ef;           /* testo */
  --tenue: #b3a59a;            /* testo secondario */
  --arancio: #f26b1d;          /* titoli, link, pulsanti */
  --arancio-chiaro: #ff8a45;
  --arancio-velo: rgba(242, 107, 29, .13);
  --verde: #5fd08a; --verde-bg: #10281a;
  --rosso: #ff7070; --rosso-bg: #2e1414;
  --display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --testo: "Work Sans", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --raggio: 6px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--nero); color: var(--bianco); font-family: var(--testo); font-size: 17px; line-height: 1.6; }
img, video { max-width: 100%; }
a { color: var(--arancio); text-underline-offset: 3px; }
a:hover { color: var(--bianco); }
:focus-visible { outline: 3px solid var(--arancio-chiaro); outline-offset: 3px; }
[hidden] { display: none !important; }
main { flex: 1 0 auto; }
h1, h2, h3 { text-wrap: balance; }
p { margin: 0 0 1em; }
.arancio { color: var(--arancio); }
.salta { position: absolute; left: -999px; top: 8px; background: var(--arancio); color: var(--nero); padding: 8px 12px; z-index: 50; }
.salta:focus { left: 8px; }

/* la carta sotto tutte le pagine */
.topo { position: fixed; inset: 0; width: 100%; height: 100vh; z-index: -1; pointer-events: none; }

.in { max-width: 1120px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.in.stretto { max-width: 760px; }

/* ---------- barra ---------- */
.barra { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(13, 11, 10, .9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linea); }
.barra .in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--bianco); }
.brand > span:last-child { font-family: var(--display); font-size: 21px; letter-spacing: .04em; text-transform: uppercase; }
.brand:hover { color: var(--bianco); }
.mark { display: inline-grid; place-items: center; background: var(--arancio); color: #fff; font-family: var(--display); font-size: 17px; letter-spacing: .08em; width: 52px; height: 36px; border-radius: 4px; }
.mark.grande { width: 104px; height: 72px; font-size: 34px; background: var(--bianco); color: var(--arancio); }
.logo { height: 40px; width: auto; display: block; }
.logo.grande { height: 110px; }
.barra nav { display: flex; gap: 4px 20px; flex-wrap: wrap; }
.barra nav a { color: var(--bianco); text-decoration: none; font-weight: 500; padding: 6px 0; border-bottom: 3px solid transparent; }
.barra nav a:hover, .barra nav a[aria-current] { border-color: var(--arancio); }
.utente { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.utente form { margin: 0; }

/* ---------- pulsanti ---------- */
.btn { display: inline-block; font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; background: var(--arancio); color: var(--nero); border: 2px solid var(--arancio); border-radius: var(--raggio); padding: 10px 18px; cursor: pointer; line-height: 1.3; }
.btn:hover { background: var(--bianco); border-color: var(--bianco); color: var(--nero); }
.btn.piccolo { padding: 6px 12px; font-size: 15px; }
.btn.bianco { background: var(--bianco); color: var(--nero); border-color: var(--bianco); }
.btn.bianco:hover { background: var(--arancio); border-color: var(--arancio); }
.btn.contorno { background: transparent; color: var(--bianco); border-color: var(--bianco); }
.btn.contorno:hover { background: var(--bianco); color: var(--nero); }
.btn.verde { background: var(--verde); border-color: var(--verde); color: var(--nero); }
.btn.rosso, .btn.contorno.rosso { color: var(--rosso); border-color: var(--rosso); background: transparent; }
.btn.rosso:hover { background: var(--rosso); color: var(--nero); }
.btn:disabled { opacity: .5; cursor: wait; }
.link { font: inherit; background: none; border: 0; padding: 0; color: var(--arancio); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:hover { color: var(--bianco); }
.link.rosso { color: var(--rosso); }

/* ---------- apertura ---------- */
.hero { position: relative; overflow: hidden; color: var(--bianco); border-bottom: 1px solid var(--linea); background: radial-gradient(ellipse at 20% 40%, rgba(13, 11, 10, .75), transparent 70%); }
.hero .in { position: relative; padding-block: 72px 64px; display: grid; gap: 22px; justify-items: start; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(60px, 13vw, 168px); line-height: .88; text-transform: uppercase; letter-spacing: .005em; margin: 0; max-width: 9ch; }
.hero .lead { font-size: clamp(20px, 2.6vw, 25px); line-height: 1.4; max-width: 30ch; margin: 0; font-weight: 500; }
.azioni { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ---------- sezioni ---------- */
.sezione { padding-block: 64px; }
.sezione.tinta { background: var(--velo); border-block: 1px solid var(--linea); }
.testata { background: var(--velo); border-bottom: 4px solid var(--arancio); padding-block: 44px 36px; }
.testata.area { border-bottom: 1px solid var(--linea); }
.testata .lead { max-width: 60ch; font-size: 19px; color: var(--tenue); margin: 10px 0 0; }
.testata .lead p { margin: 0 0 .6em; }
.occhiello { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--arancio); margin-bottom: 8px; }
.occhiello::before { content: ""; width: 26px; height: 8px; background: linear-gradient(90deg, var(--arancio) 33%, var(--bianco) 33% 66%, var(--arancio) 66%); border-radius: 1px; }
.titolo { font-family: var(--display); font-weight: 400; font-size: clamp(38px, 5.5vw, 62px); line-height: 1; text-transform: uppercase; letter-spacing: .01em; margin: 0 0 18px; }
.titolo.piccolo { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 14px; }
.spazio { margin-top: 40px; }
.due { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 56px; align-items: start; }
.testo { max-width: 65ch; }
.testo p { font-size: 18px; }
.intesta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 10px 24px; margin-bottom: 24px; }
.intesta .titolo { margin: 0; }
.vuoto { color: var(--tenue); font-style: italic; }
.meta { color: var(--tenue); font-size: 14.5px; }
.indietro { display: inline-block; margin-bottom: 14px; font-size: 15px; }
.indietro::before { content: "← "; }

/* eventi */
.eventi { display: grid; gap: 14px; }
.evento { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 20px; background: var(--pannello); border: 1px solid var(--linea); border-radius: var(--raggio); padding: 18px; }
.giorno { display: grid; align-content: start; justify-items: center; text-align: center; border-top: 8px solid var(--arancio); padding-top: 6px; }
.giorno b { font-family: var(--display); font-weight: 400; font-size: 42px; line-height: 1; color: var(--arancio); }
.giorno span { font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--tenue); }
.ev-corpo h3 { margin: 0 0 4px; font-size: 20px; }
.ev-corpo p { margin: 8px 0 0; }
.passati .evento { opacity: .7; }

/* esperienze */
.griglia-esp { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.esp { display: grid; text-decoration: none; color: var(--bianco); border-radius: var(--raggio); overflow: hidden; background: var(--pannello); border: 1px solid var(--linea); }
.esp:hover { border-color: var(--arancio); color: var(--bianco); }
.esp-foto { aspect-ratio: 4 / 3; background: var(--pannello-2); overflow: hidden; }
.esp-foto img, .esp-foto video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.esp:hover .esp-foto img { transform: scale(1.03); }
.esp-foto .vuota { height: 100%; display: grid; place-items: center; }
.esp-testo { padding: 16px 18px 20px; }
.esp-testo h3 { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.05; text-transform: uppercase; margin: 4px 0 8px; }
.esp-testo p { margin: 0; color: var(--tenue); font-size: 16px; }
.galleria { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 36px; }
.galleria figure { margin: 0; display: grid; gap: 6px; align-content: start; }
.galleria img, .galleria video { width: 100%; border-radius: var(--raggio); display: block; }
.galleria img { aspect-ratio: 4 / 3; object-fit: cover; }
.galleria figcaption { font-size: 14.5px; color: var(--tenue); }
.zoom { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; width: 100%; }

/* squadra */
.facce { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.faccia { display: grid; justify-items: center; text-align: center; gap: 2px; }
.faccia img, .faccia .iniziale, .membro img, .membro .iniziale { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.iniziale { display: grid; place-items: center; background: var(--arancio); color: #fff; font-family: var(--display); font-size: 40px; text-transform: uppercase; }
.faccia img, .faccia .iniziale { margin-bottom: 8px; border: 4px solid var(--nero); box-shadow: 0 0 0 2px var(--arancio); }
.faccia span:not(.iniziale) { color: var(--tenue); font-size: 14.5px; }
.membri { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.membro { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; align-items: start; border-top: 4px solid var(--arancio); padding-top: 16px; }
.membro h3 { margin: 0; font-size: 21px; }
.membro p { margin: 6px 0 0; }

.riquadro-caccia { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px 48px; background: var(--pannello); border: 2px solid var(--arancio); border-radius: var(--raggio); padding: 28px; }
.riquadro-caccia p { margin-bottom: .7em; }
.cifre { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 22px 0; }
.cifre div { border-left: 4px solid var(--arancio); padding: 2px 0 2px 14px; display: grid; }
.cifre b { font-family: var(--display); font-weight: 400; font-size: 40px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.cifre span { color: var(--tenue); font-size: 14.5px; }

/* ---------- moduli ---------- */
.modulo-centrato { max-width: 480px; }
.scheda-form { display: grid; gap: 16px; background: var(--pannello); border: 1px solid var(--linea); border-top: 6px solid var(--arancio); border-radius: var(--raggio); padding: 26px; min-width: 0; }
.scheda-form.largo { max-width: 820px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 15.5px; }
label.spunta { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.aiuto-campo { font-weight: 400; font-size: 14px; color: var(--tenue); }
input:not([type=checkbox]), textarea, select { font: inherit; font-weight: 400; color: var(--bianco); background: var(--nero); border: 1.5px solid var(--linea-forte); border-radius: var(--raggio); padding: 10px 12px; width: 100%; }
input:focus, textarea:focus { border-color: var(--arancio); outline: 3px solid var(--arancio-velo); outline-offset: 0; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--arancio); }
textarea { resize: vertical; line-height: 1.5; }
.nota { font-size: 14.5px; color: var(--tenue); margin: 0; }
.avviso { border-radius: var(--raggio); padding: 12px 16px; margin: 0 0 16px; }
.avviso.rosso { background: var(--rosso-bg); color: var(--rosso); }
.avviso.verde { background: var(--verde-bg); color: var(--verde); }
.avviso.arancio { background: var(--arancio-velo); border: 1px solid var(--arancio); }
.copia { display: flex; gap: 8px; }
.copia input { font-family: var(--mono); font-size: 14px; }

/* ---------- area membri ---------- */
.lista { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 2px; }
.lista li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--linea); }
.podio { list-style: none; counter-reset: p; padding: 0; margin: 0 0 12px; }
.podio li { counter-increment: p; display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--linea); }
.podio li span::before { content: counter(p) "°  "; color: var(--arancio); font-family: var(--mono); font-size: 14px; }
.podio li b { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.podio li.mio, tr.mio td, .podio-grande .mio { background: var(--arancio-velo); }
.feed { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 15.5px; }
.feed time { font-family: var(--mono); font-size: 12.5px; color: var(--tenue); margin-right: 6px; }
.filtri { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { text-decoration: none; color: var(--bianco); background: var(--pannello); border: 1.5px solid var(--linea-forte); border-radius: 999px; padding: 5px 14px; font-size: 15px; }
.chip:hover { border-color: var(--arancio); color: var(--bianco); }
.chip[aria-current] { background: var(--arancio); border-color: var(--arancio); color: var(--nero); }
.griglia-indizi { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 22px; }
.indizio-card { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 14px; text-decoration: none; color: var(--bianco); background: var(--pannello); border: 1px solid var(--linea); border-radius: var(--raggio); padding: 14px; }
.indizio-card:hover { border-color: var(--arancio); color: var(--bianco); }
.ic-testo { display: grid; gap: 2px; min-width: 0; }
.riga { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 4px; }
/* segnavia a tre bande con il numero dell'indizio: arancio per l'allenamento, bianco per la simulazione */
.cartello { display: grid; grid-template-rows: 9px auto 9px; border-radius: 3px; overflow: hidden; align-self: start; }
.cartello::before, .cartello::after { content: ""; background: var(--arancio); }
.cartello b { order: 0; background: var(--bianco); color: var(--nero); text-align: center; font-family: var(--display); font-weight: 400; font-size: 21px; line-height: 1.35; }
.cartello::after { order: 1; }
.cartello.sim { border: 1px solid var(--bianco); }
.cartello.sim::before, .cartello.sim::after { background: var(--bianco); }
.cartello.sim b { background: var(--nero); color: var(--bianco); }
.cartello.grande { width: 76px; } .cartello.grande b { font-size: 28px; }
.pill { font-family: var(--mono); font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; background: var(--pannello-2); color: var(--tenue); white-space: nowrap; }
.pill.verde { background: var(--verde-bg); color: var(--verde); }
.pill.rosso { background: var(--rosso-bg); color: var(--rosso); }
.pill.corso, .pill.attesa { background: var(--arancio-velo); color: var(--arancio); }
.scheda-testa { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; }
.scheda-testa .titolo { margin: 0 0 4px; }
.cronometro { margin-left: auto; font-family: var(--mono); font-size: 28px; font-variant-numeric: tabular-nums; color: var(--arancio); }
.offerta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.offerta div { background: var(--pannello); border: 1px solid var(--linea); border-radius: var(--raggio); padding: 12px 14px; display: grid; }
.offerta b { font-family: var(--display); font-weight: 400; font-size: 32px; color: var(--arancio); }
.offerta span { font-size: 14px; color: var(--tenue); }
.colonna { display: grid; gap: 22px; }
.blocco { display: grid; gap: 12px; min-width: 0; }
.etichetta { font-family: var(--mono); font-weight: 500; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--tenue); margin: 0; }
.testo-indizio { margin: 0; font-family: var(--mono); font-size: 15.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; background: var(--pannello); border-left: 4px solid var(--arancio); padding: 16px 18px; border-radius: 0 var(--raggio) var(--raggio) 0; }
.media-indizio { display: grid; gap: 12px; }
.media-indizio img, .media-indizio video { border-radius: var(--raggio); border: 1px solid var(--linea); display: block; }
.media-indizio audio { width: 100%; }
.aiuto { border-left: 4px solid var(--arancio); padding: 4px 0 4px 14px; font-style: italic; }
.aiuto b { font-style: normal; color: var(--arancio); margin-right: 6px; }
.prossimo-aiuto { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--tenue); }
.conto { font-family: var(--mono); font-weight: 500; color: var(--bianco); }
.risposta { background: var(--pannello); border: 1px solid var(--linea); border-top: 6px solid var(--arancio); border-radius: var(--raggio); padding: 22px; }
.esito { border-radius: var(--raggio); padding: 18px 20px; display: grid; gap: 6px; }
.esito.verde { background: var(--verde-bg); } .esito.rosso { background: var(--rosso-bg); } .esito.attesa { background: var(--arancio-velo); }
.esito .grosso { font-family: var(--display); font-size: 34px; line-height: 1; text-transform: uppercase; }
.esito.verde .grosso { color: var(--verde); } .esito.rosso .grosso { color: var(--rosso); } .esito.attesa .grosso { color: var(--arancio); }
.conti { display: flex; flex-wrap: wrap; gap: 4px 16px; font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; }
.soluzione .luogo { font-family: var(--display); font-size: 30px; line-height: 1.05; text-transform: uppercase; color: var(--arancio); }
.soluzione p { max-width: 68ch; }
.storico { display: grid; gap: 8px; }
.storico div { border-left: 4px solid var(--linea-forte); padding-left: 12px; font-size: 15.5px; }
.storico .verde { border-color: var(--verde); } .storico .rosso { border-color: var(--rosso); } .storico .attesa { border-color: var(--arancio); }
@media (prefers-reduced-motion: no-preference) { .esito { animation: entra .3s ease-out; } @keyframes entra { from { transform: translateY(6px); opacity: .4; } } }

.podio-grande { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 26px; }
.podio-grande div { background: var(--pannello); border: 1px solid var(--linea); border-top: 6px solid var(--arancio); border-radius: var(--raggio); padding: 16px 18px; display: grid; gap: 2px; }
.podio-grande .pos { font-family: var(--display); font-size: 40px; line-height: 1; color: var(--arancio); }
.podio-grande b { font-size: 19px; } .podio-grande .pp { font-family: var(--mono); font-size: 22px; }
.tabella { overflow-x: auto; background: var(--pannello); border: 1px solid var(--linea); border-radius: var(--raggio); }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--linea); vertical-align: top; }
th { font-family: var(--mono); font-weight: 500; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--tenue); background: var(--pannello-2); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
.regole { max-width: 70ch; }

/* gestione */
.schede { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 14px; }
.schede a { color: var(--bianco); text-decoration: none; padding: 6px 0; border-bottom: 3px solid transparent; font-weight: 500; }
.schede a[aria-current], .schede a:hover { border-color: var(--arancio); }
.azioni-riga { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.azioni-riga form { margin: 0; }
.media-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.media-item { display: grid; gap: 8px; background: var(--pannello); border: 1px solid var(--linea); border-radius: var(--raggio); padding: 10px; }
.media-item img, .media-item video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.giudizio { background: var(--pannello); border: 1px solid var(--linea); border-left: 6px solid var(--arancio); border-radius: var(--raggio); padding: 16px 18px; display: grid; gap: 10px; margin-bottom: 14px; }
.risposta-letta { background: var(--pannello-2); border-radius: var(--raggio); padding: 12px 14px; }
.risposta-letta p { margin: 0 0 .5em; }
.criteri summary { cursor: pointer; color: var(--arancio); font-weight: 600; }
.criteri { font-size: 15px; }
code { font-family: var(--mono); font-size: .9em; background: var(--pannello-2); padding: 1px 5px; border-radius: 3px; }

/* ---------- piede ---------- */
.piede { background: var(--pannello); border-top: 4px solid var(--arancio); color: var(--bianco); padding-block: 36px; margin-top: 40px; }
.piede .in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.piede p { margin: 10px 0 0; font-size: 15px; }
.piede a { font-weight: 600; }
.contatti { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; }
.in-area .piede { margin-top: 0; }

/* ---------- visore ---------- */
.lb { position: fixed; inset: 0; z-index: 60; background: rgba(8, 6, 5, .96); display: flex; flex-direction: column; }
.lb-barra { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); }
.lb-barra button, .lb-barra a { font: inherit; font-size: 15px; background: var(--pannello-2); color: var(--bianco); border: 1px solid var(--linea-forte); border-radius: var(--raggio); padding: 6px 12px; cursor: pointer; text-decoration: none; }
.lb-barra button:hover, .lb-barra a:hover { border-color: var(--arancio); }
body.bloccato { overflow: hidden; }
.lb-scena { flex: 1; overflow: hidden; position: relative; touch-action: none; cursor: grab; }
.lb-scena img { position: absolute; left: 50%; top: 50%; max-width: 94%; max-height: 94%; transform-origin: center; user-select: none; -webkit-user-drag: none; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .due, .riquadro-caccia { grid-template-columns: minmax(0, 1fr); }
  .sezione { padding-block: 44px; }
  .barra .in { gap: 8px 12px; }
  .brand > span:last-child { font-size: 18px; }
  .utente { margin-left: auto; }
  .barra nav { order: 3; width: 100%; }
  .evento { grid-template-columns: 64px minmax(0, 1fr); gap: 14px; }
  .giorno b { font-size: 32px; }
  .cronometro { margin-left: 0; width: 100%; }
  .membro { grid-template-columns: 72px minmax(0, 1fr); }
  .membro img, .membro .iniziale { width: 72px; height: 72px; }
}

/* ---------- Versione di prova ---------- */
.prova-banda { background: repeating-linear-gradient(-45deg, var(--arancio) 0 16px, #e2600f 16px 32px); color: var(--nero); font-weight: 600; font-size: 14px; line-height: 1.4; text-align: center; padding: 6px max(16px, env(safe-area-inset-right, 0px)) 6px max(16px, env(safe-area-inset-left, 0px)); }
.solo-prova { border: 1px dashed var(--arancio); }
.solo-prova summary { cursor: pointer; color: var(--arancio); font-weight: 600; }
.solo-prova p:first-of-type { margin-top: 12px; font-weight: 600; }
.festa-video-campo { border: 1px solid var(--linea-forte); border-radius: var(--raggio); padding: 16px; margin: 0; display: grid; gap: 12px; justify-items: start; }
.festa-video-campo legend { padding: 0 6px; font-weight: 700; color: var(--arancio); }
.festa-video-campo label { justify-self: stretch; }
.festa-video-campo .meta { margin: 0; }

/* ---------- La festa del verde ----------
   Fasi (classi su .festa): f0 lampo e curve, f1 entra il video, f2 la parola VERDE sul primo colpo di tamburo,
   f3 il luogo sul secondo, f4 punti e coriandoli sul terzo, f5 conto finito e pulsanti. */
@property --festa-ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.festa { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow: hidden auto; overscroll-behavior: contain; color: var(--bianco);
  background: radial-gradient(110% 85% at 50% 42%, rgba(14, 44, 27, .9), rgba(7, 8, 7, .97) 68%);
  -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3);
  padding: max(20px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(20px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  animation: festa-entra .45s ease both; }
.festa.esce { animation: festa-esce .35s ease forwards; }
@keyframes festa-entra { from { opacity: 0; } }
@keyframes festa-esce { to { opacity: 0; transform: scale(1.03); } }
.festa:focus { outline: none; }
.festa-eco { position: absolute; inset: -10%; width: 120%; height: 120%; filter: blur(48px) saturate(1.7); opacity: 0; transition: opacity 1.4s ease; pointer-events: none; }
.festa.f1 .festa-eco { opacity: .42; }
.festa-lampo { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(closest-side at 50% 45%, rgba(95, 208, 138, .6), rgba(95, 208, 138, .14) 55%, transparent 78%); }
.festa.f0 .festa-lampo { animation: festa-lampo 1.5s cubic-bezier(.2, .7, .2, 1) forwards; }
@keyframes festa-lampo { 0% { opacity: 0; transform: scale(.15); } 16% { opacity: 1; } 100% { opacity: .22; transform: scale(1.7); } }
.festa-fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }
.festa-scena { position: relative; z-index: 3; display: grid; grid-template-columns: auto minmax(0, 540px); align-items: center; gap: clamp(28px, 5vw, 80px); width: min(1120px, 100%); }

.festa-cornice { position: relative; margin: 0; height: min(76vh, 700px); aspect-ratio: 9 / 16; border-radius: 24px; isolation: isolate;
  opacity: 0; transform: perspective(1200px) translateY(48px) rotateX(18deg) scale(.8); filter: blur(16px); }
.festa.f1 .festa-cornice { animation: festa-cornice 1.05s cubic-bezier(.16, 1.25, .3, 1) forwards; }
@keyframes festa-cornice { to { opacity: 1; transform: none; filter: blur(0); } }
.festa-cornice::before { content: ""; position: absolute; inset: -3px; z-index: -1; border-radius: 27px;
  background: conic-gradient(from var(--festa-ang), var(--verde), var(--bianco) 12%, var(--arancio) 25%, var(--verde) 50%, var(--bianco) 62%, var(--arancio) 75%, var(--verde));
  animation: festa-giro 5s linear infinite; }
.festa-cornice::after { content: ""; position: absolute; inset: -40px; z-index: -2; border-radius: 60px; background: radial-gradient(closest-side, rgba(95, 208, 138, .5), transparent); filter: blur(24px); }
@keyframes festa-giro { to { --festa-ang: 360deg; } }
.festa-clip { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: 22px; background: #050505; }
.festa-audio { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); font: inherit; font-weight: 700; font-size: 15px; color: var(--nero); background: var(--bianco); border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); white-space: nowrap; }

.festa-testo { display: grid; gap: 14px; justify-items: start; min-width: 0; }
.festa-occhiello { margin: 0; font: 500 13px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--arancio-chiaro); opacity: 0; transform: translateY(8px); transition: opacity .6s ease .35s, transform .6s ease .35s; }
.festa.f1 .festa-occhiello { opacity: 1; transform: none; }
.festa-parola { margin: 0 0 4px; display: flex; font-family: var(--display); font-weight: 400; font-size: clamp(84px, 13vw, 176px); line-height: .88; letter-spacing: .02em; filter: drop-shadow(0 0 30px rgba(95, 208, 138, .55)); }
.festa-parola .lettera { display: inline-block; color: transparent; background: linear-gradient(100deg, #36b86c 0%, #8ef0b3 38%, #ffffff 50%, #8ef0b3 62%, #36b86c 100%); background-size: 320% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text;
  opacity: 0; transform: translateY(.3em) scale(1.7); filter: blur(12px); }
.festa.f2 .festa-parola .lettera { animation: festa-lettera .72s cubic-bezier(.2, 1.45, .35, 1) calc(var(--i) * 55ms) forwards, festa-luce 2.2s ease-in-out calc(.9s + var(--i) * 70ms) forwards; }
@keyframes festa-lettera { 60% { filter: blur(0); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes festa-luce { to { background-position: 0 0; } }
.festa-luogo { margin: 0; display: flex; align-items: center; gap: 12px; font-size: clamp(20px, 2.4vw, 28px); font-weight: 600; line-height: 1.25; text-wrap: balance; clip-path: inset(0 100% 0 0); }
.festa.f3 .festa-luogo { animation: festa-scopri .9s cubic-bezier(.65, 0, .2, 1) forwards; }
@keyframes festa-scopri { to { clip-path: inset(0 0 0 0); } }
.festa-pin { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--arancio); box-shadow: 0 0 0 5px var(--arancio-velo), 0 0 20px var(--arancio); }
.festa-punti { display: flex; align-items: baseline; gap: 12px; opacity: 0; transform: translateY(12px); transition: opacity .45s ease, transform .45s ease; }
.festa.f4 .festa-punti { opacity: 1; transform: none; }
.festa-num { font-family: var(--display); font-weight: 400; font-size: clamp(60px, 8vw, 100px); line-height: 1; font-variant-numeric: tabular-nums; color: var(--bianco); text-shadow: 0 0 34px rgba(242, 107, 29, .6); }
.festa-punti span { color: var(--tenue); font-size: 18px; }
.festa.f5 .festa-num { animation: festa-pop .65s cubic-bezier(.2, 1.8, .4, 1); color: var(--arancio-chiaro); transition: color .4s; }
@keyframes festa-pop { 40% { transform: scale(1.16); } }
.festa-conti { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.festa-conti li { font: 500 14px/1 var(--mono); padding: 9px 13px; border-radius: 999px; border: 1px solid var(--linea-forte); background: rgba(255, 255, 255, .05); opacity: 0; transform: translateY(8px) scale(.9); }
.festa-conti li.piu { border-color: rgba(95, 208, 138, .55); color: #a9f2c6; }
.festa-conti li.meno { border-color: rgba(255, 112, 112, .45); color: #ffb3b3; }
.festa.f4 .festa-conti li { animation: festa-chip .45s cubic-bezier(.2, 1.4, .4, 1) calc(.2s + var(--i) * 170ms) forwards; }
@keyframes festa-chip { to { opacity: 1; transform: none; } }
.festa-nota { margin: 0; color: var(--tenue); opacity: 0; transition: opacity .6s ease; }
.festa-azioni { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; opacity: 0; transform: translateY(10px); visibility: hidden; transition: opacity .5s ease .25s, transform .5s ease .25s, visibility 0s .25s; }
.festa.f5 .festa-nota { opacity: 1; }
.festa.f5 .festa-azioni { opacity: 1; transform: none; visibility: visible; }
.festa-chiudi { position: fixed; top: max(14px, env(safe-area-inset-top, 0px)); right: max(14px, env(safe-area-inset-right, 0px)); z-index: 5; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(247, 243, 239, .25); background: rgba(13, 11, 10, .55); color: var(--bianco); font-size: 28px; line-height: 1; cursor: pointer; }
.festa-chiudi:hover { background: var(--bianco); color: var(--nero); }

/* La busta: un verde giudicato a mano mentre eri altrove. Il clic sblocca anche l'audio. */
.busta { position: relative; z-index: 3; display: grid; justify-items: center; gap: 12px; text-align: center; width: min(440px, 100%); padding: 40px 28px 32px; border-radius: 20px; background: linear-gradient(180deg, rgba(33, 27, 23, .92), rgba(17, 14, 12, .92)); border: 1px solid var(--linea-forte); box-shadow: 0 30px 90px rgba(0, 0, 0, .6), 0 0 0 1px rgba(95, 208, 138, .12), 0 0 80px rgba(95, 208, 138, .12); animation: busta-entra .8s cubic-bezier(.2, 1.3, .3, 1) both; }
.busta .festa-occhiello { opacity: 1; transform: none; }
.busta-sigillo { width: 92px; height: 92px; margin-bottom: 6px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 28px; letter-spacing: .04em; color: #0d2516; background: radial-gradient(circle at 35% 30%, #9af3bf, var(--verde) 45%, #23864d); box-shadow: inset 0 -6px 14px rgba(0, 0, 0, .3), 0 0 0 6px rgba(95, 208, 138, .14), 0 0 40px rgba(95, 208, 138, .45); animation: busta-sigillo 1.8s ease-in-out infinite; }
.busta-titolo { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(26px, 6vw, 34px); line-height: 1.1; letter-spacing: .01em; }
.busta-nota { margin: 0 0 8px; color: var(--tenue); }
@keyframes busta-entra { from { opacity: 0; transform: translateY(30px) scale(.94); } }
@keyframes busta-sigillo { 50% { transform: scale(1.06); box-shadow: inset 0 -6px 14px rgba(0, 0, 0, .3), 0 0 0 10px rgba(95, 208, 138, .1), 0 0 60px rgba(95, 208, 138, .6); } }

@media (max-width: 760px) {
  .festa { place-items: start center; }
  .festa-scena { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 18px; padding-top: 34px; text-align: center; }
  .festa-cornice { height: min(38vh, 400px); border-radius: 20px; }
  .festa-clip { border-radius: 18px; }
  .festa-cornice::before { border-radius: 23px; }
  .festa-testo { justify-items: center; gap: 10px; }
  .festa-parola { font-size: clamp(64px, 20vw, 112px); }
  .festa-luogo, .festa-conti, .festa-azioni { justify-content: center; }
  .festa-num { font-size: clamp(56px, 17vw, 84px); }
}
@media (max-width: 760px) and (max-height: 640px) { .festa-cornice { height: 32vh; } }
.festa.festa-busta { place-items: center; }
@media (prefers-reduced-motion: reduce) {
  .festa, .festa *, .festa *::before { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
