{"id":5748,"date":"2026-02-22T16:12:45","date_gmt":"2026-02-22T15:12:45","guid":{"rendered":"https:\/\/www.aviglianabasket.it\/?page_id=5748"},"modified":"2026-11-09T19:17:50","modified_gmt":"2026-11-09T18:17:50","slug":"ab_home1","status":"publish","type":"page","link":"https:\/\/www.aviglianabasket.it\/","title":{"rendered":"AB_HOME1"},"content":{"rendered":"\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, viewport-fit=cover\">\n<title>Avigliana Basket \u2014 PULSE \u00b7 Book<\/title>\n<script>\n(function () {\n  var KEY = 'ab_cookie_consent_v1';\n  function readConsent() {\n    try { var raw = localStorage.getItem(KEY); return raw ? JSON.parse(raw) : null; }\n    catch (e) { return null; }\n  }\n  function writeConsent(level) {\n    localStorage.setItem(KEY, JSON.stringify({ level: level, ts: Date.now() }));\n  }\n  function applyConsent(level, persist) {\n    if (persist) writeConsent(level);\n    document.documentElement.setAttribute('data-cookie-consent', level);\n    document.dispatchEvent(new CustomEvent('ab-cookie-consent', { detail: { level: level } }));\n  }\n  window.abCookieConsent = {\n    key: KEY,\n    get: readConsent,\n    apply: applyConsent,\n    hasChoice: function () { return !!readConsent(); },\n    acceptAll: function () { applyConsent('all', true); },\n    acceptEssential: function () { applyConsent('essential', true); },\n    openBanner: function () {\n      var b = document.getElementById('cookie-banner');\n      if (b) { b.hidden = false; b.setAttribute('aria-hidden', 'false'); }\n    },\n    closeBanner: function () {\n      var b = document.getElementById('cookie-banner');\n      if (b) { b.hidden = true; b.setAttribute('aria-hidden', 'true'); }\n    },\n    isAllowed: function (category) {\n      var c = readConsent();\n      if (!c) return category === 'essential';\n      if (c.level === 'all') return true;\n      return category === 'essential';\n    }\n  };\n  var saved = readConsent();\n  if (saved && (saved.level === 'all' || saved.level === 'essential')) applyConsent(saved.level, false);\n})();\n<\/script>\n<link rel=\"preconnect\" href=\"https:\/\/fonts.googleapis.com\">\n<link rel=\"preconnect\" href=\"https:\/\/fonts.gstatic.com\" crossorigin=\"\">\n<link href=\"https:\/\/fonts.googleapis.com\/css2?family=Oswald:wght@500;600;700&amp;family=Syne:wght@600;700;800&amp;family=Urbanist:ital,wght@0,400;0,500;0,600;0,700;0,800;1,500;1,600&amp;display=swap\" rel=\"stylesheet\">\n<style>\n:root {\n  --void: #06110e;\n  --void-2: #0c1c17;\n  --void-3: #132820;\n  --line: rgba(232,255,220,.1);\n  --text: #f3faf4;\n  --muted: #8aa396;\n  \/* Palette: solo verde societ\u00e0 \/ bianco \/ oro \u2014 niente lime *\/\n  --pulse: #1FAF5A;\n  --signal: #1FAF5A;\n  --skel-green: #1FAF5A;\n  --skel-gold: #E8C84A;\n  --brand-green: #1FAF5A;\n  --gold: #C9A84C;\n  --gold-light: #E8D48B;\n  --gold-dim: rgba(201,168,76,.16);\n  --pulse-dim: rgba(31,175,90,.14);\n  --ice: #7ec8c4;\n  --ice-dim: rgba(126,200,196,.14);\n  --heat: #ff6a4a;\n  --heat-dim: rgba(255,106,74,.16);\n  --radius: 22px;\n  --header-h: 72px;\n  --font-display: \"Syne\", system-ui, sans-serif; \/* titoli display \/ numeri *\/\n  --font-title: \"Oswald\", system-ui, sans-serif; \/* titoli *\/\n  --font-skel: \"Oswald\", system-ui, sans-serif;\n  --font-body: \"Urbanist\", system-ui, sans-serif; \/* tutto il resto *\/\n  --mx: 50%;\n  --my: 30%;\n  color-scheme: dark;\n}\n*, *::before, *::after { box-sizing: border-box; }\nhtml {\n  scroll-behavior: smooth;\n  width: 100%;\n  margin: 0;\n  padding: 0;\n  overflow-x: hidden;\n}\nbody {\n  margin: 0;\n  width: 100%;\n  min-height: 100vh;\n  min-height: 100dvh;\n  background: var(--void);\n  color: var(--text);\n  font-family: var(--font-body);\n  overflow-x: hidden;\n  padding-bottom: env(safe-area-inset-bottom, 0px);\n  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));\n}\nbody.nav-open { overflow: hidden; }\n.entry-content, .site-content, .ast-container, .elementor,\n.elementor-section, .elementor-widget-wrap, .elementor-widget-container {\n  max-width: none !important; width: 100% !important;\n  padding-left: 0 !important; padding-right: 0 !important;\n}\nimg { max-width: 100%; display: block; }\na, a:link, a:visited, a:hover, a:active, a:focus {\n  color: inherit; text-decoration: none !important;\n  border-bottom: 0 !important; box-shadow: none !important;\n}\nbutton { font: inherit; font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }\n:focus-visible { outline: 2px solid var(--pulse); outline-offset: 3px; }\n\n\/* Atmosphere *\/\n.atmosphere {\n  position: fixed; inset: 0; z-index: 0; pointer-events: none;\n  background:\n    radial-gradient(900px 520px at var(--mx) var(--my), rgba(31,175,90,.11), transparent 55%),\n    radial-gradient(700px 420px at 100% 10%, rgba(126,200,196,.08), transparent 50%),\n    radial-gradient(600px 380px at 0% 90%, rgba(31,175,90,.05), transparent 45%),\n    linear-gradient(180deg, #06110e 0%, #0a1713 45%, #06110e 100%);\n}\n.atmosphere::before {\n  content: \"\";\n  position: absolute; inset: 0;\n  background-image:\n    radial-gradient(rgba(255,255,255,.045) 1px, transparent 1px);\n  background-size: 3px 3px;\n  opacity: .35;\n  mask-image: radial-gradient(ellipse at 50% 20%, black 10%, transparent 70%);\n}\n.atmosphere::after {\n  content: \"\";\n  position: absolute; left: -20%; top: 18%;\n  width: 140%; height: 1px;\n  background: linear-gradient(90deg, transparent, rgba(31,175,90,.35), transparent);\n  animation: scanLine 9s ease-in-out infinite;\n  opacity: .5;\n}\n@keyframes scanLine {\n  0%, 100% { transform: translateY(0); opacity: .2; }\n  50% { transform: translateY(42vh); opacity: .55; }\n}\n\n.app { position: relative; z-index: 1; width: 100%; }\n\n\/* CINEMATIC INTRO \u2014 breve: foto 50% \u2192 logo da puntino a ~600\u00d7400 \u2192 home *\/\n#intro {\n  position: fixed; inset: 0; z-index: 10000;\n  background: #020806;\n  overflow: hidden;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  gap: 2rem;\n  transition: opacity 0.55s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.55s;\n}\n#intro.is-done {\n  opacity: 0;\n  visibility: hidden;\n  pointer-events: none;\n}\nbody:not(.intro-done) .app { visibility: hidden; pointer-events: none; }\n\n.intro-bg-wrapper {\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%);\n  width: min(600px, 90vw);\n  height: min(400px, 60vh);\n  border-radius: 16px;\n  overflow: hidden;\n  box-shadow: 0 20px 65px rgba(0, 0, 0, 0.85);\n  border: 1px solid rgba(255, 255, 255, 0.07);\n  z-index: 2;\n  animation: fadeOutBgWrapper 0.35s ease 1.25s forwards;\n}\n@keyframes fadeOutBgWrapper {\n  to {\n    opacity: 0;\n    visibility: hidden;\n    transform: translate(-50%, -50%) scale(0.96);\n  }\n}\n.intro-bg {\n  width: 100%;\n  height: 100%;\n  background-image: url('https:\/\/www.aviglianabasket.it\/wp-content\/uploads\/2026\/08\/sfondo2027.png');\n  background-size: cover;\n  background-position: center;\n  transform: scale(1);\n  \/* Prima immagine: luminosit\u00e0 fissa al 50% *\/\n  filter: brightness(0.5);\n  animation: cinematicBg 1.4s ease forwards;\n}\n@keyframes cinematicBg {\n  0% {\n    opacity: 0;\n    filter: brightness(0.5);\n  }\n  18% {\n    opacity: 1;\n    filter: brightness(0.5);\n  }\n  78% {\n    opacity: 1;\n    filter: brightness(0.5);\n  }\n  100% {\n    opacity: 0;\n    filter: brightness(0.5);\n  }\n}\n\n.intro-logo-wrapper {\n  position: relative;\n  z-index: 3;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  \/* Target ~600\u00d7400, poi sparisce con la home *\/\n  width: min(600px, 92vw);\n  height: min(400px, 55vh);\n  opacity: 0;\n  transform: scale(0.02);\n  transform-origin: center center;\n  filter: none;\n  animation: cinematicLogo 1.55s cubic-bezier(0.16, 1, 0.3, 1) 1.3s forwards;\n}\n.intro-logo {\n  width: 100%;\n  height: 100%;\n  object-fit: contain;\n}\n@keyframes cinematicLogo {\n  0% {\n    opacity: 0;\n    transform: scale(0.02);\n  }\n  6% {\n    opacity: 1;\n    transform: scale(0.02);\n  }\n  72% {\n    opacity: 1;\n    transform: scale(1);\n  }\n  100% {\n    opacity: 1;\n    transform: scale(1);\n  }\n}\n\n\/* Intro mobile: stessa logica, dimensioni contenute *\/\n@media (max-width: 768px) {\n  .intro-bg-wrapper {\n    width: min(100%, 92vw);\n    height: min(260px, 38vh);\n    max-width: 92vw;\n  }\n  .intro-bg {\n    background-size: contain;\n    background-repeat: no-repeat;\n    background-position: center;\n  }\n  .intro-logo-wrapper {\n    width: min(92vw, 600px);\n    height: min(55vh, 400px);\n  }\n}\n\n.intro-title-wrapper {\n  display: none;\n}\n\n.intro-glow-overlay,\n.intro-flash {\n  display: none;\n}\n\n.skip-btn {\n  position: absolute;\n  top: calc(1.5rem + env(safe-area-inset-top, 0px));\n  right: calc(1.5rem + env(safe-area-inset-right, 0px));\n  background: rgba(255, 255, 255, 0.08);\n  border: 1px solid rgba(255, 255, 255, 0.2);\n  color: rgba(255, 255, 255, 0.7);\n  padding: 0.5rem 1rem;\n  font-size: 0.72rem;\n  font-weight: 700;\n  letter-spacing: 0.1em;\n  text-transform: uppercase;\n  border-radius: 20px;\n  cursor: pointer;\n  z-index: 10002;\n  transition: background-color 0.2s, color 0.2s, transform 0.2s;\n  backdrop-filter: blur(4px);\n  -webkit-backdrop-filter: blur(4px);\n}\n.skip-btn:hover {\n  background: rgba(255, 255, 255, 0.16);\n  color: #fff;\n  transform: translateY(-1px);\n}\n.skip-btn:active {\n  transform: translateY(0);\n}\n.intro-loading {\n  position: absolute; bottom: 1.5rem; left: 50%;\n  transform: translateX(-50%);\n  font-size: .68rem; font-weight: 800; letter-spacing: .18em;\n  text-transform: uppercase; color: var(--pulse);\n  z-index: 10001;\n  text-shadow: 0 0 10px rgba(31, 175, 90, 0.6);\n  opacity: 0.8;\n  animation: pulseLoading 1.2s ease-in-out infinite alternate, fadeOutLoading 0.25s ease 1.2s forwards;\n}\n@keyframes fadeOutLoading {\n  to { opacity: 0; visibility: hidden; }\n}\n@keyframes pulseLoading {\n  0% { opacity: 0.4; }\n  100% { opacity: 1; }\n}\n\n\/* Header *\/\n.topbar {\n  position: fixed; top: 0; left: 0; right: 0; z-index: 50;\n  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));\n  padding: env(safe-area-inset-top, 0px) 1rem 0;\n  display: flex; align-items: center; justify-content: space-between; gap: .75rem;\n  background: linear-gradient(180deg, rgba(6,17,14,.92), rgba(6,17,14,.55) 70%, transparent);\n  backdrop-filter: blur(10px);\n}\n.brand {\n  display: inline-flex !important;\n  align-items: center;\n  gap: .4rem;\n  font-family: var(--font-title);\n  font-weight: 700;\n  font-size: 1.05rem;\n  font-style: italic;\n  letter-spacing: -.02em;\n  text-transform: uppercase;\n  min-width: 0;\n  flex: 1 1 auto;\n  overflow: visible;\n}\n.brand img { width: 52px; height: 52px; object-fit: contain; flex-shrink: 0; }\n.brand-title,\n.topbar .brand-title {\n  display: inline-flex !important;\n  align-items: baseline !important;\n  gap: .2em;\n  white-space: nowrap;\n  visibility: visible !important;\n  opacity: 1 !important;\n  font-size: clamp(.68rem, 3.2vw, 1.05rem);\n  line-height: 1;\n  overflow: visible !important;\n  text-overflow: clip;\n  padding-right: .35em;\n}\n.topbar .brand-title .skel-a,\n.topbar .brand-title .skel-b {\n  display: inline !important;\n  visibility: visible !important;\n  opacity: 1 !important;\n}\n\/* Titoli stile GREENS: bold italic compatto *\/\n.skel-a, .skel-b {\n  font-family: var(--font-title);\n  font-weight: 700;\n  font-style: italic;\n  letter-spacing: -.03em;\n  text-transform: uppercase;\n  text-shadow: none !important;\n  -webkit-text-stroke: 0 !important;\n  paint-order: normal;\n}\n.skel-a {\n  color: var(--skel-green) !important;\n  -webkit-text-fill-color: var(--skel-green) !important;\n}\n.skel-b {\n  color: #fff !important;\n  -webkit-text-fill-color: #fff !important;\n}\n.hero-brand .skel-a,\n.hero-brand .skel-b {\n  color: inherit;\n}\n.top-actions { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }\n.lang-switch {\n  display: inline-flex; align-items: center; gap: 0;\n  border: 1px solid rgba(255,255,255,.16);\n  border-radius: 999px; overflow: hidden;\n  background: rgba(255,255,255,.06);\n  height: 40px;\n}\n.lang-switch button {\n  border: 0; background: transparent; color: rgba(255,255,255,.55);\n  font-family: var(--font-body); font-weight: 800; font-size: .72rem;\n  letter-spacing: .06em; padding: .35rem .68rem; cursor: pointer;\n  min-width: 38px; height: 100%;\n}\n.lang-switch button:hover { color: rgba(255,255,255,.92); }\n.lang-switch button.is-active {\n  background: rgba(31,175,90,.28);\n  color: #fff;\n  box-shadow: inset 0 0 0 1px rgba(31,175,90,.35);\n}\n.icon-btn {\n  width: 44px; height: 44px; border-radius: 999px;\n  display: grid; place-items: center;\n  border: 1px solid var(--line);\n  background: rgba(255,255,255,.03);\n  transition: border-color .2s, background .2s, transform .2s;\n}\n.icon-btn:hover {\n  border-color: rgba(201,168,76,.45);\n  background: var(--gold-dim);\n  transform: translateY(-1px);\n}\n.icon-btn svg { width: 20px; height: 20px; }\n.menu-btn {\n  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;\n  min-height: 44px; padding: .55rem 1rem .55rem .85rem;\n  border-radius: 999px;\n  border: 1px solid var(--gold-light);\n  background: var(--gold);\n  color: #0b1220;\n  font-family: var(--font-title);\n  font-weight: 700; font-style: italic; font-size: .95rem;\n  letter-spacing: .04em; text-transform: uppercase;\n  box-shadow: 0 0 18px rgba(201,168,76,.28);\n  transition: transform .25s, background .25s, box-shadow .25s;\n}\n.menu-btn svg { width: 18px; height: 18px; stroke: #0b1220; stroke-width: 2.6; }\n.menu-btn:hover,\n.menu-btn[aria-expanded=\"true\"] {\n  background: var(--gold-light);\n  transform: translateY(-2px);\n  box-shadow: 0 0 26px rgba(201,168,76,.42);\n}\n.menu-btn .menu-btn-label { display: none; }\n@media (min-width: 520px) {\n  .menu-btn .menu-btn-label { display: inline; }\n  .menu-btn { padding: .55rem 1.15rem .55rem .95rem; }\n}\n\n\/* Drawer \u2014 apertura elegante *\/\n.nav-scrim {\n  position: fixed; inset: 0; z-index: 60;\n  background: rgba(0,0,0,.45);\n  backdrop-filter: blur(0px);\n  opacity: 0; visibility: hidden;\n  transition: opacity .55s ease, visibility .55s, backdrop-filter .55s ease;\n}\nbody.nav-open .nav-scrim {\n  opacity: 1; visibility: visible;\n  backdrop-filter: blur(8px);\n}\n.drawer {\n  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70;\n  width: min(400px, 92vw);\n  background:\n    linear-gradient(165deg, rgba(201,168,76,.08), transparent 40%),\n    linear-gradient(180deg, #10261e, #06110e);\n  border-left: 1px solid rgba(201,168,76,.28);\n  box-shadow: -24px 0 60px rgba(0,0,0,.45);\n  transform: translateX(108%) scale(.98);\n  opacity: 0;\n  transition:\n    transform .62s cubic-bezier(.16,1,.3,1),\n    opacity .45s ease;\n  display: flex; flex-direction: column;\n  padding: calc(1rem + env(safe-area-inset-top)) 1.15rem 1.25rem;\n}\nbody.nav-open .drawer {\n  transform: none;\n  opacity: 1;\n}\n.drawer-head {\n  display: flex; align-items: center; justify-content: space-between;\n  margin-bottom: 1.25rem; padding-bottom: 1rem;\n  border-bottom: 1px solid rgba(201,168,76,.2);\n  opacity: 0;\n  transform: translateY(10px);\n  transition: opacity .45s ease .12s, transform .5s cubic-bezier(.16,1,.3,1) .12s;\n}\nbody.nav-open .drawer-head {\n  opacity: 1; transform: none;\n}\n.drawer-brand {\n  display: flex; align-items: center; gap: .6rem;\n  font-family: var(--font-title); font-weight: 700; font-style: italic;\n  text-transform: uppercase; letter-spacing: -.02em; color: var(--gold-light);\n}\n.drawer-brand img { width: 52px; height: 52px; object-fit: contain; }\n.nav-groups { overflow: auto; flex: 1; padding-right: .25rem; }\n.nav-group {\n  margin-bottom: 1.25rem;\n  opacity: 0;\n  transform: translateX(18px);\n  transition: opacity .45s ease, transform .55s cubic-bezier(.16,1,.3,1);\n}\nbody.nav-open .nav-group {\n  opacity: 1; transform: none;\n}\nbody.nav-open .nav-group:nth-child(1) { transition-delay: .14s; }\nbody.nav-open .nav-group:nth-child(2) { transition-delay: .2s; }\nbody.nav-open .nav-group:nth-child(3) { transition-delay: .26s; }\nbody.nav-open .nav-group:nth-child(4) { transition-delay: .32s; }\nbody.nav-open .nav-group:nth-child(5) { transition-delay: .38s; }\n.nav-group h3 {\n  margin: 0 0 .55rem; font-size: .68rem; letter-spacing: .16em;\n  text-transform: uppercase; color: var(--muted); font-weight: 800;\n}\n.nav-list { display: grid; gap: .35rem; }\n.nav-link {\n  width: 100%; text-align: left;\n  display: flex; align-items: center; justify-content: space-between;\n  gap: .5rem; padding: .8rem .9rem; border-radius: 14px;\n  border: 1px solid transparent; background: rgba(255,255,255,.02);\n  font-weight: 700; transition: .2s;\n}\n.nav-link:hover { border-color: rgba(31,175,90,.35); background: var(--pulse-dim); }\n.nav-link .tag {\n  font-size: .62rem; font-weight: 800; letter-spacing: .08em;\n  text-transform: uppercase; color: #0b1220;\n  background: var(--pulse); padding: .2rem .45rem; border-radius: 999px;\n}\n.badge-dot {\n  min-width: 1.3rem; height: 1.3rem; border-radius: 999px;\n  display: grid; place-items: center;\n  font-size: .65rem; font-weight: 800; background: var(--heat); color: #fff;\n}\n\n\/* Buttons \u2014 tutti oro *\/\n.btn {\n  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;\n  border-radius: 999px; padding: .85rem 1.35rem;\n  font-weight: 800; font-size: .92rem;\n  border: 1px solid var(--gold-light);\n  background: var(--gold);\n  color: #0b1220;\n  transition: transform .2s, background .2s, border-color .2s, box-shadow .2s;\n  box-shadow: 0 0 0 0 rgba(201,168,76,.35);\n}\n.btn:hover {\n  transform: translateY(-2px);\n  background: var(--gold-light);\n  border-color: #f0e0a8;\n}\n.btn-primary,\n.btn-ghost {\n  background: var(--gold);\n  color: #0b1220;\n  border-color: var(--gold-light);\n  animation: ctaPulse 2.8s ease-in-out infinite;\n}\n.btn-ghost:hover,\n.btn-primary:hover {\n  background: var(--gold-light);\n  border-color: #f0e0a8;\n}\n@keyframes ctaPulse {\n  0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,.0); }\n  50% { box-shadow: 0 0 28px 2px rgba(201,168,76,.28); }\n}\n.btn-row { display: flex; flex-wrap: wrap; gap: .65rem; }\n\n\/* HERO BOOK \u2014 hero fisso; il foglio sotto sale e lo copre (niente sticky: rotto da overflow-x) *\/\n:root {\n  --hero-h: calc(100svh - var(--header-h) - env(safe-area-inset-top, 0px));\n  --hero-h: calc(100dvh - var(--header-h) - env(safe-area-inset-top, 0px));\n  --book-cover: 0;\n}\n.hero-scene {\n  position: relative;\n  z-index: 1;\n  height: var(--hero-h);\n  \/* spazio nel flusso: l\u2019hero vero \u00e8 fixed sopra *\/\n}\n.hero {\n  position: fixed;\n  top: calc(var(--header-h) + env(safe-area-inset-top, 0px));\n  left: 0;\n  right: 0;\n  width: 100%;\n  height: var(--hero-h);\n  display: grid;\n  align-items: end;\n  justify-items: center;\n  overflow: hidden;\n  margin: 0;\n  \/* spazio sotto scritta\/pulsante cos\u00ec non finiscono sul bordo \/ ESPLORA *\/\n  padding-bottom: clamp(4.8rem, 11vh, 7rem);\n  box-sizing: border-box;\n  background: var(--void);\n  z-index: 2;\n  pointer-events: auto;\n}\n.hero.is-covered {\n  pointer-events: none;\n  visibility: hidden;\n}\n.sheet {\n  position: relative;\n  z-index: 8;\n  margin-top: 0;\n  background:\n    linear-gradient(180deg, rgba(19,40,32,.98) 0%, var(--void) 56px),\n    var(--void);\n  border-radius: 28px 28px 0 0;\n  box-shadow:\n    0 -32px 90px rgba(0, 0, 0, .65),\n    0 -2px 0 rgba(232, 255, 220, .16),\n    inset 0 1px 0 rgba(255, 255, 255, .05);\n  padding-top: .35rem;\n  isolation: isolate;\n  \/* parte da sotto l\u2019hero: scrollando sale e lo copre a pieno schermo *\/\n  min-height: 70vh;\n}\n.sheet::before {\n  content: \"\";\n  display: block;\n  width: 52px;\n  height: 5px;\n  margin: .55rem auto 1.1rem;\n  border-radius: 999px;\n  background: rgba(232, 255, 220, .28);\n  box-shadow: 0 0 12px rgba(182, 245, 61, .15);\n}\n@media (prefers-reduced-motion: reduce) {\n  .hero-scene { height: auto; min-height: var(--hero-h); }\n  .hero {\n    position: relative;\n    top: auto;\n    left: auto;\n    right: auto;\n    width: auto;\n    visibility: visible !important;\n    pointer-events: auto !important;\n  }\n  .sheet {\n    border-radius: 0;\n    box-shadow: none;\n  }\n  .sheet::before { display: none; }\n}\n.hero-logo-wrap {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  \/* fascia alta: logo+timbro sopra la scritta, non dietro *\/\n  bottom: auto;\n  height: 40%;\n  z-index: 1;\n  display: grid;\n  place-items: end center;\n  pointer-events: none;\n  padding: 0 0 .5rem;\n}\n@media (min-width: 721px) {\n  .hero-logo-wrap {\n    height: 32%;\n    padding-bottom: 0;\n  }\n  .hero-logo {\n    width: min(28vw, 250px);\n  }\n  .hero-timbro {\n    right: -10%;\n    top: 10%;\n    bottom: auto;\n    width: min(14vw, 118px);\n  }\n}\n.hero-logo-group {\n  position: relative;\n  display: inline-block;\n  opacity: 0;\n  transform: translate3d(0, 0, 0) scale(0.22);\n  transform-origin: center center;\n  will-change: transform, opacity;\n  user-select: none;\n}\n.hero-logo {\n  width: min(44vw, 360px);\n  height: auto;\n  display: block;\n}\n.hero-timbro {\n  position: absolute;\n  right: -8%;\n  top: 8%;\n  bottom: auto;\n  width: min(15vw, 120px);\n  height: auto;\n  display: block;\n  transform: rotate(12deg);\n}\n.hero-shade {\n  position: absolute; inset: 0; z-index: 1;\n  background:\n    linear-gradient(180deg,\n      rgba(6,17,14,.25) 0%,\n      transparent 28%,\n      transparent 52%,\n      rgba(6,17,14,.72) 82%,\n      var(--void) 100%);\n  pointer-events: none;\n}\n.hero-copy {\n  position: relative; z-index: 2;\n  width: min(1100px, calc(100% - 2rem));\n  margin: 0 auto;\n  padding: 0 0 .6rem;\n  text-align: center;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  will-change: transform, opacity;\n  transform: translate3d(0, 0, 0);\n  transform-origin: center center;\n}\n.hero-brand {\n  margin: 0;\n  display: inline-flex;\n  flex-wrap: nowrap;\n  align-items: baseline;\n  justify-content: center;\n  gap: .28em;\n  font-family: var(--font-title);\n  font-weight: 700;\n  font-style: italic;\n  line-height: .92;\n  letter-spacing: -.04em;\n  font-size: clamp(2.6rem, 9vw, 5.2rem);\n  text-transform: uppercase;\n  white-space: nowrap;\n}\n.hero-brand .skel-a {\n  color: var(--skel-green) !important;\n  -webkit-text-fill-color: var(--skel-green) !important;\n}\n.hero-brand .skel-b {\n  color: #fff !important;\n  -webkit-text-fill-color: #fff !important;\n}\n.hero-lead {\n  margin: .85rem 0 1.25rem;\n  font-size: clamp(.95rem, 2vw, 1.15rem);\n  font-weight: 650;\n  font-weight: 600;\n  line-height: 1.35;\n  letter-spacing: .03em;\n}\n.hero-lead .motto-a { color: var(--skel-green); }\n.hero-lead .motto-b { color: #fff; }\n.hero-cta-iscriviti {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  margin-top: .15rem;\n  padding: .85rem 2.35rem;\n  border-radius: 999px;\n  border: 1.5px solid var(--pulse);\n  background: rgba(6, 14, 11, 0.92);\n  color: var(--pulse);\n  font-family: var(--font-body);\n  font-size: .82rem;\n  font-weight: 800;\n  letter-spacing: .18em;\n  text-transform: uppercase;\n  text-decoration: none;\n  box-shadow: 0 0 0 1px rgba(31, 175, 90, 0.12), 0 10px 28px rgba(0, 0, 0, 0.35);\n  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;\n}\n.hero-cta-iscriviti:hover {\n  background: rgba(31, 175, 90, 0.14);\n  color: #bbf7d0;\n  border-color: #4ade80;\n  transform: translateY(-1px);\n  box-shadow: 0 0 18px rgba(31, 175, 90, 0.28), 0 12px 30px rgba(0, 0, 0, 0.4);\n}\n.hero-cta-iscriviti:active {\n  transform: translateY(0);\n}\n.scroll-cue {\n  position: absolute; z-index: 2; left: 50%; bottom: 1rem;\n  transform: translateX(-50%);\n  display: inline-flex; flex-direction: column; align-items: center; gap: .2rem;\n  color: var(--muted); font-size: .68rem; font-weight: 800;\n  letter-spacing: .16em; text-transform: uppercase;\n  animation: bob 2.2s ease-in-out infinite;\n}\n.scroll-cue svg { width: 18px; height: 18px; }\n@keyframes bob {\n  0%, 100% { transform: translateX(-50%) translateY(0); }\n  50% { transform: translateX(-50%) translateY(6px); }\n}\n\n\/* Marquee *\/\n.marquee {\n  overflow: hidden; border-block: 1px solid var(--line);\n  background: rgba(31,175,90,.04);\n  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);\n}\n.marquee-track {\n  display: flex; width: max-content; gap: 2.5rem;\n  padding: .85rem 0;\n  animation: marquee 48s linear infinite;\n  font-family: var(--font-body); font-weight: 700;\n  letter-spacing: .08em; text-transform: uppercase; font-size: .82rem;\n  color: var(--pulse);\n}\n.marquee-track span { white-space: nowrap; opacity: .9; }\n@keyframes marquee {\n  from { transform: translateX(0); }\n  to { transform: translateX(-50%); }\n}\n#news-ticker {\n  display: flex; width: max-content; gap: 2rem;\n  animation: marquee 55s linear infinite;\n  padding: .55rem 0; color: var(--muted); font-weight: 700; font-size: .82rem;\n}\n#news-ticker strong { color: var(--pulse); }\n\n\/* Sections *\/\n.section {\n  width: min(1100px, calc(100% - 2rem));\n  margin: 3rem auto;\n}\n.section-head {\n  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;\n  gap: .75rem; margin-bottom: 1.25rem;\n}\n.section-head h2 {\n  margin: 0;\n  font-family: var(--font-title);\n  font-size: clamp(1.85rem, 4vw, 2.75rem);\n  font-weight: 700;\n  font-style: italic;\n  letter-spacing: -.03em;\n  text-transform: uppercase;\n  color: var(--skel-green);\n}\n.section-head p { margin: .35rem 0 0; color: var(--muted); font-size: .92rem; font-weight: 600; }\n.chip {\n  font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;\n  color: var(--pulse); border: 1px solid rgba(31,175,90,.3);\n  background: var(--pulse-dim); padding: .4rem .7rem; border-radius: 999px;\n}\n.reveal {\n  opacity: 0; transform: translateY(28px);\n  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);\n}\n.reveal.is-in { opacity: 1; transform: none; }\n\n\/* AB_HOME24_STATIONS_V2 \u2014 Entra in campo: 2 uguali sopra + 3 sotto; CTA verde (no lime) *\/\n#nova-portal .chip {\n  color: #1FAF5A !important;\n  border-color: rgba(31, 175, 90, .4) !important;\n  background: rgba(31, 175, 90, .14) !important;\n}\n#nova-portal .stations {\n  display: grid !important;\n  grid-template-columns: 1fr !important;\n  grid-auto-flow: row !important;\n  gap: 1rem !important;\n  overflow: visible !important;\n  padding-bottom: 0 !important;\n  scroll-snap-type: none !important;\n}\n@media (min-width: 720px) {\n  #nova-portal .stations {\n    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;\n    gap: 1.15rem !important;\n  }\n  \/* Riga 1: Iscrizioni + Portale stessa larghezza\/altezza *\/\n  #nova-portal .station-feature {\n    grid-column: span 3 !important;\n    grid-row: auto !important;\n    min-height: 240px !important;\n    height: 100% !important;\n    align-self: stretch !important;\n  }\n  \/* Riga 2: tre riquadri pi\u00f9 piccoli *\/\n  #nova-portal .station-compact {\n    grid-column: span 2 !important;\n    grid-row: auto !important;\n    min-height: 132px !important;\n  }\n}\n#nova-portal .station {\n  position: relative;\n  min-height: 150px;\n  padding: 1.15rem 1.15rem 1rem;\n  border-radius: var(--radius);\n  border: 1px solid var(--line);\n  background:\n    linear-gradient(160deg, rgba(31,175,90,.08), transparent 45%),\n    rgba(255,255,255,.025);\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  text-align: left;\n  transition: border-color .25s, transform .25s, background .25s;\n  overflow: hidden;\n}\n#nova-portal .station::before {\n  content: attr(data-n);\n  position: absolute; right: .7rem; top: .2rem;\n  font-family: var(--font-display); font-weight: 800;\n  font-size: 3.4rem; line-height: 1; letter-spacing: -.06em;\n  color: rgba(31,175,90,.14);\n  pointer-events: none;\n}\n#nova-portal .station:hover {\n  border-color: rgba(31,175,90,.45);\n  transform: translateY(-3px);\n  background:\n    linear-gradient(160deg, rgba(31,175,90,.14), transparent 50%),\n    rgba(255,255,255,.04);\n}\n#nova-portal .station-hot {\n  background: transparent !important;\n  grid-row: auto !important;\n}\n#nova-portal .station-hot::after {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  z-index: 0;\n  pointer-events: none;\n  background:\n    url(\"https:\/\/www.aviglianabasket.it\/wp-content\/uploads\/2026\/08\/LOGO_2027-NEW.png\")\n    center center \/ contain no-repeat;\n  opacity: .2;\n}\n#nova-portal .station-hot:hover { background: transparent !important; }\n#nova-portal .station-hot > * { position: relative; z-index: 1; }\n#nova-portal .station-kicker {\n  font-size: .68rem; font-weight: 800; letter-spacing: .14em;\n  text-transform: uppercase; color: #C9A84C !important; margin-bottom: .45rem;\n}\n#nova-portal .station h3 {\n  margin: 0; font-family: var(--font-title); font-size: 1.4rem;\n  font-weight: 700; font-style: italic; letter-spacing: -.02em;\n  text-transform: uppercase; max-width: none; color: #f3faf4;\n}\n#nova-portal .station-compact h3 { font-size: 1.15rem; max-width: 18ch; }\n#nova-portal .station-compact p { font-size: .82rem; }\n#nova-portal .station p {\n  margin: .45rem 0 0; color: var(--muted); font-weight: 600;\n  font-size: .9rem; line-height: 1.4; max-width: 28ch;\n}\n#nova-portal .station-season {\n  display: block;\n  margin: .35rem 0 0;\n  font-family: var(--font-title);\n  font-size: 1.15rem;\n  font-weight: 700;\n  font-style: italic;\n  letter-spacing: .02em;\n  text-transform: uppercase;\n  color: #C9A84C !important;\n  max-width: none !important;\n}\n#nova-portal .station-survey-count {\n  font-size: .72em;\n  font-weight: 700;\n  letter-spacing: .04em;\n  text-transform: uppercase;\n  color: var(--muted);\n  white-space: nowrap;\n}\n#nova-portal .station-survey-count[data-state=\"active\"] {\n  color: rgba(201,168,76,.95);\n}\n#nova-portal .station-survey-name {\n  margin: .35rem 0 0 !important;\n  font-size: .72rem !important;\n  font-weight: 600 !important;\n  line-height: 1.35 !important;\n  color: var(--muted) !important;\n  max-width: 26ch !important;\n}\n#nova-portal .station-survey-thanks {\n  margin: .35rem 0 0 !important;\n  font-size: .78rem !important;\n  font-weight: 500 !important;\n  font-style: italic !important;\n  line-height: 1.35 !important;\n  color: rgba(226,232,240,.72) !important;\n  max-width: 26ch !important;\n}\n#nova-portal .station.soon { opacity: .55; cursor: default; }\n#nova-portal .station.soon:hover { transform: none; }\n\n\/* Doc \/ altre sezioni che riusano .station fuori da #nova-portal *\/\n.stations {\n  display: grid;\n  grid-template-columns: 1fr;\n  gap: 1rem;\n}\n.station {\n  position: relative;\n  min-height: 150px;\n  padding: 1.15rem 1.15rem 1rem;\n  border-radius: var(--radius);\n  border: 1px solid var(--line);\n  background:\n    linear-gradient(160deg, rgba(31,175,90,.08), transparent 45%),\n    rgba(255,255,255,.025);\n  display: flex; flex-direction: column; justify-content: space-between;\n  text-align: left;\n  transition: border-color .25s, transform .25s, background .25s;\n  overflow: hidden;\n}\n.station::before {\n  content: attr(data-n);\n  position: absolute; right: .7rem; top: .2rem;\n  font-family: var(--font-display); font-weight: 800;\n  font-size: 3.4rem; line-height: 1; letter-spacing: -.06em;\n  color: rgba(31,175,90,.14);\n  pointer-events: none;\n}\n.station:hover {\n  border-color: rgba(31,175,90,.45);\n  transform: translateY(-3px);\n  background:\n    linear-gradient(160deg, rgba(31,175,90,.14), transparent 50%),\n    rgba(255,255,255,.04);\n}\n.station-kicker {\n  font-size: .68rem; font-weight: 800; letter-spacing: .14em;\n  text-transform: uppercase; color: #C9A84C; margin-bottom: .45rem;\n}\n.station h3 {\n  margin: 0; font-family: var(--font-title); font-size: 1.4rem;\n  font-weight: 700; font-style: italic; letter-spacing: -.02em;\n  text-transform: uppercase; max-width: 16ch;\n}\n.station p { margin: .45rem 0 0; color: var(--muted); font-weight: 600; font-size: .9rem; line-height: 1.4; max-width: 28ch; }\n.station-go {\n  margin-top: 1.1rem; font-weight: 800; font-size: .85rem; color: #1FAF5A;\n}\n.station.soon { opacity: .55; cursor: default; }\n.station.soon:hover { transform: none; }\n\n\/* Doc grid reuses stations *\/\n.doc-grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));\n  gap: 1.35rem;\n}\n\n\/* Diretta \u2014 campo che avanza dal riscaldamento al fischio finale *\/\n#diretta-block { margin-top: 1rem; margin-bottom: 0; }\n#diretta-block .section-head { margin-bottom: .5rem; }\n#diretta-block .section-head h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); }\n#diretta-block + #nova-portal { margin-top: 1.1rem; }\n#diretta-block .diretta-live {\n  display: inline-flex; align-items: center; gap: .45rem;\n  color: var(--gold-light);\n  border-color: rgba(201,168,76,.45);\n  background: var(--gold-dim);\n}\n.diretta-dot {\n  width: .45rem; height: .45rem; border-radius: 50%;\n  background: var(--heat);\n  box-shadow: 0 0 8px var(--heat);\n  animation: direttaPulse 1.4s ease-in-out infinite;\n}\n@keyframes direttaPulse {\n  0%, 100% { opacity: 1; transform: scale(1); }\n  50% { opacity: .4; transform: scale(.82); }\n}\n.diretta-list { display: flex; flex-direction: column; gap: .4rem; }\n.diretta-card {\n  position: relative; overflow: hidden;\n  border-radius: 16px;\n  border: 1px solid var(--line);\n  background:\n    linear-gradient(165deg, rgba(31,175,90,.1), transparent 46%),\n    rgba(255,255,255,.028);\n  padding: .55rem .85rem .42rem;\n}\n.diretta-card.is-live { border-color: rgba(31,175,90,.38); }\n.diretta-card.is-warm { border-color: rgba(201,168,76,.4); }\n.diretta-card.is-fine { border-color: rgba(231,76,60,.5); }\n.diretta-card::before {\n  content: attr(data-n);\n  position: absolute; right: .55rem; top: .05rem;\n  font-family: var(--font-display); font-weight: 800;\n  font-size: 2rem; line-height: 1; letter-spacing: -.06em;\n  color: rgba(31,175,90,.14);\n  pointer-events: none;\n}\n.diretta-kicker {\n  position: relative; z-index: 1;\n  font-size: .6rem; font-weight: 800; letter-spacing: .14em;\n  text-transform: uppercase; color: var(--gold); margin-bottom: .08rem;\n}\n.diretta-card h3 {\n  position: relative; z-index: 1;\n  margin: 0;\n  font-family: var(--font-title);\n  font-size: clamp(1.12rem, 1.8vw, 1.38rem);\n  font-weight: 700; font-style: italic; letter-spacing: -.02em;\n  text-transform: uppercase;\n  max-width: calc(100% - 3.2rem);\n  line-height: .95;\n}\n.diretta-us { color: #1FAF5A; }\n.diretta-tag {\n  color: var(--gold-light);\n  font-size: .58em;\n  letter-spacing: .04em;\n  margin-left: .2em;\n}\n.diretta-vs {\n  color: rgba(243,250,244,.45);\n  font-weight: 500;\n  padding: 0 .28em;\n}\n.diretta-opp { color: #f3faf4; }\n.diretta-meta {\n  position: relative; z-index: 1;\n  margin: .08rem 0 .32rem;\n  color: var(--muted); font-weight: 600; font-size: .78rem;\n}\n.diretta-phase { color: var(--text); }\n.diretta-card.is-warm .diretta-phase { color: var(--gold-light); }\n.diretta-card.is-fine .diretta-phase { color: #ffb0a4; }\n.court { position: relative; z-index: 1; }\n.court-stage { position: relative; height: 44px; }\n.court-rail {\n  position: absolute; left: 0; right: 0; bottom: 0;\n  display: flex;\n  height: 30px;\n  overflow: hidden;\n  clip-path: polygon(1.2% 26%, 98.8% 26%, 100% 100%, 0 100%);\n  background: #081410;\n  box-shadow: 0 4px 10px rgba(0,0,0,.22);\n  z-index: 2;\n}\n.court-seg {\n  position: relative; height: 100%; overflow: hidden;\n  background: #121c18;\n}\n.court-seg + .court-seg::before {\n  content: \"\";\n  position: absolute; left: 0; top: 0; bottom: 0;\n  width: 2px;\n  background: rgba(243,250,244,.95);\n  box-shadow: 1px 0 0 rgba(6,17,14,.8);\n  z-index: 5;\n  pointer-events: none;\n}\n.court-seg-fill {\n  position: absolute; left: 0; top: 0; bottom: 0;\n  width: 0;\n  transition: width .9s linear;\n}\n.court-seg.is-risc { background: #102428; }\n.court-seg.is-risc .court-seg-fill { background: linear-gradient(180deg, #8fd4d0, #3d8f8c); }\n.court-seg.is-play .court-seg-fill { background: linear-gradient(180deg, #34c96e, #128a42); }\n.court-seg.is-int .court-seg-fill { background: linear-gradient(180deg, #e2c56a, #b8922e); }\n.court-seg.is-fine .court-seg-fill { background: linear-gradient(180deg, #e15a48, #9d2b22); }\n.court-seg.is-int.is-wait { background: rgba(201,168,76,.16); }\n.court-seg.is-fine { background: #5c221c; }\n.court-seg.is-int::after {\n  content: \"\";\n  position: absolute; left: 50%; top: 54%;\n  width: 9px; height: 9px; margin: -4px 0 0 -4px;\n  border: 1.5px solid rgba(255,255,255,.55);\n  border-radius: 50%;\n  pointer-events: none; z-index: 2;\n}\n.court-trail {\n  position: absolute; left: 0; bottom: 12px;\n  height: 2px; width: 0;\n  background: linear-gradient(90deg, transparent, rgba(31,175,90,.2) 35%, #b8ffd4);\n  pointer-events: none; z-index: 1;\n  transition: width .9s linear;\n}\n.court-ball {\n  position: absolute; bottom: 4px;\n  left: clamp(11px, var(--ball, 0%), calc(100% - 11px));\n  width: 20px; height: 20px;\n  transform: translate(-50%, 0);\n  z-index: 4; overflow: visible;\n  filter: drop-shadow(0 2px 2px rgba(0,0,0,.45)) drop-shadow(0 0 10px rgba(239,106,26,.75));\n  transition: left .9s linear;\n  pointer-events: none;\n}\n.court-labels { display: flex; margin-top: .12rem; }\n.court-labels span {\n  text-align: center;\n  font-family: var(--font-title);\n  font-size: .56rem; font-weight: 700; letter-spacing: .08em;\n  text-transform: uppercase;\n  color: rgba(138,163,150,.85);\n}\n.court-labels span.is-now { color: var(--gold-light); }\n.court-labels span.is-fine-label { color: #e15a48; }\n.court-labels span.is-fine-label.is-now { color: #ffb0a4; }\n@media (max-width: 720px) {\n  .diretta-card { padding: .5rem .7rem .38rem; }\n  .diretta-card::before { font-size: 1.7rem; }\n  .court-stage { height: 40px; }\n  .court-rail { height: 26px; }\n  .court-ball { width: 18px; height: 18px; bottom: 3px; }\n  .court-labels span { font-size: .54rem; letter-spacing: .04em; }\n}\n\n\/* News *\/\n.news-grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));\n  justify-content: center;\n  align-items: start;\n  gap: clamp(.75rem, 2vw, 1.5rem);\n}\n.news-card {\n  border-radius: var(--radius); overflow: hidden;\n  border: 1px solid var(--line);\n  background: rgba(0,0,0,.4);\n  display: flex; align-items: flex-start; justify-content: center;\n  padding: clamp(.4rem, 1.5vw, .75rem);\n  min-height: 0;\n  width: 100%;\n}\n.news-card a {\n  display: flex;\n  align-items: flex-start;\n  justify-content: center;\n  width: 100%;\n  line-height: 0;\n}\n.news-card img {\n  display: block;\n  width: 100%;\n  max-width: 100%;\n  height: auto;\n  max-height: min(90vh, 880px);\n  object-fit: contain;\n  object-position: center top;\n  margin: 0 auto;\n  cursor: pointer;\n  transition: opacity .2s ease;\n  border-radius: 12px;\n}\n.news-card > img { cursor: default; }\n.news-card a:hover img { opacity: .92; }\n\n\/* Week timeline *\/\n.week {\n  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));\n  gap: .45rem;\n}\n.day {\n  border: 1px solid var(--line); border-radius: 16px;\n  padding: .7rem .4rem .7rem; text-align: center;\n  background: rgba(255,255,255,.02);\n  min-height: 96px;\n  cursor: pointer;\n  color: inherit;\n  font: inherit;\n  width: 100%;\n  appearance: none;\n  -webkit-appearance: none;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n.day.is-today:not(.is-selected) {\n  border-color: var(--line);\n  background: rgba(255,255,255,.03);\n}\n.day.is-selected {\n  border-color: rgba(31,175,90,.7);\n  background: var(--pulse-dim);\n  box-shadow: 0 0 0 1px rgba(31,175,90,.35);\n}\n.day.has-matches .day-num { color: var(--pulse); }\n.day-name { font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }\n.day-num { font-family: var(--font-title); font-size: 1.45rem; font-weight: 700; font-style: italic; margin: .2rem 0 .45rem; }\n.dot {\n  display: inline-grid; place-items: center;\n  min-width: 1.5rem; height: 1.5rem; margin: .15rem;\n  border-radius: 999px; font-size: .7rem; font-weight: 800;\n}\n.dot.home { background: var(--pulse); color: #0a140f; }\n.dot.away { background: var(--ice); color: #06201e; }\n.day-counts { display: flex; flex-direction: column; align-items: center; gap: .22rem; }\n.day-count {\n  display: inline-flex;\n  align-items: center;\n  gap: .28rem;\n  max-width: 100%;\n  border-radius: 999px;\n  padding: .12rem .42rem;\n  font-size: .58rem;\n  font-weight: 800;\n  letter-spacing: .04em;\n  text-transform: uppercase;\n  line-height: 1.1;\n}\n.day-count b { font-size: .78rem; font-variant-numeric: tabular-nums; }\n.day-count.home { background: var(--pulse); color: #0a140f; }\n.day-count.away { background: var(--ice); color: #06201e; }\n.day-matches { display: flex; flex-direction: column; gap: .22rem; width: 100%; }\n.day-match {\n  display: block;\n  border-radius: 8px;\n  padding: .2rem .28rem .24rem;\n  line-height: 1.15;\n  text-align: left;\n}\n.day-match.home { background: rgba(31,175,90,.22); }\n.day-match.away { background: rgba(126,200,196,.2); }\n.day-match .dm-time {\n  display: block;\n  font-size: .58rem;\n  font-weight: 800;\n  letter-spacing: .03em;\n  text-transform: uppercase;\n}\n.day-match.home .dm-time { color: #8ee0b0; }\n.day-match.away .dm-time { color: #9fe0dc; }\n.day-match .dm-teams {\n  display: block;\n  font-size: .64rem;\n  font-weight: 700;\n  color: var(--text);\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n.day-more { margin-top: .18rem; font-size: .6rem; font-weight: 800; color: var(--muted); }\n.day-wx {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: .1rem;\n  margin-top: auto;\n  padding-top: .42rem;\n  line-height: 1;\n}\n.day-wx .wx-ico {\n  display: grid;\n  place-items: center;\n  width: 18px;\n  height: 18px;\n  color: var(--gold-light);\n}\n.day-wx .wx-ico svg { width: 18px; height: 18px; display: block; }\n.day-wx .wx-range {\n  display: flex;\n  align-items: baseline;\n  justify-content: center;\n  gap: .16rem;\n  max-width: 100%;\n  font-variant-numeric: tabular-nums;\n  line-height: 1;\n}\n.day-wx .wx-max {\n  font-size: .7rem;\n  font-weight: 800;\n  color: var(--text);\n}\n.day-wx .wx-min {\n  font-size: .62rem;\n  font-weight: 700;\n  color: var(--muted);\n}\n.day-wx .wx-min::before {\n  content: \"\/\";\n  margin-right: .16rem;\n  font-weight: 700;\n}\n.day-wx.is-cloud .wx-ico,\n.day-wx.is-fog .wx-ico,\n.day-wx.is-partly .wx-ico { color: #c5d4cb; }\n.day-wx.is-rain .wx-ico,\n.day-wx.is-drizzle .wx-ico { color: var(--ice); }\n.day-wx.is-snow .wx-ico { color: #d7e7ff; }\n.day-wx.is-storm .wx-ico { color: #f0c14a; }\n.week-wx-note {\n  margin: .22rem 0 0;\n  font-size: .68rem;\n  font-weight: 800;\n  letter-spacing: .06em;\n  text-transform: uppercase;\n  color: var(--muted);\n}\n@media (max-width: 720px) {\n  .day-wx { padding-top: .28rem; gap: .06rem; }\n  .day-wx .wx-ico,\n  .day-wx .wx-ico svg { width: 15px; height: 15px; }\n  .day-wx .wx-range { flex-direction: column; align-items: center; gap: .08rem; }\n  .day-wx .wx-max,\n  .day-wx .wx-min { font-size: .56rem; }\n  .day-wx .wx-min::before { content: none; margin: 0; }\n}\n.side-pill {\n  display: inline-block;\n  margin-left: .35rem;\n  font-size: .62rem;\n  font-weight: 800;\n  letter-spacing: .06em;\n  text-transform: uppercase;\n  border-radius: 999px;\n  padding: .1rem .4rem;\n  vertical-align: middle;\n}\n.side-pill.home { background: rgba(31,175,90,.2); color: #b6f5cf; }\n.side-pill.away { background: rgba(126,200,196,.2); color: #c9f3f0; }\n.cal-print-btn {\n  border-radius: 999px;\n  padding: .55rem .95rem;\n  font-weight: 800;\n  font-size: .75rem;\n  letter-spacing: .06em;\n  text-transform: uppercase;\n  border: 1px solid rgba(31,175,90,.45);\n  background: rgba(31,175,90,.16);\n  color: #d9ffe8;\n}\n.cal-print-btn:hover { background: rgba(31,175,90,.28); }\n.cal-print-hint { margin: 0 0 .75rem; color: var(--muted); font-size: .88rem; line-height: 1.4; font-weight: 600; }\n.cal-print-modes { display: flex; gap: .4rem; margin-bottom: .85rem; }\n.cal-print-modes button {\n  flex: 1;\n  border-radius: 999px;\n  padding: .48rem .6rem;\n  border: 1px solid var(--line);\n  font-weight: 800;\n  font-size: .72rem;\n  letter-spacing: .05em;\n  text-transform: uppercase;\n  color: var(--muted);\n}\n.cal-print-modes button.is-on { background: var(--pulse); color: #06210f; border-color: transparent; }\n.cal-print-scope { margin-top: -.15rem; }\n.cal-print-scope-note {\n  margin: -.25rem 0 .85rem;\n  color: var(--muted);\n  font-size: .75rem;\n  font-weight: 650;\n  line-height: 1.35;\n}\n.cal-print-dates { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }\n.cal-print-field { display: flex; flex-direction: column; gap: .28rem; margin-bottom: .75rem; }\n.cal-print-field span { font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }\n.cal-print-field input,\n.cal-print-field select {\n  width: 100%;\n  background: #06110e;\n  color: var(--text);\n  border: 1px solid var(--line);\n  border-radius: 10px;\n  padding: .55rem .7rem;\n  font: inherit;\n  color-scheme: dark;\n}\n.cal-print-field input:disabled { opacity: .8; cursor: not-allowed; }\n.cal-print-field select {\n  text-transform: none;\n  letter-spacing: 0;\n  font-weight: 700;\n}\n.cal-print-status { min-height: 1.15rem; margin: 0 0 .65rem; color: var(--gold-light); font-size: .82rem; font-weight: 700; }\n.cal-print-go { width: 100%; padding: .7rem 1rem; font-size: .85rem; }\n.cal-print-go:disabled { opacity: .55; transform: none; cursor: wait; }\n.ticker-live { overflow: hidden; margin-top: .9rem; border: 1px solid var(--line); border-radius: 999px; }\n.ticker-live-track {\n  display: flex; width: max-content; gap: 2rem; padding: .65rem 1rem;\n  animation: marquee 24s linear infinite; font-weight: 700; font-size: .85rem;\n}\n.ticker-live-track span { color: var(--pulse); margin-right: .4rem; }\n.week-matches { margin-top: .9rem; display: grid; gap: .55rem; }\n.week-empty {\n  margin: 0; padding: .85rem 1rem; color: var(--muted); font-weight: 700;\n  border: 1px dashed var(--line); border-radius: 16px; text-align: center;\n}\n.week-match {\n  border: 1px solid var(--line); border-radius: 16px; padding: .85rem 1rem;\n  background: rgba(255,255,255,.02); cursor: pointer; text-align: left;\n}\n.week-match.is-home { border-left: 3px solid var(--pulse); }\n.week-match.is-away { border-left: 3px solid var(--ice); }\n.week-match .wm-top { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .55rem; }\n.week-match .wm-time { color: var(--pulse); font-weight: 800; font-variant-numeric: tabular-nums; }\n.week-match .wm-side {\n  font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;\n  padding: .12rem .45rem; border-radius: 999px;\n}\n.week-match .wm-side.is-home { background: rgba(31,175,90,.16); color: var(--pulse); }\n.week-match .wm-side.is-away { background: rgba(56,189,248,.16); color: var(--ice); }\n.week-match .wm-tipo { font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }\n.week-match .wm-title { font-weight: 800; margin-top: .25rem; }\n.week-match .wm-date-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .55rem; margin-top: .2rem; }\n.week-match .wm-date { font-weight: 800; font-variant-numeric: tabular-nums; font-size: .85rem; }\n.week-match .wm-weekday { color: var(--pulse); font-weight: 800; font-size: .78rem; }\n.week-match .wm-meta { color: var(--muted); font-size: .8rem; font-weight: 600; margin-top: .15rem; }\n\n\/* Photos *\/\n.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .9rem; }\n.filters select, .filters button {\n  border: 1px solid var(--line); background: rgba(255,255,255,.03);\n  color: var(--text); border-radius: 999px; padding: .65rem 1rem; font-weight: 700;\n}\n.photo-grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));\n  gap: .7rem;\n}\n.photo-card {\n  border-radius: 18px; overflow: hidden; border: 1px solid var(--line);\n  background: rgba(255,255,255,.02); cursor: pointer;\n  transition: transform .25s, border-color .25s;\n}\n.photo-card:hover { transform: translateY(-3px); border-color: rgba(31,175,90,.4); }\n.photo-card .ph { aspect-ratio: 1; overflow: hidden; }\n.photo-card .ph img { width: 100%; height: 100%; object-fit: cover; }\n.photo-card .meta { padding: .7rem .75rem .85rem; }\n.photo-card .team { display: block; font-weight: 800; font-size: .88rem; }\n.photo-card .info { display: block; color: var(--muted); font-size: .75rem; font-weight: 600; margin-top: .2rem; }\n.score-row { display: flex; align-items: center; gap: .4rem; margin-top: .4rem; }\n.score { font-weight: 800; }\n.badge-vinto, .badge-perso, .badge-nullo {\n  font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;\n  padding: .15rem .4rem; border-radius: 999px;\n}\n.badge-vinto { background: rgba(31,175,90,.16); color: var(--skel-green); }\n.badge-perso { background: var(--heat-dim); color: var(--heat); }\n.badge-nullo { background: rgba(255,255,255,.06); color: var(--muted); }\n\n\/* Results *\/\n.results-wrap { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }\n.results-track {\n  display: flex; width: max-content; gap: .7rem;\n  animation: marquee 95s linear infinite;\n}\n.result-card {\n  width: 240px; flex: 0 0 auto;\n  border: 1px solid var(--line); border-radius: 16px;\n  background: #0f1f19; padding: .8rem .85rem .7rem;\n}\n.nba-head { margin-bottom: .55rem; }\n.nba-status { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .04em; }\n.nba-status.is-win { color: var(--skel-green); }\n.nba-status.is-lose { color: var(--heat); }\n.nba-meta { display: block; margin-top: .15rem; font-size: .7rem; color: var(--gold); font-weight: 700; }\n.nba-rows { display: grid; gap: .4rem; }\n.nba-row {\n  display: grid; grid-template-columns: 26px 1fr auto 10px;\n  align-items: center; gap: .45rem;\n}\n.nba-row img { width: 26px; height: 26px; object-fit: contain; border-radius: 50%; background: rgba(255,255,255,.04); }\n.nba-name { font-weight: 700; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.nba-score { font-weight: 800; color: #7d8f86; }\n.nba-row.is-winner .nba-name, .nba-row.is-winner .nba-score { color: #fff; }\n.nba-foot { margin-top: .55rem; padding-top: .45rem; border-top: 1px solid var(--line); font-size: .68rem; color: var(--muted); font-weight: 700; }\n.nba-caret { width: 0; }\n\n\/* Merch band *\/\n.band {\n  position: relative; border-radius: calc(var(--radius) + 4px);\n  overflow: hidden; min-height: 260px;\n  display: grid; align-items: end;\n  border: 1px solid var(--line);\n}\n.band-bg { position: absolute; inset: 0; }\n.band-bg img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05) contrast(1.05); }\n.band-copy {\n  position: relative; z-index: 1; padding: 1.5rem;\n  background: linear-gradient(180deg, transparent, rgba(6,17,14,.92) 45%);\n}\n.eyebrow { font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--pulse); }\n.band-copy h2 {\n  margin: .35rem 0 .5rem;\n  font-family: var(--font-title);\n  font-size: clamp(1.8rem, 3.5vw, 2.5rem);\n  font-weight: 700;\n  font-style: italic;\n  letter-spacing: -.03em;\n  text-transform: uppercase;\n  color: var(--skel-green);\n}\n.band-copy p { margin: 0 0 1rem; color: #c9ddd0; font-weight: 600; max-width: 36ch; }\n\n.safe-band {\n  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;\n  gap: 1rem; padding: 1.35rem 1.4rem;\n  border-radius: var(--radius);\n  border: 1px solid rgba(126,200,196,.3);\n  background: linear-gradient(120deg, var(--ice-dim), rgba(255,255,255,.02));\n}\n.safe-band h2 {\n  margin: 0;\n  font-family: var(--font-title);\n  font-weight: 700;\n  font-style: italic;\n  letter-spacing: -.03em;\n  text-transform: uppercase;\n  color: var(--skel-green);\n}\n.safe-band p { margin: .35rem 0 0; color: var(--muted); font-weight: 600; max-width: 42ch; }\n\n.sponsors { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }\n.sponsors-track {\n  display: flex; width: max-content; gap: 2.4rem; align-items: center;\n  animation: marquee 75s linear infinite; padding: .85rem 0;\n}\n.sponsors-track a {\n  display: inline-flex;\n  align-items: center;\n}\n.sponsors-track img {\n  height: 210px; width: auto; object-fit: contain;\n  filter: grayscale(1) brightness(1.15); opacity: .85;\n  transition: .25s;\n}\n.sponsors-track img:hover { filter: none; opacity: 1; }\n\n.footer {\n  width: min(1100px, calc(100% - 2rem));\n  margin: 2.5rem auto 1rem;\n  padding: 1.25rem 0 2rem;\n  border-top: 1px solid var(--line);\n  display: flex; flex-wrap: wrap; gap: 1rem;\n  justify-content: space-between; align-items: center;\n  color: var(--muted); font-weight: 600; font-size: .85rem;\n}\n.footer nav { display: flex; flex-wrap: wrap; gap: .75rem; }\n.footer button { font-weight: 700; color: var(--text); }\n\n\/* Dock mobile rimosso \u2014 menu resta in topbar *\/\n.dock { display: none !important; }\n\n\/* Torna in cima \u2014 verde semitrasparente *\/\n#btn-to-top {\n  position: fixed;\n  right: max(1rem, env(safe-area-inset-right, 0px));\n  bottom: max(1.25rem, calc(1rem + env(safe-area-inset-bottom, 0px)));\n  z-index: 55;\n  width: 44px;\n  height: 44px;\n  border-radius: 10px;\n  border: 1px solid rgba(31, 175, 90, .5);\n  background: rgba(31, 175, 90, .42);\n  color: rgba(6, 28, 18, .95);\n  display: grid;\n  place-items: center;\n  cursor: pointer;\n  backdrop-filter: blur(10px);\n  -webkit-backdrop-filter: blur(10px);\n  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);\n  opacity: 0;\n  visibility: hidden;\n  transform: translateY(8px);\n  pointer-events: none;\n  transition: opacity .25s ease, visibility .25s ease, transform .25s ease, background .2s ease;\n}\n#btn-to-top.is-visible {\n  opacity: 1;\n  visibility: visible;\n  transform: none;\n  pointer-events: auto;\n}\n#btn-to-top:hover {\n  background: rgba(31, 175, 90, .58);\n  border-color: rgba(31, 175, 90, .7);\n}\n#btn-to-top svg { width: 22px; height: 22px; }\nbody.nav-open #btn-to-top,\nbody.page-open #btn-to-top {\n  opacity: 0 !important;\n  visibility: hidden !important;\n  pointer-events: none !important;\n}\n\n\/* Nasconde Back-to-Top del tema WP (usiamo #btn-to-top) *\/\n#toTop, #scrollUp, .back-to-top, .fusion-top-top-link, #ast-scroll-top,\n#generate-scroll-to-top, .scrollToTop, #scroll-up, .et_pb_scroll_top,\n.oceanwp-up, .go-top, #go-top, .scroll-top, .top-button {\n  display: none !important;\n  opacity: 0 !important;\n  visibility: hidden !important;\n  pointer-events: none !important;\n}\n\n\/* Overlay \/ ripple \/ cmdk \/ cookies \/ modals *\/\n#page-overlay {\n  position: fixed; inset: 0; z-index: 80;\n  display: grid; grid-template-rows: auto 1fr;\n  background: var(--void);\n  transform: translateX(100%);\n  transition: transform .35s cubic-bezier(.22,1,.36,1);\n}\n#page-overlay.open { transform: none; }\n.overlay-bar {\n  position: relative;\n  display: flex; align-items: center; gap: .65rem;\n  padding: calc(.65rem + env(safe-area-inset-top)) .75rem .65rem;\n  border-bottom: 1px solid var(--line);\n  background: rgba(6,17,14,.95);\n}\n.overlay-bar strong { flex: 1; font-family: var(--font-title); font-style: italic; text-transform: uppercase; letter-spacing: -.02em; }\n.overlay-logo {\n  height: 36px;\n  width: auto;\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  transform: translate(-50%, -50%);\n  object-fit: contain;\n  pointer-events: none;\n}\n#page-frame { width: 100%; height: 100%; border: 0; background: #fff; }\n\n#page-ripple {\n  position: fixed; inset: 0; z-index: 90; pointer-events: none;\n  display: grid; place-items: center; opacity: 0; visibility: hidden;\n}\n#page-ripple.is-on {\n  opacity: 1; visibility: visible; pointer-events: auto;\n}\n.ripple-blast {\n  position: absolute; inset: 0;\n  background:\n    radial-gradient(circle at 50% 42%, #1a4032 0%, #0c241c 42%, #06110e 72%, #020806 100%);\n  clip-path: circle(0% at 50% 50%);\n  will-change: clip-path;\n}\n#page-ripple.is-cover .ripple-blast {\n  animation: blastExpand 1.1s cubic-bezier(.16, .85, .25, 1) forwards;\n}\n#page-ripple.is-reveal .ripple-blast {\n  animation: blastCollapse .78s cubic-bezier(.4, 0, .2, 1) forwards;\n}\n@keyframes blastExpand {\n  0%   { clip-path: circle(0% at 50% 50%); }\n  18%  { clip-path: circle(52px at 50% 50%); }\n  100% { clip-path: circle(150% at 50% 50%); }\n}\n@keyframes blastCollapse {\n  0%   { clip-path: circle(150% at 50% 50%); }\n  100% { clip-path: circle(0% at 50% 50%); }\n}\n.ripple-mark {\n  position: relative; z-index: 2; text-align: center;\n  pointer-events: none;\n}\n.ripple-logo img {\n  width: 96px; height: 96px; object-fit: contain; margin: 0 auto;\n  display: block;\n  filter: drop-shadow(0 0 18px rgba(232, 200, 74, .35));\n}\n#page-ripple.is-cover .ripple-logo img {\n  animation: logoHold 1.1s cubic-bezier(.16, .85, .25, 1) forwards;\n}\n#page-ripple.is-cover.is-loaded .ripple-logo img,\n#page-ripple.is-reveal .ripple-logo img {\n  animation: logoOut .35s ease forwards;\n}\n#page-ripple.is-reveal .ripple-mark {\n  opacity: 0;\n  transition: opacity .25s ease;\n}\n.ripple-loading {\n  margin: .75rem 0 0;\n  font-size: .72rem; font-weight: 800; letter-spacing: .16em;\n  text-transform: uppercase; color: var(--pulse);\n  opacity: 0;\n}\n#page-ripple.is-cover .ripple-loading {\n  animation: loadingIn .4s ease .45s forwards;\n}\n@keyframes logoHold {\n  0%   { transform: scale(.35); opacity: 0; filter: drop-shadow(0 0 8px rgba(232,200,74,.2)); }\n  14%  { transform: scale(1.12); opacity: 1; }\n  24%  { transform: scale(1); opacity: 1; }\n  38%  { transform: scale(1.28); opacity: 1; filter: drop-shadow(0 0 28px rgba(232,200,74,.7)) brightness(1.2); }\n  55%  { transform: scale(1.05); opacity: 1; }\n  100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 18px rgba(232,200,74,.45)); }\n}\n@keyframes logoOut {\n  from { transform: scale(1); opacity: 1; }\n  to   { transform: scale(1.15); opacity: 0; }\n}\n@keyframes loadingIn {\n  from { opacity: 0; transform: translateY(6px); }\n  to   { opacity: 1; transform: none; }\n}\n.ripple-rings { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }\n.ripple-ring {\n  position: absolute; width: 100px; height: 100px; border-radius: 50%;\n  border: 1.5px solid rgba(232, 200, 74, .45);\n  opacity: 0;\n}\n#page-ripple.is-cover .ripple-ring {\n  animation: ringBlast 1.05s cubic-bezier(.16, .85, .25, 1) forwards;\n}\n#page-ripple.is-cover .ripple-ring:nth-child(2) { animation-delay: .06s; }\n#page-ripple.is-cover .ripple-ring:nth-child(3) { animation-delay: .12s; }\n@keyframes ringBlast {\n  0%   { transform: scale(.5); opacity: 0; }\n  20%  { transform: scale(1); opacity: .85; }\n  100% { transform: scale(18); opacity: 0; border-color: rgba(31, 175, 90, .25); }\n}\n\n#cmdk {\n  position: fixed; inset: 0; z-index: 95;\n  background: rgba(0,0,0,.55); backdrop-filter: blur(6px);\n  display: grid; place-items: start center; padding: 12vh 1rem 1rem;\n}\n#cmdk[hidden] { display: none !important; }\n.cmdk-panel {\n  width: min(560px, 100%);\n  border: 1px solid var(--line); border-radius: 18px;\n  background: #0e221b; overflow: hidden;\n  box-shadow: 0 30px 80px rgba(0,0,0,.45);\n}\n#cmdk-input {\n  width: 100%; border: 0; border-bottom: 1px solid var(--line);\n  background: transparent; color: var(--text);\n  padding: 1rem 1.1rem; font-size: 1rem; font-weight: 600; outline: none;\n}\n.cmdk-list { max-height: 340px; overflow: auto; }\n.cmdk-item {\n  width: 100%; text-align: left;\n  display: flex; justify-content: space-between; gap: .75rem;\n  padding: .85rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,.04);\n  font-weight: 700;\n}\n.cmdk-item small { color: var(--muted); font-weight: 600; }\n.cmdk-item.is-active, .cmdk-item:hover { background: var(--pulse-dim); }\n\n#cookie-banner {\n  position: fixed; left: 1rem; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px));\n  z-index: 100; max-width: 520px; margin: 0 auto;\n  border: 1px solid var(--line); border-radius: 18px;\n  background: rgba(10,26,20,.96); backdrop-filter: blur(12px);\n  padding: 1.1rem 1.15rem; box-shadow: 0 20px 50px rgba(0,0,0,.4);\n}\n@media (min-width: 900px) {\n  #cookie-banner { bottom: 1.25rem; left: auto; right: 1.25rem; margin: 0; }\n}\n#cookie-banner[hidden] { display: none !important; }\n#cookie-banner h3 { margin: 0 0 .4rem; font-family: var(--font-title); font-style: italic; text-transform: uppercase; }\n#cookie-banner p { margin: 0 0 .9rem; color: var(--muted); font-size: .88rem; line-height: 1.45; font-weight: 600; }\n.cookie-actions { display: flex; flex-wrap: wrap; gap: .45rem; }\n\/* Hide WP cookie plugins *\/\n.cc-window, .cli-modal-content, #cookie-law-info-bar, .cky-consent-container { display: none !important; }\n\n.modal {\n  position: fixed; inset: 0; z-index: 96;\n  background: rgba(0,0,0,.6); backdrop-filter: blur(5px);\n  display: grid; place-items: center; padding: 1rem;\n}\n.modal[hidden] { display: none !important; }\n.modal-card {\n  width: min(520px, 100%); max-height: min(80vh, 720px); overflow: auto;\n  border-radius: 18px; border: 1px solid var(--line); background: #0e221b; padding: 1rem;\n}\n.modal-card header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }\n.modal-card h3 { margin: 0; font-family: var(--font-title); font-style: italic; text-transform: uppercase; letter-spacing: -.02em; }\n.event-card { border: 1px solid var(--line); border-radius: 14px; padding: .8rem; margin-bottom: .55rem; }\n.event-card .t { color: var(--pulse); font-weight: 800; }\n.event-card .s { font-weight: 700; margin: .25rem 0; }\n.event-card .l { color: var(--muted); font-size: .85rem; font-weight: 600; }\n.event-card .route-line { margin-top: .15rem; color: var(--ice); font-weight: 700; }\n\n#lightbox {\n  position: fixed; inset: 0; z-index: 97;\n  background: rgba(0,0,0,.88); display: grid; place-items: center; padding: 1rem;\n}\n#lightbox[hidden] { display: none !important; }\n#lightbox img { max-width: min(920px, 100%); max-height: 78vh; object-fit: contain; border-radius: 12px; }\n#lightbox-note { color: #d7e6da; text-align: center; margin-top: .75rem; font-weight: 600; }\n\n@media (max-width: 720px) {\n  .week {\n    display: grid !important;\n    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;\n    gap: .28rem;\n  }\n  .day {\n    padding: .4rem .12rem .5rem;\n    border-radius: 10px;\n    min-height: 0;\n  }\n  .day-name {\n    font-size: .52rem;\n    letter-spacing: .04em;\n  }\n  .day-num {\n    font-size: 1.05rem;\n    margin: .1rem 0 .25rem;\n  }\n  .dot {\n    min-width: 1.15rem;\n    height: 1.15rem;\n    margin: .08rem;\n    font-size: .58rem;\n  }\n  .day-count { font-size: .46rem; padding: .1rem .2rem; gap: .15rem; }\n  .day-count b { font-size: .62rem; }\n  .day-match { padding: .12rem .14rem; }\n  .day-match .dm-time { font-size: .46rem; }\n  .day-match .dm-teams { font-size: .5rem; }\n  .day-more { font-size: .48rem; }\n  .hero { padding-bottom: clamp(5.2rem, 14vh, 7.5rem); }\n  .hero-logo-wrap { height: 40%; }\n  .hero-copy { padding-bottom: .4rem; }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  *, *::before, *::after {\n    animation-duration: .01ms !important;\n    animation-iteration-count: 1 !important;\n    transition-duration: .01ms !important;\n  }\n  .reveal { opacity: 1; transform: none; }\n}\n<\/style>\n\n\n<div class=\"atmosphere\" aria-hidden=\"true\"><\/div>\n\n<div id=\"intro\" aria-label=\"Introduzione\">\n  <div class=\"intro-bg-wrapper\">\n    <div class=\"intro-bg\"><\/div>\n  <\/div>\n  <div class=\"intro-logo-wrapper\">\n    <img decoding=\"async\" crossorigin=\"anonymous\" class=\"intro-logo\" src=\"https:\/\/www.aviglianabasket.it\/wp-content\/uploads\/2026\/08\/LOGO_2027-NEW.png\" alt=\"Avigliana Basket Logo\" title=\"\">\n  <\/div>\n  <div class=\"intro-title-wrapper\">\n    <span class=\"skel-a\">Avigliana<\/span> <span class=\"skel-b\">Basket<\/span>\n  <\/div>\n  <div class=\"intro-flash\"><\/div>\n  <div class=\"intro-glow-overlay\"><\/div>\n  <button type=\"button\" id=\"btn-skip-intro\" class=\"skip-btn\" data-i18n=\"skip_intro\">Salta Intro<\/button>\n  <div class=\"intro-loading\">Avigliana Basket<\/div>\n<\/div>\n\n<div class=\"app\">\n  <header class=\"topbar\">\n    <a class=\"brand\" href=\"#\" id=\"btn-home\" aria-label=\"Torna alla home\">\n      <img decoding=\"async\" crossorigin=\"anonymous\" src=\"https:\/\/www.aviglianabasket.it\/wp-content\/uploads\/2026\/08\/LOGO_2027-NEW.png\" alt=\"Avigliana Basket\" title=\"\">\n      <span class=\"brand-title\"><span class=\"skel-a\">Avigliana<\/span> <span class=\"skel-b\">Basket<\/span><\/span>\n    <\/a>\n    <div class=\"top-actions\">\n      <div class=\"lang-switch\" role=\"group\" aria-label=\"Language \/ Lingua\">\n        <button type=\"button\" id=\"lang-it\" data-lang=\"it\" class=\"is-active\" aria-pressed=\"true\">IT<\/button>\n        <button type=\"button\" id=\"lang-en\" data-lang=\"en\" aria-pressed=\"false\">EN<\/button>\n      <\/div>\n      <button class=\"icon-btn\" id=\"btn-cmd\" title=\"Cerca (Ctrl+K)\" aria-label=\"Apri ricerca\" data-i18n-title=\"search_title\" data-i18n-aria=\"search_aria\">\n        <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.2\"><circle cx=\"11\" cy=\"11\" r=\"7\"><\/circle><path d=\"M20 20l-3.5-3.5\"><\/path><\/svg>\n      <\/button>\n      <button class=\"menu-btn\" id=\"btn-menu\" title=\"Menu\" aria-label=\"Apri menu\" aria-expanded=\"false\" data-i18n-aria=\"menu_aria\" data-i18n-title=\"menu\">\n        <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" aria-hidden=\"true\"><path d=\"M4 7h16M4 12h16M4 17h10\"><\/path><\/svg>\n        <span class=\"menu-btn-label\" data-i18n=\"menu\">Menu<\/span>\n      <\/button>\n    <\/div>\n  <\/header>\n\n  <div class=\"nav-scrim\" id=\"nav-scrim\" hidden=\"\"><\/div>\n  <aside class=\"drawer\" id=\"drawer\" aria-label=\"Menu\" data-i18n-aria=\"menu\">\n    <div class=\"drawer-head\">\n      <div class=\"drawer-brand\">\n        <img decoding=\"async\" crossorigin=\"anonymous\" src=\"https:\/\/www.aviglianabasket.it\/wp-content\/uploads\/2026\/08\/LOGO_2027-NEW.png\" alt=\"\" title=\"\">\n        <span data-i18n=\"menu\">Menu<\/span>\n      <\/div>\n      <button class=\"icon-btn\" id=\"btn-close-nav\" aria-label=\"Chiudi menu\" data-i18n-aria=\"close_menu\">\n        <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><path d=\"M6 6l12 12M18 6L6 18\"><\/path><\/svg>\n      <\/button>\n    <\/div>\n    <div class=\"nav-groups\" id=\"nav-groups\"><\/div>\n  <\/aside>\n\n  <main id=\"home\">\n    <div class=\"hero-scene\" id=\"hero-scene\">\n      <section class=\"hero\" id=\"home-hero\">\n        <div class=\"hero-logo-wrap\" aria-hidden=\"true\">\n          <div class=\"hero-logo-group\" id=\"hero-logo-group\">\n            <img crossorigin=\"anonymous\" class=\"hero-logo\" id=\"hero-logo\" src=\"https:\/\/www.aviglianabasket.it\/wp-content\/uploads\/2026\/08\/LOGO_2027-NEW.png\" alt=\"\" decoding=\"async\" title=\"\">\n            <img crossorigin=\"anonymous\" class=\"hero-timbro\" id=\"hero-timbro\" src=\"https:\/\/www.aviglianabasket.it\/wp-content\/uploads\/2026\/07\/timbro.png\" alt=\"\" decoding=\"async\" title=\"\">\n          <\/div>\n        <\/div>\n        <div class=\"hero-shade\" aria-hidden=\"true\"><\/div>\n        <div class=\"hero-copy\">\n          <h1 class=\"hero-brand\">\n            <span class=\"skel-a\">Avigliana<\/span>\n            <span class=\"skel-b\">Basket<\/span>\n          <\/h1>\n          <p class=\"hero-lead\"><span class=\"motto-a\">Keep Pushing.<\/span> <span class=\"motto-b\">Keep Winning.<\/span><\/p>\n          <a class=\"hero-cta-iscriviti\" href=\"https:\/\/www.aviglianabasket.cloud\/ISCRIZIONI\" target=\"_blank\" rel=\"noopener noreferrer\" data-i18n=\"hero_iscriviti\">Iscriviti<\/a>\n        <\/div>\n        <a class=\"scroll-cue\" href=\"#nova-portal\" aria-label=\"Scorri in basso\" data-i18n-aria=\"scroll_aria\">\n          <span data-i18n=\"explore\">Esplora<\/span>\n          <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.2\"><path d=\"M6 9l6 6 6-6\"><\/path><\/svg>\n        <\/a>\n      <\/section>\n    <\/div>\n\n    <div class=\"sheet\" id=\"home-sheet\">\n    <div class=\"marquee\" aria-hidden=\"true\">\n      <div class=\"marquee-track\" id=\"marquee-track\"><\/div>\n    <\/div>\n    <div class=\"marquee\" style=\"border-top:0\">\n      <div id=\"news-ticker\"><\/div>\n    <\/div>\n\n    <section class=\"section\" id=\"diretta-block\" hidden aria-labelledby=\"diretta-title\">\n      <div class=\"section-head\">\n        <div>\n          <h2 id=\"diretta-title\" data-i18n=\"diretta_title\">Diretta<\/h2>\n          <p data-i18n=\"diretta_sub\">Dal riscaldamento al fischio finale.<\/p>\n        <\/div>\n        <span class=\"chip diretta-live\"><span class=\"diretta-dot\" aria-hidden=\"true\"><\/span> LIVE<\/span>\n      <\/div>\n      <div class=\"diretta-list\" id=\"diretta-list\"><\/div>\n    <\/section>\n\n    <!-- AB_HOME24_STATIONS_V2 -->\n    <section class=\"section\" id=\"nova-portal\">\n      <div class=\"section-head\">\n        <div>\n          <h2 data-i18n=\"enter_field\">Entra in campo<\/h2>\n          <p data-i18n=\"enter_field_sub\">Iscrizioni, portale, calendario, shop e community \u2014 un solo flusso.<\/p>\n        <\/div>\n      <\/div>\n      <div class=\"stations\">\n        <a class=\"station station-hot station-feature\" data-n=\"01\" href=\"https:\/\/www.aviglianabasket.cloud\/ISCRIZIONI\/\" target=\"_blank\" rel=\"noopener\">\n          <div>\n            <div class=\"station-kicker\" data-i18n=\"kicker_athletes\">Atleti<\/div>\n            <h3 data-i18n=\"reg_title\">Iscriviti alla stagione<\/h3>\n            <p class=\"station-season\" id=\"iscrizioni-stagione-attiva\">\u2026<\/p>\n            <p data-i18n=\"reg_desc\">Compila l\u2019iscrizione corsi online in pochi minuti.<\/p>\n          <\/div>\n          <span class=\"station-go\" data-i18n=\"reg_cta\">Apri iscrizioni \u2192<\/span>\n        <\/a>\n        <a class=\"station station-feature\" data-n=\"02\" href=\"https:\/\/www.aviglianabasket.cloud\/PORTALE\/index.html\" target=\"_blank\" rel=\"noopener\">\n          <div>\n            <div class=\"station-kicker\" data-i18n=\"kicker_athlete_area\">Area atleta<\/div>\n            <h3 data-i18n=\"portal_title\">Portale Atleta<\/h3>\n            <p data-i18n=\"portal_desc\">Documenti, visite e area personale.<\/p>\n          <\/div>\n          <span class=\"station-go\" data-i18n=\"portal_cta\">Entra \u2192<\/span>\n        <\/a>\n        <button class=\"station station-compact\" data-n=\"03\" type=\"button\" data-open=\"https:\/\/www.aviglianabasket.cloud\/script\/calendario-ab.php\" data-title-key=\"nav_calendar\">\n          <div>\n            <div class=\"station-kicker\">Live<\/div>\n            <h3 data-i18n=\"cal_title\">Calendario &amp; Live<\/h3>\n            <p data-i18n=\"cal_desc\">Partite, orari e aggiornamenti.<\/p>\n          <\/div>\n          <span class=\"station-go\" data-i18n=\"open_cta\">Apri \u2192<\/span>\n        <\/button>\n        <button class=\"station station-compact\" data-n=\"04\" type=\"button\" data-open=\"https:\/\/www.aviglianabasket.cloud\/AB-MERCH-ORDINI_SQL\" data-title-key=\"nav_merch\">\n          <div>\n            <div class=\"station-kicker\">Shop<\/div>\n            <h3 data-i18n=\"merch_title\">Merchandising<\/h3>\n            <p data-i18n=\"merch_desc\">Abbigliamento ufficiale. ORDINI<\/p>\n          <\/div>\n          <span class=\"station-go\" data-i18n=\"merch_cta\">Vai allo shop \u2192<\/span>\n        <\/button>\n        <button class=\"station station-compact\" id=\"station-survey\" data-n=\"05\" type=\"button\" data-open=\"https:\/\/www.aviglianabasket.cloud\/wp-content\/uploads\/ab_survey.html?v=20260806c\" data-title-key=\"nav_survey\">\n          <div>\n            <div class=\"station-kicker\">Community<\/div>\n            <h3><span data-i18n=\"survey_title\">Sondaggi<\/span> <span class=\"station-survey-count\" id=\"survey-station-count\" data-state=\"loading\">\u2014 \u2026<\/span><\/h3>\n            <p class=\"station-survey-name\" id=\"survey-station-name\" hidden=\"\"><\/p>\n            <p class=\"station-survey-thanks\" data-i18n=\"survey_thanks\">Partecipa e aiutaci a migliorare \u2014 Grazie<\/p>\n          <\/div>\n          <span class=\"station-go\" data-i18n=\"survey_cta\">Partecipa \u2192<\/span>\n        <\/button>\n      <\/div>\n    <\/section>\n\n    <section class=\"section\" id=\"istruzioni-section\">\n      <div class=\"section-head\">\n        <div>\n          <h2 data-i18n=\"myfip_title\">Istruzioni MyFIP<\/h2>\n          <p data-i18n=\"myfip_sub\">Guide PDF per il tesseramento.<\/p>\n        <\/div>\n      <\/div>\n      <div class=\"doc-grid\">\n        <a class=\"station\" data-n=\"PDF\" href=\"https:\/\/www.aviglianabasket.it\/wp-content\/uploads\/2026\/07\/MyFip-Atleti-2012-14-anni-non-compiuti-2013-2014.pdf\" target=\"_blank\" rel=\"noopener\">\n          <div>\n            <div class=\"station-kicker\">PDF<\/div>\n            <h3 data-i18n=\"myfip_minors\">MyFIP Minorenni<\/h3>\n            <p data-i18n=\"myfip_minors_a\">fino a 14 anni (2012\u20132014)<\/p>\n          <\/div>\n          <span class=\"station-go\" data-i18n=\"download_cta\">Scarica \u2192<\/span>\n        <\/a>\n        <a class=\"station\" data-n=\"PDF\" href=\"https:\/\/www.aviglianabasket.it\/wp-content\/uploads\/2026\/07\/MyFip-Atleti-minorenni-con-14-anni-compiuti.pdf\" target=\"_blank\" rel=\"noopener\">\n          <div>\n            <div class=\"station-kicker\">PDF<\/div>\n            <h3 data-i18n=\"myfip_minors\">MyFIP Minorenni<\/h3>\n            <p data-i18n=\"myfip_minors_b\">da 14 a 17 anni<\/p>\n          <\/div>\n          <span class=\"station-go\" data-i18n=\"download_cta\">Scarica \u2192<\/span>\n        <\/a>\n        <div class=\"station soon\" data-n=\"\u2014\" aria-disabled=\"true\">\n          <div>\n            <div class=\"station-kicker\" data-i18n=\"coming_soon_kicker\">In arrivo<\/div>\n            <h3 data-i18n=\"myfip_adults\">MyFIP Maggiorenni<\/h3>\n            <p data-i18n=\"myfip_adults_desc\">Atleti dai 18 anni<\/p>\n          <\/div>\n          <span class=\"station-go\" data-i18n=\"coming_soon_cta\">Presto online<\/span>\n        <\/div>\n      <\/div>\n    <\/section>\n\n    <section class=\"section\" id=\"news-section\">\n      <div class=\"section-head\">\n        <div>\n          <h2>News<\/h2>\n        <\/div>\n      <\/div>\n      <div class=\"news-grid\">\n        <article class=\"news-card\">\n          <a href=\"https:\/\/www.aviglianabasket.cloud\/ISCRIZIONI\" target=\"_blank\" rel=\"noopener noreferrer\">\n            <img decoding=\"async\" crossorigin=\"anonymous\" src=\"https:\/\/www.aviglianabasket.it\/wp-content\/uploads\/2026\/08\/ISCRIZIONI_2027.jpeg\" alt=\"Iscrizioni Avigliana Basket\" title=\"\">\n          <\/a>\n        <\/article>\n        <article class=\"news-card\">\n          <img decoding=\"async\" crossorigin=\"anonymous\" src=\"https:\/\/www.aviglianabasket.it\/wp-content\/uploads\/2026\/09\/WhatsApp-Image-2026-09-03-at-10.42.27.jpeg\" alt=\"Centro Estivo Settembre 2026\" title=\"\">\n        <\/article>\n        <article class=\"news-card\">\n          <a href=\"https:\/\/www.aviglianabasket.cloud\/wp-content\/uploads\/ab_survey.html?s=inaugurazione-palagreens\" target=\"_blank\" rel=\"noopener noreferrer\">\n            <img decoding=\"async\" crossorigin=\"anonymous\" src=\"https:\/\/www.aviglianabasket.it\/wp-content\/uploads\/2026\/09\/Palagreen.jpg\" alt=\"Inaugurazione Palagreen\" title=\"\">\n          <\/a>\n        <\/article>\n      <\/div>\n    <\/section>\n\n    <section class=\"section\" id=\"timeline-container-block\">\n      <div class=\"section-head\">\n        <div>\n          <h2 data-i18n=\"next7\">Prossimi 7 giorni<\/h2>\n          <p data-i18n=\"next7_sub\">Match timeline casa e trasferta.<\/p>\n          <p class=\"week-wx-note\" id=\"week-wx-note\" hidden><\/p>\n        <\/div>\n        <button type=\"button\" class=\"cal-print-btn\" id=\"btn-cal-print\" data-i18n=\"print_cal\">Stampa calendario<\/button>\n      <\/div>\n      <div class=\"week\" id=\"days-root\"><\/div>\n      <div class=\"week-matches\" id=\"week-matches\" hidden=\"\"><\/div>\n      <div class=\"ticker-live\" id=\"ticker-wrap\" hidden=\"\">\n        <div class=\"ticker-live-track\" id=\"ticker-root\"><\/div>\n      <\/div>\n    <\/section>\n\n    <section class=\"section\" id=\"fotonews-section\">\n      <div class=\"section-head\">\n        <div>\n          <h2 data-i18n=\"fotonews\">Ultime FotoNews<\/h2>\n          <p data-i18n=\"fotonews_sub\">Gli scatti pi\u00f9 recenti dal club.<\/p>\n        <\/div>\n      <\/div>\n      <div class=\"filters\">\n        <select id=\"team-filter\" aria-label=\"Filtra per squadra\" data-i18n-aria=\"filter_team\"><option value=\"\" data-i18n=\"all_teams\">Tutte le squadre<\/option><\/select>\n        <button type=\"button\" id=\"reset-filter\" data-i18n=\"reset\">Reset<\/button>\n      <\/div>\n      <div class=\"photo-grid\" id=\"photo-grid\"><p style=\"color:var(--muted)\" data-i18n=\"loading_photos\">Caricamento foto\u2026<\/p><\/div>\n    <\/section>\n\n    <section class=\"section\" id=\"results-block\">\n      <div class=\"section-head\">\n        <div>\n          <h2 data-i18n=\"last_results\">Ultimi risultati<\/h2>\n          <p data-i18n=\"last_results_sub\">Le ultime 15 partite Avigliana Basket.<\/p>\n        <\/div>\n      <\/div>\n      <div class=\"results-wrap\">\n        <div class=\"results-track\" id=\"results-track\">\n          <div style=\"padding:1rem;color:var(--muted);font-weight:700\" data-i18n=\"loading_results\">Caricamento risultati\u2026<\/div>\n        <\/div>\n      <\/div>\n    <\/section>\n\n    <section class=\"section\" id=\"merchandising-section\">\n      <div class=\"band\">\n        <div class=\"band-bg\" aria-hidden=\"true\">\n          <img decoding=\"async\" crossorigin=\"anonymous\" src=\"https:\/\/www.aviglianabasket.it\/wp-content\/uploads\/2025\/08\/AA_MERCHANDISING.jpg\" alt=\"\" title=\"\">\n        <\/div>\n        <div class=\"band-copy\">\n          <div class=\"eyebrow js-stagione-attiva\">Stagione \u2026<\/div>\n          <h2 data-i18n=\"merch_official\">Merchandising ufficiale<\/h2>\n          <p data-i18n=\"merch_official_sub\">Presto online la nuova linea di abbigliamento Avigliana Basket.<\/p>\n          <button class=\"btn btn-ghost\" data-open=\"https:\/\/www.aviglianabasket.cloud\/AB-MERCH-ORDINI_SQL\" data-title-key=\"nav_merch\" data-i18n=\"merch_orders\">Vai agli ordini<\/button>\n        <\/div>\n      <\/div>\n    <\/section>\n\n    <section class=\"section safeguarding-section\">\n      <div class=\"safe-band\">\n        <div>\n          <h2>Safeguarding<\/h2>\n          <p data-i18n=\"safe_sub\">Tutela dei minori e ambiente sportivo sicuro: scopri policy e referenti del club.<\/p>\n        <\/div>\n        <button class=\"btn btn-primary\" data-open=\"https:\/\/www.aviglianabasket.it\/?page_id=433\" data-title-key=\"nav_safeguarding\" data-i18n=\"learn_more\">Approfondisci<\/button>\n      <\/div>\n    <\/section>\n\n    <section class=\"section\" id=\"sponsor-section\">\n      <div class=\"section-head\">\n        <div>\n          <h2>Sponsor<\/h2>\n          <p data-i18n=\"sponsor_sub\">Chi rende possibile la stagione.<\/p>\n        <\/div>\n      <\/div>\n      <div class=\"sponsors\">\n        <div class=\"sponsors-track\" id=\"sponsors-track\"><\/div>\n      <\/div>\n    <\/section>\n\n    <footer class=\"footer\">\n      <div>Avigliana Basket \u00b7 Powered by R.ROSSINO \u00b7 \u00a9 2026<\/div>\n      <nav>\n        <button type=\"button\" data-open=\"https:\/\/www.aviglianabasket.it\/?page_id=3\" data-title-key=\"nav_privacy\">Privacy<\/button>\n        <button type=\"button\" id=\"btn-cookie-policy\">Cookie<\/button>\n        <button type=\"button\" id=\"btn-cookie-settings\" data-i18n=\"cookie_settings\">Impostazioni cookie<\/button>\n      <\/nav>\n    <\/footer>\n    <\/div><!-- \/.sheet -->\n  <\/main>\n<\/div>\n\n<button type=\"button\" id=\"btn-to-top\" aria-label=\"Torna in cima\" title=\"Torna in cima\" data-i18n-aria=\"to_top_aria\" data-i18n-title=\"to_top_aria\">\n  <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" aria-hidden=\"true\">\n    <path d=\"M6 15l6-6 6 6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><\/path>\n  <\/svg>\n<\/button>\n\n<section id=\"page-overlay\" aria-hidden=\"true\">\n  <div class=\"overlay-bar\">\n    <button class=\"icon-btn\" id=\"btn-close-page\" aria-label=\"Chiudi pagina\" data-i18n-aria=\"close_page\">\n      <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><path d=\"M15 6l-6 6 6 6\"><\/path><\/svg>\n    <\/button>\n    <strong id=\"overlay-title\" data-i18n=\"page\">Pagina<\/strong>\n    <img decoding=\"async\" crossorigin=\"anonymous\" class=\"overlay-logo\" src=\"https:\/\/www.aviglianabasket.it\/wp-content\/uploads\/2026\/08\/LOGO_2027-NEW.png\" alt=\"Avigliana Basket\" title=\"\">\n    <button class=\"icon-btn\" id=\"btn-home-from-page\" aria-label=\"Home\">\n      <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><path d=\"M4 11l8-7 8 7v9a1 1 0 01-1 1h-5v-6H10v6H5a1 1 0 01-1-1v-9z\"><\/path><\/svg>\n    <\/button>\n  <\/div>\n  <iframe id=\"page-frame\" title=\"Contenuto pagina\" data-i18n-title-attr=\"page_content\"><\/iframe>\n<\/section>\n\n<div id=\"page-ripple\" aria-hidden=\"true\">\n  <div class=\"ripple-blast\"><\/div>\n  <div class=\"ripple-rings\" aria-hidden=\"true\">\n    <span class=\"ripple-ring\"><\/span>\n    <span class=\"ripple-ring\"><\/span>\n    <span class=\"ripple-ring\"><\/span>\n  <\/div>\n  <div class=\"ripple-mark\">\n    <div class=\"ripple-logo\">\n      <img decoding=\"async\" crossorigin=\"anonymous\" src=\"https:\/\/www.aviglianabasket.it\/wp-content\/uploads\/2026\/08\/LOGO_2027-NEW.png\" alt=\"\" title=\"\">\n    <\/div>\n    <p class=\"ripple-loading\"><span data-i18n=\"loading\">In caricamento<\/span><span class=\"dots\">&#8230;.<\/span><\/p>\n  <\/div>\n<\/div>\n\n<div id=\"cmdk\" hidden=\"\">\n  <div class=\"cmdk-panel\" role=\"dialog\" aria-label=\"Ricerca rapida\" data-i18n-aria=\"cmdk_aria\">\n    <input id=\"cmdk-input\" type=\"search\" placeholder=\"Cerca pagina, corso, area\u2026\" autocomplete=\"off\" data-i18n-placeholder=\"cmdk_placeholder\">\n    <div class=\"cmdk-list\" id=\"cmdk-list\"><\/div>\n  <\/div>\n<\/div>\n\n<div id=\"cookie-banner\" hidden=\"\" aria-hidden=\"true\" role=\"dialog\" aria-label=\"Consenso cookie\" data-i18n-aria=\"cookie_consent_aria\">\n  <h3 data-i18n=\"cookie_banner_title\">Privacy &amp; cookie<\/h3>\n  <p data-i18n=\"cookie_banner_body\">Usiamo cookie essenziali e, solo con il tuo consenso, servizi di preferenza (font, calendario, effetti). Puoi accettare tutti o solo quelli necessari.<\/p>\n  <div class=\"cookie-actions\">\n    <button class=\"btn btn-primary\" id=\"cookie-accept-all\" type=\"button\" data-i18n=\"cookie_accept_all\">Accetta tutti<\/button>\n    <button class=\"btn btn-ghost\" id=\"cookie-essential\" type=\"button\" data-i18n=\"cookie_essential\">Solo necessari<\/button>\n    <button class=\"btn btn-ghost\" id=\"cookie-open-policy\" type=\"button\">Policy<\/button>\n  <\/div>\n<\/div>\n\n<div class=\"modal\" id=\"cookie-modal\" hidden=\"\">\n  <div class=\"modal-card\">\n    <header>\n      <h3>Cookie Policy<\/h3>\n      <button class=\"icon-btn\" id=\"cookie-modal-close\" aria-label=\"Chiudi\" data-i18n-aria=\"close\">\u2715<\/button>\n    <\/header>\n    <p style=\"color:var(--muted);line-height:1.55;font-size:.9rem\" data-i18n-html=\"cookie_modal_body\">\n      <strong style=\"color:var(--text)\">Necessari:<\/strong> salvataggio della scelta consenso (<code>ab_cookie_consent_v1<\/code>).<br><br>\n      <strong style=\"color:var(--text)\">Con \u201cAccetta tutti\u201d:<\/strong> Google Fonts ed eventuali effetti UI avanzati.<br><br>\n      Puoi modificare la scelta in qualsiasi momento da \u201cImpostazioni cookie\u201d nel footer.\n    <\/p>\n  <\/div>\n<\/div>\n\n<div class=\"modal\" id=\"cal-print-modal\" hidden=\"\">\n  <div class=\"modal-card\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"cal-print-title\">\n    <header>\n      <h3 id=\"cal-print-title\" data-i18n=\"print_cal_title\">Stampa calendario<\/h3>\n      <button class=\"icon-btn\" id=\"cal-print-close\" type=\"button\" aria-label=\"Chiudi\" data-i18n-aria=\"close\">\u2715<\/button>\n    <\/header>\n    <p class=\"cal-print-hint\" data-i18n=\"print_cal_hint\">Periodo: tutte le squadre tra due date. Squadra: scegli una squadra e stampi il suo calendario.<\/p>\n    <div class=\"cal-print-modes\">\n      <button type=\"button\" id=\"cal-print-mode-period\" data-i18n=\"print_mode_period\">Periodo<\/button>\n      <button type=\"button\" id=\"cal-print-mode-team\" data-i18n=\"print_mode_team\">Squadra<\/button>\n    <\/div>\n    <label class=\"cal-print-field\" style=\"margin-bottom:.35rem\">\n      <span data-i18n=\"print_scope_label\">Incontri<\/span>\n    <\/label>\n    <div class=\"cal-print-modes cal-print-scope\" role=\"tablist\">\n      <button type=\"button\" id=\"cal-print-scope-all\" data-i18n=\"print_scope_all\">Tutti gli incontri<\/button>\n      <button type=\"button\" id=\"cal-print-scope-champ\" data-i18n=\"print_scope_champ\">Solo campionato<\/button>\n    <\/div>\n    <p class=\"cal-print-scope-note\" id=\"cal-print-scope-note\" hidden data-i18n=\"print_scope_note\">FIP, UISP, CSI ed EISI. Fuori torneo e amichevole.<\/p>\n    <div id=\"cal-print-period\">\n      <div class=\"cal-print-dates\">\n        <label class=\"cal-print-field\">\n          <span data-i18n=\"print_from\">Data da<\/span>\n          <input type=\"date\" id=\"cal-print-from\">\n        <\/label>\n        <label class=\"cal-print-field\">\n          <span data-i18n=\"print_to\">Data a<\/span>\n          <input type=\"date\" id=\"cal-print-to\">\n        <\/label>\n      <\/div>\n      <label class=\"cal-print-field\">\n        <span data-i18n=\"print_team_label\">Squadre<\/span>\n        <input id=\"cal-print-all-teams\" type=\"text\" value=\"TUTTE LE SQUADRE\" disabled>\n      <\/label>\n    <\/div>\n    <div id=\"cal-print-teams-wrap\" hidden=\"\">\n      <label class=\"cal-print-field\">\n        <span data-i18n=\"print_one_team\">Squadra<\/span>\n        <select id=\"cal-print-team\"><\/select>\n      <\/label>\n    <\/div>\n    <p class=\"cal-print-status\" id=\"cal-print-status\"><\/p>\n    <button type=\"button\" class=\"btn cal-print-go\" id=\"cal-print-go\" data-i18n=\"print_download\">Scarica PDF<\/button>\n  <\/div>\n<\/div>\n\n<div class=\"modal\" id=\"match-detail-modal\" hidden=\"\">\n  <div class=\"modal-card\">\n    <header>\n      <h3 id=\"m-title\" data-i18n=\"match_detail\">Dettaglio Match<\/h3>\n      <button class=\"icon-btn\" id=\"m-close\" aria-label=\"Chiudi\" data-i18n-aria=\"close\">\u2715<\/button>\n    <\/header>\n    <div id=\"m-body\"><\/div>\n  <\/div>\n<\/div>\n\n<div id=\"lightbox\" hidden=\"\">\n  <div>\n    <img id=\"lightbox-img\" alt=\"\">\n    <p id=\"lightbox-note\"><\/p>\n  <\/div>\n<\/div>\n\n<script>\n\/* Spotlight cursor on hero atmosphere *\/\n(() => {\n  const root = document.documentElement;\n  let raf = 0;\n  const onMove = (e) => {\n    cancelAnimationFrame(raf);\n    raf = requestAnimationFrame(() => {\n      root.style.setProperty('--mx', (e.clientX \/ window.innerWidth * 100).toFixed(2) + '%');\n      root.style.setProperty('--my', (e.clientY \/ window.innerHeight * 100).toFixed(2) + '%');\n    });\n  };\n  window.addEventListener('pointermove', onMove, { passive: true });\n})();\n<\/script>\n\n<script>\n(() => {\n  const WP = 'https:\/\/www.aviglianabasket.it';\n  const CLOUD = 'https:\/\/www.aviglianabasket.cloud';\n  const LOGO = 'https:\/\/www.aviglianabasket.it\/wp-content\/uploads\/2026\/08\/LOGO_2027-NEW.png';\n  function calendarPageUrl() {\n    if (location.protocol === 'file:') {\n      try { return new URL('calendario-ab.html', location.href).href; } catch (e) { return 'calendario-ab.html'; }\n    }\n    return CLOUD + '\/script\/calendario-ab.php';\n  }\n  \/** WordPress\/Elementor converte \"&\" in &#038;: costruire le query a runtime, senza \"&\" nel sorgente. *\/\n  function apiUrl(scriptPath, params) {\n    const base = String(scriptPath || '').indexOf('http') === 0\n      ? scriptPath\n      : (CLOUD + '\/' + String(scriptPath).replace(\/^\\\/\/, ''));\n    const u = new URL(base);\n    Object.keys(params || {}).forEach((k) => {\n      if (params[k] !== undefined && params[k] !== null) u.searchParams.set(k, String(params[k]));\n    });\n    return u.href;\n  }\n\n  const LANG_KEY = 'ab_home_lang';\n  let lang = (() => {\n    try {\n      const s = localStorage.getItem(LANG_KEY);\n      if (s === 'en' || s === 'it') return s;\n    } catch (e) {}\n    return 'it';\n  })();\n  let activeSeasonCode = null;\n  let cmdRoutes = [];\n\n  const I18N = {\n    it: {\n      menu: 'Menu', menu_aria: 'Apri menu', close_menu: 'Chiudi menu', close_page: 'Chiudi pagina',\n      skip_intro: 'Salta Intro',\n      hero_iscriviti: 'Iscriviti',\n      close: 'Chiudi', search_title: 'Cerca (Ctrl+K)', search_aria: 'Apri ricerca',\n      explore: 'Esplora', scroll_aria: 'Scorri in basso', page: 'Pagina', page_content: 'Contenuto pagina',\n      loading: 'In caricamento', marquee_welcome: 'Benvenuto nel tuo sito',\n      to_top_aria: 'Torna in cima',\n      season_prefix: 'Stagione', enter_field: 'Entra in campo',\n      enter_field_sub: 'Iscrizioni, portale, calendario, shop e community \u2014 un solo flusso.',\n      kicker_athletes: 'Atleti', reg_title: 'Iscriviti alla stagione',\n      reg_desc: 'Compila l\u2019iscrizione corsi online in pochi minuti.', reg_cta: 'Apri iscrizioni \u2192',\n      kicker_athlete_area: 'Area atleta', portal_title: 'Portale Atleta',\n      portal_desc: 'Documenti, visite e area personale.', portal_cta: 'Entra \u2192',\n      cal_title: 'Calendario & Live', cal_desc: 'Partite, orari e aggiornamenti.', open_cta: 'Apri \u2192',\n      merch_title: 'Merchandising', merch_desc: 'Abbigliamento e ordini ufficiali.', merch_cta: 'Vai allo shop \u2192',\n      survey_title: 'Sondaggi', survey_desc: 'La tua opinione conta.', survey_cta: 'Partecipa \u2192',\n      survey_thanks: 'Partecipa e aiutaci a migliorare \u2014 Grazie',\n      survey_count_one: '\u2014 {n} attivo', survey_count_many: '\u2014 {n} attivi',\n      survey_count_none: '\u2014 0 attivi',\n      diretta_title: 'Diretta', diretta_sub: 'Dal riscaldamento al fischio finale.',\n      diretta_warm: 'riscaldamento', diretta_q1: '1\u00b0 quarto', diretta_q2: '2\u00b0 quarto',\n      diretta_q3: '3\u00b0 quarto', diretta_q4: '4\u00b0 quarto', diretta_int: 'intervallo',\n      diretta_t1: '1\u00b0 tempo', diretta_t2: '2\u00b0 tempo', diretta_full: 'fine partita',\n      myfip_title: 'Istruzioni MyFIP', myfip_sub: 'Guide PDF per il tesseramento.',\n      myfip_minors: 'MyFIP Minorenni', myfip_minors_a: 'fino a 14 anni (2012\u20132014)',\n      myfip_minors_b: 'da 14 a 17 anni', myfip_adults: 'MyFIP Maggiorenni',\n      myfip_adults_desc: 'Atleti dai 18 anni', coming_soon_kicker: 'In arrivo',\n      coming_soon_cta: 'Presto online', download_cta: 'Scarica \u2192',\n      next7: 'Prossimi 7 giorni', next7_sub: 'Match timeline casa e trasferta.',\n      wx_note: 'Meteo {place}',\n      wx_note_fallback: 'Meteo {place} \u00b7 Avigliana non disponibile',\n      wx_clear: 'Sereno', wx_mainly: 'Poco nuvoloso', wx_partly: 'Parzialmente nuvoloso',\n      wx_cloud: 'Coperto', wx_fog: 'Nebbia', wx_drizzle: 'Pioggerella',\n      wx_rain: 'Pioggia', wx_snow: 'Neve', wx_storm: 'Temporale',\n      wx_rain_word: 'pioggia',\n      route_loading: 'Calcolo percorso\u2026',\n      route_drive: 'circa {km} dal centro di Avigliana \u00b7 circa {time} in auto',\n      route_approx: 'circa {km} dal centro di Avigliana \u00b7 circa {time} in auto (stima sul paese)',\n      route_straight: 'circa {km} in linea d\u2019aria dal centro di Avigliana',\n      print_cal: 'Stampa calendario', print_cal_title: 'Stampa calendario',\n      print_cal_hint: 'Periodo: tutte le squadre tra due date. Squadra: scegli una squadra e stampi il suo calendario.',\n      print_one_team: 'Squadra',\n      print_mode_period: 'Periodo', print_mode_team: 'Squadra',\n      print_scope_label: 'Incontri',\n      print_scope_all: 'Tutti gli incontri',\n      print_scope_champ: 'Solo campionato',\n      print_scope_note: 'FIP, UISP, CSI ed EISI. Fuori torneo e amichevole.',\n      print_from: 'Data da', print_to: 'Data a', print_team_label: 'Squadre',\n      print_all_teams: 'TUTTE LE SQUADRE', print_download: 'Scarica PDF',\n      print_preparing: 'Preparazione PDF\u2026', print_empty: 'Nessun incontro in questa selezione.',\n      print_err: 'Impossibile creare il PDF. Riprova.', print_pick_team: 'Seleziona almeno una squadra.',\n      print_other_gyms: 'Altri impianti', print_away_title: 'Trasferte',\n      print_col_day: 'Giorno', print_col_time: 'Ora', print_col_team: 'Squadra',\n      print_col_opp: 'Avversario', print_col_type: 'Tipo', print_col_venue: 'Impianto',\n      print_col_side: 'Campo', print_pdf_period: 'Calendario incontri',\n      print_pdf_team: 'Calendario squadra', print_matches: 'incontri',\n      side_home: 'Casa', side_away: 'Trasferta', day_more: '+{n}',\n      fotonews: 'Ultime FotoNews', fotonews_sub: 'Gli scatti pi\u00f9 recenti dal club.',\n      filter_team: 'Filtra per squadra', all_teams: 'Tutte le squadre', reset: 'Reset',\n      loading_photos: 'Caricamento foto\u2026', no_photos: 'Nessuna foto trovata.',\n      no_photos_err: 'Nessuna foto trovata o errore di connessione API.',\n      last_results: 'Ultimi risultati', last_results_sub: 'Le ultime 15 partite Avigliana Basket.',\n      loading_results: 'Caricamento risultati\u2026', no_results: 'Nessun risultato recente.',\n      results_err: 'Errore caricamento risultati.',\n      merch_official: 'Merchandising ufficiale',\n      merch_official_sub: 'Presto online la nuova linea di abbigliamento Avigliana Basket.',\n      merch_orders: 'Vai agli ordini', safe_sub: 'Tutela dei minori e ambiente sportivo sicuro: scopri policy e referenti del club.',\n      learn_more: 'Approfondisci', sponsor_sub: 'Chi rende possibile la stagione.',\n      cookie_settings: 'Impostazioni cookie', cookie_banner_title: 'Privacy & cookie',\n      cookie_banner_body: 'Usiamo cookie essenziali e, solo con il tuo consenso, servizi di preferenza (font, calendario, effetti). Puoi accettare tutti o solo quelli necessari.',\n      cookie_accept_all: 'Accetta tutti', cookie_essential: 'Solo necessari',\n      cookie_consent_aria: 'Consenso cookie',\n      next7_empty: 'Nessun incontro in programma nei prossimi 7 giorni.',\n      next7_day_empty: 'Nessun incontro in questo giorno.',\n      next7_loading: 'Caricamento incontri\u2026',\n      cookie_modal_body: '<strong style=\"color:var(--text)\">Necessari:<\/strong> salvataggio della scelta consenso (<code>ab_cookie_consent_v1<\/code>).<br><br><strong style=\"color:var(--text)\">Con \u201cAccetta tutti\u201d:<\/strong> Google Fonts ed eventuali effetti UI avanzati.<br><br>Puoi modificare la scelta in qualsiasi momento da \u201cImpostazioni cookie\u201d nel footer.',\n      match_detail: 'Dettaglio Match', cmdk_aria: 'Ricerca rapida',\n      cmdk_placeholder: 'Cerca pagina, corso, area\u2026', cmdk_empty: 'Nessun risultato',\n      nav_group_club: 'Societ\u00e0', nav_group_season: 'Stagione', nav_group_athletes: 'Atleti', nav_group_other: 'Altro',\n      nav_story: 'Storia', nav_info: 'Informazioni', nav_privacy: 'Privacy Policy',\n      nav_season: 'Stagione', nav_teams: 'Squadre', nav_calendar: 'Calendario',\n      nav_upcoming: 'Prossimi Incontri', nav_stats: 'Statistiche', nav_nba: 'Risultati NBA',\n      nav_news: 'News', nav_courses: 'Iscrizione Corsi', nav_portal: 'Portale Atleta',\n      nav_survey: 'Sondaggio', nav_request: 'Richiesta Info', nav_merch: 'Merchandising',\n      nav_sponsor: 'Sponsor', nav_reserved: 'Area Riservata', nav_safeguarding: 'Safeguarding',\n      nav_home: 'Home', nav_navigation: 'Navigazione',\n      status_win: 'VINTO', status_lose: 'PERSO', status_draw: 'PAREGGIO',\n      home: 'CASA', away: 'TRASFERTA', to_confirm: '[DA CONFERMARE]',\n      team: 'Squadra', opponent: 'Avversario', championship: 'Campionato',\n      photo_null: 'Nullo', photo_win: 'Vinto', photo_lose: 'Perso',\n    },\n    en: {\n      menu: 'Menu', menu_aria: 'Open menu', close_menu: 'Close menu', close_page: 'Close page',\n      skip_intro: 'Skip Intro',\n      hero_iscriviti: 'Sign up',\n      close: 'Close', search_title: 'Search (Ctrl+K)', search_aria: 'Open search',\n      explore: 'Explore', scroll_aria: 'Scroll down', page: 'Page', page_content: 'Page content',\n      loading: 'Loading', marquee_welcome: 'Welcome to your website',\n      to_top_aria: 'Back to top',\n      season_prefix: 'Season', enter_field: 'Get in the game',\n      enter_field_sub: 'Registration, athlete portal, schedule, shop and community \u2014 one flow.',\n      kicker_athletes: 'Athletes', reg_title: 'Register for the season',\n      reg_desc: 'Complete your online course registration in a few minutes.', reg_cta: 'Open registration \u2192',\n      kicker_athlete_area: 'Athlete area', portal_title: 'Athlete Portal',\n      portal_desc: 'Documents, medical checks and your personal area.', portal_cta: 'Enter \u2192',\n      cal_title: 'Schedule & Live', cal_desc: 'Games, times and updates.', open_cta: 'Open \u2192',\n      merch_title: 'Merchandising', merch_desc: 'Official apparel and orders.', merch_cta: 'Go to shop \u2192',\n      survey_title: 'Surveys', survey_desc: 'Your opinion matters.', survey_cta: 'Take part \u2192',\n      survey_thanks: 'Take part and help us improve \u2014 Thank you',\n      survey_count_one: '\u2014 {n} active', survey_count_many: '\u2014 {n} active',\n      survey_count_none: '\u2014 0 active',\n      diretta_title: 'Live', diretta_sub: 'From warm-up to the final whistle.',\n      diretta_warm: 'warm-up', diretta_q1: '1st quarter', diretta_q2: '2nd quarter',\n      diretta_q3: '3rd quarter', diretta_q4: '4th quarter', diretta_int: 'interval',\n      diretta_t1: '1st half', diretta_t2: '2nd half', diretta_full: 'full time',\n      myfip_title: 'MyFIP guides', myfip_sub: 'PDF guides for federation registration.',\n      myfip_minors: 'MyFIP Minors', myfip_minors_a: 'under 14 (2012\u20132014)',\n      myfip_minors_b: 'ages 14 to 17', myfip_adults: 'MyFIP Adults',\n      myfip_adults_desc: 'Athletes 18 and over', coming_soon_kicker: 'Coming soon',\n      coming_soon_cta: 'Coming soon', download_cta: 'Download \u2192',\n      next7: 'Next 7 days', next7_sub: 'Home and away match timeline.',\n      wx_note: 'Weather {place}',\n      wx_note_fallback: 'Weather {place} \u00b7 Avigliana unavailable',\n      wx_clear: 'Clear', wx_mainly: 'Mostly clear', wx_partly: 'Partly cloudy',\n      wx_cloud: 'Overcast', wx_fog: 'Fog', wx_drizzle: 'Drizzle',\n      wx_rain: 'Rain', wx_snow: 'Snow', wx_storm: 'Thunderstorm',\n      wx_rain_word: 'rain',\n      route_loading: 'Calculating route\u2026',\n      route_drive: 'about {km} from Avigliana centre \u00b7 about {time} by car',\n      route_approx: 'about {km} from Avigliana centre \u00b7 about {time} by car (town estimate)',\n      route_straight: 'about {km} as the crow flies from Avigliana centre',\n      print_cal: 'Print schedule', print_cal_title: 'Print schedule',\n      print_cal_hint: 'Period: every team between two dates. Team: pick one team and print its full schedule.',\n      print_one_team: 'Team',\n      print_mode_period: 'Period', print_mode_team: 'Team',\n      print_scope_label: 'Games',\n      print_scope_all: 'All games',\n      print_scope_champ: 'League only',\n      print_scope_note: 'FIP, UISP, CSI and EISI. Tournaments and friendlies stay out.',\n      print_from: 'From', print_to: 'To', print_team_label: 'Teams',\n      print_all_teams: 'ALL TEAMS', print_download: 'Download PDF',\n      print_preparing: 'Preparing PDF\u2026', print_empty: 'No games in this selection.',\n      print_err: 'Could not create the PDF. Try again.', print_pick_team: 'Select at least one team.',\n      print_other_gyms: 'Other venues', print_away_title: 'Away games',\n      print_col_day: 'Day', print_col_time: 'Time', print_col_team: 'Team',\n      print_col_opp: 'Opponent', print_col_type: 'Type', print_col_venue: 'Venue',\n      print_col_side: 'Court', print_pdf_period: 'Match schedule',\n      print_pdf_team: 'Team schedule', print_matches: 'games',\n      side_home: 'Home', side_away: 'Away', day_more: '+{n}',\n      next7_empty: 'No matches scheduled in the next 7 days.',\n      next7_day_empty: 'No matches on this day.',\n      next7_loading: 'Loading matches\u2026',\n      fotonews: 'Latest FotoNews', fotonews_sub: 'The latest shots from the club.',\n      filter_team: 'Filter by team', all_teams: 'All teams', reset: 'Reset',\n      loading_photos: 'Loading photos\u2026', no_photos: 'No photos found.',\n      no_photos_err: 'No photos found or API connection error.',\n      last_results: 'Latest results', last_results_sub: 'The last 15 Avigliana Basket games.',\n      loading_results: 'Loading results\u2026', no_results: 'No recent results.',\n      results_err: 'Error loading results.',\n      merch_official: 'Official merchandising',\n      merch_official_sub: 'The new Avigliana Basket apparel line is coming soon.',\n      merch_orders: 'Go to orders', safe_sub: 'Child protection and a safe sporting environment: club policies and contacts.',\n      learn_more: 'Learn more', sponsor_sub: 'Who makes the season possible.',\n      cookie_settings: 'Cookie settings', cookie_banner_title: 'Privacy & cookies',\n      cookie_banner_body: 'We use essential cookies and, only with your consent, preference services (fonts, calendar, effects). You can accept all or essentials only.',\n      cookie_accept_all: 'Accept all', cookie_essential: 'Essentials only',\n      cookie_consent_aria: 'Cookie consent',\n      cookie_modal_body: '<strong style=\"color:var(--text)\">Essential:<\/strong> storing your consent choice (<code>ab_cookie_consent_v1<\/code>).<br><br><strong style=\"color:var(--text)\">With \u201cAccept all\u201d:<\/strong> Google Fonts and optional advanced UI effects.<br><br>You can change your choice anytime from \u201cCookie settings\u201d in the footer.',\n      match_detail: 'Match detail', cmdk_aria: 'Quick search',\n      cmdk_placeholder: 'Search page, course, area\u2026', cmdk_empty: 'No results',\n      nav_group_club: 'Club', nav_group_season: 'Season', nav_group_athletes: 'Athletes', nav_group_other: 'More',\n      nav_story: 'History', nav_info: 'Information', nav_privacy: 'Privacy Policy',\n      nav_season: 'Season', nav_teams: 'Teams', nav_calendar: 'Schedule',\n      nav_upcoming: 'Upcoming games', nav_stats: 'Statistics', nav_nba: 'NBA results',\n      nav_news: 'News', nav_courses: 'Course registration', nav_portal: 'Athlete Portal',\n      nav_survey: 'Survey', nav_request: 'Request info', nav_merch: 'Merchandising',\n      nav_sponsor: 'Sponsors', nav_reserved: 'Members area', nav_safeguarding: 'Safeguarding',\n      nav_home: 'Home', nav_navigation: 'Navigation',\n      status_win: 'WON', status_lose: 'LOST', status_draw: 'DRAW',\n      home: 'HOME', away: 'AWAY', to_confirm: '[TO CONFIRM]',\n      team: 'Team', opponent: 'Opponent', championship: 'League',\n      photo_null: 'Draw', photo_win: 'Won', photo_lose: 'Lost',\n    }\n  };\n\n  function t(key) {\n    return (I18N[lang] && I18N[lang][key]) || I18N.it[key] || key;\n  }\n  function locale() {\n    return lang === 'en' ? 'en-GB' : 'it-IT';\n  }\n\n  const NAV = [\n    { groupKey: 'nav_group_club', items: [\n      { titleKey: 'nav_story', url: WP + '\/?page_id=254' },\n      { titleKey: 'nav_info', url: WP + '\/?page_id=274' },\n      { titleKey: 'nav_privacy', url: WP + '\/?page_id=3' },\n    ]},\n    { groupKey: 'nav_group_season', items: [\n      { titleKey: 'nav_season', url: WP + '\/?page_id=139' },\n      { titleKey: 'nav_teams', url: WP + '\/?page_id=179' },\n      { titleKey: 'nav_calendar', url: WP + '\/?page_id=2192' },\n      { titleKey: 'nav_upcoming', url: WP + '\/?page_id=107' },\n      { titleKey: 'nav_stats', url: WP + '\/?page_id=5473' },\n      { titleKey: 'nav_nba', url: WP + '\/?page_id=6555' },\n      { titleKey: 'nav_news', url: WP + '\/?page_id=151' },\n    ]},\n    { groupKey: 'nav_group_athletes', items: [\n      { titleKey: 'nav_courses', url: CLOUD + '\/ISCRIZIONI\/', external: true, tag: 'Hot' },\n      { titleKey: 'nav_portal', url: CLOUD + '\/PORTALE\/index.html', external: true },\n      { titleKey: 'nav_survey', url: CLOUD + '\/wp-content\/uploads\/ab_survey.html?v=20260806c', badge: true },\n      { titleKey: 'nav_request', url: WP + '\/?page_id=274' },\n    ]},\n    { groupKey: 'nav_group_other', items: [\n      { titleKey: 'nav_merch', url: CLOUD + '\/AB-MERCH-ORDINI_SQL' },\n      { titleKey: 'nav_sponsor', url: WP + '\/?page_id=454' },\n      { titleKey: 'nav_reserved', url: WP + '\/?page_id=427' },\n      { titleKey: 'nav_safeguarding', url: WP + '\/?page_id=433' },\n    ]},\n  ];\n\n  function buildCmdRoutes() {\n    cmdRoutes = [\n      { title: t('nav_home'), group: t('nav_navigation'), action: 'home' },\n      ...NAV.flatMap(g => g.items.map(i => ({\n        title: t(i.titleKey),\n        group: t(g.groupKey),\n        url: i.url,\n        external: !!i.external,\n      }))),\n    ];\n  }\n\n  function applyStaticI18n() {\n    document.documentElement.lang = lang;\n    document.querySelectorAll('[data-i18n]').forEach((el) => {\n      el.textContent = t(el.getAttribute('data-i18n'));\n    });\n    document.querySelectorAll('[data-i18n-html]').forEach((el) => {\n      el.innerHTML = t(el.getAttribute('data-i18n-html'));\n    });\n    document.querySelectorAll('[data-i18n-placeholder]').forEach((el) => {\n      el.setAttribute('placeholder', t(el.getAttribute('data-i18n-placeholder')));\n    });\n    document.querySelectorAll('[data-i18n-aria]').forEach((el) => {\n      el.setAttribute('aria-label', t(el.getAttribute('data-i18n-aria')));\n    });\n    document.querySelectorAll('[data-i18n-title]').forEach((el) => {\n      el.setAttribute('title', t(el.getAttribute('data-i18n-title')));\n    });\n    document.querySelectorAll('[data-i18n-title-attr]').forEach((el) => {\n      el.setAttribute('title', t(el.getAttribute('data-i18n-title-attr')));\n    });\n    document.querySelectorAll('[data-title-key]').forEach((el) => {\n      el.setAttribute('data-title', t(el.getAttribute('data-title-key')));\n    });\n  }\n\n  function buildMarquee() {\n    const track = document.getElementById('marquee-track');\n    if (!track) return;\n    const seasonLabel = activeSeasonCode\n      ? (t('season_prefix') + ' ' + activeSeasonCode)\n      : (t('season_prefix') + ' \u2026');\n    const unit = [\n      'Keep Pushing', 'Keep Winning', t('marquee_welcome'), 'Avigliana Basket', seasonLabel,\n    ];\n    const html = (arr) => arr.map((s, i) => {\n      const isSeason = s === seasonLabel || String(s).startsWith(t('season_prefix') + ' ');\n      return `<span${isSeason ? ' class=\"js-stagione-attiva\"' : ''}>${s}<\/span><span>\u00b7<\/span>`;\n    }).join('');\n    track.innerHTML = html(unit) + html(unit);\n  }\n\n  function applySeasonLabels() {\n    const cardEl = document.getElementById('iscrizioni-stagione-attiva');\n    const labelEls = document.querySelectorAll('.js-stagione-attiva');\n    if (activeSeasonCode) {\n      if (cardEl) cardEl.textContent = activeSeasonCode;\n      labelEls.forEach((n) => { n.textContent = t('season_prefix') + ' ' + activeSeasonCode; });\n    } else {\n      if (cardEl && (!cardEl.textContent || cardEl.textContent === '\u2026')) cardEl.textContent = '\u2026';\n      labelEls.forEach((n) => {\n        if (!n.textContent || n.textContent.includes('\u2026') || n.textContent.includes('\u2014')) {\n          n.textContent = t('season_prefix') + ' \u2026';\n        }\n      });\n    }\n  }\n\n  let allEvents = { home: [], away: [] };\n  let allPhotos = [];\n  let clubMatchEvents = [];\n  let calPrintMode = 'period';\n  let calPrintScope = 'all';\n  let calPrintBusy = false;\n\n  function setLang(next, opts) {\n    if (next !== 'it' && next !== 'en') return;\n    const reloadDynamic = !opts || opts.reloadDynamic !== false;\n    lang = next;\n    try { localStorage.setItem(LANG_KEY, lang); } catch (e) {}\n    document.querySelectorAll('.lang-switch button').forEach((btn) => {\n      const on = btn.getAttribute('data-lang') === lang;\n      btn.classList.toggle('is-active', on);\n      btn.setAttribute('aria-pressed', on ? 'true' : 'false');\n    });\n    applyStaticI18n();\n    buildMarquee();\n    applySeasonLabels();\n    applySurveyStation();\n    buildNav();\n    applySurveyStation();\n    buildCmdRoutes();\n    if (!reloadDynamic) return;\n    if (allPhotos.length) {\n      fillTeamFilter(allPhotos);\n      const sel = document.getElementById('team-filter');\n      const v = sel ? sel.value : '';\n      renderPhotos(v ? allPhotos.filter(p => p.nome_squadra === v) : allPhotos);\n    }\n    if (allEvents.home.length || allEvents.away.length || weekWeather) renderTimeline();\n    loadResults();\n    if (lastNewsRaw) renderNewsTicker(lastNewsRaw);\n    else loadNews();\n    direttaDomKey = '';\n    paintDiretta(Date.now());\n  }\n\n  const SPONSORS_DATA = [\n    { file: 'https:\/\/www.aviglianabasket.it\/wp-content\/uploads\/2026\/08\/AZIMUT.jpg', url: 'https:\/\/azimutyachts.com\/it\/news-eventi\/news\/azimut-yachts-inaugura-la-nuova-sede-di-avigliana-firmata-amdl-circle\/' },\n    { file: 'tecnocasa.jpg', url: 'https:\/\/avigliana1.tecnocasa.it\/avigliana\/avigliana\/' },\n    { file: 'SPONSOR_Bluenergy-300x300.jpg', url: 'https:\/\/www.bluenergygroup.it\/' },\n    { file: 'SPONSOR_BORDONE-300x300.jpg', url: 'https:\/\/bordoneallestimenti.it\/' },\n    { file: 'SPONSOR_GERVASI-300x300.jpg', url: 'https:\/\/www.gervasiecologica.com\/' },\n    { file: 'SPONSOR_GIUGLAR-300x300.jpg', url: 'https:\/\/www.giuglar.com\/it\/' },\n    { file: 'SPONSOR_LACROTA-300x300.jpg', url: 'https:\/\/www.tripadvisor.it\/LocationPhotoDirectLink-g194679-d3197836-i113588243-La_Crota-Avigliana_Province_of_Turin_Piedmont.html' },\n    { file: 'SPONSOR_LAROSA-300x300.jpg', url: 'https:\/\/www.larosarossaristorantebar.it\/' },\n    { file: 'SPONSOR_LCN-300x300.jpg', url: 'https:\/\/www.lavanderialcn.it\/' },\n    { file: 'SPONSOR_MASOERO-300x300.jpg', url: 'https:\/\/otticamasoero.com\/' },\n    { file: 'SPONSOR_Medical_LAB-300x300.jpg', url: 'https:\/\/www.medicallab.it\/contatti\/medical-lab-avigliana\/' },\n    { file: 'SPONSOR_Prometeus-300x300.jpg', url: 'https:\/\/www.facebook.com\/studioprometheus\/' },\n    { file: 'SPONSOR_SIKONS-300x300.jpg', url: 'https:\/\/www.sikons.it\/Default.aspx' }\n  ];\n\n  \/* ---------- Intro video: finisce prima di mostrare il resto ---------- *\/\n  function easeOutCubic(t) {\n    return 1 - Math.pow(1 - t, 3);\n  }\n\n  function initHeroLogo() {\n    const hero = document.getElementById('home-hero');\n    const logo = document.getElementById('hero-logo-group');\n    const logoImg = document.getElementById('hero-logo');\n    const timbroImg = document.getElementById('hero-timbro');\n    const sheet = document.getElementById('home-sheet');\n    const copy = hero && hero.querySelector('.hero-copy');\n    const cue = hero && hero.querySelector('.scroll-cue');\n    if (!hero || !logo) return;\n\n    const reduce = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n    const BASE_OPACITY = 0.38;\n    const BASE_TIMBRO_OPACITY = window.innerWidth <= 768 ? 0.58 : 0.30;\n    const START_SCALE = 0.22;\n    const GROW_MS = 1400;\n    let growStart = performance.now();\n    let growDone = reduce;\n    let raf = 0;\n\n    let heroH = Math.max(1, hero.offsetHeight || 1);\n\n    const coverProgress = () => {\n      if (!sheet || reduce) return 0;\n      return Math.min(1, Math.max(0, window.scrollY \/ heroH));\n    };\n\n    const paint = (now) => {\n      raf = 0;\n      let grow = 1;\n      if (!growDone) {\n        grow = Math.min(1, (now - growStart) \/ GROW_MS);\n        if (grow >= 1) growDone = true;\n      }\n      const growE = reduce ? 1 : easeOutCubic(grow);\n      const cover = coverProgress();\n      document.documentElement.style.setProperty('--book-cover', cover.toFixed(4));\n      hero.classList.toggle('is-covered', cover >= 0.985);\n\n      const travel = cover * heroH * 0.28;\n      const scale = (START_SCALE + (1 - START_SCALE) * growE) * (1 - cover * 0.1);\n      const logoOpacity = BASE_OPACITY * growE * (1 - cover * 0.95);\n      const timbroOpacity = BASE_TIMBRO_OPACITY * growE * (1 - cover * 0.95);\n\n      logo.style.transform = `translate3d(0, ${-travel}px, 0) scale(${scale})`;\n      logo.style.opacity = '1';\n      if (logoImg) logoImg.style.opacity = String(Math.max(0, logoOpacity));\n      if (timbroImg) timbroImg.style.opacity = String(Math.max(0, timbroOpacity));\n\n      \/* Scritta Avigliana Basket: sale; a met\u00e0~basso hero gi\u00e0 quasi trasparente *\/\n      if (copy) {\n        const copyTravel = cover * heroH * 1.05;\n        const copyScale = 1 - cover * 0.08;\n        const fadeStart = 0.30;\n        const fadeEnd = 0.68; \/* qui ~opacit\u00e0 0 (altezza ENTRA IN CAMPO) *\/\n        let copyOpacity = 1;\n        if (cover >= fadeEnd) copyOpacity = 0;\n        else if (cover > fadeStart) copyOpacity = 1 - (cover - fadeStart) \/ (fadeEnd - fadeStart);\n        copy.style.transform = `translate3d(0, ${-copyTravel}px, 0) scale(${copyScale})`;\n        copy.style.opacity = String(copyOpacity);\n      }\n      if (cue) {\n        cue.style.opacity = String(Math.max(0, 1 - cover * 1.6));\n      }\n\n      if (!growDone) raf = requestAnimationFrame(paint);\n    };\n\n    const onScroll = () => {\n      if (raf) return;\n      raf = requestAnimationFrame(paint);\n    };\n\n    const onResize = () => {\n      heroH = Math.max(1, hero.offsetHeight || 1);\n      onScroll();\n    };\n\n    if (reduce) {\n      logo.style.transform = 'translate3d(0,0,0) scale(1)';\n      logo.style.opacity = '1';\n      if (logoImg) logoImg.style.opacity = String(BASE_OPACITY);\n      if (timbroImg) timbroImg.style.opacity = String(BASE_TIMBRO_OPACITY);\n      if (copy) {\n        copy.style.transform = 'translate3d(0,0,0) scale(1)';\n        copy.style.opacity = '1';\n      }\n      if (cue) cue.style.opacity = '1';\n      hero.classList.remove('is-covered');\n    } else {\n      growStart = performance.now();\n      raf = requestAnimationFrame(paint);\n    }\n\n    window.addEventListener('scroll', onScroll, { passive: true });\n    window.addEventListener('resize', onResize, { passive: true });\n    onScroll();\n  }\n\n  function initMotion() {\n    const reduce = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n    const targets = document.querySelectorAll('#home-sheet > .section, main > .section');\n    if (reduce) {\n      targets.forEach(el => el.classList.add('reveal', 'is-in'));\n      return;\n    }\n    const seen = new Set();\n    const io = new IntersectionObserver((entries) => {\n      entries.forEach((entry) => {\n        if (!entry.isIntersecting || seen.has(entry.target)) return;\n        seen.add(entry.target);\n        entry.target.classList.add('is-in');\n        io.unobserve(entry.target);\n      });\n    }, { threshold: 0.14, rootMargin: '0px 0px -6% 0px' });\n    targets.forEach((el) => {\n      if (seen.has(el)) return;\n      el.classList.add('reveal');\n      io.observe(el);\n    });\n  }\n\n  function finishIntro() {\n    if (document.body.classList.contains('intro-done')) return;\n    const intro = document.getElementById('intro');\n    document.body.classList.add('intro-done');\n    if (intro) {\n      intro.classList.add('is-done');\n      setTimeout(() => intro.remove(), 560);\n    }\n    maybeShowCookies();\n    requestAnimationFrame(() => {\n      initHeroLogo();\n      initMotion();\n    });\n  }\n\n  function runIntro() {\n    const intro = document.getElementById('intro');\n    if (!intro) { finishIntro(); return; }\n\n    const skipBtn = document.getElementById('btn-skip-intro');\n    let finished = false;\n    let timer = null;\n\n    const done = () => {\n      if (finished) return;\n      finished = true;\n      if (timer) clearTimeout(timer);\n      finishIntro();\n    };\n\n    if (skipBtn) {\n      skipBtn.addEventListener('click', (e) => {\n        e.preventDefault();\n        done();\n      });\n    }\n\n    \/\/ Intro breve: foto (~1.3s) + zoom logo (~1.6s) + hold \u2192 home\n    timer = setTimeout(done, 3600);\n  }\n\n  function maybeShowCookies() {\n    if (!window.abCookieConsent.hasChoice()) {\n      setTimeout(() => window.abCookieConsent.openBanner(), 400);\n    }\n  }\n\n  \/* ---------- Nav ---------- *\/\n  function buildNav() {\n    const root = document.getElementById('nav-groups');\n    root.innerHTML = NAV.map(g => `\n      <div class=\"nav-group\">\n        <h3>${t(g.groupKey)}<\/h3>\n        <div class=\"nav-list\">\n          ${g.items.map(item => {\n            const title = t(item.titleKey);\n            return `\n            <button class=\"nav-link\" type=\"button\"\n              data-url=\"${item.url}\"\n              data-title=\"${title}\"\n              ${item.external ? 'data-external=\"1\"' : ''}>\n              <span>${title}<\/span>\n              <span style=\"display:flex;gap:.35rem;align-items:center\">\n                ${item.tag ? `<span class=\"tag\">${item.tag}<\/span>` : ''}\n                ${item.badge ? `<span class=\"badge-dot\" id=\"survey-active-badge\" hidden>0<\/span>` : ''}\n              <\/span>\n            <\/button>\n          `;\n          }).join('')}\n        <\/div>\n      <\/div>\n    `).join('');\n  }\n\n  function openNav() {\n    document.body.classList.add('nav-open');\n    document.getElementById('nav-scrim').hidden = false;\n    document.getElementById('btn-menu').setAttribute('aria-expanded', 'true');\n  }\n  function closeNav() {\n    document.body.classList.remove('nav-open');\n    document.getElementById('nav-scrim').hidden = true;\n    document.getElementById('btn-menu').setAttribute('aria-expanded', 'false');\n  }\n  function toggleNav() {\n    document.body.classList.contains('nav-open') ? closeNav() : openNav();\n  }\n\n  const RIPPLE_COVER_MS = 1100;\n  const RIPPLE_REVEAL_MS = 780;\n  const FRAME_LOAD_MAX_MS = 4500;\n  let pageBusy = false;\n\n  function wait(ms) { return new Promise(r => setTimeout(r, ms)); }\n\n  function bustSurveyCache(url) {\n    if (!url || !\/ab_survey\\.html\/i.test(url)) return url;\n    try {\n      const u = new URL(url, window.location.href);\n      u.searchParams.set('v', '20260806c');\n      \/\/ Ctrl+F5 sulla home non svuota la cache dell'iframe: forza URL nuovo ad ogni apertura\n      u.searchParams.set('_', String(Date.now()));\n      return u.toString();\n    } catch (e) {\n      return url + (url.indexOf('?') >= 0 ? '&' : '?') + 'v=20260806c&_=' + Date.now();\n    }\n  }\n\n  function loadFrame(frame, url) {\n    return new Promise((resolve) => {\n      let armed = false;\n      let done = false;\n      const finish = () => {\n        if (done) return;\n        done = true;\n        frame.removeEventListener('load', onLoad);\n        clearTimeout(timer);\n        resolve();\n      };\n      const onLoad = () => {\n        \/\/ ignora eventuali load intermedi (es. about:blank)\n        if (!armed) return;\n        finish();\n      };\n      const timer = setTimeout(finish, FRAME_LOAD_MAX_MS);\n      frame.addEventListener('load', onLoad);\n      frame.src = bustSurveyCache(url);\n      \/\/ arma dopo aver assegnato l'URL reale\n      armed = true;\n    });\n  }\n\n  async function rippleCover() {\n    const el = document.getElementById('page-ripple');\n    if (!el) return;\n    if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;\n    el.classList.remove('is-reveal', 'is-loaded');\n    el.classList.add('is-on');\n    \/* restart explode sequence \u2014 logo resta fino a fine load *\/\n    el.classList.remove('is-cover');\n    void el.offsetWidth;\n    el.classList.add('is-cover');\n    await wait(RIPPLE_COVER_MS);\n  }\n\n  async function rippleReveal() {\n    const el = document.getElementById('page-ripple');\n    if (!el) return;\n    if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) {\n      el.classList.remove('is-on', 'is-cover', 'is-reveal', 'is-loaded');\n      return;\n    }\n    \/* caricamento finito: logo esce, poi il cerchio si richiude *\/\n    el.classList.add('is-loaded');\n    await wait(280);\n    el.classList.remove('is-cover');\n    void el.offsetWidth;\n    el.classList.add('is-reveal');\n    await wait(RIPPLE_REVEAL_MS);\n    el.classList.remove('is-on', 'is-cover', 'is-reveal', 'is-loaded');\n  }\n\n  async function openPage(url, title) {\n    if (!url || pageBusy) return;\n    pageBusy = true;\n    closeNav();\n    closeCmdk();\n    const overlay = document.getElementById('page-overlay');\n    const frame = document.getElementById('page-frame');\n    try {\n      await rippleCover();\n      document.getElementById('overlay-title').textContent = title || t('page');\n      overlay.classList.add('open');\n      overlay.setAttribute('aria-hidden', 'false');\n      document.body.classList.add('page-open');\n      setDockActive(null);\n      \/\/ resta coperto dal cerchio finch\u00e9 l'iframe ha dipinto qualcosa\n      await loadFrame(frame, url);\n      await wait(80);\n      await rippleReveal();\n    } finally {\n      pageBusy = false;\n    }\n  }\n\n  async function showHome() {\n    if (pageBusy) return;\n    const overlay = document.getElementById('page-overlay');\n    const isOpen = overlay.classList.contains('open');\n    closeNav();\n    closeCmdk();\n    if (!isOpen) {\n      window.scrollTo({ top: 0, behavior: 'smooth' });\n      setDockActive('home');\n      return;\n    }\n    pageBusy = true;\n    try {\n      await rippleCover();\n      overlay.classList.remove('open');\n      overlay.setAttribute('aria-hidden', 'true');\n      document.body.classList.remove('page-open');\n      document.getElementById('page-frame').src = 'about:blank';\n      setDockActive('home');\n      await rippleReveal();\n      window.scrollTo({ top: 0, behavior: 'smooth' });\n    } finally {\n      pageBusy = false;\n    }\n  }\n\n  function blockedInFrame(url) {\n    try {\n      const target = new URL(url, location.href);\n      if (location.protocol !== 'file:' && target.origin === location.origin) return false;\n      return \/(^|\\.)aviglianabasket\\.cloud$\/i.test(target.hostname);\n    } catch (e) {\n      return false;\n    }\n  }\n\n  function handleOpen(el) {\n    const url = el.getAttribute('data-open') || el.getAttribute('data-url');\n    const titleKey = el.getAttribute('data-title-key');\n    const title = (titleKey ? t(titleKey) : null) || el.getAttribute('data-title') || t('page');\n    const external = el.getAttribute('data-external') === '1' || el.target === '_blank';\n    if (!url) return;\n    if (external || blockedInFrame(url) || \/ISCRIZIONI|PORTALE\\\/index\\.html\/i.test(url)) {\n      window.open(url, '_blank', 'noopener');\n      return;\n    }\n    openPage(url, title);\n  }\n\n  function setDockActive() {\n    \/* dock mobile rimosso *\/\n  }\n\n  \/* ---------- CmdK ---------- *\/\n  let cmdIndex = 0;\n  let cmdFiltered = [];\n  function openCmdk() {\n    const box = document.getElementById('cmdk');\n    box.hidden = false;\n    document.getElementById('cmdk-input').value = '';\n    cmdFiltered = cmdRoutes.slice();\n    cmdIndex = 0;\n    renderCmdk();\n    document.getElementById('cmdk-input').focus();\n  }\n  function closeCmdk() { document.getElementById('cmdk').hidden = true; }\n  function renderCmdk() {\n    const list = document.getElementById('cmdk-list');\n    list.innerHTML = cmdFiltered.map((r, i) => `\n      <button type=\"button\" class=\"cmdk-item ${i === cmdIndex ? 'is-active' : ''}\" data-idx=\"${i}\">\n        <span>${r.title}<\/span><small>${r.group}<\/small>\n      <\/button>\n    `).join('') || `<div style=\"padding:1rem;color:var(--muted)\">${t('cmdk_empty')}<\/div>`;\n  }\n  function runCmd(route) {\n    if (!route) return;\n    if (route.action === 'home') { showHome(); return; }\n    if (route.external || blockedInFrame(route.url)) { window.open(route.url, '_blank', 'noopener'); closeCmdk(); return; }\n    openPage(route.url, route.title);\n  }\n\n  \/* ---------- News ticker ---------- *\/\n  let lastNewsRaw = '';\n\n  \/** Traduzioni note dei messaggi da news.php (testo IT \u2192 EN). *\/\n  const NEWS_EN = {\n    'Sono aperte le iscrizioni per il Summer Sport Camp (25\/06 - 30\/07)':\n      'Registration is open for the Summer Sport Camp (25\/06 \u2013 30\/07)',\n  };\n\n  function translateNewsText(raw) {\n    const text = String(raw || '').trim();\n    if (!text || lang !== 'en') return text;\n    if (NEWS_EN[text]) return NEWS_EN[text];\n    const norm = text.replace(\/\\s+\/g, ' ').trim();\n    if (NEWS_EN[norm]) return NEWS_EN[norm];\n    \/* Fallback pattern comuni *\/\n    let out = text;\n    out = out.replace(\n      \/Sono aperte le iscrizioni per il Summer Sport Camp\\s*\\(([^)]+)\\)\/i,\n      'Registration is open for the Summer Sport Camp ($1)'\n    );\n    out = out.replace(\/Sono aperte le iscrizioni\/gi, 'Registration is open');\n    out = out.replace(\/per il \/gi, 'for the ');\n    out = out.replace(\/per la \/gi, 'for the ');\n    return out;\n  }\n\n  function renderNewsTicker(raw) {\n    const text = String(raw || '').trim();\n    if (!text) return;\n    lastNewsRaw = text;\n    const shown = translateNewsText(text);\n    const el = document.getElementById('news-ticker');\n    if (!el) return;\n    const chunk = `<span><strong>NEWS<\/strong> ${shown.replace(\/<\/g, '&lt;')} \u00b7&nbsp;<\/span>`;\n    el.innerHTML = chunk + chunk;\n  }\n\n  async function loadNews() {\n    try {\n      const raw = await fetch(apiUrl('news.php', { t: Date.now() })).then(r => r.text());\n      const text = (raw || '').trim();\n      if (!text) return;\n      renderNewsTicker(text);\n    } catch (e) {}\n  }\n\n  \/**\n   * Stagione attiva da tabella MySQL `seasons` (campo attiva = SI).\n   * Aggiorna card Iscrizioni, marquee e altri .js-stagione-attiva.\n   *\/\n  async function loadActiveSeasonLabel() {\n    const cardEl = document.getElementById('iscrizioni-stagione-attiva');\n    const labelEls = document.querySelectorAll('.js-stagione-attiva');\n    if (cardEl) cardEl.textContent = '\u2026';\n    labelEls.forEach((n) => { n.textContent = t('season_prefix') + ' \u2026'; });\n\n    const isActive = (s) => {\n      if (!s) return false;\n      const raw = s.attiva;\n      if (raw === true || raw === 1) return true;\n      const v = String(raw ?? '').trim().toUpperCase();\n      return v === '1' || v === 'SI' || v === 'S\u00cc' || v === 'TRUE' || v === 'YES';\n    };\n\n    const applyCode = (code) => {\n      const c = String(code || '').trim();\n      if (!c) return false;\n      activeSeasonCode = c;\n      if (cardEl) cardEl.textContent = c;\n      labelEls.forEach((n) => { n.textContent = t('season_prefix') + ' ' + c; });\n      return true;\n    };\n\n    \/\/ 1) Endpoint dedicato pubblico\n    try {\n      const r1 = await fetch(apiUrl('active_season.php', { t: Date.now() }), {\n        credentials: 'omit',\n        cache: 'no-store',\n      });\n      if (r1.ok) {\n        const j = await r1.json();\n        if (j && j.ok && applyCode(j.codice)) return;\n      }\n    } catch (e) {}\n\n    \/\/ 2) Fallback catalogo iscrizioni\n    try {\n      const r2 = await fetch(\n        apiUrl('api_iscrizioni.php', { action: 'read', table: 'seasons', t: Date.now() }),\n        { credentials: 'omit', cache: 'no-store' }\n      );\n      if (!r2.ok) throw new Error('HTTP ' + r2.status);\n      const data = await r2.json();\n      const rows = Array.isArray(data) ? data : [];\n      const active = rows.find(isActive);\n      if (applyCode(active?.codice)) return;\n      activeSeasonCode = null;\n      if (cardEl) cardEl.textContent = '\u2014';\n      labelEls.forEach((n) => { n.textContent = t('season_prefix') + ' \u2014'; });\n      console.warn('[home] Nessuna stagione attiva in seasons', rows);\n    } catch (e) {\n      activeSeasonCode = null;\n      if (cardEl) cardEl.textContent = '\u2014';\n      labelEls.forEach((n) => { n.textContent = t('season_prefix') + ' \u2014'; });\n      console.warn('[home] Lettura seasons fallita (CORS\/rete). Carica active_season.php sul cloud.', e);\n    }\n  }\n\n  \/* ---------- Diretta ----------\n     Durate indicative, non mostrate come orologio.\n     Seniores 90' (4\u00d722:30) + INT 15' tra 2\u00b0 e 3\u00b0 quarto.\n     Giovanili 80' (4\u00d720) + INT 15' tra 2\u00b0 e 3\u00b0 quarto.\n     Minibasket 65' (2\u00d732:30) + INT 15' tra i due tempi.\n     Riscaldamento da \u221215'. Fine partita 10' dopo l\u2019ultimo segmento.\n     Fonte: stessi incontri del calendario (CAL_Matches). *\/\n  const DIRETTA_PHASE = {\n    RISC: 'diretta_warm',\n    Q1: 'diretta_q1', Q2: 'diretta_q2', Q3: 'diretta_q3', Q4: 'diretta_q4',\n    INT: 'diretta_int', T1: 'diretta_t1', T2: 'diretta_t2', FINE: 'diretta_full',\n  };\n  const DIRETTA_MARK = {\n    RISC: 'RISC', Q1: 'Q1', Q2: 'Q2', Q3: 'Q3', Q4: 'Q4',\n    INT: 'INT', T1: '1\u00b0 T', T2: '2\u00b0 T', FINE: 'FINE',\n  };\n  const DIRETTA_STRUCT = {\n    seniores: [\n      ['RISC', -15, 0], ['Q1', 0, 22.5], ['Q2', 22.5, 45], ['INT', 45, 60],\n      ['Q3', 60, 82.5], ['Q4', 82.5, 105], ['FINE', 105, 115],\n    ],\n    giovanili: [\n      ['RISC', -15, 0], ['Q1', 0, 20], ['Q2', 20, 40], ['INT', 40, 55],\n      ['Q3', 55, 75], ['Q4', 75, 95], ['FINE', 95, 105],\n    ],\n    minibasket: [\n      ['RISC', -15, 0], ['T1', 0, 32.5], ['INT', 32.5, 47.5],\n      ['T2', 47.5, 80], ['FINE', 80, 90],\n    ],\n  };\n  let direttaCache = [];\n  let direttaDomKey = '';\n\n  function direttaKind(ev) {\n    const team = String((ev && ev.team) || '');\n    const cat = [ev && ev.raggruppamento, ev && ev.categoria, ev && ev.tipo].filter(Boolean).join(' ');\n    const blob = `${cat} ${team}`;\n    if (\/mini|aquilott|scoiattol|gazzell\/i.test(blob)) return 'minibasket';\n    if (\/under|\\bu1[3-9]\\b|\\bu20\\b\/i.test(team) || \/giovan\/i.test(blob)) return 'giovanili';\n    if (\/senior\/i.test(blob)) return 'seniores';\n    if (\/\\bc\\s*(femminile|maschile)\\b|serie\\s*[a-d]\/i.test(blob)) return 'seniores';\n    return 'giovanili';\n  }\n  function segFamily(id) {\n    if (id === 'RISC') return 'risc';\n    if (id === 'INT') return 'int';\n    if (id === 'FINE') return 'fine';\n    return 'play';\n  }\n  function shortVenue(luogo) {\n    const s = String(luogo || '').replace(\/\\s+\/g, ' ').trim();\n    if (!s) return '';\n    if (\/avigliana\/i.test(s)) return 'PalaAvigliana';\n    const parts = s.split(' - ').map((p) => p.trim()).filter(Boolean);\n    let city = parts.length ? parts[parts.length - 1] : s;\n    if (\/^[A-Za-z]{2}$\/.test(city) && parts.length > 1) city = parts[parts.length - 2];\n    return city.replace(\/\\s*\\([A-Za-z]{2}\\)\\s*$\/, '').trim() || s;\n  }\n  function segmentWidths(structure) {\n    const span = structure[structure.length - 1][2] - structure[0][1];\n    const widths = structure.map(([, a, b]) => ((b - a) \/ span) * 100);\n    const head = widths.slice(0, -1).reduce((sum, n) => sum + n, 0);\n    widths[widths.length - 1] = 100 - head;\n    return widths;\n  }\n  function ballMarkup() {\n    return `<svg class=\"court-ball\" viewBox=\"0 0 32 32\" aria-hidden=\"true\"><circle cx=\"16\" cy=\"16\" r=\"14.2\" fill=\"#ef6a1a\" stroke=\"#2a1206\" stroke-width=\"1.2\"\/><path d=\"M16 2.2c3.2 5.2 3.2 22.4 0 27.6M16 2.2c-3.2 5.2-3.2 22.4 0 27.6M2.2 16h27.6\" fill=\"none\" stroke=\"#2a1206\" stroke-width=\"1.25\"\/><\/svg>`;\n  }\n  function squadTag(team) {\n    const s = String(team || '');\n    const age = s.match(\/under\\s*([0-9]{1,2})\/i) || s.match(\/\\bu\\s*([0-9]{1,2})\\b\/i);\n    if (age) {\n      const side = \/femm\/i.test(s) ? 'F' : (\/masch\/i.test(s) ? 'M' : '');\n      return 'U' + age[1] + side;\n    }\n    const letter = (s.match(\/\\b([ab])\\b\/i) || [])[1];\n    const suf = letter ? letter.toUpperCase() : '';\n    if (\/aquilott\/i.test(s)) return 'AQU' + suf;\n    if (\/scoiattol\/i.test(s)) return 'SCO' + suf;\n    if (\/gazzell\/i.test(s)) return 'GAZ' + suf;\n    if (\/\\bc\\b\/i.test(s) && \/femm\/i.test(s)) return 'CF';\n    if (\/\\bc\\b\/i.test(s) && \/masch\/i.test(s)) return 'CM';\n    return '';\n  }\n  function shortOpponent(name) {\n    let s = String(name || '').replace(\/\\s+\/g, ' ').trim();\n    s = s.replace(\/^(?:a\\.?\\s*,?\\s*s\\.?\\s*d\\.?|a\\.?\\s*,?\\s*d\\.?|g\\.?\\s*s\\.?\\s*d\\.?|s\\.?\\s*s\\.?\\s*d\\.?|pol\\.?|b\\.?\\s*c\\.?)\\s*[,.]?\\s*\/i, '');\n    s = s.replace(\/^a\\s*,\\s*d\\s*,?\\s*\/i, '');\n    s = s.replace(\/\\b(basket(?:ball)?)\\b\/ig, ' ');\n    s = s.replace(\/[.,]+\/g, ' ').replace(\/\\s+\/g, ' ').trim();\n    if (s.length > 16) s = s.split(' ').filter((w) => w.length > 1).slice(0, 2).join(' ');\n    return s || String(name || '').trim();\n  }\n  function titleMarkup(m) {\n    const us = `<span class=\"diretta-us\">Avigliana<\/span>${m.tag ? ` <span class=\"diretta-tag\">${hx(m.tag)}<\/span>` : ''}`;\n    const opp = `<span class=\"diretta-opp\">${hx(m.oppShort)}<\/span>`;\n    const vs = `<span class=\"diretta-vs\">vs<\/span>`;\n    return m.home ? `${us} ${vs} ${opp}` : `${opp} ${vs} ${us}`;\n  }\n  function eventToDiretta(ev) {\n    if (!ev || !ev.start || Number.isNaN(ev.start.getTime())) return null;\n    const team = ev.team || '';\n    const opp = ev.opp || '';\n    if (!team && !opp) return null;\n    const kind = direttaKind(ev);\n    const home = ev.type === 'HOME';\n    const tag = squadTag(team);\n    const oppShort = shortOpponent(opp);\n    const hh = String(ev.start.getHours()).padStart(2, '0');\n    const mm = String(ev.start.getMinutes()).padStart(2, '0');\n    const spoken = home\n      ? `Avigliana${tag ? ' ' + tag : ''} vs ${oppShort}`\n      : `${oppShort} vs Avigliana${tag ? ' ' + tag : ''}`;\n    return {\n      id: `${ev.dateKey || ''}|${hh}:${mm}|${team}|${opp}`,\n      kind,\n      kicker: kind === 'seniores' ? 'SENIORES' : (kind === 'minibasket' ? 'MINIBASKET' : 'GIOVANILI'),\n      title: spoken,\n      home,\n      tag,\n      oppShort,\n      venue: shortVenue(ev.location),\n      time: ev.time || `${hh}:${mm}`,\n      startMs: ev.start.getTime(),\n      structure: DIRETTA_STRUCT[kind],\n    };\n  }\n  function renderDirettaCard(m, index) {\n    const widths = segmentWidths(m.structure);\n    const segs = m.structure.map(([id], i) => {\n      const family = segFamily(id);\n      return `<div class=\"court-seg is-${family} is-wait\" style=\"flex:0 0 ${widths[i]}%\"><span class=\"court-seg-fill\"><\/span><\/div>`;\n    }).join('');\n    const labels = m.structure.map(([id], i) => {\n      const extra = id === 'FINE' ? 'is-fine-label' : (id === 'INT' ? 'is-int-label' : '');\n      return `<span class=\"${extra}\" style=\"flex:0 0 ${widths[i]}%\">${DIRETTA_MARK[id] || id}<\/span>`;\n    }).join('');\n    const where = [m.venue, m.time].filter(Boolean).join(' \u00b7 ');\n    const n = String(index + 1).padStart(2, '0');\n    return `<article class=\"diretta-card\" data-n=\"${n}\" data-id=\"${hx(m.id)}\">\n      <div class=\"diretta-kicker\">${hx(m.kicker)}<\/div>\n      <h3>${titleMarkup(m)}<\/h3>\n      <p class=\"diretta-meta\">${where ? hx(where) + ' \u00b7 ' : ''}<span class=\"diretta-phase\"><\/span><\/p>\n      <div class=\"court\"><div class=\"court-stage\"><div class=\"court-rail\">${segs}<\/div><span class=\"court-trail\"><\/span>${ballMarkup()}<\/div><div class=\"court-labels\">${labels}<\/div><\/div>\n    <\/article>`;\n  }\n  function updateDirettaCard(el, m, elapsed) {\n    const structure = m.structure;\n    const winStart = structure[0][1];\n    const winEnd = structure[structure.length - 1][2];\n    const pct = Math.max(0, Math.min(100, ((elapsed - winStart) \/ (winEnd - winStart)) * 100));\n    const ball = el.querySelector('.court-ball');\n    if (ball) ball.style.left = `clamp(11px, ${pct}%, calc(100% - 11px))`;\n    const trail = el.querySelector('.court-trail');\n    if (trail) trail.style.width = pct + '%';\n    let phaseId = structure[0][0];\n    el.querySelectorAll('.court-seg').forEach((seg, i) => {\n      const [id, a, b] = structure[i];\n      let inner = 0;\n      let state = 'wait';\n      if (elapsed >= b) { inner = 100; state = 'done'; }\n      else if (elapsed >= a) { inner = ((elapsed - a) \/ (b - a)) * 100; state = 'now'; phaseId = id; }\n      seg.classList.remove('is-done', 'is-now', 'is-wait');\n      seg.classList.add('is-' + state);\n      const fill = seg.querySelector('.court-seg-fill');\n      if (fill) fill.style.width = inner + '%';\n    });\n    el.querySelectorAll('.court-labels span').forEach((lb, i) => {\n      lb.classList.toggle('is-now', structure[i][0] === phaseId);\n    });\n    const phase = t(DIRETTA_PHASE[phaseId] || 'diretta_warm');\n    const phaseEl = el.querySelector('.diretta-phase');\n    if (phaseEl && phaseEl.textContent !== phase) phaseEl.textContent = phase;\n    el.classList.toggle('is-fine', phaseId === 'FINE');\n    el.classList.toggle('is-warm', phaseId === 'RISC');\n    el.classList.toggle('is-live', phaseId !== 'FINE' && phaseId !== 'RISC');\n    const label = `${m.title} \u2014 ${phase}`;\n    if (el.getAttribute('aria-label') !== label) el.setAttribute('aria-label', label);\n  }\n  function syncDirettaFromClub() {\n    direttaCache = (clubMatchEvents || []).map(eventToDiretta).filter(Boolean);\n    direttaCache.sort((a, b) => a.startMs - b.startMs);\n    paintDiretta(Date.now());\n  }\n  function paintDiretta(now) {\n    const block = document.getElementById('diretta-block');\n    const list = document.getElementById('diretta-list');\n    if (!block || !list) return;\n    const visible = [];\n    direttaCache.forEach((m) => {\n      const elapsed = (now - m.startMs) \/ 60000;\n      const open = m.structure[0][1];\n      const close = m.structure[m.structure.length - 1][2];\n      if (elapsed >= open && elapsed < close) visible.push({ m, elapsed });\n    });\n    if (!visible.length) {\n      block.hidden = true;\n      if (direttaDomKey) { list.innerHTML = ''; direttaDomKey = ''; }\n      return;\n    }\n    block.hidden = false;\n    const key = lang + '|' + visible.map((v) => v.m.id).join('|');\n    if (key !== direttaDomKey) {\n      list.innerHTML = visible.map((v, i) => renderDirettaCard(v.m, i)).join('');\n      direttaDomKey = key;\n    }\n    visible.forEach((v, i) => {\n      const el = list.children[i];\n      if (el) updateDirettaCard(el, v.m, v.elapsed);\n    });\n  }\n  async function refreshDirettaMatches() {\n    try {\n      clubMatchEvents = await fetchClubMatches();\n      syncDirettaFromClub();\n    } catch (e) {}\n  }\n\n  \/* ---------- Match timeline (CAL_Matches gestionale) ---------- *\/\n  let selectedDayKey = null;\n  let weekWeather = null;\n\n  const WX_SPOTS = [\n    { place: 'Avigliana', lat: 45.0806, lon: 7.3961 },\n    { place: 'Torino', lat: 45.0703, lon: 7.6869 },\n  ];\n  const WX_SVG = {\n    clear: '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"><circle cx=\"12\" cy=\"12\" r=\"3.3\"\/><path d=\"M12 3.1v2M12 18.9v2M3.1 12h2M18.9 12h2M5.5 5.5l1.4 1.4M17.1 17.1l1.4 1.4M18.5 5.5l-1.4 1.4M6.9 17.1l-1.4 1.4\"\/><\/svg>',\n    partly: '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M7.2 17.8h9.4a3.3 3.3 0 0 0 .4-6.6 4.6 4.6 0 0 0-8.8 1.3 2.8 2.8 0 0 0-1 5.3z\"\/><path d=\"M16.2 5.2v1.6M16.2 10.2v1.2M13.2 8h1.6M18.2 8h1.6M14.2 6.1l1 .9M18.2 9.9l1 .9M18.2 6.1l-1 .9\"\/><\/svg>',\n    cloud: '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M7.2 18h9.6a3.7 3.7 0 0 0 .5-7.3 5.1 5.1 0 0 0-9.8 1.5A3.1 3.1 0 0 0 7.2 18z\"\/><\/svg>',\n    fog: '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"><path d=\"M7 10.2h10.2a3.2 3.2 0 0 0 .3-6.4 4.4 4.4 0 0 0-8.4 1.2A2.7 2.7 0 0 0 7 10.2z\"\/><path d=\"M5 14.2h14M6.5 17.4h11\"\/><\/svg>',\n    rain: '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M7 13.2h10a3.4 3.4 0 0 0 .4-6.7 4.7 4.7 0 0 0-9 1.3A2.9 2.9 0 0 0 7 13.2z\"\/><path d=\"M9 16.2l-.7 2.2M12.2 16.2l-.7 2.2M15.4 16.2l-.7 2.2\"\/><\/svg>',\n    snow: '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"><path d=\"M7 12.2h10a3.3 3.3 0 0 0 .4-6.5 4.5 4.5 0 0 0-8.6 1.2A2.8 2.8 0 0 0 7 12.2z\"\/><path d=\"M9 16.4v2.4M8 17.6h2M12.2 15.8v3.2M11.1 17.4h2.2M15.2 16.4v2.4M14.2 17.6h2\"\/><\/svg>',\n    storm: '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M7 13h9.6a3.3 3.3 0 0 0 .4-6.5 4.6 4.6 0 0 0-8.7 1.3A2.8 2.8 0 0 0 7 13z\"\/><path d=\"M11.2 14.2l-1.6 3.2h2.4l-1.5 3.4\"\/><\/svg>',\n  };\n\n  function wxKind(code) {\n    const c = Number(code);\n    if (c === 0) return 'clear';\n    if (c === 1) return 'mainly';\n    if (c === 2) return 'partly';\n    if (c === 3) return 'cloud';\n    if (c === 45 || c === 48) return 'fog';\n    if (c >= 51 && c <= 57) return 'drizzle';\n    if ((c >= 61 && c <= 67) || (c >= 80 && c <= 82)) return 'rain';\n    if ((c >= 71 && c <= 77) || c === 85 || c === 86) return 'snow';\n    if (c >= 95) return 'storm';\n    return 'cloud';\n  }\n\n  function wxIcon(kind) {\n    if (kind === 'mainly') return WX_SVG.clear;\n    if (kind === 'drizzle') return WX_SVG.rain;\n    return WX_SVG[kind] || WX_SVG.cloud;\n  }\n\n  function paintWeekWeatherNote() {\n    const note = document.getElementById('week-wx-note');\n    if (!note) return;\n    if (!weekWeather) {\n      note.hidden = true;\n      note.textContent = '';\n      return;\n    }\n    const tpl = weekWeather.fallback ? t('wx_note_fallback') : t('wx_note');\n    note.textContent = tpl.replace('{place}', weekWeather.place);\n    note.hidden = false;\n  }\n\n  function dayWeatherHtml(key) {\n    const wx = weekWeather && weekWeather.byDate[key];\n    if (!wx) return '';\n    const kind = wxKind(wx.code);\n    const cond = t('wx_' + kind);\n    const tip = `${cond} \u00b7 ${weekWeather.place} \u00b7 max ${wx.max}\u00b0 min ${wx.min}\u00b0 \u00b7 ${t('wx_rain_word')} ${wx.pop}%`;\n    return `<span class=\"day-wx is-${kind}\" title=\"${hx(tip)}\"><span class=\"wx-ico\">${wxIcon(kind)}<\/span><span class=\"wx-range\"><span class=\"wx-max\">${wx.max}\u00b0<\/span><span class=\"wx-min\">${wx.min}\u00b0<\/span><\/span><\/span>`;\n  }\n\n  async function fetchSpotForecast(spot) {\n    const params = new URLSearchParams({\n      latitude: String(spot.lat),\n      longitude: String(spot.lon),\n      daily: 'weather_code,temperature_2m_max,temperature_2m_min,precipitation_probability_max',\n      timezone: 'Europe\/Rome',\n      forecast_days: '7',\n    });\n    const r = await fetch('https:\/\/api.open-meteo.com\/v1\/forecast?' + params.toString(), { cache: 'no-store' });\n    if (!r.ok) throw new Error('HTTP ' + r.status);\n    const daily = (await r.json())?.daily;\n    if (!daily || !Array.isArray(daily.time) || !daily.time.length) throw new Error('empty');\n    const byDate = {};\n    daily.time.forEach((day, i) => {\n      const max = daily.temperature_2m_max?.[i];\n      const min = daily.temperature_2m_min?.[i];\n      const code = daily.weather_code?.[i];\n      if (max == null || min == null || code == null) return;\n      byDate[day] = {\n        code,\n        max: Math.round(Number(max)),\n        min: Math.round(Number(min)),\n        pop: Math.round(Number(daily.precipitation_probability_max?.[i]) || 0),\n      };\n    });\n    if (!Object.keys(byDate).length) throw new Error('empty');\n    return { place: spot.place, fallback: spot.place !== 'Avigliana', byDate };\n  }\n\n  async function loadWeekWeather() {\n    for (const spot of WX_SPOTS) {\n      try {\n        weekWeather = await fetchSpotForecast(spot);\n        if (document.getElementById('days-root')) renderTimeline();\n        return;\n      } catch (e) {\n        console.warn('Meteo', spot.place, e);\n      }\n    }\n  }\n\n  function localYmd(d) {\n    return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`;\n  }\n\n  function matchDayIso(m) {\n    const s = String(m?.data_incontro || '').trim();\n    const iso = s.match(\/^(\\d{4}-\\d{2}-\\d{2})\/);\n    if (iso) return iso[1];\n    const it = s.match(\/^(\\d{1,2})[.\/](\\d{1,2})[.\/](\\d{4})\/);\n    if (it) return `${it[3]}-${String(it[2]).padStart(2, '0')}-${String(it[1]).padStart(2, '0')}`;\n    return '';\n  }\n\n  function capFirst(s) {\n    const v = String(s || '');\n    return v ? v.charAt(0).toUpperCase() + v.slice(1) : '';\n  }\n\n  function parseMatchLocalDate(raw) {\n    if (raw instanceof Date && !Number.isNaN(raw.getTime())) return raw;\n    const s = String(raw || '').trim();\n    const iso = s.match(\/^(\\d{4}-\\d{2}-\\d{2})\/);\n    if (iso) {\n      const d = new Date(`${iso[1]}T12:00:00`);\n      return Number.isNaN(d.getTime()) ? null : d;\n    }\n    const d = new Date(s);\n    return Number.isNaN(d.getTime()) ? null : d;\n  }\n\n  function formatMatchDateParts(raw) {\n    const d = parseMatchLocalDate(raw);\n    if (!d) return { weekday: '', date: String(raw || '') };\n    return {\n      weekday: capFirst(d.toLocaleDateString(locale(), { weekday: 'long' })),\n      date: d.toLocaleDateString(locale(), { day: '2-digit', month: '2-digit', year: 'numeric' }),\n    };\n  }\n\n  function formatMatchDateLabel(raw) {\n    const p = formatMatchDateParts(raw);\n    if (p.weekday && p.date) return `${p.weekday} ${p.date}`;\n    return p.date || p.weekday || '';\n  }\n\n  function asMatchRows(res) {\n    if (Array.isArray(res)) return res;\n    if (res && Array.isArray(res.data)) return res.data;\n    if (res && Array.isArray(res.rows)) return res.rows;\n    return [];\n  }\n\n  function hx(s) {\n    return String(s ?? '').replace(\/&\/g, '&amp;').replace(\/<\/g, '&lt;').replace(\/\"\/g, '&quot;');\n  }\n\n  function matchToEvent(m) {\n    const dateKey = matchDayIso(m);\n    const time = String(m.ora_incontro || '').slice(0, 5);\n    const [y, mo, da] = dateKey.split('-').map(Number);\n    const [hh, mm] = (time || '00:00').split(':');\n    const isHome = Number(m.is_casa) === 1;\n    const team = String(m.squadra_nome || t('team')).trim();\n    const opp = String(m.avversario_nome || t('opponent')).trim();\n    const location = String(\n      m.indirizzo_incontro || (isHome ? m.squadra_casa_indirizzo : m.avversario_trasferta_indirizzo) || ''\n    ).trim();\n    const tipo = String(m.tipo_incontro || '').trim();\n    const start = dateKey\n      ? new Date(y, (mo || 1) - 1, da || 1, +(hh || 0), +(mm || 0))\n      : new Date();\n    return {\n      summary: `${team} vs ${opp}`,\n      location,\n      description: tipo,\n      start,\n      type: isHome ? 'HOME' : 'AWAY',\n      dateKey,\n      time,\n      team,\n      opp,\n      tipo,\n      teamId: m.squadra_id,\n      categoria: String(m.squadra_categoria || m.categoria || '').trim(),\n      raggruppamento: String(m.squadra_raggruppamento || m.raggruppamento || '').trim(),\n    };\n  }\n\n  function loadMatchesJsonp(scriptPath) {\n    return new Promise((resolve, reject) => {\n      const cb = 'abCalCb_' + Date.now();\n      const script = document.createElement('script');\n      window[cb] = function (payload) {\n        delete window[cb];\n        if (script.parentNode) script.parentNode.removeChild(script);\n        resolve(payload);\n      };\n      script.onerror = function () {\n        delete window[cb];\n        if (script.parentNode) script.parentNode.removeChild(script);\n        reject(new Error('JSONP failed'));\n      };\n      script.src = apiUrl(scriptPath, { action: 'read', table: 'CAL_Matches', t: Date.now(), callback: cb });\n      document.head.appendChild(script);\n    });\n  }\n\n  async function fetchClubMatches() {\n    const scripts = ['apiCALL.php', 'https:\/\/aviglianabasket.cloud\/apiCALL.php'];\n    for (const script of scripts) {\n      try {\n        const url = apiUrl(script, { action: 'read', table: 'CAL_Matches', t: Date.now() });\n        const r = await fetch(url, { method: 'GET', credentials: 'omit', cache: 'no-store' });\n        if (!r.ok) throw new Error('HTTP ' + r.status);\n        const rows = asMatchRows(await r.json());\n        return rows.map(matchToEvent).filter(e => e.dateKey);\n      } catch (e) {\n        console.warn('Timeline incontri fetch', script, e);\n      }\n    }\n    for (const script of scripts) {\n      try {\n        const rows = asMatchRows(await loadMatchesJsonp(script));\n        return rows.map(matchToEvent).filter(e => e.dateKey);\n      } catch (e) {\n        console.warn('Timeline incontri JSONP', script, e);\n      }\n    }\n    throw new Error('incontri non disponibili');\n  }\n\n  const AVIGLIANA_CENTER = { lat: 45.0806, lon: 7.3961 };\n  const awayRouteCache = new Map();\n  let geoSlot = Promise.resolve();\n\n  function paceGeo(task) {\n    const run = geoSlot.then(task, task);\n    geoSlot = run.then(\n      () => new Promise(r => setTimeout(r, 1100)),\n      () => new Promise(r => setTimeout(r, 1100))\n    );\n    return run;\n  }\n\n  function cleanRouteQuery(raw) {\n    let s = String(raw || '');\n    s = s.replace(\/\\((?:TO|CN|AL|AT|BI|NO|VB|VC|AO|GE|IM|SV|SP|MI|MB)\\)\/gi, ' ');\n    s = s.replace(\/\\bP\\.?\\s*zza\\b\/gi, 'Piazza');\n    s = s.replace(\/\\bV\\.?\\s*le\\b\/gi, 'Viale');\n    s = s.replace(\/\\bC\\.?\\s*so\\b\/gi, 'Corso');\n    s = s.replace(\/\\bP\\.?\\s*le\\b\/gi, 'Piazzale');\n    s = s.replace(\/\\s+-\\s+\/g, ', ');\n    s = s.replace(\/\\b\\d{5}\\b\/g, ' ');\n    s = s.replace(\/\\s+\/g, ' ').replace(\/\\s*,\\s*\/g, ', ').replace(\/(?:,\\s*){2,}\/g, ', ').trim();\n    return s.replace(\/^[,\\s]+|[,\\s]+$\/g, '');\n  }\n\n  function placeHint(raw) {\n    const cleaned = cleanRouteQuery(raw);\n    const m = cleaned.match(\/\\b(?:via|viale|piazza|piazzale|corso|strada|vicolo|largo|borgata)\\s+([^,]+)\/i);\n    if (!m) return '';\n    const words = m[1].replace(\/\\b\\d+[a-z]?\\b\/gi, ' ').split(\/\\s+\/).filter(w => w.length > 3);\n    return (words[words.length - 1] || '').toLowerCase();\n  }\n\n  function asDestination(hit, hint) {\n    if (!hit) return null;\n    const approx = !!(hint && !String(hit.label || '').toLowerCase().includes(hint));\n    return { lat: hit.lat, lon: hit.lon, approx };\n  }\n\n  function isTownKind(kind) {\n    return \/city|town|village|administrative|municipality|county|state\/i.test(kind || '');\n  }\n\n  function haversineMeters(a, b) {\n    const R = 6371000;\n    const dLat = (b.lat - a.lat) * Math.PI \/ 180;\n    const dLon = (b.lon - a.lon) * Math.PI \/ 180;\n    const lat1 = a.lat * Math.PI \/ 180;\n    const lat2 = b.lat * Math.PI \/ 180;\n    const h = Math.sin(dLat \/ 2) ** 2 + Math.cos(lat1) * Math.cos(lat2) * Math.sin(dLon \/ 2) ** 2;\n    return 2 * R * Math.asin(Math.min(1, Math.sqrt(h)));\n  }\n\n  function formatKm(meters) {\n    const km = meters \/ 1000;\n    const digits = km < 10 ? 1 : 0;\n    return km.toLocaleString(locale(), { minimumFractionDigits: digits, maximumFractionDigits: digits }) + ' km';\n  }\n\n  function formatTravel(seconds) {\n    const min = Math.max(1, Math.round(seconds \/ 60));\n    if (min < 60) return min + ' min';\n    const h = Math.floor(min \/ 60);\n    const m = min % 60;\n    return m ? `${h} h ${m} min` : `${h} h`;\n  }\n\n  function formatAwayRoute(route) {\n    const km = formatKm(route.meters);\n    if (route.straight || route.seconds == null) return t('route_straight').replace('{km}', km);\n    const time = formatTravel(route.seconds);\n    const key = route.approx ? 'route_approx' : 'route_drive';\n    return t(key).replace('{km}', km).replace('{time}', time);\n  }\n\n  async function fetchJson(url) {\n    const r = await fetch(url);\n    if (!r.ok) throw new Error(String(r.status));\n    return r.json();\n  }\n\n  async function arcgisCandidates(q) {\n    const url = 'https:\/\/geocode.arcgis.com\/arcgis\/rest\/services\/World\/GeocodeServer\/findAddressCandidates?' + new URLSearchParams({\n      f: 'pjson',\n      maxLocations: '3',\n      countryCode: 'ITA',\n      singleLine: q,\n    });\n    const data = await fetchJson(url);\n    return (Array.isArray(data.candidates) ? data.candidates : [])\n      .map(c => ({\n        lat: Number(c.location && c.location.y),\n        lon: Number(c.location && c.location.x),\n        score: Number(c.score) || 0,\n        label: String(c.address || ''),\n      }))\n      .filter(c => Number.isFinite(c.lat) && Number.isFinite(c.lon) && c.score >= 80)\n      .sort((a, b) => b.score - a.score);\n  }\n\n  async function photonCandidates(q) {\n    const url = 'https:\/\/photon.komoot.io\/api\/?' + new URLSearchParams({ q, limit: '5' });\n    const data = await fetchJson(url);\n    const tokens = q.toLowerCase().split(\/[^a-z0-9\u00e0\u00e8\u00e9\u00ec\u00f2\u00f9]+\/i).filter(t => t.length > 3);\n    return (data.features || []).map(f => {\n      const p = f.properties || {};\n      const pair = (f.geometry && f.geometry.coordinates) || [];\n      const label = [p.name, p.street, p.city, p.county, p.state, p.country].filter(Boolean).join(', ');\n      const low = label.toLowerCase();\n      const overlap = tokens.filter(t => low.includes(t)).length;\n      return {\n        lat: Number(pair[1]),\n        lon: Number(pair[0]),\n        score: String(p.countrycode || '').toUpperCase() === 'IT' ? 70 + overlap : 0,\n        label,\n      };\n    }).filter(c => c.score >= 72 && Number.isFinite(c.lat) && Number.isFinite(c.lon))\n      .sort((a, b) => b.score - a.score);\n  }\n\n  function nominatimSearch(q) {\n    const url = 'https:\/\/nominatim.openstreetmap.org\/search?' + new URLSearchParams({\n      format: 'jsonv2',\n      q,\n      limit: '5',\n      countrycodes: 'it',\n    });\n    return paceGeo(() => fetchJson(url));\n  }\n\n  function fromNominatim(rows, city) {\n    const hint = String(city || '').toLowerCase();\n    const list = (Array.isArray(rows) ? rows : []).map(row => ({\n      lat: Number(row.lat),\n      lon: Number(row.lon),\n      kind: String(row.addresstype || row.type || ''),\n      cityOk: hint ? String(row.display_name || '').toLowerCase().includes(hint) : true,\n    })).filter(x => Number.isFinite(x.lat) && Number.isFinite(x.lon) && x.cityOk);\n    if (!list.length) return null;\n    return list.find(x => !isTownKind(x.kind)) || list[0];\n  }\n\n  async function geocodeDestination(address) {\n    const cleaned = cleanRouteQuery(address);\n    const hint = placeHint(address);\n    const queries = [cleaned, String(address || '').replace(\/\\s+\/g, ' ').trim()]\n      .filter((s, i, arr) => s && arr.indexOf(s) === i);\n    for (const q of queries) {\n      try {\n        const hit = (await arcgisCandidates(q))[0];\n        if (hit) return asDestination(hit, hint);\n      } catch (e) {}\n    }\n    try {\n      const hit = (await photonCandidates(cleaned || address))[0];\n      if (hit) return asDestination(hit, hint);\n    } catch (e) {}\n    const city = (cleaned.split(',').pop() || cleaned).trim();\n    if (city) {\n      try {\n        const hit = fromNominatim(await nominatimSearch(`${city}, Italia`), city);\n        if (hit) return { lat: hit.lat, lon: hit.lon, approx: !!hint || isTownKind(hit.kind) };\n      } catch (e) {}\n    }\n    return null;\n  }\n\n  async function routeFromAvigliana(dest) {\n    const url = `https:\/\/router.project-osrm.org\/route\/v1\/driving\/${AVIGLIANA_CENTER.lon},${AVIGLIANA_CENTER.lat};${dest.lon},${dest.lat}?overview=false`;\n    try {\n      const data = await fetchJson(url);\n      const leg = data && data.routes && data.routes[0];\n      if (leg && Number.isFinite(leg.distance) && Number.isFinite(leg.duration)) {\n        return { meters: leg.distance, seconds: leg.duration, approx: !!dest.approx, straight: false };\n      }\n    } catch (e) {}\n    return { meters: haversineMeters(AVIGLIANA_CENTER, dest), seconds: null, approx: true, straight: true };\n  }\n\n  function awayRoute(address) {\n    const key = String(address || '').trim().toLowerCase();\n    if (!key) return Promise.resolve(null);\n    if (!awayRouteCache.has(key)) {\n      awayRouteCache.set(key, (async () => {\n        const dest = await geocodeDestination(address);\n        if (!dest) {\n          awayRouteCache.delete(key);\n          return null;\n        }\n        return routeFromAvigliana(dest);\n      })().catch(() => {\n        awayRouteCache.delete(key);\n        return null;\n      }));\n    }\n    return awayRouteCache.get(key);\n  }\n\n  async function fillAwayRoutes(root) {\n    const nodes = [...root.querySelectorAll('.route-line[data-away]')];\n    await Promise.all(nodes.map(async (el) => {\n      if (!el.isConnected) return;\n      el.hidden = false;\n      el.textContent = t('route_loading');\n      const route = await awayRoute(el.getAttribute('data-away'));\n      if (!el.isConnected) return;\n      if (!route) {\n        el.hidden = true;\n        el.textContent = '';\n        return;\n      }\n      el.hidden = false;\n      el.textContent = formatAwayRoute(route);\n    }));\n  }\n\n  function showMatchModal(matches, title) {\n    document.getElementById('m-title').textContent = title;\n    const body = document.getElementById('m-body');\n    body.innerHTML = matches.map(m => {\n      const unconfirmed = String(m.summary || '').trim().startsWith('.');\n      const summary = unconfirmed ? m.summary.trim().slice(1).trim() : m.summary;\n      const time = m.time || m.start.toLocaleTimeString(locale(), { hour: '2-digit', minute: '2-digit' });\n      const when = formatMatchDateLabel(m.dateKey || m.start);\n      const side = m.type === 'HOME' ? t('side_home') : (m.type === 'AWAY' ? t('side_away') : '');\n      const sideClass = m.type === 'HOME' ? 'home' : 'away';\n      return `<div class=\"event-card\">\n        <div class=\"t\">${hx(time)}${side ? ` <span class=\"side-pill ${sideClass}\">${hx(side)}<\/span>` : ''}${when ? ` \u00b7 ${hx(when)}` : ''}<\/div>\n        <div class=\"s\">${hx(summary)} ${unconfirmed ? `<span style=\"color:#f87171;font-size:.75rem\">${t('to_confirm')}<\/span>` : ''}<\/div>\n        ${m.location ? `<div class=\"l\">\ud83d\udccd ${hx(m.location)}<\/div>` : ''}\n        ${m.type === 'AWAY' && m.location ? `<div class=\"l route-line\" data-away=\"${hx(m.location)}\" hidden><\/div>` : ''}\n        ${m.description ? `<div class=\"l\" style=\"margin-top:.35rem\">${hx(m.description)}<\/div>` : ''}\n      <\/div>`;\n    }).join('');\n    document.getElementById('match-detail-modal').hidden = false;\n    fillAwayRoutes(body);\n  }\n\n  function renderWeekMatchList(list, emptyKey) {\n    const wrap = document.getElementById('week-matches');\n    if (!wrap) return;\n    if (!list.length) {\n      wrap.innerHTML = `<p class=\"week-empty\">${t(emptyKey || 'next7_empty')}<\/p>`;\n      return;\n    }\n    wrap.innerHTML = list.map((m, idx) => {\n      const side = m.type === 'HOME' ? t('home') : t('away');\n      const sideClass = m.type === 'HOME' ? 'is-home' : 'is-away';\n      const parts = formatMatchDateParts(m.dateKey || m.start);\n      const time = m.time || m.start.toLocaleTimeString(locale(), { hour: '2-digit', minute: '2-digit' });\n      return `<article class=\"week-match ${sideClass}\" data-idx=\"${idx}\">\n        <div class=\"wm-top\">\n          <span class=\"wm-time\">${hx(time)}<\/span>\n          <span class=\"wm-side ${sideClass}\">${hx(side)}<\/span>\n          ${m.tipo ? `<span class=\"wm-tipo\">${hx(m.tipo)}<\/span>` : ''}\n        <\/div>\n        <div class=\"wm-date-line\">\n          <span class=\"wm-date\">${hx(parts.date)}<\/span>\n          ${parts.weekday ? `<span class=\"wm-weekday\">${hx(parts.weekday)}<\/span>` : ''}\n        <\/div>\n        <div class=\"wm-title\">${hx(m.summary)}<\/div>\n        <div class=\"wm-meta\">${m.location ? hx(m.location) : ''}<\/div>\n      <\/article>`;\n    }).join('');\n    wrap.querySelectorAll('.week-match').forEach((el) => {\n      el.onclick = () => {\n        const m = list[Number(el.getAttribute('data-idx'))];\n        if (m) showMatchModal([m], m.summary);\n      };\n    });\n  }\n\n  function renderTimeline() {\n    const daysRoot = document.getElementById('days-root');\n    const tickerRoot = document.getElementById('ticker-root');\n    const tickerWrap = document.getElementById('ticker-wrap');\n    daysRoot.innerHTML = '';\n    const today = new Date();\n    const todayKey = localYmd(today);\n    let tickerHtml = '';\n\n    for (let i = 0; i < 7; i++) {\n      const d = new Date(today.getFullYear(), today.getMonth(), today.getDate() + i);\n      const key = localYmd(d);\n      const isToday = key === todayKey;\n      const hMatches = allEvents.home.filter(e => e.dateKey === key);\n      const aMatches = allEvents.away.filter(e => e.dateKey === key);\n      const dayMatches = [...hMatches, ...aMatches].sort((a, b) => a.start - b.start);\n      if (isToday) {\n        dayMatches.forEach(m => {\n          tickerHtml += `<div><span>${hx(m.time || m.start.toLocaleTimeString(locale(), { hour: '2-digit', minute: '2-digit' }))}<\/span> ${hx(m.summary)}<\/div>`;\n        });\n      }\n      const col = document.createElement('button');\n      col.type = 'button';\n      col.className = 'day'\n        + (isToday ? ' is-today' : '')\n        + (selectedDayKey === key ? ' is-selected' : '')\n        + (dayMatches.length ? ' has-matches' : '');\n      col.setAttribute('aria-pressed', 'false');\n      const counts = [];\n      if (hMatches.length) {\n        counts.push(`<span class=\"day-count home\"><b>${hMatches.length}<\/b> ${hx(t('side_home'))}<\/span>`);\n      }\n      if (aMatches.length) {\n        counts.push(`<span class=\"day-count away\"><b>${aMatches.length}<\/b> ${hx(t('side_away'))}<\/span>`);\n      }\n      col.innerHTML = `<div class=\"day-name\">${d.toLocaleDateString(locale(), { weekday: 'short' })}<\/div><div class=\"day-num\">${d.getDate()}<\/div>`\n        + (counts.length ? `<div class=\"day-counts\">${counts.join('')}<\/div>` : '')\n        + dayWeatherHtml(key);\n      col.onclick = () => {\n        if (dayMatches.length) showMatchModal(dayMatches, formatMatchDateLabel(key));\n      };\n      daysRoot.appendChild(col);\n    }\n\n    if (tickerHtml) {\n      tickerRoot.innerHTML = tickerHtml + tickerHtml;\n      tickerWrap.hidden = false;\n    } else tickerWrap.hidden = true;\n\n    if (!selectedDayKey) selectedDayKey = todayKey;\n    paintWeekWeatherNote();\n  }\n\n  async function initTimeline() {\n    try {\n      const events = await fetchClubMatches();\n      clubMatchEvents = events;\n      syncDirettaFromClub();\n      const today = new Date();\n      const todayKey = localYmd(today);\n      const lastKey = localYmd(new Date(today.getFullYear(), today.getMonth(), today.getDate() + 6));\n      const week = events.filter(e => e.dateKey >= todayKey && e.dateKey <= lastKey);\n      allEvents.home = week.filter(e => e.type === 'HOME');\n      allEvents.away = week.filter(e => e.type === 'AWAY');\n      if (!selectedDayKey) selectedDayKey = todayKey;\n    } catch (e) {\n      console.warn('Timeline incontri: fetch fallito', e);\n      allEvents.home = [];\n      allEvents.away = [];\n      syncDirettaFromClub();\n    }\n    renderTimeline();\n    if (!weekWeather) loadWeekWeather();\n  }\n\n  \/* ---------- Photos (logica allineata ad AB_HOME21) ---------- *\/\n  const PHOTO_API = apiUrl('apiF.php', { action: 'photos' });\n  const PHOTO_BASE_WWW = CLOUD + '\/uploads\/';\n  const PHOTO_BASE_ALT = 'https:\/\/aviglianabasket.cloud\/uploads\/';\n\n  function formatPhotoDate(d) {\n    if (!d) return '';\n    const p = String(d).split('-');\n    return p.length === 3 ? p[2] + '\/' + p[1] : d;\n  }\n\n  function extractPhotos(d) {\n    if (Array.isArray(d)) return d;\n    if (d && d.status === 'success' && Array.isArray(d.data)) return d.data;\n    if (d && Array.isArray(d.data)) return d.data;\n    if (d && Array.isArray(d.photos)) return d.photos;\n    return [];\n  }\n\n  function renderPhotos(list) {\n    const grid = document.getElementById('photo-grid');\n    if (!grid) return;\n    if (!Array.isArray(list) || !list.length) {\n      grid.innerHTML = `<p style=\"color:var(--muted);grid-column:1\/-1;text-align:center;padding:2rem\">${t('no_photos')}<\/p>`;\n      return;\n    }\n    grid.innerHTML = list.slice(0, 10).map(p => {\n      const file = p.filename || p.file || p.nome_file || '';\n      const src1 = \/^https?:\\\/\\\/\/i.test(file) ? file : PHOTO_BASE_WWW + file;\n      const src2 = \/^https?:\\\/\\\/\/i.test(file) ? file : PHOTO_BASE_ALT + file;\n      const date = formatPhotoDate(p.data_partita);\n      const resRaw = String(p.risultato || '').toLowerCase();\n      let resLabel = t('photo_null');\n      let badge = 'badge-nullo';\n      if (resRaw === 'vinto') { resLabel = t('photo_win'); badge = 'badge-vinto'; }\n      else if (resRaw === 'perso') { resLabel = t('photo_lose'); badge = 'badge-perso'; }\n      else if (resRaw && resRaw !== 'nullo') { resLabel = p.risultato; }\n      const safeNote = (p.note || p.nota || '').replace(\/'\/g, '&#39;').replace(\/\"\/g, '&quot;');\n      const team = p.nome_squadra || t('team');\n      return `<article class=\"photo-card\" data-note=\"${safeNote}\" onclick=\"window.abOpenPhoto(this)\">\n        <div class=\"ph\">\n          <img decoding=\"async\" src=\"${src1}\" alt=\"${team}\" loading=\"lazy\" referrerpolicy=\"no-referrer\"\n            onerror=\"if(this.dataset.fallback!=='1'){this.dataset.fallback='1';this.src='${src2}';}\">\n        <\/div>\n        <div class=\"meta\">\n          <span class=\"team\">${team}<\/span>\n          <span class=\"info\">${date}${p.avversario ? ' vs ' + p.avversario : ''}<\/span>\n          <div class=\"score-row\">\n            <span class=\"score\">${p.punteggio || '-'}<\/span>\n            ${resRaw !== 'nullo' && resRaw ? `<span class=\"${badge}\">${resLabel}<\/span>` : ''}\n          <\/div>\n        <\/div>\n      <\/article>`;\n    }).join('');\n  }\n\n  function fillTeamFilter(list) {\n    const sel = document.getElementById('team-filter');\n    if (!sel) return;\n    const teams = [...new Set(list.map(p => p.nome_squadra).filter(Boolean))].sort();\n    const cur = sel.value;\n    sel.innerHTML = `<option value=\"\">${t('all_teams')}<\/option>` +\n      teams.map(tm => `<option value=\"${String(tm).replace(\/\"\/g, '&quot;')}\">${tm}<\/option>`).join('');\n    if (cur && teams.includes(cur)) sel.value = cur;\n  }\n\n  function applyPhotos(dataArr) {\n    if (!Array.isArray(dataArr) || !dataArr.length) return false;\n    allPhotos = dataArr;\n    fillTeamFilter(allPhotos);\n    renderPhotos(allPhotos);\n    return true;\n  }\n\n  function loadPhotosJsonp(baseUrl) {\n    return new Promise((resolve, reject) => {\n      const cb = 'abPhotosCb_' + Date.now();\n      const script = document.createElement('script');\n      const u = new URL(baseUrl, window.location.href);\n      u.searchParams.set('callback', cb);\n      script.src = u.href;\n      window[cb] = function (payload) {\n        delete window[cb];\n        if (script.parentNode) script.parentNode.removeChild(script);\n        resolve(payload);\n      };\n      script.onerror = function () {\n        delete window[cb];\n        if (script.parentNode) script.parentNode.removeChild(script);\n        reject(new Error('JSONP failed'));\n      };\n      document.head.appendChild(script);\n    });\n  }\n\n  async function fetchJson(url) {\n    const r = await fetch(url, { method: 'GET', credentials: 'omit', cache: 'no-store' });\n    if (!r.ok) throw new Error('HTTP ' + r.status);\n    return r.json();\n  }\n\n  async function loadPhotos() {\n    const grid = document.getElementById('photo-grid');\n    if (grid) grid.innerHTML = `<p style=\"color:var(--muted);grid-column:1\/-1;text-align:center;padding:1.5rem\">${t('loading_photos')}<\/p>`;\n    const stamp = Date.now();\n    const urls = [\n      apiUrl('apiCALL.php', { action: 'photos_public', t: stamp }),\n      apiUrl('apiF.php', { action: 'photos', t: stamp }),\n      apiUrl('https:\/\/aviglianabasket.cloud\/apiF.php', { action: 'photos', t: stamp })\n    ];\n    for (const url of urls) {\n      try {\n        const d = await fetchJson(url);\n        if (applyPhotos(extractPhotos(d))) return;\n      } catch (err) {\n        console.warn('FotoNews: fetch fallito', url, err);\n      }\n    }\n    try {\n      const d = await loadPhotosJsonp(apiUrl('apiF.php', { action: 'photos', t: stamp }));\n      if (applyPhotos(extractPhotos(d))) return;\n    } catch (err) {\n      console.warn('FotoNews: JSONP fallito', err);\n    }\n    if (grid) {\n      grid.innerHTML = `<p style=\"color:var(--muted);grid-column:1\/-1;text-align:center;padding:2rem\">${t('no_photos_err')}<\/p>`;\n    }\n  }\n\n  window.abOpenPhoto = (el) => {\n    const img = el.querySelector('img');\n    const note = el.getAttribute('data-note') || '';\n    if (!img || !img.src) return;\n    document.getElementById('lightbox-img').src = img.src;\n    document.getElementById('lightbox-note').textContent = note.replace(\/&#39;\/g, \"'\");\n    document.getElementById('lightbox').hidden = false;\n  };\n\n  \/* ---------- Results (Avigliana) ---------- *\/\n  const escHtml = (s) => String(s ?? '')\n    .replace(\/&\/g, '&amp;').replace(\/<\/g, '&lt;').replace(\/\"\/g, '&quot;');\n\n  const scoreRowHtml = (logo, name, pts, winner) => `\n    <div class=\"nba-row${winner ? ' is-winner' : ''}\">\n      ${logo ? `<img decoding=\"async\" crossorigin=\"anonymous\" src=\"${escHtml(logo)}\" alt=\"\" onerror=\"this.style.visibility='hidden'\">` : '<span><\/span>'}\n      <span class=\"nba-name\">${escHtml(name)}<\/span>\n      <span class=\"nba-score\">${pts == null || pts === '' ? '\u2014' : pts}<\/span>\n      <span class=\"nba-caret\" aria-hidden=\"true\"><\/span>\n    <\/div>`;\n  async function loadResults() {\n    const track = document.getElementById('results-track');\n    try {\n      const [data, oppsData] = await Promise.all([\n        fetch(apiUrl('apiCALL.php', { action: 'read', table: 'CAL_Matches' })).then(r => r.json()),\n        fetch(apiUrl('apiCALL.php', { action: 'read', table: 'CAL_Opponents' })).then(r => r.json()).catch(() => [])\n      ]);\n      const opponents = Array.isArray(oppsData) ? oppsData : (oppsData?.data || []);\n      const matches = Array.isArray(data) ? data : (data.data || []);\n      const results = matches\n        .filter(m => m.punti_casa !== null && m.punti_ospiti !== null && m.punti_casa !== '' && m.punti_ospiti !== '')\n        .sort((a,b) => new Date(b.data_incontro) - new Date(a.data_incontro))\n        .slice(0, 15);\n      if (!results.length) {\n        track.innerHTML = `<div style=\"padding:1rem;color:var(--muted)\">${t('no_results')}<\/div>`;\n        return;\n      }\n      const cards = results.map(m => {\n        const pc = parseInt(m.punti_casa) || 0;\n        const po = parseInt(m.punti_ospiti) || 0;\n        const isCasa = m.is_casa == 1;\n        const isWin = isCasa ? pc > po : po > pc;\n        const isDraw = pc === po;\n        const dateParts = formatMatchDateParts(m.data_incontro);\n        const dateStr = dateParts.weekday ? `${dateParts.weekday} ${dateParts.date}` : dateParts.date;\n        const homeTeam = isCasa ? 'Avigliana' : (m.avversario_nome || t('opponent'));\n        const awayTeam = isCasa ? (m.avversario_nome || t('opponent')) : 'Avigliana';\n        const oppObj = opponents.find(o => String(o.id) === String(m.avversario_id));\n        const avLogo = m.squadra_logo_url || LOGO;\n        const oppLogo = oppObj?.logo_url ? CLOUD + '\/LOGO_AVVERSARI\/' + oppObj.logo_url : null;\n        const homeLogo = isCasa ? avLogo : oppLogo;\n        const awayLogo = isCasa ? oppLogo : avLogo;\n        const homeWin = pc > po;\n        const awayWin = po > pc;\n        const status = isDraw ? t('status_draw') : (isWin ? t('status_win') : t('status_lose'));\n        const statusClass = isDraw ? '' : (isWin ? 'is-win' : 'is-lose');\n        const category = m.squadra_nome || m.categoria || m.tipo_incontro || t('team');\n        const foot = `${dateStr} \u00b7 ${m.tipo_incontro || t('championship')}`;\n        return `<div class=\"result-card\">\n          <div class=\"nba-head\">\n            <span class=\"nba-status ${statusClass}\">${status}<\/span>\n            <span class=\"nba-meta\">${escHtml(category)}<\/span>\n          <\/div>\n          <div class=\"nba-rows\">\n            ${scoreRowHtml(homeLogo, homeTeam, pc, homeWin)}\n            ${scoreRowHtml(awayLogo, awayTeam, po, awayWin)}\n          <\/div>\n          <div class=\"nba-foot\">${escHtml(foot)}<\/div>\n        <\/div>`;\n      }).join('');\n      track.innerHTML = cards + cards;\n    } catch (e) {\n      track.innerHTML = `<div style=\"padding:1rem;color:var(--muted)\">${t('results_err')}<\/div>`;\n    }\n  }\n\n  \/* ---------- Survey badge + station status ---------- *\/\n  const SURVEY_DEFAULT_URL = CLOUD + '\/wp-content\/uploads\/ab_survey.html?v=20260806c';\n  let activeSurveys = [];\n  let surveysLoaded = false;\n\n  function isSurveyOpen(s) {\n    if (!s) return false;\n    return s.is_open === true || s.is_open === 1 || s.is_open === '1' || s.open == 1;\n  }\n\n  function applySurveyStation() {\n    const countEl = document.getElementById('survey-station-count');\n    const nameEl = document.getElementById('survey-station-name');\n    const station = document.getElementById('station-survey');\n    const badge = document.getElementById('survey-active-badge');\n\n    if (!surveysLoaded) {\n      if (countEl) {\n        countEl.textContent = '\u2014 \u2026';\n        countEl.dataset.state = 'loading';\n      }\n      if (nameEl) {\n        nameEl.hidden = true;\n        nameEl.textContent = '';\n      }\n      if (badge) badge.hidden = true;\n      return;\n    }\n\n    const open = activeSurveys.filter(isSurveyOpen);\n    const n = open.length;\n\n    if (badge) {\n      if (n > 0) {\n        badge.hidden = false;\n        badge.textContent = String(n);\n      } else {\n        badge.hidden = true;\n      }\n    }\n\n    if (station) {\n      if (n === 1 && open[0].public_url) {\n        try {\n          const u = new URL(open[0].public_url);\n          u.searchParams.set('v', '20260806c');\n          station.setAttribute('data-open', u.toString());\n        } catch (e) {\n          station.setAttribute('data-open', open[0].public_url);\n        }\n      } else {\n        station.setAttribute('data-open', SURVEY_DEFAULT_URL);\n      }\n    }\n\n    if (countEl) {\n      if (n === 0) {\n        countEl.textContent = t('survey_count_none');\n        countEl.dataset.state = 'none';\n      } else if (n === 1) {\n        countEl.textContent = t('survey_count_one').replace('{n}', '1');\n        countEl.dataset.state = 'active';\n      } else {\n        countEl.textContent = t('survey_count_many').replace('{n}', String(n));\n        countEl.dataset.state = 'active';\n      }\n    }\n\n    if (nameEl) {\n      if (n === 1 && open[0].title) {\n        nameEl.hidden = false;\n        nameEl.textContent = open[0].title;\n      } else if (n > 1) {\n        nameEl.hidden = false;\n        nameEl.textContent = open.map((s) => s.title).filter(Boolean).join(' \u00b7 ');\n      } else {\n        nameEl.hidden = true;\n        nameEl.textContent = '';\n      }\n    }\n  }\n\n  async function loadSurveyBadge() {\n    try {\n      const d = await fetch(apiUrl('apiC.php', { action: 'get_active_public_surveys', t: Date.now() }), {\n        credentials: 'omit',\n        cache: 'no-store',\n      }).then((r) => r.json());\n      const list = Array.isArray(d) ? d : (d?.data || d?.surveys || []);\n      activeSurveys = Array.isArray(list) ? list : [];\n    } catch (e) {\n      activeSurveys = [];\n    }\n    surveysLoaded = true;\n    applySurveyStation();\n  }\n\n  \/* ---------- Sponsors ---------- *\/\n  function loadSponsors() {\n    const track = document.getElementById('sponsors-track');\n    const itemsHtml = SPONSORS_DATA.map(item => {\n      const src = item.file.startsWith('http')\n        ? item.file\n        : WP + '\/wp-content\/uploads\/2026\/02\/' + item.file;\n      return `<a href=\"${item.url}\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" crossorigin=\"anonymous\" src=\"${src}\" alt=\"Sponsor\" loading=\"lazy\"><\/a>`;\n    }).join('');\n    track.innerHTML = itemsHtml + itemsHtml;\n  }\n\n  \/* ---------- Stampa calendario ---------- *\/\n  function shiftDays(d, n) {\n    return new Date(d.getFullYear(), d.getMonth(), d.getDate() + n);\n  }\n  function mondayOf(d) {\n    const day = d.getDay();\n    return shiftDays(d, day === 0 ? -6 : 1 - day);\n  }\n  function defaultPeriod() {\n    const today = new Date();\n    return { from: localYmd(mondayOf(today)), to: localYmd(shiftDays(mondayOf(today), 6)) };\n  }\n  function printTeams() {\n    const map = new Map();\n    clubMatchEvents.forEach((e) => {\n      const name = String(e.team || '').trim();\n      if (!name) return;\n      const id = String(e.teamId || name);\n      if (!map.has(id)) map.set(id, name);\n    });\n    return [...map.entries()]\n      .map(([id, name]) => ({ id, name }))\n      .sort((a, b) => a.name.localeCompare(b.name, 'it', { sensitivity: 'base' }));\n  }\n  function setCalPrintMode(mode) {\n    calPrintMode = mode === 'team' ? 'team' : 'period';\n    const periodBtn = document.getElementById('cal-print-mode-period');\n    const teamBtn = document.getElementById('cal-print-mode-team');\n    const period = document.getElementById('cal-print-period');\n    const teams = document.getElementById('cal-print-teams-wrap');\n    if (periodBtn) periodBtn.classList.toggle('is-on', calPrintMode === 'period');\n    if (teamBtn) teamBtn.classList.toggle('is-on', calPrintMode === 'team');\n    if (period) period.hidden = calPrintMode !== 'period';\n    if (teams) teams.hidden = calPrintMode !== 'team';\n    const locked = document.getElementById('cal-print-all-teams');\n    if (locked) locked.value = t('print_all_teams');\n  }\n  function isCampionatoEvent(ev) {\n    const raw = String((ev && (ev.tipo || ev.description)) || '').trim().toUpperCase();\n    if (!raw) return false;\n    return ['FIP', 'UISP', 'CSI', 'EISI'].some((code) =>\n      new RegExp('(^|[^A-Z0-9])' + code + '([^A-Z0-9]|$)').test(raw)\n    );\n  }\n  function setCalPrintScope(scope) {\n    calPrintScope = scope === 'champ' ? 'champ' : 'all';\n    const allBtn = document.getElementById('cal-print-scope-all');\n    const champBtn = document.getElementById('cal-print-scope-champ');\n    const note = document.getElementById('cal-print-scope-note');\n    if (allBtn) allBtn.classList.toggle('is-on', calPrintScope === 'all');\n    if (champBtn) champBtn.classList.toggle('is-on', calPrintScope === 'champ');\n    if (note) note.hidden = calPrintScope !== 'champ';\n  }\n  function fillPrintTeams() {\n    const box = document.getElementById('cal-print-team');\n    if (!box) return;\n    const prev = box.value;\n    const teams = printTeams();\n    box.innerHTML = teams.map((tm) => `<option value=\"${hx(tm.id)}\">${hx(tm.name)}<\/option>`).join('');\n    if (prev && teams.some((tm) => tm.id === prev)) box.value = prev;\n  }\n  function selectedPrintTeamId() {\n    const box = document.getElementById('cal-print-team');\n    return box ? String(box.value || '') : '';\n  }\n  function loadScriptOnce(src) {\n    return new Promise((resolve, reject) => {\n      const existing = document.querySelector('script[data-ab-src=\"' + src + '\"]');\n      if (existing) {\n        if (existing.dataset.ready === '1') resolve();\n        else existing.addEventListener('load', () => resolve(), { once: true });\n        return;\n      }\n      const s = document.createElement('script');\n      s.src = src;\n      s.async = true;\n      s.dataset.abSrc = src;\n      s.onload = () => { s.dataset.ready = '1'; resolve(); };\n      s.onerror = () => reject(new Error('script'));\n      document.head.appendChild(s);\n    });\n  }\n  async function ensurePdfLibs() {\n    if (window.jspdf && window.jspdf.jsPDF && window.jspdf.jsPDF.API && window.jspdf.jsPDF.API.autoTable) {\n      return window.jspdf.jsPDF;\n    }\n    await loadScriptOnce('https:\/\/cdn.jsdelivr.net\/npm\/jspdf@2.5.1\/dist\/jspdf.umd.min.js');\n    await loadScriptOnce('https:\/\/cdn.jsdelivr.net\/npm\/jspdf-autotable@3.8.2\/dist\/jspdf.plugin.autotable.min.js');\n    return window.jspdf.jsPDF;\n  }\n  function paintPdfHeader(doc, title, subtitle) {\n    const pageW = doc.internal.pageSize.getWidth();\n    doc.setFillColor(22, 163, 74);\n    doc.rect(0, 0, pageW, 26, 'F');\n    doc.setTextColor(255, 255, 255);\n    doc.setFont('helvetica', 'bold');\n    doc.setFontSize(10);\n    doc.text('AVIGLIANA BASKET', 14, 9);\n    doc.setFontSize(12);\n    doc.text(doc.splitTextToSize(String(title || ''), pageW - 28).slice(0, 1), 14, 16);\n    doc.setFont('helvetica', 'normal');\n    doc.setFontSize(8.5);\n    doc.text(doc.splitTextToSize(String(subtitle || ''), pageW - 28).slice(0, 1), 14, 22);\n    doc.setTextColor(30, 41, 59);\n  }\n  function drawPdfTable(doc, startY, head, body) {\n    doc.autoTable({\n      startY,\n      head: [head],\n      body,\n      styles: { font: 'helvetica', fontSize: 8, cellPadding: 2, textColor: [30, 41, 59], valign: 'middle' },\n      headStyles: { fillColor: [22, 163, 74], textColor: 255, fontStyle: 'bold', fontSize: 8 },\n      alternateRowStyles: { fillColor: [245, 248, 246] },\n      margin: { left: 14, right: 14, top: 32, bottom: 14 },\n      didDrawPage: () => paintPdfHeader(doc, doc.__abTitle, doc.__abSub),\n    });\n    return ((doc.lastAutoTable && doc.lastAutoTable.finalY) || startY) + 6;\n  }\n  function ensurePdfY(doc, y, need) {\n    if (y + need <= doc.internal.pageSize.getHeight() - 16) return y;\n    doc.addPage();\n    paintPdfHeader(doc, doc.__abTitle, doc.__abSub);\n    return 32;\n  }\n  function drawPdfBanner(doc, y, title, countLabel) {\n    y = ensurePdfY(doc, y, 18);\n    const pageW = doc.internal.pageSize.getWidth();\n    doc.setFillColor(15, 80, 42);\n    doc.roundedRect(14, y, pageW - 28, 8, 1, 1, 'F');\n    doc.setTextColor(255, 255, 255);\n    doc.setFont('helvetica', 'bold');\n    doc.setFontSize(9);\n    doc.text(String(title || '').toUpperCase(), 17, y + 5.3);\n    doc.text(String(countLabel || ''), pageW - 17, y + 5.3, { align: 'right' });\n    doc.setTextColor(30, 41, 59);\n    return y + 11;\n  }\n  function addPdfPageNumbers(doc) {\n    const total = doc.internal.getNumberOfPages();\n    const pageW = doc.internal.pageSize.getWidth();\n    const pageH = doc.internal.pageSize.getHeight();\n    for (let i = 1; i <= total; i += 1) {\n      doc.setPage(i);\n      doc.setFont('helvetica', 'normal');\n      doc.setFontSize(8);\n      doc.setTextColor(120);\n      doc.text(i + ' \/ ' + total, pageW - 14, pageH - 8, { align: 'right' });\n    }\n  }\n  function eventRows(list) {\n    return list.slice().sort((a, b) => a.start - b.start).map((m) => [\n      formatMatchDateLabel(m.dateKey),\n      m.time || '\u2014',\n      m.type === 'HOME' ? t('side_home') : t('side_away'),\n      m.team,\n      m.opp,\n      m.location || '\u2014',\n      m.tipo || '\u2014',\n    ]);\n  }\n  async function downloadCalPrint() {\n    const status = document.getElementById('cal-print-status');\n    const go = document.getElementById('cal-print-go');\n    if (calPrintBusy) return;\n    calPrintBusy = true;\n    if (go) go.disabled = true;\n    if (status) status.textContent = t('print_preparing');\n    try {\n      if (!clubMatchEvents.length) clubMatchEvents = await fetchClubMatches();\n      let rows = [];\n      let title = t('print_pdf_period');\n      let subtitle = '';\n      let filename = 'Calendario.pdf';\n      if (calPrintMode === 'team') {\n        const teamId = selectedPrintTeamId();\n        const team = printTeams().find((tm) => tm.id === teamId);\n        if (!team) {\n          if (status) status.textContent = t('print_pick_team');\n          return;\n        }\n        rows = clubMatchEvents.filter((e) => String(e.teamId || e.team) === team.id);\n        title = team.name;\n        subtitle = t('print_pdf_team');\n        filename = 'Calendario_' + team.name.replace(\/[^\\w]+\/g, '_').slice(0, 40) + '.pdf';\n      } else {\n        const from = document.getElementById('cal-print-from').value;\n        const to = document.getElementById('cal-print-to').value;\n        if (!from || !to || from > to) {\n          if (status) status.textContent = t('print_empty');\n          return;\n        }\n        rows = clubMatchEvents.filter((e) => e.dateKey >= from && e.dateKey <= to);\n        title = t('print_pdf_period');\n        subtitle = t('print_all_teams') + ' \u00b7 ' + from + ' \u2013 ' + to;\n        filename = 'Calendario_' + from + '_' + to + '.pdf';\n      }\n      if (calPrintScope === 'champ') {\n        rows = rows.filter(isCampionatoEvent);\n        subtitle = (subtitle ? subtitle + ' \u00b7 ' : '') + t('print_scope_champ');\n        filename = filename.replace(\/\\.pdf$\/i, '_campionato.pdf');\n      }\n      if (!rows.length) {\n        if (status) status.textContent = t('print_empty');\n        return;\n      }\n      const JsPDF = await ensurePdfLibs();\n      const doc = new JsPDF({ orientation: 'portrait', unit: 'mm', format: 'a4' });\n      doc.__abTitle = title;\n      doc.__abSub = subtitle;\n      paintPdfHeader(doc, title, subtitle);\n      const head = [\n        t('print_col_day'), t('print_col_time'), t('print_col_side'),\n        t('print_col_team'), t('print_col_opp'), t('print_col_venue'), t('print_col_type'),\n      ];\n      if (calPrintMode === 'team') {\n        const team = printTeams().find((tm) => tm.id === selectedPrintTeamId());\n        let y = 32;\n        if (team && rows.length) {\n          y = drawPdfBanner(doc, y, team.name, rows.length + ' ' + t('print_matches'));\n          drawPdfTable(doc, y, head, eventRows(rows));\n        }\n      } else {\n        const home = rows.filter((e) => e.type === 'HOME');\n        const away = rows.filter((e) => e.type !== 'HOME');\n        const groups = new Map();\n        home.forEach((e) => {\n          const key = e.location || t('print_other_gyms');\n          if (!groups.has(key)) groups.set(key, []);\n          groups.get(key).push(e);\n        });\n        let y = 32;\n        [...groups.entries()].sort((a, b) => a[0].localeCompare(b[0], 'it')).forEach(([name, list]) => {\n          y = drawPdfBanner(doc, y, name, list.length + ' ' + t('print_matches'));\n          y = drawPdfTable(doc, y, head, eventRows(list));\n        });\n        if (away.length) {\n          y = drawPdfBanner(doc, y, t('print_away_title'), away.length + ' ' + t('print_matches'));\n          drawPdfTable(doc, y, head, eventRows(away));\n        }\n      }\n      addPdfPageNumbers(doc);\n      doc.save(filename);\n      if (status) status.textContent = '';\n    } catch (err) {\n      console.warn('PDF calendario', err);\n      if (status) status.textContent = t('print_err');\n    } finally {\n      calPrintBusy = false;\n      if (go) go.disabled = false;\n    }\n  }\n  async function openCalPrint() {\n    const modal = document.getElementById('cal-print-modal');\n    const status = document.getElementById('cal-print-status');\n    if (!modal) return;\n    modal.hidden = false;\n    if (status) status.textContent = t('print_preparing');\n    try {\n      if (!clubMatchEvents.length) clubMatchEvents = await fetchClubMatches();\n      const period = defaultPeriod();\n      const from = document.getElementById('cal-print-from');\n      const to = document.getElementById('cal-print-to');\n      if (from && !from.value) from.value = period.from;\n      if (to && !to.value) to.value = period.to;\n      fillPrintTeams();\n      setCalPrintMode(calPrintMode);\n      if (status) status.textContent = '';\n    } catch (err) {\n      console.warn('Stampa calendario', err);\n      if (status) status.textContent = t('print_err');\n    }\n  }\n\n  \/* ---------- Wire UI ---------- *\/\n  function wire() {\n    const calStation = document.querySelector('#nova-portal [data-title-key=\"nav_calendar\"]');\n    if (calStation) calStation.setAttribute('data-open', calendarPageUrl());\n    setLang(lang, { reloadDynamic: false });\n    loadSponsors();\n\n    document.querySelectorAll('.lang-switch button').forEach((btn) => {\n      btn.onclick = () => setLang(btn.getAttribute('data-lang'));\n    });\n\n    document.getElementById('btn-menu').onclick = toggleNav;\n    document.getElementById('btn-close-nav').onclick = closeNav;\n    document.getElementById('nav-scrim').onclick = closeNav;\n    document.getElementById('btn-home').onclick = (e) => { e.preventDefault(); showHome(); };\n    document.getElementById('btn-home-from-page').onclick = showHome;\n    document.getElementById('btn-close-page').onclick = showHome;\n    document.getElementById('btn-cmd').onclick = openCmdk;\n\n    const toTop = document.getElementById('btn-to-top');\n    const syncToTop = () => {\n      if (!toTop) return;\n      const show = window.scrollY > 380;\n      toTop.classList.toggle('is-visible', show);\n    };\n    toTop.onclick = () => window.scrollTo({ top: 0, behavior: 'smooth' });\n    window.addEventListener('scroll', syncToTop, { passive: true });\n    syncToTop();\n\n    document.getElementById('nav-groups').addEventListener('click', (e) => {\n      const btn = e.target.closest('[data-url]');\n      if (btn) handleOpen(btn);\n    });\n    document.body.addEventListener('click', (e) => {\n      const btn = e.target.closest('[data-open]');\n      if (btn) { e.preventDefault(); handleOpen(btn); }\n    });\n\n    document.getElementById('cmdk').addEventListener('click', (e) => {\n      if (e.target.id === 'cmdk') closeCmdk();\n      const item = e.target.closest('.cmdk-item');\n      if (item) runCmd(cmdFiltered[+item.dataset.idx]);\n    });\n    document.getElementById('cmdk-input').addEventListener('input', (e) => {\n      const q = e.target.value.trim().toLowerCase();\n      cmdFiltered = cmdRoutes.filter(r => !q || r.title.toLowerCase().includes(q) || r.group.toLowerCase().includes(q));\n      cmdIndex = 0;\n      renderCmdk();\n    });\n    document.getElementById('cmdk-input').addEventListener('keydown', (e) => {\n      if (e.key === 'ArrowDown') { e.preventDefault(); cmdIndex = Math.min(cmdIndex + 1, cmdFiltered.length - 1); renderCmdk(); }\n      if (e.key === 'ArrowUp') { e.preventDefault(); cmdIndex = Math.max(cmdIndex - 1, 0); renderCmdk(); }\n      if (e.key === 'Enter') { e.preventDefault(); runCmd(cmdFiltered[cmdIndex]); }\n      if (e.key === 'Escape') closeCmdk();\n    });\n    window.addEventListener('keydown', (e) => {\n      if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === 'k') { e.preventDefault(); openCmdk(); }\n      if (e.key === 'Escape') { closeCmdk(); closeNav(); }\n    });\n\n    document.getElementById('team-filter').onchange = (e) => {\n      const v = e.target.value;\n      renderPhotos(v ? allPhotos.filter(p => p.nome_squadra === v) : allPhotos);\n    };\n    document.getElementById('reset-filter').onclick = () => {\n      document.getElementById('team-filter').value = '';\n      renderPhotos(allPhotos);\n    };\n    document.getElementById('btn-cal-print').onclick = () => { openCalPrint(); };\n    document.getElementById('cal-print-close').onclick = () => {\n      document.getElementById('cal-print-modal').hidden = true;\n    };\n    document.getElementById('cal-print-modal').onclick = (e) => {\n      if (e.target.id === 'cal-print-modal') e.currentTarget.hidden = true;\n    };\n    document.getElementById('cal-print-mode-period').onclick = () => setCalPrintMode('period');\n    document.getElementById('cal-print-mode-team').onclick = () => setCalPrintMode('team');\n    document.getElementById('cal-print-scope-all').onclick = () => setCalPrintScope('all');\n    document.getElementById('cal-print-scope-champ').onclick = () => setCalPrintScope('champ');\n    document.getElementById('cal-print-go').onclick = () => { downloadCalPrint(); };\n    setCalPrintMode('period');\n    setCalPrintScope('all');\n\n    document.getElementById('lightbox').onclick = () => { document.getElementById('lightbox').hidden = true; };\n    document.getElementById('m-close').onclick = () => { document.getElementById('match-detail-modal').hidden = true; };\n    document.getElementById('match-detail-modal').onclick = (e) => {\n      if (e.target.id === 'match-detail-modal') e.currentTarget.hidden = true;\n    };\n\n    document.getElementById('cookie-accept-all').onclick = () => {\n      window.abCookieConsent.acceptAll();\n      window.abCookieConsent.closeBanner();\n    };\n    document.getElementById('cookie-essential').onclick = () => {\n      window.abCookieConsent.acceptEssential();\n      window.abCookieConsent.closeBanner();\n    };\n    document.getElementById('cookie-open-policy').onclick = () => {\n      document.getElementById('cookie-modal').hidden = false;\n    };\n    document.getElementById('btn-cookie-policy').onclick = () => {\n      document.getElementById('cookie-modal').hidden = false;\n    };\n    document.getElementById('btn-cookie-settings').onclick = () => window.abCookieConsent.openBanner();\n    document.getElementById('cookie-modal-close').onclick = () => {\n      document.getElementById('cookie-modal').hidden = true;\n    };\n    document.getElementById('cookie-modal').onclick = (e) => {\n      if (e.target.id === 'cookie-modal') e.currentTarget.hidden = true;\n    };\n\n    document.addEventListener('ab-cookie-consent', (e) => {\n      if (e.detail?.level === 'all') initTimeline();\n    });\n  }\n\n  function loadHomeNewsCards() {\n    const root = document.querySelector('#news-section .news-grid');\n    if (!root) return;\n    const absUrl = (s) => {\n      const t = String(s ?? '').trim();\n      return \/^https?:\\\/\\\/\/i.test(t) ? t : '';\n    };\n    const unlockImg = (img) => {\n      if (!img || !img.getAttribute('crossorigin')) return;\n      img.removeAttribute('crossorigin');\n      try { img.crossOrigin = null; } catch (e) {}\n    };\n    try {\n      const mo = new MutationObserver(() => {\n        root.querySelectorAll('img[crossorigin]').forEach(unlockImg);\n      });\n      mo.observe(root, { childList: true, subtree: true, attributes: true, attributeFilter: ['crossorigin'] });\n    } catch (e) {}\n    fetch(apiUrl('api_home_news.php', { action: 'public', t: Date.now() }))\n      .then((res) => res.json())\n      .then((data) => {\n        const items = Array.isArray(data.items) ? data.items : [];\n        if (!items.length) return;\n        root.replaceChildren();\n        items.forEach((item) => {\n          const src = absUrl(item.image_url);\n          if (!src) return;\n          const article = document.createElement('article');\n          article.className = 'news-card';\n          const img = document.createElement('img');\n          img.alt = item.titolo || 'News';\n          img.decoding = 'async';\n          img.addEventListener('error', () => {\n            if (img.dataset.retry === '1' || !item.id) return;\n            img.dataset.retry = '1';\n            unlockImg(img);\n            img.src = apiUrl('api_home_news.php', { action: 'image', id: item.id });\n          });\n          const href = absUrl(item.link_url);\n          if (href) {\n            const a = document.createElement('a');\n            a.href = href;\n            a.target = '_blank';\n            a.rel = 'noopener noreferrer';\n            a.appendChild(img);\n            article.appendChild(a);\n          } else {\n            article.appendChild(img);\n          }\n          root.appendChild(article);\n          unlockImg(img);\n          img.src = src;\n        });\n      })\n      .catch(() => {});\n  }\n\n  \/* ---------- Boot ---------- *\/\n  wire();\n  runIntro();\n  loadHomeNewsCards();\n  loadNews();\n  loadActiveSeasonLabel();\n  setInterval(() => paintDiretta(Date.now()), 1000);\n  setInterval(refreshDirettaMatches, 60000);\n  initTimeline();\n  loadPhotos();\n  loadResults();\n  loadSurveyBadge();\n})();\n<\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Avigliana Basket \u2014 PULSE \u00b7 Book Avigliana Basket Salta Intro Avigliana Basket Avigliana Basket IT EN Menu Menu Avigliana Basket [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"full-width-container","site-content-style":"unboxed","site-sidebar-style":"default","ast-global-header-display":"disabled","ast-banner-title-visibility":"disabled","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"disabled","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-5748","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.aviglianabasket.it\/index.php?rest_route=\/wp\/v2\/pages\/5748","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aviglianabasket.it\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.aviglianabasket.it\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.aviglianabasket.it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aviglianabasket.it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5748"}],"version-history":[{"count":202,"href":"https:\/\/www.aviglianabasket.it\/index.php?rest_route=\/wp\/v2\/pages\/5748\/revisions"}],"predecessor-version":[{"id":6705,"href":"https:\/\/www.aviglianabasket.it\/index.php?rest_route=\/wp\/v2\/pages\/5748\/revisions\/6705"}],"wp:attachment":[{"href":"https:\/\/www.aviglianabasket.it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}