/* FantaScazzo — finishing layer, no changes to scoring or Supabase. */
:root{--fs-crest-fixture:clamp(24px,3.2vw,34px)}
/* Keep transparent uploaded PNG/WebP crests transparent, and fit within their allotted space. */
body.fs-app .fs-stadium-crest,body.fs-app #formazioni-pubbliche .fs-competition-crest{background:transparent!important;box-shadow:none!important;border:0!important;overflow:visible!important}
body.fs-app .fs-stadium-crest img,body.fs-app #formazioni-pubbliche .fs-competition-crest img,body.fs-app img.fs-uploaded-crest{object-fit:contain!important;object-position:center!important;background:transparent!important;border:0!important;box-shadow:none!important;max-width:100%!important;max-height:100%!important}
body.fs-app #formazioni-pubbliche .fs-competition-crest{width:var(--fs-crest-fixture)!important;min-width:var(--fs-crest-fixture)!important;max-width:var(--fs-crest-fixture)!important;height:38px!important;min-height:38px!important;max-height:38px!important;flex:0 0 var(--fs-crest-fixture)!important}
body.fs-app .fs-stadium-crest{width:clamp(46px,6vw,66px)!important;min-width:clamp(46px,6vw,66px)!important;height:clamp(50px,7vw,72px)!important}
/* Clearer formation controls, without changing selectors, drag, or save handlers. */
#lineup-app .lineup-controls{display:flex;flex-wrap:wrap;gap:12px;align-items:end}
#lineup-app .lineup-controls>label{flex:1 1 160px;min-width:0}
#lineup-app .lineup-controls select{width:100%;min-height:44px}
#lineup-app .lineup-action-buttons{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}
#lineup-app .lineup-action-buttons .btn{flex:1 1 190px;min-height:48px}
#lineup-app #lineup-message:not(:empty){padding:12px 14px;margin-top:12px;border-radius:10px;line-height:1.4}
#lineup-app #lineup-message.form-ok:not(:empty){border:1px solid #4db78b;background:rgba(24,100,73,.22)}
#lineup-app #lineup-message.form-error:not(:empty){border:1px solid #e27575;background:rgba(120,30,30,.24)}
#lineup-app .bench-slots{scroll-margin-bottom:125px}
/* Desktop layout: wider content, readable fixture rows and stable centered navigation. */
@media(min-width:900px){
 body.fs-app .fs-shell{max-width:1160px!important;margin-left:auto!important;margin-right:auto!important}
 body.fs-app .fs-shell>.fs-tiles{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:18px!important}
 body.fs-app .fs-shell>.fs-area-hero{margin-bottom:24px!important}
 body.fs-app .fs-stadium-crest{width:64px!important;min-width:64px!important;height:70px!important}
 body.fs-app #formazioni-pubbliche .fs-competition-crest{width:34px!important;min-width:34px!important;max-width:34px!important}
 #lineup-app .lineup-controls>label{flex:0 1 260px}
}
@media(max-width:420px){#lineup-app .lineup-action-buttons{gap:9px}#lineup-app .lineup-action-buttons .btn{flex:1 1 100%;min-height:48px}}
@media(prefers-reduced-motion:reduce){body.fs-app .fs-stadium-crest img{transition:none!important}}
