/* Toto League Battle — pelle v2 sul web.
   Traduzione 1:1 del design system Compose dell'app Android:
   app-android/.../ui/theme/Theme.kt (token) e ui/components/StadiumComponents.kt
   (componenti). Notte verde-petrolio, accento giallo neon, ORO solo per jolly
   e primo posto, ROSSO solo per big match e azioni distruttive. */

:root {
  /* Theme.kt */
  --petrol-deep: #040F1A;
  --ink: #010409;
  --night-surface: rgba(21, 19, 10, 0.85);      /* NightSurface 0xD915130A */
  --night-surface-elevated: rgba(21, 19, 10, 0.85);
  --surface-variant: rgba(28, 26, 16, 0.92);
  --surface-highlight: #2B2513;                  /* NightSurfaceHighlight */
  --big-match-surface: rgba(28, 16, 8, 0.85);    /* BigMatchCardColor 0xD91C1008 */
  --neon-yellow: #D3FF00;                        /* accento primario (pitchGreen del tema) */
  --pitch-green-true: #3DDC84;
  --scoreboard-blue: #38BDF8;
  /* Nel tema dell'app StadiumColors.gold È il giallo neon (Theme.kt:91,247):
     jolly, primo posto e vincitore di battle sono neon, non oro vero. L'oro
     #FFD700 (ScoreboardGold) resta SOLO dove l'app lo usa direttamente: chip
     CHIUSA e bottoni JOLLY/RIVELA della gestione stagione. */
  --gold: #D3FF00;
  --scoreboard-gold: #FFD700;
  --alert-red: #FF3B30;
  --neutral-100: #F8FAFC;
  --neutral-200: #E2E8F0;
  --neutral-400: #9AA4B2;
  --outline: rgba(255, 255, 255, 0.2);
  --on-accent: #0E1A24;

  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --radius-xl: 24px;
  --gutter: 16px;
  --content-max: 720px;
  --tabbar-h: 72px;
  --savebar-h: 72px;

  --font: "Outfit", system-ui, "Segoe UI", Arial, sans-serif;
  --font-display: "Orbitron", "Outfit", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Consolas", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  font-family: var(--font);
  color: var(--neutral-100);
  background: var(--petrol-deep);
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  /* Su telefono il tocco non deve lasciare il lampo grigio di sistema né far
     partire lo zoom da doppio tocco: la pelle è la stessa dell'app nativa.
     Il pizzico per ingrandire resta attivo (non si tocca `user-scalable`). */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Testi non selezionabili sui controlli: su iOS e Android la pressione
   prolungata su un bottone aprirebbe il menu di selezione. I contenuti da
   leggere e i campi restano selezionabili. */
button, .tabbar, .pill, .sign-btn, .stepper, .day-cell {
  -webkit-user-select: none;
  user-select: none;
}

/* Mai un'immagine più larga dello schermo. */
img, video, canvas, svg { max-width: 100%; }

/* ── Sfondo stadio (equivalente dello shader AGSL) ───────────────────────── */

.stadium-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(211, 255, 0, 0.08), transparent 60%),
    radial-gradient(90% 60% at 50% 110%, rgba(56, 189, 248, 0.10), transparent 60%),
    linear-gradient(180deg, #06202B 0%, var(--petrol-deep) 45%, var(--ink) 100%);
}

.stadium-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.10) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(90% 70% at 50% 30%, #000 20%, transparent 85%);
  mask-image: radial-gradient(90% 70% at 50% 30%, #000 20%, transparent 85%);
}

/* ── Splash ──────────────────────────────────────────────────────────────── */

.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: radial-gradient(70% 50% at 50% 40%, #0A2433 0%, var(--petrol-deep) 60%, var(--ink) 100%);
  transition: opacity 0.35s ease;
}

.splash--out { opacity: 0; pointer-events: none; }

.splash__ball {
  width: 132px;
  height: 132px;
  filter: drop-shadow(0 0 26px rgba(211, 255, 0, 0.45));
  animation: splash-spin 1.6s cubic-bezier(0.25, 0.9, 0.3, 1) both;
}

@keyframes splash-spin {
  from { transform: rotate(-220deg) scale(0.6); opacity: 0; }
  to { transform: rotate(0deg) scale(1); opacity: 1; }
}

.splash__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--neon-yellow);
  text-shadow: 0 0 20px rgba(211, 255, 0, 0.6);
  margin: 0;
  text-align: center;
  padding: 0 24px;
}

.splash__hint { color: var(--neutral-400); font-size: 13px; margin: 0; }

/* ── Guscio ──────────────────────────────────────────────────────────────── */

.app-shell { min-height: 100vh; min-height: 100dvh; }

.noscript { max-width: var(--content-max); margin: 40px auto; padding: 0 var(--gutter); }

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.70);
  backdrop-filter: blur(12px);
  padding-top: env(safe-area-inset-top);
}

.app-header__row {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 6px 4px 2px;
  min-width: 0;
}

.app-header__ball { width: 28px; height: 28px; flex: none; filter: drop-shadow(0 0 8px rgba(211, 255, 0, 0.5)); }

/* A 390px e sotto il titolo non deve mai spingere le icone fuori schermo: lui
   si restringe e si tronca con i puntini, le icone no (flex: none sopra e
   sotto). È il comportamento della testata dell'app nativa. */
.app-header__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.5px;
  color: var(--neon-yellow);
  text-shadow: 0 0 10px rgba(211, 255, 0, 0.55);
  margin: 0 0 0 6px;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-header__row .icon-btn { flex: none; }

.app-header__spacer { flex: 1 1 0; min-width: 4px; }

/* Selettore lega: riquadro a piena larghezza (LeagueSwitcherHeader) */
.league-switcher {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter) 8px;
}

.league-switcher__box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border-radius: var(--radius-l);
  border: 1px solid rgba(211, 255, 0, 0.45);
  background: rgba(10, 15, 18, 0.4);
  color: var(--neutral-100);
  padding: 7px 8px 7px 12px;
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
}

.league-switcher__icon { color: var(--neon-yellow); font-size: 18px; line-height: 1; }
.league-switcher__name { font-size: 18px; font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.league-switcher__meta { font-size: 12px; color: var(--neutral-400); }
.league-switcher__caret { color: var(--neon-yellow); font-size: 18px; }

/* Filtro squadra della pagina marcatori: stessa pelle del selettore lega
   (al posto del vecchio <select> nativo grigio del sistema). */
.team-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border-radius: var(--radius-l);
  border: 1px solid rgba(211, 255, 0, 0.45);
  background: rgba(10, 15, 18, 0.4);
  color: var(--neutral-100);
  padding: 7px 8px 7px 12px;
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
}
.team-filter__icon { color: var(--neon-yellow); font-size: 18px; line-height: 1; }
.team-filter__name {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-filter__caret { color: var(--neon-yellow); font-size: 18px; }

.app-main {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 8px var(--gutter) calc(var(--tabbar-h) + 32px + env(safe-area-inset-bottom));
}

.app-main--with-savebar { padding-bottom: calc(var(--tabbar-h) + var(--savebar-h) + 32px + env(safe-area-inset-bottom)); }

/* ── Tab bar ─────────────────────────────────────────────────────────────── */

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.70);
  backdrop-filter: blur(12px);
  padding-bottom: env(safe-area-inset-bottom);
}

.tabbar__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  height: var(--tabbar-h);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
}

.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-radius: 999px;
  text-decoration: none;
  color: rgba(248, 250, 252, 0.55);
  font-size: 12px;
  font-weight: 500;
  min-width: 64px;
}

.tabbar a .tab-icon { width: 24px; height: 24px; transition: transform 0.2s cubic-bezier(0.2, 1.4, 0.4, 1); }
.tabbar a[aria-current="page"] { color: var(--neon-yellow); font-weight: 700; }
.tabbar a[aria-current="page"] .tab-icon { transform: scale(1.1); }
.tabbar a::after { content: ""; width: 0; height: 3px; border-radius: 999px; background: transparent; }
.tabbar a[aria-current="page"]::after { width: 20px; background: var(--neon-yellow); }

/* ── TonalStadiumCard ────────────────────────────────────────────────────── */

.card {
  position: relative;
  border-radius: var(--radius-l);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(28, 26, 16, 0.3) 0%, transparent 60%),
    var(--night-surface);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
  padding: 14px;
  margin-bottom: 12px;
  backdrop-filter: blur(6px);
}

.card--tight { padding: 10px 12px; }
.card--gold { border-color: rgba(211, 255, 0, 0.8); box-shadow: 0 8px 20px rgba(211, 255, 0, 0.18); }
.card--big-match { background: linear-gradient(180deg, rgba(60, 20, 10, 0.35) 0%, transparent 60%), var(--big-match-surface); }
.card--current { border: 2px solid var(--neon-yellow); }
.card--flat { background: var(--surface-variant); box-shadow: none; }
.card--clickable { cursor: pointer; width: 100%; text-align: left; font-family: var(--font); color: inherit; display: block; }
.card--current-league { background: rgba(211, 255, 0, 0.08); border-color: var(--neon-yellow); }

.big-match-label {
  position: absolute;
  top: 4px;
  left: 0; right: 0;
  text-align: center;
  font-size: 10px;
  line-height: 12px;
  font-weight: 900;
  letter-spacing: 0.6px;
  color: var(--alert-red);
}

/* ── SectionHeader (angoli tagliati + gradiente neon) ────────────────────── */

/* Angoli tagliati + gradiente neon che sfuma: il bordo è disegnato dallo
   pseudo-elemento sotto, così sfuma davvero invece di chiudere un riquadro. */
.section-header {
  position: relative;
  margin: 12px 0;
  padding: 7px 16px;
  background: linear-gradient(90deg, rgba(211, 255, 0, 0.2), transparent);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.section-header::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  background: linear-gradient(90deg, var(--neon-yellow), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.section-header h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--neutral-100);
}

.section-header p { margin: 2px 0 0; font-size: 12px; color: var(--neutral-400); font-weight: 400; }

/* ── HeroHeader ──────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  height: 230px;
  margin: 0 calc(var(--gutter) * -1) 12px;
  border-radius: 0 0 26px 26px;
  overflow: hidden;
  background: var(--night-surface);
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: ken-burns 40s ease-in-out infinite alternate;
}

@keyframes ken-burns {
  from { transform: scale(1); }
  to { transform: scale(1.15); }
}

.hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(4, 15, 26, 0.85) 62%, var(--petrol-deep) 100%);
}

.hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.hero__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hero__league { display: flex; align-items: center; gap: 6px; }
.hero__league img { width: 18px; height: 18px; object-fit: contain; }

.hero__league span {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--neon-yellow);
}

.hero__title {
  font-size: 32px;
  line-height: 40px;
  font-weight: 900;
  margin: 4px 0 10px;
  color: var(--neutral-100);
}

/* ── StatusPill ──────────────────────────────────────────────────────────── */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 12px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--neutral-400);
  background: rgba(154, 164, 178, 0.15);
  border: 1px solid rgba(154, 164, 178, 0.3);
  white-space: nowrap;
}

.pill--open { color: var(--neon-yellow); background: rgba(211, 255, 0, 0.15); border-color: rgba(211, 255, 0, 0.3); }
.pill--open .pill__dot { display: block; }

.pill__dot {
  display: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
  animation: pill-pulse 1s ease-in-out infinite alternate;
}

@keyframes pill-pulse { from { opacity: 0.2; } to { opacity: 1; } }

.pill--skipped { text-decoration: line-through; }

/* SeasonStatusChip (solo gestione stagione): PROGRAMMATA neutro, APERTA verde
   PitchGreen, CHIUSA oro, SALTATA barrata (Screens.kt SeasonStatusChip). */
.pill--season-open { color: var(--pitch-green-true); background: rgba(61, 220, 132, 0.14); border-color: rgba(61, 220, 132, 0.45); }
.pill--season-closed { color: var(--scoreboard-gold); background: rgba(255, 215, 0, 0.14); border-color: rgba(255, 215, 0, 0.45); }

/* ── ScoreboardCountdown ─────────────────────────────────────────────────── */

.countdown__label { font-size: 12px; font-weight: 500; letter-spacing: 0.5px; color: var(--neon-yellow); }
.countdown--expired .countdown__label { color: var(--alert-red); }
.countdown__row { display: flex; align-items: center; gap: 4px; margin-top: 4px; }

.countdown__box {
  border-radius: 4px;
  background: #040F1A;
  border: 1px solid rgba(211, 255, 0, 0.3);
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--neutral-100);
}

.countdown__sep { font-family: var(--font-mono); font-size: 24px; font-weight: 700; color: var(--neon-yellow); }

/* ── Bottoni ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: var(--radius-m);
  border: 1px solid var(--outline);
  background: transparent;
  color: var(--neutral-100);
  cursor: pointer;
  min-height: 40px;
  white-space: nowrap;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--neon-yellow); outline-offset: 2px; }

.btn--primary { background: var(--neon-yellow); color: var(--on-accent); border-color: transparent; }
.btn--gold { background: var(--scoreboard-gold); color: var(--on-accent); border-color: transparent; }
/* Riga di stagione con un'azione in volo: spenta finché il server non risponde. */
.card--busy { opacity: 0.55; }

/* Spunta "lega corrente" nella tendina: neon, perché nell'app il tint è
   stadiumColors.pitchGreen, che vale NeonYellow (Theme.kt:89,245). */
.check-current { color: var(--neon-yellow); font-size: 18px; font-weight: 900; line-height: 1; }

/* Solo APRI in gestione stagione: nell'app il container e' PitchGreen. */
.btn--green { background: var(--pitch-green-true); color: var(--on-accent); border-color: transparent; }
.btn--danger { background: var(--alert-red); color: #FFFFFF; border-color: transparent; }
.btn--block { width: 100%; }
.btn--cta { min-height: 52px; font-size: 16px; font-weight: 900; border-radius: 14px; }
.btn--small { min-height: 34px; padding: 4px 14px; font-size: 12px; border-radius: var(--radius-s); }
.btn--tiny { min-height: 30px; padding: 2px 10px; font-size: 11px; border-radius: var(--radius-s); }

.icon-btn {
  background: transparent;
  border: 0;
  color: var(--neutral-200);
  font-size: 20px;
  line-height: 1;
  padding: 6px;
  border-radius: 999px;
  cursor: pointer;
  /* Bersaglio da dito: l'icona resta della misura dell'app, l'area toccabile
     arriva a 40px come le icone della top bar di Material. */
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn--admin { color: var(--alert-red); }
.icon-btn--danger { color: var(--alert-red); font-size: 16px; }

/* ── Form ────────────────────────────────────────────────────────────────── */

.field { margin-bottom: 12px; }

.field > label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--neutral-400);
  margin-bottom: 6px;
  font-weight: 700;
}

.input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--outline);
  border-radius: var(--radius-m);
  color: var(--neutral-100);
  font-family: var(--font);
  font-size: 16px;
  padding: 13px 12px;
}

/* Tendina (filtro per squadra): il controllo di sistema userebbe i colori
   chiari del browser, qui si riporta sui colori del tema e si disegna la
   freccetta a mano perché su select non si può usare ::after. */
select.input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23D3FF00' d='M1 1l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
}

select.input option { background: #101418; color: var(--neutral-100); }

.input:focus { outline: none; border-color: var(--neon-yellow); }
.input::placeholder { color: rgba(226, 232, 240, 0.45); }

.help { font-size: 12px; color: var(--neutral-400); margin: 6px 0 0; }
.counter { font-size: 11px; color: var(--neutral-400); text-align: right; margin: 4px 0 0; font-family: var(--font-mono); }

/* Riquadro "Squadra del cuore" del form di registrazione */
.picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border-radius: var(--radius-s);
  border: 1px solid var(--outline);
  background: rgba(21, 19, 10, 0.4);
  color: var(--neutral-100);
  padding: 13px 14px;
  font-family: var(--font);
  font-size: 15px;
  cursor: pointer;
  text-align: left;
}

.picker-row__cta { font-size: 12px; font-weight: 700; color: var(--neon-yellow); letter-spacing: 0.5px; }

/* ── Messaggi ────────────────────────────────────────────────────────────── */

.alert { border-radius: var(--radius-m); padding: 10px 12px; font-size: 14px; margin-bottom: 12px; border: 1px solid; }
.alert--error { color: #FFC9C5; border-color: rgba(255, 59, 48, 0.6); background: rgba(255, 59, 48, 0.12); }
.alert--ok { color: #EAFFB0; border-color: rgba(211, 255, 0, 0.6); background: rgba(211, 255, 0, 0.12); }
.alert--info { color: var(--neutral-200); border-color: var(--outline); background: rgba(255, 255, 255, 0.05); }

.empty-state { text-align: center; padding: 40px 20px; color: var(--neutral-400); }
.empty-state__icon { font-size: 44px; color: rgba(211, 255, 0, 0.7); line-height: 1; }
.empty-state h2 { color: var(--neutral-100); font-size: 18px; font-weight: 700; margin: 14px 0 8px; }
.empty-state p { font-size: 13px; line-height: 1.5; margin: 0; white-space: pre-line; }

.loader {
  display: block;
  width: 30px;
  height: 30px;
  margin: 44px auto;
  border: 3px solid rgba(211, 255, 0, 0.25);
  border-top-color: var(--neon-yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader--inline { width: 18px; height: 18px; margin: 0; border-width: 2px; display: inline-block; vertical-align: middle; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .loader { animation-duration: 2.4s; }
  .hero__bg, .splash__ball, .pill__dot { animation: none; }
}

/* ── Conferma «Pronostici salvati» col pallone ───────────────────────────────
   Tempi come le app: arrivo 0,35 s · sosta 0,45 s · uscita 0,20 s. Il velo non
   intercetta i tocchi: la schedina sotto resta usabile. */
.saved-ball {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: rgba(4, 15, 26, 0.78);
  animation: saved-veil 1s linear both;
}
.saved-ball__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  animation: saved-box 1s linear both;
}
.saved-ball__img {
  width: 150px;
  height: 150px;
  filter: drop-shadow(0 0 24px rgba(211, 255, 0, 0.55));
  animation: saved-spin 1s both;
}
.saved-ball__text {
  margin: 0;
  padding: 0 24px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--neon-yellow);
  text-shadow: 0 0 14px var(--neon-yellow);
}
@keyframes saved-veil {
  0% { opacity: 0; animation-timing-function: ease-out; }
  35%, 80% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes saved-box {
  0% { opacity: 0; }
  12%, 80% { opacity: 1; animation-timing-function: ease-out; }
  100% { opacity: 0; }
}
/* Molla dell'arrivo (rimbalzo oltre 1) resa con la curva a sorpasso. */
@keyframes saved-spin {
  0% { transform: rotate(-200deg) scale(0.05); animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }
  35%, 80% { transform: rotate(0deg) scale(1); animation-timing-function: ease-in; }
  100% { transform: rotate(0deg) scale(1.35); }
}
.saved-ball--capsule {
  align-items: flex-start;
  background: transparent;
  animation: none;
}
.saved-ball__capsule {
  margin-top: calc(12px + env(safe-area-inset-top));
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--neon-yellow);
  color: var(--petrol-deep);
  font-size: 15px;
  font-weight: 700;
}

/* ── Live della giornata ───────────────────────────────────────────────────── */
.live-card { cursor: pointer; }
.live-card__tag { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--neon-yellow); text-align: center; margin-bottom: 6px; }
.live-card__leader { margin: 8px 0 0; text-align: center; font-size: 13px; color: var(--neutral-400); }
.live-board { display: flex; align-items: center; gap: 8px; }
.live-side { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.live-side--right { flex-direction: row-reverse; text-align: right; }
.live-side__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.live-side--lead .live-side__name { color: var(--neon-yellow); }
.live-board__score { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-mono); }
.live-board__pts { font-size: 24px; font-weight: 700; color: var(--neutral-100); }
.live-board__pts--lead { color: var(--neon-yellow); text-shadow: 0 0 12px rgba(211, 255, 0, 0.5); }
.live-board__sep { color: var(--neutral-400); }
.live-match { padding: 10px 0; border-bottom: 1px solid var(--outline); }
.live-match:last-child { border-bottom: 0; }
.live-match__head { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 6px; }
.live-match__teams { font-size: 13px; font-weight: 700; text-align: center; }
.live-match__row { display: flex; align-items: center; gap: 8px; }
.live-match__wait { font-size: 11px; color: var(--neutral-400); text-align: center; min-width: 78px; }
.live-match__jolly { margin-top: 4px; text-align: center; font-size: 11px; font-weight: 700; color: var(--gold); }
.live-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); }
.live-pick--right { flex-direction: row-reverse; }
.live-pick__sign { font-size: 18px; font-weight: 700; }
.live-pick__exact { font-size: 13px; color: var(--neutral-400); }
.live-pick__pts { font-size: 12px; font-weight: 700; color: var(--neutral-400); }
.live-pick--hit .live-pick__sign, .live-pick--hit .live-pick__pts { color: var(--neon-yellow); }
.live-pick--miss .live-pick__sign { color: var(--neutral-400); text-decoration: line-through; }
.live-pick--none { color: var(--neutral-400); }
.live-scorers-row { display: flex; gap: 12px; }
.live-scorers { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.live-scorers--right { text-align: right; align-items: flex-end; }
.live-scorer { display: flex; gap: 6px; align-items: baseline; }
.live-scorers--right .live-scorer { flex-direction: row-reverse; }
.live-scorer__pts { font-family: var(--font-mono); font-weight: 700; color: var(--neon-yellow); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  background: rgba(0, 0, 0, 0.92);
  border: 1px solid var(--outline);
  border-radius: var(--radius-m);
  padding: 10px 16px;
  font-size: 14px;
  max-width: calc(100vw - 32px);
}

/* ── Card partita (Home / Giornata / Storico) ────────────────────────────── */

.match { display: flex; flex-direction: column; align-items: center; padding: 8px 2px; }
.match__kickoff { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--neon-yellow); text-align: center; margin-bottom: 6px; }

.match__row { display: flex; align-items: center; justify-content: center; width: 100%; }
.match__side { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.match__side--home { justify-content: flex-end; }
.match__side--away { justify-content: flex-start; }
.match__team { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match__mid { padding: 0 8px; }

/* Stella della partita jolly: a sinistra della riga, in ogni schermata che
   mostra partite. La gemella a destra e' invisibile e serve solo a non
   spostare il centro. */
.match__star { flex: none; width: 16px; text-align: center; color: var(--gold); font-size: 15px; line-height: 1; }
.match__star--ghost { visibility: hidden; }

.crest { width: 26px; height: 26px; object-fit: contain; flex: none; }

/* Ripiego quando lo scudetto non esiste tra le risorse: cerchio con le prime
   tre lettere, come TeamCrest dell'app (mai un'icona rotta). */
.crest-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex: none;
  background: rgba(211, 255, 0, 0.12);
  border: 1px solid rgba(211, 255, 0, 0.35);
  color: var(--neon-yellow);
  font-family: var(--font-mono);
  font-weight: 900;
  text-transform: uppercase;
}

.match__time {
  display: inline-block;
  background: var(--surface-variant);
  border-radius: 6px;
  padding: 3px 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--neutral-400);
  white-space: nowrap;
}

.match__vs { font-size: 12px; font-weight: 700; color: var(--neutral-400); }

.score {
  display: inline-block;
  background: var(--surface-variant);
  border: 1px solid var(--outline);
  border-radius: var(--radius-s);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--scoreboard-blue);
}

.score--gold { color: var(--gold); border-color: var(--gold); }

.jolly-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(211, 255, 0, 0.15);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 8px;
}

/* ── SignSelector (celle a tabellone) ────────────────────────────────────── */

.signs { display: flex; gap: 8px; width: 100%; margin-top: 10px; }

.sign-btn {
  flex: 1;
  height: 44px;
  background: #040F1A;
  border: 1px solid var(--outline);
  color: rgba(248, 250, 252, 0.85);
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: transform 0.15s cubic-bezier(0.2, 1.4, 0.4, 1), background 0.15s ease, color 0.15s ease;
}

.sign-btn[aria-pressed="true"] {
  background: rgba(211, 255, 0, 0.2);
  border-color: var(--neon-yellow);
  color: var(--neon-yellow);
  transform: scale(1.05);
  box-shadow: 0 0 14px rgba(211, 255, 0, 0.45);
}

.sign-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── ExactScorePicker (stepper) ──────────────────────────────────────────── */

/* Etichetta SOPRA e stepper sotto, sempre: cosi' i due riquadri dei gol
   restano centrati sotto il "VS" della riga squadre, a qualunque larghezza.
   In fila accanto all'etichetta erano fuori asse, e su schermo stretto il
   secondo andava a capo lasciando il trattino orfano. */
/* Seconda riga di statistiche: contorno, quindi piu' piccola e spenta della
   prima, che e' quella su cui si decide. Vuota = non occupa spazio. */
.player__extra { font-family: var(--font-mono); font-size: 10px; opacity: 0.72; margin-top: 2px; }

.exact { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 8px 0; }
.exact__pair { display: flex; align-items: center; justify-content: center; gap: 12px; }
.exact__label { font-size: 12px; color: var(--neutral-400); text-align: center; }
.exact__sep { font-size: 20px; color: var(--neutral-400); }
/* Esatto non giocato: «–» attenuato (lo 0-0 e' un pronostico, non un segnaposto). */
.exact--empty .stepper__value, .exact--empty .exact__sep { opacity: 0.45; }
/* La ✕ sta fuori dal flusso: la coppia resta centrata sotto il "VS". */
.exact__pair { position: relative; }
.exact__clear {
  position: absolute; left: 100%; margin-left: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--outline); background: transparent;
  color: var(--neutral-400); font-size: 12px; line-height: 1; cursor: pointer;
}
.exact__clear[hidden], .exact__star[hidden], .exact-note[hidden] { display: none; }
.exact__star { color: var(--alert-red); font-weight: 700; font-size: 14px; }
.exact-note { margin: 0; font-size: 12px; color: var(--neutral-400); text-align: center; }
.exact-note::before { content: '* '; color: var(--alert-red); font-weight: 700; }

.stepper {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-s);
  background: var(--surface-variant);
  border: 1px solid var(--outline);
  overflow: hidden;
}

.stepper button {
  /* 34px: bersaglio da dito sul + / - del risultato esatto, che nell'app è una
     IconButton da 34dp. */
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--neutral-100);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.stepper__value { font-family: var(--font-mono); font-size: 18px; font-weight: 700; padding: 0 4px; min-width: 22px; text-align: center; }
.stepper--readonly .stepper__value { padding: 0 12px; }

/* ── Barra di salvataggio (bottomBar della Giornata) ─────────────────────── */

.save-bar {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  z-index: 18;
  background: rgba(10, 12, 8, 0.96);
  border-top: 1px solid var(--outline);
  backdrop-filter: blur(10px);
}

.save-bar__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px var(--gutter);
}

.save-bar__label { font-size: 12px; color: var(--neutral-400); }
.save-bar__msg { padding: 8px var(--gutter) 0; max-width: var(--content-max); margin: 0 auto; font-size: 13px; font-weight: 700; }

/* ── Avatar (AvatarCrest: foto o monogramma) ─────────────────────────────── */

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
  background: linear-gradient(135deg, var(--surface-highlight), rgba(211, 255, 0, 0.3));
  border: 1px solid rgba(211, 255, 0, 0.45);
  color: var(--neutral-100);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
  overflow: hidden;
}

.avatar--xs { width: 24px; height: 24px; font-size: 9px; }
.avatar--sm { width: 26px; height: 26px; font-size: 10px; }
.avatar--md { width: 34px; height: 34px; font-size: 11px; }
.avatar--lg { width: 56px; height: 56px; font-size: 18px; }
.avatar--xl { width: 64px; height: 64px; font-size: 20px; }

/* ── PlayerPickerCard ────────────────────────────────────────────────────── */

.player {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--outline);
  background: var(--night-surface);
  padding: 10px;
  margin-bottom: 8px;
  text-align: left;
  font-family: var(--font);
  color: var(--neutral-100);
}

.player--selectable { cursor: pointer; }
.player--selected { border-color: rgba(211, 255, 0, 0.7); }

/* Il contenitore tiene la misura: dentro ci va la foto oppure la maglia, e la
   riga non si muove quando si sostituiscono. */
.player__photo-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(211, 255, 0, 0.18), rgba(211, 255, 0, 0.05));
  border: 1px solid rgba(211, 255, 0, 0.3);
}

.player__photo {
  border-radius: 50%;
  /* cover, non contain: le foto sono gia' ritagliate quadrate sul volto */
  object-fit: cover;
}

.jersey { display: block; }

.player__main { flex: 1; min-width: 0; }
.player__name-row { display: flex; align-items: center; gap: 6px; }
.player__name { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player__team-row { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.player__team { font-size: 12px; color: var(--neutral-400); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.player__stats {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: rgba(248, 250, 252, 0.75);
}

.badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  padding: 1px 4px;
  clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
  white-space: nowrap;
}

/* Slot marcatore vuoto della schedina: il + porta alla pagina di scelta.
   Tratteggio e non riempimento pieno, così si legge subito come "posto da
   riempire" e non come una card di contenuto. */
.scorer-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  border-radius: 14px;
  border: 1px dashed rgba(211, 255, 0, 0.5);
  background: rgba(211, 255, 0, 0.05);
  padding: 10px;
  margin-bottom: 8px;
  text-align: left;
  font-family: var(--font);
  color: var(--neutral-100);
  cursor: pointer;
}

.scorer-slot:focus-visible { outline: 2px solid var(--neon-yellow); outline-offset: 2px; }

.scorer-slot__plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(211, 255, 0, 0.6);
  background: rgba(211, 255, 0, 0.12);
  color: var(--neon-yellow);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.scorer-slot__text { display: flex; flex-direction: column; min-width: 0; }
.scorer-slot__title { font-size: 15px; font-weight: 800; }
.scorer-slot__hint { font-size: 12px; color: var(--neutral-400); }

/* Giocatore già usato in un altro slot: resta leggibile (serve a capire perché
   non si può riprendere) ma non è più un bersaglio. */
.player--taken { opacity: 0.55; cursor: default; }

.badge--taken { color: var(--neutral-400); background: rgba(154, 164, 178, 0.14); border: 1px solid rgba(154, 164, 178, 0.6); }

/* Avviso di inizio stagione nella pagina marcatori: discreto, non un alert. */
.marcatori__avviso { margin: 0 0 12px; }

.badge--penalty { color: var(--neon-yellow); background: rgba(211, 255, 0, 0.15); border: 1px solid rgba(211, 255, 0, 0.6); }
.badge--rank { color: var(--gold); background: rgba(211, 255, 0, 0.15); border: 1px solid rgba(211, 255, 0, 0.6); }

.role-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.6px;
  border-radius: 6px;
  padding: 2px 5px;
  color: var(--neutral-400);
  background: rgba(154, 164, 178, 0.14);
  border: 1px solid rgba(154, 164, 178, 0.6);
}

.role-badge--admin { color: var(--gold); background: rgba(211, 255, 0, 0.14); border-color: rgba(211, 255, 0, 0.6); }

/* ── Classifiche (righe a card) ──────────────────────────────────────────── */

.standings-head {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  background: var(--surface-variant);
  padding: 8px 12px;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--neutral-400);
  margin-bottom: 6px;
}

.standings-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-m);
  border: 1px solid var(--outline);
  background: var(--night-surface);
  padding: 12px;
  margin-bottom: 6px;
}

.standings-row--first { border-color: rgba(211, 255, 0, 0.7); border-width: 1.5px; }
.standings-row--me { border-color: rgba(211, 255, 0, 0.8); border-width: 1.5px; }

.rank-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-variant);
  color: var(--neutral-100);
  font-size: 12px;
  font-weight: 900;
  flex: none;
}

.rank-badge--first { background: var(--gold); color: var(--on-accent); }
.rank-badge--me { background: var(--neon-yellow); color: var(--on-accent); }

.standings-row__main { flex: 1; min-width: 0; }
.standings-row__name { font-size: 15px; flex: 0 1 auto; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standings-row__name--first { color: var(--gold); font-weight: 900; }
.standings-row__name--me { color: var(--neon-yellow); font-weight: 900; }
.standings-row__motto { font-size: 12px; font-style: italic; color: var(--neutral-400); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Sottoriga Serie A (G/V/N/P/GF-GS): una riga sola, mono 10px come
   nell'app Android. Sotto i 360px può tornare a capo (vedi in fondo), e
   la classe --wrap è l'ultima rete di sicurezza se un font di sistema più
   largo la facesse sbordare a qualunque larghezza. */
.standings-row__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--neutral-400);
  white-space: nowrap;
}

.standings-row__sub--wrap { white-space: normal; }

.you-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--neon-yellow);
  background: rgba(211, 255, 0, 0.2);
  border-radius: 4px;
  padding: 1px 4px;
}

.col-streak { width: 56px; display: flex; justify-content: center; }
.col-wdl { width: 54px; text-align: center; font-family: var(--font-mono); font-size: 13px; color: var(--neutral-400); }
.col-pts { width: 44px; text-align: right; font-family: var(--font-mono); font-size: 16px; font-weight: 700; color: var(--neon-yellow); }
.col-pts--first { color: var(--gold); }
.col-pts--blue { color: var(--scoreboard-blue); }

.streak { display: flex; gap: 3px; justify-content: center; }

.streak__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 900;
  border: 1px solid currentColor;
}

.streak__dot--v { color: var(--neon-yellow); background: rgba(211, 255, 0, 0.22); }
.streak__dot--p { color: var(--alert-red); background: rgba(255, 59, 48, 0.22); }
.streak__dot--n { color: var(--neutral-400); background: rgba(154, 164, 178, 0.22); }
.streak__empty { color: rgba(154, 164, 178, 0.55); font-size: 13px; }

/* ── Classifica Serie A: differenza reti, forma, casa/trasferta ──────────── */

/* Colonne strette apposta: a 320px la riga deve restare dentro lo schermo
   senza mangiarsi il nome della squadra. La forma è l'unica che, sotto i
   360px, va a capo su una riga sua (vedi in fondo, @media max-width 359). */
.standings-row--seriea { flex-wrap: wrap; row-gap: 6px; }
/* I punti stanno SEMPRE in fondo alla prima riga: nel DOM vengono dopo la
   forma, qui li si rimette all'ultimo posto così quando la forma va a capo
   non si porta dietro anche il punteggio. */
.standings-row--seriea .col-pts { order: 1; }

.col-dr {
  width: 34px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--neutral-400);
}
.col-dr--plus { color: var(--pitch-green-true); }
.col-dr--minus { color: var(--alert-red); }

.col-dr-head { width: 34px; text-align: center; }
.col-form-head { width: 68px; text-align: center; }
.col-pts-head { width: 44px; text-align: right; }

.col-form { width: 68px; display: flex; justify-content: center; }

/* Verde vittoria, giallo pareggio, rosso sconfitta: i colori sono quelli del
   tema (nessun colore nuovo). Nessuna lettera dentro: a questa misura non si
   leggerebbe, l'etichetta per i lettori di schermo la mette formDots. */
.form { display: flex; gap: 3px; justify-content: center; }

.form__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  border: 1px solid currentColor;
  background: currentColor;
}

.form__dot--w { color: var(--pitch-green-true); }
.form__dot--d { color: var(--scoreboard-gold); }
.form__dot--l { color: var(--alert-red); }
.form__empty { color: rgba(154, 164, 178, 0.55); font-size: 13px; }

/* Telefoni: le colonne extra della Serie A (DR e forma) si stringono al
   massimo, così la sottoriga G/V/N/P/GF-GC a mono 10px sta su UNA riga
   fino a 360px (sopra i 430px le colonne larghe ci stanno comunque).
   Sotto i 360px la forma scende su una riga propria (vedi il blocco
   max-width: 359px in fondo) e la sottoriga può tornare a capo. */
@media (max-width: 430px) {
  .standings-row--seriea, .standings-head--seriea { gap: 5px; }
  .standings-row--seriea { padding: 12px 8px; }
  .standings-head--seriea { padding: 8px 8px; }
  .standings-row--seriea .rank-badge { width: 22px; height: 22px; }
  .standings-row--seriea .col-pts { width: 42px; }
  .col-pts-head { width: 42px; }
  .col-dr, .col-dr-head { width: 24px; }
  .col-form, .col-form-head { width: 54px; }
  .form__dot { width: 8px; height: 8px; }
  .standings-row__sub { letter-spacing: -0.5px; }
}

/* ── Segmenti (tab interne) ──────────────────────────────────────────────── */

.segmented {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 10px;
  border: 1px solid var(--outline);
  background: var(--surface-variant);
  margin-bottom: 8px;
}

.segmented button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--neutral-400);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 10px 4px;
  min-height: 36px;
  border-radius: var(--radius-s);
  cursor: pointer;
  white-space: nowrap;
}

.segmented button[aria-pressed="true"] { background: var(--neon-yellow); color: var(--on-accent); }

/* Segmenti di secondo livello (generale/casa/trasferta dentro SERIE A): più
   bassi e senza maiuscoletto, così si vede a colpo d'occhio che dipendono
   dalla tab sopra e non sono un'altra navigazione. */
.segmented--sub { margin-bottom: 10px; background: transparent; }
.segmented--sub button { font-size: 11px; text-transform: none; letter-spacing: 0.2px; }

/* ── Calendario (Storico) — "Minimale sportivo": tipografia e fasce ──────────
   Niente rilievo né 3D: una fascia unisce i giorni consecutivi della stessa
   giornata (gialla da giocare, grigia se giocata), il big match porta solo
   l'etichetta BIG. Una fascia che attraversa la fine settimana si spezza in
   un segmento per riga: angolo vivo e bordo a filo dove continua, raggio 12
   e rientro di 6 solo sulle estremità vere della giornata. */

.month { margin-bottom: 18px; }
.month__name { font-size: 14px; font-weight: 800; letter-spacing: 0.06em; margin: 0 0 6px; }
.month--current .month__name { color: var(--neon-yellow); }

.month__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  column-gap: 0;
  row-gap: 6px;
}

.month__weekday {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--neutral-400);
  padding-bottom: 6px;
  letter-spacing: 0.04em;
}

/* SAB e DOM un tono più chiari degli altri giorni della testata. */
.month__weekday:nth-child(6),
.month__weekday:nth-child(7) { color: #C9D3DA; }

.day-cell {
  position: relative;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  width: 100%;
}

.day-cell--match { cursor: pointer; }
.day-cell--match:focus-visible {
  outline: 2px solid var(--neutral-100);
  outline-offset: 2px;
  border-radius: 12px;
}

/* Numero del giorno: carattere di sistema, cifre tabellari, senza zero. */
.day-cell__num {
  position: relative;
  z-index: 2;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  color: #C9D3DA;
  font-variant-numeric: tabular-nums;
}

/* La fascia: occupa la riga meno 6 sopra e 6 sotto; dove continua (riga o
   mese adiacente) resta a filo di cella con angolo vivo. */
.band {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  right: 0;
  background: var(--neon-yellow);
  z-index: 1;
  border-radius: 0;
}
.band--s { left: 6px; border-radius: 12px 0 0 12px; }
.band--e { right: 6px; border-radius: 0 12px 12px 0; }
.band--solo { left: 6px; right: 6px; border-radius: 12px; }

/* Etichetta G{n} solo sul primo giorno della giornata. */
.band__g {
  position: absolute;
  left: 8px;
  top: 4px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(9, 17, 24, 0.7);
}

.day-cell--match .day-cell__num {
  color: #091118;
  font-weight: 800;
}

/* Big match: la fascia resta gialla, l'etichetta BIG è distinguibile anche
   senza colore (è testo). */
/* Appesa al bordo basso della fascia: in alto a destra si scontrava con G{n}
   quando il big match cade nel primo giorno della giornata. */
.band-mark {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  z-index: 3;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #fff;
  background: #C62828;
  border-radius: 4px;
  padding: 2px 4px;
}

/* Giornata giocata: fascia grigia, numeri chiari. */
.day-cell--played .band { background: #2C3B46; }
.day-cell--played .day-cell__num { color: #DDE5EA; }
.day-cell--played .band__g { color: rgba(221, 229, 234, 0.6); }

/* Oggi: cornice rossa con lo stesso rientro delle fasce (6 sopra, 6 sotto,
   6 ai lati), SENZA riempimento: si vede sul fondo scuro e sopra la fascia
   gialla o grigia. Numero bianco 900 sul fondo scuro e sulla fascia grigia,
   tono d'inchiostro sulla fascia gialla. */
.day-cell--today::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  right: 6px;
  border: 2px solid #FF3B30;
  border-radius: 12px;
  z-index: 2;
}
.day-cell--today .day-cell__num { color: #fff; font-weight: 900; }
.day-cell--today.day-cell--up .day-cell__num { color: #091118; }

/* Etichetta OGGI: stesso stile di BIG ma a colori invertiti (testo scuro su
   giallo acceso), appesa al bordo basso della cornice. Se oggi è anche il
   giorno del big match BIG resta in basso e OGGI sale al bordo alto. */
.today-mark {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  z-index: 3;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #091118;
  background: #D3FF00;
  border-radius: 4px;
  padding: 2px 4px;
}
.today-mark--top { bottom: auto; top: 0; }

/* ── Battle ──────────────────────────────────────────────────────────────── */

.battle { display: flex; align-items: center; gap: 8px; width: 100%; }
.battle__side { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.battle__side--right { flex-direction: row-reverse; }
.battle__name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.battle__name--win { color: var(--gold); font-weight: 900; }
.battle__score { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--neutral-400); padding: 0 10px; white-space: nowrap; }
.battle__tiebreak { font-size: 11px; color: var(--scoreboard-blue); margin-top: 4px; }

/* ── Notizie ─────────────────────────────────────────────────────────────── */

.news-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.news-card {
  flex: 0 0 280px;
  height: 212px;
  scroll-snap-align: start;
  border-radius: var(--radius-l);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--night-surface);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font-family: var(--font);
  display: flex;
  flex-direction: column;
}

.news-card__cover {
  position: relative;
  height: 112px;
  background: linear-gradient(180deg, #0A1E2E, #040F1A);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  overflow: hidden;
}


/* Copertina disegnata da noi (NewsCoverImage di iOS): stadio notturno con le
   linee in prospettiva e gli stemmi delle squadre citate nel titolo. Le foto
   delle testate non si ripubblicano. */
.news-cover { background: linear-gradient(180deg, #0C2233 0%, #04101B 100%); }

.news-cover__pitch {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 49.6%, rgba(211, 255, 0, 0.16) 50%, transparent 50.4%),
    repeating-linear-gradient(105deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 28px);
}

.news-cover__duel,
.news-cover__single {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55));
}

.news-cover__vs {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 900;
  color: var(--neon-yellow);
  letter-spacing: 1px;
}

.news-cover__ball { position: relative; width: 56px; height: 56px; opacity: 0.85; }
.news-card__body { padding: 8px 12px; min-width: 0; }
.news-card__source { font-size: 11px; font-weight: 700; color: var(--neon-yellow); margin: 0; }
.news-card__time { font-size: 11px; color: var(--neutral-400); margin: 0; }
.news-card__title { font-size: 15px; font-weight: 500; margin: 4px 0 0; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Dialog ──────────────────────────────────────────────────────────────── */

dialog.modal {
  border: 1px solid var(--outline);
  border-radius: var(--radius-xl);
  background: #0B1119;
  color: var(--neutral-100);
  max-width: min(520px, calc(100vw - 32px));
  width: 100%;
  padding: 0;
}

dialog.modal::backdrop { background: rgba(0, 0, 0, 0.65); }
dialog.modal .modal__body {
  padding: 20px;
  max-height: 70vh;
  max-height: min(70dvh, calc(100dvh - 160px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
dialog.modal h3 { margin: 0 0 12px; font-size: 20px; font-weight: 700; }
dialog.modal .modal__actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 20px; flex-wrap: wrap; }

.code-box {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 3px;
  text-align: center;
  padding: 14px 12px;
  border-radius: 10px;
  border: 1px solid rgba(211, 255, 0, 0.5);
  color: var(--neutral-100);
  background: #040F1A;
  word-break: break-all;
}

.team-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }

.team-grid__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-radius: 10px;
  border: 1px solid var(--outline);
  background: transparent;
  color: var(--neutral-400);
  padding: 8px 2px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 9px;
  text-align: center;
}

.team-grid__item[aria-pressed="true"] { border: 2px solid var(--neon-yellow); background: rgba(211, 255, 0, 0.08); color: var(--neon-yellow); }
.team-grid__item img { width: 28px; height: 28px; object-fit: contain; }
.team-grid__item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

.h2h-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.h2h-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }

.h2h-outcome {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid;
}

.h2h-outcome--v { color: var(--neon-yellow); background: rgba(211, 255, 0, 0.15); border-color: rgba(211, 255, 0, 0.5); }
.h2h-outcome--p { color: var(--alert-red); background: rgba(255, 59, 48, 0.15); border-color: rgba(255, 59, 48, 0.5); }
.h2h-outcome--n { color: var(--neutral-400); background: rgba(154, 164, 178, 0.15); border-color: rgba(154, 164, 178, 0.5); }

/* ── Login ───────────────────────────────────────────────────────────────── */

.auth { max-width: 460px; margin: 0 auto; padding: 24px var(--gutter) 60px; }
.auth__brand { text-align: center; margin-bottom: 28px; }
.auth__ball { width: 96px; height: 96px; filter: drop-shadow(0 0 22px rgba(211, 255, 0, 0.5)); }

.auth__brand h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--neon-yellow);
  text-shadow: 0 0 20px rgba(211, 255, 0, 0.55);
  margin: 16px 0 4px;
}

.auth__brand p { margin: 0; color: var(--neutral-400); font-size: 14px; }

/* ── Riga navigazione dettaglio (frecce) ─────────────────────────────────── */

.detail-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.detail-nav__title { text-align: center; }
.detail-nav__title h2 { margin: 0; font-size: 22px; font-weight: 700; }
.detail-nav__meta { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 4px; }
.detail-nav__date { font-family: var(--font-mono); font-size: 11px; color: var(--neutral-400); }

.nav-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(211, 255, 0, 0.6);
  background: var(--surface-variant);
  color: var(--neutral-100);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  flex: none;
}

.nav-arrow:disabled { opacity: 0.4; border-color: var(--outline); cursor: not-allowed; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  color: var(--neon-yellow);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 4px 0;
  cursor: pointer;
  margin-bottom: 8px;
}

/* ── Banner (guida, leghe) ───────────────────────────────────────────────── */

.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border-radius: 10px;
  padding: 14px;
  border: 1px solid var(--outline);
  background: var(--night-surface);
  color: var(--neutral-100);
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
  margin-bottom: 12px;
  text-decoration: none;
}

.banner--neon { background: rgba(211, 255, 0, 0.08); border-color: rgba(211, 255, 0, 0.4); }
.banner__icon { font-size: 20px; color: var(--neon-yellow); line-height: 1; }
.banner__title { font-size: 16px; font-weight: 700; }
.banner__sub { font-size: 12px; color: var(--neutral-400); }
.banner__chevron { color: var(--neutral-400); font-size: 18px; }

/* ── Guida ───────────────────────────────────────────────────────────────── */

.guide-section summary { cursor: pointer; font-weight: 700; padding: 6px 0; font-size: 15px; list-style: none; display: flex; align-items: center; gap: 8px; }
.guide-section summary::-webkit-details-marker { display: none; }
.guide-section summary::before { content: "▸"; color: var(--neon-yellow); }
.guide-section[open] summary::before { content: "▾"; }
.guide-section figure { margin: 0 0 12px; }
.guide-section figure img { width: 100%; border-radius: 12px; border: 1px solid var(--outline); display: block; }
.guide-section ul { margin: 0 0 12px; padding-left: 20px; }
.guide-section li { margin-bottom: 6px; font-size: 14px; line-height: 1.5; }
.guide-section p { font-size: 14px; line-height: 1.55; }

.example-box { border-radius: var(--radius-m); border: 1px solid var(--outline); background: rgba(0, 0, 0, 0.3); padding: 12px; margin-bottom: 12px; }
.example-box p { margin: 0 0 6px; font-weight: 700; font-size: 13px; }
.example-box pre { margin: 0; font-family: var(--font-mono); font-size: 12px; white-space: pre-wrap; color: var(--neutral-200); }

/* ── Utility ─────────────────────────────────────────────────────────────── */

.page-title { font-size: 26px; font-weight: 900; margin: 4px 0 2px; }
.page-title-row { display: flex; align-items: center; gap: 8px; }
.page-title-row .page-title { flex: 1; min-width: 0; }
/* La "i" della legenda: cerchietto discreto accanto al titolo. */
.page-title__info {
  border: 1px solid var(--outline);
  font-style: italic;
  font-family: var(--font-display);
  font-size: 15px;
}
.page-sub { font-size: 13px; color: var(--neutral-400); margin: 0 0 12px; }

/* ── Legenda (pagina marcatori) ──────────────────────────────────────────── */

.legenda__section { margin: 14px 0 6px; font-size: 13px; letter-spacing: 1px; color: var(--neon-yellow); }
.legenda__section:first-child { margin-top: 0; }

.legenda__table { border-collapse: collapse; width: 100%; }
.legenda__table td {
  vertical-align: top;
  padding: 4px 8px 4px 0;
  font-size: 13px;
  line-height: 1.35;
}
.legenda__sigla {
  font-family: var(--font-mono);
  font-weight: 700;
  white-space: nowrap;
  color: var(--neutral-200);
}

.row { display: flex; align-items: center; gap: 10px; }
.row--wrap { flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.row--end { justify-content: flex-end; }
.row--center { justify-content: center; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--neutral-400); }
.small { font-size: 12px; }
.mono { font-family: var(--font-mono); }
.gold { color: var(--gold); }
.neon { color: var(--neon-yellow); }
.blue { color: var(--scoreboard-blue); }
.red { color: var(--alert-red); }
.bold { font-weight: 700; }
.black { font-weight: 900; }
.italic { font-style: italic; }
.center { text-align: center; }
.mt { margin-top: 12px; }
.mb { margin-bottom: 12px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.divider { height: 1px; background: rgba(255, 255, 255, 0.12); margin: 8px 0; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Adattamento agli schermi ────────────────────────────────────────────── */

/* Telefoni stretti (iPhone SE, Android entry level): margini e caratteri di
   testata ridotti, così i titoli non vanno a capo e le righe della classifica
   restano su una riga sola. */
@media (max-width: 359px) {
  :root { --gutter: 12px; --tabbar-h: 64px; }
  /* Testata: a 320px il titolo intero deve ancora starci (le icone non si
     toccano mai): pallone e titolo si stringono di un grado, gap più corto. */
  .app-header__row { gap: 6px; }
  .app-header__ball { width: 24px; height: 24px; }
  .app-header__title { font-size: 16px; letter-spacing: 0; }
  .hero { height: 200px; }
  .hero__title { font-size: 26px; line-height: 32px; }
  .page-title { font-size: 26px; }
  .countdown__box { font-size: 20px; }
  .news-card { flex-basis: 240px; }
  .tabbar a { min-width: 0; font-size: 11px; padding: 6px 4px; }
  .segmented button { font-size: 11px; letter-spacing: 0; padding: 10px 2px; }
  /* La colonna "Serie" (i pallini dell'andamento) è la prima a cedere: senza,
     nome e motto tornano leggibili. Punti e V-P-S restano. */
  .col-streak, .col-streak-head { display: none; }
  .col-wdl { width: 48px; font-size: 12px; }
  /* SERIE A: dieci dati per squadra a 320px non stanno su una riga sola, e la
     pagina NON deve sbordare. Ordine di caduta dichiarato: posizione, nome,
     differenza reti e punti restano dove sono; la forma prende una riga sua
     sotto il nome, a sinistra, dove ha tutto lo spazio che le serve. Due
     righe per squadra, nessuno scorrimento orizzontale. */
  .standings-row--seriea .col-pts { order: 0; }
  .standings-row--seriea .col-form {
    order: 1;
    flex-basis: 100%;
    width: auto;
    justify-content: flex-start;
    padding-left: 32px;  /* allineata al nome, non al numero di posizione */
  }
  /* In testata resta scritto quello che in riga sta davvero in colonna. */
  .col-form-head { display: none; }
  .col-dr, .col-dr-head { width: 30px; font-size: 12px; }
  .standings-head--seriea .grow { min-width: 0; }
  /* La sottoriga G/V/N/P a 10px di mono non entra nella colonna nome che
     resta a 320px: qui, e solo qui, può spezzarsi su due righe. Se nemmeno
     questo basta (font di sistema più largo), ci pensa la classe --wrap
     aggiunta da classifica.js quando misura uno sbordo reale. */
  .standings-row__sub { white-space: normal; }
}

/* Telefono in orizzontale: lo schermo è alto poco più di 390px, le barre fisse
   e l'hero si accorciano per lasciare spazio ai contenuti. */
@media (orientation: landscape) and (max-height: 500px) {
  :root { --tabbar-h: 56px; --savebar-h: 60px; }
  .hero { height: 168px; }
  .hero__title { font-size: 26px; line-height: 32px; margin: 2px 0 6px; }
  .tabbar a { flex-direction: row; gap: 8px; font-size: 12px; }
  .tabbar a::after { display: none; }
  .splash__ball { width: 88px; height: 88px; }
  dialog.modal .modal__body { max-height: calc(100dvh - 110px); }
}

/* Tablet e desktop: la colonna resta della larghezza di lettura dell'app
   (--content-max) e si centra; cambiano solo i bordi dell'hero, che smette di
   essere a tutta larghezza, e il respiro attorno alla colonna. */
@media (min-width: 720px) {
  :root { --gutter: 24px; }
  .hero { margin-left: 0; margin-right: 0; border-radius: var(--radius-xl); }
  .hero__title { font-size: 36px; }
  .news-scroll { margin: 0; padding-left: 0; padding-right: 0; }
  .app-main { padding-top: 16px; }
}

/* Tablet in orizzontale e monitor: la tab bar diventa una barra centrata e non
   una striscia a tutta larghezza, come la navigation bar dell'app su schermi
   grandi. */
@media (min-width: 1024px) {
  .tabbar { left: 50%; right: auto; transform: translateX(-50%); bottom: 16px; border-radius: var(--radius-xl); border: 1px solid rgba(255, 255, 255, 0.12); }
  .tabbar__inner { padding: 0 16px; }
  .save-bar__inner, .tabbar__inner { max-width: var(--content-max); }
}

/* Puntatore grosso (dito): nessun effetto al passaggio, che su touch resta
   "appiccicato" dopo il tocco. */
@media (hover: none) {
  .card--clickable:hover, .btn:hover, .tabbar a:hover { filter: none; }
}

/* ── Crediti e licenze ───────────────────────────────────────────────────── */

.credit__warning-title { font-size: 13px; font-weight: 700; color: var(--neon-yellow); letter-spacing: 0.5px; }
.credit__warning { font-size: 13px; line-height: 1.45; color: rgba(226, 232, 240, 0.85); margin: 8px 0 0; }
.credit__title { font-size: 14px; font-weight: 500; }
.credit__detail { font-size: 12px; color: rgba(226, 232, 240, 0.75); margin-top: 2px; }
.credit__link { text-decoration: none; color: inherit; align-items: center; gap: 10px; }
.credit__arrow { color: var(--neon-yellow); font-size: 16px; flex: none; }

/* Sezioni squadra dei crediti foto: richiudibili e CHIUSE di default, così
   ~450 attribuzioni non diventano 29.000px di pagina. Stesso gestuale delle
   sezioni della guida (freccia gialla, nessun marcatore di sistema). */
.credit-team {
  border: 1px solid var(--outline);
  border-radius: var(--radius-m);
  background: var(--night-surface);
  margin-bottom: 8px;
}

.credit-team__summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  user-select: none;
}

.credit-team__summary::-webkit-details-marker { display: none; }
.credit-team__summary::before { content: "▸"; color: var(--neon-yellow); }
.credit-team[open] .credit-team__summary::before { content: "▾"; }

.credit-team__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Il "·" sta nel testo (non in un ::after) così anche i lettori di schermo
   sentono "Como · 7 foto" e non "Como7 foto". */
.credit-team__count { margin-left: auto; color: var(--neutral-400); font-size: 12px; font-weight: 400; flex: none; }

.credit-team__list { padding: 0 8px 8px; }

/* ── Sondaggio regole di gioco ──────────────────────────────────────────────
   Banner in Home/onboarding, card delle domande con radio veri, barre dei
   risultati e pannello admin. Notte + bordo neon #D3FF00 come il resto. */

/* Banner: pulsante a tutta larghezza, sfondo scuro e bordo neon. */
.sondaggio-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  text-align: left;
  font-family: inherit;
  color: var(--neutral-100);
  background: linear-gradient(135deg, rgba(211, 255, 0, 0.10), var(--night-surface));
  border: 1.5px solid var(--neon-yellow);
  border-radius: var(--radius-m);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sondaggio-banner:active { transform: scale(0.99); }

.sondaggio-banner__title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--neon-yellow);
}

.sondaggio-banner__sub {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--neutral-200);
}

.sondaggio-banner__cta {
  flex: none;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--on-accent);
  background: var(--neon-yellow);
  border-radius: var(--radius-s);
  white-space: nowrap;
}

/* Variante compatta dell'onboarding (senza leghe). */
.sondaggio-banner--compatto { padding: 10px 12px; }
.sondaggio-banner--compatto .sondaggio-banner__title { font-size: 13px; }

/* Card di intestazione e delle domande. */
.card--sondaggio {
  border: 1px solid rgba(211, 255, 0, 0.35);
  background: var(--night-surface);
}

.sondaggio__titolo { margin: 0; font-size: 16px; font-weight: 800; color: var(--neon-yellow); }
.sondaggio__intro { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--neutral-200); }
.sondaggio__scadenza { margin: 10px 0 0; font-size: 12px; color: var(--neutral-400); }
.sondaggio__chiusa {
  margin: 10px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--alert-red);
}

.sondaggio__domanda-titolo {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

/* Cerchio numerato della domanda. */
.sondaggio__numero {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-size: 13px;
  font-weight: 800;
  color: var(--on-accent);
  background: var(--neon-yellow);
  border-radius: 50%;
}

.sondaggio__opzioni { display: flex; flex-direction: column; gap: 8px; }

/* Opzione: label cliccabile con radio vero; touch target comodo (>= 44px
   effettivi, minimo 30px richiesto). */
.sondaggio__opzione {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--neutral-100);
  background: var(--surface-variant);
  border: 1px solid var(--outline);
  border-radius: var(--radius-s);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.sondaggio__opzione:has(.sondaggio__radio:checked) {
  background: rgba(211, 255, 0, 0.10);
  border-color: var(--neon-yellow);
}

/* Radio visibile ma sobrio: cerchio del tema, non quello di sistema. */
.sondaggio__radio {
  flex: none;
  width: 20px;
  height: 20px;
  accent-color: var(--neon-yellow);
  cursor: pointer;
}

/* Testo libero dell'opzione «Altro». */
.sondaggio__altro { margin-top: 6px; padding-left: 12px; }
.sondaggio__altro.hidden { display: none; }
.sondaggio__altro-testo { width: 100%; resize: vertical; min-height: 64px; }
.sondaggio__contatore {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  text-align: right;
  color: var(--neutral-400);
}

/* Risultati: barra percentuale per opzione. */
.sondaggio__esito { margin-top: 10px; }
.sondaggio__esito--mia { padding: 8px; background: rgba(211, 255, 0, 0.06); border-radius: var(--radius-s); }
.sondaggio__esito-label { min-width: 0; font-size: 13px; line-height: 1.4; }
.sondaggio__esito-mia { color: var(--neon-yellow); font-weight: 700; }

.sondaggio__barra {
  height: 8px;
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.10);
  border-radius: 4px;
  overflow: hidden;
}

.sondaggio__barra-fill {
  height: 100%;
  background: var(--scoreboard-blue);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.sondaggio__barra-fill--mia { background: var(--neon-yellow); }

/* Testi «Altro» anonimi. */
.sondaggio__altri {
  margin: 8px 0 0;
  padding: 0 0 0 18px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--neutral-200);
}

.sondaggio__altri li { margin-top: 4px; }

/* Pannello amministratore. */
.sondaggio-admin {
  margin-top: 16px;
  padding: 14px;
  background: var(--night-surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-m);
}

.sondaggio-admin__titolo { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: 0.5px; }
.sondaggio-admin__conto { margin: 8px 0 12px; font-size: 13px; color: var(--neutral-200); }
.sondaggio-admin__voce {
  display: flex;
  flex-direction: column;
  padding: 8px 4px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sondaggio-admin__voce:last-child { border-bottom: none; }

/* Da 320px in su niente scroll orizzontale: i testi lunghi delle opzioni
   vanno a capo, le barre si adattano alla larghezza disponibile. */
@media (max-width: 360px) {
  .sondaggio-banner { flex-direction: column; align-items: flex-start; }
  .sondaggio-banner__cta { align-self: stretch; text-align: center; }
}

/* ── Calendario del girone (regole del 07/10/2026) ──────────────────────── */
.girone-round { padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.girone-round:first-child { border-top: 0; }
.girone-round__title {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--neutral-400);
}
.girone-round--current .girone-round__title { color: var(--neon-yellow); }
.girone-pair {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  font-size: 13px;
  border-radius: var(--radius-s);
}
.girone-pair--me { background: rgba(211, 255, 0, 0.08); color: var(--neon-yellow); font-weight: 700; }
.girone-pair__side { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.girone-pair__side--right { text-align: right; }
.girone-pair__vs { font-size: 11px; color: var(--neutral-400); }
