/* Neos Skate: un solo tema scuro, colonna stretta da telefono, verde per ciò che conta (stato, qualificati, scheda attiva). */
@font-face { font-family: Inter; src: url('caratteri/inter.woff2') format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('caratteri/space-grotesk.woff2') format('woff2'); font-weight: 600 700; font-style: normal; font-display: swap; }
:root {
  color-scheme: dark;
  --fondo: #0B1220;
  --carta: #141D2E;
  --linea: #24304A;
  --linea-tenue: #1B2438;
  --testo: #EEF2F8;
  --tenue: #9AA7BD;
  --verde: #3DDC84;
  --su-verde: #06210F;
  --carta-verde: #12281C;
  --linea-verde: #1F4A31;
  --ambra: #FFB547;
  --su-ambra: #1A1200;
  --titoli: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --corpo: Inter, 'Segoe UI', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--fondo); color: var(--testo); font-family: var(--corpo); font-size: 14px; line-height: 1.35; font-variant-numeric: tabular-nums; -webkit-text-size-adjust: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--verde); outline-offset: 2px; border-radius: 6px; }

.guscio { max-width: 560px; min-height: 100%; margin: 0 auto; display: flex; flex-direction: column; }
main { flex: 1; padding: 16px 16px 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.barra { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: 64px; background: #0E1626; border-top: 1px solid var(--linea); }
.barra a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--tenue); }
.barra a.attiva { color: var(--verde); }
.barra svg, .indietro svg, .freccia { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.marca { display: flex; align-items: center; gap: 8px; font-family: var(--titoli); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; }
.marca::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--verde); }
h1 { margin: 0; font-family: var(--titoli); font-weight: 700; font-size: 22px; line-height: 1.2; text-wrap: balance; }
.sotto { color: var(--tenue); font-size: 13px; }
.testata { display: flex; flex-direction: column; gap: 6px; }
.testata .riga-alta { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; }
.indietro { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 600; color: var(--tenue); }
.indietro svg { width: 18px; height: 18px; }
.riga-alta .indietro { min-width: 0; }
.indietro span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.riga-alta .destra { display: flex; align-items: center; gap: 8px; flex: none; }
.torna { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px 0 14px; border-radius: 999px; background: var(--carta); border: 1px solid rgba(61, 220, 132, 0.45); color: #fff; font: inherit; font-size: 14px; font-weight: 700; letter-spacing: 0.02em; cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35); }
.torna svg { width: 18px; height: 18px; fill: none; stroke: var(--verde); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.torna:active { transform: scale(0.97); background: #1B2740; }
.voce .lato b.spento { color: var(--tenue); }
.voce .lato small { display: block; }
.pillola { font-size: 12px; color: var(--tenue); background: var(--carta); border: 1px solid var(--linea); border-radius: 999px; padding: 5px 10px; white-space: nowrap; }

.etichetta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; color: var(--tenue); text-transform: uppercase; }
.etichetta span { font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; }

.cerca { position: relative; }
.cerca svg { position: absolute; left: 14px; top: 13px; width: 20px; height: 20px; fill: none; stroke: var(--tenue); stroke-width: 2; stroke-linecap: round; }
.cerca input { width: 100%; height: 46px; padding: 0 14px 0 44px; border-radius: 12px; border: 1px solid var(--linea); background: var(--carta); }
.cerca input::placeholder { color: var(--tenue); }

.carta { display: flex; flex-direction: column; gap: 6px; background: var(--carta); border: 1px solid var(--linea); border-radius: 12px; padding: 12px 14px; }
.carta.viva { background: var(--carta-verde); border-color: var(--linea-verde); }
.carta .alto { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--tenue); }
.carta.viva .alto, .carta.viva .sotto { color: #A9C9B6; }
.carta strong { font-size: 15px; font-weight: 600; }
.lista { display: flex; flex-direction: column; }
.voce { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 0; border-bottom: 1px solid var(--linea-tenue); }
.voce:last-child { border-bottom: 0; }
.voce .corpo { flex: 1; min-width: 0; }
.voce .nome { font-weight: 600; overflow-wrap: anywhere; }
.voce .info { font-size: 12px; color: var(--tenue); margin-top: 2px; overflow-wrap: anywhere; }
.voce .lato { text-align: right; white-space: nowrap; }
.voce .lato b { display: block; font-weight: 700; }
.voce .lato small { font-size: 12px; color: var(--tenue); }
.voce .num { width: 26px; flex: none; font-weight: 700; color: var(--tenue); }
.voce .num.primo { color: var(--verde); }
.voce .giorno { width: 68px; flex: none; font-size: 13px; font-weight: 700; color: var(--verde); }
.voce .giorno.passato { color: var(--tenue); }
.freccia { width: 18px; height: 18px; color: var(--tenue); flex: none; }

.segni { display: flex; gap: 6px; flex-wrap: wrap; }
.segno { font-size: 11px; font-weight: 600; color: #C7D0E0; border: 1px solid #3A4A6B; border-radius: 6px; padding: 2px 7px; }
.segno.pieno { color: var(--su-verde); background: var(--verde); border-color: var(--verde); font-weight: 700; }
.nuovo { font-size: 11px; font-weight: 700; color: var(--su-ambra); background: var(--ambra); border-radius: 999px; padding: 3px 9px; }
.q { font-size: 11px; font-weight: 700; color: var(--su-verde); background: var(--verde); border-radius: 6px; padding: 2px 6px; flex: none; }
.verde { color: var(--verde); }

.filtri { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filtri::-webkit-scrollbar { display: none; }
.filtri button, .schede button { flex: none; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--carta); border: 1px solid var(--linea); color: #C7D0E0; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.filtri button[aria-pressed="true"], .schede button[aria-selected="true"] { background: var(--verde); border-color: var(--verde); color: var(--su-verde); }
.schede { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.schede::-webkit-scrollbar { display: none; }
.schede button { border-radius: 10px; }

.avviso { display: flex; align-items: center; gap: 12px; background: var(--carta-verde); border: 1px solid var(--linea-verde); border-radius: 12px; padding: 10px 14px; font-size: 13px; color: #D5EBDD; }
.nota { font-size: 12px; color: var(--ambra); padding-top: 6px; }
.piccolo { font-size: 12px; line-height: 1.5; color: var(--tenue); }
.vuoto { color: var(--tenue); padding: 24px 0; text-align: center; }

.riquadri { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.riquadri div { background: var(--carta); border: 1px solid var(--linea); border-radius: 12px; padding: 12px; }
.riquadri b { display: block; font-family: var(--titoli); font-size: 24px; }
.riquadri span { font-size: 12px; color: var(--tenue); }
.barre { display: flex; flex-direction: column; gap: 8px; }
.barre .capo { display: flex; justify-content: space-between; font-size: 12px; color: var(--tenue); margin-bottom: 4px; }
.barre .barra-t { height: 28px; border-radius: 6px; background: #3A4A6B; display: flex; align-items: center; padding: 0 10px; font-size: 13px; font-weight: 600; min-width: 84px; }
.barre .barra-t.ultima { background: var(--verde); color: var(--su-verde); font-weight: 700; }

details { border-top: 1px solid var(--linea-tenue); }
details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--tenue); }
details .programma { display: flex; flex-direction: column; gap: 4px; padding-bottom: 12px; font-size: 13px; }
details .programma span { color: var(--tenue); display: inline-block; width: 28px; }

@media (prefers-reduced-motion: no-preference) { main { animation: entra 0.18s ease-out; } }
@keyframes entra { from { opacity: 0.6; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- home ---------- */
.eroe { position: relative; margin: -16px -16px 0; padding: 30px 16px 26px; overflow: hidden; border-bottom: 1px solid var(--linea-tenue); background: radial-gradient(120% 140% at 74% 0%, #12352a 0%, #0d1a26 46%, var(--fondo) 100%); }
.eroe canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.eroe::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 18, 32, 0.92) 0%, rgba(11, 18, 32, 0.55) 55%, rgba(11, 18, 32, 0) 100%); pointer-events: none; }
.eroe-testo { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; }
.eroe h1 { font-size: 32px; letter-spacing: -0.01em; }
.marca::before { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6); animation: battito 2.2s ease-out infinite; }

.vetrina { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; border: 1px solid var(--linea-verde); background: radial-gradient(260px 180px at var(--luce-x, 85%) var(--luce-y, 0%), rgba(61, 220, 132, 0.22), transparent 70%), linear-gradient(160deg, #15301f 0%, #101b29 70%); box-shadow: 0 18px 40px -22px rgba(61, 220, 132, 0.55); transition: transform 0.25s ease-out; will-change: transform; }
.vetrina .alto { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: #A9C9B6; }
.vetrina .stato { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 11px; color: var(--verde); }
.vetrina .stato i { width: 8px; height: 8px; border-radius: 50%; background: var(--verde); }
.vetrina.diretta .stato i { animation: battito 1.4s ease-out infinite; }
.vetrina strong { font-family: var(--titoli); font-size: 21px; line-height: 1.2; text-wrap: balance; }
.vetrina .sotto { color: #A9C9B6; }
.numeri { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.numeri div { background: rgba(11, 18, 32, 0.55); border: 1px solid rgba(61, 220, 132, 0.18); border-radius: 12px; padding: 10px 12px; }
.numeri b { display: block; font-family: var(--titoli); font-size: 24px; line-height: 1.1; }
.numeri span { font-size: 12px; color: #A9C9B6; }
.apri { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; min-height: 44px; margin-top: 2px; padding: 0 16px; border-radius: 999px; background: var(--verde); color: var(--su-verde); font-weight: 700; }
.apri .freccia { color: var(--su-verde); }

.palco { display: flex; gap: 10px; margin: 0 -16px; padding: 2px 16px 6px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 16px; scrollbar-width: none; }
.palco::-webkit-scrollbar { display: none; }
.podio { flex: none; width: min(72%, 280px); min-width: 0; min-height: 112px; scroll-snap-align: start; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(180deg, #182338 0%, var(--carta) 100%); border: 1px solid var(--linea); }
.podio .alto { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--tenue); }
.podio strong { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.podio .basso { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; color: var(--tenue); }
.podio .basso b { font-family: var(--titoli); font-size: 18px; color: var(--verde); white-space: nowrap; }
.podio.fantasma { background: linear-gradient(100deg, var(--carta) 30%, #1c2942 50%, var(--carta) 70%); background-size: 220% 100%; animation: attesa 1.3s linear infinite; }

.conto { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--carta); border: 1px solid var(--linea); }
.conto .giorni { flex: none; min-width: 72px; text-align: center; padding: 6px 10px; border-radius: 12px; background: var(--carta-verde); border: 1px solid var(--linea-verde); }
.conto .giorni b { display: block; font-family: var(--titoli); font-size: 30px; line-height: 1; color: var(--verde); }
.conto .giorni span { font-size: 11px; color: #A9C9B6; }
.conto .nome { font-weight: 600; }
.conto .info { font-size: 12px; color: var(--tenue); margin-top: 3px; }

@keyframes battito { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6); } 70% { box-shadow: 0 0 0 9px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
@keyframes attesa { from { background-position: 100% 0; } to { background-position: -120% 0; } }
@media (prefers-reduced-motion: no-preference) {
  #sezioni > * { animation: sali 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  #sezioni > *:nth-child(2) { animation-delay: 0.05s; } #sezioni > *:nth-child(3) { animation-delay: 0.1s; } #sezioni > *:nth-child(4) { animation-delay: 0.15s; } #sezioni > *:nth-child(n+5) { animation-delay: 0.2s; }
}
@keyframes sali { from { opacity: 0.35; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .marca::before, .vetrina.diretta .stato i, .podio.fantasma { animation: none; } }
#sezioni { display: flex; flex-direction: column; gap: 14px; }
#sezioni[hidden] { display: none; }

.piede { padding: 4px 16px 14px; font-size: 12px; line-height: 1.5; color: var(--tenue); text-align: center; }
.piede a { text-decoration: underline; text-underline-offset: 2px; }

.senza-rete { position: sticky; top: 0; z-index: 5; padding: 8px 16px; background: var(--ambra); color: var(--su-ambra); font-size: 13px; font-weight: 600; text-align: center; }
.senza-rete[hidden] { display: none; }
.etichetta a.verde { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; min-height: 24px; }

.marca.con-logo { gap: 12px; font-size: 15px; }
.marca.con-logo::before { content: none; }
.marca.con-logo img { width: 52px; height: 52px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)); }

/* programma della giornata */
details summary { justify-content: space-between; gap: 8px; }
details summary span { font-size: 12px; font-weight: 400; }
details summary::after { content: ''; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: 0 6px 4px 4px; flex: none; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(-135deg); margin-bottom: -4px; }
details summary::-webkit-details-marker { display: none; }
details summary { list-style: none; }
.in-pista { display: flex; flex-direction: column; gap: 8px; }
.in-pista .etichetta b { display: inline-flex; align-items: center; gap: 8px; color: var(--verde); font-weight: 700; }
.punto { width: 8px; height: 8px; border-radius: 50%; background: var(--verde); box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6); animation: battito 1.6s infinite; }
@keyframes battito { 70% { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
@media (prefers-reduced-motion: reduce) { .punto { animation: none; } }
.voce.prog .num { width: 26px; flex: none; color: var(--tenue); font-weight: 600; font-variant-numeric: tabular-nums; }
.voce.prog.passata .nome { color: #A9B4C8; font-weight: 500; }
.voce.prog.ora { background: var(--carta-verde); border: 1px solid var(--linea-verde); border-radius: 12px; padding: 10px 12px; }
.voce.prog.ora .num { color: var(--verde); }
.voce.prog .fatto { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--verde); white-space: nowrap; }
.voce.prog .pillola { color: var(--ambra); border-color: rgba(255, 181, 71, 0.4); }
.spunta { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.prog-titolo { padding: 12px 0 4px; font-size: 12px; color: var(--tenue); }

/* i miei */
.stella { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 6px; padding: 0 18px 0 14px; border-radius: 999px; background: var(--carta); border: 1px solid var(--linea); color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.stella svg, .miei .etichetta svg, .avviso .q svg { width: 18px; height: 18px; fill: none; stroke: var(--ambra); stroke-width: 2; stroke-linejoin: round; }
.stella.accesa { border-color: rgba(255, 181, 71, 0.55); background: rgba(255, 181, 71, 0.12); color: var(--ambra); }
.stella.accesa svg { fill: var(--ambra); }
.miei { display: flex; flex-direction: column; gap: 8px; background: var(--carta); border: 1px solid rgba(255, 181, 71, 0.3); border-radius: 14px; padding: 12px 14px; }
.miei .etichetta { margin-top: 0; }
.miei .etichetta b { display: inline-flex; align-items: center; gap: 6px; color: var(--ambra); font-weight: 700; }
.miei .etichetta svg { width: 14px; height: 14px; fill: var(--ambra); }
.miei .lista + .etichetta { margin-top: 8px; }
.avviso .q svg { width: 14px; height: 14px; stroke: var(--su-verde); fill: var(--su-verde); display: block; }
.bottone { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 18px; border-radius: 12px; background: var(--verde); color: var(--su-verde); font-weight: 700; }
.bottone svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
/* avviso di versione nuova */
.aggiorna { position: sticky; bottom: 64px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 12px 8px; padding: 10px 10px 10px 16px; border-radius: 14px; background: #16233A; border: 1px solid var(--linea-verde); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); font-size: 14px; }
.aggiorna button { flex: none; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--verde); color: var(--su-verde); font: inherit; font-weight: 700; cursor: pointer; }
