/* V55 — Matchday control room with fully contained lineup sprites.
   A viewport-locked information hierarchy layered over the existing match preview. */

body.v20-ui:has(#screenMatchday.is-active),
body.v20-ui #gameFrame:has(> #screenMatchday.is-active){
  height:100vh!important;
  min-height:0!important;
  overflow:hidden!important;
}

#screenMatchday.is-active{
  --md-ink:#10253e;
  --md-muted:#60738a;
  --md-blue:#1c5e92;
  --md-cyan:#42a4b4;
  --md-line:#d9e3ec;
  --md-panel:#fcfdfe;
  --md-soft:#f2f6f9;
  display:flex!important;
  flex-direction:column!important;
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
  background:linear-gradient(145deg,#eef3f7 0,#f8fafc 48%,#edf2f6 100%)!important;
}

#screenMatchday .matchday-topbar{
  position:relative!important;
  flex:0 0 var(--md-nav-height)!important;
  height:var(--md-nav-height)!important;
  min-height:0!important;
}

#screenMatchday .matchday-shell-v2{
  position:relative!important;
  flex:1 1 auto!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  padding:10px clamp(12px,1vw,22px) 12px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:clamp(50px,5.3vh,62px) minmax(0,1.42fr) minmax(0,1fr) clamp(88px,10.3vh,112px)!important;
  gap:10px!important;
  align-content:stretch!important;
  overflow:hidden!important;
}

/* Restrained chrome: fewer heavy weights, softer colour, clearer separation. */
#screenMatchday .matchday-heading-v2{
  min-height:0!important;
  height:100%!important;
  padding:8px 20px!important;
  border:1px solid #d8e2eb!important;
  border-radius:9px!important;
  background:rgba(252,253,254,.92)!important;
  box-shadow:0 8px 24px rgba(28,54,79,.045)!important;
}
#screenMatchday .matchday-heading-v2>div:first-child>span{
  color:#37879a!important;
  font-weight:700!important;
  font-size:10px!important;
  letter-spacing:.12em!important;
}
#screenMatchday .matchday-heading-v2 h2{
  margin-top:2px!important;
  font-size:clamp(20px,1.25vw,25px)!important;
  font-weight:800!important;
  letter-spacing:-.02em!important;
}
#screenMatchday .matchday-competition{
  color:#687c92!important;
  font-size:11px!important;
  font-weight:600!important;
  letter-spacing:.045em!important;
}

/* The preview remains the visual anchor; only the surrounding density changes. */
#screenMatchday .matchday-stage-v2{
  height:100%!important;
  min-height:0!important;
  grid-template-columns:minmax(225px,19.5%) minmax(0,1fr) minmax(225px,19.5%)!important;
  gap:10px!important;
  overflow:hidden!important;
}
#screenMatchday .matchday-stage-v2>.matchday-lineup-panel.home{grid-column:1!important;grid-row:1!important}
#screenMatchday .matchday-stage-v2>.matchday-centre-card{
  grid-column:2!important;
  grid-row:1!important;
  height:100%!important;
  min-height:0!important;
}
#screenMatchday .matchday-stage-v2>.matchday-lineup-panel.away{grid-column:3!important;grid-row:1!important}
#screenMatchday .matchday-lineup-panel{
  height:100%!important;
  min-height:0!important;
  padding:14px 16px 12px!important;
  border-radius:10px!important;
  border-color:#d8e2eb!important;
  background:rgba(252,253,254,.95)!important;
  box-shadow:0 10px 28px rgba(24,49,73,.055)!important;
}
#screenMatchday .matchday-lineup-panel:before{
  height:3px!important;
  background:linear-gradient(90deg,#1f658f,#5ba8b1)!important;
}
#screenMatchday .matchday-panel-kicker{
  flex:0 0 auto!important;
  padding-bottom:9px!important;
  font-size:10px!important;
  font-weight:700!important;
  letter-spacing:.065em!important;
}
#screenMatchday .matchday-lineup{
  display:grid!important;
  grid-template-rows:repeat(3,minmax(0,1fr))!important;
  overflow:hidden!important;
}
#screenMatchday .match-lineup-player{
  min-height:0!important;
  height:100%!important;
  grid-template-columns:clamp(46px,3.15vw,62px) minmax(0,1fr)!important;
  gap:clamp(8px,.65vw,13px)!important;
  padding:7px 0!important;
  flex:initial!important;
}
#screenMatchday .matchday-lineup-portrait{
  width:clamp(46px,3.15vw,62px)!important;
  height:clamp(52px,3.45vw,68px)!important;
  border-radius:6px!important;
}
#screenMatchday .match-lineup-player img{max-height:100%!important}
#screenMatchday .match-lineup-player>div{gap:2px!important}
#screenMatchday .match-lineup-player strong{
  font-size:clamp(12px,.72vw,15px)!important;
  font-weight:650!important;
}
#screenMatchday .match-lineup-player small{
  font-size:clamp(9px,.59vw,12px)!important;
  line-height:1.3!important;
}
#screenMatchday .match-lineup-player .matchday-player-role{font-weight:650!important}
#screenMatchday .matchday-edit-team{
  min-height:34px!important;
  margin-top:7px!important;
  padding:7px 9px!important;
  border-color:#9db8d0!important;
  color:#285d86!important;
  background:#f5f8fb!important;
  font-size:11px!important;
  font-weight:700!important;
}

/* Inward-facing, deliberately smaller sprites. Canonical standing art faces left.
   Scoped away from .md2-portrait (matchday-preview-redesign.css owns that layout
   entirely) so this legacy sizing can never collide with the new hero portraits. */
#screenMatchday .matchday-featured:not(.md2-portrait)>img{
  width:96%!important;
  height:128%!important;
  top:12%!important;
  transform-origin:center top!important;
}
#screenMatchday .matchday-featured.home:not(.md2-portrait)>img{
  left:-8%!important;
  right:auto!important;
  transform:scaleX(-1)!important;
}
#screenMatchday .matchday-featured.away:not(.md2-portrait)>img{
  right:-19%!important;
  left:auto!important;
  transform:scaleX(1)!important;
}

/* Open a cleaner name lane through the middle of the broadcast card. */
#screenMatchday .matchday-identity-row{
  width:67%!important;
  grid-template-columns:minmax(0,1fr) 48px minmax(0,1fr)!important;
  gap:14px!important;
}
#screenMatchday .matchday-team{
  grid-template-columns:minmax(0,1fr) 64px!important;
  column-gap:16px!important;
}
#screenMatchday .matchday-team.away{
  grid-template-columns:64px minmax(0,1fr)!important;
}
#screenMatchday .matchday-team.home .matchday-name{text-align:right!important}
#screenMatchday .matchday-team.home .matchday-name-word{
  margin-left:auto!important;
  transform-origin:right center!important;
}
#screenMatchday .matchday-team.away .matchday-name{
  padding-left:5px!important;
  text-align:left!important;
}
#screenMatchday .matchday-badge{
  width:64px!important;
  height:84px!important;
}
#screenMatchday .matchday-badge img{transform:scale(1.5)!important}

/* A slow broadcast-light sweep adds life without moving the layout or sprites. */
#screenMatchday .matchday-centre-card:before{
  content:''!important;
  display:block!important;
  position:absolute!important;
  z-index:4!important;
  top:-35%!important;
  bottom:-35%!important;
  left:-34%!important;
  width:24%!important;
  pointer-events:none!important;
  opacity:0!important;
  background:linear-gradient(90deg,transparent,rgba(115,222,255,.13),transparent)!important;
  filter:blur(8px)!important;
  transform:skewX(-20deg)!important;
  animation:md52AmbientSweep 10s cubic-bezier(.45,0,.55,1) infinite!important;
}
#screenMatchday .matchday-angle{
  animation:md52SignalBreath 6.5s ease-in-out infinite!important;
}
#screenMatchday .matchday-angle.away{animation-delay:-3.25s!important}
@keyframes md52AmbientSweep{
  0%,28%{left:-34%;opacity:0}
  37%{opacity:.55}
  62%{opacity:.24}
  72%,100%{left:112%;opacity:0}
}
@keyframes md52SignalBreath{
  0%,100%{filter:saturate(.88) brightness(.92)}
  50%{filter:saturate(1.03) brightness(1.06)}
}

/* Immersive mirrored team tunnels with shoulder-up player portraits. */
#screenMatchday .matchday-lineup-panel{
  padding:0 11px 10px!important;
  border-color:#153956!important;
  border-radius:11px!important;
  background:
    radial-gradient(circle at 50% -8%,rgba(62,167,186,.2),transparent 35%),
    linear-gradient(155deg,#071d34,#0a263e 54%,#06192d)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.06),0 10px 28px rgba(10,34,55,.13)!important;
}
#screenMatchday .matchday-lineup-panel.home{
  background:
    radial-gradient(circle at 100% 16%,rgba(42,176,192,.22),transparent 36%),
    linear-gradient(145deg,#06182b,#0a2940 58%,#071d33)!important;
}
#screenMatchday .matchday-lineup-panel.away{
  background:
    radial-gradient(circle at 0 16%,rgba(117,151,184,.2),transparent 36%),
    linear-gradient(215deg,#06182b,#0b273f 58%,#071d33)!important;
}
#screenMatchday .matchday-lineup-panel:before{
  height:3px!important;
  background:linear-gradient(90deg,#42a9b7,#72d0cf)!important;
  box-shadow:0 0 16px rgba(69,188,198,.38)!important;
}
#screenMatchday .matchday-lineup-panel.away:before{background:linear-gradient(90deg,#5b8aa7,#8ab9c6)!important}
#screenMatchday .matchday-panel-kicker{
  min-height:39px!important;
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  padding:3px 3px 0!important;
  border-bottom:1px solid rgba(146,190,211,.18)!important;
  color:#bad0df!important;
  font-size:10px!important;
  font-weight:700!important;
  letter-spacing:.09em!important;
}
#screenMatchday .matchday-panel-kicker:before{
  content:''!important;
  width:7px!important;
  height:7px!important;
  flex:0 0 7px!important;
  border:1px solid #81d8d7!important;
  border-radius:50%!important;
  background:#3ca5ad!important;
  box-shadow:0 0 9px rgba(88,216,217,.6)!important;
}
#screenMatchday .matchday-lineup{
  counter-reset:md52Lineup!important;
  width:100%!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:repeat(3,minmax(0,1fr))!important;
  justify-content:stretch!important;
  align-items:stretch!important;
  gap:7px!important;
  margin:0!important;
  padding:8px 0 7px!important;
  overflow:hidden!important;
}
#screenMatchday .match-lineup-player,
#screenMatchday .match-lineup-player:last-child{
  counter-increment:md52Lineup!important;
  position:relative!important;
  width:100%!important;
  min-width:0!important;
  min-height:0!important;
  height:100%!important;
  border:1px solid rgba(146,190,211,.18)!important;
  border-radius:8px!important;
  background:
    linear-gradient(105deg,rgba(255,255,255,.055),rgba(255,255,255,.018))!important;
  box-shadow:inset 0 1px rgba(255,255,255,.045),0 7px 17px rgba(0,9,20,.14)!important;
  transition:transform .18s ease,border-color .18s ease,background .18s ease!important;
  overflow:hidden!important;
}
#screenMatchday .match-lineup-player:before{
  content:''!important;
  position:absolute!important;
  inset:auto 0 0!important;
  width:auto!important;
  height:2px!important;
  border:0!important;
  background:linear-gradient(90deg,transparent,#49b7bf,transparent)!important;
  opacity:.48!important;
}
#screenMatchday .match-lineup-player:after{
  content:'0' counter(md52Lineup)!important;
  position:absolute!important;
  top:9px!important;
  right:10px!important;
  color:#8facbd!important;
  font:700 9px/1 Arial,sans-serif!important;
  letter-spacing:.12em!important;
  opacity:.65!important;
}
#screenMatchday .matchday-lineup-panel.home .match-lineup-player{
  grid-template-columns:minmax(0,1fr) clamp(66px,4vw,80px)!important;
  gap:9px!important;
  padding:8px 7px 8px 12px!important;
  border-right:2px solid rgba(83,197,202,.68)!important;
  background:linear-gradient(270deg,rgba(48,145,158,.13),rgba(255,255,255,.025) 48%)!important;
}
#screenMatchday .matchday-lineup-panel.away .match-lineup-player{
  grid-template-columns:clamp(66px,4vw,80px) minmax(0,1fr)!important;
  gap:9px!important;
  padding:8px 12px 8px 7px!important;
  border-left:2px solid rgba(99,150,184,.72)!important;
  background:linear-gradient(90deg,rgba(62,117,160,.15),rgba(255,255,255,.025) 48%)!important;
}
#screenMatchday .matchday-lineup-panel.home .match-lineup-player:after{left:10px!important;right:auto!important}
#screenMatchday .matchday-lineup-panel.home .match-lineup-player>.matchday-lineup-portrait{
  grid-column:2!important;
  grid-row:1!important;
}
#screenMatchday .matchday-lineup-panel.home .match-lineup-player>div{
  grid-column:1!important;
  grid-row:1!important;
  align-items:flex-end!important;
  text-align:right!important;
}
#screenMatchday .matchday-lineup-panel.away .match-lineup-player>.matchday-lineup-portrait{grid-column:1!important;grid-row:1!important}
#screenMatchday .matchday-lineup-panel.away .match-lineup-player>div{grid-column:2!important;grid-row:1!important}
#screenMatchday .matchday-lineup-portrait{
  position:relative!important;
  align-self:stretch!important;
  width:clamp(66px,4vw,80px)!important;
  height:100%!important;
  min-height:68px!important;
  padding:0!important;
  border:0!important;
  border-radius:6px!important;
  overflow:hidden!important;
  background:
    radial-gradient(circle at 50% 78%,rgba(85,190,194,.25),transparent 46%),
    linear-gradient(165deg,#133650,#081b2f)!important;
  box-shadow:inset 0 0 0 1px rgba(143,204,218,.22)!important;
}
#screenMatchday .matchday-lineup-panel.away .matchday-lineup-portrait{
  background:
    radial-gradient(circle at 50% 78%,rgba(111,156,191,.24),transparent 46%),
    linear-gradient(195deg,#14334c,#081b2f)!important;
}
#screenMatchday .match-lineup-player img{
  position:absolute!important;
  top:-5%!important;
  left:50%!important;
  width:185%!important;
  height:218%!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:contain!important;
  object-position:center top!important;
  image-rendering:pixelated!important;
  background:none!important;
  border:0!important;
  border-radius:0!important;
  filter:drop-shadow(0 4px 6px rgba(0,0,0,.32))!important;
  transform-origin:center top!important;
}
#screenMatchday .matchday-lineup-panel.home .match-lineup-player img{transform:translateX(-50%) scaleX(-1)!important}
#screenMatchday .matchday-lineup-panel.away .match-lineup-player img{transform:translateX(-50%) scaleX(1)!important}
#screenMatchday .match-lineup-player>div{
  justify-content:center!important;
  gap:4px!important;
  padding-top:10px!important;
}
#screenMatchday .match-lineup-player strong{
  color:#f0f7fb!important;
  font-size:clamp(12px,.72vw,15px)!important;
  font-weight:700!important;
  line-height:1.15!important;
  text-decoration:none!important;
}
#screenMatchday .match-lineup-player small{
  color:#9eb5c5!important;
  font-size:clamp(9px,.55vw,11px)!important;
  line-height:1.25!important;
}
#screenMatchday .match-lineup-player.knowledge-unknown small,
#screenMatchday .match-lineup-player.knowledge-limited small{color:#c5ad7b!important}
#screenMatchday .match-lineup-player .matchday-player-role{
  width:max-content!important;
  margin:1px 0!important;
  padding:3px 7px!important;
  border:1px solid rgba(96,198,200,.2)!important;
  border-radius:3px!important;
  color:#9ee1df!important;
  background:rgba(48,137,146,.18)!important;
  font-size:9px!important;
  font-weight:700!important;
  letter-spacing:.055em!important;
}
#screenMatchday .matchday-lineup-panel.away .match-lineup-player .matchday-player-role{
  border-color:rgba(126,170,203,.22)!important;
  color:#b6d1e2!important;
  background:rgba(64,111,148,.2)!important;
}
#screenMatchday .match-lineup-player:hover{
  border-color:rgba(112,207,210,.46)!important;
  background:linear-gradient(105deg,rgba(86,174,183,.14),rgba(255,255,255,.035))!important;
}
#screenMatchday .matchday-lineup-panel.home .match-lineup-player:hover{transform:translateX(2px)!important}
#screenMatchday .matchday-lineup-panel.away .match-lineup-player:hover{transform:translateX(-2px)!important}
#screenMatchday .match-lineup-player.is-unavailable{
  border-color:rgba(205,97,104,.45)!important;
  background:linear-gradient(105deg,rgba(154,44,55,.2),rgba(255,255,255,.02))!important;
}
#screenMatchday .matchday-edit-team{
  min-height:34px!important;
  margin:0!important;
  padding:7px 10px!important;
  border:1px solid rgba(105,194,204,.45)!important;
  border-radius:6px!important;
  color:#d4f4f3!important;
  background:linear-gradient(110deg,rgba(26,92,112,.8),rgba(35,119,127,.7))!important;
  box-shadow:inset 0 1px rgba(255,255,255,.08)!important;
}
#screenMatchday .matchday-edit-team:hover{
  color:#fff!important;
  border-color:#7dd7d6!important;
  background:linear-gradient(110deg,#1a6173,#277f84)!important;
}

/* V54 correction — light broadcast team sheets with true avatar crops. */
#screenMatchday .matchday-lineup-panel,
#screenMatchday .matchday-lineup-panel.home,
#screenMatchday .matchday-lineup-panel.away{
  padding:0 10px 10px!important;
  border:1px solid #cfdae4!important;
  border-radius:10px!important;
  background:
    radial-gradient(circle at 50% 0,rgba(55,137,158,.095),transparent 33%),
    linear-gradient(180deg,#f9fbfc,#eef3f7)!important;
  box-shadow:0 9px 24px rgba(22,52,76,.075),inset 0 1px #fff!important;
}
#screenMatchday .matchday-lineup-panel:before,
#screenMatchday .matchday-lineup-panel.away:before{
  height:3px!important;
  background:linear-gradient(90deg,#246787,#58a6aa)!important;
  box-shadow:none!important;
}
#screenMatchday .matchday-panel-kicker{
  min-height:40px!important;
  gap:8px!important;
  padding:3px 4px 0!important;
  border-bottom:1px solid #d8e2e9!important;
  color:#4b657c!important;
  font-size:10px!important;
  font-weight:700!important;
  letter-spacing:.075em!important;
}
#screenMatchday .matchday-panel-kicker:before{
  width:6px!important;
  height:6px!important;
  flex-basis:6px!important;
  border:0!important;
  background:#4c9da7!important;
  box-shadow:0 0 0 4px rgba(76,157,167,.1)!important;
}
#screenMatchday .matchday-lineup{
  width:100%!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:repeat(3,minmax(0,1fr))!important;
  justify-content:stretch!important;
  align-items:stretch!important;
  gap:7px!important;
  margin:0!important;
  padding:8px 0 7px!important;
}
#screenMatchday .match-lineup-player,
#screenMatchday .match-lineup-player:last-child{
  position:relative!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  gap:10px!important;
  padding:7px!important;
  border:1px solid #d5e0e8!important;
  border-radius:8px!important;
  background:rgba(255,255,255,.84)!important;
  box-shadow:0 3px 10px rgba(17,52,77,.035),inset 0 1px #fff!important;
  overflow:hidden!important;
}
#screenMatchday .matchday-lineup-panel.home .match-lineup-player{
  grid-template-columns:30px minmax(0,1fr) clamp(64px,3.7vw,74px)!important;
  padding:7px 7px 7px 9px!important;
  border-right:3px solid #55a9ad!important;
  background:linear-gradient(270deg,rgba(225,241,242,.84),rgba(255,255,255,.9) 48%)!important;
}
#screenMatchday .matchday-lineup-panel.away .match-lineup-player{
  grid-template-columns:clamp(64px,3.7vw,74px) minmax(0,1fr) 30px!important;
  padding:7px 9px 7px 7px!important;
  border-left:3px solid #6f95b0!important;
  background:linear-gradient(90deg,rgba(228,237,244,.9),rgba(255,255,255,.9) 48%)!important;
}
#screenMatchday .match-lineup-player:before{
  content:''!important;
  position:absolute!important;
  inset:auto 7px 0!important;
  width:auto!important;
  height:2px!important;
  background:linear-gradient(90deg,transparent,rgba(75,145,163,.38),transparent)!important;
  opacity:.7!important;
}
#screenMatchday .match-lineup-player:after{content:none!important}
#screenMatchday .matchday-lineup-number{
  display:grid!important;
  place-items:center!important;
  align-self:stretch!important;
  color:#8ca0b0!important;
  font:700 clamp(13px,.8vw,17px)/1 'Matchday Condensed','Arial Narrow',sans-serif!important;
  letter-spacing:.05em!important;
}
#screenMatchday .matchday-lineup-panel.home .matchday-lineup-number{grid-column:1!important;grid-row:1!important}
#screenMatchday .matchday-lineup-panel.away .matchday-lineup-number{grid-column:3!important;grid-row:1!important}
#screenMatchday .matchday-lineup-portrait,
#screenMatchday .matchday-lineup-panel.away .matchday-lineup-portrait{
  position:relative!important;
  align-self:stretch!important;
  width:clamp(64px,3.7vw,74px)!important;
  height:100%!important;
  min-height:66px!important;
  padding:0!important;
  border:1px solid #c9d9e3!important;
  border-radius:7px!important;
  overflow:hidden!important;
  background:
    radial-gradient(circle at 50% 78%,rgba(80,157,170,.2),transparent 46%),
    linear-gradient(165deg,#eff5f7,#dce8ed)!important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.62)!important;
}
#screenMatchday .matchday-lineup-panel.home .matchday-lineup-portrait{grid-column:3!important;grid-row:1!important}
#screenMatchday .matchday-lineup-panel.away .matchday-lineup-portrait{grid-column:1!important;grid-row:1!important}
#screenMatchday .match-lineup-player img.matchday-lineup-avatar{
  position:absolute!important;
  top:4px!important;
  left:4px!important;
  width:calc(100% - 8px)!important;
  height:calc(100% - 8px)!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:contain!important;
  object-position:center center!important;
  background:none!important;
  border:0!important;
  border-radius:0!important;
  filter:drop-shadow(0 3px 4px rgba(16,44,62,.18))!important;
  transform-origin:center center!important;
}
#screenMatchday .matchday-lineup-panel.home .match-lineup-player img.matchday-lineup-avatar{
  transform:scaleX(-1)!important;
}
#screenMatchday .matchday-lineup-panel.away .match-lineup-player img.matchday-lineup-avatar{
  transform:scaleX(1)!important;
}
#screenMatchday .match-lineup-player>div{
  justify-content:center!important;
  align-self:stretch!important;
  gap:4px!important;
  padding:0!important;
}
#screenMatchday .matchday-lineup-panel.home .match-lineup-player>div{
  grid-column:2!important;
  grid-row:1!important;
  align-items:flex-end!important;
  text-align:right!important;
}
#screenMatchday .matchday-lineup-panel.away .match-lineup-player>div{
  grid-column:2!important;
  grid-row:1!important;
  align-items:flex-start!important;
  text-align:left!important;
}
#screenMatchday .match-lineup-player strong{
  color:#18324b!important;
  font-size:clamp(12px,.76vw,15px)!important;
  font-weight:700!important;
  line-height:1.2!important;
  text-decoration:none!important;
}
#screenMatchday .match-lineup-player .matchday-player-role,
#screenMatchday .matchday-lineup-panel.away .match-lineup-player .matchday-player-role{
  width:max-content!important;
  margin:0!important;
  padding:3px 7px!important;
  border:0!important;
  border-radius:999px!important;
  color:#3a7780!important;
  background:#e5f0f1!important;
  font-size:9px!important;
  font-weight:700!important;
  letter-spacing:.04em!important;
}
#screenMatchday .matchday-lineup-panel.away .match-lineup-player .matchday-player-role{
  color:#586f86!important;
  background:#e8eef3!important;
}
#screenMatchday .matchday-player-meta{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:3px 6px!important;
  margin:0!important;
  padding:0!important;
  color:#687d90!important;
  font-size:10px!important;
  line-height:1.25!important;
}
#screenMatchday .matchday-lineup-panel.home .matchday-player-meta{justify-content:flex-end!important}
#screenMatchday .matchday-player-meta b{
  color:#405d76!important;
  font-size:10px!important;
  font-weight:700!important;
}
#screenMatchday .matchday-player-meta span:before{
  content:'';
  display:inline-block;
  width:3px;
  height:3px;
  margin:0 6px 2px 0;
  border-radius:50%;
  background:#70a5aa;
}
#screenMatchday .match-lineup-player.knowledge-unknown .matchday-player-meta,
#screenMatchday .match-lineup-player.knowledge-limited .matchday-player-meta,
#screenMatchday .match-lineup-player.knowledge-unknown .matchday-player-meta b,
#screenMatchday .match-lineup-player.knowledge-limited .matchday-player-meta b{color:#846d43!important}
#screenMatchday .match-lineup-player:hover{
  border-color:#aac5d2!important;
  background:#fff!important;
  box-shadow:0 6px 15px rgba(19,59,85,.075),inset 0 1px #fff!important;
}
#screenMatchday .matchday-lineup-panel.home .match-lineup-player:hover,
#screenMatchday .matchday-lineup-panel.away .match-lineup-player:hover{transform:translateY(-1px)!important}
#screenMatchday .match-lineup-player.is-unavailable{
  border-color:#dfb8bb!important;
  background:linear-gradient(90deg,#fff5f5,#fff)!important;
}
#screenMatchday .matchday-edit-team{
  min-height:34px!important;
  margin:0!important;
  padding:7px 10px!important;
  border:1px solid #9cb7ca!important;
  border-radius:6px!important;
  color:#285d78!important;
  background:#f8fafc!important;
  box-shadow:none!important;
}
#screenMatchday .matchday-edit-team:hover{
  color:#173e58!important;
  border-color:#659bad!important;
  background:#edf5f6!important;
}

/* Opposition report: overview on the left, actionable intelligence on the right. */
#screenMatchday .matchday-summary{
  height:100%!important;
  min-height:0!important;
  grid-template-columns:minmax(0,1.72fr) minmax(270px,.98fr)!important;
  gap:10px!important;
  overflow:hidden!important;
}
#screenMatchday .match-summary-card,
#screenMatchday .match-readiness{
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
  border-radius:10px!important;
  border-color:#d8e2eb!important;
  background:rgba(252,253,254,.96)!important;
  box-shadow:0 10px 28px rgba(24,49,73,.05)!important;
}
#screenMatchday .match-summary-card{
  display:grid!important;
  grid-template-columns:minmax(210px,.8fr) minmax(360px,1.45fr)!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  gap:9px 16px!important;
  padding:12px 14px!important;
}
#screenMatchday .match-summary-card>.match-occasion-strip{
  grid-column:1/-1!important;
  grid-row:1!important;
  min-height:0!important;
}
#screenMatchday .match-report-overview{
  grid-column:1!important;
  grid-row:2!important;
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
  gap:7px!important;
  padding-right:15px!important;
  border-right:1px solid #e0e7ed!important;
  overflow:hidden!important;
}
#screenMatchday .match-report-intelligence{
  grid-column:2!important;
  grid-row:2!important;
  min-width:0!important;
  min-height:0!important;
  display:grid!important;
  grid-template-rows:auto auto minmax(0,1fr)!important;
  align-content:stretch!important;
  gap:7px!important;
  overflow:hidden!important;
}
#screenMatchday .match-report-intelligence>.match-intel-note{grid-row:1!important}
#screenMatchday .match-report-intelligence>.match-narrative-context{grid-row:2!important}
#screenMatchday .match-report-intelligence>.match-opposition-personnel{grid-row:3!important}
#screenMatchday .match-preview-header{flex-wrap:nowrap!important}
#screenMatchday .match-preview-header>span,
#screenMatchday .match-readiness>span{
  color:#377f91!important;
  font-size:10px!important;
  font-weight:700!important;
  letter-spacing:.11em!important;
}
#screenMatchday .match-scout-state{
  padding:3px 7px!important;
  font-size:9px!important;
  font-weight:700!important;
  border-radius:999px!important;
}
#screenMatchday .match-opponent-title{
  display:grid!important;
  grid-template-columns:auto 1fr!important;
  gap:5px 7px!important;
  align-items:center!important;
}
#screenMatchday .match-opponent-title>strong{
  font-size:clamp(18px,1.08vw,22px)!important;
  font-weight:700!important;
  letter-spacing:-.02em!important;
}
#screenMatchday .match-opponent-title>small{
  justify-self:start!important;
  padding:3px 7px!important;
  font-size:9px!important;
}
#screenMatchday .match-preview-form{
  grid-column:1/-1!important;
  margin:0!important;
  gap:4px!important;
}
#screenMatchday .match-preview-form b{width:24px!important;height:24px!important;font-size:10px!important}
#screenMatchday .match-preview-form em{font-size:10px!important}
#screenMatchday .match-opponent-style{
  display:grid!important;
  grid-template-columns:auto 1fr!important;
  gap:5px 8px!important;
  margin:0!important;
}
#screenMatchday .match-opponent-style b{font-size:10px!important;font-weight:700!important}
#screenMatchday .match-opponent-style span{font-size:11px!important;line-height:1.4!important}
#screenMatchday .match-intel-note{
  display:grid!important;
  grid-template-columns:16px auto minmax(0,1fr)!important;
  gap:7px!important;
  min-height:0!important;
  padding:7px 9px!important;
  border-radius:6px!important;
}
#screenMatchday .match-intel-note span{font-size:9px!important;font-weight:700!important}
#screenMatchday .match-intel-note strong{font-size:10px!important;line-height:1.35!important;font-weight:500!important}
#screenMatchday .match-narrative-context{
  display:grid!important;
  grid-template-columns:auto auto minmax(0,1fr)!important;
  align-items:center!important;
  gap:5px 8px!important;
  min-height:0!important;
  padding:7px 9px!important;
  border-radius:6px!important;
}
#screenMatchday .match-narrative-context :is(span,small,strong){
  flex-basis:auto!important;
  font-size:10px!important;
  line-height:1.35!important;
}
#screenMatchday .match-narrative-context strong{font-weight:700!important}
#screenMatchday .match-occasion-strip{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:10px!important;
  padding:7px 10px!important;
}
#screenMatchday .match-occasion-strip>div{
  display:grid!important;
  grid-template-columns:auto auto minmax(0,1fr)!important;
  gap:5px 9px!important;
  align-items:center!important;
}
#screenMatchday .match-occasion-strip :is(span,small,strong,b){font-size:9px!important;line-height:1.3!important}
#screenMatchday .match-occasion-strip small{flex-basis:auto!important}
#screenMatchday .match-opposition-personnel{
  height:100%!important;
  min-height:0!important;
  grid-template-columns:minmax(0,1.25fr) minmax(0,.9fr)!important;
  gap:8px!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
}
#screenMatchday .opponent-manager-card,
#screenMatchday .match-opposition-personnel .match-key-player{
  height:100%!important;
  min-height:0!important;
  grid-template-columns:44px minmax(0,1fr)!important;
  gap:9px!important;
  padding:8px 9px!important;
  border-radius:6px!important;
  overflow:hidden!important;
}
#screenMatchday .opponent-manager-card{border-left-color:#3d799d!important}
#screenMatchday .opponent-manager-monogram{width:40px!important;height:40px!important;font-size:15px!important}
#screenMatchday .opponent-manager-copy{gap:2px!important}
#screenMatchday .opponent-manager-head{gap:3px 6px!important}
#screenMatchday .opponent-manager-head span,
#screenMatchday .match-key-player small{font-size:9px!important;line-height:1.25!important}
#screenMatchday .opponent-manager-head b{font-size:8px!important}
#screenMatchday .opponent-manager-copy>strong,
#screenMatchday .match-key-player strong{font-size:11px!important;font-weight:700!important}
#screenMatchday .opponent-manager-tactics{gap:4px!important}
#screenMatchday .opponent-manager-tactics em{font-size:9px!important;font-weight:600!important;line-height:1.15!important}
#screenMatchday .opponent-manager-tactics em small{font-size:8px!important;margin-bottom:1px!important}
#screenMatchday .opponent-manager-copy footer,
#screenMatchday .match-key-player em{font-size:9px!important;line-height:1.2!important}
#screenMatchday .match-key-player img{width:42px!important;height:58px!important}
#screenMatchday .match-key-player>span{gap:3px!important}

/* Staff advice reads like a calm briefing, not another heavy content box. */
#screenMatchday .match-readiness{
  gap:7px!important;
  padding:13px 15px!important;
  border-top:3px solid #4a8997!important;
}
#screenMatchday .match-readiness>p{
  margin:0!important;
  color:#52667c!important;
  font-size:11px!important;
  line-height:1.45!important;
}
#screenMatchday .match-tactical-current{
  min-height:0!important;
  margin:auto 0 0!important;
  padding:8px!important;
  gap:3px!important;
  background:#f1f5f8!important;
  border-color:#dae4ec!important;
}
#screenMatchday .match-tactical-current small{font-size:9px!important}
#screenMatchday .match-tactical-current strong{font-size:12px!important;font-weight:700!important}
#screenMatchday .match-readiness>strong{font-size:10px!important;font-weight:700!important;color:#37768d!important}
#screenMatchday .match-readiness>button{
  min-height:34px!important;
  padding:7px 10px!important;
  border:1px solid #315f7c!important;
  border-radius:6px!important;
  background:linear-gradient(120deg,#214b68,#2f7184)!important;
  font:700 14px/1.2 'Matchday Condensed','Arial Narrow',sans-serif!important;
  box-shadow:0 5px 12px rgba(29,76,103,.12)!important;
}

/* The match choices are a compact, fully visible closing rail. */
#screenMatchday .matchday-actions-v2{
  height:100%!important;
  min-height:0!important;
  grid-template-columns:minmax(230px,.72fr) minmax(280px,1fr) minmax(260px,.82fr)!important;
  gap:10px!important;
  padding:8px 10px!important;
  border:1px solid #d7e1e9!important;
  border-left:3px solid #397d91!important;
  border-radius:10px!important;
  overflow:hidden!important;
  background:rgba(252,253,254,.96)!important;
}
#screenMatchday .matchday-action-copy{
  grid-template-columns:42px minmax(0,1fr)!important;
  gap:3px 11px!important;
  padding:4px 6px!important;
}
#screenMatchday .matchday-action-copy>span{font-size:9px!important;font-weight:700!important}
#screenMatchday .matchday-action-copy>strong{font-size:10px!important;line-height:1.35!important;font-weight:500!important}
#screenMatchday .matchday-action-status-icon{width:42px!important;height:48px!important;padding:10px!important}
#screenMatchday .matchday-actions-v2>.match-action{
  min-height:0!important;
  height:100%!important;
  gap:11px!important;
  padding:10px 50px 10px 13px!important;
  border-color:#215c7d!important;
  border-radius:7px!important;
}
#screenMatchday .match-action-number{width:42px!important;height:42px!important;flex-basis:42px!important;font-size:23px!important}
#screenMatchday .match-action-label{gap:3px!important}
#screenMatchday .match-action-label>strong{font-size:clamp(19px,1.2vw,25px)!important}
#screenMatchday .match-action-label>small{font-size:10px!important;line-height:1.25!important}
#screenMatchday .match-action-symbol{right:11px!important;bottom:14px!important;width:31px!important;height:31px!important}
#screenMatchday .match-sim-lines{height:78px!important;top:4px!important}

@media(max-height:850px){
  #screenMatchday .matchday-shell-v2{
    padding-top:7px!important;
    padding-bottom:8px!important;
    gap:7px!important;
    grid-template-rows:44px minmax(0,1.45fr) minmax(0,.96fr) 78px!important;
  }
  #screenMatchday .matchday-heading-v2{padding:5px 16px!important}
  #screenMatchday .matchday-heading-v2 h2{font-size:19px!important}
  #screenMatchday .matchday-lineup-panel{padding:0 8px 8px!important}
  #screenMatchday .matchday-panel-kicker{min-height:32px!important;padding:2px 2px 0!important}
  #screenMatchday .matchday-lineup{gap:5px!important;padding:6px 0!important}
  #screenMatchday .matchday-lineup-panel.home .match-lineup-player{grid-template-columns:22px minmax(0,1fr) 58px!important;padding:5px!important}
  #screenMatchday .matchday-lineup-panel.away .match-lineup-player{grid-template-columns:58px minmax(0,1fr) 22px!important;padding:5px!important}
  #screenMatchday .matchday-lineup-portrait{height:100%!important;width:58px!important;min-height:54px!important}
  #screenMatchday .match-lineup-player>div{gap:2px!important;padding-top:7px!important}
  #screenMatchday .matchday-edit-team{min-height:29px!important;margin-top:4px!important;padding:5px!important}
  #screenMatchday .match-summary-card{padding:8px 10px!important;gap:6px 12px!important}
  #screenMatchday .match-report-overview{gap:4px!important}
  #screenMatchday .match-report-intelligence{gap:4px!important}
  #screenMatchday .match-occasion-strip{padding:5px 8px!important}
  #screenMatchday .match-intel-note,#screenMatchday .match-narrative-context{padding:5px 7px!important}
  #screenMatchday .opponent-manager-card,#screenMatchday .match-opposition-personnel .match-key-player{padding:5px 7px!important}
  #screenMatchday .match-readiness{padding:9px 12px!important;gap:4px!important}
  #screenMatchday .match-readiness>button{min-height:29px!important;padding:5px 8px!important}
  #screenMatchday .matchday-actions-v2{padding:6px 8px!important;gap:7px!important}
}

@media(max-width:1180px){
  #screenMatchday .matchday-stage-v2{grid-template-columns:minmax(190px,21%) minmax(0,1fr) minmax(190px,21%)!important}
  #screenMatchday .matchday-lineup-panel{padding-inline:10px!important}
  #screenMatchday .matchday-summary{grid-template-columns:minmax(0,1.6fr) minmax(235px,.8fr)!important}
  #screenMatchday .match-summary-card{grid-template-columns:minmax(180px,.75fr) minmax(310px,1.35fr)!important;gap-inline:10px!important}
  #screenMatchday .matchday-actions-v2{grid-template-columns:minmax(190px,.65fr) minmax(245px,1fr) minmax(220px,.8fr)!important}
}

@media(max-width:900px){
  #screenMatchday .matchday-topbar{flex-basis:70px!important;height:70px!important}
  #screenMatchday .matchday-utilities{display:none!important}
  #screenMatchday .matchday-stage-v2{grid-template-columns:155px minmax(0,1fr) 155px!important}
  #screenMatchday .match-lineup-player{gap:5px!important}
  #screenMatchday .matchday-lineup-panel.home .match-lineup-player{grid-template-columns:18px minmax(0,1fr) 50px!important}
  #screenMatchday .matchday-lineup-panel.away .match-lineup-player{grid-template-columns:50px minmax(0,1fr) 18px!important}
  #screenMatchday .matchday-lineup-portrait{width:50px!important;height:100%!important;min-height:48px!important}
  #screenMatchday .match-lineup-player small{font-size:8px!important}
  #screenMatchday .matchday-summary{grid-template-columns:minmax(0,1fr) 215px!important}
  #screenMatchday .match-summary-card{grid-template-columns:minmax(145px,.7fr) minmax(260px,1.3fr)!important}
  #screenMatchday .match-opposition-personnel{grid-template-columns:1fr!important}
  #screenMatchday .match-key-player{display:none!important}
  #screenMatchday .matchday-actions-v2{grid-template-columns:155px 1fr 1fr!important}
}

@media(prefers-reduced-motion:reduce){
  #screenMatchday .matchday-centre-card:before,
  #screenMatchday .matchday-angle{animation:none!important}
}
