/* El Contraataque · Porra Hub v12
 * Experiencia dedicada: cabecera y navegación propias, inspirada en apps de porras
 * pero usando la identidad clara/dorada de El Contraataque.
 */

@media (min-width: 0px) {
  /* UNIFIED_HEADER_V67: la cabecera global permanece visible en Porra. */
  /* Footer global, Más y su overlay pertenecen al AppShell. */
body.prediction-hub-mode .mobile-content {
    padding:
      0
      calc(0.72rem + env(safe-area-inset-right))
      calc(5.25rem + env(safe-area-inset-bottom))
      calc(0.72rem + env(safe-area-inset-left)) !important;
    scroll-padding-top: calc(5.2rem + env(safe-area-inset-top));
    scroll-padding-bottom: calc(5.6rem + env(safe-area-inset-bottom));
    background:
      radial-gradient(circle at 85% 0%, rgba(207, 145, 38, 0.12), transparent 18rem),
      #f6f3ec;
  }

  body.prediction-hub-mode #screen-predictions {
    min-height: 100%;
  }

  body.prediction-hub-mode #screen-predictions > .module-screen-head {
    display: none !important;
  }

  body.prediction-hub-mode #predictionList {
    width: 100%;
    margin: 0;
  }

  .prediction-hub-experience {
    width: 100%;
    min-width: 0;
  }

  .prediction-hub-header {
    position: sticky;
    top: 0;
    z-index: 38;
    display: grid;
    grid-template-columns: minmax(0, max-content) 1fr minmax(0, max-content);
    align-items: center;
    gap: 0.55rem;
    width: calc(100% + 1.44rem + env(safe-area-inset-left) + env(safe-area-inset-right));
    min-height: calc(4.45rem + env(safe-area-inset-top));
    margin-right: calc(-0.72rem - env(safe-area-inset-right));
    margin-left: calc(-0.72rem - env(safe-area-inset-left));
    padding:
      calc(0.55rem + env(safe-area-inset-top))
      calc(0.72rem + env(safe-area-inset-right))
      0.55rem
      calc(0.72rem + env(safe-area-inset-left));
    border-bottom: 1px solid rgba(34, 29, 20, 0.08);
    background: rgba(255, 255, 255, 0.965);
    box-shadow: 0 0.32rem 1.05rem rgba(44, 33, 14, 0.045);
    backdrop-filter: blur(20px) saturate(1.06);
    -webkit-backdrop-filter: blur(20px) saturate(1.06);
  }

  .prediction-hub-exit {
    display: inline-flex;
    min-height: 2.4rem;
    align-items: center;
    border: 1px solid rgba(36, 29, 18, 0.1);
    border-radius: 999px;
    padding: 0 0.72rem;
    color: #5d554a;
    background: #fff;
    font-size: 0.7rem;
    font-weight: 850;
    white-space: nowrap;
  }

  .prediction-hub-brand {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    text-align: center;
  }

  .prediction-hub-brand > span {
    display: grid;
    width: 2.05rem;
    height: 2.05rem;
    place-items: center;
    border-radius: 50%;
    background: #fbf5e8;
  }

  .prediction-hub-brand img {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
  }

  .prediction-hub-brand small,
  .prediction-hub-brand strong {
    display: block;
    line-height: 1;
  }

  .prediction-hub-brand small {
    color: #a4690e;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .prediction-hub-brand strong {
    margin-top: 0.13rem;
    color: #15120e;
    font-size: 1.02rem;
    font-weight: 1000;
    letter-spacing: -0.02em;
  }

  .prediction-hub-points {
    display: inline-flex;
    min-height: 2.4rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(197, 132, 27, 0.22);
    border-radius: 999px;
    padding: 0 0.65rem;
    color: #845308;
    background: #fff9ed;
    font-size: 0.7rem;
    font-weight: 900;
    white-space: nowrap;
  }

  .prediction-hub-content {
    display: grid;
    gap: 0.85rem;
    padding: 0.8rem 0 1.25rem;
  }

  .prediction-hub-panel,
  .prediction-hub-content > .prediction-tab-panel {
    min-width: 0;
    width: 100%;
  }

  .prediction-hub-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid rgba(34, 29, 20, 0.08);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 0.38rem 1rem rgba(50, 37, 16, 0.045);
  }

  .prediction-hub-summary > div {
    display: grid;
    gap: 0.1rem;
    justify-items: center;
    padding: 0.72rem 0.35rem;
    text-align: center;
  }

  .prediction-hub-summary > div + div {
    border-left: 1px solid rgba(34, 29, 20, 0.07);
  }

  .prediction-hub-summary span {
    color: #81796e;
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .prediction-hub-summary strong {
    color: #17130f;
    font-size: 1.25rem;
    line-height: 1;
  }

  .prediction-hub-section-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.85rem 0.1rem 0.25rem;
  }

  .prediction-hub-section-title span {
    color: #a76a0d;
    font-size: 0.64rem;
    font-weight: 950;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .prediction-hub-section-title h3 {
    margin: 0.08rem 0 0;
    color: #17130f;
    font-size: 1.13rem;
    line-height: 1.08;
  }

  .prediction-hub-section-title small {
    color: #857d72;
    font-size: 0.6rem;
    text-align: right;
  }

  .prediction-hub-match-list {
    display: grid;
    gap: 0.62rem;
  }

  .prediction-hub-match {
    overflow: hidden;
    border: 1px solid rgba(33, 28, 20, 0.1);
    border-radius: 1.08rem;
    background:
      radial-gradient(circle at 50% 0%, rgba(203, 145, 42, 0.07), transparent 55%),
      #fff;
    box-shadow: 0 0.42rem 1.15rem rgba(48, 34, 12, 0.05);
  }

  .prediction-hub-match.is-featured {
    border-color: rgba(186, 119, 14, 0.38);
    box-shadow: 0 0.55rem 1.35rem rgba(128, 82, 11, 0.08);
  }

  .prediction-hub-match__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.66rem 0.78rem 0;
    color: #81796d;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-transform: uppercase;
  }

  .prediction-hub-match__topline strong {
    color: #8f5b0c;
    font-size: 0.59rem;
    white-space: nowrap;
  }

  .prediction-hub-match__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 0.48rem;
    padding: 0.76rem 0.7rem 0.72rem;
  }

  .prediction-hub-team {
    display: grid;
    min-width: 0;
    gap: 0.42rem;
    justify-items: center;
    text-align: center;
  }

  .prediction-hub-team .prediction-team-crest {
    width: 3.85rem;
    height: 3.85rem;
  }

  .prediction-hub-team .prediction-team-crest img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .prediction-hub-team strong {
    max-width: 100%;
    overflow: hidden;
    color: #17130f;
    font-size: 0.77rem;
    line-height: 1.08;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .prediction-hub-match__score {
    display: grid;
    gap: 0.14rem;
    justify-items: center;
    min-width: 5.3rem;
    text-align: center;
  }

  .prediction-hub-match__score small {
    color: #9b630d;
    font-size: 0.55rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .prediction-hub-match__score strong {
    min-width: 4rem;
    border-radius: 0.72rem;
    padding: 0.42rem 0.58rem;
    color: #15120e;
    background: #f8f2e7;
    font-size: 1.35rem;
    line-height: 1;
  }

  .prediction-hub-match.is-saved .prediction-hub-match__score strong {
    color: #865306;
    background: #fff3d8;
  }

  .prediction-hub-match__score span {
    color: #8a8379;
    font-size: 0.54rem;
    font-weight: 750;
  }

  .prediction-hub-match__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    border-top: 1px solid rgba(34, 29, 20, 0.065);
    padding: 0.58rem 0.72rem;
    background: rgba(250, 247, 240, 0.72);
  }

  .prediction-hub-match__footer > span {
    color: #797168;
    font-size: 0.61rem;
    font-weight: 700;
  }

  .prediction-hub-match__footer button {
    min-height: 2.35rem;
    border: 0;
    border-radius: 999px;
    padding: 0 0.8rem;
    color: #fff;
    background: linear-gradient(135deg, #d99a2a, #b8740c);
    font-size: 0.66rem;
    font-weight: 900;
    box-shadow: 0 0.22rem 0.58rem rgba(158, 100, 11, 0.14);
  }

  .prediction-hub-match__footer button:disabled {
    color: #8b8479;
    background: #ece8e0;
    box-shadow: none;
  }

  .prediction-hub-nav {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(4.45rem + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(30, 26, 19, 0.08);
    background: rgba(255, 255, 255, 0.985);
    padding:
      0.28rem
      calc(0.26rem + env(safe-area-inset-right))
      max(0.2rem, env(safe-area-inset-bottom))
      calc(0.26rem + env(safe-area-inset-left));
    box-shadow: 0 -0.38rem 1.25rem rgba(40, 30, 14, 0.055);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .prediction-hub-nav button {
    display: grid;
    min-width: 0;
    min-height: 3.35rem;
    place-content: center;
    gap: 0.14rem;
    border: 0;
    border-radius: 0.8rem;
    color: #8a837a;
    background: transparent;
    text-align: center;
  }

  .prediction-hub-nav button > span {
    font-size: 1.02rem;
    line-height: 1;
    filter: grayscale(0.9);
    opacity: 0.72;
  }

  .prediction-hub-nav button > small {
    overflow: hidden;
    font-size: 0.56rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .prediction-hub-nav button.is-active {
    color: #9e6309;
    background: #fff8e9;
  }

  .prediction-hub-nav button.is-active > span {
    filter: none;
    opacity: 1;
  }

  .prediction-hub-sheet {
    position: fixed;
    inset: 0;
    z-index: 180;
    display: grid;
    align-items: end;
  }

  .prediction-hub-sheet__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(17, 14, 10, 0.56);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }

  .prediction-hub-sheet__panel {
    position: relative;
    z-index: 1;
    max-height: min(84dvh, 46rem);
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.64);
    border-radius: 1.5rem 1.5rem 0 0;
    background: #fff;
    padding: 0.85rem 0.86rem calc(1rem + env(safe-area-inset-bottom));
    box-shadow: 0 -1.4rem 3rem rgba(25, 18, 9, 0.18);
    overscroll-behavior: contain;
  }

  .prediction-hub-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.1rem 0.08rem 0.7rem;
  }

  .prediction-hub-sheet__head span,
  .prediction-hub-sheet__head strong {
    display: block;
  }

  .prediction-hub-sheet__head span {
    color: #a66a0d;
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .prediction-hub-sheet__head strong {
    margin-top: 0.12rem;
    color: #1a1611;
    font-size: 0.88rem;
  }

  .prediction-hub-sheet__head > button {
    display: grid;
    width: 2.65rem;
    height: 2.65rem;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(28, 24, 18, 0.09);
    border-radius: 50%;
    color: #625c52;
    background: #f5f2ec;
    font-size: 1.35rem;
  }

  .prediction-hub-sheet__match {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
    border: 1px solid rgba(34, 29, 20, 0.07);
    border-radius: 1rem;
    background: #fbf8f2;
    padding: 0.8rem 0.55rem;
  }

  .prediction-hub-sheet__vs {
    color: #a56a0f;
    font-size: 1rem;
    font-weight: 950;
  }

  .prediction-hub-sheet__form {
    margin-top: 0.72rem;
  }

  .prediction-hub-sheet__form .prediction-score-card {
    margin: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0.35rem 0 0 !important;
  }

  .prediction-hub-sheet__form .prediction-score-card__head {
    padding-inline: 0.1rem;
  }

  .prediction-hub-sheet__form .prediction-scoreboard {
    border-radius: 1rem;
    background: #fff;
  }

  .prediction-hub-content .prediction-ranking-panel,
  .prediction-hub-content .prediction-prizes-v5,
  .prediction-hub-content .prediction-tab-panel:not(.prediction-mine-panel) {
    padding-top: 0.15rem;
  }

  .prediction-hub-content .prediction-subtabs {
    position: sticky;
    top: calc(4.45rem + env(safe-area-inset-top));
    z-index: 20;
    background: #f6f3ec;
    padding: 0.5rem 0;
  }

  @media (max-width: 390px) {
    .prediction-hub-header {
      gap: 0.38rem;
    }

    .prediction-hub-exit {
      padding-inline: 0.55rem;
      font-size: 0.63rem;
    }

    .prediction-hub-points {
      padding-inline: 0.52rem;
      font-size: 0.64rem;
    }

    .prediction-hub-team .prediction-team-crest {
      width: 3.35rem;
      height: 3.35rem;
    }

    .prediction-hub-match__score {
      min-width: 4.55rem;
    }

    .prediction-hub-nav button > small {
      font-size: 0.52rem;
    }
  }
}
