/* Sable FC de Batié — v5.56
   Responsive and cross-browser corrective stylesheet.
   Applied last, after selectable club themes. No changes to private data,
   payment forms, fan-card print dimensions or media playback logic. */

html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
html,body { max-width:100%; }
body { overflow-x:hidden; }
body *,body *::before,body *::after { box-sizing:border-box; }
body img,body video,body iframe,body svg { max-width:100%; }
body img,body video { -webkit-backface-visibility:hidden; }
body img { height:auto; }
body input,body textarea,body select { min-width:0; max-width:100%; }
body button,body a { touch-action:manipulation; }
body .wrap,body main,body .sfc-home-main,body section { min-width:0; }
body .contentgrid > *,body .sfc-latest-grid > *,body .sfc-theme-hero-inner > *,
body .sfc-poster-layout > *,body .sfc-footer-grid > *,body .sfc-card-tiers > *,
body .sfc-person-grid > *,body .sfc-match-grid > * { min-width:0; }
body .contentcard,body .sfc-latest-card,body .sfc-theme-side-card { overflow:hidden; }
body .contentcard img,body .sfc-latest-card img,body .sfc-theme-side-card img { max-width:100%; }
body .sfc-theme-headline-text,body .sfc-poster-caption,body .sfc-latest-card,
body .sfc-theme-side-card,body .sfc-comment,body .sfc-footer-grid { overflow-wrap:break-word; }

/* Stadium poster + Sable TV: force one controlled row height on desktop.
   Different browsers previously let the player stretch taller than the poster. */
body .sfc-poster-layout {
 display:grid!important;
 grid-template-columns:minmax(0,2.1fr) minmax(300px,1fr)!important;
 align-items:stretch!important;
 grid-auto-rows:minmax(0,auto);
 gap:18px!important;
 max-width:100%;
}
body .sfc-poster-layout .sfc-poster-carousel {
 height:420px!important;
 min-height:0!important;
 min-width:0!important;
 max-width:100%!important;
 align-self:stretch;
 contain:layout;
}
body .sfc-poster-layout .sfc-tv-compact {
 height:420px!important;
 min-height:0!important;
 max-height:420px!important;
 min-width:0!important;
 width:100%;
 display:flex!important;
 flex-direction:column!important;
 align-items:stretch!important;
 overflow:hidden;
}
body .sfc-tv-compact > .sfc-tv-widget-mini {
 flex:1 1 auto!important;
 width:100%!important;
 height:100%!important;
 min-height:0!important;
 max-height:100%!important;
 display:flex!important;
 flex-direction:column!important;
 overflow:hidden;
}
body .sfc-tv-compact .sfc-tv-widget-mini .sfc-tv-topline,
body .sfc-tv-compact .sfc-tv-widget-mini .sfc-tv-matchbar,
body .sfc-tv-compact .sfc-tv-widget-mini .sfc-tv-under { flex:0 0 auto; min-width:0; }
body .sfc-tv-compact .sfc-tv-widget-mini .sfc-tv-screen {
 position:relative!important;
 width:100%!important;
 height:auto!important;
 min-height:0!important;
 max-height:none!important;
 flex:1 1 auto!important;
 aspect-ratio:16/9;
 overflow:hidden;
}
body .sfc-tv-compact .sfc-tv-widget-mini .sfc-tv-screen video,
body .sfc-tv-compact .sfc-tv-widget-mini .sfc-tv-screen iframe {
 position:absolute;
 inset:0;
 width:100%!important;
 height:100%!important;
 object-fit:contain;
}
body .sfc-tv-compact .sfc-tv-widget-mini .sfc-tv-standby {
 width:100%;height:100%;min-height:0;overflow:hidden;
}
body .sfc-tv-compact .sfc-tv-teams { min-width:0; }
body .sfc-tv-compact .sfc-tv-teams b { min-width:0;overflow-wrap:break-word; }
body .sfc-poster-photos { min-height:0!important; }
body .sfc-poster-photo { min-height:0!important; }
body .sfc-poster-photo img { width:100%!important;height:100%!important;object-fit:contain!important; }

/* Theme, navigation and long club labels. */
body .sfc-theme-hero-inner,body .sfc-theme-headline { max-width:100%; }
body .sfc-theme-headline-text { max-width:100%; }
body .sfc-header-controls,body .sfc-blue-header .navinner { min-width:0; }
body .sfc-blue-header .links { min-width:0; }
body .sfc-blue-header .links a { line-height:1.3; }
body .sfc-updates-row,body .sfc-fixtures-scroll { min-width:0;max-width:100%; }
body .sfc-announcements-ticker { min-width:0; }
body .sfc-article-slide,body .sfc44-history-gallery,body .sfc48-history-gallery { max-width:100%; }
body .sfc-article-slide img { max-width:100%;object-fit:contain; }
body .sfc-footer-grid,body .sfc-sponsor-track { max-width:100%; }

/* Standalone Sable TV: stable ratio and usable chat in mobile browsers. */
body.sfc-watch-page .sfc-watch-layout,body.sfc-watch-page .sfc-live-stage,
body.sfc-watch-page .sfc-tv-widget,body.sfc-watch-page .sfc-tv-screen { min-width:0;max-width:100%; }
body.sfc-watch-page .sfc-tv-screen { width:100%; }
body.sfc-watch-page .sfc-tv-screen video,body.sfc-watch-page .sfc-tv-screen iframe { width:100%;height:100%;object-fit:contain; }
body.sfc-watch-page .sfc-tv-chat-feed { -webkit-overflow-scrolling:touch; }
body.sfc-watch-page .sfc-tv-chat form input { min-width:0; }

/* Fallback for browsers that don't implement CSS aspect-ratio (older Safari). */
@supports not (aspect-ratio:16/9) {
 body .sfc-tv-compact .sfc-tv-widget-mini .sfc-tv-screen { height:auto!important;flex:0 0 auto!important; }
 body .sfc-tv-compact .sfc-tv-widget-mini .sfc-tv-screen::before { content:"";display:block;padding-top:56.25%; }
 body.sfc-watch-page .sfc-tv-screen { height:0!important;padding-top:56.25%;min-height:0!important; }
 body.sfc-watch-page .sfc-tv-screen:fullscreen { height:100vh!important;padding:0!important; }
}

@media(max-width:980px) {
 body .sfc-poster-layout { grid-template-columns:minmax(0,1fr)!important;gap:15px!important; }
 body .sfc-poster-layout .sfc-poster-carousel { height:390px!important; }
 body .sfc-poster-layout .sfc-tv-compact {
   height:auto!important;max-height:none!important;min-height:0!important;
   display:block!important;
 }
 body .sfc-tv-compact > .sfc-tv-widget-mini {
   width:100%!important;height:auto!important;max-height:none!important;
   display:block!important;
 }
 body .sfc-tv-compact .sfc-tv-widget-mini .sfc-tv-screen {
   flex:none!important;height:auto!important;max-height:none!important;
   aspect-ratio:16/9;
 }
 body .sfc-tv-compact .sfc-tv-widget-mini .sfc-tv-standby { position:absolute;inset:0; }
 body .sfc-theme-hero-inner { max-width:100%!important; }
 body .sfc-footer-grid { grid-template-columns:minmax(0,2fr) repeat(2,minmax(0,1fr));gap:20px; }
}

@media(max-width:850px) {
 body .sfc-blue-header .navinner { width:calc(100% - 24px)!important;min-height:60px!important;position:relative; }
 body .sfc-blue-header .sfc-header-logo { height:auto!important;object-fit:contain; }
 body .sfc-blue-header .links { z-index:100!important;max-height:calc(100vh - 60px);overflow-y:auto;-webkit-overflow-scrolling:touch; }
 body .sfc-theme-hero-inner { width:100%!important;display:block!important; }
 body .sfc-theme-headline { max-width:100%!important; }
 body .sfc-theme-side { min-width:0; }
 body .sfc-updates-row { flex-wrap:wrap; }
 body .sfc-updates-row .sfc-fixtures-scroll { width:100%!important;max-width:100%; }
 body .sfc-news-lead,body .sfc-latest,body .sfc-theme-club { max-width:100%; }
 body .sfc-person-grid,body .sfc-match-grid,body .sfc-card-tiers {grid-template-columns:repeat(2,minmax(0,1fr));}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat {max-width:100%;}
}
@media(max-width:650px) {
 body .sfc-poster-layout { gap:12px!important; }
 body .sfc-poster-layout .sfc-poster-carousel { height:310px!important; }
 body .sfc-poster-layout .sfc-tv-compact { border-radius:12px; }
 body .sfc-poster-photos {gap:4px!important;padding:4px!important;}
 body .sfc-poster-caption {padding:10px 12px!important;}
 body .sfc-theme-hero-inner { padding:0!important; }
 body .sfc-theme-headline { width:100%!important;min-height:0!important;max-height:none; }
 body .sfc-theme-headline-text { padding:16px!important;min-width:0; }
 body .sfc-theme-headline-text h2 {font-size:clamp(24px,6.5vw,38px)!important;overflow-wrap:break-word;}
 body .sfc-theme-headline-text p {font-size:13px;line-height:1.45;}
 body .sfc-theme-side {grid-template-columns:1fr!important;}
 body .sfc-theme-side-card {max-width:100%;}
 body .sfc-latest-grid,body .contentgrid {grid-template-columns:1fr!important;}
 body .sfc-footer-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:16px; }
 body .sfc-footer-grid>div:first-child {grid-column:1/-1;}
 body .sfc-person-grid,body .sfc-match-grid,body .sfc-card-tiers {grid-template-columns:1fr!important;}
 body .sfc-club-tabs {flex-wrap:wrap;}
 body .sfc-sponsor-track {-webkit-overflow-scrolling:touch;}
 body.sfc-watch-page .sfc-watch-head-fixed {gap:5px;}
 body.sfc-watch-page .sfc-tv-chat form input[name=message] {font-size:16px!important;}
 body.sfc-watch-page .sfc-watch-layout .sfc-tv-chat { padding-bottom:max(8px,env(safe-area-inset-bottom))!important; }
}
@media(max-width:390px) {
 body .sfc-blue-header .navinner {width:calc(100% - 16px)!important;gap:3px!important;}
 body .sfc-blue-header .sfc-header-logo {max-width:114px!important;}
 body .sfc-header-controls {gap:3px!important;}
 body .sfc-blue-header .cta {font-size:9px!important;padding:8px 5px!important;}
 body .sfc-poster-layout .sfc-poster-carousel {height:285px!important;}
 body .sfc-poster-photos-3 .sfc-poster-photo {min-width:0;}
 body .sfc-poster-caption h2 {font-size:15px!important;line-height:1.2!important;}
 body .sfc-tv-topline {flex-wrap:wrap;gap:4px;}
 body .sfc-tv-matchbar .sfc-tv-teams {gap:5px;font-size:11px;}
 body .sfc-footer-grid {grid-template-columns:1fr;}
 body .sfc-footer-grid>div:first-child {grid-column:auto;}
}
@media (prefers-reduced-motion:reduce) {
 body .sfc-poster-slide,body .sfc-theme-headline,body .sfc-hero-frame,
 body .sfc-announcements-ticker-track {animation:none!important;transition:none!important;}
}
