/* Sorteos en nima3d.es (web-sorteos): la lista, cada sorteo con su formulario, la página de
   quien participa y las bases (estas, con el aspecto de las páginas legales). */

/* ── La lista ──────────────────────────────────────────────────────────── */
.st-grupo-titulo {
  font-size: 12px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 14px;
}
.st-grupo-titulo:not(:first-child) { margin-top: 40px; }
.st-tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.st-tarjeta {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  color: var(--text, #111); text-decoration: none; min-width: 0;
  transition: border-color .2s ease, box-shadow .2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .st-tarjeta:hover { border-color: var(--gold); box-shadow: 0 10px 24px rgba(0,0,0,.08); }
}
.st-tarjeta:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.st-tarjeta-img {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3;
  background: var(--paper-2); overflow: hidden;
}
.st-tarjeta-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-tarjeta-img .ti { font-size: 56px; color: var(--gold); }
.st-tarjeta-txt { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.st-tarjeta-titulo { font-size: 17px; font-weight: 900; line-height: 1.2; }
.st-tarjeta-premio { font-size: 13px; color: var(--text-2); line-height: 1.4; }
.st-tarjeta-pie { font-size: 12px; color: var(--muted); margin-top: 4px; }
.st-tarjeta--cerrado, .st-tarjeta--sorteado { opacity: .8; }

.st-chapa {
  align-self: flex-start; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
  padding: 3px 8px; background: var(--paper-2); color: var(--text-2);
}
.st-chapa--abierto { background: var(--gold); color: #111; }
.st-chapa--pronto { background: #111; color: var(--gold); }

.st-vacio { text-align: center; padding: 48px 16px; color: var(--muted); }
.st-vacio .ti { font-size: 48px; color: var(--gold); display: block; margin-bottom: 10px; }

/* ── Un sorteo ─────────────────────────────────────────────────────────── */
.st-cuerpo { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 48px; align-items: start; }
.st-lado { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 16px; }

.st-premio { margin: 0; background: #fff; border: 1px solid var(--line); }
.st-premio-img { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; background: var(--paper-2); overflow: hidden; }
.st-premio-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-premio-img .ti { font-size: 80px; color: var(--gold); }
.st-premio figcaption { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.st-premio-nombre { font-size: 18px; font-weight: 900; line-height: 1.25; }
.st-premio-valor { font-size: 13px; color: var(--muted); }

.st-reloj { background: #111; color: #fff; padding: 14px 16px 16px; }
.st-reloj-titulo { display: block; font-size: 10px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.st-reloj-cifras { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0 8px; text-align: center; }
.st-reloj-cifras span { display: flex; flex-direction: column; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.st-reloj-cifras b { font-size: 28px; font-weight: 900; line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; }
.st-reloj-fecha { display: block; font-size: 12px; color: rgba(255,255,255,.75); }
.st-reloj.is-fin .st-reloj-cifras b { color: var(--gold); }

.st-cifras { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--text-2); }
.st-cifras b { font-size: 18px; font-weight: 900; color: var(--text, #111); }

.st-compartir { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.st-compartir-titulo { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.st-compartir a, .st-compartir button {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 1px solid var(--line); background: #fff; color: var(--text, #111); font-size: 19px; cursor: pointer;
  text-decoration: none; transition: border-color .2s ease, color .2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .st-compartir a:hover, .st-compartir button:hover { border-color: var(--gold); color: #000; }
}
.st-compartir .is-copiado { border-color: var(--gold); background: var(--gold); }

.st-verificacion { border: 1px solid var(--line); background: var(--paper-3, #FAF7F0); padding: 10px 14px; font-size: 12px; color: var(--text-2); }
.st-verificacion summary { cursor: pointer; font-weight: 800; color: var(--text, #111); list-style-position: inside; }
.st-verificacion summary .ti { color: var(--gold); }
.st-verificacion code {
  display: block; margin: 6px 0; padding: 6px 8px; background: #fff; border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; word-break: break-all;
}
.st-verificacion p { margin: 8px 0 0; line-height: 1.55; }
.st-verificacion a { color: inherit; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }

.st-descripcion { font-size: 15px; line-height: 1.75; color: var(--text-2); margin-bottom: 26px; max-width: 680px; }
.st-aviso { display: flex; gap: 12px; align-items: flex-start; background: #fff; border-left: 3px solid var(--gold); padding: 14px 16px; margin-bottom: 20px; }
.st-aviso .ti { font-size: 22px; color: var(--gold); flex: none; }
.st-aviso p { margin: 0; font-size: 14px; line-height: 1.6; }

/* Hecho el sorteo: quién ha ganado, los suplentes y el enlace para comprobarlo. */
.st-resultado { display: flex; flex-direction: column; gap: 12px; background: #111; color: #fff; border-top: 3px solid var(--gold); padding: 20px 22px; margin-bottom: 20px; }
.st-ganador { display: flex; align-items: center; gap: 14px; }
.st-ganador .ti { font-size: 36px; color: var(--gold); flex: none; }
.st-ganador div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-ganador small { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.st-ganador strong { font-size: 26px; font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; }
.st-suplentes, .st-resultado-pie { margin: 0; font-size: 13px; line-height: 1.6; color: rgba(255,255,255,.75); }
.st-resultado-pie a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

/* ── El formulario ─────────────────────────────────────────────────────── */
.st-form { scroll-margin-top: calc(var(--header-h) + 20px); }
.st-form-titulo { margin: 0 0 14px; }
.st-invitado { display: flex; gap: 8px; align-items: center; font-size: 13px; background: rgba(239,184,20,.14); padding: 9px 12px; margin: 0 0 14px; }
.st-invitado .ti { font-size: 18px; color: #8a6a00; }

.st-pasos { list-style: none; margin: 0 0 22px; padding: 0; counter-reset: paso; display: flex; flex-direction: column; gap: 8px; }
.st-paso {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  background: #fff; border: 1px solid var(--line); padding: 10px 12px;
}
.st-paso-acciones { display: flex; align-items: center; gap: 8px; }
.st-paso--extra { border-style: dashed; }
.st-paso-ico { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: #111; color: var(--gold); font-size: 20px; }
.st-paso-txt { font-size: 14px; font-weight: 700; line-height: 1.35; }
.st-paso-txt small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.st-paso--extra .st-paso-txt small { color: #8a6a00; }
.st-paso-ir {
  display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; font-size: 12px; font-weight: 800;
  border: 1px solid var(--line); color: var(--text, #111); text-decoration: none; white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  .st-paso-ir:hover { border-color: var(--gold); }
}
.st-paso-hecho {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; font-size: 12px; font-weight: 800;
  background: var(--paper-2); cursor: pointer; white-space: nowrap; user-select: none;
}
.st-paso-hecho input { width: 16px; height: 16px; margin: 0; accent-color: #111; }
.st-paso-hecho:has(input:checked) { background: var(--gold); }
/* Los que se marcan al abrir su enlace: la casilla no se toca; si se intenta, se señala «Abrir». */
.st-paso-hecho.is-al-abrir { cursor: default; }
.st-paso-ir.is-avisando { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.st-pasos.is-error .st-paso:has(input[required]:not(:checked)) { border-color: var(--danger, #C0392B); }
/* El paso de buscar: la pista y cuántos llevas (lo cuenta sorteos.js). */
.st-paso-txt small.st-pista, .st-yo-pasos small.st-pista { color: var(--text-2); font-weight: 500; line-height: 1.5; }
.st-yo-pasos small.st-pista { display: block; margin-top: 2px; font-size: 12px; }
.st-encontrados {
  display: inline-flex; align-items: center; padding: 7px 10px; font-size: 12px; font-weight: 800; white-space: nowrap;
  background: var(--paper-2); font-variant-numeric: tabular-nums;
}
.st-encontrados.is-completo { background: var(--gold); color: #111; }
/* Los pasos de las redes que comprueba la web: «Comprobar» → «Hecho», y por qué no si no. */
.st-auto {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 0; font: inherit; font-size: 12px; font-weight: 800;
  background: var(--paper-2); color: var(--text, #111); cursor: pointer; white-space: nowrap;
}
.st-auto:disabled { cursor: progress; opacity: .7; }
.st-auto.is-completo { background: var(--gold); color: #111; }
.st-auto.is-apagado { cursor: default; color: var(--muted); font-weight: 700; }
.st-auto:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.st-paso-txt small.st-auto-aviso, .st-yo-caja .st-auto-aviso { color: var(--danger, #B83232); font-weight: 600; line-height: 1.45; }
.st-yo-caja .st-auto-aviso { display: block; font-size: 12px; }
.st-auto-aviso[hidden] { display: none; }
.st-comprobar-mios { align-self: flex-start; }

.st-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 16px; margin-bottom: 6px; }
.st-campos .field label .ti { color: var(--muted); }
.st-arroba { display: flex; align-items: stretch; }
.st-arroba > span { display: flex; align-items: center; padding: 0 10px; background: var(--paper-2); font-weight: 800; color: var(--muted); }
.st-arroba input { flex: 1; min-width: 0; }

.st-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; margin: 14px 0 0; cursor: pointer; }
.st-check input { width: 17px; height: 17px; margin: 1px 0 0; flex: none; accent-color: #111; }
.st-check a { color: inherit; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }

.st-boton { margin-top: 22px; }
.st-boton.is-cargando { opacity: .6; pointer-events: none; }
.st-nota { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.st-nota--redes { margin: 8px 0 0; }

.st-error { display: block; font-size: 12px; font-weight: 600; color: var(--danger, #C0392B); margin-top: 6px; }
.field.is-error input, .st-check.is-error input { outline: 2px solid var(--danger, #C0392B); outline-offset: 1px; }

.st-respuesta { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 14px 16px; background: #fff; border-left: 3px solid var(--gold); }
.st-respuesta[hidden] { display: none; }
.st-respuesta .ti { font-size: 24px; flex: none; color: var(--gold); }
.st-respuesta p { margin: 0; font-size: 14px; line-height: 1.6; }
.st-respuesta.is-error { border-left-color: var(--danger, #C0392B); }
.st-respuesta.is-error .ti { color: var(--danger, #C0392B); }
/* Apuntado: el formulario se recoge y queda el aviso del correo. */
.st-form.is-enviado .st-pasos, .st-form.is-enviado .st-campos, .st-form.is-enviado .st-check, .st-form.is-enviado .st-boton,
.st-form.is-enviado .st-nota, .st-form.is-enviado .st-invitado { display: none; }
.st-form.is-enviado .st-respuesta { margin-top: 0; padding: 22px 20px; }
.st-form.is-enviado .st-respuesta p { font-size: 15px; }

/* ── La participación de alguien ───────────────────────────────────────── */
.st-yo { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.st-yo-cuenta, .st-yo-caja { background: #fff; border: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.st-yo-cuenta { border-top: 3px solid var(--gold); }
.st-yo-numero { font-size: 64px; font-weight: 900; line-height: 1; }
.st-yo-desglose { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-2); line-height: 1.7; }
.st-yo-fecha, .st-yo-caja p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-2); }
.st-yo-fecha a { color: inherit; text-decoration: underline; text-decoration-color: var(--gold); }
.st-copiar { display: flex; gap: 6px; }
.st-copiar input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--paper-3, #FAF7F0); padding: 8px 10px; font-size: 13px; font-family: inherit; }
.st-yo-pasos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.st-yo-pasos li { display: flex; gap: 8px; align-items: center; }
.st-yo-pasos li > span { flex: 1; min-width: 0; }
.st-yo-pasos li .ti { font-size: 18px; color: var(--muted); }
.st-yo-pasos li.is-hecho .ti { color: #2e7d32; }
.st-yo-pasos a { font-size: 12px; font-weight: 800; color: inherit; text-decoration: underline; text-decoration-color: var(--gold); }
.st-yo-baja { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
/* Hecho el sorteo, lo primero: si ha ganado, si es suplente o si no. */
.st-yo-cuenta--resultado { grid-column: 1 / -1; }
.st-yo-titular { font-size: 28px; font-weight: 900; line-height: 1.1; }
.st-yo-cuenta--resultado > p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-2); }
.st-yo-cuenta--resultado.is-ganador { background: #111; color: #fff; border-color: #111; border-top-color: var(--gold); }
.st-yo-cuenta--resultado.is-ganador .st-yo-titular { color: var(--gold); }
.st-yo-cuenta--resultado.is-ganador > p { color: rgba(255,255,255,.8); }

/* ── Las bases ─────────────────────────────────────────────────────────── */
.st-bases ul { padding-left: 20px; }
.st-bases-volver { margin-top: 32px; }
.st-bases-volver a { font-weight: 800; color: inherit; text-decoration: none; border-bottom: 2px solid var(--gold); }

/* ── Comprobar el sorteo ───────────────────────────────────────────────── */
.st-pruebas { list-style: none; margin: 0; padding: 0; counter-reset: prueba; display: flex; flex-direction: column; gap: 16px; max-width: 980px; }
.st-prueba { position: relative; counter-increment: prueba; background: #fff; border: 1px solid var(--line); padding: 20px 22px 22px 74px; min-width: 0; }
.st-prueba::before {
  content: counter(prueba); position: absolute; left: 22px; top: 18px; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center; background: #111; color: var(--gold); font-size: 16px; font-weight: 900;
}
.st-prueba h2 { font-size: 18px; font-weight: 900; line-height: 1.25; margin: 5px 0 10px; }
.st-prueba p, .st-receta { font-size: 14px; line-height: 1.65; color: var(--text-2); margin: 0 0 10px; }
.st-prueba > :last-child { margin-bottom: 0; }
.st-prueba a { color: inherit; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.st-prueba .st-nota { font-size: 12px; color: var(--muted); }
.st-receta { list-style: disc; padding-left: 20px; }
.st-receta li + li { margin-top: 4px; }
.st-codigo {
  display: block; font-family: var(--font-mono); font-size: 12px; line-height: 1.5; word-break: break-all; color: var(--text, #111);
  background: var(--paper-3, #FAF7F0); border: 1px solid var(--line); padding: 8px 10px; margin: 0 0 10px;
}
.st-codigo--linea { display: inline; padding: 1px 5px; margin: 0; }
.st-ok, .st-cp-salida .st-ok { color: var(--success, #1A6B3A); font-weight: 700; }
.st-mal, .st-cp-salida .st-mal { color: var(--danger, #B83232); font-weight: 700; }
.st-lista summary { cursor: pointer; font-size: 14px; font-weight: 800; margin-bottom: 10px; }
.st-tabla-scroll { overflow-x: auto; margin: 0 0 10px; }
.st-lista .st-tabla-scroll { max-height: 420px; overflow-y: auto; }
.st-tabla { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.st-tabla th {
  position: sticky; top: 0; background: #fff; text-align: left; white-space: nowrap; padding: 6px 10px;
  font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--line);
}
.st-tabla td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.st-tabla td small { color: var(--muted); }
.st-mac { font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }
.st-mac span { color: var(--muted); }
.st-cp-salida { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.st-cp-salida[hidden] { display: none; }
.st-cp-salida p { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.st-cp-salida .ti { font-size: 19px; flex: none; }

/* ── En el móvil ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .st-cuerpo { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .st-lado { position: static; }
  .st-premio-img { aspect-ratio: 16 / 10; }
}
@media (max-width: 560px) {
  .st-paso { grid-template-columns: 36px minmax(0, 1fr); row-gap: 8px; }
  .st-paso-ico { width: 36px; height: 36px; font-size: 18px; }
  .st-paso-acciones { grid-column: 2; }
  .st-reloj-cifras b { font-size: 24px; }
  .st-ganador strong { font-size: 22px; }
  .st-yo-titular { font-size: 24px; }
  .st-prueba { padding: 16px; }
  .st-prueba::before { position: static; margin-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .st-tarjeta, .st-compartir a, .st-compartir button { transition: none; }
}
