/* SerieAGoal v1.47 - Mobile only, follows v1.46.
   Full-width outer surfaces on ALL public pages, but safe padding for text.
   No changes to desktop, API/Fieldgoal, entitlements or Xcode.
*/
@media screen and (max-width:760px) {
  /* Un solo livello di impaginazione: niente gutter duplicati. */
  html[data-sg-theme] body.sg-body .sg-shell,
  html[data-sg-theme] body.sg-body .sg-main,
  html[data-sg-theme] body.sg-body .sg-content-grid,
  html[data-sg-theme] body.sg-body .sg-content-grid > .sg-feed,
  html[data-sg-theme] body.sg-body .sg-match-detail-layout,
  html[data-sg-theme] body.sg-body .sg-match-detail-layout > .sg-feed {
    box-sizing:border-box!important;
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;margin-right:0!important;
    padding-left:0!important;padding-right:0!important;
  }
  /* Uniforma le superfici ESTERNE su tutte le sezioni pubbliche. Non
     toccare form, avatar, campi da calcio, pill, bottoni o contenuti interni. */
  html[data-sg-theme] body.sg-body .sg-main > :is(.sg-card,.sg-section,.sg-feed),
  html[data-sg-theme] body.sg-body .sg-main > .sg-content-grid > .sg-feed > :is(.sg-card,.sg-section),
  html[data-sg-theme] body.sg-body .sg-feed > :is(.sg-card,.sg-section,.sg-fixture-archive),
  html[data-sg-theme] body.sg-body .sg-main :is(.sg-league-card,.sg-home-league-card,.sg-league-group,.sg-match-row-wrap),
  html[data-sg-theme] body.sg-body.sg-page-news .sg49-panel {
    box-sizing:border-box!important;
    min-width:0!important;width:100%!important;max-width:100%!important;
    margin-left:0!important;margin-right:0!important;
    border-radius:0!important;border-left:0!important;border-right:0!important;
    box-shadow:none!important;
  }
  /* Titoli di sezione, schede editoriali e testi: spazio interno,
     anche se la cornice esterna occupa tutto lo schermo. */
  html[data-sg-theme] body.sg-body .sg-main > :is(.sg-page-intro,.sg-section-heading,.sg-compact-league-head),
  html[data-sg-theme] body.sg-body .sg-feed > :is(.sg-page-intro,.sg-section-heading),
  html[data-sg-theme] body.sg-body .sg-main .sg-card > .sg-card-title {
    padding-left:16px!important;padding-right:16px!important;
  }

  /* ELENCO GARE (LIVE, concluse, in programma): la data/minuto non deve
     incollarsi alla sinistra o ai loghi. Spazio per la stellina centrata. */
  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 {
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 144px!important;
    align-items:center!important;
    gap:6px!important;
    box-sizing:border-box!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    padding:9px 12px!important;
    overflow:hidden!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap > .sg-match-row:has(> .sg-match-feature-zone.is-empty),
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap.is-finished > .sg-match-row:has(> .sg-match-feature-zone.is-empty) {
    grid-template-columns:minmax(0,1fr) 38px!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 {
    display:grid!important;
    grid-template-columns:57px minmax(0,1fr)!important;
    column-gap:9px!important;
    min-width:0!important;
    padding:2px 0!important;
    align-items:center!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-main-link > .sg-match-status {
    box-sizing:border-box!important;
    min-width:0!important;width:100%!important;
    padding:0 4px 0 0!important;
    display:flex!important;flex-wrap:wrap!important;
    justify-content:center!important;align-content:center!important;
    text-align:center!important;
    line-height:1.2!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:100%!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.is-empty,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone.has-features {
    min-width:0!important;box-sizing:border-box!important;
    grid-template-columns:minmax(0,1fr) 32px!important;
    padding:2px 0!important;gap:3px!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone.is-empty {
    grid-template-columns:minmax(0,0px) 32px!important;
  }
  /* La stellina resta cliccabile, in mezzo verticalmente a destra.
     Le statistiche restano raggiungibili aprendo il Match Center. */
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg108-stats-cta {
    display:none!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone .sg108-row-actions,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone.is-empty .sg108-row-actions,
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone.has-features .sg108-row-actions {
    display:flex!important;
    grid-column:2!important;grid-row:1!important;
    width:32px!important;min-width:32px!important;max-width:32px!important;
    height:100%!important;min-height:56px!important;
    align-items:center!important;justify-content:center!important;
    flex-direction:column!important;gap:0!important;
    justify-self:center!important;align-self:center!important;
    padding:0!important;margin:0!important;
    overflow:visible!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg108-row-actions > .sg-match-favorite {
    display:flex!important;align-items:center!important;justify-content:center!important;
    width:32px!important;height:36px!important;
    min-width:32px!important;min-height:36px!important;
    margin:0!important;padding:0!important;
  }

  /* MATCH CENTER: togli cornici e gutter a cascata, non i contenuti. */
  html[data-sg-theme] body.sg-body.sg-page-partite .sg-match-modern-v2225,
  html[data-sg-theme] body.sg-body.sg-page-partite .sg-match-tab-panel,
  html[data-sg-theme] body.sg-body.sg-page-partite .sg-match-predictions-stack {
    box-sizing:border-box!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    margin:0!important;padding-left:0!important;padding-right:0!important;
  }
  html[data-sg-theme] body.sg-body.sg-page-partite .sg-match-modern-v2225 .sg-match-center-card,
  html[data-sg-theme] body.sg-body.sg-page-partite .sg-match-tab-panel > :is(.sg-card,.sg-section,section),
  html[data-sg-theme] body.sg-body.sg-page-partite .sg-match-tab-panel > .sg-match-predictions-stack > section {
    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;
  }
  html[data-sg-theme] body.sg-body.sg-page-partite .sg-match-tab-panel > .sg-card > .sg-card-title {
    padding-left:16px!important;padding-right:16px!important;
  }
  /* Sufficienti margini di lettura per testo e statistiche, senza
     rimpicciolire il campo delle formazioni o il tabellone stesso. */
  html[data-sg-theme] body.sg-body.sg-page-partite .sg-match-tab-panel > .sg-card > :is(p,.sg-empty,.sg-card-copy),
  html[data-sg-theme] body.sg-body.sg-page-partite .sg-match-tab-panel > .sg-section > :is(p,.sg-empty,.sg-card-copy) {
    padding-left:16px!important;padding-right:16px!important;
  }

  /* SINGLE NEWS: annulla il vecchio calc(100% + 24px) e ripristina
     una zona leggibile di 17px ai lati di TUTTI i blocchi editoriali. */
  html[data-sg-theme] body.sg-body.sg-page-news .sg-article-layout,
  html[data-sg-theme] body.sg-body.sg-page-news .sg-article-main,
  html[data-sg-theme] body.sg-body.sg-page-news .sg-article-story {
    box-sizing:border-box!important;
    display:block!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    margin-left:0!important;margin-right:0!important;
    padding-left:0!important;padding-right:0!important;
  }
  html[data-sg-theme] body.sg-body.sg-page-news .sg-article-story > :is(.sg-article-card,.sg-article-author-box,.sg-article-related-smart),
  html[data-sg-theme] body.sg-body.sg-page-news .sg-article-main > .sg-article-story > .sg-article-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;
    padding-left:0!important;padding-right:0!important;
    border-left:0!important;border-right:0!important;
    border-radius:0!important;box-shadow:none!important;
  }
  html[data-sg-theme] body.sg-body.sg-page-news .sg-article-story .sg-article-head,
  html[data-sg-theme] body.sg-body.sg-page-news .sg-article-story .sg-article-body,
  html[data-sg-theme] body.sg-body.sg-page-news .sg-article-story .sg-article-section-body,
  html[data-sg-theme] body.sg-body.sg-page-news .sg-article-story > .sg-article-author-box,
  html[data-sg-theme] body.sg-body.sg-page-news .sg-article-story > .sg-article-related-smart {
    box-sizing:border-box!important;
    padding-left:17px!important;padding-right:17px!important;
  }
  html[data-sg-theme] body.sg-body.sg-page-news .sg-article-story :is(h1,h2,h3,p,li,blockquote) {
    overflow-wrap:break-word;
  }
  html[data-sg-theme] body.sg-body.sg-page-news .sg-article-story .sg-article-hero-media {
    box-sizing:border-box!important;
    width:100%!important;max-width:100%!important;
    margin-left:0!important;margin-right:0!important;
  }
  /* Campo delle formazioni: allarga la superficie utile, preservando
     coordinate dei giocatori, linee e zoom interno. */
  html[data-sg-theme] body.sg-body.sg-page-partite .sg-match-tab-panel .sg-lineup-pitch-scroll {
    padding-left:8px!important;padding-right:8px!important;
  }
    /* News landing: non eliminare il padding del testo nelle card in evidenza. */
  html[data-sg-theme] body.sg-body.sg-page-news .sg49-panel {
    padding-left:15px!important;padding-right:15px!important;
  }
}

/* Schermi particolarmente stretti: preserva club e minutaggio. */
@media screen and (max-width:370px) {
  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 {
    padding-left:9px!important;padding-right:9px!important;
    grid-template-columns:minmax(0,1fr) 124px!important;
    gap:3px!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap > .sg-match-row:has(> .sg-match-feature-zone.is-empty) {
    grid-template-columns:minmax(0,1fr) 35px!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-main-link {
    grid-template-columns:52px minmax(0,1fr)!important;
    column-gap:6px!important;
  }
}
