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

html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
body{
  overflow-x:hidden;
}

#clm-scores-app .clms-header{
  min-height:72px;
  box-sizing:border-box;
  overflow:hidden;
}
#clm-scores-app .clms-title{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%, -50%);
  width:max-content;
  max-width:calc(100% - 144px);
  margin:0;
  line-height:1;
}
#clm-scores-app .clms-title-logo,
#clm-scores-app .clms-title-logo a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
#clm-scores-app .clms-header-logo{
  display:block;
  width:auto;
  height:34px;
  max-width:none;
  max-height:34px;
  object-fit:contain;
  flex:0 0 auto;
}
#clm-scores-app .clms-logo-link,
#clm-scores-app .clms-profile-btn{
  flex:0 0 auto;
}
#clm-scores-app .clms-header-right{
  min-width:38px;
  min-height:38px;
}
#clm-scores-app .clms-navbar{
  position:fixed;
  left:10px !important;
  right:10px !important;
  bottom:max(8px, env(safe-area-inset-bottom)) !important;
  margin:0 !important;
  transform:translateZ(0);
  will-change:auto;
  box-sizing:border-box;
}
@media (max-width: 767px){
  #clm-scores-app .clms-header{ min-height:74px; }
  #clm-scores-app .clms-header-logo{ height:36px; max-height:36px; }
  #clm-scores-app .clms-title{ max-width:calc(100% - 132px); }
}

/* Mobile: aggiunge spazio sotto il contenuto per evitare che
   la bottom-nav copra l'ultima card (es. Prossimo turno). */
@media (max-width: 768px) {
  #clm-scores-app,
  .clms-view-wrap,
  .clms-main,
  .clms-content {
    padding-bottom: 140px !important;
  }
}

.clms-scores-fullscreen,
.clms-scores-page {
    height: 100%;
}

#clm-scores-app {
    min-height: 100vh;
    background: radial-gradient(circle at top, #184a8a 0, #020824 45%, #020514 100%);
    color: #f5f7ff;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
    display: flex;
    flex-direction: column;
}

#clm-scores-app,
#clm-scores-app *,
#clm-scores-app *::before,
#clm-scores-app *::after,
#clm-scores-app input,
#clm-scores-app select,
#clm-scores-app textarea,
#clm-scores-app button {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
}

.clms-header {
    /* Header layout hard-fix:
       - Logo CLMSCORES sempre perfettamente centrato
       - Elementi laterali (badge sinistro, pallino LIVE, pill PRO) fuori dal flusso
         per evitare spostamenti/micro-bounce.
    */
    position: sticky;
    top: 0;
    z-index: 20;
    display: block;
    padding: 14px 20px;
    background: linear-gradient(90deg, #0a2b5c, #0f407e);
    box-shadow: 0 10px 25px rgba(0,0,0,0.45);
}

/* Badge sinistro (CLM/CST) */
.clms-logo {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
}

/* No underline sul badge CLM/CST */
.clms-logo-link,
.clms-logo-link:visited,
.clms-logo-link:hover,
.clms-logo-link:active{
    text-decoration: none !important;
}

/* Titolo/logo CLMSCORES centrato */
.clms-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    text-align: center;
}

/* Contenitore destro (LIVE dot + PRO) */
.clms-header-right {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Pallino LIVE in header: sempre assoluto (non deve mai spingere il logo) */
.clms-live-dot-only {
    position: absolute;
    z-index: 25;
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    pointer-events: none;
}

.clms-live-dot-only.is-visible { display: flex; }

.clms-live-dot-only .clms-live-dot {
    width: 14px !important;
    height: 14px !important;
    aspect-ratio: 1 / 1;
    border-radius: 999px !important;
    background: #ff2d2d;
    border:1px solid rgba(255,255,255,0.85);
    box-sizing: border-box;
    flex: 0 0 auto;
    display: block;
    transform-origin: 50% 50%;
    animation: clmsLivePulseSoft 2.8s ease-in-out infinite;
}

@keyframes clmsLivePulseSoft {
    0%   { transform: scale(1);    opacity: 1; }
    50%  { transform: scale(0.62); opacity: 0.45; }
    100% { transform: scale(1);    opacity: 1; }
}

.clms-logo,
.clms-profile {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.35);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size: 12px;
    font-weight: 700;
    color:#fff;
    background: radial-gradient(circle at 30% 0%, #1b6cff, #03255f);
}

.clms-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    pointer-events: auto;
}

.clms-title-logo a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    pointer-events:auto;
}

/* CONTENT */

.clms-content {
    flex: 1;
    padding: 16px 14px 90px;
    box-sizing: border-box;
}

/* CARD */

.clms-card {
    background: rgba(3, 12, 35, 0.96);
    border-radius: 22px;
    padding: 16px 18px 18px;
    margin-bottom: 16px;
    box-shadow: 0 14px 32px rgba(0,0,0,0.55);
}

.clms-card h2 {
    margin: 0 0 10px;
    font-size: 14px;   /* cambia qui la dimensione */
    font-weight: 400;
    color: #ffffff;    /* aggiungi/aggiusta qui il colore del testo */
}

/* Campionati */

.clms-form-champ {
    display:flex;
    flex-direction:column;
    gap:10px;
}

.clms-form-champ label {
    font-size: 13px;
    opacity: 0.85;
    margin-bottom: 2px;
}

.clms-form-champ select {
    border-radius: 999px;
    border:1px solid rgba(255,255,255,0.85);
    padding:10px 14px;
    background:#061534;
    color:#fff;
    font-size:14px;
    width:100%;
}

.clms-btn {
    margin-top:4px;
    border-radius:999px;
    background:#ffc529;
    color:#05111f;
    font-weight:600;
    border:1px solid rgba(255,255,255,0.85);
    padding:10px 14px;
    font-size:14px;
}

/* Matchday nav */

.clms-matchday-nav {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:6px;
    margin-bottom:10px;
}

.clms-badge {
    flex:1;
}

.clms-badge a,
.clms-badge span {
    display:block;
    text-align:center;
    border-radius:10px;  /* bordi morbidi ma non troppo tondi */
    padding:7px 6px;
    font-size:12px;
    text-decoration:none;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.clms-badge a {
    background:#061534;
    color:#f5f7ff;
}

.clms-badge-current {
    background:#ffc529;
    color:#041022;
    font-weight:700;
}

.clms-badge-disabled {
    background:#020b1e;
    color:rgba(255,255,255,0.25);
}

/* Match list */

.clms-date {
    font-size:13px;
    opacity:0.85;
    margin: 0 0 6px;
}

.clms-match-list {
    border-top:1px solid rgba(255,255,255,0.06);
}

.clms-match-row {
    padding:10px 0;
    border-bottom:1px solid rgba(255,255,255,0.04);
}

/* Riga gara stile FotMob: Home – score – Away su UNA riga */
.clms-match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;  /* invece di center: usa tutta la larghezza */
    gap: 12px;
}

/* Nome + logo in linea (Home e Away) */
.clms-match-teams .clms-team-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 0;             /* prende lo spazio disponibile */
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;      /* niente a capo */
    overflow: hidden;         /* se troppo lungo… */
    text-overflow: ellipsis;  /* …metti i tre puntini */
}

/* Home: testo allineato a destra */
.clms-match-teams .clms-team-name.clms-team-home {
    justify-content: flex-end;
    text-align: right;
}

/* Away: testo allineato a sinistra */
.clms-match-teams .clms-team-name.clms-team-away {
    justify-content: flex-start;
    text-align: left;
}

/* Loghi vicino al nome */
.clms-match-teams .clms-team-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Punteggio / orario al centro: spazio per 3 cifre-3 cifre */
.clms-match-teams .clms-score {
    flex: 0 0 auto;
    font-size: 17px;
    font-weight: 600;
    color: #ffc529;
    letter-spacing: 0.04em;
    text-align: center;
    min-width: 86px;          /* <-- prima era 60, ora ci sta 126-104 */
    white-space: nowrap;      /* <-- impedisce l’andare a capo */
}

.clms-match-meta {
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.85;
    text-align: center;
}

/* LIVE */

/*.clms-live-row {
    background:linear-gradient(90deg, rgba(255,59,48,0.12), transparent);
} */

.clms-live-dot {
    width:8px;
    height:8px;
    border-radius:999px;
    background:#ff3b30;
    display:inline-block;
    margin-right:4px;
    box-shadow:0 0 10px rgba(255,59,48,0.8);
    animation:clms-pulse 1.2s infinite;
}

@keyframes clms-pulse {
    0% { transform:scale(1); opacity:1; }
    70% { transform:scale(1.8); opacity:0; }
    100% { transform:scale(1.8); opacity:0; }
}

/* STANDINGS */

.clms-table-standings {
    width:100%;
    border-collapse:collapse;
    font-size:13px;
}

.clms-table-standings thead th {
    font-weight:600;
    padding:4px 2px 6px;
    border-bottom:1px solid rgba(255,255,255,0.14);
}

.clms-table-standings tbody td {
    padding:5px 2px;
    border-bottom:1px solid rgba(255,255,255,0.05);
}

.clms-td-team {
    text-align:left;
    padding-left:4px;
}

/* NAVBAR */

.clms-navbar {
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    height:60px;
    padding:6px 10px 8px;
    background:radial-gradient(circle at top, #102b5b 0, #030817 65%, #01040b 100%);
    display:flex;
    justify-content:space-around;
    gap:6px;
    box-shadow:0 -8px 20px rgba(0,0,0,0.6);
    z-index:30;
}

.clms-navbar{
  border-radius: 18px;
  margin: 0 10px;   /* la stacca dai lati */
}

.clms-nav-item {
    flex:1;
    border-radius:999px;  /* ← se vuoi, metti tipo 14px */
    text-align:center;
    padding:7px 4px 8px;
    font-size:10px;
    text-decoration:none;
    color:rgba(245,247,255,0.7);
    font-weight:500;
}

.clms-nav-item.is-active {
    background:#ffc529;
    color:#05111f;
    font-weight:700;
}

/* Di base il tab LIVE è nascosto.
   Lo mostriamo via JS solo quando c'è almeno una gara live. */
.clms-nav-item[data-nav="live"] {
    display: none;
}

/* Mobile: in Risultati mostra solo Ieri / Oggi / Domani */
@media (max-width: 767px) {
  .clms-matchday-nav .clms-badge:first-child,
  .clms-matchday-nav .clms-badge:last-child {
    display: none;
  }
}

/* Desktop: app a tutta larghezza */
@media (min-width: 768px) {
  #clm-scores-app {
    max-width: 100%;
    width: 100%;
    margin: 0;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
  }

  /* se vuoi che la card arrivi proprio a filo bordo */
  .clms-content {
    padding-left: 0;
    padding-right: 0;
  }
}

/* LIVE – riga unica: squadra casa | punteggio | squadra ospite */
.clms-live-card .clms-live-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Squadre ai lati */
.clms-live-team-home,
.clms-live-team-away {
    flex: 1 1 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

/* Casa a sinistra, Ospiti a destra */
.clms-live-team-home {
    text-align: left;
}

.clms-live-team-away {
    text-align: left;
}

/* Punteggio giallo al centro */
.clms-live-score {
    flex: 0 0 auto;
    font-weight: 800;
    letter-spacing: 0.04em;
    /* scala con lo schermo, ma non diventa mai enorme */
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    color: #FFC933; /* giallo CLM */
}

/* Versione compatta se il nome è troppo lungo (classe aggiunta via JS) */
.clms-live-team-home.clms-small,
.clms-live-team-away.clms-small {
    font-size: 0.6rem;
}

/* Su schermi molto piccoli stringi tutto leggermente */
@media (max-width: 360px) {
    .clms-live-team-home,
    .clms-live-team-away {
        font-size: 0.3rem;
    }

    .clms-live-score {
        font-size: 1.0rem;
    }
}

/* Logo squadra stile "favicon" per risultati e classifica */
.clms-team-logo {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    object-fit: contain;
    margin-right: 4px;
    vertical-align: middle;
}

/* Ancora più piccolo in classifica, se vogliamo stringere un po' */
.clms-team-logo-small {
    width: 25px;
    height: 25px;
}

/* (opzionale) allinea il testo accanto al logo in classifica */
.clms-td-team .clms-team-name-full {
    vertical-align: middle;
}

/* === LIVE CARD RESPONSIVE LAYOUT (CLM custom) === */

.clms-live-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Nomi squadre: ai lati, su una riga, con eventuale troncamento */
.clms-live-team {
    flex: 1 1 0;
    font-weight: 600;
    font-size: clamp(11px, 2.2vw, 14px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Blocchetto punteggio centrale */
.clms-live-score {
    flex: 0 0 auto;
    display: flex;
    align-items: baseline;
    justify-content: center;
    column-gap: 4px;
}

/* Numeri del punteggio */
.clms-live-score-value {
    font-size: clamp(14px, 4vw, 25px);
    font-weight: 400;
}

/* Trattino “–” tra i punteggi */
.clms-live-score-separator {
    font-size: clamp(18px, 5vw, 26px);
    font-weight: 700;
}

/* Desktop / tablet: caratteri un po' più grandi */
@media (min-width: 768px) {
    .clms-live-team {
        font-size: 22px;
    }
    .clms-live-score-value {
        font-size: 32px;
    }
}

/* ===== RISULTATI – STILE FOTMOB ===== */

.clms-match-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
}

.clms-team {
    flex: 1;
}

.clms-team-home {
    text-align: right;
}

.clms-team-away {
    text-align: left;
}

/* Nome squadre */
.clms-team-name {
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

/* Punteggio al centro */
.clms-score-area {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 80px;
}

.clms-score {
    font-size: 16px;
    font-weight: 600;
    color: #ffc529;
}

/* Loghi piccoli stile favicon */
.clms-team-logo.score-logo {
    width: 22px;
    height: 22px;
    border-radius:50%;
    object-fit: contain;
}

/* Mobile – mostra solo Ieri/Oggi/Domani */
@media (max-width: 767px) {
    .clms-matchday-nav .clms-badge:first-child,
    .clms-matchday-nav .clms-badge:last-child {
        display: none;
    }
}

/* === END LIVE CARD RESPONSIVE LAYOUT === */
/* Più spazio tra una classifica (campionato) e l'altra */
.clms-table-standings {
  margin-bottom: 28px;   /* aumenta/diminuisci a gusto: 24–32px */
}

/* Titolo del campionato (Risultati, Classifiche, Live) */
.clms-champ-heading {
  margin-top: 24px;
  margin-bottom: 8px;

  /* base (verrà rinforzato sotto con selettore più specifico) */
  position: relative;
  font-size: 14px;      /* ← QUI cambi la grandezza del titolo */
  font-weight: 400;     /* grassetto */
  color: #D6D14A;       /* ← QUI cambi il colore del testo (giallo CLM) */
}

/* Layout calendario + titolo nella barra bianca intestazione campionato (RISULTATI)
   - Titolo FULL (non troncare)
   - Icona calendario a DESTRA (come nel tuo mock)
   - Input date invisibile sopra l'icona (tap diretto iOS) */
#clm-scores-app .clms-card:not(.clms-card-dates) .clms-champ-heading.clms-champ-heading--with-cal{
  position: relative !important;
  padding-right: 56px !important; /* spazio per l'icona a destra */
}

#clm-scores-app .clms-champ-heading--with-cal .clms-champ-title{
  display:block;
  white-space: normal;      /* niente ellipsis */
  overflow: visible;
  text-overflow: unset;
}

.clms-datepick-wrap{
  position:absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#06112a; /* blu navy interno card */
}
.clms-datepick-wrap svg{
  width: 18px;
  height: 18px;
}

/* input date sopra l'icona: invisibile ma TAPPABILE */
.clms-date-picker-inline{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  border:0;
  background:transparent;
  cursor:pointer;
}
@media (hover:hover) and (pointer:fine){
  .clms-date-picker-inline{ pointer-events:none; }
}

/* Il primo titolo dentro la card non deve avere margine sopra */
.clms-card .clms-champ-heading:first-of-type {
  margin-top: 0;
}

.clms-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  letter-spacing: 2px;
}
/* FLASH aggiornamento punteggio LIVE */
@keyframes clms-score-flash {
  0% { color: #ffc529; }
  50% { color: #ffffff; }
  100% { color: #ffc529; }
}

.clms-score-update-flash {
  animation: clms-score-flash 0.9s ease-in-out;
}

/* === BADGE SINISTRO: CST giallo (solo quando loggato atleta/coach) === */
#clm-scores-app .clms-logo-link.is-cst{
  background: #ffc529 !important;     /* giallo CLM */
  color: #05111f !important;          /* testo scuro */
  border-color: rgba(0,0,0,0.18) !important;
  box-shadow: 0 10px 18px rgba(0,0,0,0.35);
}

/* =========================================================
   MATCH DETAILS (pagina interna, stile FotMob)
   ========================================================= */
.clms-match-row{
  display:block;
  color: inherit;
  text-decoration:none;
  cursor:pointer;
}

.clms-match-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 12px;
}
.clms-match-back{
  width:36px;height:36px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color:#fff;
  font-size:18px;
}
.clms-match-topbar-title{
  font-weight:800;
  letter-spacing:.2px;
}
.clms-match-topbar-spacer{ width:36px; }

.clms-card-title{
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 10px;
}

/* Hero match */
.clms-hero-row{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items:center;
  gap: 10px;
}
.clms-hero-team{
  display:flex;
  align-items:center;
  gap:10px;
}
.clms-hero-team-away{
  justify-content:flex-end;
  text-align:right;
}
.clms-hero-logo{
  width:48px;height:48px;
  object-fit:contain;
}
.clms-hero-name{
  font-weight:700;
  opacity:.95;
  font-size: 13px;
}
.clms-hero-center{
  text-align:center;
}
.clms-hero-score{
  font-size: 38px;
  font-weight: 900;
  line-height:1;
  color:#ffc529;
}
.clms-hero-date{
  margin-top: 6px;
  font-size: 13px;
  opacity:.75;
}

.clms-hero-minute{
  margin-top: 8px;
  font-size: 12px;
  font-weight: 900;
  opacity: .95;
}

.clms-hero-minute .clms-live-minute{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* Forma */
.clms-form-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.clms-form-item{
  display:grid;
  grid-template-columns: 26px 1fr 26px 28px;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 8px;
}
.clms-form-logo{
  width:22px;height:22px;
  object-fit:contain;
}
.clms-form-score{
  text-align:center;
  font-weight:800;
  opacity:.95;
}
.clms-form-pill{
  width:24px;height:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  font-weight:900;
  font-size:13px;
}
.pill-win{ background: rgba(30,170,110,.95); color:#fff; }
.pill-loss{ background: rgba(220,60,60,.95); color:#fff; }
.pill-draw{ background: rgba(150,150,150,.55); color:#fff; }

/* Classifica confronto */
.clms-stand-table{
  overflow:hidden;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
}
.clms-stand-head, .clms-stand-row{
  display:grid;
  grid-template-columns: 44px 1.6fr .6fr .6fr .6fr .6fr .9fr .8fr;
  align-items:center;
}
.clms-stand-head{
  background: rgba(255,255,255,0.06);
  font-weight:800;
  font-size: 13px;
  opacity:.85;
  padding: 10px 10px;
}
.clms-stand-row{
  padding: 12px 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 14px;
}
.clms-stand-pos{ font-weight:900; opacity:.9; }
.clms-stand-team{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
}
.clms-stand-logo{
  width:24px;height:24px;
  object-fit:contain;
}
.clms-stand-pts{ font-weight:900; }

/* Mobile */
@media (max-width: 520px){
  .clms-hero-score{ font-size: 34px; }
  .clms-form-grid{ grid-template-columns: 1fr; }
}
#clm-scores-app .clms-navbar .clms-nav-item{
  overflow: hidden !important;
}

#clm-scores-app .clms-navbar .clms-nav-item span,
#clm-scores-app .clms-navbar .clms-nav-item .clms-nav-label{
  display:block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* --- FIX flash swipe (background stabile) --- */
.clms-content, .clms-results-host, .clms-results-pane{ background: #06112a !important; }

/* Swipe 3D (FotMob-like) */
.clms-results-host{ perspective:900px; transform-style:preserve-3d; overflow:hidden; }
.clms-results-pane{ transform-style:preserve-3d; backface-visibility:hidden; will-change:transform,opacity; }



/* --- Match Details (stile FotMob) --- */
#clm-scores-app.clms-md-open .clms-results-host{ display:none !important; }
#clm-scores-app.clms-md-open #clms-match-details{ display:block !important; }

.clms-match-row{ cursor:pointer; }

#clms-match-details.clms-md{
  padding: 14px 12px 90px;
}

.clms-md-card{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 22px;
  padding: 14px;
  margin-bottom: 14px;
}

.clms-md-back{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color:#fff;
  font-weight: 700;
  margin-bottom: 10px;
}

.clms-md-hero-row{
  display:grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items:center;
  gap: 10px;
}

.clms-md-side{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 8px;
  min-width:0;
}

.clms-md-hero-logo{
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.clms-md-hero-name{
  font-weight: 800;
  font-size: 16px;
  opacity: .95;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width: 100%;
}

.clms-md-center{
  text-align:center;
  min-width:0;
}

.clms-md-center-main{
  font-size: 44px;
  font-weight: 900;
  letter-spacing: .5px;
  line-height: 1;
}

.clms-md-center-sub{
  margin-top: 6px;
  font-weight: 900;
  font-size: 14px;
  opacity: .9;
}

.clms-md-center-date{
  margin-top: 6px;
  opacity:.75;
  font-size: 14px;
}

.clms-md-title{
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 10px;
}

.clms-md-form-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.clms-md-form-row{
  display:grid;
  grid-template-columns:  34px 1fr;
  align-items:center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(0,0,0,.16);
  border: 1px solid rgba(255,255,255,.08);
  margin-bottom: 10px;
}

.clms-md-form-logo{
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.clms-md-form-score{
  text-align:center;
  font-weight: 900;
  font-size: 18px;
  opacity: .95;
}

.clms-md-pill{
  width: 26px;
  height: 26px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  font-size: 13px;
  color:#fff;
}
.clms-md-pill.win{ background: rgba(20,170,110,.95); }
.clms-md-pill.loss{ background: rgba(220,60,60,.95); }
.clms-md-pill.draw{ background: rgba(150,150,150,.55); }

.clms-md-stand{
  overflow:hidden;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
}

.clms-md-stand-head, .clms-md-stand-row{
  display:grid;
  grid-template-columns: 46px 1.6fr .6fr .6fr .6fr .6fr .9fr .7fr .8fr;
  align-items:center;
}

.clms-md-stand-head{
  padding: 10px 12px;
  background: rgba(255,255,255,.06);
  font-weight: 900;
  font-size: 13px;
  opacity: .85;
}

.clms-md-stand-row{
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-weight: 800;
}

.clms-md-pos{ font-weight: 900; opacity:.9; }

.clms-md-team{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width:0;
}

.clms-md-stand-logo{
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.clms-md-team span{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.clms-md-pm{ opacity:.9; }
.clms-md-pnt{ font-weight: 900; }

@media (max-width:520px){
  .clms-md-center-main{ font-size: 40px; }
  .clms-md-form-grid{ grid-template-columns: 1fr; }
}



/* =========================================================
   MATCH DETAILS (stile FotMob richiesto)
   ========================================================= */
#clms-matchdetails-page{
  /* più spazio utile: riduco i margini laterali in Match Details */
  padding: 6px;
  max-width: 100%;
  overflow-x: hidden;
}

/* Match Details: meno padding laterale anche sul wrapper contenuti */
#clm-scores-app.clms-in-matchdetails .clms-content{
  padding-left: 10px;
  padding-right: 10px;
}

/* niente scroll laterale in match details (effetto WebApp) */
#clms-matchdetails-page .clms-md-body{
  max-width: 100%;
  overflow-x: hidden;
}

/* Card più "larga" nei dettagli match */
#clms-matchdetails-page .clms-card{
  padding-left: 14px;
  padding-right: 14px;
}
#clms-matchdetails-page .clms-md-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
#clms-matchdetails-page .clms-md-back{
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color:#fff;
  padding:10px 14px;
  border-radius:14px;
  font-weight:700;
}
#clms-matchdetails-page .clms-md-controls{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
#clms-matchdetails-page .clms-md-btn{
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color:#fff;
  padding:8px 10px;
  border-radius:12px;
  font-weight:700;
  font-size:12px;
}

/* scale + weight preferences */
#clm-scores-app{
  --clms-md-scale: 1;
  --clms-md-weight: 800;
}

/* Hero */
.clms-md-hero-grid{
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:center;
  gap: 10px;
}
.clms-md-team{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-width: 0;
}
.clms-md-follow-badge{
  appearance:none;
  border:1.8px solid #f1c548;
  background:transparent;
  color:#f1c548;
  min-width:68px;
  height:22px;
  padding:0 12px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:900;
  letter-spacing:.02em;
  line-height:1;
  cursor:pointer;
  transition:background-color .16s ease, color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.clms-md-follow-badge:active{
  transform:scale(.97);
}
.clms-md-follow-badge.is-active{
  background:#f1c548;
  color:#06112a;
  border-color:#f1c548;
  box-shadow:0 2px 8px rgba(241,197,72,.18);
}
.clms-md-follow-badge-label{
  display:block;
  white-space:nowrap;
}
.clms-md-logo{
  width: 60px;
  height: 60px;
  object-fit: contain;
}

/* Click sul logo (match details) -> pagina calendario squadra */
.clms-md-teamcal-btn{
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  line-height: 0;
}
.clms-md-teamcal-btn:focus{ outline: none; }
.clms-md-teamcal-btn:active{ transform: scale(0.98); }

/* Pagina calendario squadra */
.clms-teamcal-card{ padding: 18px; }
.clms-tc-title{
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 4px;
}
.clms-tc-sub{
  font-size: 14px;
  opacity: .8;
  margin-bottom: 12px;
}
.clms-teamcal-list{ border-radius: 16px; overflow:hidden; }
.clms-teamcal-row{
  display: grid;
  grid-template-columns: 44px 1fr auto 22px;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  cursor: pointer;
}
.clms-teamcal-row:last-child{ border-bottom: 0; }
.clms-teamcal-logo{ width: 44px; height: 44px; object-fit: contain; }
.clms-teamcal-date{ text-align:center; font-weight: 900; font-size: 18px; }
.clms-teamcal-time{ font-weight: 800; opacity: .9; }
.clms-teamcal-ha{ text-align:center; font-size: 18px; opacity: .9; }
.clms-teamcal-empty{ padding: 14px; opacity: .8; }
.clms-md-name{
  font-size: calc(16px * var(--clms-md-scale));
  font-weight: var(--clms-md-weight);
  text-align:center;
  opacity:.95;
  line-height:1.1;
  max-width: 100%;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}
.clms-md-center{
  text-align:center;
}
.clms-md-big{
  font-size: calc(58px * var(--clms-md-scale));
  font-weight: 900;
  letter-spacing: .5px;
  line-height: 1;
}
.clms-md-date{
  margin-top:6px;
  font-size: calc(18px * var(--clms-md-scale));
  opacity: .85;
  font-weight:700;
}

/* Titles */
.clms-md-title{
  font-size: calc(34px * var(--clms-md-scale));
  font-weight: 900;
  margin: 6px 0 14px 0;
}

/* Form grid: sempre 2 colonne affiancate */
.clms-md-form-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.clms-md-form-row{
  display:grid;
  grid-template-columns: 40px 1fr 40px;
  align-items:center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.06);
}
.clms-md-form-logo{
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.clms-md-form-mid{
  text-align:center;
  display:flex;
  flex-direction:column;
  gap: 6px;
  align-items:center;
  justify-content:center;
}
.clms-md-form-score{
  font-size: calc(22px * var(--clms-md-scale));
  font-weight: 900;
  letter-spacing: .3px;
  white-space: nowrap;
}
.clms-md-form-badge{
  font-size: 12px;
  font-weight: 900;
  padding: 5px 10px;
  border-radius: 999px;
  line-height: 1;
}
.clms-md-form-badge.win{ background: rgba(46, 204, 113, .22); color: #bff5d3; border:1px solid rgba(46,204,113,.35); }
.clms-md-form-badge.loss{ background: rgba(231, 76, 60, .22); color: #ffd0cb; border:1px solid rgba(231,76,60,.35); }
.clms-md-form-badge.draw{ background: rgba(200, 200, 200, .18); color: #f0f0f0; border:1px solid rgba(200,200,200,.25); }

/* Standings simplified */
.clms-md-stand{
  width: 100%;
  border-radius: 18px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
}
.clms-md-stand-head,
.clms-md-stand-row{
  display:grid;
  grid-template-columns: 44px 1fr 44px 44px;
  align-items:center;
}
.clms-md-stand-head{
  background: rgba(255,255,255,.06);
  font-weight: 900;
  opacity:.92;
  padding: 12px 14px;
}
.clms-md-stand-head > div{
  font-size: 13px;
}
.clms-md-stand-row{
  padding: 14px 14px;
  border-top:1px solid rgba(255,255,255,.06);
}
.clms-md-stand-pos{
  /* posizione classifica: stessa gerarchia di nome/pt/g (meno "pesante") */
  font-size: calc(14px * var(--clms-md-scale));
  font-weight: 600;
  opacity:.85;
}
.clms-md-stand-team{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.clms-md-stand-logo{
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 auto;
}
.clms-md-stand-name{
  font-size: calc(18px * var(--clms-md-scale));
  font-weight: var(--clms-md-weight);
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.clms-md-stand-g,
.clms-md-stand-p{
  text-align:right;
  font-size: calc(18px * var(--clms-md-scale));
  font-weight: 900;
}

/* Prossimi 3 turni (2 colonne sempre, anche mobile) */
.clms-md-next3-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}
.clms-md-next3-col{
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px;
  padding: 10px;
  min-width: 0;
}
.clms-md-next3-row{
  display:grid;
  grid-template-columns: 34px 1fr 24px;
  align-items:center;
  gap: 10px;
  padding: 10px 6px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.clms-md-next3-row:last-child{ border-bottom: 0; }
.clms-md-next3-logo{
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.clms-md-next3-name{
  font-weight: 800;
  opacity: .95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clms-md-next3-dt{
  font-weight: 700;
  opacity: .85;
  white-space: nowrap;
}
.clms-md-next3-ha{
  text-align:right;
  font-size: 18px;
  line-height: 1;
}

/* NEXT3 mobile fix: solo logo + data + icona, tutto centrato e dentro la card */
.clms-md-next3-row{ justify-items:center; overflow:hidden; }
.clms-md-next3-dt{ text-align:center; width:100%; }
.clms-md-next3-col{ overflow:hidden; }

/* Rendiamo le righe match "tappabili" */
.clms-match-row, .clms-match-click { cursor:pointer; }

/* Flash fix: fondo sempre scuro dietro i pannelli */
#clm-scores-app,
#clm-scores-app .clms-content{
  background: #0F407E !important;
}
.clms-results-pane,
.clms-results-host{
  background: #0F407E !important;
}

/* Mobile tuning: testi meno grossi e loghi leggermente più piccoli */
@media (max-width: 520px){
  #clms-matchdetails-page{ padding: 6px; }
  .clms-md-logo{ width: 48px; height: 48px; }
  .clms-md-big{ font-size: calc(44px * var(--clms-md-scale)); }
  .clms-md-date{ font-size: calc(16px * var(--clms-md-scale)); }
  .clms-md-title{ font-size: calc(30px * var(--clms-md-scale)); }
  .clms-md-form-grid{ gap: 10px; }
  .clms-md-form-row{ grid-template-columns: 34px 1fr 34px; padding: 10px; }
  .clms-md-form-logo{ width: 28px; height: 28px; }
  .clms-md-form-score{ font-size: calc(18px * var(--clms-md-scale)); }
  .clms-md-next3-row{ grid-template-columns: 34px 1fr auto 22px; padding: 10px 4px; }
  .clms-md-next3-logo{ width: 34px; height: 34px; }
  .clms-md-next3-col{ padding: 12px; }
  .clms-md-stand-head, .clms-md-stand-row{ grid-template-columns: 40px 1fr 40px 40px; }
  .clms-md-stand-name{ font-size: calc(16px * var(--clms-md-scale)); }
}

/* iOS repaint mitigation (riduce micro flash) */
.clms-results-pane, .clms-card{
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  backface-visibility: hidden;
}


/* --- FIX3b: Match Details sizing + score win/loss background + iOS flash reduction --- */
#clms-matchdetails-page .clms-md-big{
  font-size: 44px; /* was too big */
  font-weight: 800;
  letter-spacing: .2px;
}
#clms-matchdetails-page .clms-md-date{
  font-size: 15px;
  font-weight: 600;
}
#clms-matchdetails-page .clms-md-logo{
  width: 52px;
  height: 52px;
}
#clms-matchdetails-page .clms-md-name{
  font-size: 14px;
  font-weight: 700;
}
#clms-matchdetails-page .clms-md-follow-badge{
  min-width:60px;
  height:21px;
  padding:0 10px;
  margin-top:-2px;
}

#clms-matchdetails-page .clms-md-form-score{
  display:inline-block;
  padding: 8px 14px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
}
#clms-matchdetails-page .clms-md-form-score.win{
  background: rgba(20,170,110,.95);
  border-color: rgba(20,170,110,1);
  color: #fff;
}
#clms-matchdetails-page .clms-md-form-score.loss{
  background: rgba(220,60,60,.95);
  border-color: rgba(220,60,60,1);
  color: #fff;
}
#clms-matchdetails-page .clms-md-form-score.draw{
  background: rgba(150,150,150,.65);
  border-color: rgba(150,150,150,1);
  color: #fff;
}

/* badge in "Forma" è usato (verde/rosso) */

/* Mobile tuning */
@media (max-width: 520px){
  #clms-matchdetails-page .clms-md-big{ font-size: 34px; font-weight: 800; }
  #clms-matchdetails-page .clms-md-date{ font-size: 13px; }
  #clms-matchdetails-page .clms-md-logo{ width: 44px; height: 44px; }
  #clms-matchdetails-page .clms-md-name{ font-size: 13px; font-weight: 700; }
  #clms-matchdetails-page .clms-md-follow-badge{ min-width:54px; height:20px; padding:0 9px; font-size:11px; }
  #clms-matchdetails-page .clms-md-title{ font-size: 18px; }
  #clms-matchdetails-page .clms-md-form-score{ font-size: 15px; padding: 7px 12px; }
}

/* riduce micro-flash durante cambio giorno (iOS repaint) */
.clms-content, .clms-results-host, .clms-results-pane{
  background: #06112a !important;
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
}


/* === Match Details: fix layout mobile/desktop (no swipe laterale, più spazio) === */
#clms-matchdetails-page, 
#clms-matchdetails-page *{
  box-sizing: border-box;
}
html, body{
  overflow-x: hidden;
}
#clms-matchdetails-page{
  overflow-x: hidden;
  touch-action: pan-y;
}
#clms-matchdetails-page .clms-md-body{
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  padding-left: 0;
  padding-right: 0;
}
#clms-matchdetails-page .clms-card{
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-left: 14px;
  padding-right: 14px;
}

/* Confronto classifica: colonne P/G allineate perfettamente */
#clms-matchdetails-page .clms-md-stand-head,
#clms-matchdetails-page .clms-md-stand-row{
  display: grid;
  grid-template-columns: 44px 1fr 56px 56px;
  align-items: center;
}
#clms-matchdetails-page .clms-md-stand-head > div:nth-child(3),
#clms-matchdetails-page .clms-md-stand-head > div:nth-child(4),
#clms-matchdetails-page .clms-md-stand-row  > div:nth-child(3),
#clms-matchdetails-page .clms-md-stand-row  > div:nth-child(4){
  text-align: right;
  justify-self: end;
}

/* Forma squadra:
   - Desktop: logo HOME / punteggio + badge (verde/rosso) / logo AWAY
   - Mobile:  solo logo AVVERSARIA + punteggio + badge
*/
#clms-matchdetails-page .clms-md-form-row{
  display:flex;
  align-items:center;
  justify-content: center;
  gap: 10px;
}

#clms-matchdetails-page .clms-md-form-home,
#clms-matchdetails-page .clms-md-form-away,
#clms-matchdetails-page .clms-md-form-opp{
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 34px;
  border-radius: 10px;
}

#clms-matchdetails-page .clms-md-form-opp{ display:none; }

#clms-matchdetails-page .clms-md-form-mid{
  display:flex;
  align-items:center;
  gap: 8px;
  justify-content: center;
  min-width: 0;
}

/* "Logica risultati": testo più piccolo e meno pesante */
#clms-matchdetails-page .clms-md-form-score{
  display:inline-flex;
  white-space: nowrap;
  line-height: 1;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
}

#clms-matchdetails-page .clms-md-form-badge{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display:inline-block;
  border:1px solid rgba(255,255,255,.18);
}

/* Verde/Rosso */
#clms-matchdetails-page .clms-md-form-badge.win{ background: rgba(46, 204, 113, .85); }
#clms-matchdetails-page .clms-md-form-badge.loss{ background: rgba(231, 76, 60, .88); }
#clms-matchdetails-page .clms-md-form-badge.draw{ background: rgba(200, 200, 200, .55); }

@media (max-width: 520px){
  /* su mobile: solo logo avversaria */
  #clms-matchdetails-page .clms-md-form-home,
  #clms-matchdetails-page .clms-md-form-away{ display:none; }
  #clms-matchdetails-page .clms-md-form-opp{ display:block; }
}

/* Prossimi 3 turni: card più larghe e loghi più grandi */
#clms-matchdetails-page .clms-md-next3-grid{
  gap: 10px;
}
#clms-matchdetails-page .clms-md-next3-col{
  padding: 12px 10px;
}
#clms-matchdetails-page .clms-md-next3-row{
  grid-template-columns: 38px 1fr auto 22px;
  gap: 10px;
}
#clms-matchdetails-page .clms-md-next3-logo{
  width: 38px;
  height: 38px;
  border-radius: 12px;
}
#clms-matchdetails-page .clms-md-next3-dt{
  white-space: nowrap;
  font-weight: 800;
}


@media (max-width: 520px){
  /* Match Details - Forma squadra: badge più stretto (non tocca i loghi) */
  #clms-matchdetails-page .clms-md-form-score{
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 12px;
  }

  /* Prossimi 3 turni: contenuto centrato (mobile) */
  #clms-matchdetails-page .clms-md-next3-row{
    display:flex;
    align-items:center;
    justify-content:center;
    gap: 12px;
    padding: 12px 10px;
  }
  #clms-matchdetails-page .clms-md-next3-row > *{ flex: 0 0 auto; }
  #clms-matchdetails-page .clms-md-next3-name,
  #clms-matchdetails-page .clms-md-next3-dt{ text-align:center; }
  #clms-matchdetails-page .clms-md-next3-ha{ text-align:center; min-width: 22px; }

  /* Riga match (lista): score centrale un filo più stretto */
  .clms-match-teams .clms-score{ min-width: 72px; font-size: 15px; }
}


@media (max-width: 520px){
  .clms-md-stand-name{ font-size: 14px !important; }
  .clms-md-stand-logo{ width:24px; height:24px; }
}



/* ===== PATCH v0.3.1.5 MOBILE MATCH DETAILS TUNING ===== */
@media (max-width: 520px){

  /* Match details: stessa "leggerezza" dei risultati */
  #clm-scores-app{ --clms-md-scale: .78; --clms-md-weight: 700; }

  /* Titoli sezioni più piccoli come Risultati */
  .clms-md-title{
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: .01em;
  }

  /* Confronto classifica: nome squadra più piccolo per evitare troncamenti brutti */
  .clms-md-stand-name{
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0;
  }
  .clms-md-stand-p, .clms-md-stand-g{
    font-size: 16px !important;
    font-weight: 800 !important;
  }

  /* Prossimi 3 turni: SOLO logo + data + icona, centrato e dentro la card */
  .clms-md-next3-grid{ gap: 10px !important; }
  .clms-md-next3-col{
    padding: 12px !important;
    overflow: visible !important;
  }
  .clms-md-next3-row{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap: 10px !important;
    padding: 10px 8px !important;
    overflow: visible !important;
  }
  .clms-md-next3-logo{
    width: 34px !important;
    height: 34px !important;
    object-fit: contain !important;
    border-radius: 12px !important;
    flex: 0 0 auto !important;
  }
  .clms-md-next3-dt{
    flex: 1 1 auto !important;
    text-align:center !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    opacity: .9 !important;
    white-space: nowrap !important;
  }
  .clms-md-next3-ha{
    flex: 0 0 auto !important;
    font-size: 18px !important;
    line-height: 1 !important;
    opacity: .95 !important;
    text-align:center !important;
  }

  /* Badge forma: un filo più stretti per non toccare i loghi */
  .clms-md-form-row{
    gap: 8px !important;
  }
  .clms-md-form-score{
    padding: 8px 10px !important;
    min-width: 0 !important;
  }
	/* Navbar: forza la dimensione testo */
#clm-scores-app .clms-navbar .clms-nav-item{
  font-size: 11px !important;     /* ← QUI */
  line-height: 1.05 !important;
  min-width: 0 !important;        /* ← IMPORTANTISSIMO */
  flex: 1 1 0 !important;         /* ← IMPORTANTISSIMO */
}


/* Se il testo è dentro span/div e ha size propria, forzo inherit */
#clm-scores-app .clms-navbar .clms-nav-item *{
  font-size: inherit !important;
}
	
#clm-scores-app .clms-navbar .clms-nav-item{
  font-weight: 600 !important; /* grassetto pulsanti navbar */
  text-transform: uppercase !important;
  letter-spacing: .02em !important;  /* spazio tra pulsanti navbar */
}

#clm-scores-app .clms-navbar .clms-nav-item .clms-nav-label,
#clm-scores-app .clms-navbar .clms-nav-item span{
  font-weight: inherit !important;
  text-transform: inherit !important;
}	

	.clms-navbar{
  transform: none !important;
}
}
/* ===== END PATCH ===== */

/* Pallino rosso sul bottone PRO quando ci sono autorizzazioni attive */
.clms-profile-btn{ position:relative; display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; border-radius:999px; background:#f7c52a; color:#0a2b5c; font-weight:900; text-decoration:none; border:2px solid rgba(255,255,255,.35); box-shadow:0 8px 18px rgba(0,0,0,.25); }
.clms-pro-dot{ position:absolute; top:6px; right:6px; width:8px; height:8px; border-radius:50%; background:#ff3b30; box-shadow:0 0 0 2px rgba(0,0,0,0.25); }


/* --- Cards separate (date + championships) --- */
.clms-card-dates { padding: 14px 16px 12px; }
.clms-champ-card .clms-champ-heading { margin: 2px 0 10px; }
.clms-empty { margin: 8px 0; text-align: center; opacity: 0.85; }

/* HOME RISULTATI: barra bianca intestazione campionato (selector robusto) */
#clm-scores-app .clms-card:not(.clms-card-dates) .clms-champ-heading{
  background:#fff !important;
  color:#0F407E !important;
  padding:10px 16px !important;

  /* “stira” fino ai bordi della card (la tua card ha padding 16/18) */
  margin:-16px -18px 12px !important;

  border-radius:22px 22px 10px 10px !important;
  font-weight:800 !important;
  text-transform:uppercase !important;
  letter-spacing:.06em !important;
  font-size:14px !important;
}

/* =========================
   CHAMP HEADER BAR (FootMob style)
   ========================= */

/* Variabili: cambiale quando vuoi */
:root{
  --clms-champbar-bg:#FFFFFF; /* colore header card */
  --clms-champbar-color:#0F407E;  /* colore testo header card */
}


/* Applica la barra a tutte le card campionato (esclude la card date) */
#clm-scores-app .clms-card:not(.clms-card-dates) .clms-champ-heading{
  background: var(--clms-champbar-bg) !important;
  color: var(--clms-champbar-color) !important;

  padding: 10px 16px !important;
  margin: -16px -18px 12px !important;  /* stira la barra fino ai bordi */

  /* SOLO angoli superiori arrotondati */
  border-radius: 22px 22px 0 0 !important;

  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
  font-size: 14px !important;
}

#clm-scores-app .clms-results-host.is-animating{ overflow:hidden; }
#clm-scores-app .clms-results-host,
#clm-scores-app .clms-results-pane{ background:#0F407E; }

/* === iOS anti-flash: contenitore swipe "sigillato" === */
#clm-scores-app,
#clm-scores-app .clms-content{
  background: #0F407E !important;
}

/* il "host" non deve mai mostrare ciò che c'è dietro */
#clm-scores-app .clms-results-host{
  position: relative;
  overflow: hidden;
  background: #0F407E !important;
  contain: paint;                /* isola repaint */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* i pannelli devono stare “sopra” e muoversi solo di transform */
#clm-scores-app .clms-results-pane{
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  background: #0F407E !important;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* quando finisce lo swipe, rimettiamo il pane corrente in flow (opzionale ma utile) */
#clm-scores-app .clms-results-pane.is-current{
  position: relative;
}

/* 1) La BARRA dietro ai badge (quella scura) */
.clms-card.clms-card-dates{
  background: #ffffff;          /* <-- QUI metti il colore della barra */
  border-radius: 18px;          /* arrotondati */
  margin: 0 4x;               /* staccata dai lati (metti 0 se la vuoi full width) */
  padding: 12px 12px;           /* spazio interno */
}

/* 2) Il contenitore interno dei badge NON deve avere sfondo */
.clms-card.clms-card-dates .clms-matchday-nav{
  background: transparent !important;
  margin: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

/* stacco tra barra date e prima card risultati */
.clms-card.clms-card-dates{
  margin-bottom: 14px; /* aumenta/diminuisci a gusto */
}

/* =========================
   SWIPE 3D (NO VELO BLU)
   ========================= */

.clms-results-host{
  position: relative;
  overflow: hidden;
  perspective: 900px;
  transform-style: preserve-3d;

  /* IMPORTANT: evita che "traspaia" blu durante lo swipe */
  background: transparent !important;
}

.clms-results-pane{
  position: absolute;
  inset: 0;
  width: 100%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
  background: transparent !important; /* evita overlay */
  opacity: 1 !important;              /* niente velo */
}

.clms-results-pane.is-current{
  position: relative;
}

/* Entrata/Uscita: SOLO trasformazioni, niente opacità */
.clms-r-enter-from-right{ transform: translateX(70px) rotateY(-18deg) translateZ(0); }
.clms-r-enter-from-left { transform: translateX(-70px) rotateY(18deg)  translateZ(0); }

.clms-r-leave-to-left  { transform: translateX(-90px) rotateY(18deg)  translateZ(0); }
.clms-r-leave-to-right { transform: translateX(90px)  rotateY(-18deg) translateZ(0); }

/* Transizione */
.clms-results-host.is-animating .clms-results-pane{
  transition: transform 240ms ease-out !important;
}

@media (prefers-reduced-motion: reduce){
  .clms-results-host.is-animating .clms-results-pane{ transition:none !important; }
}


/* debug removed */

/* ==========================================================
   CLM SCORE - DESKTOP = COME MOBILE (NO RADIALE, CARD MOBILE)
   SOLO HOME RISULTATI - pagina ID 6068
   ========================================================== */
@media (min-width: 1024px){

  /* 1) SFONDO PIATTO (NO RADIALE) */
  body.page-id-6068,
  body.page-id-6068 #page,
  body.page-id-6068 .site,
  body.page-id-6068 .content-area,
  body.page-id-6068 .site-content,
  body.page-id-6068 .entry-content{
    background: #0e4ca3 !important;   /* blu chiaro “piatto” come mobile */
  }

  /* Se qualche elemento del plugin mette un radial, lo spengo */
  body.page-id-6068 #clm-scores-app,
  body.page-id-6068 #clm-scores-app *{
    background-image: none !important;
  }

  /* 2) WRAPPER APP: stessa “misura mobile”, centrata (non full-width) */
  body.page-id-6068 #clm-scores-app{
    max-width: 560px !important;   /* simula telefono su desktop */
    width: 100% !important;
    margin: 0 auto !important;
  }

  /* Contenuto con padding come mobile */
  body.page-id-6068 #clm-scores-app .clms-content{
    padding-left: 16px !important;
    padding-right: 16px !important;
    padding-bottom: 110px !important; /* spazio navbar */
  }

  /* 3) CARD “CAMPIONATO” COME MOBILE:
        - esterno scuro arrotondato + ombra
        - intestazione bianca arrotondata sopra
        - corpo scuro con angoli arrotondati sotto
  */
  body.page-id-6068 #clm-scores-app .clms-card,
  body.page-id-6068 #clm-scores-app .clms-champ-card,
  body.page-id-6068 #clm-scores-app .clms-match-card{
    border-radius: 34px !important;
    overflow: hidden !important;
    background: #020824 !important;
    box-shadow: 0 18px 42px rgba(0,0,0,.35) !important;
    margin-bottom: 18px !important;
  }

  /* Intestazione BIANCA (titolo campionato) */
  body.page-id-6068 #clm-scores-app .clms-champ-heading,
  body.page-id-6068 #clm-scores-app .clms-card-title,
  body.page-id-6068 #clm-scores-app .clms-section-title{
    background: #ffffff !important;
    color: #0b3a7a !important;
    border-radius: 34px 34px 0 0 !important;
    padding: 16px 18px !important;
    margin: 0 !important;
    font-weight: 800 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
  }

  /* Corpo card scuro e arrotondato sotto */
  body.page-id-6068 #clm-scores-app .clms-card-body,
  body.page-id-6068 #clm-scores-app .clms-match-list,
  body.page-id-6068 #clm-scores-app .clms-card .clms-inner,
  body.page-id-6068 #clm-scores-app .clms-champ-card .clms-inner{
    background: #020824 !important;
    border-radius: 0 0 34px 34px !important;
    padding: 14px 18px 16px !important;
  }

  /* 4) NAVBAR: come mobile, “pill” in basso */
  body.page-id-6068 #clm-scores-app .clms-navbar{
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    bottom: 18px !important;
    max-width: 560px !important;
    width: calc(100% - 32px) !important;
    border-radius: 28px !important;
    background: rgba(2,8,36,.88) !important;
    box-shadow: 0 18px 44px rgba(0,0,0,.45) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  /* Bottoni navbar “pillole” e testo centrato */
  body.page-id-6068 #clm-scores-app .clms-nav-item{
    height: 46px !important;
    border-radius: 22px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 16px !important;
  }
}

/* ===== CLM SCORE (page-id-6068) — DESKTOP: rimuovi sfondo radiale sotto (solo Risultati) ===== */
@media (min-width: 783px) {

  /* Sfondo pagina piatto (come mobile) */
  body.page-id-6068,
  body.page-id-6068 #page,
  body.page-id-6068 .site,
  body.page-id-6068 .content-area,
  body.page-id-6068 .site-content,
  body.page-id-6068 .entry-content,
  body.page-id-6068 #content,
  body.page-id-6068 #primary,
  body.page-id-6068 .site-main {
    background-color: #0e4ca3 !important;   /* blu chiaro “piatto” */
    background-image: none !important;     /* <-- toglie il radiale */
  }

  /* Anche l’app e i suoi wrapper: niente gradient/radiali */
  body.page-id-6068 #clm-scores-app,
  body.page-id-6068 #clm-scores-app .clms-content,
  body.page-id-6068 #clm-scores-app .clms-cards,
  body.page-id-6068 #clm-scores-app .clms-match-list {
    background-image: none !important;
    background-color: transparent !important;
  }

  /* Se il radiale è creato da pseudo-elementi */
  body.page-id-6068 #clm-scores-app::before,
  body.page-id-6068 #clm-scores-app::after,
  body.page-id-6068 #clm-scores-app .clms-content::before,
  body.page-id-6068 #clm-scores-app .clms-content::after {
    content: none !important;
    display: none !important;
  }
}

/* ============================================================
   CLM SCORE (page-id-6068) — DESKTOP: full width + NO radial bg
   NON tocca mobile
   ============================================================ */
@media (min-width: 1024px){

  /* sfondo pagina piatto (blu chiaro) */
  body.page-id-6068,
  body.page-id-6068 #page,
  body.page-id-6068 .site,
  body.page-id-6068 #content,
  body.page-id-6068 .site-content,
  body.page-id-6068 .content-area,
  body.page-id-6068 .entry-content{
    background: #0e4ca3 !important;
    background-image: none !important;
  }

  /* l'app NON deve avere “sfondo radiale” proprio (se presente) */
  body.page-id-6068 #clm-scores-app,
  body.page-id-6068 #clm-scores-app .clms-content,
  body.page-id-6068 #clm-scores-app .clms-cards{
    background: transparent !important;
    background-image: none !important;
  }

  /* kill di eventuali overlay che creano il “radiale sotto” */
  body.page-id-6068 #clm-scores-app::before,
  body.page-id-6068 #clm-scores-app::after,
  body.page-id-6068 #clm-scores-app .clms-content::before,
  body.page-id-6068 #clm-scores-app .clms-content::after{
    content: none !important;
    display: none !important;
  }

  /* DESKTOP a tutto schermo (niente app stretta centrata) */
  body.page-id-6068 #clm-scores-app{
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  /* contenuto largo, con un po’ di respiro ai lati */
  body.page-id-6068 #clm-scores-app .clms-content{
    max-width: none !important;
    width: 100% !important;
    padding-left: 28px !important;
    padding-right: 28px !important;
  }

  /* cards come mobile (arrotondate) e larghe */
  body.page-id-6068 #clm-scores-app .clms-card{
    width: 100% !important;
    border-radius: 28px !important;
    overflow: hidden !important;
  }

  /* se avevi forzato border-radius:0 da vecchie regole, qui lo annulliamo */
  body.page-id-6068 #clm-scores-app .clms-card *{
    border-radius: inherit;
  }
}
/* ============================================================
   CLM SCORE (page-id-6068) — DESKTOP: navbar bottom full width
   ============================================================ */
@media (min-width: 1024px){

  /* Navbar a tutta larghezza */
  body.page-id-6068 #clm-scores-app .clms-navbar{
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: 0 !important;
    right: 0 !important;
  }

  /* Se esiste un contenitore interno che la stringe */
  body.page-id-6068 #clm-scores-app .clms-navbar .clms-nav,
  body.page-id-6068 #clm-scores-app .clms-navbar .clms-nav-inner,
  body.page-id-6068 #clm-scores-app .clms-navbar .clms-nav-items{
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  /* Ogni item si distribuisce su tutta la larghezza (stile desktop) */
  body.page-id-6068 #clm-scores-app .clms-navbar .clms-nav-item{
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }
}
/* ===== CLM SCORE (page-id-6068) — DESKTOP: navbar FULL WIDTH ===== */
@media (min-width: 783px){

  body.page-id-6068 #clm-scores-app .clms-navbar{
    left: 0 !important;
    right: 0 !important;
    transform: none !important;

    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;

    display: flex !important;
    justify-content: center !important; /* bottoni centrati dentro */
  }

}

/* ===== CLM SCORE — DESKTOP: titolo campionato centrato nella barra intestazione card ===== */
@media (min-width: 783px){

  /* centra il testo dentro l’intestazione del campionato */
  #clm-scores-app .clms-card .clms-card-header,
  #clm-scores-app .clms-champ-header,
  #clm-scores-app .clms-champ-title,
  #clm-scores-app .clms-champ-heading{
    text-align: center !important;
  }

  /* se l’header è un flex, lo centriamo */
  #clm-scores-app .clms-card .clms-card-header,
  #clm-scores-app .clms-champ-header{
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  /* evita che padding/margini “spostino” il titolo */
  #clm-scores-app .clms-card .clms-card-header > *,
  #clm-scores-app .clms-champ-header > *{
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* FIX Parziali quarti: mantieni su una riga */
.clms-md-date{white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.clms-md-date.clms-md-quarters{font-size:12px; opacity:.92;}
@media (max-width: 420px){
  .clms-md-date.clms-md-quarters{font-size:11px;}
}


/* ===== LIVE header pill (override) ===== */
.clms-live-indicator{
  position:absolute;
  top:50%;
  right:74px; /* tra logo e PRO */
  transform:translateY(-50%);
  z-index:30;
  text-decoration:none;
}

.clms-live-pill{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  width:34px;
  height:30px;
  border:2px solid rgba(255,255,255,0.95);
  border-radius:10px;
  background:transparent;
  box-shadow:0 6px 14px rgba(0,0,0,0.18);
}

.clms-live-pill-text{
  font-size:9px;
  font-weight:800;
  letter-spacing:0.6px;
  line-height:1;
  color:#fff;
}

.clms-live-dot{
  width:9px;
  height:9px;
  border-radius:999px;
  background:#ff2b2b;
  box-shadow:0 0 0 2px rgba(255,255,255,0.95);
  animation:clmsLivePulse 0.9s ease-in-out infinite;
}

@keyframes clmsLivePulse{
  0%{ transform:scale(1); opacity:1; }
  50%{ transform:scale(0.35); opacity:0.15; }
  100%{ transform:scale(1); opacity:1; }
}



/* =========================
   MATCH DETAILS — STATISTICHE & PROSSIMO TURNO
   ========================= */
#clm-scores-app .clms-ico{
  width: 22px;
  height: 22px;
  display: inline-block;
}
#clm-scores-app .clms-md-stats-wrap{ padding-bottom: 14px; }
#clm-scores-app .clms-md-stats-grid2{
  display: grid;
  grid-template-columns: 1fr 1fr; /* SEMPRE affiancate */
  gap: 12px;
}

/* Switch layout statistiche Match Details
   Desktop: due card separate
   Mobile: una card unica */
#clm-scores-app .clms-md-stats-grid2--desktop{ display:grid; }
#clm-scores-app .clms-md-stats-grid2--mobile{ display:none; }

@media (max-width: 760px){
  #clm-scores-app .clms-md-stats-grid2{ grid-template-columns: 1fr; }
  #clm-scores-app .clms-md-stats-grid2--desktop{ display:none; }
  #clm-scores-app .clms-md-stats-grid2--mobile{ display:grid; }
}
#clm-scores-app .clms-md-stats-card{
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  padding: 12px;
}
#clm-scores-app .clms-md-stats-team{
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  margin-bottom: 10px;
  opacity: .95;
}
#clm-scores-app .clms-md-stats-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
#clm-scores-app .clms-md-stat-box{
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 10px 10px 10px 10px;
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  min-width: 0;
}

/*
 * Match Details – Desktop stat boxes
 * The JS template uses .clms-md-stat/.clms-md-stat-icon, while older CSS targeted
 * .clms-md-stat-box/.clms-md-stat-ico. These aliases ensure icon + value stay
 * on the same line (as requested) without affecting the mobile unified card.
 */
@media (min-width: 901px){
  #clm-scores-app .clms-md-stat{
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 10px;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "lbl lbl"
      "ico val";
    column-gap: 10px;
    row-gap: 2px;
    align-items: center;
    min-width: 0;
  }
  #clm-scores-app .clms-md-stat-lbl{ grid-area: lbl; }
  #clm-scores-app .clms-md-stat-icon{ grid-area: ico; font-size: 18px; opacity: .95; }
  #clm-scores-app .clms-md-stat-val{ grid-area: val; }
}
#clm-scores-app .clms-md-stat-ico{
  grid-row: 1 / span 2;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity: .95;
}
#clm-scores-app .clms-md-stat-val{
  font-size: 22px;
  font-weight: 900;
  line-height: 1.05;
}
#clm-scores-app .clms-md-stat-lbl{
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .9px;
  text-transform: uppercase;
  opacity: .75;
  white-space: normal;
  line-height: 1.1;
}

/* Label responsive: desktop "full", mobile "short" */
#clm-scores-app .clms-md-stat-lbl-short{ display:none; }

/* Prossimo turno: su mobile mostriamo l'icona ha (🏠/✈️) */
#clm-scores-app .clms-md-next-ha-ico{ display:none; }

@media (max-width: 620px){
  #clm-scores-app .clms-md-stat-lbl-full{ display:none; }
  #clm-scores-app .clms-md-stat-lbl-short{ display:block; }

  /* stats più compatti su mobile (evita overflow testo) */
  #clm-scores-app .clms-md-stat-grid{ gap: 10px; }
  #clm-scores-app .clms-md-stat-box{ grid-template-columns: 42px 1fr; padding: 12px 12px; }
  #clm-scores-app .clms-md-stat-ico{
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    font-size: 18px;
  }
  #clm-scores-app .clms-md-stat-val{ font-size: 24px; letter-spacing: -0.5px; }
  #clm-scores-app .clms-md-stat-lbl{ font-size: 10px; letter-spacing: .6px; }

  /* prossimo turno: su mobile icona invece del testo CASA/TRASFERTA */
  #clm-scores-app .clms-md-next-ha{ display:none; }
  #clm-scores-app .clms-md-next-ha-ico{ display:inline-block; font-size: 16px; opacity: .9; }
}

@media (max-width: 620px){
  #clm-scores-app .clms-md-stat-val{ font-size: 18px; }
  #clm-scores-app .clms-md-stat-lbl{ font-size: 10px; letter-spacing: .6px; }
  #clm-scores-app .clms-md-stat-box{ padding: 8px; grid-template-columns: 24px 1fr; }
  #clm-scores-app .clms-md-stat-lbl-full{ display:none; }
  #clm-scores-app .clms-md-stat-lbl-short{ display:block; }

  #clm-scores-app .clms-md-next-ha{ display:none; }
  #clm-scores-app .clms-md-next-ha-ico{ display:inline-block; font-size: 16px; }
}

/* Prossimo turno */
#clm-scores-app .clms-md-next-card{
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  padding: 12px;
  min-height: 86px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
#clm-scores-app .clms-md-next-top{
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .6px;
  opacity:.92;
  margin-bottom: 8px;
}
#clm-scores-app .clms-md-next-row{
  display:grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items:center;
  min-width:0;
}
#clm-scores-app .clms-md-next-logo{
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.35));
}
#clm-scores-app .clms-md-next-mid{ min-width:0; }
#clm-scores-app .clms-md-next-opp{
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#clm-scores-app .clms-md-next-dt{
  font-size: 12px;
  opacity: .75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#clm-scores-app .clms-md-next-ha{
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.09);
  opacity:.9;
}
#clm-scores-app .clms-md-next-empty{
  opacity:.8;
  font-weight: 800;
}


/* =========================
   Match Details — Mobile tidy (stats + next turn)
   ========================= */
@media (max-width: 520px){
  #clm-scores-app .clms-md-stat-lbl{
    font-size: 11px !important;
    letter-spacing: .6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #clm-scores-app .clms-md-stat-val{
    font-size: 22px !important;
  }

  /* Prossimo turno: solo logo avversario + data + icona casa/trasferta */
  #clm-scores-app .clms-md-next-opp{ display:none !important; }
  #clm-scores-app .clms-md-next-ha-txt{ display:none !important; }
  #clm-scores-app .clms-md-next-mid{ min-width:0; }
  #clm-scores-app .clms-md-next-dt{
    font-size: 12px !important;
    opacity: .9;
  }
}

/* ==========================================================
   Match Details - Statistiche (layout unico)
   Richiesta: |dato home|icona|legenda|icona|dato away|
   ========================================================== */
.clms-md-stats-card--unified{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 26px;
  padding: 16px;
}

.clms-md-stats-unified{
  display: grid;
  gap: 8px;
}

.clms-md-stats-row{
  display: grid;
  grid-template-columns: minmax(0,1fr) 30px auto 30px minmax(0,1fr);
  align-items: center;
  column-gap: 10px;
}

.clms-md-stats-homeval{
  text-align: right;
  font-weight: 800;
  font-size: 34px;
  line-height: 1;
  color: #fff;
}

.clms-md-stats-awayval{
  text-align: left;
  font-weight: 800;
  font-size: 34px;
  line-height: 1;
  color: #fff;
}

.clms-md-stats-label{
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.70);
  font-size: 16px;
  white-space: nowrap;
}

.clms-md-stats-ico{
  text-align: center;
  font-size: 22px;
  line-height: 1;
}

/* Per schermi piccoli: evita sovrapposizioni */
@media (max-width: 520px){
  .clms-md-stats-row{
    grid-template-columns: 82px 20px 1fr 20px 82px;
    column-gap: 8px;
  }
  .clms-md-stats-homeval,
  .clms-md-stats-awayval{ font-size: 28px; }
  .clms-md-stats-label{ font-size: 14px; }
  .clms-md-stats-ico{ font-size: 20px; }
}


/* === Restored match details actions / poll / h2h === */
#clms-matchdetails-page .clms-md-top{ padding:0 2px; }
#clms-matchdetails-page .clms-md-back{ width:64px; height:64px; padding:0; display:inline-flex; align-items:center; justify-content:center; border-radius:18px; border:1px solid rgba(255,255,255,.06); background:#06112a; color:#fff; box-shadow:0 10px 28px rgba(0,0,0,.18); }
#clms-matchdetails-page .clms-md-back-arrow{ font-size:34px; line-height:1; transform:translateY(-1px); }
#clms-matchdetails-page .clms-md-actions-box{ position:relative; display:inline-flex; align-items:center; gap:14px; padding:12px 18px; min-height:64px; border-radius:18px; border:1px solid rgba(255,255,255,.06); background:#06112a; box-shadow:0 10px 28px rgba(0,0,0,.18); }
#clms-matchdetails-page .clms-md-iconbtn{ appearance:none; border:0; background:transparent; color:#ffc529; width:28px; height:28px; display:inline-flex; align-items:center; justify-content:center; padding:0; cursor:pointer; }
#clms-matchdetails-page .clms-md-iconbtn svg{ width:28px; height:28px; display:block; }
#clms-matchdetails-page .clms-md-fav{ position:relative; }
#clms-matchdetails-page .clms-md-star path{ fill:none; stroke:currentColor; stroke-width:1.9; stroke-linejoin:round; }
#clms-matchdetails-page .clms-md-fav.is-active .clms-md-star path{ fill:currentColor; stroke:currentColor; }
#clms-matchdetails-page .clms-md-calendar-menu{ position:absolute; top:calc(100% + 10px); right:0; min-width:220px; background:#fff; border:1px solid rgba(6,17,42,.08); border-radius:16px; box-shadow:0 18px 36px rgba(0,0,0,.22); padding:10px; z-index:40; }
#clms-matchdetails-page .clms-md-calendar-menu[hidden]{ display:none !important; }
#clms-matchdetails-page .clms-md-calendar-title{ font-size:13px; font-weight:900; letter-spacing:.08em; color:#ffc529; text-align:center; padding:4px 6px 10px; }
#clms-matchdetails-page .clms-md-calendar-option{ appearance:none; width:100%; border:0; background:transparent; color:#143f7a; text-align:left; padding:12px 12px; border-radius:12px; font-size:14px; font-weight:800; }
#clms-matchdetails-page .clms-md-calendar-option:hover{ background:rgba(20,63,122,.08); }
#clms-matchdetails-page .clms-md-poll-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
#clms-matchdetails-page .clms-md-poll-title{ margin:0; }
#clms-matchdetails-page .clms-md-poll-voters{ font-size:14px; font-weight:700; color:rgba(255,255,255,.78); margin-left:auto; white-space:nowrap; }
#clms-matchdetails-page .clms-md-poll-row{ display:grid; grid-template-columns: 1fr auto 1fr; align-items:center; gap:8px; }
#clms-matchdetails-page .clms-md-poll-vs{ font-size:18px; font-weight:900; color:#fff; opacity:.9; }
#clms-matchdetails-page .clms-md-poll-team{ appearance:none; border:0; background:transparent; color:#fff; display:flex; align-items:center; gap:6px; padding:0; min-height:36px; }
#clms-matchdetails-page .clms-md-poll-team--home{ justify-content:flex-end; padding-right:10px; }
#clms-matchdetails-page .clms-md-poll-team--away{ justify-content:flex-start; padding-left:10px; }
#clms-matchdetails-page .clms-md-poll-logo{ width:30px; height:30px; object-fit:contain; flex:0 0 30px; transition:transform .18s ease; }
#clms-matchdetails-page .clms-md-poll-pct{ min-width:40px; text-align:center; font-size:16px; font-weight:900; color:#ffc529; opacity:0; transform:translateX(0); transition:opacity .18s ease, transform .18s ease; }
#clms-matchdetails-page .clms-md-poll-team.has-votes .clms-md-poll-pct{ opacity:1; }
#clms-matchdetails-page .clms-md-poll-team.is-selected .clms-md-poll-logo{ transform:translateX(-6px); }
#clms-matchdetails-page .clms-md-poll-team--away.is-selected .clms-md-poll-logo{ transform:translateX(6px); }
#clms-matchdetails-page .clms-md-poll-team.has-votes .clms-md-poll-pct{ transform:translateX(-2px); }
#clms-matchdetails-page .clms-md-poll-team--away.has-votes .clms-md-poll-pct{ transform:translateX(2px); }
.clms-md-toast{ position:fixed; left:50%; bottom:96px; transform:translateX(-50%) translateY(8px); background:#071634; color:#fff; border-radius:999px; padding:10px 14px; z-index:10000; opacity:0; transition:opacity .16s ease, transform .16s ease; box-shadow:0 12px 30px rgba(0,0,0,.28); }
.clms-md-toast.is-open{ opacity:1; transform:translateX(-50%) translateY(0); }
#clms-matchdetails-page .clms-md-h2h-list{ display:flex; flex-direction:column; gap:12px; }
#clms-matchdetails-page .clms-md-h2h-row{ background:rgba(255,255,255,.04); border-radius:18px; padding:14px 16px 12px; }
#clms-matchdetails-page .clms-md-h2h-match{ display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:12px; }
#clms-matchdetails-page .clms-md-h2h-team{ display:inline-flex; align-items:center; gap:8px; min-width:0; font-size:14px; font-weight:700; color:#fff; }
#clms-matchdetails-page .clms-md-h2h-team--home{ justify-content:flex-end; text-align:right; }
#clms-matchdetails-page .clms-md-h2h-team--away{ justify-content:flex-start; text-align:left; }
#clms-matchdetails-page .clms-md-h2h-name{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#clms-matchdetails-page .clms-md-h2h-logo{ width:22px; height:22px; object-fit:contain; flex:0 0 22px; }
#clms-matchdetails-page .clms-md-h2h-score{ text-align:center; font-size:16px; font-weight:800; color:#ffc529; letter-spacing:.02em; white-space:nowrap; }
#clms-matchdetails-page .clms-md-h2h-date{ margin-top:8px; text-align:right; font-size:12px; opacity:.72; }
@media (max-width:767px){
  #clms-matchdetails-page .clms-md-top{ margin-bottom:14px; }
  #clms-matchdetails-page .clms-md-back{ width:60px; height:60px; border-radius:16px; }
  #clms-matchdetails-page .clms-md-actions-box{ min-height:60px; gap:12px; padding:10px 16px; border-radius:16px; }
  #clms-matchdetails-page .clms-md-iconbtn, #clms-matchdetails-page .clms-md-iconbtn svg{ width:26px; height:26px; }
  #clms-matchdetails-page .clms-md-poll-head{ gap:10px; flex-direction:row; }
  #clms-matchdetails-page .clms-md-poll-voters{ font-size:13px; }
  #clms-matchdetails-page .clms-md-poll-row{ gap:8px; }
}

/* === Seguiti > Gare: layout definitivo a 2 righe === */
.clms-follow-card--match{
  display:block;position:relative;color:inherit;text-decoration:none;
  padding:14px 58px 14px 14px !important;
}
.clms-follow-card-main--match{
  display:grid !important;
  grid-template-rows:auto auto !important;
  row-gap:12px !important;
  min-width:0;
  text-decoration:none;color:inherit;
}
.clms-follow-match-meta{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:10px !important;
  margin:0 !important;
}
.clms-follow-match-champ{
  color:#f1c548;font-weight:800;font-size:13px;line-height:1.1;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-transform:none;
  text-align:left;
}
.clms-follow-match-when{
  color:#fff;font-weight:700;font-size:12px;line-height:1.1;
  white-space:nowrap;justify-self:end;text-align:right;
}
.clms-follow-match-row2{
  display:grid !important;
  grid-template-columns:auto minmax(74px,auto) auto !important;
  justify-content:center !important;
  align-items:center !important;
  column-gap:18px !important;
  min-height:56px !important;
  width:100%;
}
.clms-follow-card--match .clms-follow-teamlogo{
  width:52px;height:52px;flex:0 0 52px;object-fit:contain;
  background:rgba(255,255,255,.06);border-radius:14px;
}
.clms-follow-card--match .clms-follow-matchline-center{
  min-width:74px;text-align:center;color:#f1c548;font-size:16px;font-weight:900;white-space:nowrap;
}
.clms-follow-card--match .clms-follow-toggle--match{
  position:absolute;right:14px;top:50%;transform:translateY(-50%);z-index:3;color:#f5c431;
}
@media (min-width:768px){
  .clms-follow-card--match{padding:18px 78px 18px 18px !important;}
  .clms-follow-card-main--match{row-gap:14px !important;}
  .clms-follow-match-meta{grid-template-columns:minmax(0,1fr) auto !important;gap:16px !important;}
  .clms-follow-match-champ{font-size:17px;}
  .clms-follow-match-when{font-size:15px;}
  .clms-follow-match-row2{column-gap:32px !important;min-height:68px !important;}
  .clms-follow-card--match .clms-follow-teamlogo{width:68px;height:68px;flex-basis:68px;}
  .clms-follow-card--match .clms-follow-matchline-center{min-width:110px;font-size:21px;}
  .clms-follow-card--match .clms-follow-toggle--match{right:22px;}
}
@media (max-width:600px){
  .clms-follow-card--match{padding:14px 56px 14px 14px !important;}
  .clms-follow-card-main--match{row-gap:10px !important;}
  .clms-follow-match-champ{font-size:12px;}
  .clms-follow-match-when{font-size:11px;}
  .clms-follow-match-row2{column-gap:14px !important;min-height:54px !important;}
  .clms-follow-card--match .clms-follow-teamlogo{width:52px;height:52px;flex-basis:52px;}
  .clms-follow-card--match .clms-follow-matchline-center{min-width:72px;font-size:15px;}
  .clms-follow-card--match .clms-follow-toggle--match{right:14px;}
}
