/* 5.17.302 — Últimos 10 partidos: the mobile Main's shared name/crest/score
   row, scoped to club profiles. Keep the DOM, match links, Nunito 550, scores,
   dates, TV, incidents and text scorers. Desktop mouse layouts stay intact. */
@media (max-width:1024px), (hover:none) and (pointer:coarse) {
  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match {
    min-height:0!important;
    row-gap:3px!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match > .ms-compact-scoreline {
    display:grid!important;
    grid-template-columns:minmax(0,1fr) max-content minmax(40px,max-content) minmax(20px,max-content) max-content minmax(0,1fr)!important;
    grid-template-rows:auto auto auto!important;
    grid-template-areas:none!important;
    align-items:center!important;
    column-gap:4px!important;
    row-gap:0!important;
    min-height:0!important;
    height:auto!important;
    width:100%!important;
    overflow:visible!important;
  }

  /* Non-interactive wrappers no longer reserve a separate name/crest row. */
  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match > .ms-compact-scoreline > :is(span.is-home,span.is-away,.ms-compact-center),
  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match > .ms-compact-scoreline > .ms-compact-center > .ms-compact-center-stack {
    display:contents!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match > .ms-compact-scoreline .ms-compact-team-copy {
    display:contents!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match > .ms-compact-scoreline .ms-compact-team-copy > strong {
    display:block!important;
    grid-row:1!important;
    align-self:center!important;
    justify-self:stretch!important;
    height:auto!important;
    min-height:0!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match > .ms-compact-scoreline .ms-compact-team-name {
    display:block!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    text-overflow:clip!important;
    white-space:normal!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
    -webkit-line-clamp:unset!important;
    padding:0!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match > .ms-compact-scoreline > span.is-home > .ms-compact-team-copy > strong {
    grid-column:1!important;
    grid-row:1!important;
    text-align:right!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match > .ms-compact-scoreline > span.is-away > .ms-compact-team-copy > strong {
    grid-column:6!important;
    grid-row:1!important;
    text-align:left!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match .is-home .ms-compact-team-name {
    text-align:right!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match .is-away .ms-compact-team-name {
    text-align:left!important;
  }

  /* Country flags get their own row alongside penalties, never above the
     name's center or over the scorers in international matches. */
  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match .ms-compact-team-country {
    grid-row:2!important;
    align-self:start!important;
    width:max-content!important;
    margin:2px 0 0!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match .is-home .ms-compact-team-country {
    grid-column:1 / 3!important;
    justify-self:end!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match .is-away .ms-compact-team-country {
    grid-column:5 / 7!important;
    justify-self:start!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match > .ms-compact-scoreline > span.is-home > .ms-compact-crest-wrap {
    grid-column:2!important;
    grid-row:1!important;
    align-self:center!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match > .ms-compact-scoreline > span.is-away > .ms-compact-crest-wrap {
    grid-column:5!important;
    grid-row:1!important;
    align-self:center!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match .ms-compact-center-stack > * {
    grid-column:3 / 5!important;
    justify-self:center!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match .ms-compact-center-stack > .ms-compact-score-row {
    grid-row:1!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    align-self:center!important;
    position:relative!important;
    box-sizing:content-box!important;
    width:max-content!important;
    min-width:0!important;
    min-height:0!important;
    padding:0!important;
    margin:0!important;
  }

  /* Actual VAR/red artwork participates in the row's size, clear of crests. */
  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match.has-ms-incidents .ms-compact-center-stack > .ms-compact-score-row {
    display:grid!important;
    grid-template-columns:18px max-content 18px!important;
    column-gap:2px!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match.has-ms-incidents .ms-compact-score-row > .ms-compact-score-pill {
    grid-column:2!important;
    grid-row:1!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match .ms-compact-score-row > .ms-compact-red-rail {
    position:absolute!important;
    inset:auto!important;
    top:50%!important;
    transform:translateY(-50%)!important;
    width:18px!important;
    min-width:18px!important;
    min-height:0!important;
    height:auto!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match.has-ms-incidents .ms-compact-score-row > .ms-compact-red-rail {
    position:static!important;
    transform:none!important;
    grid-row:1!important;
    align-self:center!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match.has-ms-incidents .ms-compact-score-row > .ms-compact-red-rail.is-home {
    grid-column:1!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match.has-ms-incidents .ms-compact-score-row > .ms-compact-red-rail.is-away {
    grid-column:3!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match .ms-compact-center-stack > .ms-compact-pen-score {
    grid-row:2!important;
    margin:0!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match .ms-compact-center-stack > .ms-compact-pen-score:empty {
    display:none!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match .ms-compact-center-stack > .ms-match-status-chip {
    grid-row:3!important;
    align-self:start!important;
    margin:2px 0 0!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match .ms-compact-center-stack > .ms-compact-aggregate {
    grid-row:4!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match > .ms-compact-scoreline > span.is-home > .ms-compact-team-goals {
    grid-column:1 / 3!important;
    grid-row:3!important;
    align-self:start!important;
    justify-self:stretch!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match > .ms-compact-scoreline > span.is-away > .ms-compact-team-goals {
    grid-column:5 / 7!important;
    grid-row:3!important;
    align-self:start!important;
    justify-self:stretch!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match > .ms-compact-footer {
    min-height:0!important;
    margin-top:1px!important;
  }
}

/* Use the Main's available phone width rather than squeezing the names into
   the profile's inset text column. The rest of the profile keeps its spacing. */
@media (max-width:680px) {
  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten {
    margin-inline:-18px!important;
  }
}

@media (max-width:380px) {
  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match > .ms-compact-scoreline {
    column-gap:3px!important;
  }

  /* Match the Main's narrow-phone scale without changing Nunito's 550 axis. */
  html:not(#tessirve-team-weight-296-disabled):not(#tessirve-team-weight-296-legacy) body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match .ms-compact-team-name {
    font-size:clamp(12.64px,4vw,15.2px)!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match .ms-compact-crest-wrap {
    width:24px!important;
    min-width:24px!important;
    height:24px!important;
    min-height:24px!important;
  }

  body.tessirve-theme.single-ms_team .ms-app.ms-team-profile .ms-team-last-ten .ms-compact-match .ms-compact-crest-wrap :is(img,.ms-crest,.ms-crest-fallback) {
    width:24px!important;
    max-width:24px!important;
    height:24px!important;
    max-height:24px!important;
  }
}
