:root {
  --fondo: #140b0a;
  --rojo: #8e1b17;
  --rojo-osc: #5e1410;
  --tarjeta: #1c1210;
  --linea: #3d211b;
  --crema: #f1e2bf;
  --oro: #f2b11e;
  --texto: #f6ecd8;
  --suave: #bba98f;
  --error: #ff8a7a;
  --ok: #8fe0a2;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 520px at 50% -120px, rgba(142, 27, 23, .55), transparent 70%),
    var(--fondo);
  color: var(--texto);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

.contenedor {
  max-width: 620px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

/* ---------- Banner ---------- */
.hero img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 3px solid var(--crema);
  box-shadow: 0 0 0 3px var(--rojo-osc), 0 18px 40px rgba(0, 0, 0, .55);
}

/* ---------- Form card ---------- */
.tarjeta {
  position: relative;
  margin-top: 34px;
  background: var(--tarjeta);
  border: 2px solid var(--linea);
  border-radius: 18px;
  padding: 34px 20px 20px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .4);
}

/* Cinta dorada al estilo del banner */
.cinta {
  position: absolute;
  top: -19px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--oro);
  color: #1a0f0c;
  padding: 6px 26px;
  border: 2px solid #1a0f0c;
  box-shadow: 3px 3px 0 #1a0f0c;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%);
}

.sub { margin: 0 0 14px; color: var(--suave); text-align: center; font-size: .95rem; }

textarea {
  width: 100%;
  resize: vertical;
  min-height: 170px;
  background: #110a09;
  color: var(--texto);
  border: 1px solid var(--linea);
  border-radius: 12px;
  padding: 14px;
  font: inherit;
  font-size: 1.05rem;
}
textarea::placeholder { color: #7d6a5a; }
textarea:focus { outline: 2px solid var(--oro); outline-offset: 1px; border-color: transparent; }

.fila { display: flex; justify-content: flex-end; margin: 6px 0 14px; }
.contador { color: var(--suave); font-size: .85rem; }
/* ---------- Suma ---------- */
.suma {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: #110a09; border: 1px dashed var(--linea); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 14px;
}
.suma-pregunta { color: var(--crema); font-weight: 700; }
.suma-fila { display: flex; align-items: center; gap: 8px; }
.suma input {
  width: 64px; text-align: center; font: inherit; font-size: 1.1rem; font-weight: 800;
  background: var(--tarjeta); color: var(--oro); border: 2px solid var(--linea); border-radius: 10px; padding: 6px;
}
.suma input:focus { outline: 2px solid var(--oro); outline-offset: 1px; border-color: transparent; }
button.suma-otra {
  width: auto; padding: 6px 10px; font-size: 1.1rem; font-style: normal; text-transform: none;
  background: transparent; color: var(--suave); border: 1px solid var(--linea); box-shadow: none;
}
button.suma-otra:hover { color: var(--oro); filter: none; }
button.suma-otra:active { transform: none; box-shadow: none; }

.turnstile { min-height: 65px; margin-bottom: 14px; display: flex; justify-content: center; }

button {
  width: 100%;
  padding: 13px;
  border: 2px solid #1a0f0c;
  border-radius: 12px;
  background: var(--oro);
  color: #1a0f0c;
  font: inherit;
  font-weight: 900;
  font-style: italic;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  box-shadow: 0 5px 0 var(--rojo);
  cursor: pointer;
  transition: transform .08s, box-shadow .08s, filter .12s;
}
button:hover:not(:disabled) { filter: brightness(1.06); }
button:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 var(--rojo); }
button:disabled { opacity: .45; cursor: not-allowed; }

.estado { min-height: 1.5em; margin: 14px 0 0; text-align: center; }
.estado.error { color: var(--error); }
.estado.ok { color: var(--ok); }

/* ---------- Footer ---------- */
.pie {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 28px; color: var(--suave); font-size: .85rem;
}
.pie img { border-radius: 8px; border: 1px solid var(--linea); }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}
