/* ==========================================================
   A42 — TOURNAMENT SCREEN · ESTRUCTURA BASE
========================================================== */

.tournament-screen {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding:
    clamp(10px, 2vw, 24px);
  color: #f2dfaa;
  background:
    radial-gradient(
      circle at 50% 35%,
      rgba(211, 163, 63, 0.16),
      transparent 34%
    ),
    linear-gradient(
      90deg,
      rgba(2, 2, 1, 0.92),
      rgba(13, 8, 4, 0.70),
      rgba(2, 2, 1, 0.92)
    ),
    url("../assets/backgrounds/start.webp")
      center / cover no-repeat,
    #090603;
  isolation: isolate;
}

.tournament-screen__shade {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at center,
      transparent 25%,
      rgba(0, 0, 0, 0.40) 74%,
      rgba(0, 0, 0, 0.72) 100%
    ),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.16),
      rgba(0, 0, 0, 0.44)
    );
}

.tournament-selection-panel,
.tournament-matchup-panel {
  position: relative;
  z-index: 2;
  width: min(1120px, 96vw);
  max-height: 94vh;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(235, 198, 99, 0.72);
  border-radius: 20px;
  background:
    linear-gradient(
      145deg,
      rgba(51, 29, 12, 0.98),
      rgba(8, 10, 6, 0.98) 72%
    );
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.82),
    inset 0 1px rgba(255, 255, 255, 0.07),
    inset 0 0 40px rgba(193, 135, 33, 0.04);
}

.tournament-selection-panel {
  grid-template-rows:
    auto
    minmax(0, 1fr)
    auto
    auto;
}

.tournament-matchup-panel {
  grid-template-rows:
    auto
    minmax(0, 1fr)
    auto
    auto
    auto;
}

/* ==========================================================
   ENCABEZADOS
========================================================== */

.tournament-selection-header,
.tournament-matchup-header {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding:
    clamp(12px, 2vw, 20px)
    clamp(14px, 2.4vw, 26px);
  border-bottom:
    1px solid rgba(232, 195, 96, 0.22);
  background:
    linear-gradient(
      90deg,
      rgba(3, 4, 2, 0.82),
      rgba(37, 25, 11, 0.66),
      rgba(3, 4, 2, 0.82)
    );
  box-shadow:
    0 7px 20px rgba(0, 0, 0, 0.26);
}

.tournament-selection-header > div:first-child,
.tournament-matchup-header > div:first-child {
  min-width: 0;
}

.tournament-selection-header small,
.tournament-matchup-header small {
  display: block;
  color: #b98d38;
  font:
    800 clamp(7px, 0.8vw, 9px)
    Arial,
    sans-serif;
  letter-spacing: 0.24em;
}

.tournament-selection-header h1,
.tournament-matchup-header h1 {
  margin: 4px 0 0;
  color: #f4d576;
  font-size:
    clamp(22px, 3.2vw, 38px);
  letter-spacing: 0.08em;
  line-height: 1;
  text-shadow:
    0 5px 16px rgba(0, 0, 0, 0.62);
}

.tournament-selection-header p {
  margin: 7px 0 0;
  max-width: 620px;
  color: #c7b27d;
  font:
    700 clamp(9px, 1vw, 12px)
    Arial,
    sans-serif;
  line-height: 1.45;
}

.tournament-selection-header > button,
.tournament-matchup-header > button {
  width: 41px;
  height: 41px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border:
    1px solid rgba(232, 195, 96, 0.42);
  border-radius: 50%;
  color: #f4d98b;
  background:
    linear-gradient(
      #3c2710,
      #100a05
    );
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.38);
  font:
    400 25px Arial,
    sans-serif;
  cursor: pointer;
}

/* ==========================================================
   PROGRESO SUPERIOR
========================================================== */

.tournament-matchup-progress {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 100px;
  padding: 7px 14px;
  border:
    1px solid rgba(232, 195, 96, 0.22);
  border-radius: 10px;
  background:
    rgba(0, 0, 0, 0.22);
}

.tournament-matchup-progress span {
  color: #9c824b;
  font:
    800 7px Arial,
    sans-serif;
  letter-spacing: 0.18em;
}

.tournament-matchup-progress strong {
  color: #f2d374;
  font:
    900 16px Arial,
    sans-serif;
}

/* ==========================================================
   ZONA PRINCIPAL MANO A MANO
========================================================== */

.tournament-matchup-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    clamp(80px, 10vw, 130px)
    minmax(0, 1fr);
  align-items: center;
  gap:
    clamp(10px, 2vw, 26px);
  padding:
    clamp(16px, 3vh, 34px)
    clamp(18px, 4vw, 54px);
  overflow: hidden;
}

.tournament-matchup-frame {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(93%, 900px);
  height: min(92%, 560px);
  z-index: 0;
  transform: translate(-50%, -50%);
  object-fit: contain;
  opacity: 0.32;
  pointer-events: none;
  filter:
    drop-shadow(
      0 16px 28px
      rgba(0, 0, 0, 0.56)
    );
}

.tournament-matchup-player,
.tournament-matchup-opponent,
.tournament-matchup-vs {
  position: relative;
  z-index: 3;
}

.tournament-matchup-player,
.tournament-matchup-opponent {
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  text-align: center;
}

.tournament-matchup-vs {
  width:
    clamp(74px, 9vw, 118px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  justify-self: center;
  border:
    2px solid rgba(240, 200, 91, 0.72);
  border-radius: 50%;
  color: #241504;
  background:
    radial-gradient(
      circle at 35% 28%,
      #fff0a2,
      #dcaa3c 48%,
      #8c5712 100%
    );
  box-shadow:
    0 0 0 6px
      rgba(226, 181, 73, 0.08),
    0 14px 30px rgba(0, 0, 0, 0.48),
    inset 0 2px rgba(255, 255, 255, 0.46);
  font:
    1000 clamp(20px, 3vw, 38px)
    Arial,
    sans-serif;
  letter-spacing: 0.04em;
  text-shadow:
    0 1px rgba(255, 255, 255, 0.38);
}

/* ==========================================================
   INFORMACIÓN INFERIOR
========================================================== */

.tournament-opponent-information {
  position: relative;
  z-index: 4;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding:
    13px
    clamp(18px, 4vw, 58px);
  border-top:
    1px solid rgba(232, 195, 96, 0.13);
  border-bottom:
    1px solid rgba(232, 195, 96, 0.13);
  background:
    rgba(0, 0, 0, 0.18);
  text-align: center;
}

.tournament-opponent-information p {
  max-width: 760px;
  margin: 0;
  color: #cbb885;
  font:
    700 clamp(9px, 1vw, 12px)
    Arial,
    sans-serif;
  line-height: 1.5;
}

.tournament-opponent-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.tournament-opponent-tags span {
  padding: 6px 10px;
  border:
    1px solid rgba(230, 192, 94, 0.28);
  border-radius: 14px;
  color: #d8c184;
  background:
    rgba(30, 20, 8, 0.72);
  font:
    800 7px Arial,
    sans-serif;
  letter-spacing: 0.10em;
}

/* ==========================================================
   PIE DE PANTALLA
========================================================== */

.tournament-selection-footer,
.tournament-matchup-footer {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
  padding:
    12px
    clamp(14px, 2.4vw, 26px);
  border-top:
    1px solid rgba(232, 195, 96, 0.20);
  background:
    rgba(0, 0, 0, 0.30);
}

.tournament-main-button,
.tournament-back-button,
.tournament-reset-button {
  min-width: 160px;
  height: 42px;
  padding: 0 17px;
  border-radius: 8px;
  font:
    900 9px Arial,
    sans-serif;
  letter-spacing: 0.09em;
  cursor: pointer;
}

.tournament-main-button {
  border: 1px solid #f0d16e;
  color: #241504;
  background:
    linear-gradient(
      #f4d677,
      #ad6d16
    );
  box-shadow:
    0 7px 17px rgba(0, 0, 0, 0.34);
}

.tournament-main-button:disabled {
  opacity: 0.32;
  filter: grayscale(0.6);
  cursor: default;
  box-shadow: none;
}

.tournament-back-button {
  border:
    1px solid rgba(230, 194, 96, 0.34);
  color: #ead598;
  background:
    linear-gradient(
      #4b3217,
      #171008
    );
}

.tournament-reset-button {
  border:
    1px solid rgba(181, 76, 49, 0.55);
  color: #e7ad9d;
  background:
    linear-gradient(
      #60291d,
      #27110c
    );
}

/* ==========================================================
   AVISOS
========================================================== */

.tournament-error {
  position: absolute;
  left: 50%;
  bottom: 74px;
  z-index: 600;
  transform: translateX(-50%);
  padding: 10px 16px;
  border:
    1px solid rgba(239, 203, 105, 0.56);
  border-radius: 8px;
  color: #f3d88d;
  background:
    rgba(4, 8, 5, 0.96);
  box-shadow:
    0 9px 25px rgba(0, 0, 0, 0.44);
  font:
    800 9px Arial,
    sans-serif;
  letter-spacing: 0.08em;
  pointer-events: none;
}

/* ==========================================================
   HOVER
========================================================== */

@media (hover: hover) {
  .tournament-selection-header > button:hover,
  .tournament-matchup-header > button:hover,
  .tournament-main-button:not(:disabled):hover,
  .tournament-back-button:hover,
  .tournament-reset-button:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
  }
}

/* ==========================================================
   RESPONSIVE BASE
========================================================== */

@media (max-width: 760px) {
  .tournament-screen {
    padding: 5px;
  }

  .tournament-selection-panel,
  .tournament-matchup-panel {
    width: 100%;
    max-height: 99vh;
    border-radius: 12px;
  }

  .tournament-selection-header,
  .tournament-matchup-header {
    padding: 10px 12px;
  }

  .tournament-selection-header h1,
  .tournament-matchup-header h1 {
    font-size: 20px;
  }

  .tournament-selection-header p {
    font-size: 8px;
  }

  .tournament-matchup-stage {
    grid-template-columns:
      minmax(0, 1fr)
      60px
      minmax(0, 1fr);
    gap: 5px;
    padding: 13px 7px;
  }

  .tournament-matchup-vs {
    width: 58px;
    font-size: 17px;
  }

  .tournament-opponent-information {
    padding: 8px 10px;
  }

  .tournament-selection-footer,
  .tournament-matchup-footer {
    padding: 8px;
  }

  .tournament-main-button,
  .tournament-back-button,
  .tournament-reset-button {
    min-width: 0;
    flex: 1;
    height: 37px;
    padding: 0 8px;
    font-size: 7px;
  }
}

@media (
  max-height: 580px
) and (
  orientation: landscape
) {
  .tournament-selection-panel,
  .tournament-matchup-panel {
    max-height: 99vh;
  }

  .tournament-selection-header,
  .tournament-matchup-header {
    padding: 7px 13px;
  }

  .tournament-selection-header h1,
  .tournament-matchup-header h1 {
    font-size: 18px;
  }

  .tournament-selection-header p {
    margin-top: 3px;
    font-size: 7px;
  }

  .tournament-matchup-stage {
    padding: 8px 20px;
  }

  .tournament-opponent-information {
    gap: 5px;
    padding: 7px 18px;
  }

  .tournament-opponent-information p {
    font-size: 8px;
  }

  .tournament-selection-footer,
  .tournament-matchup-footer {
    padding: 7px 13px;
  }

  .tournament-main-button,
  .tournament-back-button,
  .tournament-reset-button {
    height: 33px;
  }
}
/* ==========================================================
   A43 — SELECCIÓN DE PERSONAJES Y MANO A MANO
========================================================== */

/* ==========================================================
   SELECCIÓN DE LOS 20 PERSONAJES
========================================================== */

.tournament-character-grid {
  min-height: 0;
  display: grid;
  grid-template-columns:
    repeat(5, minmax(0, 1fr));
  gap:
    clamp(7px, 1vw, 12px);
  overflow-y: auto;
  padding:
    clamp(12px, 2vw, 20px);
  scrollbar-color:
    #a87827
    #160d07;
}

.tournament-character-choice {
  position: relative;
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 5px;
  padding:
    8px
    7px
    10px;
  overflow: hidden;
  border:
    1px solid rgba(231, 195, 98, 0.20);
  border-radius: 11px;
  color: #e7d39a;
  background:
    linear-gradient(
      145deg,
      rgba(63, 39, 16, 0.82),
      rgba(7, 9, 5, 0.94)
    );
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.04),
    0 7px 16px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    filter 150ms ease,
    box-shadow 150ms ease;
}

.tournament-character-choice::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 50% 26%,
      rgba(244, 207, 107, 0.10),
      transparent 48%
    );
}

.tournament-character-choice img {
  position: relative;
  z-index: 1;
  width:
    clamp(72px, 8vw, 116px);
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
  border:
    2px solid rgba(224, 183, 77, 0.50);
  border-radius: 50%;
  background: #181007;
  box-shadow:
    0 0 0 4px rgba(224, 183, 77, 0.06),
    0 8px 18px rgba(0, 0, 0, 0.42);
}

.tournament-character-choice strong {
  position: relative;
  z-index: 1;
  max-width: 100%;
  overflow: hidden;
  color: #f0d788;
  font:
    900 clamp(8px, 0.9vw, 11px)
    Arial,
    sans-serif;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-character-choice small {
  position: relative;
  z-index: 1;
  max-width: 100%;
  overflow: hidden;
  color: #9f8752;
  font:
    700 clamp(6px, 0.7vw, 8px)
    Arial,
    sans-serif;
  letter-spacing: 0.07em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-character-choice.is-selected {
  border-color: #f1d16b;
  background:
    linear-gradient(
      145deg,
      rgba(118, 80, 24, 0.88),
      rgba(18, 15, 8, 0.96)
    );
  box-shadow:
    0 0 0 2px rgba(237, 197, 90, 0.12),
    0 0 22px rgba(237, 197, 90, 0.22),
    inset 0 1px rgba(255, 255, 255, 0.08);
}

.tournament-character-choice.is-selected img {
  border-color: #ffe392;
  box-shadow:
    0 0 0 5px rgba(237, 197, 90, 0.10),
    0 0 18px rgba(237, 197, 90, 0.28),
    0 9px 20px rgba(0, 0, 0, 0.48);
}

/* ==========================================================
   PERSONAJE ELEGIDO
========================================================== */

.tournament-character-preview {
  position: relative;
  z-index: 3;
  min-height: 112px;
  display: grid;
  grid-template-columns:
    auto
    minmax(0, 1fr);
  align-items: center;
  gap:
    clamp(12px, 2vw, 22px);
  padding:
    13px
    clamp(16px, 2.5vw, 28px);
  border-top:
    1px solid rgba(232, 195, 96, 0.18);
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.34),
      rgba(54, 34, 13, 0.30),
      rgba(0, 0, 0, 0.34)
    );
}

.tournament-character-preview.is-empty {
  grid-template-columns: 1fr;
  place-items: center;
  min-height: 72px;
  color: #978253;
  font:
    700 10px Arial,
    sans-serif;
  letter-spacing: 0.05em;
  text-align: center;
}

.tournament-character-preview > img {
  width:
    clamp(72px, 8vw, 106px);
  aspect-ratio: 1;
  object-fit: cover;
  border:
    2px solid #d6a944;
  border-radius: 50%;
  background: #181007;
  box-shadow:
    0 0 0 5px rgba(221, 176, 70, 0.07),
    0 9px 20px rgba(0, 0, 0, 0.46);
}

.tournament-character-preview > div {
  min-width: 0;
}

.tournament-character-preview small {
  color: #a58846;
  font:
    800 7px Arial,
    sans-serif;
  letter-spacing: 0.20em;
}

.tournament-character-preview h2 {
  margin: 4px 0 0;
  color: #f4d77c;
  font-size:
    clamp(18px, 2.4vw, 29px);
  line-height: 1;
}

.tournament-character-preview strong {
  display: block;
  margin-top: 5px;
  color: #cfb36d;
  font:
    900 9px Arial,
    sans-serif;
  letter-spacing: 0.09em;
}

.tournament-character-preview p {
  margin: 7px 0 0;
  max-width: 720px;
  color: #b9a675;
  font:
    700 10px Arial,
    sans-serif;
  line-height: 1.45;
}

/* ==========================================================
   AVATARES DEL MANO A MANO
========================================================== */

.tournament-matchup-label {
  display: block;
  color: #aa8b48;
  font:
    800 7px Arial,
    sans-serif;
  letter-spacing: 0.20em;
}

.tournament-matchup-avatar {
  position: relative;
  width:
    clamp(130px, 17vw, 230px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border:
    3px solid rgba(222, 177, 70, 0.86);
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 50% 35%,
      #5b3d18,
      #120d07 70%
    );
  box-shadow:
    0 0 0 7px rgba(225, 179, 71, 0.07),
    0 0 28px rgba(225, 179, 71, 0.15),
    0 18px 35px rgba(0, 0, 0, 0.58),
    inset 0 1px rgba(255, 255, 255, 0.12);
}

.tournament-matchup-avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.10),
      transparent 34%
    );
}

.tournament-matchup-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.tournament-matchup-player > strong,
.tournament-matchup-opponent > strong {
  max-width: 100%;
  overflow: hidden;
  color: #f1d581;
  font-size:
    clamp(15px, 2vw, 25px);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow:
    0 4px 12px rgba(0, 0, 0, 0.62);
}

.tournament-matchup-player > small,
.tournament-matchup-opponent > small {
  max-width: 100%;
  overflow: hidden;
  color: #b49a62;
  font:
    800 clamp(7px, 0.85vw, 10px)
    Arial,
    sans-serif;
  letter-spacing: 0.10em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tournament-matchup-opponent > b {
  margin-top: 2px;
  color: #d5b45d;
  font:
    900 9px Arial,
    sans-serif;
  letter-spacing: 0.10em;
}

/* ==========================================================
   CARRUSEL DEL RIVAL
========================================================== */

.tournament-opponent-carousel {
  display: grid;
  grid-template-columns:
    auto
    minmax(0, 1fr)
    auto;
  align-items: center;
  gap:
    clamp(7px, 1vw, 13px);
}

.tournament-opponent-carousel > button {
  width:
    clamp(34px, 4vw, 47px);
  height:
    clamp(44px, 5vw, 60px);
  display: grid;
  place-items: center;
  padding: 0;
  border:
    1px solid rgba(232, 195, 96, 0.44);
  border-radius: 9px;
  color: #f1d27a;
  background:
    linear-gradient(
      180deg,
      rgba(78, 51, 21, 0.94),
      rgba(18, 12, 7, 0.96)
    );
  box-shadow:
    0 7px 14px rgba(0, 0, 0, 0.38),
    inset 0 1px rgba(255, 255, 255, 0.06);
  font:
    400 clamp(25px, 3vw, 38px)
    Arial,
    sans-serif;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 130ms ease,
    filter 130ms ease,
    border-color 130ms ease;
}

.tournament-matchup-opponent.is-current
  .tournament-matchup-avatar {
  border-color: #ffe397;
  box-shadow:
    0 0 0 8px rgba(225, 179, 71, 0.09),
    0 0 34px rgba(225, 179, 71, 0.26),
    0 18px 35px rgba(0, 0, 0, 0.58);
}

.tournament-matchup-opponent.is-defeated
  .tournament-matchup-avatar {
  filter:
    grayscale(0.55)
    brightness(0.65);
}

.tournament-defeated-mark {
  position: absolute;
  right: 8%;
  bottom: 7%;
  z-index: 5;
  width:
    clamp(34px, 4vw, 49px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border:
    2px solid #8c651c;
  border-radius: 50%;
  color: #182707;
  background:
    radial-gradient(
      circle at 35% 30%,
      #e8f5a7,
      #8eb73a 70%
    );
  box-shadow:
    0 6px 12px rgba(0, 0, 0, 0.46);
  font:
    1000 clamp(17px, 2vw, 25px)
    Arial,
    sans-serif;
}

/* ==========================================================
   BARRA DE PROGRESO
========================================================== */

.tournament-progress {
  position: relative;
  z-index: 4;
  display: grid;
  gap: 7px;
  padding:
    10px
    clamp(18px, 4vw, 58px);
  border-top:
    1px solid rgba(232, 195, 96, 0.14);
  background:
    rgba(0, 0, 0, 0.18);
}

.tournament-progress__labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.tournament-progress__labels span {
  color: #a28a52;
  font:
    800 7px Arial,
    sans-serif;
  letter-spacing: 0.18em;
}

.tournament-progress__labels strong {
  color: #e7c964;
  font:
    900 11px Arial,
    sans-serif;
}

.tournament-progress__track {
  height: 8px;
  overflow: hidden;
  border:
    1px solid rgba(232, 195, 96, 0.25);
  border-radius: 10px;
  background:
    rgba(0, 0, 0, 0.38);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.48);
}

.tournament-progress__track > span {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background:
    linear-gradient(
      90deg,
      #8b5714,
      #e2b746,
      #ffe28a
    );
  box-shadow:
    0 0 12px rgba(232, 193, 86, 0.32);
  transition:
    width 350ms ease;
}

/* ==========================================================
   ESTADOS DE DERROTA Y CAMPEÓN
========================================================== */

.tournament-message {
  position: relative;
  z-index: 4;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding:
    12px
    18px;
  border-top:
    1px solid rgba(232, 195, 96, 0.17);
  text-align: center;
  background:
    rgba(0, 0, 0, 0.22);
}

.tournament-message strong {
  color: #e4c56e;
  font:
    900 11px Arial,
    sans-serif;
  letter-spacing: 0.15em;
}

.tournament-message p {
  margin: 0;
  color: #ae9a6d;
  font:
    700 9px Arial,
    sans-serif;
}

.tournament-message--defeat {
  border-top-color:
    rgba(178, 74, 48, 0.34);
  background:
    linear-gradient(
      90deg,
      rgba(74, 25, 17, 0.58),
      rgba(24, 10, 7, 0.72),
      rgba(74, 25, 17, 0.58)
    );
}

.tournament-message--defeat strong {
  color: #e8a18e;
}

.tournament-message--champion {
  border-top-color:
    rgba(238, 201, 94, 0.48);
  background:
    radial-gradient(
      circle at center,
      rgba(130, 88, 21, 0.40),
      rgba(16, 11, 6, 0.78)
    );
}

.tournament-message--champion strong {
  color: #ffe18b;
  text-shadow:
    0 0 13px rgba(242, 205, 104, 0.26);
}

/* ==========================================================
   HOVER Y SELECCIÓN
========================================================== */

@media (hover: hover) {
  .tournament-character-choice:hover {
    transform: translateY(-3px);
    border-color:
      rgba(238, 202, 106, 0.55);
    filter: brightness(1.08);
    box-shadow:
      0 12px 22px rgba(0, 0, 0, 0.36),
      0 0 14px rgba(225, 179, 71, 0.10);
  }

  .tournament-opponent-carousel
    > button:hover {
    transform: translateY(-1px);
    filter: brightness(1.14);
    border-color: #efcd70;
  }
}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 900px) {
  .tournament-character-grid {
    grid-template-columns:
      repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .tournament-character-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 9px;
  }

  .tournament-character-choice {
    padding: 6px 4px 8px;
  }

  .tournament-character-choice img {
    width:
      clamp(58px, 15vw, 83px);
  }

  .tournament-character-preview {
    min-height: 92px;
    gap: 10px;
    padding: 9px 11px;
  }

  .tournament-character-preview > img {
    width: 68px;
  }

  .tournament-character-preview p {
    display: none;
  }

  .tournament-matchup-avatar {
    width:
      clamp(92px, 26vw, 145px);
  }

  .tournament-opponent-carousel {
    gap: 4px;
  }

  .tournament-opponent-carousel > button {
    width: 31px;
    height: 42px;
    font-size: 22px;
  }
}

@media (
  max-height: 610px
) and (
  orientation: landscape
) {
  .tournament-character-grid {
    grid-template-columns:
      repeat(10, minmax(0, 1fr));
    gap: 5px;
    padding: 7px 10px;
  }

  .tournament-character-choice {
    gap: 2px;
    padding: 4px;
    border-radius: 8px;
  }

  .tournament-character-choice img {
    width:
      clamp(45px, 5vw, 66px);
    border-width: 1px;
  }

  .tournament-character-choice strong {
    font-size: 6px;
  }

  .tournament-character-choice small {
    display: none;
  }

  .tournament-character-preview {
    min-height: 65px;
    padding: 6px 12px;
  }

  .tournament-character-preview > img {
    width: 51px;
  }

  .tournament-character-preview h2 {
    font-size: 15px;
  }

  .tournament-character-preview strong {
    font-size: 7px;
  }

  .tournament-character-preview p {
    display: none;
  }

  .tournament-matchup-avatar {
    width:
      clamp(94px, 18vh, 150px);
  }

  .tournament-matchup-player > strong,
  .tournament-matchup-opponent > strong {
    font-size: 14px;
  }

  .tournament-opponent-carousel > button {
    width: 31px;
    height: 43px;
    font-size: 23px;
  }

  .tournament-progress {
    padding: 6px 18px;
  }

  .tournament-message {
    padding: 7px 14px;
  }
}
/* Rival futuro visible, pero bloqueado */

.tournament-matchup-opponent.is-locked
  .tournament-matchup-avatar {
  filter:
    brightness(0.58)
    saturate(0.52)
    grayscale(0.18);
  opacity: 0.88;
}

.tournament-matchup-opponent.is-locked
  > strong,
.tournament-matchup-opponent.is-locked
  > small,
.tournament-matchup-opponent.is-locked
  > b {
  opacity: 0.62;
}

.tournament-matchup-opponent.is-locked
  .tournament-matchup-avatar::before {
  content: "🔒";
  position: absolute;
  top: 7%;
  right: 7%;
  z-index: 6;
  width: clamp(30px, 3.5vw, 44px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 195, 96, 0.74);
  border-radius: 50%;
  background: rgba(8, 6, 3, 0.86);
  box-shadow:
    0 6px 15px rgba(0, 0, 0, 0.48);
  font-size: clamp(14px, 1.8vw, 22px);
}

/* =========================================================
   TORNEO OMAHA · FLUJO COMPLETO EN ANDROID HORIZONTAL
   ========================================================= */

@media (orientation: landscape) and (max-height: 650px) {
  .tournament-screen {
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    padding:
      max(4px, env(safe-area-inset-top))
      max(6px, env(safe-area-inset-right))
      max(4px, env(safe-area-inset-bottom))
      max(6px, env(safe-area-inset-left));
  }

  .tournament-selection-panel,
  .tournament-matchup-panel {
    width: min(920px, 98vw);
    height: calc(100dvh - 8px);
    max-height: none;
    overflow: hidden;
    border-radius: 12px;
  }

  .tournament-selection-header,
  .tournament-matchup-header {
    min-height: 42px;
    padding: 6px 12px;
  }

  .tournament-selection-header h1,
  .tournament-matchup-header h1 {
    font-size: 17px;
  }

  .tournament-character-grid {
    min-height: 0;
    overflow-y: auto;
    grid-template-columns: repeat(10, minmax(54px, 1fr));
    gap: 4px;
    padding: 5px 8px;
    overscroll-behavior: contain;
  }

  .tournament-character-choice {
    min-height: 78px;
    padding: 3px;
  }

  .tournament-character-choice img {
    width: 42px;
    height: 42px;
  }

  .tournament-character-choice strong { font-size: 7px; }
  .tournament-character-choice small { display: none; }

  .tournament-character-preview {
    min-height: 34px;
    padding: 4px 10px;
  }

  .tournament-selection-footer,
  .tournament-matchup-footer {
    min-height: 44px;
    padding: 5px 9px;
  }

  .tournament-main-button,
  .tournament-back-button,
  .tournament-reset-button {
    height: 34px;
  }

  .tournament-matchup-stage {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr);
    gap: 8px;
    padding: 5px 18px;
  }

  .tournament-matchup-avatar {
    width: clamp(62px, 13vh, 92px);
    height: clamp(62px, 13vh, 92px);
  }

  .tournament-matchup-vs {
    width: 58px;
    height: 58px;
    font-size: 17px;
  }

  .tournament-opponent-information {
    min-height: 34px;
    padding: 4px 12px;
  }

  .tournament-progress,
  .tournament-message {
    min-height: 28px;
    padding: 4px 12px;
  }
}

@media (orientation: landscape) and (max-height: 420px) {
  .tournament-character-grid {
    grid-template-columns: repeat(10, minmax(48px, 1fr));
  }

  .tournament-character-choice {
    min-height: 66px;
  }

  .tournament-character-choice img {
    width: 35px;
    height: 35px;
  }

  .tournament-matchup-stage {
    padding-block: 2px;
  }
}
