/* ======================================================================
   SerieAGoal SG.108 — Mobile edge-to-edge + leggibilità risultati/lineup
   - Desktop: mantiene la shell/card esistente, aumenta solo i risultati Home
     e la leggibilità delle formazioni.
   - Mobile <= 760px: contenuto a tutta larghezza, senza "card dentro card".
   - Match lineup: volti, nomi, panchina e cambi più leggibili; rating + goal.
   ====================================================================== */

/* ----------------------------------------------------------------------
   HOME / PARTITE — un incremento leggero e uniforme anche su desktop.
   ---------------------------------------------------------------------- */
.sg-page-home .sg-match-row{
  min-height:54px!important;
}
.sg-page-home .sg-match-teams{gap:4px!important}
.sg-page-home .sg-match-teams>div{
  min-height:25px!important;
  grid-template-columns:23px minmax(0,1fr) 25px!important;
  gap:8px!important;
}
.sg-page-home .sg-match-teams img{
  width:21px!important;
  height:21px!important;
}
.sg-page-home .sg-match-teams span{
  font-size:12.5px!important;
  line-height:1.18!important;
  font-weight:670!important;
}
.sg-page-home .sg-match-teams b{
  font-size:13px!important;
  line-height:1.15!important;
}
.sg-page-home .sg-match-status,
.sg-page-home .sg-match-status span{
  font-size:10.5px!important;
}

/* ----------------------------------------------------------------------
   MATCH LINEUP — più leggibile anche su desktop.
   ---------------------------------------------------------------------- */
.sg-page-partite .sg-lineup-player{
  width:94px!important;
}
.sg-page-partite .sg-lineup-face{
  width:48px!important;
  height:48px!important;
}
.sg-page-partite .sg-lineup-player>b{
  max-width:92px!important;
  padding:3px 6px!important;
  font-size:9.8px!important;
  line-height:1.05!important;
}
.sg-page-partite .sg-lineup-player.sg-lineup-lines-5{
  width:72px!important;
}
.sg-page-partite .sg-lineup-player.sg-lineup-lines-5 .sg-lineup-face{
  width:43px!important;
  height:43px!important;
}
.sg-page-partite .sg-lineup-player.sg-lineup-lines-5>b{
  max-width:70px!important;
  font-size:8.8px!important;
}
.sg-page-partite .sg-lineup-player.sg-lineup-lines-6{
  width:62px!important;
}
.sg-page-partite .sg-lineup-player.sg-lineup-lines-6 .sg-lineup-face{
  width:40px!important;
  height:40px!important;
}
.sg-page-partite .sg-lineup-player.sg-lineup-lines-6>b{
  max-width:60px!important;
  font-size:8.2px!important;
}
.sg-page-partite .sg-lineup-player.sg-lineup-cols-5>b{
  max-width:66px!important;
}

/* Rating + gol direttamente sul campo, stile score app. */
.sg-page-partite .sg-lineup-player-meta{
  position:absolute;
  z-index:7;
  left:calc(50% + 9px);
  top:31px;
  display:flex;
  align-items:center;
  gap:2px;
  pointer-events:none;
  white-space:nowrap;
}
.sg-page-partite .sg-lineup-rating{
  min-width:24px;
  height:18px;
  padding:0 4px;
  display:grid;
  place-items:center;
  border-radius:5px;
  border:1px solid rgba(255,255,255,.92);
  background:#737a83;
  color:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.18);
  font-size:8px;
  line-height:1;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}
.sg-page-partite .sg-lineup-rating.is-excellent{background:#0b7c35}
.sg-page-partite .sg-lineup-rating.is-good{background:#39a800}
.sg-page-partite .sg-lineup-rating.is-average{background:#f0a000}
.sg-page-partite .sg-lineup-rating.is-low{background:#ef6c00}
.sg-page-partite .sg-lineup-goal-badge{
  min-width:19px;
  height:19px;
  padding:0 3px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:2px;
  border:1px solid var(--sg-line);
  border-radius:6px;
  background:var(--sg-surface);
  color:var(--sg-text);
  box-shadow:0 1px 2px rgba(0,0,0,.16);
}
.sg-page-partite .sg-lineup-goal-badge .sg-goal-ball-symbol{
  width:12px!important;
  height:12px!important;
  flex-basis:12px!important;
}
.sg-page-partite .sg-lineup-goal-badge>b{
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:inherit!important;
  font-size:7px!important;
  line-height:1!important;
  font-weight:900!important;
}

/* Panchina / allenatori / sostituzioni: non più microtesto. */
.sg-page-partite .sg-lineup-person{
  min-height:58px!important;
  padding:7px 11px!important;
  gap:9px!important;
}
.sg-page-partite .sg-lineup-list-face{
  width:41px!important;
  height:41px!important;
  flex-basis:41px!important;
}
.sg-page-partite .sg-lineup-person b{
  font-size:11px!important;
  line-height:1.15!important;
}
.sg-page-partite .sg-lineup-person small{
  font-size:8.8px!important;
  line-height:1.15!important;
}
.sg-page-partite .sg-change-row{
  min-height:60px!important;
  padding:7px 10px!important;
  gap:9px!important;
}
.sg-page-partite .sg-change-row time{
  width:30px!important;
  flex-basis:30px!important;
  font-size:10px!important;
}
.sg-page-partite .sg-change-faces{
  width:55px!important;
  height:39px!important;
  flex-basis:55px!important;
}
.sg-page-partite .sg-change-faces>i{
  width:37px!important;
  height:37px!important;
}
.sg-page-partite .sg-change-copy b{font-size:10.5px!important}
.sg-page-partite .sg-change-copy small{font-size:8.7px!important}

/* ----------------------------------------------------------------------
   MOBILE — edge-to-edge reale, non semplice desktop ristretto.
   ---------------------------------------------------------------------- */
@media(max-width:760px){
  html,
  body.sg-body,
  body.slr-site.slr-seriesagoal-secondary-shell{
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
  }

  body.sg-body{
    background:var(--sg-surface-2)!important;
  }

  /* La shell centrale tocca i bordi del viewport. */
  body.sg-body .sg-shell,
  body.sg-body.sg-page-news .sg-shell,
  body.sg-body.sg-page-pronostici .sg-shell,
  body.sg-body.sg-page-fantacalcio .sg-shell,
  body.sg-body.sg-page-account .sg-shell{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding-left:0!important;
    padding-right:0!important;
    gap:0!important;
  }
  body.sg-body .sg-sidebar,
  body.sg-body .sg-right-rail,
  body.sg-body .sg-news-rail{display:none!important}
  body.sg-body .sg-main,
  body.sg-body .sg-feed,
  body.sg-body .sg-content-grid,
  body.sg-body .sg-news-layout,
  body.sg-body .sg-match-detail-layout{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  body.sg-body .sg-content-grid,
  body.sg-body .sg-news-layout,
  body.sg-body .sg-feed{
    gap:8px!important;
  }

  /* Le superfici principali diventano sezioni full-width: niente bordo/corner
     esterno che faccia percepire una card dentro la pagina. */
  body.sg-body .sg-card{
    border-left:0!important;
    border-right:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }
  body.sg-body .sg-main>.sg-card,
  body.sg-body .sg-feed>.sg-card,
  body.sg-body .sg-content-grid>.sg-feed>.sg-card,
  body.sg-body .sg-match-center-card,
  body.sg-body .sg-section,
  body.sg-body .sg-result-card{
    width:100%!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
  }

  /* Anche le testate/hero entity non devono creare il rettangolo "flottante". */
  body.sg-body :is(
    .sg-page-intro,
    .sg-compact-league-head,
    .sg-team-cover,
    .sg-competition-cover,
    .sg-player-cover,
    .sg-coach-cover,
    .sg-venue-cover,
    .sg-referee-cover
  ){
    border-left:0!important;
    border-right:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }

  /* I gruppi partita restano separati dal colore/linea, non dal contenitore. */
  body.sg-body :is(.sg-league-group,.sg-fixture-date,.sg-fixture-round){
    border-left:0!important;
    border-right:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }

  /* Secondary/community bridge: stessa filosofia edge-to-edge. */
  body.slr-site.slr-seriesagoal-secondary-shell .sg-secondary-shell{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding-left:0!important;
    padding-right:0!important;
  }
  body.slr-site.slr-seriesagoal-secondary-shell .sg-secondary-main{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding-left:0!important;
    padding-right:0!important;
  }
  body.slr-site.slr-seriesagoal-secondary-shell :is(
    .slr-social-home,
    .slr-social-content-shell,
    .slr-news-shell,
    .slr-fan-club-shell,
    .slr-lists-shell,
    .slr-digest-shell,
    .slr-analytics-shell,
    .slr-market-shell
  ){
    width:100%!important;
    max-width:none!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;
  }

  /* Home: stessi dati, ma leggibili come nel riferimento. */
  .sg-page-home .sg-match-row{
    min-height:55px!important;
    grid-template-columns:45px minmax(0,1fr) 18px!important;
    padding:5px 8px!important;
  }
  .sg-page-home .sg-match-row-wrap>.sg-match-row{
    padding-left:38px!important;
  }
  .sg-page-home .sg-match-status,
  .sg-page-home .sg-match-status span{
    font-size:10.5px!important;
  }
  .sg-page-home .sg-match-teams>div{
    grid-template-columns:21px minmax(0,1fr) 24px!important;
    min-height:25px!important;
    gap:7px!important;
  }
  .sg-page-home .sg-match-teams img{
    width:20px!important;
    height:20px!important;
  }
  .sg-page-home .sg-match-teams span{
    font-size:12px!important;
    line-height:1.18!important;
  }
  .sg-page-home .sg-match-teams b{
    font-size:12.5px!important;
  }

  /* Match Center: tab/hero/sezioni al bordo del viewport. */
  .sg-page-partite .sg-match-center-card,
  .sg-page-partite .sg-match-primary-tabs,
  .sg-page-partite .sg-lineup-card,
  .sg-page-partite .sg-result-card{
    border-radius:0!important;
    border-left:0!important;
    border-right:0!important;
  }

  /* Campo verticale più leggibile. Manteniamo un piccolo inset interno perché
     il terreno di gioco deve restare distinguibile dalla sezione. */
  .sg-page-partite .sg-lineup-pitch-scroll{
    padding:10px 8px!important;
  }
  .sg-page-partite .sg-lineup-player{
    width:80px!important;
  }
  .sg-page-partite .sg-lineup-face{
    width:40px!important;
    height:40px!important;
  }
  .sg-page-partite .sg-lineup-player>b{
    max-width:78px!important;
    padding:2px 4px!important;
    font-size:8.8px!important;
  }
  .sg-page-partite .sg-lineup-player.sg-lineup-lines-5{
    width:70px!important;
  }
  .sg-page-partite .sg-lineup-player.sg-lineup-lines-5 .sg-lineup-face{
    width:38px!important;
    height:38px!important;
  }
  .sg-page-partite .sg-lineup-player.sg-lineup-lines-5>b{
    max-width:68px!important;
    font-size:8.2px!important;
  }
  .sg-page-partite .sg-lineup-player.sg-lineup-lines-6{
    width:60px!important;
  }
  .sg-page-partite .sg-lineup-player.sg-lineup-lines-6 .sg-lineup-face,
  .sg-page-partite .sg-lineup-player.sg-lineup-cols-5 .sg-lineup-face{
    width:36px!important;
    height:36px!important;
  }
  .sg-page-partite .sg-lineup-player.sg-lineup-lines-6>b,
  .sg-page-partite .sg-lineup-player.sg-lineup-cols-5>b{
    max-width:58px!important;
    font-size:7.7px!important;
  }
  .sg-page-partite .sg-lineup-player-meta{
    left:calc(50% + 7px);
    top:25px;
    gap:1px;
  }
  .sg-page-partite .sg-lineup-rating{
    min-width:23px;
    height:17px;
    padding-inline:3px;
    font-size:7.7px;
  }
  .sg-page-partite .sg-lineup-goal-badge{
    min-width:18px;
    height:18px;
    padding-inline:2px;
  }
  .sg-page-partite .sg-lineup-goal-badge .sg-goal-ball-symbol{
    width:11px!important;
    height:11px!important;
    flex-basis:11px!important;
  }

  /* Panchina e cambi: due colonne come ora, ma realmente leggibili. */
  .sg-page-partite .sg-lineup-dual-title{
    min-height:38px!important;
    font-size:8.5px!important;
  }
  .sg-page-partite .sg-lineup-list>header,
  .sg-page-partite .sg-lineup-changes>header,
  .sg-page-partite .sg-lineup-coach>header{
    min-height:38px!important;
    padding:0 7px!important;
  }
  .sg-page-partite .sg-lineup-list>header img,
  .sg-page-partite .sg-lineup-changes>header img,
  .sg-page-partite .sg-lineup-coach>header img{
    width:20px!important;
    height:20px!important;
    flex-basis:20px!important;
  }
  .sg-page-partite .sg-lineup-list>header b,
  .sg-page-partite .sg-lineup-changes>header b,
  .sg-page-partite .sg-lineup-coach>header b{
    font-size:8.8px!important;
  }
  .sg-page-partite .sg-lineup-person{
    min-height:52px!important;
    padding:5px 6px!important;
    gap:6px!important;
  }
  .sg-page-partite .sg-lineup-list-face{
    width:35px!important;
    height:35px!important;
    flex-basis:35px!important;
  }
  .sg-page-partite .sg-lineup-person b{
    font-size:9.4px!important;
    line-height:1.12!important;
  }
  .sg-page-partite .sg-lineup-person small{
    font-size:7.8px!important;
  }
  .sg-page-partite .sg-change-row{
    min-height:54px!important;
    padding:5px 6px!important;
    gap:6px!important;
  }
  .sg-page-partite .sg-change-row time{
    width:25px!important;
    flex-basis:25px!important;
    font-size:8.5px!important;
  }
  .sg-page-partite .sg-change-faces{
    width:46px!important;
    height:33px!important;
    flex-basis:46px!important;
  }
  .sg-page-partite .sg-change-faces>i{
    width:31px!important;
    height:31px!important;
  }
  .sg-page-partite .sg-change-copy b{font-size:8.9px!important}
  .sg-page-partite .sg-change-copy small{font-size:7.6px!important}
  .sg-page-partite .sg-lineup-nochanges{font-size:8px!important}
}

/* Niente "miniaturizzazione estrema" sotto i 390px: manteniamo la stessa
   leggibilità e lasciamo alle etichette l'ellipsis già esistente. */
@media(max-width:390px){
  .sg-page-partite .sg-lineup-player{width:76px!important}
  .sg-page-partite .sg-lineup-face{width:39px!important;height:39px!important}
  .sg-page-partite .sg-lineup-player>b{max-width:74px!important;font-size:8.4px!important}
  .sg-page-partite .sg-lineup-player.sg-lineup-lines-5{width:66px!important}
  .sg-page-partite .sg-lineup-player.sg-lineup-lines-5 .sg-lineup-face{width:37px!important;height:37px!important}
  .sg-page-partite .sg-lineup-player.sg-lineup-lines-5>b{max-width:64px!important;font-size:8px!important}
  .sg-page-partite .sg-lineup-player.sg-lineup-lines-6{width:58px!important}
  .sg-page-partite .sg-lineup-player.sg-lineup-lines-6 .sg-lineup-face,
  .sg-page-partite .sg-lineup-player.sg-lineup-cols-5 .sg-lineup-face{width:35px!important;height:35px!important}
  .sg-page-partite .sg-lineup-player.sg-lineup-lines-6>b,
  .sg-page-partite .sg-lineup-player.sg-lineup-cols-5>b{max-width:56px!important;font-size:7.5px!important}
  .sg-page-partite .sg-lineup-person b{font-size:9px!important}
  .sg-page-partite .sg-change-copy b{font-size:8.5px!important}
}

/* ======================================================================
   SerieAGoal SG.109 — mobile rhythm / safe margins + winner emphasis
   - Full-width mobile remains: no outer floating desktop container.
   - Adds a consistent safe gutter around page content, horizontally and
     vertically, so sections never touch viewport edges.
   - Home team names use normal weight; only the leading/winning team is bold.
   ====================================================================== */

/* HOME — normal team weight everywhere, emphasis only on the leader/winner. */
.sg-page-home .sg-match-teams span{
  font-weight:500!important;
}
.sg-page-home .sg-match-teams>div.is-leading span{
  font-weight:800!important;
}

@media(max-width:760px){
  /* Full-width shell, but with a real mobile safe gutter. This is a page
     margin, not a return to the old floating white desktop container. */
  body.sg-body .sg-shell,
  body.sg-body.sg-page-news .sg-shell,
  body.sg-body.sg-page-pronostici .sg-shell,
  body.sg-body.sg-page-fantacalcio .sg-shell,
  body.sg-body.sg-page-account .sg-shell,
  body.slr-site.slr-seriesagoal-secondary-shell .sg-secondary-shell{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:12px 12px 18px!important;
    box-sizing:border-box!important;
  }

  /* Do not re-add an inner inset: the shell owns the mobile gutter once. */
  body.sg-body .sg-main,
  body.sg-body .sg-feed,
  body.sg-body .sg-content-grid,
  body.sg-body .sg-news-layout,
  body.sg-body .sg-match-detail-layout,
  body.slr-site.slr-seriesagoal-secondary-shell .sg-secondary-main{
    margin-left:0!important;
    margin-right:0!important;
    padding-left:0!important;
    padding-right:0!important;
    box-sizing:border-box!important;
  }

  /* A little more vertical rhythm throughout the main mobile layouts. */
  body.sg-body .sg-content-grid,
  body.sg-body .sg-news-layout,
  body.sg-body .sg-feed{
    row-gap:12px!important;
  }

  /* Home controls must breathe before the competition list starts. */
  .sg-page-home .sg-home-control-strip{
    margin-top:2px!important;
    margin-bottom:14px!important;
    padding-bottom:10px!important;
  }
  .sg-page-home .sg-date-toolbar{
    margin-bottom:8px!important;
  }
  .sg-page-home .sg-home-score-filters{
    margin-left:0!important;
    margin-right:0!important;
  }
  .sg-page-home .sg-home-competition-cluster-label{
    margin-top:11px!important;
  }

  /* Keep the slightly larger SG.108 team size, but without artificial bold. */
  .sg-page-home .sg-match-teams span{
    font-size:12px!important;
    font-weight:500!important;
  }
  .sg-page-home .sg-match-teams>div.is-leading span{
    font-weight:800!important;
  }

  /* News: no carousel/card should cancel the page gutter with a negative
     bleed. Keep the same spacing language as Home. */
  .sg-page-news .sg-news-index-heading{
    margin-top:2px!important;
    margin-bottom:16px!important;
  }
  .sg-page-news .sg-news-league-chips{
    margin-left:0!important;
    margin-right:0!important;
    padding-left:0!important;
    padding-right:0!important;
    padding-bottom:14px!important;
  }
  .sg-page-news .sg-news-top-grid{
    margin-bottom:16px!important;
  }
  .sg-page-news .sg-news-league-blocks{
    gap:22px!important;
  }
  .sg-page-news .sg-news-all-section{
    margin-top:28px!important;
  }

  /* Common top-level sections: preserve full-width surfaces but prevent
     visually adjacent blocks from looking glued together. */
  body.sg-body :is(
    .sg-page-intro,
    .sg-compact-league-head,
    .sg-team-cover,
    .sg-competition-cover,
    .sg-player-cover,
    .sg-coach-cover,
    .sg-venue-cover,
    .sg-referee-cover
  ){
    margin-left:0!important;
    margin-right:0!important;
  }

  /* Horizontal scrollers respect the page gutter rather than bleeding out. */
  body.sg-body :is(
    .sg-filter-pills,
    .sg-news-league-chips,
    .sg-profile-tabs,
    .sg-tabs
  ){
    scroll-padding-left:12px;
    scroll-padding-right:12px;
  }
}

/* ======================================================================
   SerieAGoal SG.111 — mobile Home/Match full-width + rating table hard fix
   - Home: only the controls/calendar keep the safe horizontal gutter.
     Competition/result rows return edge-to-edge on mobile.
   - Single Match: the whole match surface returns edge-to-edge on mobile.
   - Other sections (News, Predictions, etc.) keep the SG.109 mobile gutters.
   - Match > Giocatori: loaded in the final mobile layer, so Voto can never
     overflow even when the page uses the prebuilt CSS bundle.
   ====================================================================== */
@media(max-width:760px){
  /* HOME — undo the global SG.109 shell gutter only here. */
  body.sg-body.sg-page-home .sg-shell{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding-left:0!important;
    padding-right:0!important;
    box-sizing:border-box!important;
  }
  body.sg-body.sg-page-home .sg-main,
  body.sg-body.sg-page-home .sg-content-grid,
  body.sg-body.sg-page-home .sg-feed{
    width:100%!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:0!important;
    padding-right:0!important;
    box-sizing:border-box!important;
  }
  /* The top match controls are the only Home block with a horizontal gutter. */
  body.sg-body.sg-page-home .sg-home-control-strip{
    width:auto!important;
    margin-left:12px!important;
    margin-right:12px!important;
    box-sizing:border-box!important;
  }
  /* Result groups, labels and inserted Home blocks may touch the content edge. */
  body.sg-body.sg-page-home .sg-home-competition-cluster-label,
  body.sg-body.sg-page-home .sg-league-card,
  body.sg-body.sg-page-home .sg-home-empty,
  body.sg-body.sg-page-home .sg-home-login-prompt{
    margin-left:0!important;
    margin-right:0!important;
  }

  /* SINGLE MATCH — undo the global SG.109 shell gutter only for match pages. */
  body.sg-body.sg-page-partite .sg-shell{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding-left:0!important;
    padding-right:0!important;
    box-sizing:border-box!important;
  }
  body.sg-body.sg-page-partite .sg-main,
  body.sg-body.sg-page-partite .sg-match-detail-layout,
  body.sg-body.sg-page-partite .sg-feed{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:0!important;
    padding-right:0!important;
    box-sizing:border-box!important;
  }

  /* Match > Giocatori — hard responsive grid in the CSS layer actually loaded
     after the page bundles. Five columns always sum to <= available width. */
  body.sg-body.sg-page-partite .sg-player-team-block,
  body.sg-body.sg-page-partite .sg-player-table{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  body.sg-body.sg-page-partite .sg-player-head,
  body.sg-body.sg-page-partite .sg-player-row{
    display:grid!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    grid-template-columns:minmax(0,1fr) 34px 30px 34px 42px!important;
    column-gap:2px!important;
    padding-left:8px!important;
    padding-right:8px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  body.sg-body.sg-page-partite .sg-player-head>*,
  body.sg-body.sg-page-partite .sg-player-row>*{
    min-width:0!important;
    max-width:100%;
    box-sizing:border-box!important;
  }
  body.sg-body.sg-page-partite .sg-player-person{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
  }
  body.sg-body.sg-page-partite .sg-player-person>span{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
  }
  body.sg-body.sg-page-partite .sg-player-person b,
  body.sg-body.sg-page-partite .sg-player-person small{
    display:block!important;
    max-width:100%!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.sg-body.sg-page-partite .sg-player-head>span:not(:first-child),
  body.sg-body.sg-page-partite .sg-player-row>span:not(.sg-player-person){
    text-align:center!important;
    justify-self:center!important;
  }
  body.sg-body.sg-page-partite .sg-player-row>.sg-rating{
    width:38px!important;
    min-width:38px!important;
    max-width:38px!important;
    justify-self:center!important;
    padding-left:2px!important;
    padding-right:2px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
}

@media(max-width:390px){
  body.sg-body.sg-page-partite .sg-player-head,
  body.sg-body.sg-page-partite .sg-player-row{
    grid-template-columns:minmax(0,1fr) 30px 27px 31px 38px!important;
    column-gap:1px!important;
    padding-left:6px!important;
    padding-right:6px!important;
  }
  body.sg-body.sg-page-partite .sg-player-person{gap:5px!important}
  body.sg-body.sg-page-partite .sg-player-person img{
    width:30px!important;
    height:30px!important;
    flex:0 0 30px!important;
  }
  body.sg-body.sg-page-partite .sg-player-row>.sg-rating{
    width:36px!important;
    min-width:36px!important;
    max-width:36px!important;
  }
}

/* SG.112 — Home mobile date navigator: three large, touch-friendly dates.
   Desktop keeps the existing five-day strip. The selected day remains centered,
   with the immediately previous/next calendar day on either side. */
@media(max-width:760px){
  body.sg-body.sg-page-home .sg-date-strip{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  body.sg-body.sg-page-home .sg-date-strip>.sg-date-item:first-child,
  body.sg-body.sg-page-home .sg-date-strip>.sg-date-item:last-child{
    display:none!important;
  }
  body.sg-body.sg-page-home .sg-date-strip>.sg-date-item{
    min-width:0!important;
    min-height:56px!important;
  }
}

/* ======================================================================
   SerieAGoal SG.113 — Match: team logos only in hero + flat coaches.
   Current match club crests are intentionally not repeated in stats,
   lineups, bench, coaches, changes or player ratings. Hero remains unchanged.
   Editorial singles: mobile full-width surface with safe text gutters.
   ====================================================================== */

/* Match lineup labels stay useful without repeating crests. */
.sg-page-partite .sg-lineup-teamstrip>span,
.sg-page-partite .sg-lineup-list>header span,
.sg-page-partite .sg-lineup-changes>header span{
  gap:0!important;
}
.sg-page-partite .sg-lineup-teamstrip b,
.sg-page-partite .sg-lineup-list>header b,
.sg-page-partite .sg-lineup-changes>header b{
  font-weight:800!important;
}

/* Allenatori: no card inside card. Two clean columns divided only by the
   normal section separator; home left, away right. */
.sg-page-partite .sg-lineup-coaches{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:1px!important;
  background:var(--sg-line)!important;
}
.sg-page-partite .sg-lineup-coach-cell{
  min-width:0;
  min-height:68px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 12px;
  background:var(--sg-surface);
  color:var(--sg-text);
  text-decoration:none;
  overflow:hidden;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
.sg-page-partite .sg-lineup-coach-cell.sg-lineup-coach-away{
  flex-direction:row-reverse;
  text-align:right;
}
.sg-page-partite .sg-lineup-coach-copy{
  display:grid;
  min-width:0;
  gap:2px;
}
.sg-page-partite .sg-lineup-coach-away .sg-lineup-coach-copy{justify-items:end}
.sg-page-partite .sg-lineup-coach-copy b{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11px;
  line-height:1.15;
}
.sg-page-partite .sg-lineup-coach-copy small{
  color:var(--sg-muted);
  font-size:8.5px;
  line-height:1.15;
}

/* Summary-tab coaches are flat too: no team crest, no nested rounded tile. */
.sg-page-partite .sg-match-coaches-section .sg-match-coaches{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:1px!important;
  background:var(--sg-line)!important;
}
.sg-page-partite .sg-match-coaches-section .sg-match-coach-flat{
  min-width:0;
  min-height:72px;
  display:flex!important;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 13px!important;
  background:var(--sg-surface)!important;
  color:var(--sg-text)!important;
  text-decoration:none;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
.sg-page-partite .sg-match-coaches-section .sg-match-coach-flat.is-away{
  flex-direction:row-reverse;
  text-align:right;
}
.sg-page-partite .sg-match-coaches-section .sg-match-coach-flat.is-away .sg-match-coach-person{
  flex-direction:row-reverse;
  text-align:right;
}
.sg-page-partite .sg-match-coaches-section .sg-match-coach-person{
  min-width:0;
  display:flex;
  align-items:center;
  gap:9px;
}
.sg-page-partite .sg-match-coaches-section .sg-match-coach-person strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

@media(max-width:760px){
  .sg-page-partite .sg-lineup-coach-cell{
    min-height:58px;
    gap:6px;
    padding:6px;
  }
  .sg-page-partite .sg-lineup-coach-copy b{font-size:9.4px}
  .sg-page-partite .sg-lineup-coach-copy small{font-size:7.8px}
  .sg-page-partite .sg-match-coaches-section .sg-match-coach-flat{
    min-height:62px;
    padding:7px 9px!important;
  }

  /* SINGLE NEWS / PRONOSTICO EDITORIALE / FANTACALCIO
     Break the story surface out of the generic 12px page shell, exactly like
     Home/Match. Text keeps its own 16px safe gutter; hero media is full width. */
  body.sg-body.sg-page-news .sg-article-layout{
    display:block!important;
    width:calc(100% + 24px)!important;
    max-width:none!important;
    margin-left:-12px!important;
    margin-right:-12px!important;
    box-sizing:border-box!important;
  }
  body.sg-body.sg-page-news .sg-article-main,
  body.sg-body.sg-page-news .sg-article-story{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  body.sg-body.sg-page-news .sg-article-hero-media,
  body.sg-body.sg-page-news .sg-article-main>.sg-article-story>.sg-article-card,
  body.sg-body.sg-page-news .sg-article-ad-break,
  body.sg-body.sg-page-news .sg-network-original-card,
  body.sg-body.sg-page-news .sg-article-author-box,
  body.sg-body.sg-page-news .sg-article-related-smart{
    width:100%!important;
    max-width:none!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;
    box-sizing:border-box!important;
  }
  /* Existing article head/body already use 16px horizontal padding. Ensure
     secondary modules keep the same safe readable gutter when their base
     component has no mobile padding of its own. */
  body.sg-body.sg-page-news .sg-network-original-card,
  body.sg-body.sg-page-news .sg-article-author-box{
    padding-left:16px!important;
    padding-right:16px!important;
  }
}

/* ======================================================================
   SerieAGoal SG.114 — Home fixtures: compact vertical team rhythm
   Keep the current typography untouched; only tighten the two team rows
   slightly so each fixture is a little denser on desktop and mobile.
   ====================================================================== */
.sg-page-home .sg-match-row{
  padding-top:4px!important;
  padding-bottom:4px!important;
}
.sg-page-home .sg-match-teams{
  gap:2px!important;
}
.sg-page-home .sg-match-teams>div{
  min-height:23px!important;
}

@media(max-width:760px){
  .sg-page-home .sg-match-teams{
    gap:2px!important;
  }
  .sg-page-home .sg-match-teams>div{
    min-height:23px!important;
  }
}

/* =========================================================
   SG 2.2.121 — ricerca globale completa + input mobile
   Questo file è condiviso da TUTTE le pagine, quindi il fix non
   dipende più dal bundle della pagina da cui viene aperta la ricerca.
   ========================================================= */
.sg-search2-scroll{
  overflow-y:auto!important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
@media(max-width:760px){
  body.sg-search2-open .sg-search2-overlay{
    inset:var(--sg-topbar-h,56px) 0 0 0!important;
    width:100%!important;
    height:calc(100dvh - var(--sg-topbar-h,56px))!important;
    padding:0!important;
    align-items:stretch!important;
    z-index:530!important;
  }
  body.sg-search2-open .sg-search2-dialog{
    width:100%!important;
    height:100%!important;
    max-height:100%!important;
    min-height:0!important;
    border:0!important;
    border-radius:0!important;
    display:flex!important;
    flex-direction:column!important;
  }
  body.sg-search2-open .sg-search2-head{
    display:grid!important;
    visibility:visible!important;
    opacity:1!important;
    position:relative!important;
    z-index:5!important;
    flex:0 0 62px!important;
    height:62px!important;
    min-height:62px!important;
    background:var(--sg-surface)!important;
  }
  body.sg-search2-open .sg-search2-head input[data-sg-search2-input]{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    width:100%!important;
    min-width:0!important;
    height:100%!important;
    pointer-events:auto!important;
    -webkit-appearance:none!important;
    appearance:none!important;
  }
  body.sg-search2-open .sg-search2-types{
    flex:0 0 auto!important;
  }
  body.sg-search2-open .sg-search2-scroll{
    flex:1 1 auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow-y:auto!important;
  }
  html[data-sg-theme="dark"] body.sg-search2-open .sg-search2-head{
    background:#191b21!important;
  }
}

