/* ============================================================
   SQUADRE SELECTOR — stile EA Sports FC (selezione club)
   Layout centrato nel viewport
   ============================================================ */
@font-face {
  font-family: 'Nevera';
  src: url('fonts/Nevera-Regular.otf') format('opentype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

#view-squadre {
  background: #050810 !important;
  width: 100% !important;
  max-width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
#view-squadre .pf-page {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100% !important;
  background:
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(2, 80, 140, 0.22) 0%, transparent 55%),
    linear-gradient(180deg, #07101c 0%, #050810 45%, #03060c 100%) !important;
  overflow-x: hidden;
  overflow-y: auto;
}
#view-squadre .pf-page-bg,
#view-squadre .pf-page-shade {
  display: none !important;
}
/* Contenitore pagina: centrato, larghezza bilanciata */
#view-squadre .pf-page-inner,
#view-squadre .container.pf-page-inner {
  width: 100% !important;
  max-width: 1180px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-top: 5.25rem !important;
  padding-bottom: 2.25rem !important;
  padding-left: clamp(1rem, 3.5vw, 2rem) !important;
  padding-right: clamp(1rem, 3.5vw, 2rem) !important;
  box-sizing: border-box !important;
  float: none !important;
  position: relative !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
}

/* Blocco contenuto squadre: colonna centrata */
#squadre-content {
  width: 100%;
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.es-sq-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto 1.25rem;
  box-sizing: border-box;
}
.es-sq-topbar h1 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #fff;
  text-transform: uppercase;
  text-align: left;
}
.es-sq-back {
  flex-shrink: 0;
  margin-left: auto;
}
.es-sq-topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.es-sq-topbar-actions .btn {
  min-height: 44px;
}

/* Toggle maschili / femminili — centrato */
.es-sq-gender {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 auto 0.75rem;
  font-size: 0.9rem;
  color: #cbd5e1;
  text-align: center;
}
.es-sq-gender label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.es-sq-gender input {
  accent-color: #22c55e;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.es-sq-country {
  width: 100%;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: #e2e8f0;
  text-transform: uppercase;
  margin: 0 auto 1.15rem;
}

/* Layout principale 2 colonne bilanciate, blocco centrato */
.es-sq-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.9fr);
  gap: 1.15rem 1.35rem;
  align-items: stretch;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  box-sizing: border-box;
  justify-content: center;
}

/* Card stemma centrale */
.es-sq-main {
  position: relative;
  background: linear-gradient(165deg, rgba(12, 18, 32, 0.95) 0%, rgba(6, 10, 18, 0.98) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.08),
    0 25px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 1.5rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 420px;
  overflow: hidden;
}
.es-sq-main::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at 50% 40%, rgba(56, 189, 248, 0.08), transparent 55%);
}

/* Anello accento homepage al cambio squadra */
.es-sq-gold-ring {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  border-radius: inherit;
  overflow: hidden;
}
.es-sq-gold-ring svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.es-sq-gold-draw {
  fill: none;
  stroke: #38bdf8;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter:
    drop-shadow(0 0 5px rgba(56, 189, 248, 0.85))
    drop-shadow(0 0 12px rgba(2, 132, 199, 0.45));
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  opacity: 0;
}
.es-sq-main.is-gold-sweep .es-sq-gold-draw {
  animation: esSqGoldSweep 0.68s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.es-sq-main.is-gold-sweep {
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.28),
    0 0 26px rgba(2, 132, 199, 0.22),
    0 25px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  border-color: rgba(56, 189, 248, 0.55);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
@keyframes esSqGoldSweep {
  0% {
    stroke-dashoffset: 100;
    opacity: 0.15;
  }
  12% {
    opacity: 1;
  }
  62% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

.es-sq-team-title-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 0 0 1.15rem;
  width: 100%;
  max-width: 100%;
  padding: 0 0.5rem;
  box-sizing: border-box;
}
.es-sq-team-name {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: 'Nevera', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
  text-transform: uppercase;
  text-align: center;
  min-width: 0;
}

.es-sq-team-name.is-foggia-city,
[data-team="foggia-city"] .es-sq-team-name,
#es-sq-team-name.is-foggia-city,
.es-sq-city-name.is-foggia-city,
[data-team="foggia-city"] .es-sq-city-name,
#es-sq-city.is-foggia-city {
  font-family: 'Nevera', sans-serif !important;
  letter-spacing: 0.14em;
}
/* Badge verificato / non verificato (progetto ELISEE) */
.es-sq-verify-badge {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
  -webkit-user-select: none;
  user-select: none;
  pointer-events: auto;
}
.es-sq-verify-badge.is-verified {
  filter: drop-shadow(0 0 10px rgba(29, 155, 240, 0.55));
}
.es-sq-verify-badge.is-unverified {
  opacity: 0.92;
}

.es-sq-crest-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  width: 100%;
  flex: 1;
  min-height: 220px;
}

.es-sq-nav-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  flex-shrink: 0;
}
.es-sq-nav-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.55);
  color: #7dd3fc;
}
.es-sq-nav-btn:active {
  transform: scale(0.94);
}
.es-sq-nav-btn svg {
  width: 22px;
  height: 22px;
}

.es-sq-crest {
  width: min(210px, 44vw);
  height: min(210px, 44vw);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(circle at 50% 45%, rgba(255,255,255,0.08), rgba(0,0,0,0.25));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.12s ease-out;
  will-change: transform, opacity;
  transform: translateZ(0);
  overflow: hidden;
}
.es-sq-crest.is-anim {
  transform: scale(0.94) translateZ(0);
  opacity: 0.8;
}
.es-sq-crest-img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.35));
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
  position: relative;
  z-index: 2;
}
.es-sq-crest-fallback {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.06em;
  border-radius: 50%;
  background: transparent;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
  padding: 10px;
  box-sizing: border-box;
}
.es-sq-crest-fallback svg {
  max-width: 82%;
  max-height: 82%;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.65));
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateZ(0);
}
.es-sq-card:hover .es-sq-crest-fallback svg,
.es-sq-main:hover .es-sq-crest-fallback svg {
  transform: scale(1.05) translateZ(0);
}
.es-sq-crest-fallback[hidden] {
  display: none !important;
}

/* Posizione classifica al posto delle stelle */
.es-sq-standings,
.es-sq-stars {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-top: 1.15rem;
  text-align: center;
}
.es-sq-pos-main {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}
.es-sq-pos-num {
  font-size: clamp(1.65rem, 3.5vw, 2.15rem);
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: 0.02em;
}
.es-sq-pos-num.es-sq-pos-pre {
  color: #64748b;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  min-width: 1.2em;
  text-align: center;
  text-shadow: none;
}
.es-sq-pos-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.35);
  color: #cbd5e1;
}
.es-sq-pos-meta {
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.04em;
}
.es-sq-thumb-img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}
.es-sq-thumb {
  background: rgba(255,255,255,0.06) !important;
  overflow: hidden;
}

.es-sq-league {
  position: relative;
  z-index: 1;
  margin-top: 1.15rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #e2e8f0;
  text-transform: uppercase;
  text-align: center;
}

/* Colonna destra: divisa + città (allineata a destra del blocco stage) */
.es-sq-side {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
  min-width: 0;
  justify-self: stretch;
}
.es-sq-panel {
  background: linear-gradient(165deg, rgba(12, 18, 32, 0.95) 0%, rgba(6, 10, 18, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1rem 1rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.es-sq-panel-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.25rem;
}
.es-sq-panel-title {
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

/* Carosello divise: corrente al centro, prev/next più piccole */
.es-sq-kit-panel {
  position: relative;
  overflow: hidden;
  outline: none;
  cursor: pointer;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
/* Luce in focus allineata all'accento homepage */
.es-sq-kit-panel::after,
.es-sq-main::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 42%;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  background:
    linear-gradient(
      180deg,
      rgba(150, 245, 255, 0.42) 0%,
      rgba(56, 210, 230, 0.26) 18%,
      rgba(24, 130, 160, 0.1) 52%,
      transparent 100%
    );
  box-shadow: inset 0 1px 0 rgba(200, 250, 255, 0.35);
  transition: opacity 0.22s ease;
}
.es-sq-kit-panel:focus::after,
.es-sq-kit-panel.is-focused::after,
.es-sq-main:focus::after,
.es-sq-main.is-focused::after {
  opacity: 1;
  animation: esSqFocusWash 2.4s ease-in-out infinite;
}
.es-sq-kit-panel > *,
.es-sq-main > *:not(.es-sq-gold-ring):not(.es-sq-picker) {
  position: relative;
  z-index: 1;
}
.es-sq-kit-panel:focus,
.es-sq-kit-panel.is-focused,
.es-sq-main:focus,
.es-sq-main.is-focused {
  border-color: rgba(90, 230, 245, 0.88);
  box-shadow:
    0 0 0 1px rgba(90, 230, 245, 0.28),
    0 0 26px rgba(40, 200, 220, 0.22),
    inset 0 1px 0 rgba(190, 250, 255, 0.28);
}
@keyframes esSqFocusWash {
  0%, 100% { opacity: 0.78; }
  50% { opacity: 1; }
}
.es-sq-kit-stage {
  position: relative;
  width: 100%;
  min-height: 168px;
  margin: 0.1rem 0 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 980px;
  perspective-origin: 50% 58%;
  transform-style: preserve-3d;
}
.es-sq-kit-floor {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 108px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at center, rgba(90, 230, 255, 0.32) 0%, rgba(40, 160, 210, 0.08) 55%, transparent 72%);
  filter: blur(3px);
  opacity: 0.55;
}
.es-sq-kit-stage.is-kit-shift-next .es-sq-kit-floor,
.es-sq-kit-stage.is-kit-shift-prev .es-sq-kit-floor {
  animation: none;
}
.es-sq-kit {
  width: 128px;
  height: 150px;
  position: relative;
  z-index: 3;
  margin: 0;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.34));
  will-change: transform, opacity, filter;
  transform-style: preserve-3d;
  transform: translateZ(0) scale(1);
}
.es-sq-kit-leave {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 128px;
  height: 150px;
  margin: 0;
  z-index: 4;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.3));
}
.es-sq-kit-leave[hidden] {
  display: none !important;
}
.es-sq-kit-leave-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}
.es-sq-kit-shine {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  -webkit-mask-image: none;
}
.es-sq-kit-shine::after {
  content: "";
  position: absolute;
  top: -25%;
  bottom: -25%;
  width: 42%;
  left: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(180, 250, 255, 0.08) 22%,
    rgba(255, 255, 255, 0.72) 50%,
    rgba(180, 250, 255, 0.1) 78%,
    transparent 100%
  );
  transform: translateX(-170%) skewX(-22deg);
}
.es-sq-kit-stage.is-kit-shift-next .es-sq-kit,
.es-sq-kit-stage.is-kit-shift-prev .es-sq-kit {
  animation: esSqKitEnterNext 0.54s cubic-bezier(0.16, 0.82, 0.16, 1) both;
}
.es-sq-kit-stage.is-kit-shift-prev .es-sq-kit {
  animation-name: esSqKitEnterPrev;
}
.es-sq-kit-stage.is-kit-shift-next .es-sq-kit-leave {
  animation: esSqKitLeaveNext 0.5s cubic-bezier(0.28, 0.12, 0.22, 1) both;
}
.es-sq-kit-stage.is-kit-shift-prev .es-sq-kit-leave {
  animation: esSqKitLeavePrev 0.5s cubic-bezier(0.28, 0.12, 0.22, 1) both;
}
.es-sq-kit-stage.is-kit-shift-next .es-sq-kit-shine,
.es-sq-kit-stage.is-kit-shift-prev .es-sq-kit-shine,
.es-sq-kit-stage.is-kit-shift-next .es-sq-kit-shine::after,
.es-sq-kit-stage.is-kit-shift-prev .es-sq-kit-shine::after {
  opacity: 0 !important;
  animation: none !important;
}
.es-sq-kit-stage.is-kit-shift-next .es-sq-kit-ghost--prev {
  animation: esSqGhostDriftL 0.54s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.es-sq-kit-stage.is-kit-shift-next .es-sq-kit-ghost--next {
  animation: esSqGhostDriftR 0.54s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.es-sq-kit-stage.is-kit-shift-prev .es-sq-kit-ghost--prev {
  animation: esSqGhostDriftR 0.54s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.es-sq-kit-stage.is-kit-shift-prev .es-sq-kit-ghost--next {
  animation: esSqGhostDriftL 0.54s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.es-sq-panel-title.is-kit-title-swap {
  animation: esSqKitTitleSwap 0.42s cubic-bezier(0.18, 0.86, 0.2, 1) both;
}
@keyframes esSqKitEnterNext {
  0% {
    transform: translateX(-92px) translateZ(-110px) rotateY(34deg) scale(0.68);
    opacity: 0.15;
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.34));
  }
  58% {
    opacity: 1;
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.34));
  }
  100% {
    transform: translateX(0) translateZ(0) rotateY(0deg) scale(1);
    opacity: 1;
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.34));
  }
}
@keyframes esSqKitEnterPrev {
  0% {
    transform: translateX(92px) translateZ(-110px) rotateY(-34deg) scale(0.68);
    opacity: 0.15;
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.34));
  }
  58% {
    opacity: 1;
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.34));
  }
  100% {
    transform: translateX(0) translateZ(0) rotateY(0deg) scale(1);
    opacity: 1;
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.34));
  }
}
@keyframes esSqKitLeaveNext {
  0% {
    transform: translate(-50%, -50%) translateZ(0) rotateY(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + 96px), -50%) translateZ(-120px) rotateY(-32deg) scale(0.62);
    opacity: 0;
  }
}
@keyframes esSqKitLeavePrev {
  0% {
    transform: translate(-50%, -50%) translateZ(0) rotateY(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% - 96px), -50%) translateZ(-120px) rotateY(32deg) scale(0.62);
    opacity: 0;
  }
}
@keyframes esSqGhostDriftL {
  0% { transform: translateY(calc(-50% + 10px)) scale(0.9); }
  40% { transform: translateY(calc(-50% + 10px)) translateX(-10px) scale(0.84); opacity: 0.7; }
  100% { transform: translateY(calc(-50% + 10px)) scale(0.9); opacity: 1; }
}
@keyframes esSqGhostDriftR {
  0% { transform: translateY(calc(-50% + 10px)) scale(0.9); }
  40% { transform: translateY(calc(-50% + 10px)) translateX(10px) scale(0.84); opacity: 0.7; }
  100% { transform: translateY(calc(-50% + 10px)) scale(0.9); opacity: 1; }
}
@keyframes esSqKitFloorPulse {
  0% { opacity: 0.35; transform: translateX(-50%) scaleX(0.7); }
  45% { opacity: 0.95; transform: translateX(-50%) scaleX(1.18); }
  100% { opacity: 0.55; transform: translateX(-50%) scaleX(1); }
}
@keyframes esSqKitTitleSwap {
  0% {
    opacity: 0;
    transform: translateY(7px);
    letter-spacing: 0.2em;
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: none;
    letter-spacing: 0.1em;
    filter: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .es-sq-kit-stage.is-kit-shift-next .es-sq-kit,
  .es-sq-kit-stage.is-kit-shift-prev .es-sq-kit,
  .es-sq-kit-stage.is-kit-shift-next .es-sq-kit-leave,
  .es-sq-kit-stage.is-kit-shift-prev .es-sq-kit-leave,
  .es-sq-kit-stage.is-kit-shift-next .es-sq-kit-ghost--prev,
  .es-sq-kit-stage.is-kit-shift-next .es-sq-kit-ghost--next,
  .es-sq-kit-stage.is-kit-shift-prev .es-sq-kit-ghost--prev,
  .es-sq-kit-stage.is-kit-shift-prev .es-sq-kit-ghost--next {
    animation: none !important;
  }
}
.es-sq-kit-ghost {
  position: absolute;
  top: 50%;
  width: 78px;
  height: 94px;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  z-index: 1;
  overflow: visible !important;
  isolation: auto !important;
  transform: translateY(calc(-50% + 10px)) scale(0.9);
  filter: none !important;
  opacity: 1;
  transition: transform 0.18s ease;
}
.es-sq-kit-ghost:hover,
.es-sq-kit-ghost:focus,
.es-sq-kit-ghost:focus-visible,
.es-sq-kit-ghost:active {
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  border: 0 !important;
  filter: none !important;
  transform: translateY(calc(-50% + 8px)) scale(0.96);
}
/* spegne il gloss rettangolare globale dei button */
.es-sq-kit-ghost::before,
.es-sq-kit-ghost::after,
.es-sq-kit-ghost:hover::before,
.es-sq-kit-ghost:hover::after,
.es-sq-kit-ghost:focus::after {
  content: none !important;
  display: none !important;
  animation: none !important;
  opacity: 0 !important;
  background: none !important;
}
.es-sq-kit-ghost--prev { left: 4%; }
.es-sq-kit-ghost--next { right: 4%; }
.es-sq-kit-ghost[hidden] {
  display: none !important;
}
.es-sq-kit-ghost-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  filter: brightness(0.55) saturate(0.75);
  opacity: 0.5;
  transition: filter 0.18s ease, opacity 0.18s ease;
}
.es-sq-kit-ghost:hover .es-sq-kit-ghost-img {
  filter: brightness(1.08) saturate(1);
  opacity: 1;
}
.es-sq-kit-ghost-veil {
  display: none !important;
}
.es-sq-kit-ghost-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
  opacity: 0;
  -webkit-mask-image: var(--kit-src);
  mask-image: var(--kit-src);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.es-sq-kit-ghost-shine::after {
  content: "" !important;
  display: block !important;
  position: absolute;
  top: -20%;
  bottom: -20%;
  width: 46%;
  left: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 28%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(255, 255, 255, 0.15) 72%,
    transparent 100%
  ) !important;
  transform: translateX(-160%) skewX(-20deg);
  opacity: 1 !important;
  animation: none !important;
}
.es-sq-kit-ghost:hover .es-sq-kit-ghost-shine,
.es-sq-kit-ghost:hover .es-sq-kit-ghost-shine::after {
  display: none !important;
  animation: none !important;
}
.es-sq-kit-stage.is-solo .es-sq-kit-ghost {
  display: none !important;
}
.es-sq-kit-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 2;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
  will-change: opacity, transform;
  transform: translateZ(0);
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.55));
}
.es-sq-kit-img[hidden],
.es-sq-kit-img.is-hidden {
  display: none !important;
}
.es-sq-kit-vector {
  position: absolute;
  inset: 0;
}
.es-sq-kit-vector[hidden] {
  display: none !important;
}
.es-sq-kit-body {
  position: absolute;
  left: 50%;
  top: 12%;
  width: 72%;
  height: 72%;
  transform: translateX(-50%);
  border-radius: 12px 12px 18px 18px;
  clip-path: polygon(18% 0, 82% 0, 100% 14%, 100% 100%, 0 100%, 0 14%);
}
.es-sq-kit-sleeve-l,
.es-sq-kit-sleeve-r {
  position: absolute;
  top: 14%;
  width: 28%;
  height: 28%;
  border-radius: 8px;
}
.es-sq-kit-sleeve-l { left: 2%; transform: skewY(12deg); }
.es-sq-kit-sleeve-r { right: 2%; transform: skewY(-12deg); }
.es-sq-kit-collar {
  position: absolute;
  left: 50%;
  top: 8%;
  width: 28%;
  height: 10%;
  transform: translateX(-50%);
  border-radius: 0 0 50% 50%;
  background: rgba(0, 0, 0, 0.35);
}

.es-sq-kit-groups {
  display: none !important;
}
.es-sq-kit-groups[hidden] { display: none !important; }
.es-sq-kit-group {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: transparent;
  color: #94a3b8;
  border-radius: 999px;
  padding: 0.22rem 0.62rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.es-sq-kit-group:hover {
  border-color: rgba(56, 189, 248, 0.55);
  color: #7dd3fc;
}
.es-sq-kit-group.is-on {
  border-color: rgba(56, 189, 248, 0.7);
  background: rgba(56, 189, 248, 0.16);
  color: #e0f2fe;
}
.es-sq-kit-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  margin-top: auto;
  padding: 4px 8px;
  max-width: 100%;
}
.es-sq-kit-dots button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.es-sq-kit-dots button:hover {
  border-color: #38bdf8;
  color: #7dd3fc;
  transform: scale(1.08);
}
.es-sq-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: all 0.2s ease;
  cursor: pointer;
}
.es-sq-dot:hover {
  background: rgba(56, 189, 248, 0.6);
  transform: scale(1.3);
}
.es-sq-dot.on {
  background: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
  transform: scale(1.2);
}

.es-sq-city-panel {
  position: relative;
  flex: 0 0 auto;
  min-height: 210px;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  /* fallback se manca la foto */
  background: linear-gradient(165deg, rgba(12, 18, 32, 0.98) 0%, rgba(6, 10, 18, 0.99) 100%);
}
.es-sq-city-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  /* foto leggibile ma non aggressiva */
  opacity: 0.42;
  filter: brightness(0.72) saturate(1.08) contrast(1.05);
  transform: scale(1.04);
  transition: opacity 0.35s ease, background-image 0.35s ease, filter 0.35s ease;
  pointer-events: none;
}
.es-sq-city-panel.has-stadium-photo .es-sq-city-bg {
  opacity: 0.48;
}
.es-sq-city-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* scurisce l'immagine così le scritte restano sopra e leggibili */
  background:
    linear-gradient(
      180deg,
      rgba(3, 6, 14, 0.78) 0%,
      rgba(3, 6, 14, 0.52) 42%,
      rgba(3, 6, 14, 0.82) 100%
    ),
    radial-gradient(
      ellipse 90% 80% at 50% 40%,
      rgba(2, 8, 18, 0.15) 0%,
      rgba(2, 8, 18, 0.55) 100%
    );
}
.es-sq-city-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 180px;
  padding: 0.15rem 0.25rem;
  box-sizing: border-box;
}
.es-sq-city-panel .es-sq-panel-label {
  color: rgba(226, 232, 240, 0.88);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
}
.es-sq-city-name {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #fff;
  text-transform: uppercase;
  margin: 0.35rem 0 0.35rem;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 4px 18px rgba(0, 0, 0, 0.65);
}
.es-sq-stadium-name {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f1f5f9;
  line-height: 1.35;
  margin: 0 0 0.25rem;
  max-width: 16rem;
  margin-left: auto;
  margin-right: auto;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 3px 14px rgba(0, 0, 0, 0.55);
}
.es-sq-stadium-cap {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #7dd3fc;
  margin: 0 0 0.65rem;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 0 12px rgba(2, 20, 40, 0.8);
}
.es-sq-stadium-ico {
  width: 44px;
  height: 44px;
  opacity: 0.85;
  color: #e2e8f0;
  margin-top: 0.15rem;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.65));
}
.es-sq-city-panel.has-stadium-photo .es-sq-stadium-ico {
  opacity: 0.55;
}

/* Azioni finali — centrate sotto lo stage */
.es-sq-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 1080px;
  margin: 1.5rem auto 0;
  box-sizing: border-box;
}
.es-sq-select-btn {
  min-width: 220px;
  padding: 0.85rem 1.75rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
  background: linear-gradient(90deg, #0284c7, #38bdf8) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 8px 28px rgba(2, 132, 199, 0.4);
}
.es-sq-select-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.es-sq-meta {
  text-align: center;
  width: 100%;
  max-width: 1080px;
  margin: 0.85rem auto 0;
  font-size: 0.8rem;
  color: #64748b;
  box-sizing: border-box;
}
.es-sq-meta strong {
  color: #94a3b8;
}

.es-sq-thumbs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}
.es-sq-thumb {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 900;
  color: #fff;
}
.es-sq-thumb:hover {
  opacity: 0.9;
  transform: scale(1.06);
}
.es-sq-thumb.active {
  opacity: 1;
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

/* ============================================================
   RESPONSIVE DESIGN — MOBILE & TABLET OPTIMIZATIONS
   ============================================================ */

@media (max-width: 900px) {
  #view-squadre .pf-page-inner,
  #view-squadre .container.pf-page-inner {
    padding-top: 4rem !important;
    padding-bottom: 1.75rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .es-sq-topbar {
    margin-bottom: 0.9rem;
  }

  .es-sq-stage {
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 580px;
  }

  .es-sq-side {
    flex-direction: column;
    gap: 1rem;
  }

  .es-sq-main {
    min-height: 0;
    padding: 1.35rem 1rem 1.25rem;
  }

  .es-sq-crest-row {
    gap: 0.85rem;
    min-height: 180px;
  }

  .es-sq-crest {
    width: clamp(150px, 42vw, 190px);
    height: clamp(150px, 42vw, 190px);
  }

  .es-sq-nav-btn {
    width: 42px;
    height: 42px;
  }

  .es-sq-nav-btn svg {
    width: 18px;
    height: 18px;
  }

  .es-sq-panel {
    padding: 1rem;
    min-height: 0;
  }

  .es-sq-kit-stage {
    min-height: 154px;
  }
  .es-sq-kit,
  .es-sq-kit-leave {
    width: 118px;
    height: 138px;
    margin: 0;
  }
  .es-sq-kit-ghost {
    width: 68px;
    height: 82px;
  }

  .es-sq-kit-dots {
    gap: 0.35rem 0.4rem;
    padding: 4px;
  }

  .es-sq-city-panel {
    min-height: 190px;
  }
}

@media (max-width: 640px) {
  #view-squadre .pf-page-inner,
  #view-squadre .container.pf-page-inner {
    padding-top: 3.5rem !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  .es-sq-topbar {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
  }

  .es-sq-topbar h1 {
    text-align: center;
    font-size: 1.35rem;
  }

  .es-sq-back {
    margin-left: 0;
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  .es-sq-topbar-actions {
    width: 100%;
    max-width: 280px;
    flex-direction: column;
    align-items: stretch;
  }

  .es-sq-topbar-actions .btn {
    width: 100%;
  }

  .es-sq-gender {
    gap: 1rem;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }

  .es-sq-country {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    margin-bottom: 0.85rem;
  }

  .es-sq-team-title-row {
    margin-bottom: 0.85rem;
  }

  .es-sq-team-name {
    font-size: 1.35rem;
    letter-spacing: 0.08em;
  }

  .es-sq-verify-badge {
    width: 24px;
    height: 24px;
  }

  .es-sq-crest-row {
    gap: 0.5rem;
    min-height: 160px;
  }

  .es-sq-crest {
    width: clamp(130px, 48vw, 170px);
    height: clamp(130px, 48vw, 170px);
  }

  .es-sq-nav-btn {
    width: 38px;
    height: 38px;
  }

  .es-sq-pos-num {
    font-size: 1.65rem;
  }

  .es-sq-league-row {
    gap: 0.4rem;
  }

  .es-sq-league-pill {
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    max-width: calc(100vw - 110px);
  }

  .es-sq-league-pill-text {
    max-width: 170px;
  }

  .es-sq-select-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    width: 100%;
    justify-content: center;
  }

  .es-sq-kit-panel {
    padding: 0.85rem 0.75rem;
  }

  .es-sq-kit-stage {
    min-height: 140px;
  }

  .es-sq-kit,
  .es-sq-kit-leave {
    width: 108px;
    height: 128px;
  }

  .es-sq-kit-ghost {
    width: 58px;
    height: 70px;
  }
  .es-sq-kit-ghost--prev { left: 1%; }
  .es-sq-kit-ghost--next { right: 1%; }

  .es-sq-dot {
    width: 9px;
    height: 9px;
  }

  .es-sq-city-content {
    min-height: 160px;
    padding: 0.5rem 0.25rem;
  }

  .es-sq-city-name {
    font-size: 1.05rem;
  }

  .es-sq-stadium-name {
    font-size: 0.85rem;
  }

  /* Modal Selezione Categoria (League Picker Drawer) */
  .es-sq-league-picker {
    padding: 0.75rem;
    align-items: flex-end;
  }

  .es-sq-picker-box {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 82vh !important;
    border-radius: 20px 20px 0 0 !important;
    margin: 0 !important;
  }

  .es-sq-picker-search {
    font-size: 16px !important;
    padding: 0.65rem 0.75rem !important;
  }

  .es-sq-picker-item {
    min-height: 48px !important;
    padding: 0.5rem 0.65rem !important;
    grid-template-columns: 28px minmax(0, 1fr) 30px 20px !important;
    column-gap: 0.5rem !important;
  }

  .es-sq-picker-item-name {
    font-size: 0.84rem !important;
  }
}

@media (max-width: 380px) {
  .es-sq-team-name {
    font-size: 1.15rem;
  }

  .es-sq-crest {
    width: 120px;
    height: 120px;
  }

  .es-sq-nav-btn {
    width: 34px;
    height: 34px;
  }

  .es-sq-league-pill-text {
    max-width: 130px;
  }
}

/* Extra mobile: niente tagli laterali, tutto allineato nel viewport */
#view-squadre,
#view-squadre .pf-page,
#squadre-content,
.es-sq-stage,
.es-sq-main,
.es-sq-side,
.es-sq-panel {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.es-sq-team-name {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

@media (max-width: 900px) {
  #view-squadre .pf-page {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .es-sq-stage,
  .es-sq-side,
  .es-sq-main,
  .es-sq-kit-panel,
  .es-sq-city-panel {
    width: 100%;
  }
  .es-sq-kit-stage {
    overflow: hidden;
  }
}

@media (max-width: 640px) {
  #view-squadre .pf-page-inner,
  #view-squadre .container.pf-page-inner {
    padding-left: max(0.75rem, env(safe-area-inset-left)) !important;
    padding-right: max(0.75rem, env(safe-area-inset-right)) !important;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom)) !important;
  }
  .es-sq-team-name {
    letter-spacing: 0.06em;
    line-height: 1.15;
  }
  .es-sq-crest-row {
    width: 100%;
    max-width: 100%;
  }
  .es-sq-league-pill {
    max-width: calc(100vw - 6.5rem);
  }
  .es-sq-league-pill-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .es-sq-actions,
  .es-sq-select-btn {
    width: 100%;
    max-width: 100%;
  }
  .es-sq-picker {
    padding: 0;
    align-items: flex-end;
  }
  .es-sq-picker-panel {
    width: 100%;
    max-width: 100%;
    max-height: min(86dvh, 640px);
    border-radius: 20px 20px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .es-sq-picker-search {
    font-size: 16px;
  }
}

@media (max-width: 380px) {
  .es-sq-kit-ghost {
    display: none;
  }
  .es-sq-crest-row {
    gap: 0.35rem;
  }
  .es-sq-league-pill {
    max-width: calc(100vw - 5.5rem);
    padding: 0.4rem 0.55rem;
  }
  .es-sq-city-name,
  .es-sq-stadium-name {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* Categoria campionato con frecce (allineate alla pillola) */
.es-sq-counter {
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: rgba(226, 232, 240, 0.55);
  margin: 0.15rem 0 0.35rem;
  font-weight: 600;
  text-transform: uppercase;
}
.es-sq-league-block {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1.15rem;
  width: 100%;
  gap: 0.35rem;
}
/* Riga: freccia | logo+nome | freccia — tutti sulla stessa baseline verticale */
.es-sq-league-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 48px;
}
.es-sq-league-pill {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  max-width: min(420px, 70vw);
  padding: 0.35rem 0.9rem 0.35rem 0.45rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-sizing: border-box;
}
.es-sq-league-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
  /* Maschile: colori ufficiali lega */
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
/* Solo femminile: monogramma bianco su UI scura */
.es-sq-league-logo.is-women {
  filter: brightness(0) invert(1) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
.es-sq-league-logo[hidden],
.es-sq-league-logo.is-hidden {
  display: none !important;
}
.es-sq-league-row .es-sq-league {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 0.88rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f8fafc;
  max-width: min(280px, 52vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.es-sq-nav-btn {
  position: relative;
  z-index: 3;
  pointer-events: auto !important;
}
/* Frecce categoria: stessa altezza della pillola */
.es-sq-league-btn {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px;
  min-height: 44px;
  margin: 0 !important;
  align-self: center;
  flex-shrink: 0;
  border-color: rgba(56, 189, 248, 0.4) !important;
}
/* Pillola cliccabile → apre elenco categorie */
button.es-sq-league-pill {
  cursor: pointer;
  font: inherit;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.12s;
}
button.es-sq-league-pill:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}
button.es-sq-league-pill:active {
  transform: scale(0.98);
}
.es-sq-league-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.75;
  color: #7dd3fc;
}

/* ===== Picker categorie (tabella a scomparsa) ===== */
.es-sq-picker {
  position: fixed !important;
  inset: 0;
  z-index: 200000 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.es-sq-picker.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.es-sq-picker[hidden] {
  display: none !important;
}
.es-sq-picker.is-open[hidden] {
  display: flex !important;
}
.es-sq-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  cursor: pointer;
}
.es-sq-picker-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, #0f172a 0%, #0b1220 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.es-sq-picker.is-open .es-sq-picker-panel {
  transform: translateY(0) scale(1);
}
.es-sq-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.1rem 0.65rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.es-sq-picker-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f8fafc;
}
.es-sq-picker-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.es-sq-picker-close:hover {
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}
.es-sq-picker-search {
  margin: 0.75rem 1rem 0.5rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: rgba(15, 23, 42, 0.9);
  color: #f1f5f9;
  font-size: 0.95rem;
  outline: none;
}
.es-sq-picker-search::placeholder {
  color: #64748b;
}
.es-sq-picker-search:focus {
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}
.es-sq-picker-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.4rem 0.7rem 0.9rem;
  display: block !important; /* evita stacking strano da flex globale */
}
/* Riga singola pulita: logo | nome | n° | check — niente sovrapposizioni */
.es-sq-picker-item {
  display: grid !important;
  grid-template-columns: 32px minmax(0, 1fr) 36px 22px;
  align-items: center;
  column-gap: 0.65rem;
  width: 100% !important;
  min-height: 48px !important;
  height: auto !important;
  margin: 0 0 0.4rem 0 !important;
  padding: 0.55rem 0.7rem !important;
  box-sizing: border-box !important;
  text-align: left !important;
  border-radius: 12px !important;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: #e2e8f0 !important;
  cursor: pointer !important;
  font: inherit !important;
  line-height: 1.25 !important;
  position: relative !important;
  float: none !important;
  clear: both !important;
  overflow: hidden !important;
  isolation: isolate;
  transform: none !important;
  transition: background 0.15s, border-color 0.15s;
}
.es-sq-picker-item:last-child {
  margin-bottom: 0 !important;
}
.es-sq-picker-item:hover {
  background: rgba(56, 189, 248, 0.12) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
}
.es-sq-picker-item.is-active {
  background: rgba(56, 189, 248, 0.18) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
}
.es-sq-picker-item.is-cursor {
  background: rgba(56, 189, 248, 0.28) !important;
  border-color: rgba(90, 230, 245, 0.75) !important;
  box-shadow: 0 0 0 1px rgba(90, 230, 245, 0.25);
}
/* Reset figli: blocca CSS globali del sito che mettono span in absolute */
.es-sq-picker-item > * {
  position: static !important;
  float: none !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  transform: none !important;
  line-height: 1.25 !important;
}
.es-sq-picker-item-logo {
  width: 28px !important;
  height: 28px !important;
  object-fit: contain !important;
  display: block !important;
  grid-column: 1;
  justify-self: center;
  /* maschile: colori ufficiali */
  filter: none;
}
.es-sq-picker-item-logo.is-women {
  filter: brightness(0) invert(1);
}
.es-sq-picker-item-badge {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  background: rgba(56, 189, 248, 0.2) !important;
  color: #7dd3fc !important;
  grid-column: 1;
  justify-self: center;
}
.es-sq-picker-item-name {
  grid-column: 2;
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  color: #f8fafc !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  opacity: 1 !important;
}
.es-sq-picker-item-meta {
  grid-column: 3;
  display: block !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  text-align: right !important;
  white-space: nowrap !important;
  opacity: 1 !important;
  min-width: 1.5rem;
}
.es-sq-picker-item-check {
  grid-column: 4;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #38bdf8 !important;
  font-weight: 800 !important;
  font-size: 0.95rem !important;
  min-width: 1rem;
  min-height: 1rem;
}
.es-sq-picker-item-check--empty {
  visibility: hidden;
}
.es-sq-picker-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
  position: relative !important;
}
.es-sq-thumbs{display:none!important;height:0!important;margin:0!important;padding:0!important;overflow:hidden!important;}

/* Loading stadio + logo dopo Seleziona squadra (2s) */
.es-sq-load {
  position: fixed;
  inset: 0;
  z-index: 3000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #070b14;
}
.es-sq-load[hidden] { display: none !important; }
.es-sq-load-stadio {
  position: absolute;
  inset: -4%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform: scale(1.08);
  animation: es-sq-stadio-ken 2s ease-out forwards;
}
.es-sq-load-veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(7, 11, 20, 0.28) 0%, rgba(7, 11, 20, 0.76) 72%);
}
.es-sq-load-core {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
  padding: 1.5rem;
}
.es-sq-load-crest {
  width: min(46vw, 210px);
  height: min(46vw, 210px);
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.45));
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.65), 0 0 30px rgba(56, 189, 248, 0.25);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  animation: es-sq-logo-pulse 0.85s ease-in-out infinite;
  overflow: hidden;
}
.es-sq-load-core img#es-sq-load-logo {
  width: 78%;
  height: 78%;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.55));
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}
.es-sq-load-core img#es-sq-load-logo[hidden] {
  display: none !important;
}
.es-sq-load-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.45), rgba(15, 23, 42, 0.95));
  color: #fff;
  font-weight: 900;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  letter-spacing: 0.06em;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}
.es-sq-load-fallback[hidden] {
  display: none !important;
}
.es-sq-load-core p {
  margin: 0;
  color: #f8fafc;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85);
}
#es-sq-load-name {
  font-size: clamp(1.2rem, 3.2vw, 1.55rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
#es-sq-load-stadio-name {
  font-size: clamp(0.9rem, 2.4vw, 1.05rem);
  color: #e2e8f0;
  opacity: 0.92;
  font-weight: 500;
}
@keyframes es-sq-logo-pulse {
  0%, 100% { transform: scale(0.92); }
  50% { transform: scale(1.06); }
}
@keyframes es-sq-stadio-ken {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}
body.es-sq-loading { overflow: hidden; }

/* Pulsante Registra Club Ufficiale */
.es-sq-btn-register {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s, background 0.2s;
}
.es-sq-btn-register:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 210, 133, 0.4);
}
.es-sq-btn-register:active {
  transform: translateY(0);
}

/* Modal Registrazione Club Ufficiale */
.es-sq-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(5, 10, 20, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
  animation: es-sq-fade-in 0.25s ease-out;
}

@keyframes es-sq-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.es-sq-modal-card {
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(10, 15, 30, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(56, 189, 248, 0.1);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.es-sq-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.es-sq-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.es-sq-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.es-sq-reg-form {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.es-sq-reg-grid {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 640px) {
  .es-sq-reg-grid {
    grid-template-columns: 1fr;
  }
}

.es-sq-reg-fields {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.es-sq-reg-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.es-sq-reg-field label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.es-sq-reg-field input[type="text"],
.es-sq-reg-field input[type="number"],
.es-sq-reg-field select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.8);
  color: #f8fafc;
  font-size: 0.9rem;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.es-sq-reg-field input[type="text"]:focus,
.es-sq-reg-field input[type="number"]:focus,
.es-sq-reg-field select:focus {
  border-color: var(--es-accent, #00d285);
  box-shadow: 0 0 0 3px rgba(0, 210, 133, 0.15);
}

.es-sq-reg-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.es-sq-color-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.es-sq-color-wrap input[type="color"] {
  -webkit-appearance: none;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  padding: 0;
}

.es-sq-color-wrap input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.es-sq-color-wrap input[type="color"]::-webkit-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
}

.es-sq-color-wrap input[type="text"] {
  flex: 1;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.8);
  color: #f8fafc;
  font-family: monospace;
  font-size: 0.85rem;
  box-sizing: border-box;
}

.es-sq-reg-gender-opts {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.35rem 0;
}

.es-sq-reg-gender-opts label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #cbd5e1;
  text-transform: none;
  cursor: pointer;
}

/* Box anteprima stemma ufficiale */
.es-sq-reg-preview-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 16px;
  padding: 1.25rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.es-sq-reg-preview-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #38bdf8;
}

.es-sq-reg-preview-badge {
  width: 100px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.6));
  transition: transform 0.2s;
}

.es-sq-reg-preview-name {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  word-break: break-word;
}

.es-sq-reg-preview-sub {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.03em;
}

.es-sq-reg-preview-tag {
  font-size: 0.65rem;
  font-weight: 800;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.04em;
}

.es-sq-modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}
