/* El Contraataque · Match Surfaces v20
 * Eventos y Comunidad consumen el mismo fixture canónico que la porra.
 * El editor de porra gana contexto y elimina la duplicación visual de escudos.
 */

@media (max-width: 860px), (pointer: coarse) {
  .community-v20-match {
    display: grid;
    gap: 0.38rem;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(190, 124, 19, 0.34);
    border-radius: 1.05rem;
    padding: 0.72rem;
    color: #17130f;
    background:
      radial-gradient(circle at 80% 0%, rgba(207, 145, 38, 0.10), transparent 9rem),
      #fff;
    box-shadow: 0 0.42rem 1.1rem rgba(46, 34, 13, 0.045);
    text-align: left;
  }

  .community-v20-match.is-live {
    border-color: rgba(194, 37, 47, 0.32);
  }

  .community-v20-match__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .community-v20-match__topline em {
    border-radius: 999px;
    padding: 0.24rem 0.46rem;
    color: #8c5909;
    background: #fff2d7;
    font-size: 0.52rem;
    font-style: normal;
    font-weight: 950;
    letter-spacing: 0.04em;
  }

  .community-v20-match.is-live .community-v20-match__topline em {
    color: #fff;
    background: #d52030;
  }

  .community-v20-match__topline small {
    overflow: hidden;
    color: #837b70;
    font-size: 0.55rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .community-v20-match__competition {
    color: #a4670d;
    font-size: 0.56rem;
    font-weight: 950;
    letter-spacing: 0.055em;
    text-transform: uppercase;
  }

  .community-v20-match__teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 3.6rem minmax(0, 1fr);
    align-items: center;
    gap: 0.42rem;
    padding: 0.28rem 0 0.12rem;
  }

  .community-v20-match__teams > span {
    display: grid;
    min-width: 0;
    gap: 0.26rem;
    justify-items: center;
    text-align: center;
  }

  .community-v20-match__teams .fixture-team-logo,
  .community-v20-match__teams img {
    width: 3.25rem;
    height: 3.25rem;
    object-fit: contain;
  }

  .community-v20-match__teams strong {
    max-width: 100%;
    overflow: hidden;
    font-size: 0.68rem;
    line-height: 1.08;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .community-v20-match__teams > b {
    color: #9a610a;
    font-size: 1.08rem;
    text-align: center;
  }

  .community-v20-match__bottom {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.46rem;
    margin: 0.22rem -0.72rem -0.72rem;
    border-top: 1px solid rgba(36, 30, 21, 0.065);
    padding: 0.56rem 0.72rem;
    background: #fbf8f1;
  }

  .community-v20-match__bottom > span {
    color: #9a610a;
    font-size: 0.61rem;
    font-weight: 900;
  }

  .community-v20-match__bottom small {
    overflow: hidden;
    color: #837b70;
    font-size: 0.54rem;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .community-v20-match__bottom i {
    color: #a66a0d;
    font-size: 1.2rem;
    font-style: normal;
  }

  .community-v20-match.is-compact {
    grid-template-columns: 1fr;
  }

  .community-v20-match.is-compact .community-v20-match__teams {
    padding-block: 0.08rem;
  }

  .community-v20-match.is-compact .community-v20-match__teams .fixture-team-logo,
  .community-v20-match.is-compact .community-v20-match__teams img {
    width: 2.8rem;
    height: 2.8rem;
  }

  /* Editor de porra: un único bloque de escudos arriba. */
  .prediction-hub-sheet--v20 .prediction-hub-sheet__form .prediction-score-team > .prediction-team-crest,
  .prediction-hub-sheet--v20 .prediction-hub-sheet__form .prediction-score-team > :is(.fixture-team-logo, img):first-child {
    display: none !important;
  }

  .prediction-hub-sheet--v20 .prediction-hub-sheet__form .prediction-score-card {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .prediction-hub-sheet--v20 .prediction-hub-sheet__form .prediction-score-card__head {
    margin-bottom: 0.35rem;
    border: 0;
    padding-inline: 0;
    background: transparent;
  }

  .prediction-hub-sheet--v20 .prediction-hub-sheet__form .prediction-scoreboard {
    border: 1px solid rgba(35, 30, 22, 0.075);
    border-radius: 1rem;
    padding: 0.74rem 0.58rem;
    background: #fcfaf5;
  }

  .prediction-hub-sheet--v20 .prediction-hub-sheet__form .prediction-score-team {
    gap: 0.36rem;
  }

  .prediction-hub-sheet--v20 .prediction-hub-sheet__form .prediction-score-team > strong {
    color: #625b52;
    font-size: 0.64rem;
  }

  .prediction-v20-insights {
    display: grid;
    gap: 0.56rem;
    margin: 0 0.72rem 0.68rem;
    border: 1px solid rgba(35, 30, 22, 0.075);
    border-radius: 1rem;
    padding: 0.66rem;
    background: #fffdf8;
  }

  .prediction-v20-insights__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid rgba(35, 30, 22, 0.065);
    border-radius: 0.78rem;
    background: #fff;
  }

  .prediction-v20-insights__summary > div {
    display: grid;
    min-width: 0;
    gap: 0.08rem;
    justify-items: center;
    padding: 0.52rem 0.2rem;
    text-align: center;
  }

  .prediction-v20-insights__summary > div + div {
    border-left: 1px solid rgba(35, 30, 22, 0.06);
  }

  .prediction-v20-insights__summary strong {
    color: #9c6209;
    font-size: 0.94rem;
    line-height: 1;
  }

  .prediction-v20-insights__summary small {
    max-width: 100%;
    overflow: hidden;
    color: #81796e;
    font-size: 0.49rem;
    line-height: 1.08;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .prediction-v20-consensus {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.28rem 0.4rem;
    align-items: end;
  }

  .prediction-v20-consensus > div {
    display: grid;
    min-width: 0;
    gap: 0.05rem;
    text-align: center;
  }

  .prediction-v20-consensus span {
    overflow: hidden;
    color: #797168;
    font-size: 0.5rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .prediction-v20-consensus strong {
    color: #201c17;
    font-size: 0.72rem;
  }

  .prediction-v20-consensus__bar {
    display: grid !important;
    grid-column: 1 / -1;
    grid-template-columns: auto auto auto;
    height: 0.3rem;
    overflow: hidden !important;
    border-radius: 999px;
    background: #ece7dc;
  }

  .prediction-v20-consensus__bar i {
    display: block;
    width: calc(var(--p, 0) * 1%);
    min-width: calc(var(--p, 0) * 1%);
    height: 100%;
    background: currentColor;
  }

  .prediction-v20-consensus__bar i:nth-child(1) { color: #b97a16; }
  .prediction-v20-consensus__bar i:nth-child(2) { color: #b7b0a6; }
  .prediction-v20-consensus__bar i:nth-child(3) { color: #4d79a7; }

  .prediction-v20-popular {
    display: flex;
    gap: 0.32rem;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .prediction-v20-popular::-webkit-scrollbar { display: none; }

  .prediction-v20-popular > span {
    flex: 0 0 auto;
    color: #9c6209;
    font-size: 0.52rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .prediction-v20-popular b {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.24rem;
    border: 1px solid rgba(196, 131, 25, 0.18);
    border-radius: 999px;
    padding: 0.26rem 0.46rem;
    color: #70480b;
    background: #fff8e9;
    font-size: 0.58rem;
  }

  .prediction-v20-popular b small {
    color: #8a8175;
    font-size: 0.48rem;
    font-weight: 700;
  }

  .prediction-v20-insights__empty {
    margin: 0;
    color: #80786e;
    font-size: 0.56rem;
    line-height: 1.35;
    text-align: center;
  }

  @media (max-width: 390px) {
    .community-v20-match__teams .fixture-team-logo,
    .community-v20-match__teams img {
      width: 2.9rem;
      height: 2.9rem;
    }

    .community-v20-match__bottom {
      grid-template-columns: max-content minmax(0, 1fr) auto;
    }

    .prediction-v20-insights {
      margin-inline: 0.55rem;
    }
  }
}
