/* Pool del Chiese — Agenda.
   Il selettore società/squadra (agp-*) è del sito; il pannello scuro (ag-*, pc-*, pcm-*)
   ricalca la vista pubblica del gestionale: stesse classi, stesse misure, stessi colori. */

/* ---------- Selettore società / squadra ---------- */
.agp { display: grid; gap: 1.5rem; margin-bottom: 1.8rem; }
.agp-label { display: flex; align-items: center; gap: .6rem; margin: 0 0 .75rem; font: 700 1.15rem/1 var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--ink); }
.agp-label small { font: 500 .95rem/1 var(--body); text-transform: none; letter-spacing: 0; color: var(--muted); }
.agp-label b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--yellow); font: 800 italic 1.1rem/1 var(--display); letter-spacing: 0; }
.agp-clubs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .7rem; }
.agp-club { --c: var(--ink); position: relative; display: flex; flex-direction: column; align-items: center; gap: .55rem; padding: .95rem .4rem .75rem; background: #fff; border: 2px solid var(--line); border-radius: var(--r); cursor: pointer; font: 700 1.05rem/1.05 var(--display); text-transform: uppercase; letter-spacing: .03em; color: var(--ink); transition: transform .25s cubic-bezier(.2, .7, .2, 1), border-color .2s, box-shadow .25s, background .2s; }
.agp-club img { height: 54px; width: auto; max-width: 86%; object-fit: contain; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.agp-club:hover { transform: translateY(-4px); border-color: var(--c); box-shadow: 0 16px 28px -18px var(--c); }
.agp-club:hover img { transform: scale(1.1); }
.agp-club[aria-pressed="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 28%, transparent), 0 16px 28px -18px var(--c); }
.agp-club[aria-pressed="true"]::after { content: "✓"; position: absolute; top: -9px; right: -9px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--c); color: #fff; font: 700 14px/1 var(--body); box-shadow: 0 0 0 3px var(--paper); }
.agp-teams { display: flex; flex-wrap: wrap; gap: .5rem; }
.agp-team { display: inline-flex; align-items: center; gap: .45rem; padding: .62rem 1rem; border-radius: 999px; border: 2px solid var(--line); background: #fff; color: var(--ink); font: 700 1.08rem/1 var(--display); text-transform: uppercase; letter-spacing: .04em; cursor: pointer; transition: transform .2s, border-color .2s, background .2s, color .2s; }
.agp-team i { font-style: normal; opacity: .75; }
.agp-team:hover { border-color: var(--ink); transform: translateY(-2px); }
.agp-team[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.agp-team[aria-pressed="true"] i { opacity: 1; color: var(--yellow); }
.agp-note { margin: .7rem 0 0; color: var(--muted); font-size: .98rem; }
/* pulsante che apre le categorie: solo su schermi stretti, dove le pastiglie sarebbero troppe */
.agp-fold { display: none; }
@media (max-width: 860px) {
  /* il calendario del Pool da solo al centro, poi le società tre per riga */
  .agp-clubs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .agp-club:first-child { grid-column: 1 / -1; justify-self: center; width: calc((100% - 1.4rem) / 3); }
}
@media (max-width: 760px) {
  .agp-fold { display: flex; align-items: center; justify-content: space-between; gap: .8rem; width: 100%; min-height: 50px; padding: .6rem 1rem; border: 2px solid var(--ink); border-radius: 13px; background: #fff; color: var(--ink); font: 700 1.08rem/1.15 var(--display); text-transform: uppercase; letter-spacing: .04em; text-align: left; cursor: pointer; }
  .agp-fold::after { content: ""; flex: none; width: 9px; height: 9px; margin: -4px 4px 0; border-right: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: rotate(45deg); }
  .agp-fold[aria-expanded="true"] { background: var(--ink); color: #fff; }
  .agp-fold[aria-expanded="true"]::after { margin-top: 4px; transform: rotate(-135deg); }
  .agp-fold[aria-expanded="false"] + .agp-teams { display: none; }
  .agp-fold + .agp-teams { margin-top: .6rem; }
}
@media (max-width: 460px) {
  .agp-clubs { gap: .5rem; }
  .agp-club:first-child { width: calc((100% - 1rem) / 3); }
  .agp-club { font-size: .9rem; padding: .7rem .2rem .55rem; gap: .4rem; }
  .agp-club img { height: 42px; }
  .agp-team { font-size: 1rem; padding: .55rem .8rem; }
}

/* ---------- Pannello (tema scuro del gestionale) ---------- */
.pdc-ag {
  --ag-bg: #10131c; --ag-bg2: #161a28; --ag-bg3: #1e2235; --ag-bg4: #262c44; --ag-surface: #1a1f30;
  --ag-border: rgba(255, 255, 255, .10); --ag-border2: rgba(255, 255, 255, .18); --ag-border3: rgba(255, 255, 255, .28);
  --ag-text: #edf0fa; --ag-text2: #a8b0ce; --ag-text3: #8089a8; --ag-accent: #5b8aff;
}
/* la fascia in alto ha un colore per ogni calendario attivo (--ag-bar, da agenda.js) */
.ag-panel { max-width: 1100px; margin-inline: auto; background: var(--ag-bar, linear-gradient(var(--ag-accent), var(--ag-accent))) top / 100% 6px no-repeat, var(--ag-bg); color: var(--ag-text); border-radius: 18px; padding: 24px 16px 26px; box-shadow: 0 26px 60px -30px rgba(13, 16, 32, .7); font-family: var(--body); line-height: 1.35; }
.ag-panel button { font-family: inherit; }

.ag-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.ag-head.ag-head-pub { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 12px; }
.ag-head.ag-head-pub > div:first-child { display: contents; }
.ag-head.ag-head-pub .ag-sub { grid-column: 1 / -1; grid-row: 2; margin-top: 0; }
.ag-head.ag-head-pub .ag-gcal { grid-column: 2; grid-row: 1; }
.ag-title { display: flex; align-items: center; gap: 10px; min-width: 0; font: 800 italic 1.7rem/1.05 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.ag-title .dot { flex: none; width: 10px; height: 26px; border-radius: 4px; background: var(--ag-dot, var(--ag-accent)); }
.ag-title-tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ag-sub { font-size: 13px; color: var(--ag-text3); font-weight: 500; margin-top: 2px; }
.ag-legend-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--ag-border2); background: var(--ag-bg3); color: var(--ag-text2); font: italic 800 13px/1 Georgia, serif; cursor: pointer; padding: 0; text-transform: none; }
.ag-legend-btn:hover { color: var(--ag-accent); border-color: var(--ag-accent); }

.ag-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.ag-spacer { flex: 1 1 auto; }
.ag-seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--ag-bg3); border: 1px solid var(--ag-border); border-radius: 11px; }
.ag-seg button { border: 0; background: transparent; color: var(--ag-text2); font: 700 13.5px/1 var(--body); padding: 8px 12px; border-radius: 8px; cursor: pointer; transition: background .15s, color .15s; }
.ag-seg button:hover { color: var(--ag-text); }
.ag-seg button.on { background: var(--ag-accent); color: #fff; }
.ag-btn { display: inline-flex; align-items: center; gap: 7px; background: var(--ag-accent); color: #fff; border: none; border-radius: 10px; padding: 10px 16px; font: 700 13.5px/1 var(--body); cursor: pointer; }
.ag-btn.ghost { background: var(--ag-surface); color: var(--ag-text); border: 1px solid var(--ag-border); }
.ag-btn.ghost:hover { border-color: var(--ag-border3); }

/* ---------- Mini-calendario del mese ---------- */
.ag-pubcal-wrap { margin: 2px 0 16px; background: var(--ag-bg2); border: 1px solid var(--ag-border2); border-radius: 14px; padding: 12px 12px 10px; }
.ag-pubcal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 2px 8px; }
.ag-pubcal-title { font-size: 15.5px; font-weight: 700; color: var(--ag-text); text-transform: capitalize; }
.pc-nav { display: flex; align-items: center; gap: 6px; }
.pc-nav button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--ag-border2); background: var(--ag-bg3); color: var(--ag-text); font-size: 16px; font-weight: 800; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.pc-nav button:hover { background: var(--ag-bg4); border-color: var(--ag-text3); }
.pc-nav .pc-nav-today { width: auto; padding: 0 10px; font-size: 12px; letter-spacing: .04em; }
.ag-pubcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.ag-pubcal .pc-h { text-align: center; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: var(--ag-text3); padding: 2px 0 4px; }
.pc-cell { position: relative; min-height: 62px; border-radius: 9px; background: var(--ag-bg3); border: 1px solid var(--ag-border2); padding: 15px 4px 3px; display: flex; box-sizing: border-box; }
.pc-void { background: transparent; border-color: transparent; }
.pc-num { position: absolute; top: 3px; left: 5px; font-size: 12px; font-weight: 700; color: var(--ag-text2); line-height: 1; }
.pc-icons { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; overflow: hidden; min-width: 0; }
.pc-ev { display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1; }
.pc-ev-r { display: flex; align-items: center; justify-content: center; gap: 3px; line-height: 1; }
.pc-emo { font-size: 12px; line-height: 1; }
.pc-logo { width: 16px; height: 16px; object-fit: contain; border-radius: 3px; flex-shrink: 0; }
.pc-logo-big { width: 27px; height: 27px; border-radius: 5px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .4)); }
.pc-more { font-size: 10px; font-weight: 700; color: var(--ag-text2); line-height: 1; }
.pc-click { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.pc-click:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, .28); }
.pc-past { opacity: .32; filter: grayscale(.65); pointer-events: none; }
.pc-today .pc-num { color: #fff; background: var(--ag-accent); border-radius: 5px; padding: 1px 4px; margin: -1px -1px 0; }
.pc-other { border-color: var(--ag-text3); }
.pc-green { background: rgba(46, 125, 50, .28); border-color: #2e7d32; }
.pc-green .pc-num { color: #7dd98a; }
.pc-gold { background: linear-gradient(135deg, rgba(122, 95, 19, .38), rgba(201, 162, 39, .42) 45%, rgba(138, 109, 26, .38)); border-color: #f2c200; overflow: hidden; }
.pc-gold .pc-num { color: #ffe89a; }
.pc-gold::after { content: ""; position: absolute; top: -70%; left: -80%; width: 55%; height: 260%; background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .34), transparent); transform: rotate(14deg); animation: pcShine 3s ease-in-out infinite; pointer-events: none; }
@keyframes pcShine { 0% { left: -80%; } 60% { left: 140%; } 100% { left: 140%; } }

/* ---------- Lista degli eventi ---------- */
.ag-list { display: flex; flex-direction: column; gap: 18px; }
.ag-daygrp .d { font-size: 17px; font-weight: 700; color: var(--ag-text); text-transform: capitalize; margin-bottom: 9px; padding-bottom: 7px; border-bottom: 1px solid var(--ag-border); }
.ag-today-badge { display: inline-block; margin-left: 10px; background: var(--ag-accent); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 2px 10px; border-radius: 20px; vertical-align: middle; }
.ag-row { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 0; background: var(--ag-surface); border: 1px solid var(--ag-border2); border-radius: 12px; padding: 11px 14px; margin-bottom: 8px; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .10), 0 4px 12px -6px rgba(0, 0, 0, .16); transition: filter .15s, box-shadow .15s, border-color .15s; }
.ag-row:hover { filter: brightness(1.08); border-color: var(--ag-border3); box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .55); }
.ag-row-top { display: flex; align-items: center; gap: 11px; width: 100%; }
.ag-row-foot { width: 100%; margin-top: 7px; display: flex; }
.ag-row .tm { font-size: 14px; font-weight: 700; color: inherit; line-height: 1.4; text-align: center; align-self: center; padding-right: 11px; border-right: 2px solid currentColor; }
.ag-sec { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 0; }
.ag-sec-mid { flex: 0 0 72px; width: 72px; box-sizing: border-box; border-right: 2px solid currentColor; padding-right: 11px; justify-content: center; align-items: center; text-align: center; }
.ag-sec-end { flex: 1 1 auto; min-width: 0; }
.ag-sec .r1 { font-size: 15px; font-weight: 700; line-height: 1.25; display: flex; align-items: center; gap: 5px; color: inherit; }
.ag-sec-end .r1.main { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-pool-circle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.ag-pool-circle img { width: 32px; height: 32px; object-fit: contain; display: block; }
.ag-luogo-link { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; max-width: 100%; min-width: 0; font-size: 12.5px; font-weight: 700; color: inherit; border: 1px solid transparent; border-radius: 8px; padding: 3px 10px; background: rgba(255, 255, 255, .06); text-decoration: none; overflow: hidden; transition: background .15s, box-shadow .15s, filter .15s; cursor: pointer; }
.ag-luogo-link .pin { flex: 0 0 auto; }
.ag-luogo-link .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ag-luogo-link:hover { color: inherit; background: rgba(255, 255, 255, .2); box-shadow: 0 0 0 2px rgba(255, 255, 255, .32) inset; filter: brightness(1.14); }

.ag-card2 { display: grid; grid-template-columns: 88px 1fr; grid-template-rows: auto auto; column-gap: 13px; row-gap: 9px; align-items: stretch; overflow: hidden; }
.ag-card2 > div { min-width: 0; }
/* stemma della società sul lato destro (solo sul sito, quando sono attive più società) */
/* testo breve delle card: solo su schermi stretti */
.ag-c-short { display: none !important; }
@media (max-width: 760px) { .ag-c-long { display: none !important; } .ag-c-short { display: inline !important; } .ag-c-short:empty { display: none !important; } }
/* stemma della società: piccolo, nell'angolo in alto a destra, senza sfondo; il titolo gli lascia il posto */
.ag-c-crest { position: absolute; top: 6px; right: 7px; z-index: 1; line-height: 0; }
.ag-club-circle img { width: 24px; height: 24px; object-fit: contain; display: block; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
.ag-card2.ag-has-crest .ag-c-tr { padding-right: 30px; }
.ag-card2::after { content: ""; position: absolute; top: 0; left: -75%; width: 60%; height: 100%; pointer-events: none; opacity: 0; transform: skewX(-18deg); background: linear-gradient(105deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .10) 38%, rgba(255, 255, 255, .6) 50%, rgba(255, 255, 255, .10) 62%, rgba(255, 255, 255, 0) 100%); }
.ag-card2:hover::after { animation: agShine .85s cubic-bezier(.25, .6, .3, 1); }
@keyframes agShine { 0% { left: -75%; opacity: 0; } 12% { opacity: 1; } 100% { left: 130%; opacity: 0; } }
.ag-card2 .ag-c-tl, .ag-card2 .ag-c-bl { border-right: 1px solid currentColor; border-right-color: color-mix(in srgb, currentColor 28%, transparent); padding-right: 13px; }
.ag-card2 .ag-c-tl, .ag-card2 .ag-c-tr { border-bottom: 1px solid currentColor; border-bottom-color: color-mix(in srgb, currentColor 28%, transparent); padding-bottom: 9px; }
.ag-card2 .ag-c-tr { padding-left: 13px; }
.ag-card2 .ag-c-bl, .ag-card2 .ag-c-br { padding-top: 9px; }
.ag-card2 .ag-c-br { padding-left: 13px; }
.ag-c-tl, .ag-c-bl { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ag-c-tl { gap: 1px; font-weight: 700; }
.ag-c-t1 { font-size: 16px; line-height: 1.12; }
.ag-c-t2 { font-size: 13px; opacity: .72; line-height: 1.12; }
.ag-c-tr { display: flex; flex-direction: column; justify-content: center; gap: 3px; text-align: left; min-width: 0; }
.ag-c-allen { align-items: flex-start; text-align: left; }
.ag-c-head { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 15.5px; line-height: 1.15; min-width: 0; }
.ag-c-avvlogo { width: 25px; height: 25px; flex: 0 0 auto; object-fit: contain; border-radius: 4px; background: transparent; }
.ag-c-avvname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ag-c-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 12.5px; font-weight: 500; opacity: .92; }
.ag-c-typ { display: inline-flex; align-items: center; gap: 3px; }
.ag-c-sep { display: inline-block; width: 1px; height: 11px; background: currentColor; opacity: .32; margin: 0 2px; }
.ag-c-dot { opacity: .45; margin: 0 1px; }
.ag-c-w { white-space: nowrap; }
.ag-c-bl { font-size: 22px; line-height: 1; }
.ag-c-br { display: flex; align-items: center; min-width: 0; }
.ag-c-br .ag-luogo-link { max-width: 100%; }
.ag-goldtag { display: inline-flex; align-items: center; justify-content: center; position: relative; overflow: hidden; max-width: 100%; background: linear-gradient(135deg, #2a2107, #6b541a 45%, #2a2107); color: #ffe6a3; border: 1px solid #c39a3a; border-radius: 5px; padding: 1px 7px; font-size: 10px; font-weight: 700; letter-spacing: .4px; white-space: nowrap; vertical-align: middle; box-shadow: inset 0 1px 0 rgba(255, 236, 170, .3), 0 1px 3px rgba(0, 0, 0, .45); text-shadow: 0 1px 1px rgba(0, 0, 0, .55); }
.ag-goldtag::after { content: ""; position: absolute; top: 0; left: 0; width: 65%; height: 100%; pointer-events: none; background: linear-gradient(105deg, transparent, rgba(255, 244, 200, .78), transparent); transform: translateX(-200%) skewX(-18deg); animation: agGold 3s ease-in-out infinite; }
@keyframes agGold { 0% { transform: translateX(-200%) skewX(-18deg); } 55% { transform: translateX(260%) skewX(-18deg); } 100% { transform: translateX(260%) skewX(-18deg); } }
.ag-empty, .ag-msg { text-align: center; color: var(--ag-text2); font-weight: 500; padding: 46px 10px; }
.ag-msg p { max-width: 46ch; margin: 0 auto 1rem; }
.ag-flag-it { display: inline-block; width: 1.05em; height: .72em; vertical-align: -.08em; border-radius: 2px; background: linear-gradient(90deg, #009246 0 33.33%, #fff 33.33% 66.66%, #ce2b37 66.66% 100%); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .28); }

@media (min-width: 721px) {
  .ag-panel { padding: 28px 22px 30px; }
  .ag-card2 .ag-c-head { font-size: 17px; }
  .ag-card2 .ag-c-meta { font-size: 13.5px; }
  .ag-card2 .ag-c-avvlogo { width: 27px; height: 27px; }
  .ag-card2 .ag-c-br .ag-luogo-link { font-size: 13.5px; padding: 4px 11px; }
}
@media (max-width: 720px) {
  .ag-title { font-size: 1.3rem; }
  .ag-toolbar { gap: 7px; }
  .ag-seg { flex: 1 1 100%; }
  .ag-seg button { flex: 1; padding: 9px 4px; }
  .ag-toolbar .ag-btn { margin-left: auto; }
  .ag-card2 { grid-template-columns: 56px 1fr; column-gap: 8px; row-gap: 5px; }
  .ag-c-crest { top: 5px; right: 6px; }
  .ag-club-circle img { width: 20px; height: 20px; }
  .ag-card2.ag-has-crest .ag-c-tr { padding-right: 24px; }
  .ag-card2.ag-row { padding: 7px 9px; margin-bottom: 7px; }
  .ag-card2 .ag-c-tl, .ag-card2 .ag-c-bl { padding-right: 8px; }
  .ag-card2 .ag-c-tl, .ag-card2 .ag-c-tr { padding-bottom: 5px; }
  .ag-card2 .ag-c-tr { padding-left: 8px; }
  .ag-card2 .ag-c-bl, .ag-card2 .ag-c-br { padding-top: 5px; }
  .ag-c-tl { gap: 0; }
  .ag-c-t1 { font-size: 14.5px; }
  .ag-c-t2 { font-size: 12px; }
  .ag-c-head { font-size: 14.5px; gap: 6px; }
  .ag-c-avvlogo { width: 22px; height: 22px; }
  /* su schermi stretti la riga dei dettagli scorre come un testo e va a capo tra una voce e l'altra */
  .ag-c-meta { display: block; font-size: 11.5px; line-height: 1.55; }
  .ag-c-typ { display: inline; }
  .ag-c-sep { margin: 0 5px; vertical-align: -1px; }
  .ag-c-dot { margin: 0; }
  .ag-c-bl { font-size: 18px; }
  .ag-luogo-link { font-size: 12px; }
  .ag-goldtag::after { display: none; }
  .pc-cell { min-height: 52px; padding: 13px 3px 3px; }
  .pc-emo { font-size: 11px; }
  .pc-logo { width: 13px; height: 13px; }
  .pc-logo-big { width: 26px; height: 26px; }
}

/* ---------- "+GCalendar" ---------- */
.ag-gcal { position: relative; display: inline-flex; padding: 2px; border: 0; border-radius: 14px; background: #c9d3e6; cursor: pointer; overflow: hidden; isolation: isolate; font: inherit; line-height: 1; -webkit-tap-highlight-color: transparent; transition: transform .2s cubic-bezier(.22, 1, .36, 1); animation: agGcalGlow 6s linear infinite; }
.ag-gcal::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 240%; padding-bottom: 240%; transform: translate(-50%, -50%) rotate(0deg); background: conic-gradient(#4285f4, #34a853, #fbbc05, #ea4335, #4285f4); animation: agGcalSpin 3.4s linear infinite; }
.ag-gcal-in { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px 0 10px; border-radius: 12px; background: linear-gradient(180deg, #fff, #eef3fb); color: #202124; font: 700 15px/1 var(--body); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; }
.ag-gcal-in::after { content: ""; position: absolute; top: -30%; bottom: -30%; left: -60%; width: 34%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(66, 133, 244, .24), rgba(251, 188, 5, .32), rgba(234, 67, 53, .2), transparent); animation: agGcalShine 4.2s ease-in-out infinite; pointer-events: none; }
.ag-gcal-ic { width: 21px; height: 21px; flex: 0 0 auto; }
.ag-gcal-tx .p { display: inline-block; color: #34a853; font-size: 17px; margin-right: 1px; animation: agGcalPlus 3.4s ease-in-out infinite; }
.ag-gcal-tx .g { color: #4285f4; }
@media (hover: hover) { .ag-gcal:hover { transform: translateY(-2px) scale(1.04); } .ag-gcal:hover .ag-gcal-in { background: #fff; } .ag-gcal:hover::before { animation-duration: 1.1s; } }
.ag-gcal:active { transform: scale(.95); }
@keyframes agGcalSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes agGcalShine { 0%, 58% { left: -60%; } 88%, 100% { left: 135%; } }
@keyframes agGcalGlow { 0%, 100% { box-shadow: 0 8px 22px -9px rgba(66, 133, 244, .95), 0 2px 7px -2px rgba(0, 0, 0, .4); } 25% { box-shadow: 0 8px 22px -9px rgba(52, 168, 83, .95), 0 2px 7px -2px rgba(0, 0, 0, .4); } 50% { box-shadow: 0 8px 22px -9px rgba(251, 188, 5, .95), 0 2px 7px -2px rgba(0, 0, 0, .4); } 75% { box-shadow: 0 8px 22px -9px rgba(234, 67, 53, .95), 0 2px 7px -2px rgba(0, 0, 0, .4); } }
@keyframes agGcalPlus { 0%, 68%, 100% { transform: rotate(0deg) scale(1); } 80% { transform: rotate(90deg) scale(1.3); } 92% { transform: rotate(180deg) scale(1); } }
.ag-gc-box { display: flex; align-items: center; gap: 13px; background: var(--ag-bg3); border: 1px solid var(--ag-border); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; }
.ag-gc-n { flex: 0 0 auto; min-width: 44px; text-align: center; font-size: 27px; font-weight: 700; line-height: 1; color: var(--ag-text); font-variant-numeric: tabular-nums; }
.ag-gc-t { font-size: 13.5px; line-height: 1.45; color: var(--ag-text2); }
.ag-gc-t b { display: block; font-size: 15px; color: var(--ag-text); margin-bottom: 1px; }
.ag-gc-go { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; box-sizing: border-box; height: 48px; border-radius: 12px; background: #1a73e8; color: #fff; font-size: 16px; font-weight: 700; text-decoration: none; box-shadow: 0 10px 22px -10px rgba(26, 115, 232, .9); transition: transform .15s ease, filter .15s ease; }
.ag-gc-go:hover { color: #fff; filter: brightness(1.08); }
.ag-gc-go:active { transform: scale(.98); }
.ag-gc-go svg { background: #fff; border-radius: 6px; padding: 2px; box-sizing: content-box; }
.ag-gc-steps { margin: 15px 0 0; padding: 0; list-style: none; counter-reset: gc; display: flex; flex-direction: column; gap: 9px; }
.ag-gc-steps li { counter-increment: gc; position: relative; padding-left: 31px; font-size: 14px; line-height: 1.5; color: var(--ag-text2); }
.ag-gc-steps li::before { content: counter(gc); position: absolute; left: 0; top: 0; width: 21px; height: 21px; border-radius: 50%; background: var(--ag-bg3); border: 1px solid var(--ag-border); color: var(--ag-text); font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }
.ag-gc-steps b, .ag-gc-alt b, .ag-gc-note b { color: var(--ag-text); }
.ag-gc-alt { margin-top: 15px; border-top: 1px solid var(--ag-border); padding-top: 13px; font-size: 13.5px; line-height: 1.5; color: var(--ag-text2); }
.ag-gc-url { display: flex; gap: 8px; margin-top: 10px; }
.ag-gc-url input { flex: 1; min-width: 0; box-sizing: border-box; background: var(--ag-bg3); border: 1px solid var(--ag-border); color: var(--ag-text); border-radius: 10px; padding: 9px 11px; font: 600 11.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ag-gc-url .ag-btn { flex: 0 0 auto; padding: 0 14px; }
.ag-gc-list { display: grid; gap: 8px; }
.ag-gc-row { display: flex; align-items: center; gap: 8px; background: var(--ag-bg3); border: 1px solid var(--ag-border); border-radius: 12px; padding: 9px 10px 9px 13px; }
.ag-gc-rt { flex: 1; min-width: 0; }
.ag-gc-rt b { display: block; font-size: 14.5px; color: var(--ag-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-gc-rt span { font-size: 12.5px; color: var(--ag-text3); }
.ag-gc-row .ag-btn { flex: none; padding: 9px 12px; text-decoration: none; }
.ag-gc-row a.ag-btn:hover { color: #fff; filter: brightness(1.1); }
.ag-gc-note { margin-top: 13px; font-size: 13px; line-height: 1.5; color: var(--ag-text3); }

/* ---------- Finestre di dettaglio ---------- */
.pcm-ov { position: fixed; inset: 0; z-index: 1000; background: rgba(5, 8, 16, .66); display: flex; align-items: center; justify-content: center; padding: 18px; backdrop-filter: blur(2px); font-family: var(--body); animation: pcmIn .18s ease; }
.pcm-box { width: 100%; max-width: 430px; max-height: 82vh; overflow: auto; background: var(--ag-bg2); color: var(--ag-text); border: 1px solid var(--ag-border2); border-radius: 16px; padding: 16px 16px 14px; box-shadow: 0 18px 60px rgba(0, 0, 0, .5); animation: pcmUp .22s cubic-bezier(.2, .7, .2, 1); }
.pcm-box.pcm-wide { max-width: 520px; }
@keyframes pcmIn { from { opacity: 0; } }
@keyframes pcmUp { from { transform: translateY(14px) scale(.98); } }
.pcm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pcm-title { font-size: 16.5px; font-weight: 700; color: var(--ag-text); }
.pcm-box:not(.pcm-wide) .pcm-title { text-transform: capitalize; } /* le date: "Domenica 11 Ottobre 2026" */
.pcm-sub { font-size: 13px; color: var(--ag-text3); margin-top: 1px; }
.pcm-x { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--ag-border2); background: var(--ag-bg3); color: var(--ag-text2); font-size: 15px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; flex-shrink: 0; }
.pcm-x:hover { color: var(--ag-text); border-color: var(--ag-text3); }
.pcm-ev { background: var(--ag-bg3); border: 1px solid var(--ag-border2); border-left-width: 5px; border-radius: 11px; padding: 10px 12px; margin-bottom: 9px; }
.pcm-ev:last-child { margin-bottom: 0; }
.pcm-r1 { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.pcm-avvlogo { width: 30px; height: 30px; object-fit: contain; border-radius: 6px; flex-shrink: 0; }
.pcm-bigemo { font-size: 21px; line-height: 1; flex-shrink: 0; }
.pcm-t1 { font-size: 16px; font-weight: 700; color: var(--ag-text); line-height: 1.2; }
.pcm-t2 { font-size: 12.5px; font-weight: 600; color: var(--ag-text3); margin-top: 2px; }
.pcm-rows { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--ag-text2); }
.pcm-row { display: flex; align-items: flex-start; gap: 7px; line-height: 1.45; }
.pcm-row .ic { flex-shrink: 0; }
.pcm-row a, .pcm-row a:hover { color: var(--ag-text2); text-decoration: underline; }
.pcm-row a:hover { color: var(--ag-text); }
.pcm-note { font-style: italic; }

/* la legenda della pagina, riproposta nella finestra "i" */
.pcm-box .legend { display: block; }
.pcm-box .legend > div { background: var(--ag-bg3); border: 1px solid var(--ag-border2); border-radius: 11px; padding: 10px 12px; margin-bottom: 9px; box-shadow: none; transform: none; }
.pcm-box .legend > div::after { display: none; }
.pcm-box .legend h3 { color: var(--ag-text); font-size: 1.1rem; margin-bottom: .4rem; }
.pcm-box .legend li { border-color: var(--ag-border); color: var(--ag-text2); font-size: 13.5px; padding: .25rem 0; }
.pcm-box .legend p { color: var(--ag-text2); font-size: 13.5px; margin: 0; }

/* ---------- Caricamento ---------- */
.ag-skel { display: grid; gap: 10px; }
.ag-skel i { display: block; height: 66px; border-radius: 12px; background: linear-gradient(100deg, var(--ag-bg3) 40%, var(--ag-bg4) 50%, var(--ag-bg3) 60%) 0 0 / 200% 100%; animation: agSkel 1.2s linear infinite; }
.ag-skel i.tall { height: 300px; border-radius: 14px; }
@keyframes agSkel { to { background-position: -200% 0; } }

/* campioni di colore nella legenda */
.lg-sw { flex: none; width: 16px; height: 16px; border-radius: 5px; margin-top: .25rem; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.lg-day { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 1px solid; }
.lg-day.green { background: rgba(46, 125, 50, .28); border-color: #2e7d32; }
.lg-day.gold { background: linear-gradient(135deg, rgba(201, 162, 39, .55), rgba(242, 194, 0, .5)); border-color: #f2c200; }

/* ---------- Movimento ridotto (vedi site.css) ---------- */
@media (prefers-reduced-motion: reduce) {
  html:not(.motion) .agp-club:hover,
  html:not(.motion) .agp-club:hover img,
  html:not(.motion) .agp-team:hover,
  html:not(.motion) .pc-click:hover,
  html:not(.motion) .ag-gcal:hover { transform: none; }
  html:not(.motion) .ag-card2::after, html:not(.motion) .ag-goldtag::after, html:not(.motion) .pc-gold::after, html:not(.motion) .ag-gcal-in::after { display: none; }
}

/* ---------- Su schermi stretti le categorie sono un elenco di voci, non pastiglie ---------- */
@media (max-width: 760px) {
  .agp-fold + .agp-teams { display: block; max-height: 300px; overflow-y: auto; overscroll-behavior: contain; border: 2px solid var(--ink); border-radius: 13px; background: #fff; }
  .agp-fold[aria-expanded="false"] + .agp-teams { display: none; }
  .agp-fold + .agp-teams .agp-team { display: flex; width: 100%; min-height: 44px; padding: .35rem .9rem; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fff; color: var(--ink); text-align: left; transform: none; }
  .agp-fold + .agp-teams .agp-team:last-child { border-bottom: 0; }
  .agp-fold + .agp-teams .agp-team::after { content: ""; flex: none; width: 20px; height: 20px; margin-left: auto; border: 2px solid var(--line); border-radius: 6px; }
  .agp-fold + .agp-teams .agp-team[aria-pressed="true"] { background: var(--paper); }
  .agp-fold + .agp-teams .agp-team[aria-pressed="true"] i { color: inherit; }
  .agp-fold + .agp-teams .agp-team[aria-pressed="true"]::after { content: "✓"; display: grid; place-items: center; border-color: var(--ink); background: var(--ink); color: var(--yellow); font: 700 13px/1 var(--body); }
}
