/* FREE CASINO ONLINE · Desafíos */
.view--challenges.is-active {
  display: block;
  min-height: 0;
  overflow-y: auto;
  padding: clamp(20px, 3.5vh, 38px) 18px 46px;
  background:
    radial-gradient(ellipse 62% 48% at 50% 34%, rgba(32, 110, 74, 0.16), transparent 72%),
    linear-gradient(180deg, #06150e, #04100a);
}

.ch-wrap {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.ch-head {
  text-align: center;
  padding: 4px 0 18px;
}

.ch-kicker {
  display: block;
  color: var(--gold);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.24em;
}

.ch-title {
  margin: 7px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 58px);
  font-weight: 400;
  line-height: 0.9;
  color: #fbf5e6;
}

.ch-intro {
  max-width: 620px;
  margin: 0 auto;
  color: #a9a28e;
  font-size: 11px;
  line-height: 1.55;
}

.ch-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(520px, 100%);
  margin: 8px auto 0;
  padding: 4px;
  border: 1px solid rgba(246, 216, 128, 0.16);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.ch-tab {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #9b947f;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.ch-tab.is-active {
  background: linear-gradient(135deg, rgba(255, 233, 163, 0.96), rgba(189, 134, 38, 0.96));
  color: #1d1304;
  box-shadow: 0 8px 22px rgba(198, 146, 43, 0.18);
}

.ch-reset {
  margin: 12px 0 16px;
  color: #77715f;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: center;
}

.ch-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ch-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(246, 216, 128, 0.14);
  border-radius: 16px;
  background:
    radial-gradient(ellipse 90% 80% at 0% 0%, rgba(232, 191, 98, 0.055), transparent 70%),
    rgba(5, 23, 13, 0.78);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ch-card.is-complete {
  border-color: rgba(246, 216, 128, 0.4);
  background:
    radial-gradient(ellipse 90% 80% at 0% 0%, rgba(232, 191, 98, 0.1), transparent 70%),
    rgba(7, 29, 16, 0.88);
}

.ch-card.is-claimed {
  opacity: 0.72;
}

.ch-card-top,
.ch-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ch-game {
  color: #cfb470;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ch-reward {
  flex: 0 0 auto;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1;
}

.ch-card h3 {
  margin: 9px 0 5px;
  color: #f4ead3;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.035em;
}

.ch-card p {
  min-height: 30px;
  margin: 0;
  color: #a59e8a;
  font-size: 9px;
  line-height: 1.45;
}

.ch-progress {
  height: 4px;
  margin: 11px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.ch-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9a6f25, #f5d98b);
}

.ch-card-bottom small {
  color: #8d8674;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.ch-claim {
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(255, 240, 184, 0.58);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffe9a3, #d1a23d);
  color: #1d1304;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.ch-wait,
.ch-done {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.ch-wait { color: #706a5a; }
.ch-done { color: #d8bd7b; }

.ch-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  padding: 11px 18px;
  border: 1px solid rgba(246, 216, 128, 0.46);
  border-radius: 10px;
  background: rgba(4, 20, 11, 0.97);
  color: var(--gold-bright);
  font-size: 10px;
  font-weight: 800;
  opacity: 0;
  transform: translate(-50%, 160%);
  pointer-events: none;
  will-change: transform, opacity;
  transition: opacity 0.22s ease, transform 0.25s ease;
}

.ch-toast.is-visible {
  opacity: 1;
  animation: ch-toast-rise 0.58s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

@keyframes ch-toast-rise {
  0% {
    opacity: 0;
    transform: translate(-50%, 160%);
  }
  55% {
    opacity: 1;
    transform: translate(-50%, -7%);
  }
  72% {
    transform: translate(-50%, 3%);
  }
  86% {
    transform: translate(-50%, -2%);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ch-toast.is-visible {
    animation: none;
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 700px) {
  .view--challenges.is-active {
    padding: 18px 12px 38px;
  }

  .ch-head {
    padding-bottom: 14px;
  }

  .ch-title {
    font-size: 40px;
  }

  .ch-intro {
    max-width: 340px;
    font-size: 10px;
  }

  .ch-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ch-card {
    padding: 12px;
  }

  .ch-card h3 {
    font-size: 20px;
  }

  .ch-card p {
    min-height: 0;
  }
}

.view--challenges {
  scroll-margin-top: 112px;
}

@media (min-width: 901px) {
  .view--challenges {
    scroll-margin-top: 100px;
  }
}

.ch-test-tools {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: -2px 0 16px;
  flex-wrap: wrap;
}

.ch-test-btn {
  min-height: 30px;
  padding: 0 11px;
  border: 1px dashed rgba(246, 216, 128, 0.34);
  border-radius: 7px;
  background: rgba(11, 35, 21, 0.66);
  color: #b7a77f;
  font-family: var(--font-body);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.07em;
  cursor: pointer;
}

.ch-test-btn:hover {
  border-color: rgba(246, 216, 128, 0.72);
  color: var(--gold-bright);
}

.ch-test-btn--danger {
  border-color: rgba(190, 81, 64, 0.45);
  color: #c88678;
}

.ch-test-btn--danger:hover {
  border-color: rgba(220, 105, 86, 0.8);
  color: #f0a08f;
}

.home-test-tools {
  margin: 18px 0 0;
  opacity: 0.9;
}

@media (max-width: 700px) {
  .home-test-tools {
    margin-top: 14px;
  }
}

.ch-particles {
  position: fixed;
  inset: 0;
  z-index: 101;
  overflow: hidden;
  pointer-events: none;
}

.ch-particle {
  position: absolute;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  box-shadow: 0 0 7px rgba(255, 225, 150, 0.8), 0 0 14px rgba(224, 179, 84, 0.35);
  opacity: 0;
  animation: ch-particle-fly var(--d) cubic-bezier(0.18, 0.75, 0.3, 1) forwards;
}

@keyframes ch-particle-fly {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }
  14% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.15) rotate(var(--rot));
  }
}

/* Textos pequeños más legibles */
.ch-kicker { font-size: 10px; }
.ch-intro { font-size: 13px; line-height: 1.6; }
.ch-tab { font-size: 11px; }
.ch-reset { font-size: 10px; line-height: 1.5; }
.ch-game { font-size: 9.5px; }
.ch-card p { font-size: 12px; line-height: 1.5; }
.ch-card-bottom small { font-size: 10px; }
.ch-claim, .ch-wait, .ch-done { font-size: 9.5px; }
.ch-test-btn { font-size: 9px; }
.ch-card h3 { font-size: 23px; }

@media (max-width: 700px) {
  .ch-intro { font-size: 12px; }
  .ch-tab { font-size: 10px; }
  .ch-card p { font-size: 11.5px; }
}

/* Ajuste final de legibilidad */
.ch-tab { font-size: 11.5px; }
.ch-game { font-size: 10px; }
.ch-card p { font-size: 12.5px; }
.ch-card-bottom small { font-size: 10.5px; }
.ch-claim, .ch-wait, .ch-done { font-size: 10px; }

@media (max-width: 700px) {
  .ch-tab { font-size: 10.5px; }
  .ch-card p { font-size: 12px; }
}

/* Texto pequeño XL */
.ch-kicker { font-size: 11px; }
.ch-intro { font-size: 14px; }
.ch-tab { font-size: 12.5px; }
.ch-reset { font-size: 11px; }
.ch-game { font-size: 11px; }
.ch-card p { font-size: 14px; line-height: 1.55; }
.ch-card-bottom small { font-size: 11.5px; }
.ch-claim, .ch-wait, .ch-done { font-size: 11px; }
.ch-test-btn { font-size: 10px; }

@media (max-width: 700px) {
  .ch-tab { font-size: 11.5px; }
  .ch-card p { font-size: 13px; }
}
