/* SerieAGoal mobile layout system v1.53. Source: ssss.zip + v1.52.
   Only responsive surface geometry, not API, logic, desktop or controls.
   Outer surfaces full-width / square; content gutter 12-14px.
*/
@media screen and (max-width:760px) {
  html[data-sg-theme] body.sg-body { --sg-m-gutter:14px; }
  /* Page rails: a single width owner. */
  html[data-sg-theme] body.sg-body :is(.sg-shell,.sg-main,.sg-content-grid,.sg-feed,.sg-match-detail-layout,.sg-team-overview-grid,.sg-team-modern-v2227,.sg49-page,.sg49-layout,.sg49-main) {
    min-width:0!important;max-width:100%!important;box-sizing:border-box!important;
  }
  html[data-sg-theme] body.sg-body :is(.sg-shell,.sg-main,.sg-content-grid,.sg-feed,.sg-match-detail-layout,.sg49-page,.sg49-layout,.sg49-main) {
    width:100%!important;margin-inline:0!important;padding-inline:0!important;
  }
  /* Top-level public surface cards. Do not flatten nested UI like footballers,
     badges, prices, nav pills, calculators, or modal dialogs. */
  html[data-sg-theme] body.sg-body .sg-feed > :is(section.sg-card,.sg-card.sg-section,.sg-card.sg-fixture-archive,.sg-card.sg-transfer-archive),
  html[data-sg-theme] body.sg-body .sg-main > :is(section.sg-card,.sg-card.sg-section,.sg-card.sg-fixture-archive),
  html[data-sg-theme] body.sg-body .sg-team-overview-grid > :is(section.sg-card,.sg-card),
  html[data-sg-theme] body.sg-body .sg-team-modern-v2227 > .sg-feed > :is(section.sg-card,.sg-card),
  html[data-sg-theme] body.sg-body .sg-match-tab-panel > :is(section.sg-card,section.sg-section),
  html[data-sg-theme] body.sg-body.sg-page-news .sg49-panel,
  html[data-sg-theme] body.sg-body.sg-page-news .sg50-focus-section,
  html[data-sg-theme] body.sg-body .sg-match-row-wrap,
  html[data-sg-theme] body.sg-body .sg-team-overview-grid > .sg-team-overview-fixtures {
    box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important;
    margin-inline:0!important;border-radius:0!important;border-inline:0!important;box-shadow:none!important;
  }
  /* Keep wide blocks flush, but leave ordinary typography breathing room. */
  html[data-sg-theme] body.sg-body .sg-main .sg-card > .sg-card-title,
  html[data-sg-theme] body.sg-body .sg-main .sg-card > .sg-section-head,
  html[data-sg-theme] body.sg-body .sg-main .sg-card > .sg-empty,
  html[data-sg-theme] body.sg-body .sg-main .sg-card > .sg-empty-inline,
  html[data-sg-theme] body.sg-body .sg-main .sg-card > p.sg-muted,
  html[data-sg-theme] body.sg-body .sg-main .sg-card > .sg-page-intro,
  html[data-sg-theme] body.sg-body .sg-main .sg-section-heading,
  html[data-sg-theme] body.sg-body .sg-main .sg-page-intro {
    box-sizing:border-box!important;padding-inline:var(--sg-m-gutter)!important;
    max-width:100%!important;min-width:0!important;
  }
  /* Main upcoming matches, results, club and player summaries. Rows still full width. */
  html[data-sg-theme] body.sg-body .sg-team-overview-grid > .sg-team-overview-fixtures,
  html[data-sg-theme] body.sg-body .sg-team-overview-grid > .sg-team-summary,
  html[data-sg-theme] body.sg-body .sg-feed > .sg-fixture-archive,
  html[data-sg-theme] body.sg-body .sg-feed > .sg-roster-card,
  html[data-sg-theme] body.sg-body .sg-feed > .sg-transfer-archive,
  html[data-sg-theme] body.sg-body .sg-feed > .sg-team-profile {
    border-radius:0!important;margin-inline:0!important;max-width:100%!important;
  }
  /* Header text aligns with the match-list internal 12px padding rather
     than sitting at 0px or inheriting a 24px desktop gutter. */
  html[data-sg-theme] body.sg-body .sg-team-overview-fixtures > .sg-card-title,
  html[data-sg-theme] body.sg-body .sg-fixture-archive > .sg-card-title,
  html[data-sg-theme] body.sg-body .sg-transfer-archive > .sg-card-title {
    padding-inline:var(--sg-m-gutter)!important;
  }
  html[data-sg-theme] body.sg-body .sg-main .sg-match-row-wrap > .sg-match-row {
    padding-inline:12px!important;
  }
  /* Editorial surfaces: no large edge gap, no flush text. */
  html[data-sg-theme] body.sg-body.sg-page-news :is(.sg49-panel,.sg-article-head,.sg-article-body,.sg-article-section-body) {
    padding-inline:var(--sg-m-gutter)!important;
  }
  html[data-sg-theme] body.sg-body.sg-page-news .sg-article-hero-media {
    margin-inline:0!important;border-radius:0!important;
  }
  /* Match preview: retain v1.52's corrected content gutter even after
     older selectors which wiped padding; never alter the lineup pitch. */
  html[data-sg-theme] body.sg-body.sg-page-partite .sg-main .sg-match-tab-panel > section.sg71-preview.sg-card {
    padding:16px var(--sg-m-gutter) 18px!important;
    border-radius:0!important;
  }
  html[data-sg-theme] body.sg-body.sg-page-partite .sg-main .sg-match-tab-panel > #sg110-premium-analysis.sg-ai-premium-panel,
  html[data-sg-theme] body.sg-body.sg-page-partite .sg-main .sg-match-tab-panel > .sg-match-predictions-stack {
    box-sizing:border-box!important;padding-inline:var(--sg-m-gutter)!important;
  }
  /* Transfer names and long headlines should not create page overflow. */
  html[data-sg-theme] body.sg-body :is(.sg-article-body,.sg71-preview-prose,.sg-team-info-grid,.sg-transfer-archive-list) {
    min-width:0;overflow-wrap:break-word;
  }
  /* Vertical modules only. Horizontal navigations/tables and football pitch
     remain intentionally scrollable and retain their custom geometry. */
  html[data-sg-theme] body.sg-body .sg-feed > :is(section.sg-card,.sg-card.sg-section),
  html[data-sg-theme] body.sg-body .sg-team-overview-grid > .sg-card {
    min-width:0!important;
  }
}
@media screen and (max-width:390px) {
  html[data-sg-theme] body.sg-body { --sg-m-gutter:12px; }
}
