/* ==========================================================
   EXPERIENCIA DEL STAND (index.php y premio.php)
   Pensada primero para celular: la gente entra escaneando el QR.
   Colores del logotipo: verde de la marca, negro y blanco.
   ========================================================== */

html {
  scroll-behavior: smooth;
}

html.x-lock,
html.x-lock body {
  overflow: hidden;
}

.x-body {
  background-image: none;
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
}

/* Un elemento con el atributo hidden nunca se muestra, aunque otra regla le dé display */
.x-body [hidden] {
  display: none !important;
}

.x-body section[id],
.x-hero-side {
  scroll-margin-top: 70px;
}

.x-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Barra superior ---------- */
.x-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 2px 14px rgba(var(--ink-rgb), 0.06);
}

.x-brand {
  display: inline-flex;
}

.x-brand img {
  height: 21px;
  width: auto;
  display: block;
}

.x-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.x-event-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  background: var(--ink);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.x-event-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-bright);
  animation: x-pulse 2s ease-in-out infinite;
}

.x-admin-link {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.8rem;
}

/* ---------- Botones ---------- */
.x-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 14px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.x-btn .x-ico {
  width: 1.1em;
  height: 1.1em;
  stroke-width: 2.3;
}

.x-btn:active {
  transform: scale(0.98);
}

.x-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.x-btn-block {
  width: 100%;
}

.x-btn-sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.88rem;
  border-radius: 11px;
}

/* Botón principal: verde de la marca con texto negro, como el logotipo */
.x-btn-primary {
  background: var(--brand);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(var(--brand-rgb), 0.35);
}

.x-btn-primary:hover {
  background: #3bbb74;
}

.x-btn-dark {
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(var(--ink-rgb), 0.25);
}

.x-btn-dark:hover {
  background: var(--ink-soft);
}

/* Sobre fondos negros */
.x-btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.x-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* Sobre fondos claros */
.x-btn-ghost-dark {
  background: #ffffff;
  color: var(--ink);
  border: 1.5px solid var(--border-subtle);
}

.x-btn-ghost-dark:hover {
  background: var(--brand-light);
  border-color: var(--brand-border);
}

.x-btn-whatsapp {
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.x-btn-whatsapp:hover {
  background: #1fbd5a;
}

.x-link-btn {
  background: none;
  border: 0;
  padding: 8px;
  color: var(--brand-dark);
  font: inherit;
  font-weight: 700;
  font-size: 0.86rem;
  text-decoration: underline;
  cursor: pointer;
}

.x-icon-btn {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: none;
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
}

.x-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.x-btn:focus-visible,
.x-link-btn:focus-visible,
.x-icon-btn:focus-visible,
.x-option:focus-visible,
.x-star:focus-visible,
.x-tabbar a:focus-visible,
.x-slide-media:focus-visible,
.x-carousel-arrow:focus-visible,
.x-mcard:focus-visible,
.x-game-close:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.x-play :focus-visible,
.x-game :focus-visible,
.x-contact :focus-visible {
  outline-color: #ffffff;
}

/* ---------- Portada: mensaje a la izquierda, juego y ranking al costado ---------- */
.x-hero {
  position: relative;
  overflow: hidden;
  padding: 24px 16px 34px;
  color: var(--ink);
  background: linear-gradient(165deg, #3ab873 0%, var(--brand) 45%, #28a05d 100%);
}

/* El tiburón del logotipo, como marca de agua */
.x-hero::before {
  content: '';
  position: absolute;
  top: 8px;
  right: -90px;
  width: 360px;
  height: 160px;
  background: url("../img/shark_mark.png") center / contain no-repeat;
  opacity: 0.09;
  transform: rotate(-8deg);
  pointer-events: none;
  animation: x-shark-float 7s ease-in-out infinite;
}

/* El tiburón de la portada flota: sube y baja con un leve balanceo */
@keyframes x-shark-float {
  0%, 100% { transform: translate(0, 0) rotate(-8deg); }
  25% { transform: translate(-14px, -12px) rotate(-5deg); }
  50% { transform: translate(-26px, 4px) rotate(-9deg); }
  75% { transform: translate(-12px, 12px) rotate(-6deg); }
}

@media (prefers-reduced-motion: reduce) {
  .x-hero::before {
    animation: none;
  }
}

.x-hero::after {
  content: '';
  position: absolute;
  left: -110px;
  bottom: -130px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.x-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

/* Sin esto, la fila de pasos (que se desliza) ensancharía toda la página en celular */
.x-hero-inner > * {
  min-width: 0;
}

.x-eyebrow {
  margin-bottom: 8px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(var(--ink-rgb), 0.72);
}

.x-hero-title {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: clamp(2rem, 8.6vw, 3.5rem);
  font-weight: 900;
  line-height: 1.22;
  text-wrap: balance;
}

/* El premio va resaltado como etiqueta negra */
.x-hero-title span {
  display: inline-block;
  margin-top: 0.08em;
  padding: 0 0.2em 0.04em;
  border-radius: 0.18em;
  background: var(--ink);
  color: #ffffff;
  transform: rotate(-2deg);
}

.x-hero-sub {
  max-width: 46ch;
  font-size: 1.02rem;
  font-weight: 500;
  color: rgba(var(--ink-rgb), 0.86);
}

.x-hero-sub strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
}

/* El logotipo va donde antes estaba el texto "Stand Edward Lemon Shark" */
.x-hero-logo {
  display: block;
  width: min(230px, 62vw);
  height: auto;
  margin-bottom: 16px;
  padding: 10px 16px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 12px 26px -16px rgba(var(--ink-rgb), 0.55);
}

.x-hero-side {
  display: grid;
  gap: 14px;
}

/* Tarjeta del juego */
.x-play {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 18px 18px;
  border-radius: 22px;
  color: #ffffff;
  text-align: center;
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(var(--brand-rgb), 0.42) 0%, rgba(var(--brand-rgb), 0) 62%),
    var(--ink);
  box-shadow: 0 24px 50px -20px rgba(var(--ink-rgb), 0.75);
}

.x-play h2 {
  color: #ffffff;
  font-size: 1.4rem;
  line-height: 1.15;
}

.x-play-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(90, 216, 147, 0.14);
  color: var(--brand-bright);
  font-size: 2.1rem;
}

.x-status-text {
  font-size: 0.95rem;
  color: #cbd6d0;
}

.x-status-note {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand-bright);
}

.x-play-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #9fb0a7;
}

.x-play .x-link-btn {
  padding: 4px 8px;
  color: var(--brand-bright);
}

.x-play-me {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
}

.x-play-avatar {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.15rem;
}

.x-play-who {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.x-play-who b,
.x-play-who small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.x-play-who b {
  font-family: var(--font-heading);
  font-size: 1.05rem;
}

.x-play-who small {
  font-size: 0.76rem;
  color: #9fb0a7;
}

.x-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

.x-stats div {
  padding: 10px 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.x-stats span {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9fb0a7;
}

.x-stats b {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--brand-bright);
  font-variant-numeric: tabular-nums;
}

/* Ranking */
.x-ranking {
  box-shadow: 0 24px 50px -24px rgba(var(--ink-rgb), 0.55);
}

.x-ranking-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.x-ranking-head h2 {
  font-size: 1.15rem;
}

.x-ranking-head span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.x-ranking-list {
  list-style: none;
  display: grid;
  gap: 6px;
}

.x-ranking-list li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f5f8f6;
}

/* En la portada solo se ven los primeros lugares (y siempre el propio) */
.x-ranking-list.is-collapsed li:nth-child(n + 6):not(.is-me) {
  display: none;
}

.x-ranking-list li.is-me {
  background: var(--brand-light);
  box-shadow: inset 0 0 0 2px var(--brand-border);
}

.x-ranking-list li.is-outside {
  margin-top: 6px;
}

.x-ranking-list li.x-ranking-empty {
  display: block;
  padding: 16px 8px;
  background: none;
  text-align: center;
  color: var(--text-muted);
}

.x-ranking-more {
  display: block;
  margin: 6px auto -6px;
}

.x-rank-pos {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--border-light);
  border-radius: 50%;
  background: #ffffff;
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
}

.x-ranking-list li:nth-child(-n + 3):not(.is-outside) .x-rank-pos {
  background: var(--brand);
  border-color: var(--brand);
}

.x-rank-who {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.x-rank-who b,
.x-rank-who small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.x-rank-who b {
  font-size: 0.92rem;
  color: var(--ink);
}

.x-rank-who small {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.x-rank-time {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--brand-deep);
  font-variant-numeric: tabular-nums;
}

/* ---------- Registro (ventana) ---------- */
.x-register-overlay {
  z-index: 1100;
}

.x-register {
  max-width: 460px;
  padding: 26px 22px 22px;
}

.modal-close-btn .x-ico {
  width: 16px;
  height: 16px;
  stroke-width: 2.6;
}

.x-form h2 {
  margin: 0 36px 4px 0;
  font-size: 1.45rem;
  line-height: 1.15;
}

.x-form-sub {
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.x-field {
  min-width: 0;
  margin-bottom: 12px;
}

.x-field label {
  display: block;
  margin-bottom: 5px;
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--ink);
}

.x-field label span {
  font-weight: 500;
  color: var(--text-sub);
}

.x-input {
  position: relative;
}

.x-input .x-ico {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 18px;
  height: 18px;
  color: var(--text-sub);
  transform: translateY(-50%);
  pointer-events: none;
  transition: color 0.2s;
}

.x-input:focus-within .x-ico {
  color: var(--brand-dark);
}

.x-field input,
.x-feedback textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  background: #f6f9f7;
  color: var(--text-main);
  font: inherit;
  font-size: 1rem; /* 16 px: evita el zoom automático de iPhone al escribir */
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.x-input input {
  padding-left: 40px;
}

.x-field input:focus,
.x-feedback textarea:focus {
  background: #ffffff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.2);
}

.x-field input.is-invalid {
  border-color: #dc2626;
  background: #fff5f5;
}

.x-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end; /* Los campos quedan a la misma altura aunque una etiqueta ocupe dos renglones */
  gap: 10px;
}

.x-form-error {
  margin-bottom: 12px;
  padding: 9px 12px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.86rem;
  font-weight: 600;
}

.x-legal {
  margin-top: 10px;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text-sub);
}

/* ---------- Secciones ---------- */
.x-section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 34px 16px 0;
}

.x-section-head {
  margin-bottom: 16px;
}

.x-kicker {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--brand-light);
  color: var(--brand-deep);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.x-kicker-light {
  background: var(--brand);
  color: var(--ink);
}

.x-section-head h2 {
  font-size: clamp(1.5rem, 5.8vw, 2.1rem);
  line-height: 1.12;
}

.x-section-head p {
  margin-top: 4px;
  color: var(--text-muted);
}

.x-card {
  min-width: 0;
  padding: 18px;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: 20px;
  box-shadow: var(--shadow-subtle);
}

.x-skeleton {
  width: 100%;
  min-height: 220px;
  border-radius: 14px;
  background: linear-gradient(90deg, #eef2ef 0%, #e1e8e3 50%, #eef2ef 100%);
  background-size: 200% 100%;
  animation: x-shimmer 1.3s ease-in-out infinite;
}

.x-skeleton-dark {
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.05) 100%);
}

/* ---------- Carrusel infinito de lanzamientos ---------- */
.x-carousel {
  position: relative;
}

.x-carousel-viewport {
  overflow: hidden;
  border-radius: 22px;
  touch-action: pan-y; /* El dedo mueve la página en vertical; en horizontal, el carrusel */
  cursor: grab;
}

.x-carousel-viewport:active {
  cursor: grabbing;
}

.x-carousel-track {
  display: flex;
  gap: 14px;
  will-change: transform;
  -webkit-user-select: none;
  user-select: none;
}

.x-carousel-track.is-animated {
  transition: transform 0.5s cubic-bezier(0.22, 0.8, 0.26, 1);
}

/* Cuando todos los modelos caben a la vez no hay vuelta ni copias */
.x-carousel.is-static .x-carousel-viewport {
  cursor: default;
}

.x-carousel.is-static .x-carousel-track {
  justify-content: center;
  transform: none !important;
}

.x-carousel.is-static .x-slide.is-clone {
  display: none;
}

.x-slide {
  flex: 0 0 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: 22px;
}

.x-slide-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 5 / 4;
  padding: 16px;
  border: 0;
  background: radial-gradient(120% 95% at 50% 38%, #ffffff 0%, #ffffff 46%, #e9f1ec 100%);
  cursor: pointer;
}

.x-slide-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 0.35s ease;
  -webkit-user-drag: none;
  pointer-events: none;
}

.x-slide-media:hover img {
  transform: scale(1.04);
}

.x-slide-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--ink);
  color: var(--brand-bright);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.x-slide-nophoto {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--text-sub);
  font-weight: 700;
  font-size: 0.86rem;
}

.x-slide-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 16px 16px;
  border-top: 1.5px solid #eef2ef;
}

.x-slide-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.x-slide-line::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line, var(--brand));
}

.x-slide-info h3 {
  font-size: 1.15rem;
  line-height: 1.2;
}

.x-slide-info p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.x-slide-info .x-btn {
  margin-top: auto;
}

.x-slide-info p + .x-btn,
.x-slide-info h3 + .x-btn {
  margin-top: 6px;
}

.x-slide-empty,
.x-slide-loading {
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 260px;
  padding: 30px 20px;
  text-align: center;
  color: var(--text-muted);
}

.x-slide-loading {
  padding: 16px;
}

.x-slide-empty strong {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--ink);
}

.x-slide-empty-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-size: 2.3rem;
}

.x-carousel-arrow {
  position: absolute;
  top: 36%;
  z-index: 3;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(var(--ink-rgb), 0.24);
  transform: translateY(-50%);
  cursor: pointer;
}

.x-carousel-arrow:hover {
  background: var(--brand);
}

.x-prev {
  left: 8px;
}

.x-next {
  right: 8px;
}

.x-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.x-carousel-dots button {
  position: relative;
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--border-subtle);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

/* Zona táctil más grande que el punto */
.x-carousel-dots button::before {
  content: '';
  position: absolute;
  inset: -10px -4px;
}

.x-carousel-dots button.is-active {
  width: 24px;
  background: var(--brand);
}

.x-carousel-count {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.86rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- Reglas de la dinámica ---------- */
.x-rules {
  padding: 20px 18px;
  border: 1.5px solid var(--brand-border);
  border-radius: 22px;
  background: var(--brand-light);
  color: var(--ink);
}

.x-rules-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.x-rules-icon {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: var(--ink);
  font-size: 1.9rem;
}

.x-rules .x-kicker {
  margin-bottom: 4px;
  background: #ffffff;
}

.x-rules h2 {
  font-size: 1.45rem;
  line-height: 1.15;
}

.x-rules-head p {
  font-weight: 700;
  color: var(--brand-deep);
}

.x-rules-list {
  list-style: none;
  counter-reset: rule;
  display: grid;
  gap: 10px;
}

.x-rules-list li {
  position: relative;
  counter-increment: rule;
  padding: 12px 12px 12px 50px;
  border-radius: 14px;
  background: #ffffff;
  font-size: 0.92rem;
  line-height: 1.4;
}

.x-rules-list li::before {
  content: counter(rule);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.9rem;
}

.x-rules-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.x-rules-note {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-deep);
}

/* ---------- Memorama: juego a pantalla completa ---------- */
.x-game {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
  color: #ffffff;
  background: radial-gradient(120% 70% at 50% 0%, #1d4d35 0%, #0f1b15 55%, #0a110d 100%);
}

.x-game-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}

.x-game-close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 1.1rem;
  cursor: pointer;
}

.x-game-close .x-ico {
  stroke-width: 2.6;
}

.x-game-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.09);
  line-height: 1.15;
}

.x-game-stat span {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9fb0a7;
}

.x-game-stat b {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--brand-bright);
  font-variant-numeric: tabular-nums;
}

/* Pista: barra que se consume mientras las cartas están a la vista */
.x-game-hintbar {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--brand-bright);
  transform-origin: left center;
}

.x-game-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 6px 12px 16px;
}

.x-board {
  --cols: 4;
  --rows: 4;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: 8px;
  width: min(100%, calc((100vh - 150px) * var(--cols) / var(--rows)), 560px);
  width: min(100%, calc((100dvh - 150px) * var(--cols) / var(--rows)), 560px);
}

.x-board.is-wide {
  width: min(100%, calc((100vh - 150px) * var(--cols) / var(--rows)), 860px);
  width: min(100%, calc((100dvh - 150px) * var(--cols) / var(--rows)), 860px);
}

.x-mcard {
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  perspective: 600px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.x-mcard-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.3s cubic-bezier(0.3, 0.7, 0.3, 1);
}

.x-mcard.is-flipped .x-mcard-inner {
  transform: rotateY(180deg);
}

.x-mcard-back,
.x-mcard-front {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Reverso: el tiburón del logotipo sobre el verde de la marca */
.x-mcard-back {
  border: 2px solid rgba(255, 255, 255, 0.3);
  background:
    url("../img/shark_mark.png") center / 76% no-repeat,
    linear-gradient(140deg, #45c781, var(--brand-dark));
}

.x-mcard-front {
  border: 2px solid #ffffff;
  background: #ffffff;
  transform: rotateY(180deg);
}

.x-mcard-front img {
  width: 92%;
  height: 92%;
  object-fit: contain;
}

.x-mcard.is-matched .x-mcard-front {
  border-color: var(--brand-bright);
  box-shadow: 0 0 0 3px rgba(90, 216, 147, 0.55);
  animation: x-pop 0.35s ease;
}

.x-game-message {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  overflow-y: auto;
  text-align: center;
}

.x-game-message.is-visible {
  display: flex;
}

.x-game-message.is-over {
  background: rgba(10, 17, 13, 0.93);
}

.x-game-message h3 {
  color: #ffffff;
  font-size: 1.55rem;
}

.x-game-message p {
  max-width: 34ch;
  color: #cbd6d0;
}

.x-game-message .x-countdown {
  font-family: var(--font-heading);
  font-size: 6.5rem;
  font-weight: 900;
  line-height: 1;
  color: var(--brand-bright);
  animation: x-zoom 0.5s ease;
}

.x-result-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(90, 216, 147, 0.14);
  color: var(--brand-bright);
  font-size: 2.4rem;
}

.x-result-icon.is-win {
  background: var(--brand);
  color: var(--ink);
  animation: x-ico-float 3.2s ease-in-out infinite;
}

.x-game-message .x-result-time {
  font-family: var(--font-heading);
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.x-game-message .x-result-sub {
  font-size: 0.85rem;
}

.x-intro-list {
  list-style: none;
  display: grid;
  gap: 8px;
  width: min(100%, 360px);
  margin: 6px 0 2px;
  text-align: left;
}

.x-intro-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.9rem;
  line-height: 1.35;
  color: #dbe5df;
}

.x-intro-list .x-ico {
  margin-top: 1px;
  width: 20px;
  height: 20px;
  color: var(--brand-bright);
}

.x-intro-list b {
  color: #ffffff;
}

.x-game-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.x-spinner {
  width: 38px;
  height: 38px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--brand-bright);
  border-radius: 50%;
  animation: x-spin 0.8s linear infinite;
}

/* ---------- Premio ---------- */
.x-prize-wrap {
  padding-top: 18px;
  padding-bottom: 18px;
}

.x-prize {
  display: grid;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(140deg, #3ab873, var(--brand) 55%, #28a05d);
  color: var(--ink);
  box-shadow: 0 18px 40px -16px rgba(var(--brand-rgb), 0.8);
}

.x-prize.is-delivered {
  border: 1.5px solid var(--brand-border);
  background: var(--brand-light);
  box-shadow: none;
}

.x-prize-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  background: var(--ink);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.x-prize-tag .x-ico {
  width: 15px;
  height: 15px;
  color: var(--brand-bright);
}

.x-prize h2 {
  font-size: clamp(1.6rem, 6.4vw, 2.2rem);
  line-height: 1.1;
  margin-bottom: 6px;
}

.x-prize-qr {
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
}

.x-qr {
  width: 190px;
  height: 190px;
}

.x-qr svg {
  display: block;
  width: 100%;
  height: 100%;
}

.x-qr-fallback {
  display: grid;
  place-items: center;
  height: 100%;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.x-prize-code {
  font-family: ui-monospace, 'Cascadia Mono', Menlo, monospace;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--ink);
}

/* ---------- Match perfecto ---------- */
.x-quiz {
  padding: 18px 16px 20px;
}

.x-quiz-progress {
  display: flex;
  gap: 5px;
  margin-bottom: 12px;
}

.x-quiz-progress i {
  flex: 1;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--border-light);
}

.x-quiz-progress i.is-done {
  background: var(--brand);
}

.x-quiz-progress i.is-current {
  background: var(--ink);
}

.x-quiz-count {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-dark);
}

.x-quiz-title {
  margin: 4px 0 14px;
  font-size: 1.3rem;
  line-height: 1.2;
}

.x-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.x-options.is-odd .x-option:last-child {
  grid-column: 1 / -1;
}

.x-option {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 8px;
  border: 2px solid var(--border-light);
  border-radius: 16px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.x-option:hover {
  border-color: var(--brand-border);
}

.x-option:active {
  transform: scale(0.98);
}

.x-option.is-selected {
  border-color: var(--brand);
  background: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.2);
}

.x-option-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f1f5f2;
  color: var(--ink);
  font-size: 1.85rem;
  transition: background 0.2s, transform 0.2s;
}

.x-option:hover .x-option-icon {
  transform: translateY(-2px);
}

.x-option.is-selected .x-option-icon:not(.is-swatch) {
  background: var(--brand);
}

.x-option-icon.is-swatch {
  border: 2px solid rgba(var(--ink-rgb), 0.12);
  background: var(--swatch, #f1f5f2);
  font-size: 1.5rem;
}

.x-option-icon.is-swatch .x-ico {
  stroke-width: 2.8;
}

.x-option-label {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;
  text-align: center;
}

.x-quiz-note {
  min-height: 46px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed transparent;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: transparent;
}

.x-quiz-note.is-visible {
  border-color: var(--brand-border);
  background: var(--brand-light);
  color: var(--brand-deep);
}

.x-quiz-nav {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.x-quiz-nav .x-btn {
  flex: 1;
}

.x-quiz-loading {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  font-weight: 600;
  color: var(--text-muted);
}

.x-quiz-loading .x-spinner {
  border-color: var(--brand-light);
  border-top-color: var(--brand);
}

.x-result-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  color: #ffffff;
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(var(--brand-rgb), 0.4) 0%, rgba(var(--brand-rgb), 0) 60%),
    var(--ink);
}

.x-result-profile-icon {
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: var(--ink);
  font-size: 2rem;
}

.x-result-profile small {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-bright);
}

.x-result-profile h3 {
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1.15;
}

.x-result-profile p {
  margin-top: 2px;
  font-size: 0.9rem;
  color: #cbd6d0;
}

.x-result-notes {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.x-result-notes li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: #f5f8f6;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.x-note-mark {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand-deep);
  font-size: 1.05rem;
}

.x-note-mark.is-swatch {
  border: 2px solid rgba(var(--ink-rgb), 0.12);
  background: var(--swatch, var(--brand-light));
}

.x-result-notes b {
  color: var(--ink);
}

.x-result-heading {
  margin: 18px 0 10px;
  font-size: 1.15rem;
}

.x-result-main {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 2px solid var(--brand);
  border-radius: 16px;
  background: #f6fcf8;
}

.x-result-photo {
  aspect-ratio: 1;
  padding: 6px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
}

.x-result-photo img,
.x-result-mini img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.x-result-tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: var(--brand);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.x-result-main h3 {
  margin: 6px 0 4px;
  font-size: 1.1rem;
  line-height: 1.2;
}

.x-result-main p {
  margin-bottom: 8px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.x-result-also {
  margin: 14px 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.x-result-more {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.x-result-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
  border: 1.5px solid var(--border-light);
  border-radius: 14px;
  background: #ffffff;
  font: inherit;
  cursor: pointer;
}

.x-result-mini img {
  height: auto;
  aspect-ratio: 4 / 3;
}

.x-result-mini span {
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.2;
  text-align: center;
  color: var(--ink);
}

.x-result-empty {
  padding: 18px 0;
  text-align: center;
  color: var(--text-muted);
}

.x-product-highlight {
  margin-bottom: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brand-dark);
}

/* ---------- Contacto ---------- */
.x-contact {
  display: grid;
  gap: 16px;
  padding: 24px 20px;
  border-radius: 22px;
  color: #ffffff;
  background:
    radial-gradient(80% 130% at 100% 0%, rgba(var(--brand-rgb), 0.45) 0%, rgba(var(--brand-rgb), 0) 60%),
    var(--ink);
}

.x-contact h2 {
  margin: 2px 0 6px;
  color: #ffffff;
  font-size: clamp(1.5rem, 5.8vw, 2rem);
  line-height: 1.12;
}

.x-contact p {
  color: #cbd6d0;
}

.x-contact .x-btn-whatsapp {
  min-height: 54px;
  font-size: 1.05rem;
}

/* ---------- Comentarios ---------- */
.x-feedback {
  text-align: center;
}

.x-feedback h2 {
  font-size: 1.4rem;
}

.x-feedback > p {
  margin: 4px 0 12px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.x-stars {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 12px;
}

.x-star {
  padding: 5px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--border-subtle);
  cursor: pointer;
}

.x-star svg {
  display: block;
  fill: currentColor;
  transition: transform 0.15s ease;
}

.x-star:active svg {
  transform: scale(1.2);
}

.x-star.is-on {
  color: var(--gold);
}

.x-feedback textarea {
  min-height: 84px;
  margin-bottom: 12px;
  resize: vertical;
}

.x-feedback .x-form-error {
  text-align: left;
}

.x-feedback-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 0;
}

.x-feedback-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-size: 2rem;
}

.x-feedback-done strong {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--ink);
}

/* ---------- Pie y navegación inferior ---------- */
.x-footer {
  padding: 36px 16px 28px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.x-footer img {
  width: auto;
  height: 86px;
  margin-bottom: 6px;
  mix-blend-mode: multiply;
}

.x-footer-note {
  margin-top: 4px;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--text-sub);
}

.x-footer-note b {
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* ---------- Tiburones que nadan por el fondo claro ---------- */
.x-body main {
  position: relative;
}

.x-swim {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.x-swim-shark {
  position: absolute;
  left: 0;
  width: clamp(130px, 38vw, 380px);
  height: auto;
  opacity: 0.075;
  will-change: transform;
}

/* La portada (verde) y las secciones quedan por encima; los tiburones se ven en el fondo claro */
.x-hero,
.x-section {
  position: relative;
  z-index: 1;
}

/* Diez tiburones repartidos a lo largo de la página (en celular son más chicos, pero se notan más) */
.x-swim-a { top: 16%; animation: x-swim-left 46s linear infinite; }
.x-swim-b { top: 26%; width: clamp(110px, 30vw, 300px); animation: x-swim-right 62s linear -20s infinite; }
.x-swim-c { top: 36%; width: clamp(150px, 44vw, 460px); animation: x-swim-left 74s linear -38s infinite; }
.x-swim-d { top: 46%; width: clamp(120px, 34vw, 340px); animation: x-swim-right 56s linear -8s infinite; }
.x-swim-e { top: 55%; width: clamp(110px, 32vw, 320px); animation: x-swim-left 66s linear -50s infinite; }
.x-swim-f { top: 64%; animation: x-swim-right 70s linear -14s infinite; }
.x-swim-g { top: 73%; width: clamp(150px, 42vw, 420px); animation: x-swim-left 60s linear -26s infinite; }
.x-swim-h { top: 82%; width: clamp(110px, 30vw, 300px); animation: x-swim-right 54s linear -34s infinite; }
.x-swim-i { top: 90%; animation: x-swim-left 72s linear -4s infinite; }
.x-swim-j { top: 96%; width: clamp(120px, 34vw, 340px); animation: x-swim-right 58s linear -42s infinite; }

/* Celular: los tiburones de fondo no se usan (las tarjetas los tapaban y encima estorbaban al leer).
   En su lugar nadan por franjas libres entre secciones, donde no hay texto. */
.x-lane {
  display: none;
}

@media (max-width: 699px) {
  .x-swim {
    display: none;
  }
  .x-lane {
    position: relative;
    z-index: 1;
    display: block;
    height: 54px;
    overflow: hidden;
    pointer-events: none;
  }
  .x-lane img {
    position: absolute;
    top: 8px;
    left: 0;
    width: 104px;
    height: auto;
    opacity: 0.3;
    will-change: transform;
    animation: x-lane-left 22s linear infinite;
  }
  .x-lane-right img {
    animation-name: x-lane-right;
    animation-duration: 26s;
  }
  .x-lane-slow img {
    width: 84px;
    animation-duration: 30s;
  }
}

@keyframes x-lane-left {
  0%   { transform: translate(calc(100vw + 10px), 0) rotate(-2deg); }
  50%  { transform: translate(calc(50vw - 52px), 6px) rotate(2deg); }
  100% { transform: translate(-130px, 0) rotate(-2deg); }
}

@keyframes x-lane-right {
  0%   { transform: translate(-130px, 0) scaleX(-1) rotate(-2deg); }
  50%  { transform: translate(calc(50vw - 52px), 6px) scaleX(-1) rotate(2deg); }
  100% { transform: translate(calc(100vw + 10px), 0) scaleX(-1) rotate(-2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .x-lane img {
    animation: none !important;
    transform: translateX(30vw);
  }
}

@keyframes x-swim-left {
  0%   { transform: translate(calc(100vw + 20px), 0) rotate(-3deg); }
  25%  { transform: translate(calc(70vw), -28px) rotate(2deg); }
  50%  { transform: translate(calc(40vw), 8px) rotate(-2deg); }
  75%  { transform: translate(calc(10vw), -24px) rotate(3deg); }
  100% { transform: translate(-480px, 0) rotate(-3deg); }
}

@keyframes x-swim-right {
  0%   { transform: translate(-480px, 0) scaleX(-1) rotate(-3deg); }
  25%  { transform: translate(calc(25vw), -24px) scaleX(-1) rotate(2deg); }
  50%  { transform: translate(calc(50vw), 10px) scaleX(-1) rotate(-2deg); }
  75%  { transform: translate(calc(80vw), -20px) scaleX(-1) rotate(3deg); }
  100% { transform: translate(calc(100vw + 20px), 0) scaleX(-1) rotate(-3deg); }
}

@media (prefers-reduced-motion: reduce) {
  .x-swim-shark {
    animation: none;
    transform: translateX(15vw);
  }
}

.x-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -6px 20px -10px rgba(var(--ink-rgb), 0.28);
}

.x-tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px;
  border-radius: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.x-tabbar a.is-active {
  color: var(--brand-dark);
}

.x-tabbar a.x-tabbar-main {
  border-radius: 16px;
  background: var(--brand);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(var(--brand-rgb), 0.5);
  transform: translateY(-10px);
}

.x-toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 1500;
  max-width: calc(100vw - 32px);
  padding: 11px 18px;
  border-radius: var(--radius-full);
  background: var(--ink);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 10px 30px rgba(var(--ink-rgb), 0.4);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.x-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Página del premio (premio.php) ---------- */
.x-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 22px 16px 40px;
  display: grid;
  gap: 16px;
}

.x-page-note {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.x-page-note h1 {
  margin-bottom: 6px;
  font-size: 1.5rem;
}

/* ---------- Pantallas anchas ---------- */
@media (min-width: 700px) {
  .x-slide {
    flex-basis: calc((100% - 14px) / 2);
  }
  .x-prize {
    grid-template-columns: 1fr auto;
    padding: 26px;
  }
  .x-rules-list {
    grid-template-columns: 1fr 1fr;
  }
  .x-options {
    grid-template-columns: repeat(3, 1fr);
  }
  .x-options.is-odd .x-option:last-child {
    grid-column: auto;
  }
  .x-result-main {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .x-contact {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 30px;
  }
  .x-quiz,
  .x-feedback {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px;
  }
  .x-register {
    padding: 30px 28px 26px;
  }
}

@media (min-width: 900px) {
  .x-body {
    padding-bottom: 0;
  }
  .x-tabbar {
    display: none;
  }
  .x-topbar {
    padding: 14px 28px;
  }
  .x-brand img {
    height: 26px;
  }
  .x-event-pill {
    font-size: 0.74rem;
  }
  .x-hero {
    padding: 52px 24px 60px;
  }
  .x-hero::before {
    top: auto;
    right: auto;
    left: 2%;
    bottom: 14px;
    width: 520px;
    height: 232px;
  }
  /* El mensaje a la izquierda y el juego con su ranking al costado */
  .x-hero-inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: 48px;
  }
  .x-play {
    padding: 28px 26px 22px;
  }
  .x-hero-logo {
    width: 270px;
    margin-bottom: 22px;
  }
  .x-section {
    padding-top: 52px;
  }
  .x-rules {
    padding: 26px;
  }
  .x-toast {
    bottom: 28px;
  }
}

@media (min-width: 1000px) {
  .x-slide {
    flex-basis: calc((100% - 28px) / 3);
  }
}

/* ---------- Animaciones ---------- */
@keyframes x-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.55; }
}

@keyframes x-spin {
  to { transform: rotate(360deg); }
}

@keyframes x-pop {
  0% { transform: rotateY(180deg) scale(0.85); }
  60% { transform: rotateY(180deg) scale(1.08); }
  100% { transform: rotateY(180deg) scale(1); }
}

@keyframes x-zoom {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes x-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

@keyframes x-hintbar {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .x-event-pill i,
  .x-skeleton,
  .x-result-icon.is-win {
    animation: none;
  }
  .x-mcard-inner {
    transition-duration: 0.01s;
  }
  .x-carousel-track.is-animated {
    transition-duration: 0.01s;
  }
}

/* ---------- "Intentos restantes": la etiqueta puede ocupar dos líneas sin descuadrar las tarjetas ---------- */
.x-stats div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
}

.x-stats span {
  line-height: 1.2;
}

/* ---------- Foto del ganador con su premio ---------- */
.x-prize-photo {
  grid-column: 1 / -1;
}

.x-photo {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding-top: 14px;
  border-top: 1px dashed var(--brand-border);
}

.x-photo-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
}

.x-photo-note {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.x-photo-img,
.x-photo-preview {
  width: min(100%, 320px);
  max-height: 380px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 12px 28px -16px rgba(var(--ink-rgb), 0.5);
}

.x-photo-form {
  display: grid;
  gap: 10px;
  justify-items: start;
  width: 100%;
}

.x-photo-pick {
  cursor: pointer;
}

.x-photo-pick .x-btn {
  gap: 8px;
}

.x-photo-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 460px;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--ink);
  cursor: pointer;
}

.x-photo-consent input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--brand-dark);
}

.x-photo-form .x-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- Botones para compartir ---------- */
.x-share {
  display: grid;
  gap: 8px;
  width: 100%;
}

.x-share-label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.x-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.x-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border: 1.5px solid rgba(var(--ink-rgb), 0.14);
  border-radius: var(--radius-full);
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.x-share-btn:hover {
  border-color: var(--ink);
}

.x-share-btn.is-whatsapp { background: #25d366; border-color: #25d366; color: #06310f; }
.x-share-btn.is-facebook { background: #1877f2; border-color: #1877f2; color: #ffffff; }
.x-share-btn.is-x { background: #101613; border-color: #101613; color: #ffffff; }
.x-share-btn.is-native { background: var(--brand); border-color: var(--brand); }

.x-share-btn:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* ---------- Ganadores (galería) ---------- */
.x-winners {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}

.x-winner-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 12px 12px 16px;
  overflow: hidden;
}

.x-winner-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 14px;
  background: var(--brand-light);
}

.x-winner-info h3,
.x-winner-info h1 {
  margin: 0 0 2px;
  font-size: 1.15rem;
  line-height: 1.2;
}

.x-winner-info p {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.x-winner-solo {
  max-width: 460px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .x-winners {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .x-winners {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
