:root {
  --principal: #0F5C74;
  --acento: #E8A33D;
  --crema: #F6DCC0;
  --texto-oscuro: #14202B;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--principal);
  color: #fff;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px 100px; }
.wrap.angosto { max-width: 480px; }
.wrap.centrado { text-align: center; }

.header-sorteo { text-align: center; }
.header-sorteo h1 {
  font-size: 2.4rem;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.polaroid {
  background: #fff;
  padding: 10px 10px 24px;
  display: inline-block;
  transform: rotate(-2deg);
  box-shadow: 0 8px 20px rgba(0,0,0,.3);
  margin: 12px 0;
  max-width: 260px;
}
.polaroid img { width: 100%; display: block; }
.premio { color: var(--acento); font-weight: bold; font-size: 1.1rem; }
.fecha, .precio { opacity: .9; }

.ganador-box {
  background: var(--acento);
  color: var(--texto-oscuro);
  padding: 14px;
  border-radius: 10px;
  text-align: center;
  margin: 16px 0;
}

.leyenda {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  font-size: .85rem;
  margin: 16px 0;
  opacity: .9;
}
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.dot.disponible { background: var(--crema); }
.dot.reservado { background: #999; }
.dot.vendido { background: #444; }
.dot.seleccionado { background: var(--acento); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 6px;
  margin-top: 16px;
}
.celda {
  background: var(--crema);
  color: var(--texto-oscuro);
  font-weight: bold;
  text-align: center;
  padding: 10px 2px;
  border-radius: 6px;
  cursor: pointer;
  font-size: .85rem;
  user-select: none;
  transition: transform .1s;
}
.celda:active { transform: scale(.95); }
.celda.reservado { background: #999; color: #eee; cursor: not-allowed; }
.celda.vendido { background: #2c3a44; color: #7d8f99; cursor: not-allowed; }
.celda.seleccionado { background: var(--acento); color: var(--texto-oscuro); box-shadow: 0 0 0 2px #fff inset; }

.barra-seleccion {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--acento);
  color: var(--texto-oscuro);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
}
.barra-seleccion button {
  background: var(--texto-oscuro);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

form label { display: block; margin: 14px 0 6px; font-weight: bold; }
form input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
}
form button {
  margin-top: 20px;
  width: 100%;
  background: var(--acento);
  color: var(--texto-oscuro);
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
}
form button:disabled { opacity: .6; }
.error { color: #ffb4b4; font-weight: bold; }
.aviso-tiempo { background: rgba(255,255,255,.1); padding: 10px; border-radius: 8px; }

.lista-sorteos { display: grid; gap: 16px; margin-top: 20px; }
.card-sorteo {
  display: block;
  background: rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 16px;
  color: #fff;
  text-decoration: none;
  position: relative;
}
.card-sorteo img { width: 100%; border-radius: 8px; margin-bottom: 10px; max-height: 180px; object-fit: cover; }
.badge-cerrado { position: absolute; top: 12px; right: 12px; background: #444; padding: 4px 10px; border-radius: 20px; font-size: .8rem; }

a { color: var(--acento); }
