:root {
  --rojo: #c6000d;
  --rojo-osc: #a8000b;
  --fresa: #d00018;
  --frambuesa: #9d1e3c;
  --arandano: #3a2d7d;
  --mora: #5a1531;
  --hoja: #3e8e3a;
  --texto: #262626;
  --suave: #6b6b6b;
  --fondo: #fff6f2;
  --tarjeta: #ffffff;
  --borde: #f1d9d3;
  --radio: 18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Verdana, sans-serif;
  line-height: 1.5;
  color: var(--texto);
  background-color: var(--fondo);
  background-image:
    radial-gradient(circle at 8% 0%, #ffdcd6 0, transparent 38%),
    radial-gradient(circle at 100% 35%, #ebe6ff 0, transparent 32%),
    radial-gradient(circle at 0% 100%, #f7dfe6 0, transparent 30%);
  background-attachment: fixed;
}
h1, h2, h3, .marca { font-family: Montserrat, system-ui, sans-serif; letter-spacing: .02em; }
a { color: var(--rojo); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--rojo); color: #fff;
}
.top form { margin: 0; }
.marca { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.05rem; }
.marca small { font-weight: 500; font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; opacity: .85; }
.ico { width: 28px; height: 28px; flex: none; }
.link { background: none; border: 0; padding: 4px; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

.contenido { max-width: 560px; margin: 0 auto; padding: 24px 16px 40px; }

.hero { text-align: center; margin: 8px 0 24px; }
.hero h1 { margin: .25em 0; font-size: clamp(1.7rem, 6vw, 2.4rem); line-height: 1.15; color: var(--rojo); }
.hero p { margin: 0; color: var(--suave); }
.bayas-fila { display: flex; justify-content: center; gap: 4px; }
.bayas-fila svg { width: 40px; height: 40px; }

.tarjeta {
  margin-bottom: 18px; padding: 20px;
  background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio);
  box-shadow: 0 6px 24px rgba(198, 0, 13, .08);
}
.tarjeta h2 { margin: 0 0 12px; font-size: 1.15rem; color: var(--mora); }
.tarjeta h3 { margin: 22px 0 10px; font-size: 1rem; color: var(--suave); }

label { display: block; margin: 12px 0 6px; font-weight: 600; }
input, select, textarea {
  width: 100%; padding: 12px 14px;
  font: inherit; color: var(--texto); background: #fff;
  border: 1.5px solid #e2c9c3; border-radius: 12px;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(198, 0, 13, .25); border-color: var(--rojo); }
input[inputmode="numeric"] { text-align: center; font-size: 1.3rem; letter-spacing: .5em; }
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: auto; }

.boton {
  display: inline-block; width: 100%; margin-top: 16px; padding: 14px 18px;
  border: 0; border-radius: 999px; background: var(--rojo); color: #fff;
  font-family: Montserrat, system-ui, sans-serif; font-weight: 700; font-size: 1rem;
  text-align: center; text-decoration: none; cursor: pointer;
}
.boton:hover { background: var(--rojo-osc); }
.boton:disabled { opacity: .45; cursor: not-allowed; }
.boton.secundario { background: #fff; color: var(--rojo); border: 2px solid var(--rojo); }

.alerta { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.alerta.error { background: #fde7e9; color: #8a0009; }
.alerta.ok { background: #e9f6e8; color: #1f5d1c; }
.alerta.info { background: #eeeafb; color: var(--arandano); }

.revelacion { text-align: center; color: #fff; border: 0; background: linear-gradient(135deg, var(--rojo), var(--frambuesa) 60%, var(--mora)); }
.revelacion .te-toca { margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .18em; opacity: .9; }
.revelacion .nombre {
  margin: .15em 0; font-family: Montserrat, system-ui, sans-serif; font-weight: 800;
  font-size: clamp(2rem, 9vw, 3rem); line-height: 1.1; word-break: break-word;
}
.revelacion .reglas { margin: 0; opacity: .95; }

.mensajes { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.mensaje { padding: 12px 14px; background: #f4f1ff; border-radius: 16px 16px 16px 4px; }
.mensaje.mio { background: #fff0ee; border-radius: 16px 16px 4px 16px; }
.mensaje .de { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: .8rem; font-weight: 700; color: var(--arandano); }
.mensaje .de svg { width: 18px; height: 18px; }
.mensaje p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.mensaje time { display: block; margin-top: 4px; font-size: .75rem; color: var(--suave); }

.lista { margin: 0; padding: 0; list-style: none; }
.lista li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--borde); }
.lista li:last-child { border-bottom: 0; }
.acciones { display: flex; gap: 6px; }
.acciones form { margin: 0; }
.mini { padding: 6px 12px; border: 1.5px solid var(--rojo); border-radius: 999px; background: #fff; color: var(--rojo); font: inherit; font-size: .85rem; cursor: pointer; }
.mini.peligro { border-color: var(--mora); color: var(--mora); }

.vacio { margin: 10px 0 0; text-align: center; color: var(--suave); }
.centro { text-align: center; }
.grande { margin: 0; font-family: Montserrat, system-ui, sans-serif; font-size: 2.6rem; font-weight: 800; color: var(--rojo); }

.pie { padding: 24px 16px 32px; text-align: center; font-size: .9rem; color: var(--suave); }
.pie p { margin: .2em 0; }
.sutil { font-style: italic; }

@media (prefers-reduced-motion: no-preference) {
  .revelacion .nombre { animation: brota .6s ease-out both; }
  @keyframes brota { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
}
