/* Football Kit Encyclopedia v3.7.10.2
 * Shared Team + Story structure repair.
 * Applies by entity type, never by URL/slug.
 */

/* ---------- TEAM / NATIONAL-STYLE KIT TIMELINES ---------- */
/* Four comfortable desktop columns are safer than a six-card strip. The
   timeline wraps inside its panel, so no final card can be clipped by the
   global 960px detail rail. */
body.single-team .fke-team-profile>.fke-kit-timeline{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
}
body.single-team .fke-team-profile>.fke-kit-timeline>ol{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  grid-auto-flow:row!important;
  gap:10px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:14px 0 0!important;
  padding:0!important;
  overflow:visible!important;
}
body.single-team .fke-team-profile>.fke-kit-timeline>ol>li{
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
body.single-team .fke-team-profile>.fke-kit-timeline>ol>li>a{
  display:block!important;
  min-width:0!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
}

/* ---------- TEAM KNOWLEDGE GRAPH ---------- */
/* The player group is a true full-width navigation layer. Secondary entity
   groups sit below it instead of competing with it for half-page columns. */
body.single-team .fke-team-profile__relations{
  overflow:hidden!important;
}
body.single-team .fke-team-profile__relations-primary{
  width:100%!important;
  min-width:0!important;
  margin:0 0 12px!important;
}
body.single-team .fke-team-profile__relations-primary>.fke-related-entities{
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
body.single-team .fke-team-profile__relations-primary>.fke-related-entities>h2{
  margin:0 0 10px!important;
  font-size:22px!important;
  line-height:1.1!important;
}
body.single-team .fke-team-profile__relations-primary .fke-related-entities__grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  align-items:stretch!important;
}
body.single-team .fke-team-profile__relations-primary .fke-player-card.is-compact{
  height:112px!important;
  min-height:112px!important;
  max-height:112px!important;
}
body.single-team .fke-team-profile__relations-primary .fke-player-card.is-compact .fke-entity-card__link{
  display:grid!important;
  grid-template-columns:66px minmax(0,1fr)!important;
  gap:11px!important;
  min-height:0!important;
  height:100%!important;
  padding:10px!important;
  align-items:center!important;
}
body.single-team .fke-team-profile__relations-primary .fke-player-card.is-compact .fke-player-card__media{
  width:66px!important;
  height:66px!important;
  min-width:66px!important;
  min-height:66px!important;
  flex:0 0 66px!important;
  border-radius:11px!important;
}
body.single-team .fke-team-profile__relations-primary .fke-player-card.is-compact .fke-entity-card__body{
  display:flex!important;
  min-width:0!important;
  height:100%!important;
  padding:0!important;
  flex-direction:column!important;
  justify-content:center!important;
  align-items:flex-start!important;
  gap:2px!important;
}
body.single-team .fke-team-profile__relations-primary .fke-player-card.is-compact h3{
  display:-webkit-box!important;
  margin:0!important;
  overflow:hidden!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  white-space:normal!important;
  font-size:18px!important;
  line-height:1.08!important;
}
body.single-team .fke-team-profile__relations-primary .fke-player-card.is-compact .fke-player-card__meta-line{
  margin:0!important;
  font-size:10.5px!important;
  line-height:1.25!important;
}
body.single-team .fke-team-profile__relations-primary .fke-player-card.is-compact strong{
  margin-top:auto!important;
  font-size:10.5px!important;
}
body.single-team .fke-team-profile__relations-summary{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  align-items:start!important;
}
body.single-team .fke-team-profile__relations-summary>.fke-relation-card{
  width:100%!important;
  min-width:0!important;
  margin:0!important;
}
body.single-team .fke-team-profile__relations-summary>.fke-relation-card:only-child{
  grid-column:auto!important;
}

/* ---------- STORY KNOWLEDGE GRAPH ---------- */
/* Team/player groups get the whole line, but their cards stay compact. A
   single linked club therefore looks like a navigation card, not a giant
   half-page blank panel. */
body.single-story .fke-story-profile__context{
  overflow:hidden!important;
}
body.single-story .fke-story-profile__context-primary{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:12px!important;
  width:100%!important;
  min-width:0!important;
}
body.single-story .fke-story-profile__context-primary>.fke-related-entities{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
body.single-story .fke-story-profile__context-primary>.fke-related-entities>h2{
  margin:0 0 10px!important;
  font-size:22px!important;
  line-height:1.1!important;
}
body.single-story .fke-story-profile__context-primary .fke-related-entities__grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(230px,280px))!important;
  gap:10px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  justify-content:start!important;
  align-items:stretch!important;
}
body.single-story .fke-story-profile__context-primary .fke-entity-card.is-compact{
  width:100%!important;
  min-width:0!important;
  height:112px!important;
  min-height:112px!important;
  max-height:112px!important;
}
body.single-story .fke-story-profile__context-primary .fke-entity-card.is-compact .fke-entity-card__link{
  display:grid!important;
  grid-template-columns:66px minmax(0,1fr)!important;
  gap:11px!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  padding:10px!important;
  align-items:center!important;
  box-sizing:border-box!important;
}
body.single-story .fke-story-profile__context-primary .fke-team-card.is-compact .fke-team-card__mark,
body.single-story .fke-story-profile__context-primary .fke-player-card.is-compact .fke-player-card__media{
  width:66px!important;
  height:66px!important;
  min-width:66px!important;
  min-height:66px!important;
  max-width:66px!important;
  max-height:66px!important;
  flex:0 0 66px!important;
  margin:0!important;
  border-radius:11px!important;
}
body.single-story .fke-story-profile__context-primary .fke-team-card.is-compact .fke-team-card__mark img,
body.single-story .fke-story-profile__context-primary .fke-player-card.is-compact .fke-player-card__media img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
}
body.single-story .fke-story-profile__context-primary .fke-player-card.is-compact .fke-player-card__media img{
  object-fit:cover!important;
}
body.single-story .fke-story-profile__context-primary .fke-entity-card.is-compact .fke-entity-card__body{
  display:flex!important;
  min-width:0!important;
  height:100%!important;
  padding:0!important;
  flex-direction:column!important;
  justify-content:center!important;
  align-items:flex-start!important;
  gap:2px!important;
}
body.single-story .fke-story-profile__context-primary .fke-entity-card.is-compact h3{
  display:-webkit-box!important;
  margin:0!important;
  overflow:hidden!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  white-space:normal!important;
  font-size:18px!important;
  line-height:1.08!important;
}
body.single-story .fke-story-profile__context-primary .fke-entity-card.is-compact :is(.fke-relation-card__secondary,.fke-player-card__meta-line){
  margin:0!important;
  font-size:10.5px!important;
  line-height:1.25!important;
}
body.single-story .fke-story-profile__context-primary .fke-entity-card.is-compact strong{
  margin-top:auto!important;
  font-size:10.5px!important;
}
body.single-story .fke-story-profile__context-summary{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr))!important;
  gap:10px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin-top:12px!important;
  align-items:start!important;
}
body.single-story .fke-story-profile__context-summary>.fke-relation-card{
  width:100%!important;
  min-width:0!important;
  margin:0!important;
}

@media(max-width:900px){
  body.single-team .fke-team-profile>.fke-kit-timeline>ol{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.single-team .fke-team-profile__relations-primary .fke-related-entities__grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.single-team .fke-team-profile__relations-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:640px){
  body.single-team .fke-team-profile__relations-primary .fke-related-entities__grid,
  body.single-team .fke-team-profile__relations-summary{grid-template-columns:1fr!important}
  body.single-story .fke-story-profile__context-primary .fke-related-entities__grid{grid-template-columns:1fr!important}
}
@media(max-width:560px){
  body.single-team .fke-team-profile>.fke-kit-timeline>ol{
    display:flex!important;
    gap:10px!important;
    padding:0 2px 7px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
  }
  body.single-team .fke-team-profile>.fke-kit-timeline>ol>li{
    flex:0 0 168px!important;
    width:168px!important;
    min-width:168px!important;
  }
}
