/* ==========================================================================
   Calcetto v2 — sistema grafico
   Stesso linguaggio del sito attuale (Outfit, aloni smeraldo/ambra, card
   "vetro", campo da calcio), ma pensato prima per il telefono e senza
   dipendere da librerie caricate da CDN.
   ========================================================================== */

:root {
  --bg: #060b09;
  --card: rgba(15, 23, 20, 0.86);
  --card-solid: #0e1814;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --dim: #64748b;

  --em: #10b981;
  --em-hi: #34d399;
  --em-lo: #059669;
  --em-ink: #022c22;
  --gold: #fbbf24;
  --gold-hi: #fde047;
  --gold-ink: #1c1100;
  --rose: #fb7185;
  --rose-bg: rgba(244, 63, 94, 0.14);
  --sky: #38bdf8;

  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.65);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 6%, rgba(16, 185, 129, 0.14) 0%, transparent 38%),
    radial-gradient(circle at 90% 10%, rgba(245, 158, 11, 0.09) 0%, transparent 34%);
  background-attachment: fixed;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.mono { font-family: 'Space Grotesk', ui-monospace, monospace; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--em-hi); outline-offset: 2px; }

#app { max-width: 620px; margin: 0 auto; padding: 14px 14px 0; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 14px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.05);
  color: var(--text); font-weight: 800; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  transition: transform 0.12s, box-shadow 0.2s, background 0.2s, opacity 0.2s;
  position: relative; user-select: none;
}
.btn:hover { background: rgba(255, 255, 255, 0.09); }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, #34d399, #10b981 55%, #059669);
  color: var(--em-ink); border-color: transparent;
  box-shadow: 0 10px 24px -8px rgba(16, 185, 129, 0.55);
}
.btn-primary:hover { background: linear-gradient(135deg, #6ee7b7, #34d399 55%, #10b981); }
.btn-gold {
  background: linear-gradient(135deg, #fde047, #fbbf24 55%, #f59e0b);
  color: var(--gold-ink); border-color: transparent;
  box-shadow: 0 10px 24px -8px rgba(245, 158, 11, 0.55);
}
.btn-danger { background: var(--rose-bg); color: #fda4af; border-color: rgba(244, 63, 94, 0.38); }
.btn-danger:hover { background: rgba(244, 63, 94, 0.24); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 0 13px; font-size: 11px; border-radius: 12px; }
.btn[disabled], .btn.busy { opacity: 0.55; pointer-events: none; }
.btn.busy::after {
  content: ''; width: 16px; height: 16px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite;
}
.busy { pointer-events: none; opacity: 0.6; }
.link {
  background: none; border: 0; padding: 6px 0; color: var(--em-hi); font-weight: 700; font-size: 13px;
  text-decoration: underline; text-underline-offset: 3px;
}

/* ---------- Card ---------- */
.card {
  background: var(--card); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px;
}
.card + .card, .stack > * + * { margin-top: 12px; }
.card-title {
  font-size: 11px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }

/* ---------- Chip / badge ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.05em; white-space: nowrap;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); color: var(--muted);
}
.chip-em { background: rgba(16, 185, 129, 0.16); border-color: rgba(16, 185, 129, 0.4); color: #6ee7b7; }
.chip-gold { background: rgba(251, 191, 36, 0.16); border-color: rgba(251, 191, 36, 0.45); color: #fde68a; }
.chip-rose { background: var(--rose-bg); border-color: rgba(244, 63, 94, 0.4); color: #fda4af; }
.chip-sky { background: rgba(56, 189, 248, 0.14); border-color: rgba(56, 189, 248, 0.4); color: #7dd3fc; }
.you { background: var(--gold); color: var(--gold-ink); border-color: transparent; padding: 2px 7px; font-size: 9px; font-weight: 900; }

/* ---------- Form ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 7px;
}
.input {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: 14px;
  border: 1px solid var(--line-strong); background: rgba(0, 0, 0, 0.38); color: var(--text);
  font-size: 16px; font-weight: 600; transition: border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder { color: var(--dim); font-weight: 500; }
.input:focus { outline: none; border-color: var(--em); box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 52px; }
.eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px;
  border: 0; background: none; font-size: 18px; border-radius: 12px; opacity: 0.8;
}
.code-input { text-align: center; letter-spacing: 0.4em; font-family: 'Space Grotesk', monospace; font-size: 22px; text-transform: uppercase; padding-left: 0.4em; }
.hint { font-size: 12px; color: var(--muted); margin-top: -6px; margin-bottom: 14px; }

.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px;
  border-radius: 16px; background: rgba(0, 0, 0, 0.42); border: 1px solid var(--line);
}
.seg button {
  min-height: 44px; border-radius: 12px; border: 0; background: transparent; color: var(--muted);
  font-weight: 800; font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase; transition: all 0.2s;
}
.seg button.on { background: var(--em); color: var(--em-ink); box-shadow: 0 6px 18px -6px rgba(16, 185, 129, 0.6); }

/* ---------- Schermata di accesso ---------- */
.auth { min-height: calc(100dvh - 14px); display: flex; flex-direction: column; justify-content: center; padding: 18px 0 30px; }
.crest { width: 128px; height: 128px; margin: 0 auto 4px; display: block; animation: float 4.5s ease-in-out infinite; filter: drop-shadow(0 0 22px rgba(16, 185, 129, 0.4)) drop-shadow(0 0 34px rgba(245, 158, 11, 0.22)); }
.brand { text-align: center; font-size: 40px; line-height: 1; font-weight: 900; letter-spacing: -0.02em; margin-top: 8px; }
.brand b { background: linear-gradient(90deg, #34d399, #fde047); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { text-align: center; color: var(--muted); font-size: 15px; margin: 8px auto 22px; max-width: 320px; }
.perks { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.invite-banner {
  display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin-bottom: 14px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.16), rgba(16, 185, 129, 0.12)); border: 1px solid rgba(251, 191, 36, 0.4);
  font-size: 14px; font-weight: 600;
}
.legal { text-align: center; font-size: 11.5px; color: var(--dim); margin-top: 18px; }

/* ---------- Onboarding ---------- */
.hello { padding: 8px 2px 16px; }
.hello h1 { font-size: 30px; font-weight: 900; letter-spacing: -0.01em; }
.choice-ic { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 24px; flex: none; }
.choice-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.choice-head h2 { font-size: 18px; font-weight: 800; }
.choice-head p { font-size: 13px; color: var(--muted); }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; margin: 0 -14px; padding: calc(var(--safe-t) + 8px) 14px 20px;
  background: rgba(6, 11, 9, 0.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(#000 76%, transparent); mask-image: linear-gradient(#000 76%, transparent);
}
.topbar-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 22px; }
.topbar-crest { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.35)); }
.topbar-main { flex: 1; min-width: 0; }
.group-btn { display: flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; max-width: 100%; text-align: left; }
.group-name { font-size: 18px; font-weight: 900; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-btn .chev { color: var(--muted); font-size: 12px; }
.whoami { display: flex; align-items: center; gap: 6px; margin-top: 3px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.whoami strong { color: var(--text); font-weight: 800; }
.avatar-btn { background: none; border: 0; padding: 0; border-radius: 50%; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-weight: 900; font-size: 15px; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.14);
}
.avatar.lg { width: 44px; height: 44px; font-size: 18px; }

/* ---------- Navigazione in basso ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: center; padding: 0 12px calc(10px + var(--safe-b)); pointer-events: none; }
.nav-inner {
  pointer-events: auto; width: 100%; max-width: 596px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 6px;
  border-radius: 24px; background: rgba(10, 16, 14, 0.9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line-strong); box-shadow: 0 14px 34px -8px rgba(0, 0, 0, 0.85);
}
.nav-item {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; min-width: 0;
  border-radius: 18px; border: 0; background: none; color: var(--muted);
  font-weight: 800; font-size: 9.5px; letter-spacing: 0.03em; text-transform: uppercase; transition: all 0.2s;
}
.nav-item .ic { font-size: 21px; line-height: 1; filter: grayscale(0.7); transition: filter 0.2s, transform 0.2s; }
.nav-item.active { background: var(--em); color: var(--em-ink); box-shadow: 0 8px 20px -6px rgba(16, 185, 129, 0.6); }
.nav-item.active .ic { filter: none; transform: translateY(-1px) scale(1.08); }
.nav-dot { position: absolute; top: 6px; right: calc(50% - 20px); width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(10, 16, 14, 0.95), 0 0 12px var(--gold); animation: pulse 1.6s infinite; }
.view { padding: 6px 0 calc(110px + var(--safe-b)); animation: viewIn 0.28s ease; }

/* ---------- Home: partita ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 18px; border: 1px solid rgba(16, 185, 129, 0.35);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(16, 185, 129, 0.24), transparent 55%),
    radial-gradient(100% 120% at 100% 0%, rgba(245, 158, 11, 0.15), transparent 50%),
    linear-gradient(180deg, rgba(15, 23, 20, 0.96), rgba(8, 14, 12, 0.96));
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.hero::before {
  content: ''; position: absolute; right: -50px; top: -50px; width: 190px; height: 190px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 28px rgba(255, 255, 255, 0.015);
}
.hero-title { font-size: 28px; font-weight: 900; letter-spacing: -0.02em; margin: 10px 0 4px; position: relative; }
.hero-sub { color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 14px; position: relative; }
.cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; position: relative; }
.cd-tile { background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line); border-radius: 16px; padding: 10px 2px 8px; text-align: center; }
.cd-num { font-family: 'Space Grotesk', monospace; font-weight: 700; font-size: 28px; line-height: 1.1; }
.cd-lab { font-size: 9px; letter-spacing: 0.15em; color: var(--muted); font-weight: 800; text-transform: uppercase; margin-top: 2px; }
.live-now { position: relative; text-align: center; padding: 14px; border-radius: 16px; background: rgba(16, 185, 129, 0.16); border: 1px solid rgba(16, 185, 129, 0.45); font-weight: 900; font-size: 20px; letter-spacing: 0.04em; animation: pulse 2s infinite; }

/* ---------- Home: stato personale ---------- */
.status-line { font-size: 17px; font-weight: 700; margin-bottom: 14px; line-height: 1.3; }
.status-line small { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 3px; }
.rsvp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rsvp-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 76px; padding: 8px 4px;
  border-radius: 18px; border: 1.5px solid var(--line-strong); background: rgba(0, 0, 0, 0.32); color: var(--muted);
  font-weight: 800; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; transition: all 0.18s;
}
.rsvp-btn .e { font-size: 24px; line-height: 1; filter: grayscale(0.8); transition: all 0.18s; }
.rsvp-btn:active { transform: scale(0.95); }
.rsvp-btn.on-yes { background: linear-gradient(160deg, #34d399, #059669); border-color: transparent; color: var(--em-ink); box-shadow: 0 10px 24px -8px rgba(16, 185, 129, 0.6); }
.rsvp-btn.on-maybe { background: linear-gradient(160deg, #fde047, #f59e0b); border-color: transparent; color: var(--gold-ink); box-shadow: 0 10px 24px -8px rgba(245, 158, 11, 0.55); }
.rsvp-btn.on-no { background: linear-gradient(160deg, #fb7185, #e11d48); border-color: transparent; color: #fff; box-shadow: 0 10px 24px -8px rgba(244, 63, 94, 0.55); }
.rsvp-btn[class*='on-'] .e { filter: none; transform: scale(1.12); }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tile { text-align: center; padding: 10px 2px; border-radius: 16px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); }
.tile b { display: block; font-family: 'Space Grotesk', monospace; font-size: 22px; line-height: 1.1; }
.tile span { font-size: 10px; letter-spacing: 0.08em; color: var(--muted); font-weight: 800; text-transform: uppercase; }
.bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-top: 12px; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #10b981, #34d399); transition: width 0.6s cubic-bezier(0.2, 0.9, 0.3, 1); }
.bar.full > i { background: linear-gradient(90deg, #fbbf24, #fde047); }

/* ---------- Liste ---------- */
.section-label { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 18px 4px 8px; }
.section-label:first-child { margin-top: 0; }
.rows { display: grid; gap: 8px; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; width: 100%; text-align: left;
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); color: var(--text);
}
.row.me { border: 2px solid rgba(251, 191, 36, 0.75); background: rgba(120, 53, 15, 0.2); }
button.row { cursor: pointer; transition: background 0.15s, transform 0.1s; }
button.row:active { transform: scale(0.985); }
button.row:hover { background: rgba(255, 255, 255, 0.05); }
.row-main { flex: 1; min-width: 0; }
.row-name { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.row-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.row-end { color: var(--dim); font-size: 18px; }

.empty { text-align: center; padding: 28px 18px; color: var(--muted); }
.empty .big { font-size: 46px; margin-bottom: 8px; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5)); }
.empty h3 { color: var(--text); font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.empty p { font-size: 14px; max-width: 300px; margin: 0 auto; }

/* ---------- Campo da calcio ---------- */
.pitch {
  position: relative; display: flex; flex-direction: column; min-height: 600px; border-radius: 26px; overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.78);
  background: repeating-linear-gradient(0deg, #0a5a38 0, #0a5a38 46px, #0d6c44 46px, #0d6c44 92px);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.55), 0 18px 40px -14px rgba(0, 0, 0, 0.75);
}
.pitch::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.07) 0%, transparent 55%), linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, transparent 18%, transparent 82%, rgba(0, 0, 0, 0.22) 100%);
}
.pitch-mark { position: absolute; pointer-events: none; border: 2px solid rgba(255, 255, 255, 0.5); z-index: 1; }
.pitch-half { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: space-evenly; padding: 14px 4px; }
.pitch-half.top { padding-top: 44px; }
.pitch-half.bottom { padding-bottom: 44px; }
.pitch-row { display: flex; justify-content: space-evenly; align-items: flex-start; }
.pitch-token { position: relative; width: 92px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.pitch-jersey { position: relative; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.5)); }
.pitch-jersey svg { width: 52px; height: 52px; display: block; }
.pitch-name {
  margin-top: 4px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 9px; border-radius: 10px;
  font-weight: 800; font-size: 11px; line-height: 1.3; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
}
.pitch-name.is-white { background: #fff; color: #0f172a; }
.pitch-name.is-black { background: rgba(2, 6, 23, 0.95); color: #fff; border: 1px solid #475569; }
.pitch-role { margin-top: 2px; font-size: 9px; font-weight: 800; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.78); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); }
.pitch-team-tag { position: absolute; left: 10px; z-index: 3; padding: 3px 11px; border-radius: 999px; font-size: 10px; font-weight: 900; letter-spacing: 0.06em; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5); }
.pitch-half.top .pitch-team-tag { top: 10px; }
.pitch-half.bottom .pitch-team-tag { bottom: 10px; }
.tag-white { background: #fff; color: #0f172a; }
.tag-black { background: #020617; color: #fff; border: 1px solid #64748b; }
.pitch-you { position: absolute; top: -9px; left: 8px; z-index: 4; padding: 1px 7px; border-radius: 6px; background: #fde047; color: #1c1100; font-size: 9px; font-weight: 900; box-shadow: 0 0 10px rgba(253, 224, 71, 0.9); }
.pitch-token.me .pitch-jersey { animation: mePulse 1.8s ease-in-out infinite; filter: drop-shadow(0 0 12px rgba(253, 224, 71, 0.95)); }
.pitch-token.me .pitch-name { box-shadow: 0 0 0 2px #fde047, 0 3px 8px rgba(0, 0, 0, 0.45); }
.pitch-empty { margin: auto; padding: 16px; text-align: center; font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, 0.82); }

.balance { display: flex; height: 12px; border-radius: 999px; overflow: hidden; border: 1px solid var(--line-strong); }
.balance .w { background: linear-gradient(90deg, #cbd5e1, #f8fafc); transition: width 0.6s; }
.balance .b { background: linear-gradient(90deg, #0b1220, #1e293b); flex: 1; }
.balance-legend { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 7px; }

/* ---------- Stepper punteggio ---------- */
.score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.score-team { text-align: center; }
.score-team .lbl { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 5px; }
.step-btn { width: 40px; height: 44px; border-radius: 13px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.06); font-size: 24px; font-weight: 700; line-height: 1; padding: 0; }
.step-btn:active { transform: scale(0.92); }
.step-val { font-family: 'Space Grotesk', monospace; font-weight: 700; font-size: 44px; min-width: 42px; text-align: center; line-height: 1; }
.score-dash { font-size: 24px; color: var(--dim); font-weight: 800; align-self: end; padding-bottom: 8px; }
.score { align-items: end; }

/* ---------- Urna ---------- */
.ballot-banner { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; font-size: 14px; font-weight: 600; margin-bottom: 14px; border: 1px solid; }
.ballot-banner b { font-weight: 900; }
.ballot-wait { background: rgba(56, 189, 248, 0.1); border-color: rgba(56, 189, 248, 0.35); }
.ballot-open { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.4); }
.ballot-closed { background: rgba(255, 255, 255, 0.05); border-color: var(--line-strong); }
.pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pick {
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px 9px; border-radius: 18px; min-width: 0;
  border: 2px solid var(--line); background: rgba(0, 0, 0, 0.3); transition: all 0.16s;
}
.pick:active { transform: scale(0.96); }
.pick svg { width: 44px; height: 44px; }
.pick-name { font-size: 12px; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 4px; }
.pick.sel-mvp { border-color: var(--gold); background: rgba(251, 191, 36, 0.14); box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.16); }
.pick.sel-bad { border-color: var(--rose); background: rgba(244, 63, 94, 0.14); box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.16); }
.ballot-h { font-size: 16px; font-weight: 800; margin: 18px 2px 10px; display: flex; align-items: center; gap: 8px; }
.ballot-h:first-of-type { margin-top: 4px; }
.result { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; border: 1px solid; }
.result + .result { margin-top: 8px; }
.result-gold { background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(120, 53, 15, 0.2)); border-color: rgba(251, 191, 36, 0.5); }
.result-bad { background: linear-gradient(135deg, rgba(244, 63, 94, 0.18), rgba(76, 5, 25, 0.2)); border-color: rgba(244, 63, 94, 0.45); }
.result .big { font-size: 32px; }
.result small { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.result strong { font-size: 19px; font-weight: 900; }
.match-score { display: flex; align-items: center; justify-content: center; gap: 14px; font-family: 'Space Grotesk', monospace; font-weight: 700; font-size: 38px; }
.match-score .t { font-family: 'Outfit', sans-serif; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); display: block; text-align: center; }

/* ---------- Invito ---------- */
.code { display: flex; gap: 6px; justify-content: center; margin: 4px 0 14px; }
.code span { width: 40px; height: 54px; display: grid; place-items: center; border-radius: 13px; background: rgba(0, 0, 0, 0.42); border: 1px solid var(--line-strong); font-family: 'Space Grotesk', monospace; font-weight: 700; font-size: 26px; color: var(--gold-hi); box-shadow: inset 0 -3px 0 rgba(255, 255, 255, 0.05); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Sheet (finestre dal basso) ---------- */
.sheet-back { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.2s; }
.sheet-back.open { opacity: 1; }
.sheet { width: 100%; max-width: 620px; max-height: 90dvh; overflow: auto; background: #0c1512; border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 28px 28px 0 0; padding: 8px 18px calc(22px + var(--safe-b)); transform: translateY(28px); transition: transform 0.26s cubic-bezier(0.2, 0.9, 0.3, 1); }
.sheet-back.open .sheet { transform: none; }
.sheet-grab { width: 44px; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.2); margin: 6px auto 14px; }
.sheet h2 { font-size: 22px; font-weight: 900; letter-spacing: -0.01em; margin-bottom: 4px; }
.sheet .lead { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.sheet-actions { display: grid; gap: 8px; margin-top: 6px; }
@media (min-width: 700px) {
  .sheet-back { align-items: center; }
  .sheet { border-radius: 28px; border-bottom: 1px solid var(--line-strong); }
}

/* ---------- Notifiche ---------- */
.toasts { position: fixed; top: calc(12px + var(--safe-t)); left: 0; right: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; max-width: 440px; width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 18px; font-weight: 700; font-size: 14px; background: #0e1a15; border: 1px solid var(--line-strong); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65); animation: toastIn 0.26s cubic-bezier(0.2, 0.9, 0.3, 1); }
.toast.ok { border-color: rgba(16, 185, 129, 0.55); background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), #0e1a15 70%); }
.toast.err { border-color: rgba(244, 63, 94, 0.55); background: linear-gradient(135deg, rgba(244, 63, 94, 0.22), #0e1a15 70%); }
.toast.out { animation: toastOut 0.22s ease forwards; }

/* ---------- Caricamento ---------- */
.sk { border-radius: 22px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04)); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }

/* ---------- Animazioni ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.65; } }
@keyframes mePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@media (max-width: 380px) {
  .brand { font-size: 34px; }
  .hero-title { font-size: 24px; }
  .cd-num { font-size: 24px; }
  .pitch-token { width: 80px; }
  .pitch-jersey svg { width: 46px; height: 46px; }
}


/* ==========================================================================
   Funzioni di gara: OVR, 11° Uomo Live, classifiche, carta giocatore
   ========================================================================== */

/* ---------- OVR e fasce ---------- */
.ovr {
  display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 22px; padding: 0 7px; border-radius: 7px;
  font-family: 'Space Grotesk', monospace; font-weight: 700; font-size: 13px; line-height: 1; flex: none;
}
.t-bronze { background: linear-gradient(135deg, #cd8447, #8a4b1a); color: #fff3e6; }
.t-silver { background: linear-gradient(135deg, #f1f5f9, #94a3b8); color: #0f172a; }
.t-gold { background: linear-gradient(135deg, #fde047, #d97706); color: #1c1100; }
.t-legendary { background: linear-gradient(135deg, #67e8f9, #a78bfa 55%, #f472b6); color: #0b0b1e; box-shadow: 0 0 12px rgba(167, 139, 250, 0.6); }
.nick { font-weight: 600; font-size: 12px; color: var(--muted); }

/* ---------- Segmented a 3 + chip scorrevoli ---------- */
.seg3 button { font-size: 11.5px; letter-spacing: 0.02em; padding: 0 2px; }
.chips-scroll { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px; scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }
.pill {
  flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(0, 0, 0, 0.3);
  color: var(--muted); font-weight: 800; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
}
.pill.on { background: var(--em); border-color: transparent; color: var(--em-ink); }
.pill.on-gold { background: var(--gold); border-color: transparent; color: var(--gold-ink); }

/* ---------- Pitch: OVR e statistiche live sulle maglie ---------- */
button.pitch-token { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; transition: transform 0.12s; }
button.pitch-token:active { transform: scale(0.94); }
.pitch-ovr { position: absolute; top: -3px; right: 6px; z-index: 3; height: 18px; min-width: 24px; padding: 0 5px; font-size: 11px; border-radius: 6px; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5); }
.pitch-badges { display: flex; gap: 3px; justify-content: center; margin-top: 3px; flex-wrap: wrap; }
.bdg { padding: 1px 6px; border-radius: 6px; font-size: 10.5px; font-weight: 900; font-family: 'Space Grotesk', monospace; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); }
.bdg.g { background: var(--em); color: var(--em-ink); }
.bdg.a { background: var(--sky); color: #04283a; }
.bdg.o { background: #f43f5e; color: #fff; }
.pitch-hint { margin-top: 2px; font-size: 9px; font-weight: 800; letter-spacing: 0.06em; color: #fde047; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }
.pitch-token.edited .pitch-jersey { filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.9)); }

/* ---------- Soluzioni di squadre ---------- */
.opts { display: grid; gap: 8px; margin-bottom: 14px; }
.opt {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 16px; text-align: left; width: 100%;
  border: 1.5px solid var(--line); background: rgba(0, 0, 0, 0.3); color: var(--muted); transition: all 0.16s;
}
.opt.on { border-color: var(--em); background: rgba(16, 185, 129, 0.13); color: var(--text); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12); }
.opt b { display: block; font-size: 14px; font-weight: 800; }
.opt small { font-size: 12px; font-family: 'Space Grotesk', monospace; color: #6ee7b7; }
.opt .pct { margin-left: auto; font-family: 'Space Grotesk', monospace; font-weight: 700; font-size: 22px; color: var(--em-hi); }
.team-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.tm { padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.tm b { display: block; color: var(--text); font-size: 13px; margin-bottom: 3px; }
.tm .mono { color: var(--text); font-weight: 700; }

/* ---------- 11° Uomo Live ---------- */
.board {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 16px 14px 14px; text-align: center;
  border: 1px solid rgba(244, 63, 94, 0.45);
  background: radial-gradient(120% 140% at 50% -10%, rgba(244, 63, 94, 0.2), transparent 60%), linear-gradient(180deg, rgba(20, 14, 16, 0.96), rgba(8, 12, 11, 0.96));
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8);
}
.board.is-over { border-color: var(--line-strong); background: linear-gradient(180deg, rgba(15, 23, 20, 0.96), rgba(8, 12, 11, 0.96)); }
.live-pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px; background: #e11d48; color: #fff; font-weight: 900; font-size: 11px; letter-spacing: 0.14em; }
.live-pill i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.1s infinite; }
.board.is-over .live-pill { background: rgba(255, 255, 255, 0.12); }
.board.is-over .live-pill i { animation: none; background: var(--muted); }
.board-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; margin: 12px 0 4px; }
.board-team { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.board-num { font-family: 'Space Grotesk', monospace; font-weight: 700; font-size: 66px; line-height: 1; letter-spacing: -0.03em; }
.board-num.bump { animation: bump 0.5s ease; }
.board-dash { font-size: 30px; color: var(--dim); font-weight: 800; }
.board-foot { font-size: 12px; color: var(--muted); }
.ctrl { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 13px 14px; border-radius: 18px; border: 1px solid; font-size: 13px; }
.ctrl b { font-weight: 900; }
.ctrl p { color: var(--muted); margin-top: 2px; font-size: 12.5px; }
.ctrl-free { background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.45); }
.ctrl-me { background: rgba(16, 185, 129, 0.14); border-color: rgba(16, 185, 129, 0.5); }
.ctrl-tv { background: rgba(56, 189, 248, 0.1); border-color: rgba(56, 189, 248, 0.35); }
.feed { display: grid; gap: 6px; }
.ev { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); font-size: 14px; }
.ev .ic { font-size: 20px; }
.ev .who { flex: 1; min-width: 0; font-weight: 800; }
.ev .who small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }
.ev .at { font-family: 'Space Grotesk', monospace; color: var(--em-hi); font-weight: 700; font-size: 13px; }
.sw { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; border: 1.5px solid #64748b; }
.sw.w { background: #fff; }
.sw.b { background: #0b1220; }
.counter-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); }
.counter-row + .counter-row { margin-top: 8px; }
.counter-row .lab { flex: 1; font-weight: 800; font-size: 15px; }
.counter-row .lab small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }
.counter-row .val { min-width: 34px; text-align: center; font-family: 'Space Grotesk', monospace; font-weight: 700; font-size: 30px; }
.big-btn { width: 56px; height: 52px; border-radius: 16px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.07); font-size: 28px; font-weight: 700; line-height: 1; padding: 0; }
.big-btn.plus { background: linear-gradient(135deg, #34d399, #059669); color: var(--em-ink); border-color: transparent; box-shadow: 0 8px 20px -8px rgba(16, 185, 129, 0.6); }
.big-btn:active { transform: scale(0.92); }
.big-btn[disabled] { opacity: 0.35; pointer-events: none; }
.chip-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.chip-pick .pill { min-height: 44px; font-size: 14px; text-transform: none; letter-spacing: 0; }

/* ---------- Bidone d'Oro ---------- */
.vitrine {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 18px 16px; text-align: center;
  border: 2px solid rgba(251, 191, 36, 0.55);
  background: radial-gradient(circle at 50% 36%, rgba(251, 191, 36, 0.32) 0%, rgba(146, 64, 14, 0.38) 42%, rgba(12, 9, 4, 0.96) 100%);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.6), 0 20px 50px -15px rgba(245, 158, 11, 0.35);
}
.gold-text { background: linear-gradient(90deg, #fde68a, #fbbf24 50%, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vitrine h2 { font-size: 24px; font-weight: 900; letter-spacing: -0.01em; text-transform: uppercase; margin: 6px 0 2px; }
.vitrine .sub { font-size: 13px; color: rgba(254, 243, 199, 0.8); font-weight: 600; }
/* Trofeo: stile del sito attuale (bagliore che pulsa) e dimensioni equivalenti a w-64, w-20, w-24 */
@keyframes goldPulse {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(251, 191, 36, 0.45)) drop-shadow(0 0 34px rgba(245, 158, 11, 0.25)); }
  50% { filter: drop-shadow(0 0 28px rgba(253, 224, 71, 0.85)) drop-shadow(0 0 60px rgba(245, 158, 11, 0.5)); }
}
.bidone-trophy { display: block; height: auto; flex: none; user-select: none; -webkit-user-select: none; animation: goldPulse 3.4s ease-in-out infinite; }
.bin-full { width: 16rem; max-width: 80%; margin: 0 auto; }
.bin-teaser { width: 5rem; }
.bin-hof { width: 6rem; }
@media (min-width: 640px) { .bin-full { width: 20rem; } .bin-teaser { width: 6rem; } }
.cd.gold .cd-tile { border-color: rgba(251, 191, 36, 0.35); background: rgba(0, 0, 0, 0.5); }
.cd.gold .cd-num { color: #fde68a; }
.rk { display: grid; gap: 8px; }
.rk-row {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 18px; width: 100%; text-align: left;
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); color: var(--text);
}
button.rk-row { cursor: pointer; transition: transform 0.1s, background 0.15s; }
button.rk-row:active { transform: scale(0.985); }
.rk-row.leader { background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(120, 53, 15, 0.22)); border-color: rgba(251, 191, 36, 0.6); }
.rk-row.me { border: 2px solid rgba(251, 191, 36, 0.7); }
.rk-row.dim { opacity: 0.58; }
.rk-pos { width: 26px; text-align: center; font-family: 'Space Grotesk', monospace; font-weight: 700; font-size: 17px; color: var(--muted); flex: none; }
.rk-main { flex: 1; min-width: 0; }
.rk-name { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rk-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.rk-sub b { color: var(--text); font-weight: 700; }
.rk-score { text-align: right; flex: none; font-family: 'Space Grotesk', monospace; font-weight: 700; font-size: 24px; line-height: 1; color: var(--gold-hi); }
.rk-score small { display: block; font-family: 'Outfit', sans-serif; font-size: 9.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.rk-score.em { color: var(--em-hi); }
.hof { display: grid; gap: 10px; }
.hof-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(0, 0, 0, 0.3)); border: 1px solid rgba(251, 191, 36, 0.35); }
.hof-item .t { font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.hof-item .n { font-size: 20px; font-weight: 900; }
details.how { margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
details.how summary { cursor: pointer; font-weight: 800; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
details.how p { margin-top: 8px; line-height: 1.5; }
details.how b { color: var(--text); }

/* ---------- Statistiche ---------- */
.podium { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
.podium .pd { padding: 11px 12px; border-radius: 16px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); min-width: 0; }
.podium .pd .t { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.podium .pd .n { font-size: 16px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.podium .pd .v { font-family: 'Space Grotesk', monospace; font-weight: 700; color: var(--em-hi); font-size: 13px; }
.podium .pd:first-child { grid-column: span 2; background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(0, 0, 0, 0.3)); border-color: rgba(16, 185, 129, 0.4); }
.form-dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.form-dots i { width: 17px; height: 17px; border-radius: 5px; font-style: normal; font-size: 10px; font-weight: 900; display: grid; place-items: center; }
.f-W { background: var(--em); color: var(--em-ink); }
.f-D { background: var(--gold); color: var(--gold-ink); }
.f-L { background: #f43f5e; color: #fff; }

/* ---------- Carta giocatore ---------- */
.fut { position: relative; overflow: hidden; border-radius: 24px; padding: 16px 16px 14px; border: 2px solid rgba(255, 255, 255, 0.4); box-shadow: 0 18px 38px -14px rgba(0, 0, 0, 0.85); }
.fut.t-gold { background: linear-gradient(160deg, #fff1a8, #f6c744 45%, #b87a08); color: #1c1100; }
.fut.t-silver { background: linear-gradient(160deg, #f8fafc, #cbd5e1 45%, #64748b); color: #0b1220; }
.fut.t-bronze { background: linear-gradient(160deg, #f3c9a0, #c2773a 50%, #6b3a12); color: #2a1204; }
.fut.t-legendary { background: linear-gradient(160deg, #cffafe, #a78bfa 48%, #6d28d9 85%, #1e1b4b); color: #0f0a2e; }
.fut::before { content: ''; position: absolute; inset: -40% -20% auto auto; width: 70%; height: 120%; background: rgba(255, 255, 255, 0.18); transform: rotate(24deg); pointer-events: none; }
.fut-top { display: flex; align-items: flex-start; gap: 14px; position: relative; }
.fut-ovr { font-family: 'Space Grotesk', monospace; font-weight: 700; font-size: 62px; line-height: 0.9; letter-spacing: -0.04em; }
.fut-ovr small { display: block; font-family: 'Outfit', sans-serif; font-size: 11px; font-weight: 900; letter-spacing: 0.14em; margin-top: 4px; opacity: 0.75; }
.fut-id { flex: 1; min-width: 0; padding-top: 2px; }
.fut-name { font-size: 24px; font-weight: 900; line-height: 1.05; letter-spacing: -0.01em; text-transform: uppercase; overflow-wrap: anywhere; }
.fut-role { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; margin-top: 4px; }
.fut-tag { display: inline-block; margin-top: 8px; padding: 2px 9px; border-radius: 999px; background: rgba(0, 0, 0, 0.22); font-size: 10px; font-weight: 900; letter-spacing: 0.08em; }
.fut-attrs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 16px; margin-top: 14px; padding-top: 12px; border-top: 1.5px solid rgba(0, 0, 0, 0.22); position: relative; }
.attr { display: grid; grid-template-columns: 30px 1fr 24px; align-items: center; gap: 7px; font-size: 12px; font-weight: 900; letter-spacing: 0.05em; }
.attr i { height: 7px; border-radius: 99px; background: rgba(0, 0, 0, 0.22); overflow: hidden; display: block; }
.attr i u { display: block; height: 100%; background: rgba(0, 0, 0, 0.62); border-radius: 99px; }
.attr span { font-family: 'Space Grotesk', monospace; text-align: right; }
.fut-note { position: relative; margin-top: 10px; font-size: 11px; font-weight: 700; opacity: 0.75; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.stat-grid .tile b { font-size: 20px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.kv b { font-weight: 800; text-align: right; }
.hist { display: grid; gap: 6px; }
.hist-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 14px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); font-size: 13px; }
.hist-row .res { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 900; font-size: 12px; }
.hist-row .mid { flex: 1; min-width: 0; }
.hist-row .mid small { display: block; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-row .nums { font-family: 'Space Grotesk', monospace; font-weight: 700; font-size: 13px; white-space: nowrap; }

/* ---------- Storico partite ---------- */
.mh { border-radius: var(--r); background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); overflow: hidden; }
.mh + .mh { margin-top: 8px; }
.mh > summary { list-style: none; cursor: pointer; padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.mh > summary::-webkit-details-marker { display: none; }
.mh .when { flex: 1; min-width: 0; font-weight: 800; font-size: 14px; }
.mh .when small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.mh .sc { font-family: 'Space Grotesk', monospace; font-weight: 700; font-size: 26px; white-space: nowrap; }
.mh-body { padding: 0 14px 14px; }
.mh-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mh-team h4 { margin: 0 0 6px; font-size: 11px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.mh-team div { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.mh-team div span:last-child { font-family: 'Space Grotesk', monospace; font-size: 12px; white-space: nowrap; }
.mh-awards { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }

/* ---------- Moduli: sliders e numeri ---------- */
.slider-row { display: grid; grid-template-columns: 74px 1fr 36px; align-items: center; gap: 10px; padding: 7px 0; font-weight: 800; font-size: 12.5px; letter-spacing: 0.04em; }
.slider-row output { font-family: 'Space Grotesk', monospace; font-size: 17px; text-align: right; color: var(--em-hi); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--em-hi); border: 3px solid #04120c; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--em-hi); border: 3px solid #04120c; }
.num { width: 100%; min-height: 42px; padding: 0 6px; border-radius: 11px; border: 1px solid var(--line-strong); background: rgba(0, 0, 0, 0.38); color: var(--text); font-family: 'Space Grotesk', monospace; font-weight: 700; font-size: 16px; text-align: center; }
.num:focus { outline: none; border-color: var(--em); }
.ed-row { display: grid; grid-template-columns: 1fr 58px 58px 58px; gap: 6px; align-items: center; padding: 5px 0; font-weight: 700; font-size: 14px; }
.ed-row.head { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ed-row.head span + span { text-align: center; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-of-type { border-bottom: 0; }
.switch-row b { display: block; font-size: 15px; }
.switch-row small { color: var(--muted); font-size: 12px; }
.banner-live { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 14px; border-radius: 20px; color: var(--text); border: 1px solid rgba(244, 63, 94, 0.55); background: linear-gradient(135deg, rgba(244, 63, 94, 0.22), rgba(10, 14, 12, 0.9)); cursor: pointer; }
.banner-live .sc { margin-left: auto; font-family: 'Space Grotesk', monospace; font-weight: 700; font-size: 26px; white-space: nowrap; }
.banner-gold { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 20px; color: var(--text); border: 1px solid rgba(251, 191, 36, 0.5); background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(10, 14, 12, 0.92)); cursor: pointer; }
.banner-gold small { display: block; color: rgba(254, 243, 199, 0.75); font-size: 12px; margin-top: 2px; }
.banner-gold b { font-size: 15px; font-weight: 900; }

@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.25); color: var(--em-hi); } 100% { transform: scale(1); } }
.nav-dot.live { background: #f43f5e; box-shadow: 0 0 0 3px rgba(10, 16, 14, 0.95), 0 0 12px #f43f5e; }

@media (max-width: 380px) {
  .nav-item { font-size: 8.8px; letter-spacing: 0; }
  .board-num { font-size: 54px; }
  .fut-ovr { font-size: 52px; }
  .fut-name { font-size: 20px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Link personale di attivazione ---------- */
.linkbox { margin: 4px 0 14px; padding: 12px 14px; border-radius: 14px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line-strong); font-size: 12px; line-height: 1.5; word-break: break-all; color: var(--gold-hi); max-height: 120px; overflow: auto; user-select: all; -webkit-user-select: all; }
