* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: #fff4f6;
  color: #2b2b2b;
}

.constructor {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.constructor h1 {
  font-size: clamp(1.5rem, 5vw, 2rem);
  text-align: center;
  margin-bottom: 1.5rem;
}

.layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .formulario,
  .vista-previa {
    flex: 1;
  }
}

.formulario {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: white;
  padding: 1.25rem;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.formulario label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.formulario input,
.formulario select,
.formulario textarea {
  font: inherit;
  padding: 0.6rem 0.7rem;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  font-weight: 400;
}

.formulario textarea {
  resize: vertical;
}

#lugares-fieldset {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 0.9rem;
}

#lugares-fieldset legend {
  font-weight: 600;
  padding: 0 0.3rem;
}

.lugar-item {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.lugar-item input {
  flex: 1;
  min-width: 0;
}

.btn-quitar-lugar {
  flex: none;
  background: #fdecea;
  border: 1px solid #f5c2c0;
  color: #b3261e;
  border-radius: 8px;
  width: 2.4rem;
  cursor: pointer;
}

.btn-quitar-lugar:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#btn-agregar-lugar {
  background: #eef7ee;
  border: 1px solid #b9e0b9;
  color: #1a7a3c;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

#btn-agregar-lugar:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-generar {
  background: #e6007a;
  color: white;
  border: none;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

.btn-generar:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.generar-error {
  color: #b3261e;
  font-weight: 600;
  margin: 0;
  min-height: 1.2em;
}

.generar-resultado {
  background: #eef7ee;
  border: 1px solid #b9e0b9;
  border-radius: 8px;
  padding: 0.9rem;
}

.generar-resultado p {
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.link-generado {
  display: flex;
  gap: 0.5rem;
}

.link-generado input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.6rem;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  font: inherit;
}

.link-generado button {
  flex: none;
  background: #1a7a3c;
  color: white;
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.vista-previa h2 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
}

.preview-card {
  background: white;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  min-height: 160px;
}

.preview-titulo {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.preview-mensaje {
  white-space: pre-wrap;
  margin: 0 0 0.5rem;
}

.preview-fecha {
  color: #555;
  margin: 0 0 0.5rem;
}

.preview-lugares {
  margin: 0;
  padding-left: 1.2rem;
}

.preview-lugares a {
  color: #b3261e;
  text-decoration: underline;
}
