/* SerieAGoal v1.11 | 1400px editorial shell + prediction-as-a-unit.
   Change only outer spacing and match list geometry. Preserve original cards,
   ad unit width, i18n routes, subscriptions and premium data boundaries. */
@media (min-width:1241px) {
  html[data-sg-theme] body.sg-body .sg-shell,
  html[data-sg-theme] body.sg-body .sg-topbar-inner,
  html[data-sg-theme] body.sg-body .sg-sportbar-inner {
    width:100%!important;max-width:1400px!important;margin-left:auto!important;margin-right:auto!important;
  }
  html[data-sg-theme] body.sg-body .sg-shell {
    grid-template-columns:228px minmax(0,1fr)!important;
    gap:10px!important;
    padding-left:6px!important;padding-right:6px!important;
  }
  /* News, account and long-form pages already use dedicated single-column
     shells. Do not force a sidebar or an empty advertisement column there. */
  html[data-sg-theme] body.sg-body:is(.sg-page-news,.sg-page-pronostici,.sg-page-fantacalcio,.sg-page-account) .sg-shell {
    grid-template-columns:minmax(0,1fr)!important;
  }
  html[data-sg-theme] body.sg-body .sg-content-grid:has(> .sg-right-rail.sg-right-rail-ads) {
    grid-template-columns:minmax(0,1fr) 300px!important;
    gap:10px!important;
  }
  html[data-sg-theme] body.sg-body .sg-content-grid:not(:has(> .sg-right-rail)) {
    grid-template-columns:minmax(0,1fr)!important;
  }
  html[data-sg-theme] body.sg-body .sg-topbar-inner {
    padding-left:10px!important;padding-right:10px!important;
  }
  /* WinScore-like lean competition navigation, with no outer card consuming
     horizontal room. Preserve all competition/country links and disclosure. */
  html[data-sg-theme] body.sg-body .sg-sidebar.sg-sidebar-competition-only {
    background:transparent!important;border:0!important;border-radius:0!important;
    box-shadow:none!important;padding:4px 1px 12px!important;
  }
  html[data-sg-theme] body.sg-body .sg-sidebar-competition-only :is(.sg-sidebar-featured,.sg-sidebar-featured-list,.sg-sidebar-country-groups,.sg-sidebar-competitions) {
    border:0!important;background:transparent!important;box-shadow:none!important;
    max-width:100%!important;
  }
  html[data-sg-theme] body.sg-body .sg-sidebar .sg-sidebar-competition-link {
    grid-template-columns:25px minmax(0,1fr)!important;
    padding:6px 3px!important;column-gap:7px!important;
    font-size:11.3px!important;letter-spacing:-.024em!important;
    min-width:0!important;
  }
  html[data-sg-theme] body.sg-body .sg-sidebar .sg-sidebar-competition-link>span:last-child {
    min-width:0!important;white-space:nowrap!important;overflow:hidden!important;
    text-overflow:ellipsis!important;line-height:1.2!important;
  }
  html[data-sg-theme] body.sg-body .sg-sidebar .sg-sidebar-country>summary {
    padding-inline:3px!important;gap:5px!important;
  }
  html[data-sg-theme] body.sg-body .sg-sidebar .sg-sidebar-country-list {
    padding-left:7px!important;margin-left:7px!important;
  }
  html[data-sg-theme] body.sg-body .sg-sidebar .sg-sidebar-country-list .sg-sidebar-competition-link {
    font-size:11px!important;padding-inline:2px!important;
  }
}

/* Desktop: left block keeps room for real club names and the score; verdict
   sits immediately next to its percentage, with a proper gutter from score. */
@media (min-width:761px) {
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap>.sg-match-row,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap.is-finished>.sg-match-row {
    grid-template-columns:minmax(0,47%) minmax(0,53%)!important;
    padding-left:7px!important;padding-right:6px!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-main-link,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap.is-finished .sg-match-main-link {
    grid-template-columns:68px minmax(0,1fr)!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-main-link>.sg-match-status {
    padding-left:0!important;padding-right:15px!important;
    justify-content:center!important;text-align:center!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-main-link>.sg-match-teams {
    min-width:0!important;max-width:none!important;width:100%!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-main-link>.sg-match-teams>div {
    grid-template-columns:24px minmax(0,1fr) 31px!important;
    column-gap:8px!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-team-name {
    font-size:12.5px!important;letter-spacing:-.012em!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone.has-features,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone.is-empty {
    grid-template-columns:minmax(0,1fr) 80px!important;
    column-gap:5px!important;
    padding:6px 3px 6px 28px!important;
    min-width:0!important;width:100%!important;max-width:none!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone .sg-match-features {
    display:flex!important;align-items:flex-end!important;
    justify-content:center!important;width:100%!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg104-dc-preview:not([hidden]) {
    width:max-content!important;max-width:100%!important;
    align-self:flex-end!important;margin-left:auto!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg106-dc-headline {
    display:flex!important;justify-content:flex-start!important;
    align-items:center!important;gap:12px!important;width:max-content!important;max-width:100%!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg104-dc-value {
    flex:0 1 auto!important;width:auto!important;
    min-width:0!important;max-width:255px!important;
    font-size:15px!important;font-weight:830!important;
    letter-spacing:-.023em!important;white-space:nowrap!important;
    overflow:hidden!important;text-overflow:ellipsis!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg104-dc-title {
    font-size:11px!important;letter-spacing:.05em!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg104-dc-access {
    font-size:11px!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg104-dc-preview .sg106-dc-percent {
    display:inline-flex!important;min-width:66px!important;
    font-size:30px!important;justify-content:flex-start!important;
    flex:0 0 auto!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg108-row-actions {
    gap:8px!important;
  }
}

/* Laptop widths need room for club names, but must never overflow into ads. */
@media (min-width:761px) and (max-width:1240px) {
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap>.sg-match-row,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap.is-finished>.sg-match-row {
    grid-template-columns:minmax(0,46%) minmax(0,54%)!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone.has-features,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone.is-empty {
    grid-template-columns:minmax(0,1fr) 71px!important;padding-left:15px!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg104-dc-value {font-size:12px!important;max-width:195px!important}
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg104-dc-preview .sg106-dc-percent {font-size:25px!important;min-width:54px!important}
}
/* Existing v1.10 mobile logic remains untouched: it prevents the extra strip
   and ensures the percentage never collides with Favourite / Statistics. */


/* v1.12 · The forecast is one right-aligned unit, like the WinScore reference.
 * Desktop only: preserve all approved mobile spacing and the 1400px shell.
 * The first column's right edge aligns heading, selection and access status;
 * the probability sits immediately to its right in a reserved column. */
@media (min-width:761px) {
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone .sg-match-features {
    align-items:stretch!important;
    min-width:0!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg104-dc-preview:not([hidden]) {
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 76px!important;
    grid-template-rows:auto auto auto!important;
    column-gap:8px!important;
    row-gap:2px!important;
    align-items:center!important;
    justify-items:stretch!important;
    align-self:stretch!important;
    justify-self:stretch!important;
    margin:0!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding:1px 0!important;
    text-align:right!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg104-dc-preview .sg104-dc-title {
    grid-column:1!important;
    grid-row:1!important;
    justify-self:end!important;
    text-align:right!important;
    margin:0!important;
    white-space:nowrap!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg104-dc-preview .sg106-dc-headline {
    display:contents!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg104-dc-preview .sg104-dc-value {
    grid-column:1!important;
    grid-row:2!important;
    justify-self:end!important;
    text-align:right!important;
    flex:none!important;
    margin:0!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg104-dc-preview .sg106-dc-percent {
    grid-column:2!important;
    grid-row:2!important;
    align-self:center!important;
    justify-self:start!important;
    display:block!important;
    width:auto!important;
    min-width:0!important;
    margin:0!important;
    text-align:left!important;
    font-size:29px!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg104-dc-preview .sg104-dc-access {
    grid-column:1!important;
    grid-row:3!important;
    justify-self:end!important;
    justify-content:flex-end!important;
    align-items:center!important;
    text-align:right!important;
    min-width:0!important;
    margin:0!important;
    white-space:nowrap!important;
  }
}
@media (min-width:761px) and (max-width:1240px) {
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg104-dc-preview:not([hidden]) {
    grid-template-columns:minmax(0,1fr) 60px!important;
    column-gap:5px!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg104-dc-preview .sg106-dc-percent {
    font-size:25px!important;
  }
}


/* SerieAGoal v1.13: preserve v1.12 geometry, fit complete team names. */
@media (min-width:761px) {
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone.has-features,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone.is-empty {
    padding-left:17px!important;
    grid-template-columns:minmax(0,1fr) 80px!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg104-dc-preview:not([hidden]) {
    grid-template-columns:minmax(0,1fr) 70px!important;
    column-gap:9px!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg104-dc-preview .sg104-dc-value {
    font-size:13.5px!important;
    letter-spacing:-.034em!important;
    font-stretch:condensed;
    text-overflow:clip!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg104-dc-preview .sg106-dc-percent {
    font-size:28px!important;
  }
}
@media (min-width:761px) and (max-width:1240px) {
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone.has-features,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone.is-empty {
    padding-left:12px!important;
    grid-template-columns:minmax(0,1fr) 71px!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg104-dc-preview:not([hidden]) {
    grid-template-columns:minmax(0,1fr) 60px!important;
    column-gap:7px!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg104-dc-preview .sg106-dc-percent {
    font-size:24px!important;
  }
}
/* Premium viewer CTA follows the current light/dark theme; no lock icon. */
html[data-sg-theme] body.sg-body .sg104-dc-preview .sg113-dc-premium-action {
  font-weight:850!important;
  color:var(--sg-accent)!important;
}


/* SerieAGoal v1.44 – Tasti pronostici della lista partite, stile contorno.
 * SOLO estetica: nessun cambiamento a entitlement, JS, link, previsioni o layout.
 * Il riquadro resta trasparente e riprende lo sfondo del tema. */
html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap
.sg104-dc-preview .sg104-dc-access.sg113-dc-premium-action,
html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap
.sg104-dc-preview .sg104-dc-access:has(.sg106-dc-lock) {
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  justify-self:end!important;
  flex:0 0 auto!important;
  width:max-content!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  min-height:29px!important;
  padding:5px 10px!important;
  border:1px solid rgba(145,160,180,.62)!important;
  border-radius:10px!important;
  background:transparent!important;
  color:var(--sg-text,#f2f5f9)!important;
  box-shadow:none!important;
  text-decoration:none!important;
  line-height:1.2!important;
  white-space:nowrap!important;
  transition:border-color .17s ease,color .17s ease,box-shadow .17s ease!important;
}
/* L'intero link rimane quello originale: hover solo sul riquadro testo. */
html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap
.sg104-dc-preview .sg104-dc-access.sg113-dc-premium-action:hover,
html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap
.sg104-dc-preview .sg104-dc-access:has(.sg106-dc-lock):hover,
html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap
.sg104-dc-preview:focus-visible .sg104-dc-access.sg113-dc-premium-action,
html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap
.sg104-dc-preview:focus-visible .sg104-dc-access:has(.sg106-dc-lock) {
  color:#46c5ff!important;
  border-color:#46c5ff!important;
  box-shadow:0 0 0 1px rgba(70,197,255,.20),0 0 12px rgba(70,197,255,.16)!important;
}
/* La piccola icona lucchetto segue il colore dello stato. */
html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap
.sg104-dc-preview .sg104-dc-access:has(.sg106-dc-lock) .sg106-dc-lock {
  color:inherit!important;
}
/* Pulsante di ripiego già presente, mentre l'anteprima AI sta caricando. */
html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg106-locked-cta {
  border:1px solid rgba(145,160,180,.62)!important;
  border-radius:10px!important;
  background:transparent!important;
  color:var(--sg-text,#f2f5f9)!important;
  box-shadow:none!important;
  text-decoration:none!important;
  transition:border-color .17s ease,color .17s ease,box-shadow .17s ease!important;
}
html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg106-locked-cta:hover,
html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg106-locked-cta:focus-visible {
  color:#46c5ff!important;
  border-color:#46c5ff!important;
  box-shadow:0 0 0 1px rgba(70,197,255,.20),0 0 12px rgba(70,197,255,.16)!important;
}
html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg106-locked-cta .sg106-lock-symbol {
  color:inherit!important;
}
/* Smart­phone: stesse parole già pubblicate, riquadri meno ingombranti. */
@media(max-width:760px){
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap
  .sg104-dc-preview .sg104-dc-access.sg113-dc-premium-action,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap
  .sg104-dc-preview .sg104-dc-access:has(.sg106-dc-lock){
    min-height:24px!important;
    padding:4px 5px!important;
    border-radius:8px!important;
  }
}
@media(prefers-reduced-motion:reduce){
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap
  .sg104-dc-preview .sg104-dc-access,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap
  .sg106-locked-cta{transition:none!important}
}


/* SerieAGoal v1.45 - solo smartphone (<=760px)
 * Full bleed per schede gare, pagina singola partita e News.
 * I contenuti interni mantengono il padding per leggibilita';
 * nessun cambiamento all'aspetto desktop, ai pulsanti o ai loghi. */
@media screen and (max-width:760px) {
  /* Home partite, Match Center e News: annulla il gutter che viene
     reintrodotto dall'ultima regola del vecchio mobile-edge. */
  html[data-sg-theme] body.sg-body:is(.sg-page-home,.sg-page-partite,.sg-page-news) .sg-shell {
    width:100%!important;
    max-width:none!important;
    box-sizing:border-box!important;
    padding-left:0!important;
    padding-right:0!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  html[data-sg-theme] body.sg-body:is(.sg-page-home,.sg-page-partite,.sg-page-news)
  :is(.sg-main,.sg-feed,.sg-content-grid,.sg-match-detail-layout,.sg-news-layout) {
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    padding-left:0!important;
    padding-right:0!important;
    margin-left:0!important;
    margin-right:0!important;
  }

  /* Home: il gruppo competizione occupa tutto il viewport. Le righe
     della partita restano separate dalle loro linee, non da card flottanti. */
  html[data-sg-theme] body.sg-body.sg-page-home .sg-main
  :is(.sg-league-card,.sg-home-league-card,.sg-match-row-wrap,.sg-league-group) {
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    border-radius:0!important;
    border-left:0!important;
    border-right:0!important;
    margin-left:0!important;
    margin-right:0!important;
    box-shadow:none!important;
  }
  html[data-sg-theme] body.sg-body.sg-page-home .sg-main > .sg-card {
    width:100%!important;
    max-width:100%!important;
    border-radius:0!important;
    border-left:0!important;
    border-right:0!important;
    margin-left:0!important;
    margin-right:0!important;
    box-shadow:none!important;
  }

  /* Single match: soltanto superfici esterne, non badge LIVE, bottoni,
     tab, loghi, avatar, campo delle formazioni o card interne. */
  html[data-sg-theme] body.sg-body.sg-page-partite .sg-match-detail-layout
  :is(.sg-card,.sg-match-center-card,.sg-section,.sg-result-card,.sg-match-info-card,.sg-lineup-card,.sg-leaderboard-card) {
    box-sizing:border-box!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
    border-left:0!important;
    border-right:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }

  /* News: due gutter da 12px + 10px riducevano molto la larghezza.
     Resta il padding INTERNO dei pannelli per evitare testi a filo bordo. */
  html[data-sg-theme] body.sg-body.sg-page-news .sg49-page {
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding-left:0!important;
    padding-right:0!important;
    box-sizing:border-box!important;
  }
  html[data-sg-theme] body.sg-body.sg-page-news
  :is(.sg49-layout,.sg49-main,.sg50-focus-section,.sg50-focus-grid) {
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  html[data-sg-theme] body.sg-body.sg-page-news .sg49-panel {
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    border-left:0!important;
    border-right:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    /* Mantiene i 15px gia' previsti dalla pagina. */
  }
  html[data-sg-theme] body.sg-body.sg-page-news .sg49-topics {
    box-sizing:border-box!important;
    padding-left:12px!important;
    padding-right:12px!important;
  }
  html[data-sg-theme] body.sg-body.sg-page-news .sg50-focus-heading {
    padding-left:15px!important;
    padding-right:15px!important;
  }
}
