/* SerieAGoal v1.48 - HOTFIX MOBILE (<=760px).
   CSS appended LAST, after all existing component styles.
   Not a restyle of the desktop, any backend, or locked Premium CTA.
   Rules target only redundant page wrappers and the football match list.
*/
@media screen and (max-width:760px) {
  /* 1. Shells: one outer width, readable internal gutters. Preserve media. */
  html[data-sg-theme] body.sg-body .sg-main,
  html[data-sg-theme] body.sg-body .sg-shell,
  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;max-width:100%!important;width:100%!important;
    margin-inline:0!important;padding-inline:0!important;
  }
  /* Public content sections can be full-bleed without nesting cards. Avoid
     changing interactive controls, club tiles, ads, chart canvases or images. */
  html[data-sg-theme] body.sg-body .sg-feed > .sg-card.sg-section,
  html[data-sg-theme] body.sg-body .sg-feed > .sg-card.sg-lineup-card,
  html[data-sg-theme] body.sg-body .sg-main > .sg-card.sg-section,
  html[data-sg-theme] body.sg-body .sg-match-tab-panel > section.sg-card,
  html[data-sg-theme] body.sg-body .sg-match-tab-panel > section.sg-section,
  html[data-sg-theme] body.sg-body .sg-match-tab-panel > section.sg-lineup-card {
    box-sizing:border-box!important;
    min-width:0!important;max-width:100%!important;width:100%!important;
    margin-inline:0!important;padding-inline:0!important;
    border-left:0!important;border-right:0!important;border-radius:0!important;
    box-shadow:none!important;
  }
  /* Typography and statistical panels retain padding despite full-width cards. */
  html[data-sg-theme] body.sg-body .sg-match-tab-panel > section.sg-card:not(.sg-lineup-card) > .sg-card-title,
  html[data-sg-theme] body.sg-body .sg-match-tab-panel > section.sg-section:not(.sg-lineup-card) > .sg-card-title {
    box-sizing:border-box!important;padding-inline:16px!important;
  }

  /* 2. Lineups: abolish both extra frames (the section and the board), while
     preserving the team header and pitch geometry, coordinates and ratings. */
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-match-tab-panel,
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-match-tab-panel > .sg-lineup-card,
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-match-tab-panel > section.sg-card.sg-lineup-card,
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-match-tab-panel .sg-lineup-board {
    box-sizing:border-box!important;
    display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;
    margin:0!important;padding:0!important;
    border:0!important;border-radius:0!important;box-shadow:none!important;
    outline:0!important;
  }
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-match-tab-panel .sg-lineup-board {
    background:transparent!important;
  }
  /* The header is content; give it a comfortable inner gutter, not a frame. */
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-lineup-board .sg40-lineup-formbar {
    box-sizing:border-box!important;width:100%!important;max-width:100%!important;
    margin:0!important;padding-inline:14px!important;
    border-radius:0!important;
  }
  /* Expand pitch to 100% minus ONLY one safe 8px phone gutter each side. */
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-lineup-board .sg-lineup-pitch-scroll {
    box-sizing:border-box!important;width:100%!important;max-width:100%!important;
    margin:0!important;padding:8px!important;
    border:0!important;border-radius:0!important;box-shadow:none!important;
    overflow:hidden!important;
  }
  html[data-sg-theme] body.sg-page-partite.sg-body .sg-main .sg-lineup-board .sg-lineup-pitch {
    box-sizing:border-box!important;width:100%!important;max-width:100%!important;
    margin:0!important;
    border-radius:8px!important;
  }
  /* 3. Nested containers elsewhere: remove only the page-level double frame;
     never blanket-reset .sg-card descendants, which include usable modules. */
  html[data-sg-theme] body.sg-body .sg-feed > .sg-card.sg-section > .sg-card,
  html[data-sg-theme] body.sg-body .sg-match-tab-panel > section.sg-card > .sg-match-center-card {
    box-sizing:border-box!important;min-width:0!important;max-width:100%!important;
    margin-inline:0!important;border-radius:0!important;
  }

  /* 4. Fixture list: the stats icon is not available on phone, while the
     favourite keeps its own interactive element and stays vertically centered. */
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap a.sg108-stats-cta,
  html[data-sg-theme] body.sg-body .sg-match-row-wrap a.sg108-stats-cta,
  html[data-sg-theme] body.sg-body .sg-match-row-wrap .sg108-row-actions > .sg108-stats-cta {
    display:none!important;visibility:hidden!important;
    width:0!important;height:0!important;min-width:0!important;
    margin:0!important;padding:0!important;border:0!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 {
    box-sizing:border-box!important;
    display:flex!important;flex-direction:row!important;
    align-items:center!important;justify-content:center!important;
    justify-self:center!important;align-self:stretch!important;
    width:38px!important;min-width:38px!important;
    height:100%!important;min-height:64px!important;
    padding:0!important;margin:0!important;gap:0!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg108-row-actions > button.sg-match-favorite {
    position:static!important;display:inline-flex!important;
    flex:0 0 36px!important;
    align-items:center!important;justify-content:center!important;
    width:36px!important;height:40px!important;
    min-width:36px!important;min-height:40px!important;
    margin:0!important;padding:0!important;
  }
  /* Eliminate leftover space reserved for the hidden graph. The existing
     pre-match preview can still use the first column of the feature zone. */
  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 {
    grid-template-columns:minmax(0,1fr) 38px!important;
    gap:2px!important;
    padding-right:0!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) 38px!important;
    gap:0!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-feature-zone .sg108-row-actions {
    grid-column:2!important;grid-row:1!important;
  }
  /* Room to breathe for LIVE/status without touching the team names. */
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-main-link {
    grid-template-columns:58px minmax(0,1fr)!important;
    column-gap:10px!important;
    padding-left:2px!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;padding:0 5px!important;
    display:flex!important;align-items:center!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:100%!important;
  }
}
@media screen and (max-width:390px){
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap .sg-match-main-link {
    grid-template-columns:54px minmax(0,1fr)!important;column-gap:7px!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 {
    grid-template-columns:minmax(0,1fr) 36px!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) 36px!important;
  }
}
