:root {
  --tinta: #0b1b34;
  --tenue: #5c6b82;
  --linea: #e2e8f2;
  --azul: #1d4ed8;
  --oro: #b98b2f;
  --verde: #0e9f6e;
  --rojo: #b42318;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: #f6f8fc; color: var(--tinta);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cab {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: #0b1b34; color: #fff;
}
.marca { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 15px; }
.marca strong { color: #f3c969; font-weight: 700; }
.escudo {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 1px solid #f3c969; border-radius: 8px; color: #f3c969; font-size: 12px; font-weight: 700;
}
.cab nav a { color: #cfd8e6; text-decoration: none; font-size: 13px; margin-left: 16px; }
.cab nav a:hover { color: #fff; }

main { max-width: 1040px; margin: 0 auto; padding: 22px 18px 40px; }

.avisos { max-width: 1040px; margin: 14px auto 0; padding: 0 18px; }
.aviso { padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 8px; background: #eef2ff; color: #26326b; }
.aviso.error { background: #fef3f2; color: var(--rojo); }

.hero { text-align: center; margin-bottom: 18px; }
.et { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; color: var(--oro); font-weight: 700; margin: 0 0 6px; }
.hero h1 { margin: 0 0 8px; font-size: 30px; letter-spacing: -.02em; }
.sub { color: var(--tenue); font-size: 14px; margin: 0 auto; max-width: 560px; }
.contadores { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.contadores div {
  background: #fff; border: 1px solid var(--linea); border-radius: 12px;
  padding: 8px 16px; min-width: 92px; text-align: center;
}
.contadores strong { display: block; font-size: 20px; }
.contadores span { font-size: 11px; color: var(--tenue); text-transform: uppercase; letter-spacing: .06em; }

.tablero {
  display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px;
  background: #fff; border: 1px solid var(--linea); border-radius: 16px; padding: 14px;
}
@media (max-width: 640px) { .tablero { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.celda {
  aspect-ratio: 1 / 1; border-radius: 10px; border: 1px solid var(--linea);
  background: #fff; color: var(--tinta); font-size: 15px; font-weight: 600;
  font-variant-numeric: tabular-nums; cursor: pointer; transition: transform .12s, box-shadow .12s;
}
.celda.libre:hover { border-color: var(--azul); box-shadow: 0 4px 12px -6px rgba(29,78,216,.5); transform: translateY(-1px); }
.celda.apartado { background: #fff7e6; border-color: #f2d9a6; color: #8a5a00; cursor: not-allowed; }
.celda.comprado { background: #e8f7ef; border-color: #b7e4cd; color: #0b6b4a; cursor: not-allowed; font-weight: 700; }
.celda.elegido { background: var(--azul); border-color: var(--azul); color: #fff; }

.leyenda { display: flex; gap: 16px; justify-content: center; align-items: center; font-size: 12px; color: var(--tenue); margin: 14px 0 0; }
.chip { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; }
.chip.libre { background: #fff; border: 1px solid var(--linea); }
.chip.apartado { background: #fff7e6; border: 1px solid #f2d9a6; }
.chip.comprado { background: #e8f7ef; border: 1px solid #b7e4cd; }

.panel {
  background: #fff; border: 1px solid var(--linea); border-radius: 16px;
  padding: 18px; margin-top: 18px; max-width: 520px; margin-left: auto; margin-right: auto;
}
.panel.ancho { max-width: 100%; }
.panel.corto { max-width: 380px; }
.panel h1 { margin: 0 0 6px; font-size: 22px; }
.panel h2 { font-size: 15px; margin: 18px 0 8px; }
.panel label { display: block; font-size: 12px; color: var(--tenue); margin-bottom: 10px; }
.panel input {
  width: 100%; margin-top: 4px; padding: 10px 12px; font-size: 14px;
  border: 1px solid var(--linea); border-radius: 10px; background: #fbfcfe; color: var(--tinta);
}
.panel input:focus { outline: 2px solid #cfd9f7; border-color: var(--azul); }
.elegidos { font-size: 13px; color: var(--azul); font-weight: 600; margin: 0 0 10px; min-height: 18px; }
.total { font-size: 15px; }
.acciones { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }

.btn {
  display: inline-block; border: 0; border-radius: 10px; padding: 10px 16px;
  background: var(--azul); color: #fff; font-size: 14px; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.btn.suave { background: #eef2f9; color: var(--tinta); }
.btn.chico { padding: 6px 10px; font-size: 12px; }

.numeros-grandes { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.numeros-grandes .num {
  background: var(--tinta); color: #f3c969; font-weight: 700;
  border-radius: 10px; padding: 8px 12px; font-variant-numeric: tabular-nums;
}
.dos { display: grid; grid-template-columns: 1fr 200px; gap: 22px; margin-top: 8px; }
@media (max-width: 720px) { .dos { grid-template-columns: 1fr; } }
.datos { font-size: 14px; line-height: 1.7; background: #f8fafc; border: 1px dashed var(--linea); border-radius: 12px; padding: 12px 14px; }
.nota { font-size: 12.5px; color: var(--tenue); }
.qr { text-align: center; }
.qr img { border: 1px solid var(--linea); border-radius: 12px; background: #fff; }
.volver { margin-top: 18px; font-size: 13px; }
.volver a { color: var(--azul); text-decoration: none; }

.tabla { border: 1px solid var(--linea); border-radius: 12px; overflow: hidden; background: #fff; }
.fila {
  display: grid; grid-template-columns: 70px 1.3fr 120px 150px minmax(220px, 1fr);
  gap: 8px; align-items: center; padding: 10px 12px; border-top: 1px solid #f1f5fb; font-size: 13px;
}
.fila:first-child { border-top: 0; }
.fila.cabecera { background: #f8fafc; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--tenue); }
.fila .num { font-weight: 700; font-variant-numeric: tabular-nums; }
.controles { display: flex; gap: 6px; flex-wrap: wrap; }
.controles form { display: inline; }

.pie { text-align: center; font-size: 11.5px; color: var(--tenue); padding: 20px; }

/* --- título oficial del evento ------------------------------------------- */
.titulo-rifa {
  font-size: 19px; line-height: 1.35; letter-spacing: .01em; font-weight: 700;
  text-transform: uppercase; max-width: 760px; margin: 0 auto 10px; color: var(--tinta);
}
@media (min-width: 760px) { .titulo-rifa { font-size: 23px; } }
.premio {
  display: inline-block; margin: 0 0 10px; padding: 6px 14px; border-radius: 999px;
  background: #0b1b34; color: #f3c969; font-weight: 700; font-size: 16px;
}

/* --- ficha del premio ---------------------------------------------------- */
.ficha {
  background: #fff; border: 1px solid var(--linea); border-radius: 16px;
  padding: 20px; margin: 22px 0;
}
.ficha-titulo { margin: 0 0 8px; font-size: 17px; }
.ficha-texto { margin: 0 0 16px; font-size: 14px; line-height: 1.65; color: #2b3a52; }

.cualidades { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .cualidades { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cualidades { grid-template-columns: 1fr; } }
.cualidad {
  background: #f8fafc; border: 1px solid #eef2f8; border-radius: 12px; padding: 12px 14px;
}
.cualidad h3 { margin: 0 0 4px; font-size: 13px; color: var(--tinta); }
.cualidad p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--tenue); }

.mejoras {
  margin-top: 16px; padding: 14px 16px; border-radius: 12px;
  background: #fffdf5; border: 1px solid #f4e4b8;
}
.mejoras h3 { margin: 0 0 6px; font-size: 13px; color: #7a5a00; text-transform: uppercase; letter-spacing: .06em; }
.mejoras ul { margin: 0 0 6px; padding-left: 18px; font-size: 13px; line-height: 1.6; color: #4a3d1a; }

.tablero-titulo { text-align: center; font-size: 17px; margin: 26px 0 10px; }

/* --- portada premium ----------------------------------------------------- */
.hero2 {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 26px; align-items: center;
  background: linear-gradient(150deg, #08142a 0%, #0d2145 55%, #0a1a36 100%);
  border-radius: 20px; padding: 28px 30px; color: #eaf0fb; position: relative; overflow: hidden;
  box-shadow: 0 24px 60px -34px rgba(8, 20, 42, .8);
}
.hero2::after {
  content: ''; position: absolute; inset: auto -60px -120px auto; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(243,201,105,.16), transparent 65%); pointer-events: none;
}
@media (max-width: 860px) { .hero2 { grid-template-columns: 1fr; padding: 22px; } }

.sello {
  margin: 0 0 10px; font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: #f3c969; font-weight: 700;
}
.hero2 .titulo-rifa { color: #fff; margin: 0 0 14px; max-width: none; }
.hero2 .premio {
  background: #f3c969; color: #0b1b34; border-radius: 999px; display: inline-block;
  padding: 6px 16px; font-weight: 800; letter-spacing: .01em; margin: 0 0 16px;
}
.hero2-datos {
  list-style: none; margin: 0 0 20px; padding: 0; display: flex; gap: 22px; flex-wrap: wrap;
}
.hero2-datos li { display: flex; flex-direction: column; }
.hero2-datos strong { font-size: 19px; color: #fff; }
.hero2-datos span { font-size: 11.5px; color: #9fb2cf; text-transform: uppercase; letter-spacing: .06em; }

.btn.oro { background: #f3c969; color: #0b1b34; font-weight: 800; }
.btn.oro:hover { background: #ffd97f; }

.hero2-poster { margin: 0; }
.hero2-poster img {
  width: 100%; display: block; border-radius: 14px;
  box-shadow: 0 18px 40px -24px rgba(0,0,0,.9); border: 1px solid rgba(243,201,105,.25);
}

.contadores-hero {
  background: #fff; border: 1px solid var(--linea); border-radius: 14px;
  padding: 12px 18px; margin: 16px 0 0; justify-content: flex-start; gap: 26px; align-items: center;
}
.contadores-hero div span { text-transform: uppercase; }
.nota-contador { font-size: 12px; color: var(--tenue); flex: 1 1 220px; }
@media (max-width: 700px) { .nota-contador { flex-basis: 100%; } }

/* tarjetas de cualidades con número */
.cualidad { position: relative; padding-left: 14px; }
.cualidad::before {
  content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  border-radius: 3px; background: #e8d29a;
}
.num-cualidad {
  font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: #b98b2f;
}

.bloque-tablero { margin-top: 26px; }
.tablero-sub { text-align: center; font-size: 12.5px; color: var(--tenue); margin: 0 0 12px; }

.contadores-hero { justify-content: center; gap: 18px; }
.nota-tablero { text-align: center; font-size: 12.5px; color: var(--tenue); margin: 10px 0 0; }
.hero2-poster img { max-height: 430px; width: 100%; object-fit: contain; }

/* contadores en móvil: tres columnas parejas */
@media (max-width: 700px) {
  .contadores-hero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 10px; }
  .contadores-hero div { padding: 4px 6px; }
  .contadores-hero div strong { font-size: 17px; }
}

/* emblema en la cabecera */
.cab { padding: 8px 20px; }
.escudo-img {
  height: 46px; width: auto; display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.45));
}
.marca { gap: 12px; }
@media (max-width: 480px) { .escudo-img { height: 38px; } }
